From report at bugs.python.org Thu Feb 1 00:44:53 2018 From: report at bugs.python.org (Yang Yu) Date: Thu, 01 Feb 2018 05:44:53 +0000 Subject: [issue32739] collections.deque rotate(n=1) default value not documented Message-ID: <1517463893.34.0.467229070634.issue32739@psf.upfronthosting.co.za> New submission from Yang Yu : https://docs.python.org/3/library/collections.html#collections.deque rotate() works the same as rotate(1). The documentation did not mention the default for n. ---------- assignee: docs at python components: Documentation messages: 311403 nosy: docs at python, yuy priority: normal severity: normal status: open title: collections.deque rotate(n=1) default value not documented type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 02:31:10 2018 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 01 Feb 2018 07:31:10 +0000 Subject: [issue32722] Mislabeling of a dict comprehension as a generator expression in the tutorial In-Reply-To: <1517290861.72.0.467229070634.issue32722@psf.upfronthosting.co.za> Message-ID: <1517470270.52.0.467229070634.issue32722@psf.upfronthosting.co.za> Xiang Zhang added the comment: New changeset ab328756d7fd969ee4882458b07892dff135013c by Xiang Zhang (St?phane Wirtel) in branch 'master': bpo-32722: Remove useless example in the Classes tutorial (#5446) https://github.com/python/cpython/commit/ab328756d7fd969ee4882458b07892dff135013c ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 02:32:10 2018 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 01 Feb 2018 07:32:10 +0000 Subject: [issue32722] Mislabeling of a dict comprehension as a generator expression in the tutorial In-Reply-To: <1517290861.72.0.467229070634.issue32722@psf.upfronthosting.co.za> Message-ID: <1517470330.28.0.467229070634.issue32722@psf.upfronthosting.co.za> Xiang Zhang added the comment: I treat it as an enhancement so only merge it into 3.8. Thanks Soothsayer for the report and St?phane for the patch! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 03:53:38 2018 From: report at bugs.python.org (Ma Lin) Date: Thu, 01 Feb 2018 08:53:38 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517475218.17.0.467229070634.issue32394@psf.upfronthosting.co.za> Change by Ma Lin : ---------- keywords: +patch pull_requests: +5294 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 04:10:26 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 01 Feb 2018 09:10:26 +0000 Subject: [issue32732] LoggingAdapter ignores extra kwargs of Logger#log() In-Reply-To: <1517423175.51.0.467229070634.issue32732@psf.upfronthosting.co.za> Message-ID: <1517476226.37.0.467229070634.issue32732@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Cyril, I have commented your PR ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 04:10:58 2018 From: report at bugs.python.org (Vishal Kushwaha) Date: Thu, 01 Feb 2018 09:10:58 +0000 Subject: [issue32740] test_calendar and test_re fail with unknown locale: UTF-8 in _parse_localename Message-ID: <1517476258.4.0.467229070634.issue32740@psf.upfronthosting.co.za> New submission from Vishal Kushwaha : Fresh build on MacOS 10.13.2 ====================================================================== ERROR: test_locale_flag (test.test_re.ReTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/vikramsingh/Desktop/projects/cpython/Lib/test/test_re.py", line 1520, in test_locale_flag _, enc = locale.getlocale(locale.LC_CTYPE) File "/Users/vikramsingh/Desktop/projects/cpython/Lib/locale.py", line 587, in getlocale return _parse_localename(localename) File "/Users/vikramsingh/Desktop/projects/cpython/Lib/locale.py", line 495, in _parse_localename raise ValueError('unknown locale: %s' % localename) ValueError: unknown locale: UTF-8 ---------------------------------------------------------------------- ====================================================================== ERROR: test_option_locale (test.test_calendar.CommandLineTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/vikramsingh/Desktop/projects/cpython/Lib/test/test_calendar.py", line 838, in test_option_locale lang, enc = locale.getdefaultlocale() File "/Users/vikramsingh/Desktop/projects/cpython/Lib/locale.py", line 568, in getdefaultlocale return _parse_localename(localename) File "/Users/vikramsingh/Desktop/projects/cpython/Lib/locale.py", line 495, in _parse_localename raise ValueError('unknown locale: %s' % localename) ValueError: unknown locale: UTF-8 ---------------------------------------------------------------------- ---------- components: Library (Lib) messages: 311407 nosy: vishalsingh priority: normal severity: normal status: open title: test_calendar and test_re fail with unknown locale: UTF-8 in _parse_localename type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 04:22:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Feb 2018 09:22:38 +0000 Subject: [issue32740] test_calendar and test_re fail with unknown locale: UTF-8 in _parse_localename In-Reply-To: <1517476258.4.0.467229070634.issue32740@psf.upfronthosting.co.za> Message-ID: <1517476958.48.0.467229070634.issue32740@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- components: +macOS nosy: +benjamin.peterson, lemburg, ned.deily, ronaldoussoren, serhiy.storchaka versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 04:24:25 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 01 Feb 2018 09:24:25 +0000 Subject: [issue32572] Add the ftplib option, overrides the IP address. In-Reply-To: <1516128378.06.0.467229070634.issue32572@psf.upfronthosting.co.za> Message-ID: <1517477065.5.0.467229070634.issue32572@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Hideyuki, Thank you for your contribution but we need some changes from your PR. 1. Could you add a documentation in Doc/library/ftplib.rst +- line 170, after FTP.set_debuglevel ? 2. There is no tests, please could you add a test in Lib/test/test_ftplib.py 3. Fix the remarks on your PR Thank you ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 04:30:47 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 01 Feb 2018 09:30:47 +0000 Subject: [issue32740] test_calendar and test_re fail with unknown locale: UTF-8 in _parse_localename In-Reply-To: <1517476258.4.0.467229070634.issue32740@psf.upfronthosting.co.za> Message-ID: <1517477447.4.0.467229070634.issue32740@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Could you dump your locales ? LC_ALL & LANG, etc... ? Thank you ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 04:33:06 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 01 Feb 2018 09:33:06 +0000 Subject: [issue32711] Fix warnings for Python/ast_unparse.c In-Reply-To: <1517232909.04.0.467229070634.issue32711@psf.upfronthosting.co.za> Message-ID: <1517477586.7.0.467229070634.issue32711@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Christian, I add Lukasz in the loop because Victor asked to him a small review because he is not sure about the right way, PyErr_XXX or Py_UNREACHABLE. Thank you for your review. ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 04:44:01 2018 From: report at bugs.python.org (Vishal Kushwaha) Date: Thu, 01 Feb 2018 09:44:01 +0000 Subject: [issue32740] test_calendar and test_re fail with unknown locale: UTF-8 in _parse_localename In-Reply-To: <1517476258.4.0.467229070634.issue32740@psf.upfronthosting.co.za> Message-ID: <1517478241.03.0.467229070634.issue32740@psf.upfronthosting.co.za> Vishal Kushwaha added the comment: I'm new to this so I guess you were asking for this: $ locale LANG= LC_COLLATE="C" LC_CTYPE="UTF-8" LC_MESSAGES="C" LC_MONETARY="C" LC_NUMERIC="C" LC_TIME="C" LC_ALL= ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 04:51:48 2018 From: report at bugs.python.org (Vishal Kushwaha) Date: Thu, 01 Feb 2018 09:51:48 +0000 Subject: [issue32740] test_calendar and test_re fail with unknown locale: UTF-8 in _parse_localename In-Reply-To: <1517476258.4.0.467229070634.issue32740@psf.upfronthosting.co.za> Message-ID: <1517478708.78.0.467229070634.issue32740@psf.upfronthosting.co.za> Vishal Kushwaha added the comment: Ok It's a strange MacOs prob. closed. Thanks anyways :) ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 05:00:38 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 01 Feb 2018 10:00:38 +0000 Subject: [issue20709] os.utime(path_to_directory): wrong documentation for Windows. In-Reply-To: <1392937056.04.0.541478480244.issue20709@psf.upfronthosting.co.za> Message-ID: <1517479238.96.0.467229070634.issue20709@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- pull_requests: +5295 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 05:02:04 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 01 Feb 2018 10:02:04 +0000 Subject: [issue20709] os.utime(path_to_directory): wrong documentation for Windows. In-Reply-To: <1392937056.04.0.541478480244.issue20709@psf.upfronthosting.co.za> Message-ID: <1517479324.12.0.467229070634.issue20709@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi @Cheryl I just created a PR with the patch for 3.8. Could you take a look? Thank you ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 05:04:22 2018 From: report at bugs.python.org (Ma Lin) Date: Thu, 01 Feb 2018 10:04:22 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517479462.39.0.467229070634.issue32394@psf.upfronthosting.co.za> Ma Lin added the comment: So we either need to explicitly exclude this symbol on Windows (at least until we drop support for pre-Windows 10 versions) or silently ignore setsockopt errors for future good arguments. I'm inclined to do the former - other opinions? -------------- I'm not a socket expert, I have a question about the former one. Imagine someone changed those values in his/her code, for example: socket.TCP_KEEPCNT = 20 His/her code works fine on new version Windows. Will this line break things again on old version Windows? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 05:05:03 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 01 Feb 2018 10:05:03 +0000 Subject: [issue11844] Update json to upstream simplejson latest release In-Reply-To: <1302809748.45.0.3421678902.issue11844@psf.upfronthosting.co.za> Message-ID: <1517479503.34.0.467229070634.issue11844@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 05:05:30 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 01 Feb 2018 10:05:30 +0000 Subject: [issue11844] Update json to upstream simplejson latest release In-Reply-To: <1302809748.45.0.3421678902.issue11844@psf.upfronthosting.co.za> Message-ID: <1517479530.17.0.467229070634.issue11844@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I close this issue because we are in 2018 and the issue was rejected by Antoine in 2014. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 05:08:48 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 01 Feb 2018 10:08:48 +0000 Subject: [issue32674] minor documentation fix for '__import__' In-Reply-To: <1516948902.25.0.467229070634.issue32674@psf.upfronthosting.co.za> Message-ID: <1517479728.23.0.467229070634.issue32674@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- keywords: +needs review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 05:10:27 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 01 Feb 2018 10:10:27 +0000 Subject: [issue21475] Support the Sitemap extension in robotparser In-Reply-To: <1399858557.27.0.633505879036.issue21475@psf.upfronthosting.co.za> Message-ID: <1517479827.45.0.467229070634.issue21475@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi @berker and @pwirtz. could you write a test for this issue? thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 05:23:40 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 01 Feb 2018 10:23:40 +0000 Subject: [issue12916] Add inspect.splitdoc In-Reply-To: <1315326747.38.0.43030903994.issue12916@psf.upfronthosting.co.za> Message-ID: <1517480620.78.0.467229070634.issue12916@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I move this issue to 3.8 ---------- versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 05:34:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Feb 2018 10:34:39 +0000 Subject: [issue32711] Fix warnings for Python/ast_unparse.c In-Reply-To: <1517232909.04.0.467229070634.issue32711@psf.upfronthosting.co.za> Message-ID: <1517481279.95.0.467229070634.issue32711@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think it is better to not add the default case in switch statements. If once we will add a new binary or unary operator, but forgot to update ast_unparse.c the compiler will immediately warn about this if there are no default cases. But if there is a default case the compiler will be silent. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 06:48:40 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Feb 2018 11:48:40 +0000 Subject: [issue32565] Document the version of adding opcodes In-Reply-To: <1516094930.57.0.467229070634.issue32565@psf.upfronthosting.co.za> Message-ID: <1517485720.18.0.467229070634.issue32565@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 12e7cd8a51956a5ce373aac692ae6366c5f86584 by Serhiy Storchaka in branch 'master': bpo-32565: Add missed versionadded directives for all new opcodes. (#5199) https://github.com/python/cpython/commit/12e7cd8a51956a5ce373aac692ae6366c5f86584 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 06:48:52 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 01 Feb 2018 11:48:52 +0000 Subject: [issue32565] Document the version of adding opcodes In-Reply-To: <1516094930.57.0.467229070634.issue32565@psf.upfronthosting.co.za> Message-ID: <1517485732.72.0.467229070634.issue32565@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5296 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 06:55:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Feb 2018 11:55:44 +0000 Subject: [issue32565] Document the version of adding opcodes In-Reply-To: <1516094930.57.0.467229070634.issue32565@psf.upfronthosting.co.za> Message-ID: <1517486144.71.0.467229070634.issue32565@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +5297 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 06:57:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Feb 2018 11:57:30 +0000 Subject: [issue32137] Stack overflow in repr of deeply nested dicts In-Reply-To: <1511686410.56.0.213398074469.issue32137@psf.upfronthosting.co.za> Message-ID: <1517486250.58.0.467229070634.issue32137@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 688b6dec4e8847a154ef27257069291175764794 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-32137: The repr of deeply nested dict now raises a RecursionError (GH-4570) (GH-4689) https://github.com/python/cpython/commit/688b6dec4e8847a154ef27257069291175764794 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 07:08:36 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Feb 2018 12:08:36 +0000 Subject: [issue32741] Add asyncio.TimerHandle.when() function Message-ID: <1517486916.43.0.467229070634.issue32741@psf.upfronthosting.co.za> New submission from Andrew Svetlov : Should just return self._when attribute. I need it for testing purposes. Without the method there is no possibility to figure out scheduled wakeup time. An alternative is waiting for callback but the approach increases unittest execution time and not very reliable. I don't like looking into `handler._when` private property, uvloop does not expose it. Ned, is it possible to include the feature into Python 3.7? The change is safe and tiny, no backward compatibility problems etc. ---------- components: asyncio messages: 311421 nosy: asvetlov, ned.deily, yselivanov priority: normal severity: normal status: open title: Add asyncio.TimerHandle.when() function versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 07:13:00 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Feb 2018 12:13:00 +0000 Subject: [issue32565] Document the version of adding opcodes In-Reply-To: <1516094930.57.0.467229070634.issue32565@psf.upfronthosting.co.za> Message-ID: <1517487180.16.0.467229070634.issue32565@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 4d6543005df6eba6ec3414686fdc251cb4fe9792 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-32565: Add missed versionadded directives for all new opcodes. (GH-5199) (GH-5470) https://github.com/python/cpython/commit/4d6543005df6eba6ec3414686fdc251cb4fe9792 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 07:47:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Feb 2018 12:47:25 +0000 Subject: [issue32565] Document the version of adding opcodes In-Reply-To: <1516094930.57.0.467229070634.issue32565@psf.upfronthosting.co.za> Message-ID: <1517489245.42.0.467229070634.issue32565@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 8cf7ebb32dbdfb976ac92afd264e7587fb0da7ae by Serhiy Storchaka in branch '3.6': [3.6] bpo-32565: Add missed versionadded directives for all new opcodes. (GH-5199). (GH-5471) https://github.com/python/cpython/commit/8cf7ebb32dbdfb976ac92afd264e7587fb0da7ae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 07:48:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Feb 2018 12:48:18 +0000 Subject: [issue32565] Document the version of adding opcodes In-Reply-To: <1516094930.57.0.467229070634.issue32565@psf.upfronthosting.co.za> Message-ID: <1517489298.05.0.467229070634.issue32565@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 07:53:08 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 01 Feb 2018 12:53:08 +0000 Subject: [issue32711] Fix warnings for Python/ast_unparse.c In-Reply-To: <1517232909.04.0.467229070634.issue32711@psf.upfronthosting.co.za> Message-ID: <1517489588.49.0.467229070634.issue32711@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Serhiy, but currently, there is some warnings because op has no value and can not be assigned to NULL because _PyUnicodeWriter_WriteASCIIString can't accept a NULL value. What do you propose? Warnings at the compilation step and an eventual crash if we don't handle this case because there is no default? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 08:10:01 2018 From: report at bugs.python.org (Christian Heimes) Date: Thu, 01 Feb 2018 13:10:01 +0000 Subject: [issue32711] Fix warnings for Python/ast_unparse.c In-Reply-To: <1517232909.04.0.467229070634.issue32711@psf.upfronthosting.co.za> Message-ID: <1517490601.85.0.467229070634.issue32711@psf.upfronthosting.co.za> Christian Heimes added the comment: In my experience, Serhiy's example won't work. C doesn't guarantee that the functions will not be called with an unsupported op. Either my proposal or Victor's proposal are the correct way to solve the warning. Victor's proposal is even better because it makes the interpreter fail when an invalid operator is used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 08:21:09 2018 From: report at bugs.python.org (Christian Heimes) Date: Thu, 01 Feb 2018 13:21:09 +0000 Subject: [issue32738] CDLL : Can't find module In-Reply-To: <1517450286.23.0.467229070634.issue32738@psf.upfronthosting.co.za> Message-ID: <1517491269.66.0.467229070634.issue32738@psf.upfronthosting.co.za> Christian Heimes added the comment: Your library is probably missing dependencies. Please use the Python mailing list or IRC to get assistance. bugs.python.org is a bug tracker, not a supported forum. You can find more information about community support forums on https://www.python.org/community/ ---------- nosy: +christian.heimes resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 08:44:44 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 01 Feb 2018 13:44:44 +0000 Subject: [issue32711] Fix warnings for Python/ast_unparse.c In-Reply-To: <1517232909.04.0.467229070634.issue32711@psf.upfronthosting.co.za> Message-ID: <1517492684.22.0.467229070634.issue32711@psf.upfronthosting.co.za> St?phane Wirtel added the comment: then I will use the approach of Victor with the Py_UNREACHABLE macro and will push asap. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 08:46:42 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 01 Feb 2018 13:46:42 +0000 Subject: [issue32711] Fix warnings for Python/ast_unparse.c In-Reply-To: <1517232909.04.0.467229070634.issue32711@psf.upfronthosting.co.za> Message-ID: <1517492802.79.0.467229070634.issue32711@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Christian, I just pushed my code, wait for the feedback from Travis. Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 09:07:11 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Feb 2018 14:07:11 +0000 Subject: [issue31106] os.posix_fallocate() generate exception with errno 0 In-Reply-To: <1501686186.83.0.555586832167.issue31106@psf.upfronthosting.co.za> Message-ID: <1517494031.81.0.467229070634.issue31106@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New changeset 3a04c52a9eb03e31c60037248b872f3662002a4d by Andrew Svetlov (Miss Islington (bot)) in branch '3.6': bpo-31106: Fix handling of erros in posix_fallocate() and posix_fadvise() (GH-3000) (GH-3000) (#4101) https://github.com/python/cpython/commit/3a04c52a9eb03e31c60037248b872f3662002a4d ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 09:20:26 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 01 Feb 2018 14:20:26 +0000 Subject: [issue32741] Add asyncio.TimerHandle.when() function In-Reply-To: <1517486916.43.0.467229070634.issue32741@psf.upfronthosting.co.za> Message-ID: <1517494826.77.0.467229070634.issue32741@psf.upfronthosting.co.za> Yury Selivanov added the comment: How will such test look like? I'm still not sure we need it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 09:49:04 2018 From: report at bugs.python.org (R. David Murray) Date: Thu, 01 Feb 2018 14:49:04 +0000 Subject: [issue32572] Add the ftplib option, overrides the IP address. In-Reply-To: <1516128378.06.0.467229070634.issue32572@psf.upfronthosting.co.za> Message-ID: <1517496544.51.0.467229070634.issue32572@psf.upfronthosting.co.za> R. David Murray added the comment: I'd like confirmation from someone involved in maintaining the ftplib package that this is in fact the correct solution. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 10:06:37 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 01 Feb 2018 15:06:37 +0000 Subject: [issue32572] Add the ftplib option, overrides the IP address. In-Reply-To: <1517496544.51.0.467229070634.issue32572@psf.upfronthosting.co.za> Message-ID: <20180201150634.GA22340@xps> St?phane Wirtel added the comment: +1 for this point David, but also the minimum is the documentation and a test, I suppose you will confirm. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 10:09:24 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Feb 2018 15:09:24 +0000 Subject: [issue32741] Add asyncio.TimerHandle.when() function In-Reply-To: <1517486916.43.0.467229070634.issue32741@psf.upfronthosting.co.za> Message-ID: <1517497764.16.0.467229070634.issue32741@psf.upfronthosting.co.za> Andrew Svetlov added the comment: In aiohttp we have HTTP keepalivve support. A function schedules a delayed callback. On processing a new request the callback is cancelled and rescheduled to a new time. I like to check cancellation state (now it is possible with public API) and scheduled time. I did the check with mocking but proposed method allows to do it easy and more obviously. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 10:10:53 2018 From: report at bugs.python.org (Peter Bengtsson) Date: Thu, 01 Feb 2018 15:10:53 +0000 Subject: [issue32742] zipfile extractall needlessly re-wraps ZipInfo instances Message-ID: <1517497853.08.0.467229070634.issue32742@psf.upfronthosting.co.za> New submission from Peter Bengtsson : The ZipFile class as a extractall method [0] that allows you to leave the 'members' empty. If empty, the 'members' becomes a list of all the *names* of files in the zip. Then it iterates over the names as sends each to `self._extract_member`. But that method needs it to be a ZipInfo object instead of a file name, so it re-wraps it [2]. Instead we can use `self.infolist()` to avoid that re-wrapping inside each `self._extract_member` call. [0] hhttps://github.com/python/cpython/blob/12e7cd8a51956a5ce373aac692ae6366c5f86584/Lib/zipfile.py#L1579 [1] https://github.com/python/cpython/blob/12e7cd8a51956a5ce373aac692ae6366c5f86584/Lib/zipfile.py#L1586 [2] https://github.com/python/cpython/blob/12e7cd8a51956a5ce373aac692ae6366c5f86584/Lib/zipfile.py#L1615-L1616 ---------- components: Library (Lib) messages: 311434 nosy: peterbe priority: normal severity: normal status: open title: zipfile extractall needlessly re-wraps ZipInfo instances type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 10:12:05 2018 From: report at bugs.python.org (Peter Bengtsson) Date: Thu, 01 Feb 2018 15:12:05 +0000 Subject: [issue32742] zipfile extractall needlessly re-wraps ZipInfo instances In-Reply-To: <1517497853.08.0.467229070634.issue32742@psf.upfronthosting.co.za> Message-ID: <1517497925.56.0.467229070634.issue32742@psf.upfronthosting.co.za> Peter Bengtsson added the comment: (PS. I'm new to filing Python bugs and submitting patches. I *think* this is the right version. I've only been looking at 'master'.) ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 10:17:35 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 01 Feb 2018 15:17:35 +0000 Subject: [issue32741] Add asyncio.TimerHandle.when() function In-Reply-To: <1517486916.43.0.467229070634.issue32741@psf.upfronthosting.co.za> Message-ID: <1517498255.84.0.467229070634.issue32741@psf.upfronthosting.co.za> Yury Selivanov added the comment: OK, makes sense. Can you submit a PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 10:17:23 2018 From: report at bugs.python.org (Peter Bengtsson) Date: Thu, 01 Feb 2018 15:17:23 +0000 Subject: [issue32742] zipfile extractall needlessly re-wraps ZipInfo instances In-Reply-To: <1517497853.08.0.467229070634.issue32742@psf.upfronthosting.co.za> Message-ID: <1517498243.73.0.467229070634.issue32742@psf.upfronthosting.co.za> Change by Peter Bengtsson : ---------- keywords: +patch pull_requests: +5298 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 10:24:08 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 01 Feb 2018 15:24:08 +0000 Subject: [issue32741] Add asyncio.TimerHandle.when() function In-Reply-To: <1517486916.43.0.467229070634.issue32741@psf.upfronthosting.co.za> Message-ID: <1517498648.75.0.467229070634.issue32741@psf.upfronthosting.co.za> Ned Deily added the comment: Let's get it into master for 3.8 first and then we'll have something to discuss. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 10:25:20 2018 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 01 Feb 2018 15:25:20 +0000 Subject: [issue32691] "pdb -m " sets __main__.__package__ incorrectly In-Reply-To: <1517115891.43.0.467229070634.issue32691@psf.upfronthosting.co.za> Message-ID: <1517498720.74.0.467229070634.issue32691@psf.upfronthosting.co.za> Nick Coghlan added the comment: I forget we had mod_spec.parent available to us these days, so yes, we should use that rather than recalculating the parent with str.rpartition. As Mario noted, we only want to change the behaviour when the executed module is a plain module or submodule, rather than being a package in its own right with a pkg.__main__ submodule (since the current behaviour is correct in the latter case). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 10:25:36 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 01 Feb 2018 15:25:36 +0000 Subject: [issue32572] Add the ftplib option, overrides the IP address. In-Reply-To: <1516128378.06.0.467229070634.issue32572@psf.upfronthosting.co.za> Message-ID: <1517498736.45.0.467229070634.issue32572@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Mmmm out of curiosity, how common is this? Usually when client is behind a NAT it's supposed to use PASV. What you're proposing is a configuration option which typically belong to servers, not clients. I don't remember ever bumping into a FTP client allowing such an option (e.g. does FileZilla have it?). Also, this has some security implications as you could potentially dictate a naive FTP server to connect to a malicious host:port, and basically this is the reasons why servers do such a "IP replacement", not clients. In pyftpdlib (which is a server) I explicitly reject PORT connections with an IP != client's IP (because it's a security concern), even though the check can be disabled: https://github.com/giampaolo/pyftpdlib/blob/9dcbf685e10906fbdf4969cda1138a25f96bf16d/pyftpdlib/handlers.py#L383-L396 I believe proftpd and vsftpd does the same by default. ---------- assignee: -> giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 10:19:36 2018 From: report at bugs.python.org (Mario Corchero) Date: Thu, 01 Feb 2018 15:19:36 +0000 Subject: [issue32691] "pdb -m " sets __main__.__package__ incorrectly In-Reply-To: <1517115891.43.0.467229070634.issue32691@psf.upfronthosting.co.za> Message-ID: <1517498376.42.0.467229070634.issue32691@psf.upfronthosting.co.za> Mario Corchero added the comment: OK, just managed to reproduce it. This appears only when you run a python script as a module. Running a module with __main__ does not show the issue. Will get a patch ready ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 10:36:17 2018 From: report at bugs.python.org (R. David Murray) Date: Thu, 01 Feb 2018 15:36:17 +0000 Subject: [issue32572] Add the ftplib option, overrides the IP address. In-Reply-To: <1516128378.06.0.467229070634.issue32572@psf.upfronthosting.co.za> Message-ID: <1517499377.15.0.467229070634.issue32572@psf.upfronthosting.co.za> R. David Murray added the comment: I too wondered if pasv was the correct solution to the problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 10:38:53 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 01 Feb 2018 15:38:53 +0000 Subject: [issue32303] Namespace packages have inconsistent __loader__ and __spec__.loader In-Reply-To: <1513179703.14.0.213398074469.issue32303@psf.upfronthosting.co.za> Message-ID: <1517499533.66.0.467229070634.issue32303@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- assignee: -> barry versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 10:55:46 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 01 Feb 2018 15:55:46 +0000 Subject: [issue32305] Namespace packages have inconsistent __file__ and __spec__.origin In-Reply-To: <1513180121.5.0.213398074469.issue32305@psf.upfronthosting.co.za> Message-ID: <1517500546.22.0.467229070634.issue32305@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- assignee: -> barry versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 10:57:48 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 01 Feb 2018 15:57:48 +0000 Subject: [issue32741] Add asyncio.TimerHandle.when() function In-Reply-To: <1517486916.43.0.467229070634.issue32741@psf.upfronthosting.co.za> Message-ID: <1517500668.32.0.467229070634.issue32741@psf.upfronthosting.co.za> Yury Selivanov added the comment: The PR is LGTM. Up to Ned to allow this in 3.7. I agree that the feature is (a) trivial, (b) new, so it's safe to go in 3.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 10:58:04 2018 From: report at bugs.python.org (Mario Corchero) Date: Thu, 01 Feb 2018 15:58:04 +0000 Subject: [issue32206] Run modules with pdb In-Reply-To: <1512308200.99.0.213398074469.issue32206@psf.upfronthosting.co.za> Message-ID: <1517500684.73.0.467229070634.issue32206@psf.upfronthosting.co.za> Change by Mario Corchero : ---------- pull_requests: +5301 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 10:59:10 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 01 Feb 2018 15:59:10 +0000 Subject: [issue32741] Add asyncio.TimerHandle.when() function In-Reply-To: <1517486916.43.0.467229070634.issue32741@psf.upfronthosting.co.za> Message-ID: <1517500750.24.0.467229070634.issue32741@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Let's get it into master for 3.8 first and then we'll have something to discuss. The PR has a "versionadded" tag. If you plan to allow this, Andrew can commit it set to 3.7... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 11:01:42 2018 From: report at bugs.python.org (Mario Corchero) Date: Thu, 01 Feb 2018 16:01:42 +0000 Subject: [issue32691] "pdb -m " sets __main__.__package__ incorrectly In-Reply-To: <1517115891.43.0.467229070634.issue32691@psf.upfronthosting.co.za> Message-ID: <1517500902.16.0.467229070634.issue32691@psf.upfronthosting.co.za> Change by Mario Corchero : ---------- keywords: +patch pull_requests: +5302 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 10:55:53 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Feb 2018 15:55:53 +0000 Subject: [issue32741] Add asyncio.TimerHandle.when() function In-Reply-To: <1517486916.43.0.467229070634.issue32741@psf.upfronthosting.co.za> Message-ID: <1517500553.39.0.467229070634.issue32741@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +5300 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 11:05:44 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 01 Feb 2018 16:05:44 +0000 Subject: [issue31356] Add context manager to temporarily disable GC In-Reply-To: <1504655244.01.0.877867263237.issue31356@psf.upfronthosting.co.za> Message-ID: <1517501144.86.0.467229070634.issue31356@psf.upfronthosting.co.za> Yury Selivanov added the comment: Raymond, do you need help with reverts? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 11:22:22 2018 From: report at bugs.python.org (Mario Corchero) Date: Thu, 01 Feb 2018 16:22:22 +0000 Subject: [issue32691] "pdb -m " sets __main__.__package__ incorrectly In-Reply-To: <1517115891.43.0.467229070634.issue32691@psf.upfronthosting.co.za> Message-ID: <1517502142.45.0.467229070634.issue32691@psf.upfronthosting.co.za> Mario Corchero added the comment: Sent a PR for the fix. I'll update PRs for trace. profile does not need it Thanks a lot for bringing it up Jason! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 11:25:25 2018 From: report at bugs.python.org (Mario Corchero) Date: Thu, 01 Feb 2018 16:25:25 +0000 Subject: [issue32206] Run modules with pdb In-Reply-To: <1512308200.99.0.213398074469.issue32206@psf.upfronthosting.co.za> Message-ID: <1517502325.92.0.467229070634.issue32206@psf.upfronthosting.co.za> Change by Mario Corchero : ---------- pull_requests: -5301 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 11:33:45 2018 From: report at bugs.python.org (Ulrich Petri) Date: Thu, 01 Feb 2018 16:33:45 +0000 Subject: [issue27362] json.dumps to check for obj.__json__ before raising TypeError In-Reply-To: <1466514558.58.0.537455774899.issue27362@psf.upfronthosting.co.za> Message-ID: <1517502825.82.0.467229070634.issue27362@psf.upfronthosting.co.za> Change by Ulrich Petri : ---------- nosy: +ulope _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 11:41:14 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 01 Feb 2018 16:41:14 +0000 Subject: [issue32741] Add asyncio.TimerHandle.when() function In-Reply-To: <1517486916.43.0.467229070634.issue32741@psf.upfronthosting.co.za> Message-ID: <1517503274.35.0.467229070634.issue32741@psf.upfronthosting.co.za> Ned Deily added the comment: We have feature freezes for a good reason. But I will trust your judgement on this one. (Removing 3.6 for version list.) ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 11:40:43 2018 From: report at bugs.python.org (Hideyuki) Date: Thu, 01 Feb 2018 16:40:43 +0000 Subject: [issue32572] Add the ftplib option, overrides the IP address. In-Reply-To: <1516128378.06.0.467229070634.issue32572@psf.upfronthosting.co.za> Message-ID: <1517503243.16.0.467229070634.issue32572@psf.upfronthosting.co.za> Hideyuki added the comment: I understand that it is best to use PASV. But this FTP server is managed by another person, and that server required active mode. Also, my host is in a VPC environment, it is connected by 1:1 NAT. This NAT BOX does not support FTP transparent. In this case, we recognize that IP packet received by the FTP server is from the external IP address of the NAT BOX, but ftplib will send the IP address on host NIC. So dose not match IP packet source address and PORT address, it will be closed with the indicated code. The purpose of this feature is to communicate by overriding the IP address sending by PORT command with the NAT external IP address(so the client IP address seen by server). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 11:49:29 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Feb 2018 16:49:29 +0000 Subject: [issue31508] Running test_ttk_guionly logs "test_widgets.py:1562: UserWarning: Deprecated API of Treeview.selection() should be removed" warnings In-Reply-To: <1505743777.1.0.967185944509.issue31508@psf.upfronthosting.co.za> Message-ID: <1517503769.7.0.467229070634.issue31508@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 97f1ca167385bafd9be5d226f61c33412fc081bf by Serhiy Storchaka in branch 'master': [3.8] bpo-31508: Remove support of arguments in tkinter.ttk.Treeview.selection. (GH-3651) https://github.com/python/cpython/commit/97f1ca167385bafd9be5d226f61c33412fc081bf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 11:46:46 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 01 Feb 2018 16:46:46 +0000 Subject: [issue32741] Add asyncio.TimerHandle.when() function In-Reply-To: <1517486916.43.0.467229070634.issue32741@psf.upfronthosting.co.za> Message-ID: <1517503606.25.0.467229070634.issue32741@psf.upfronthosting.co.za> Yury Selivanov added the comment: Andrew, I'm indifferent about this feature. It's entirely up to you if you want to merge it in 3.7. I already used up my allowance for post-beta1 feature merges. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 11:59:29 2018 From: report at bugs.python.org (Christian Heimes) Date: Thu, 01 Feb 2018 16:59:29 +0000 Subject: [issue32711] Fix warnings for Python/ast_unparse.c In-Reply-To: <1517232909.04.0.467229070634.issue32711@psf.upfronthosting.co.za> Message-ID: <1517504369.97.0.467229070634.issue32711@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 83ab995871ffd504ac229bdbf5b9e9ffc1032815 by Christian Heimes (St?phane Wirtel) in branch 'master': bpo-32711: Fix warnings for Python/ast_unparse.c (#5426) https://github.com/python/cpython/commit/83ab995871ffd504ac229bdbf5b9e9ffc1032815 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 12:00:44 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 01 Feb 2018 17:00:44 +0000 Subject: [issue32711] Fix warnings for Python/ast_unparse.c In-Reply-To: <1517232909.04.0.467229070634.issue32711@psf.upfronthosting.co.za> Message-ID: <1517504444.81.0.467229070634.issue32711@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5304 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 12:10:36 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 01 Feb 2018 17:10:36 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1517505036.88.0.467229070634.issue17611@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 12:13:53 2018 From: report at bugs.python.org (Bar Harel) Date: Thu, 01 Feb 2018 17:13:53 +0000 Subject: [issue32734] Asyncio Lock safety issue (unlimited acquire) In-Reply-To: <1517424945.58.0.467229070634.issue32734@psf.upfronthosting.co.za> Message-ID: <1517505233.96.0.467229070634.issue32734@psf.upfronthosting.co.za> Change by Bar Harel : ---------- pull_requests: +5305 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 12:14:43 2018 From: report at bugs.python.org (Bar Harel) Date: Thu, 01 Feb 2018 17:14:43 +0000 Subject: [issue32734] Asyncio Lock safety issue (unlimited acquire) In-Reply-To: <1517424945.58.0.467229070634.issue32734@psf.upfronthosting.co.za> Message-ID: <1517505283.85.0.467229070634.issue32734@psf.upfronthosting.co.za> Change by Bar Harel : ---------- pull_requests: +5306 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 12:16:51 2018 From: report at bugs.python.org (Dmitry Alimov) Date: Thu, 01 Feb 2018 17:16:51 +0000 Subject: [issue32743] Typo in hamt.c comments Message-ID: <1517505411.15.0.467229070634.issue32743@psf.upfronthosting.co.za> New submission from Dmitry Alimov : In the comments to `hamt_node_collision_without` function in hamt.c module, I think should be `so convert` instead of `co convert`: ``` if (new_count == 1) { /* The node has two keys, and after deletion the new Collision node would have one. Collision nodes - with one key shouldn't exist, co convert it to a + with one key shouldn't exist, so convert it to a Bitmap node. */ ``` ---------- assignee: docs at python components: Documentation messages: 311452 nosy: delimitry, docs at python, yselivanov priority: normal severity: normal status: open title: Typo in hamt.c comments type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 12:17:22 2018 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 01 Feb 2018 17:17:22 +0000 Subject: [issue32743] Typo in hamt.c comments In-Reply-To: <1517505411.15.0.467229070634.issue32743@psf.upfronthosting.co.za> Message-ID: <1517505442.03.0.467229070634.issue32743@psf.upfronthosting.co.za> Yury Selivanov added the comment: Yeah, please submit a PR ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 12:18:43 2018 From: report at bugs.python.org (Dmitry Alimov) Date: Thu, 01 Feb 2018 17:18:43 +0000 Subject: [issue32743] Typo in hamt.c comments In-Reply-To: <1517505411.15.0.467229070634.issue32743@psf.upfronthosting.co.za> Message-ID: <1517505523.43.0.467229070634.issue32743@psf.upfronthosting.co.za> Change by Dmitry Alimov : ---------- keywords: +patch pull_requests: +5307 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 12:20:11 2018 From: report at bugs.python.org (Bar Harel) Date: Thu, 01 Feb 2018 17:20:11 +0000 Subject: [issue32734] Asyncio Lock safety issue (unlimited acquire) In-Reply-To: <1517424945.58.0.467229070634.issue32734@psf.upfronthosting.co.za> Message-ID: <1517505611.57.0.467229070634.issue32734@psf.upfronthosting.co.za> Change by Bar Harel : ---------- pull_requests: +5309 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 12:19:30 2018 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 01 Feb 2018 17:19:30 +0000 Subject: [issue32572] Add the ftplib option, overrides the IP address. In-Reply-To: <1516128378.06.0.467229070634.issue32572@psf.upfronthosting.co.za> Message-ID: <1517505570.78.0.467229070634.issue32572@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Considering the security implications and the fact that it's a corner case I don't think this is worth adding as a new, public API, sorry. I think ftplib should expose and promote APIs reflecting common scenarios and good practices, yet be flexible enough in order to allow "breaking the rules". FWIW, you may get away with something like this, which IMO is not too bad (not tested): class FTP(ftplib.FTP): externalip = None def sendport(self, host, port): return super().sendport(self.externalip or host, port) def sendeprt(self, host, port): return super().sendeprt(self.externalip or host, port) ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 12:35:36 2018 From: report at bugs.python.org (Bar Harel) Date: Thu, 01 Feb 2018 17:35:36 +0000 Subject: [issue32734] Asyncio Lock safety issue (unlimited acquire) In-Reply-To: <1517424945.58.0.467229070634.issue32734@psf.upfronthosting.co.za> Message-ID: <1517506536.19.0.467229070634.issue32734@psf.upfronthosting.co.za> Bar Harel added the comment: Finished fixing CR and adding backports. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 12:41:26 2018 From: report at bugs.python.org (Christian Heimes) Date: Thu, 01 Feb 2018 17:41:26 +0000 Subject: [issue32711] Fix warnings for Python/ast_unparse.c In-Reply-To: <1517232909.04.0.467229070634.issue32711@psf.upfronthosting.co.za> Message-ID: <1517506886.71.0.467229070634.issue32711@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 78758f29b13aba6136f4c0a15d4457fbf92c5eef by Christian Heimes (Miss Islington (bot)) in branch '3.7': [3.7] bpo-32711: Fix warnings for Python/ast_unparse.c (GH-5426) (#5475) https://github.com/python/cpython/commit/78758f29b13aba6136f4c0a15d4457fbf92c5eef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 12:41:54 2018 From: report at bugs.python.org (Christian Heimes) Date: Thu, 01 Feb 2018 17:41:54 +0000 Subject: [issue32711] Fix warnings for Python/ast_unparse.c In-Reply-To: <1517232909.04.0.467229070634.issue32711@psf.upfronthosting.co.za> Message-ID: <1517506914.47.0.467229070634.issue32711@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> compile error versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 12:43:36 2018 From: report at bugs.python.org (Dmitry Alimov) Date: Thu, 01 Feb 2018 17:43:36 +0000 Subject: [issue32744] PEP 342 double colons typos in code Message-ID: <1517507016.51.0.467229070634.issue32744@psf.upfronthosting.co.za> New submission from Dmitry Alimov : I've found "double colons" typos in examples: @consumer def jpeg_writer(dirname):: # 1) here fileno = 1 and try: while self.running and self.queue:: # 2) here func = self.queue.popleft() ---------- assignee: docs at python components: Documentation messages: 311458 nosy: delimitry, docs at python priority: normal severity: normal status: open title: PEP 342 double colons typos in code 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 Thu Feb 1 12:45:39 2018 From: report at bugs.python.org (Dmitry Alimov) Date: Thu, 01 Feb 2018 17:45:39 +0000 Subject: [issue32744] PEP 342 double colons typos in code In-Reply-To: <1517507016.51.0.467229070634.issue32744@psf.upfronthosting.co.za> Message-ID: <1517507139.73.0.467229070634.issue32744@psf.upfronthosting.co.za> Dmitry Alimov added the comment: https://github.com/python/peps/pull/567 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 13:01:00 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Feb 2018 18:01:00 +0000 Subject: [issue32741] Add asyncio.TimerHandle.when() function In-Reply-To: <1517486916.43.0.467229070634.issue32741@psf.upfronthosting.co.za> Message-ID: <1517508060.27.0.467229070634.issue32741@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Thanks. Let's do it. The addition is really very trivial. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 13:01:55 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 01 Feb 2018 18:01:55 +0000 Subject: [issue32741] Add asyncio.TimerHandle.when() function In-Reply-To: <1517486916.43.0.467229070634.issue32741@psf.upfronthosting.co.za> Message-ID: <1517508115.54.0.467229070634.issue32741@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5310 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 13:07:42 2018 From: report at bugs.python.org (Dmitry Alimov) Date: Thu, 01 Feb 2018 18:07:42 +0000 Subject: [issue32744] PEP 342 double colons typos in code In-Reply-To: <1517507016.51.0.467229070634.issue32744@psf.upfronthosting.co.za> Message-ID: <1517508462.47.0.467229070634.issue32744@psf.upfronthosting.co.za> Dmitry Alimov added the comment: Merged. It's fixed now: https://www.python.org/dev/peps/pep-0342/ ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 14:54:50 2018 From: report at bugs.python.org (Thomas Heller) Date: Thu, 01 Feb 2018 19:54:50 +0000 Subject: [issue32745] ctypes string pointer fields should accept embedded null characters Message-ID: <1517514890.15.0.467229070634.issue32745@psf.upfronthosting.co.za> New submission from Thomas Heller : ctypes Structure fields of type c_char_p or c_wchar_p used to accept strings with embedded null characters. I noticed that Python 3.6.4 does refuse them. It seems this has been changed in recent version(s). There ARE use-cases for this: The Windows-API OPENFILENAME structure is one example. The Microsoft docs for the lpstrFilter field: """ lpstrFilter Type: LPCTSTR A buffer containing pairs of null-terminated filter strings. The last string in the buffer must be terminated by two NULL characters. """ I have attached a simple script which demonstrates this new behaviour; the output with Python 3.6.4 is this: Traceback (most recent call last): File "nullchars.py", line 8, in t.unicode = u"foo\0bar" ValueError: embedded null character ---------- components: ctypes files: nullchars.py keywords: 3.6regression messages: 311462 nosy: theller priority: normal severity: normal status: open title: ctypes string pointer fields should accept embedded null characters versions: Python 3.6 Added file: https://bugs.python.org/file47420/nullchars.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 14:56:50 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Feb 2018 19:56:50 +0000 Subject: [issue32741] Add asyncio.TimerHandle.when() function In-Reply-To: <1517486916.43.0.467229070634.issue32741@psf.upfronthosting.co.za> Message-ID: <1517515010.92.0.467229070634.issue32741@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 Thu Feb 1 15:13:39 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 01 Feb 2018 20:13:39 +0000 Subject: [issue32305] Namespace packages have inconsistent __file__ and __spec__.origin In-Reply-To: <1513180121.5.0.213398074469.issue32305@psf.upfronthosting.co.za> Message-ID: <1517516019.68.0.467229070634.issue32305@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: 3.5 is in security fix only mode, and this is not a security issue. ---------- versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 15:13:59 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 01 Feb 2018 20:13:59 +0000 Subject: [issue32303] Namespace packages have inconsistent __loader__ and __spec__.loader In-Reply-To: <1513179703.14.0.213398074469.issue32303@psf.upfronthosting.co.za> Message-ID: <1517516039.33.0.467229070634.issue32303@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: 3.5 is in security fix only mode, and this is not a security issue. ---------- versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 15:14:48 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 01 Feb 2018 20:14:48 +0000 Subject: [issue32303] Namespace packages have inconsistent __loader__ and __spec__.loader In-Reply-To: <1513179703.14.0.213398074469.issue32303@psf.upfronthosting.co.za> Message-ID: <1517516088.33.0.467229070634.issue32303@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- keywords: +patch pull_requests: +5311 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 15:14:48 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 01 Feb 2018 20:14:48 +0000 Subject: [issue32305] Namespace packages have inconsistent __file__ and __spec__.origin In-Reply-To: <1513180121.5.0.213398074469.issue32305@psf.upfronthosting.co.za> Message-ID: <1517516088.45.0.574204596225.issue32305@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- keywords: +patch pull_requests: +5312 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 15:34:24 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 01 Feb 2018 20:34:24 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517517264.14.0.467229070634.issue32394@psf.upfronthosting.co.za> Steve Dower added the comment: Yes, adding the member back will put you back in the broken state, but there's nothing we can do to stop it. Thanks for the PR - I'll take a look, and if I'm able to log into GitHub on my phone maybe finish it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 15:37:58 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 01 Feb 2018 20:37:58 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517517478.81.0.467229070634.issue32394@psf.upfronthosting.co.za> Steve Dower added the comment: PR looks good to me. Unfortunately without SMS (I'm travelling) I can't get into my account from my phone, so if someone else wants to add the backport tags (3.7 and 3.6) and finish it then feel free. ---------- versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 15:39:25 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 01 Feb 2018 20:39:25 +0000 Subject: [issue32739] collections.deque rotate(n=1) default value not documented In-Reply-To: <1517463893.34.0.467229070634.issue32739@psf.upfronthosting.co.za> Message-ID: <1517517565.63.0.467229070634.issue32739@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks for noticing this. ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 15:51:07 2018 From: report at bugs.python.org (Eryk Sun) Date: Thu, 01 Feb 2018 20:51:07 +0000 Subject: [issue32745] ctypes string pointer fields should accept embedded null characters In-Reply-To: <1517514890.15.0.467229070634.issue32745@psf.upfronthosting.co.za> Message-ID: <1517518267.07.0.467229070634.issue32745@psf.upfronthosting.co.za> Eryk Sun added the comment: PyUnicode_AsWideCharString was updated to raise ValueError for embedded nulls if the `size` output parameter is NULL. Z_set in cfield.c should be updated to get the size, which can be ignored here. For example: Py_ssize_t size; buffer = PyUnicode_AsWideCharString(value, &size); ---------- nosy: +eryksun stage: -> test needed type: -> behavior versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 17:40:47 2018 From: report at bugs.python.org (Michael Felt) Date: Thu, 01 Feb 2018 22:40:47 +0000 Subject: [issue32493] UUID Module - FreeBSD build failure In-Reply-To: <1516718060.47.0.467229070634.issue32493@psf.upfronthosting.co.za> Message-ID: <3832877b-c8e0-40a5-e859-23fc540960e0@felt.demon.nl> Michael Felt added the comment: Now that it is visible - maybe OpenBSD will treat it as a bug and get the "version bits" to work as their man page (https://man.openbsd.org/uuid.3) says it does: STANDARDS The *uuid_compare*(), *uuid_create*(), *uuid_create_nil*(), *uuid_equal*(), *uuid_from_string*(), *uuid_hash*(), *uuid_is_nil*(), and *uuid_to_string*() functions are compatible with the DCE 1.1 RPC specification. The FreeBSD man page (https://www.freebsd.org/cgi/man.cgi?query=uuid_create) says: *NAME* *uuid*_*compare*,*uuid*_*create*, *uuid*_*create*_*nil*,*uuid*_*equal*,*uuid*_*from*_*string*, *uuid*_*hash*, *uuid*_*is*_*nil*,*uuid*_*to*_*string* -- DCE 1.1 compliant UUID func- tions Re the DCE 1.1 RPC implementation/description - I found this link: http://pubs.opengroup.org/onlinepubs/9629399/apdxa.htm And this comment: The version number is multiplexed in the 4 most significant bits of the *time_hi_and_version* field. UUID version Field lists currently defined versions of the UUID. *msb1* *msb2* *msb3* *msb4* *Version* *Description* 0 0 0 1 1 DCE version, as specified herein. 0 0 1 0 2 DCE Security version, with embedded POSIX UIDs. So, maybe either, or both: OpenBSD and FreeBSD fix their implementation. Problem solved?! On 1/23/2018 3:34 PM, David CARLIER wrote: > David CARLIER added the comment: > > In OpenBSD it s even "worse", the version for each call is random (not a surprise when looking at the source). The question is, do we go back to support only AIX or do we accept somehow wrong version ? > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 18:50:54 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 01 Feb 2018 23:50:54 +0000 Subject: [issue32720] Format mini-language integer definition is incorrect In-Reply-To: <1517287529.39.0.467229070634.issue32720@psf.upfronthosting.co.za> Message-ID: <1517529054.17.0.467229070634.issue32720@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 18:56:25 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 01 Feb 2018 23:56:25 +0000 Subject: [issue32540] venv docs - doesn't match behavior In-Reply-To: <1515780433.02.0.467229070634.issue32540@psf.upfronthosting.co.za> Message-ID: <1517529385.9.0.467229070634.issue32540@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +easy stage: -> needs patch type: -> enhancement versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 19:02:18 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 02 Feb 2018 00:02:18 +0000 Subject: [issue30449] Improve __slots__ datamodel documentation In-Reply-To: <1495587707.13.0.0998591622446.issue30449@psf.upfronthosting.co.za> Message-ID: <1517529738.13.0.467229070634.issue30449@psf.upfronthosting.co.za> Cheryl Sabella added the comment: It looks like this documentation patch was applied to master. Does it need to be backported to 3.6 and 2.7 for the issue to be closed? Thanks! ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 20:12:29 2018 From: report at bugs.python.org (Nathan Kerr) Date: Fri, 02 Feb 2018 01:12:29 +0000 Subject: [issue32720] Format mini-language integer definition is incorrect In-Reply-To: <1517287529.39.0.467229070634.issue32720@psf.upfronthosting.co.za> Message-ID: <1517533949.9.0.467229070634.issue32720@psf.upfronthosting.co.za> Change by Nathan Kerr : ---------- keywords: +patch pull_requests: +5313 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 20:18:48 2018 From: report at bugs.python.org (Nathan Kerr) Date: Fri, 02 Feb 2018 01:18:48 +0000 Subject: [issue32720] Format mini-language integer definition is incorrect In-Reply-To: <1517287529.39.0.467229070634.issue32720@psf.upfronthosting.co.za> Message-ID: <1517534328.76.0.467229070634.issue32720@psf.upfronthosting.co.za> Nathan Kerr added the comment: Just submitted a PR for this issue, however I only signed the CLA an hour ago so it hasn't gone through yet. This is my first contribution, I followed the guide but please let me know if I missed anything. Thanks! ---------- nosy: +nkerr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 21:40:26 2018 From: report at bugs.python.org (Xavier G. Domingo) Date: Fri, 02 Feb 2018 02:40:26 +0000 Subject: [issue32590] Proposal: add an "ensure(arg)" builtin for parameter validation In-Reply-To: <1516253531.71.0.467229070634.issue32590@psf.upfronthosting.co.za> Message-ID: <1517539226.7.0.467229070634.issue32590@psf.upfronthosting.co.za> Change by Xavier G. Domingo : ---------- nosy: +xgdomingo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 21:59:19 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 02 Feb 2018 02:59:19 +0000 Subject: [issue32436] Implement PEP 567 In-Reply-To: <1516666281.22.0.467229070634.issue32436@psf.upfronthosting.co.za> Message-ID: <1517540359.3.0.467229070634.issue32436@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- pull_requests: +5314 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 22:12:59 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 02 Feb 2018 03:12:59 +0000 Subject: [issue32739] collections.deque rotate(n=1) default value not documented In-Reply-To: <1517463893.34.0.467229070634.issue32739@psf.upfronthosting.co.za> Message-ID: <1517541179.48.0.467229070634.issue32739@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +5315 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 22:13:55 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 02 Feb 2018 03:13:55 +0000 Subject: [issue32739] collections.deque rotate(n=1) default value not documented In-Reply-To: <1517463893.34.0.467229070634.issue32739@psf.upfronthosting.co.za> Message-ID: <1517541235.76.0.467229070634.issue32739@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 22:24:59 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 02 Feb 2018 03:24:59 +0000 Subject: [issue32436] Implement PEP 567 In-Reply-To: <1516666281.22.0.467229070634.issue32436@psf.upfronthosting.co.za> Message-ID: <1517541899.13.0.467229070634.issue32436@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 55e0839f2672e029c2b96514028c77c31ffbe41f by Yury Selivanov in branch 'master': bpo-32436: Fix compiler warning (#5483) https://github.com/python/cpython/commit/55e0839f2672e029c2b96514028c77c31ffbe41f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 22:26:06 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 02 Feb 2018 03:26:06 +0000 Subject: [issue32436] Implement PEP 567 In-Reply-To: <1516666281.22.0.467229070634.issue32436@psf.upfronthosting.co.za> Message-ID: <1517541966.29.0.467229070634.issue32436@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5316 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 22:42:29 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Fri, 02 Feb 2018 03:42:29 +0000 Subject: [issue32733] test_coroutines is failed when run with -We In-Reply-To: <1517423347.93.0.467229070634.issue32733@psf.upfronthosting.co.za> Message-ID: <1517542949.88.0.467229070634.issue32733@psf.upfronthosting.co.za> Change by Nathaniel Smith : ---------- keywords: +patch pull_requests: +5317 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 22:58:22 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 02 Feb 2018 03:58:22 +0000 Subject: [issue32436] Implement PEP 567 In-Reply-To: <1516666281.22.0.467229070634.issue32436@psf.upfronthosting.co.za> Message-ID: <1517543901.99.0.467229070634.issue32436@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 78767786a87b00925506c32b3b55cf65b56ef3d7 by Yury Selivanov (Miss Islington (bot)) in branch '3.7': bpo-32436: Fix compiler warning (GH-5483) (GH-5486) https://github.com/python/cpython/commit/78767786a87b00925506c32b3b55cf65b56ef3d7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 23:06:48 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 Feb 2018 04:06:48 +0000 Subject: [issue32611] Tkinter taskbar icon (Windows) In-Reply-To: <1516565492.0.0.467229070634.issue32611@psf.upfronthosting.co.za> Message-ID: <1517544408.69.0.467229070634.issue32611@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 23:20:02 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 02 Feb 2018 04:20:02 +0000 Subject: [issue32674] minor documentation fix for '__import__' In-Reply-To: <1516948902.25.0.467229070634.issue32674@psf.upfronthosting.co.za> Message-ID: <1517545202.56.0.467229070634.issue32674@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 461d225b195eec5269f317323b41115516144c41 by Mariatta (oldk) in branch 'master': bpo-32674: Improve the docstring for __import__ (GH-5339) https://github.com/python/cpython/commit/461d225b195eec5269f317323b41115516144c41 ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 23:20:21 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 02 Feb 2018 04:20:21 +0000 Subject: [issue32674] minor documentation fix for '__import__' In-Reply-To: <1516948902.25.0.467229070634.issue32674@psf.upfronthosting.co.za> Message-ID: <1517545221.55.0.467229070634.issue32674@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5318 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 23:21:11 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 02 Feb 2018 04:21:11 +0000 Subject: [issue32674] minor documentation fix for '__import__' In-Reply-To: <1516948902.25.0.467229070634.issue32674@psf.upfronthosting.co.za> Message-ID: <1517545271.01.0.467229070634.issue32674@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5319 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 1 23:55:57 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Fri, 02 Feb 2018 04:55:57 +0000 Subject: [issue32733] test_coroutines is failed when run with -We In-Reply-To: <1517423347.93.0.467229070634.issue32733@psf.upfronthosting.co.za> Message-ID: <1517547357.61.0.467229070634.issue32733@psf.upfronthosting.co.za> Nathaniel Smith added the comment: New changeset 2efb9735899c7c642f3e75a121af82b1679577d3 by Nathaniel J. Smith in branch 'master': bpo-32733: Make test_coroutines robust against -Werror (GH-5487) https://github.com/python/cpython/commit/2efb9735899c7c642f3e75a121af82b1679577d3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 00:10:05 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 02 Feb 2018 05:10:05 +0000 Subject: [issue32733] test_coroutines is failed when run with -We In-Reply-To: <1517423347.93.0.467229070634.issue32733@psf.upfronthosting.co.za> Message-ID: <1517548205.07.0.467229070634.issue32733@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5320 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 00:16:57 2018 From: report at bugs.python.org (Mario Corchero) Date: Fri, 02 Feb 2018 05:16:57 +0000 Subject: [issue32206] Run modules with pdb In-Reply-To: <1512308200.99.0.213398074469.issue32206@psf.upfronthosting.co.za> Message-ID: <1517548617.13.0.467229070634.issue32206@psf.upfronthosting.co.za> Change by Mario Corchero : ---------- pull_requests: +5321 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 00:16:57 2018 From: report at bugs.python.org (Mario Corchero) Date: Fri, 02 Feb 2018 05:16:57 +0000 Subject: [issue32206] Run modules with pdb In-Reply-To: <1512308200.99.0.213398074469.issue32206@psf.upfronthosting.co.za> Message-ID: <1517548617.25.0.467229070634.issue32206@psf.upfronthosting.co.za> Change by Mario Corchero : ---------- pull_requests: +5321, 5322 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 00:29:37 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 Feb 2018 05:29:37 +0000 Subject: [issue20285] Improve object.__doc__ and help(object) output In-Reply-To: <1389920351.63.0.12805701843.issue20285@psf.upfronthosting.co.za> Message-ID: <1517549377.27.0.467229070634.issue20285@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- assignee: docs at python -> terry.reedy components: +Library (Lib) stage: patch review -> commit review versions: +Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 00:48:42 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 Feb 2018 05:48:42 +0000 Subject: [issue32297] Few misspellings found in Python source code comments. In-Reply-To: <1513123806.73.0.213398074469.issue32297@psf.upfronthosting.co.za> Message-ID: <1517550522.76.0.467229070634.issue32297@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 00:55:26 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 Feb 2018 05:55:26 +0000 Subject: [issue32746] More misspellings, mostly in source code. Message-ID: <1517550926.68.0.467229070634.issue32746@psf.upfronthosting.co.za> New submission from Terry J. Reedy : This is similar to #32297. I intend to backport, if not too much problem, for the reason Victor gave on the PR 4803: "to reduce conflicts when backporting fixes into Python 3.6." I propose to not backport to Python 2.7, again for the reason Victor gave: "since Python 2.7 is dying and minor fixes are no more backported to 2.7." ---------- assignee: terry.reedy messages: 311476 nosy: terry.reedy priority: normal severity: normal stage: commit review status: open title: More misspellings, mostly in source code. versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 00:56:12 2018 From: report at bugs.python.org (Leo Arias) Date: Fri, 02 Feb 2018 05:56:12 +0000 Subject: [issue32746] More misspellings, mostly in source code. In-Reply-To: <1517550926.68.0.467229070634.issue32746@psf.upfronthosting.co.za> Message-ID: <1517550972.66.0.467229070634.issue32746@psf.upfronthosting.co.za> Change by Leo Arias : ---------- keywords: +patch pull_requests: +5323 stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 00:57:31 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Fri, 02 Feb 2018 05:57:31 +0000 Subject: [issue32733] test_coroutines is failed when run with -We In-Reply-To: <1517423347.93.0.467229070634.issue32733@psf.upfronthosting.co.za> Message-ID: <1517551051.85.0.467229070634.issue32733@psf.upfronthosting.co.za> Nathaniel Smith added the comment: New changeset 709f6ad7f84855ebdbe3e7702571b0e1447b885b by Nathaniel J. Smith (Miss Islington (bot)) in branch '3.7': bpo-32733: Make test_coroutines robust against -Werror (GH-5487) (GH-5490) https://github.com/python/cpython/commit/709f6ad7f84855ebdbe3e7702571b0e1447b885b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 01:12:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 02 Feb 2018 06:12:05 +0000 Subject: [issue20285] Improve object.__doc__ and help(object) output In-Reply-To: <1389920351.63.0.12805701843.issue20285@psf.upfronthosting.co.za> Message-ID: <1517551925.26.0.467229070634.issue20285@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is better to ask Guido or other language expert. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 01:22:41 2018 From: report at bugs.python.org (Alexander Mohr) Date: Fri, 02 Feb 2018 06:22:41 +0000 Subject: [issue29317] test_copyxattr_symlinks fails In-Reply-To: <1484782411.92.0.520036190929.issue29317@psf.upfronthosting.co.za> Message-ID: <1517552561.48.0.467229070634.issue29317@psf.upfronthosting.co.za> Change by Alexander Mohr : ---------- nosy: +thehesiod versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 01:35:52 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 Feb 2018 06:35:52 +0000 Subject: [issue20285] Improve object.__doc__ and help(object) output In-Reply-To: <1389920351.63.0.12805701843.issue20285@psf.upfronthosting.co.za> Message-ID: <1517553352.78.0.467229070634.issue20285@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Since this modifies the output of a library module function for a specific input, I will not backport unless and until there is agreement on doing so. ---------- versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 01:42:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 02 Feb 2018 06:42:49 +0000 Subject: [issue32733] test_coroutines is failed when run with -We In-Reply-To: <1517423347.93.0.467229070634.issue32733@psf.upfronthosting.co.za> Message-ID: <1517553769.85.0.467229070634.issue32733@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Nathaniel. And congratulate with getting core developer status! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 01:49:16 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Fri, 02 Feb 2018 06:49:16 +0000 Subject: [issue32733] test_coroutines is failed when run with -We In-Reply-To: <1517423347.93.0.467229070634.issue32733@psf.upfronthosting.co.za> Message-ID: <1517554156.35.0.467229070634.issue32733@psf.upfronthosting.co.za> Nathaniel Smith added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 01:53:32 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 Feb 2018 06:53:32 +0000 Subject: [issue20285] Improve object.__doc__ and help(object) output In-Reply-To: <1389920351.63.0.12805701843.issue20285@psf.upfronthosting.co.za> Message-ID: <1517554412.11.0.467229070634.issue20285@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I posted "Is object the most base type? (bpo-20285)" on pydev. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 01:53:56 2018 From: report at bugs.python.org (Nitish) Date: Fri, 02 Feb 2018 06:53:56 +0000 Subject: [issue20082] Misbehavior of BufferedRandom.write with raw file in append mode In-Reply-To: <1388187192.84.0.682821163597.issue20082@psf.upfronthosting.co.za> Message-ID: <1517554436.92.0.467229070634.issue20082@psf.upfronthosting.co.za> Change by Nitish : ---------- nosy: +nitishch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 02:35:15 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 02 Feb 2018 07:35:15 +0000 Subject: [issue32729] socket error handling needed In-Reply-To: <1517380649.99.0.467229070634.issue32729@psf.upfronthosting.co.za> Message-ID: <1517556915.34.0.467229070634.issue32729@psf.upfronthosting.co.za> INADA Naoki added the comment: Please give us reproducible example. Otherwise, we can't know it's our bug or it's bug of caller. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 02:49:51 2018 From: report at bugs.python.org (Qian Yun) Date: Fri, 02 Feb 2018 07:49:51 +0000 Subject: [issue32747] remove trailing spaces in docstring Message-ID: <1517557791.36.0.467229070634.issue32747@psf.upfronthosting.co.za> New submission from Qian Yun : This is a simple PR that removes trailing spaces in docstring, which are found by: grep -R ' \\n\\$' . ---------- assignee: docs at python components: Documentation messages: 311484 nosy: Qian Yun, docs at python priority: normal severity: normal status: open title: remove trailing spaces in docstring versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 02:54:44 2018 From: report at bugs.python.org (Qian Yun) Date: Fri, 02 Feb 2018 07:54:44 +0000 Subject: [issue32747] remove trailing spaces in docstring In-Reply-To: <1517557791.36.0.467229070634.issue32747@psf.upfronthosting.co.za> Message-ID: <1517558084.54.0.467229070634.issue32747@psf.upfronthosting.co.za> Change by Qian Yun : ---------- keywords: +patch pull_requests: +5324 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 03:52:58 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 02 Feb 2018 08:52:58 +0000 Subject: [issue32747] remove trailing spaces in docstring In-Reply-To: <1517557791.36.0.467229070634.issue32747@psf.upfronthosting.co.za> Message-ID: <1517561578.83.0.467229070634.issue32747@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset aa0735f597b072c0eb00404c4d7df359ddc26755 by Serhiy Storchaka (oldk) in branch 'master': bpo-32747: Remove trailing spaces in docstrings. (GH-5491) https://github.com/python/cpython/commit/aa0735f597b072c0eb00404c4d7df359ddc26755 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 03:53:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 02 Feb 2018 08:53:24 +0000 Subject: [issue32747] remove trailing spaces in docstring In-Reply-To: <1517557791.36.0.467229070634.issue32747@psf.upfronthosting.co.za> Message-ID: <1517561604.76.0.467229070634.issue32747@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 Feb 2 04:43:39 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 02 Feb 2018 09:43:39 +0000 Subject: [issue32748] Improve _asyncio.TaskStepMethWrapper and TaskWakeupMethWrapper reprs Message-ID: <1517564619.34.0.467229070634.issue32748@psf.upfronthosting.co.za> New submission from Andrew Svetlov : Currently both helper classes have no custom tp_repr slot, it leads to autogenerated values. Both helpers are private but in debug mode asyncio loop reports about slow callbacks, the message doesn't point on executed coroutine -- it just prints 'Executing took 0.203 seconds'. The only way to figure out what coroutine is slow is monkey-patching CTask implementation back to PyTask usage. Sure, the method is too obscure for newbies. ---------- components: asyncio messages: 311486 nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Improve _asyncio.TaskStepMethWrapper and TaskWakeupMethWrapper reprs versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 04:47:21 2018 From: report at bugs.python.org (Ma Lin) Date: Fri, 02 Feb 2018 09:47:21 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517564841.38.0.467229070634.issue32394@psf.upfronthosting.co.za> Ma Lin added the comment: Glad to see PR 5468 not merged, I found it makes socket.py complicated. Now I'm inclined to patch the code in PyInit__socket(void) of socketmodule.c https://github.com/python/cpython/blob/3.6/Modules/socketmodule.c#L6504 There already has a MS-Windows version checking https://github.com/python/cpython/blob/3.6/Modules/socketmodule.c#L6511 In there, we can use GetVersionEx instead of GetVersion to get BuildNumber, then delete unusable opinions. (I don't have enough skill to modify .c code) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 05:00:41 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 02 Feb 2018 10:00:41 +0000 Subject: [issue30449] Improve __slots__ datamodel documentation In-Reply-To: <1495587707.13.0.0998591622446.issue30449@psf.upfronthosting.co.za> Message-ID: <1517565641.49.0.467229070634.issue30449@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 05:06:54 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 02 Feb 2018 10:06:54 +0000 Subject: [issue32137] Stack overflow in repr of deeply nested dicts In-Reply-To: <1511686410.56.0.213398074469.issue32137@psf.upfronthosting.co.za> Message-ID: <1517566014.46.0.467229070634.issue32137@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The issue seems somewhat contrived but the fix looks fine to me. ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 07:46:44 2018 From: report at bugs.python.org (Roundup Robot) Date: Fri, 02 Feb 2018 12:46:44 +0000 Subject: [issue31804] multiprocessing calls flush on sys.stdout at exit even if it is None (pythonw) In-Reply-To: <1508252374.96.0.213398074469.issue31804@psf.upfronthosting.co.za> Message-ID: <1517575604.58.0.467229070634.issue31804@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +5325 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 08:25:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 02 Feb 2018 13:25:59 +0000 Subject: [issue32137] Stack overflow in repr of deeply nested dicts In-Reply-To: <1511686410.56.0.213398074469.issue32137@psf.upfronthosting.co.za> Message-ID: <1517577959.36.0.467229070634.issue32137@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +5326 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 08:32:21 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 02 Feb 2018 13:32:21 +0000 Subject: [issue32674] minor documentation fix for '__import__' In-Reply-To: <1516948902.25.0.467229070634.issue32674@psf.upfronthosting.co.za> Message-ID: <1517578341.33.0.467229070634.issue32674@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset f61951b10cc08d3926a3ebaacc154d4149150ef4 by Mariatta (Miss Islington (bot)) in branch '3.6': bpo-32674: Improve the docstring for __import__ (GH-5339) (GH-5489) https://github.com/python/cpython/commit/f61951b10cc08d3926a3ebaacc154d4149150ef4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 08:38:47 2018 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 02 Feb 2018 13:38:47 +0000 Subject: [issue32337] Dict order is now guaranteed, so add tests and doc for it In-Reply-To: <1514287514.34.0.213398074469.issue32337@psf.upfronthosting.co.za> Message-ID: <1517578727.71.0.467229070634.issue32337@psf.upfronthosting.co.za> Xiang Zhang added the comment: This part needs editing too, the text and example. https://docs.python.org/3/library/stdtypes.html#dictionary-view-objects ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 08:30:43 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 02 Feb 2018 13:30:43 +0000 Subject: [issue32674] minor documentation fix for '__import__' In-Reply-To: <1516948902.25.0.467229070634.issue32674@psf.upfronthosting.co.za> Message-ID: <1517578243.26.0.467229070634.issue32674@psf.upfronthosting.co.za> Change by Mariatta Wijaya : ---------- pull_requests: +5327 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 08:40:06 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 02 Feb 2018 13:40:06 +0000 Subject: [issue31356] Add context manager to temporarily disable GC In-Reply-To: <1504655244.01.0.877867263237.issue31356@psf.upfronthosting.co.za> Message-ID: <1517578806.82.0.467229070634.issue31356@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- pull_requests: +5328 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 08:44:43 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 02 Feb 2018 13:44:43 +0000 Subject: [issue31356] Add context manager to temporarily disable GC In-Reply-To: <1504655244.01.0.877867263237.issue31356@psf.upfronthosting.co.za> Message-ID: <1517579083.09.0.467229070634.issue31356@psf.upfronthosting.co.za> Yury Selivanov added the comment: Since I'm going to be unavailable for the next 10 days, and I don't want this to be accidentally forgotten, I'll do the revert myself. Opened a PR for that. ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 09:09:04 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 02 Feb 2018 14:09:04 +0000 Subject: [issue20285] Improve object.__doc__ and help(object) output In-Reply-To: <1389920351.63.0.12805701843.issue20285@psf.upfronthosting.co.za> Message-ID: <1517580544.72.0.467229070634.issue20285@psf.upfronthosting.co.za> R. David Murray added the comment: If you want to be precise you could say "The last class in every __mro__ list." ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 09:29:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 02 Feb 2018 14:29:09 +0000 Subject: [issue32137] Stack overflow in repr of deeply nested dicts In-Reply-To: <1511686410.56.0.213398074469.issue32137@psf.upfronthosting.co.za> Message-ID: <1517581749.96.0.467229070634.issue32137@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset b7a2c17be8411bc4c7a2babdc650074c14204aa8 by Serhiy Storchaka in branch '2.7': [2.7] bpo-32137: The repr of deeply nested dict now raises a RuntimeError (GH-4570) (#5493) https://github.com/python/cpython/commit/b7a2c17be8411bc4c7a2babdc650074c14204aa8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 09:30:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 02 Feb 2018 14:30:31 +0000 Subject: [issue32137] Stack overflow in repr of deeply nested dicts In-Reply-To: <1511686410.56.0.213398074469.issue32137@psf.upfronthosting.co.za> Message-ID: <1517581831.03.0.467229070634.issue32137@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 Feb 2 09:31:08 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 02 Feb 2018 14:31:08 +0000 Subject: [issue31356] Add context manager to temporarily disable GC In-Reply-To: <1504655244.01.0.877867263237.issue31356@psf.upfronthosting.co.za> Message-ID: <1517581868.73.0.467229070634.issue31356@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 383b32fe108ea627699cc9c644fba5f8bae95d73 by Yury Selivanov in branch 'master': Revert "bpo-31356: Add context manager to temporarily disable GC GH-5495 https://github.com/python/cpython/commit/383b32fe108ea627699cc9c644fba5f8bae95d73 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 09:31:25 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 02 Feb 2018 14:31:25 +0000 Subject: [issue31356] Add context manager to temporarily disable GC In-Reply-To: <1504655244.01.0.877867263237.issue31356@psf.upfronthosting.co.za> Message-ID: <1517581885.88.0.467229070634.issue31356@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5329 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 10:04:35 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 02 Feb 2018 15:04:35 +0000 Subject: [issue31356] Add context manager to temporarily disable GC In-Reply-To: <1504655244.01.0.877867263237.issue31356@psf.upfronthosting.co.za> Message-ID: <1517583875.24.0.467229070634.issue31356@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 29fd9eae432a54c963262e895b46f081f238539a by Yury Selivanov (Miss Islington (bot)) in branch '3.7': Revert "bpo-31356: Add context manager to temporarily disable GC GH-5495 (#5496) https://github.com/python/cpython/commit/29fd9eae432a54c963262e895b46f081f238539a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 10:04:57 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 02 Feb 2018 15:04:57 +0000 Subject: [issue31356] Add context manager to temporarily disable GC In-Reply-To: <1504655244.01.0.877867263237.issue31356@psf.upfronthosting.co.za> Message-ID: <1517583897.72.0.467229070634.issue31356@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 10:14:26 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 02 Feb 2018 15:14:26 +0000 Subject: [issue32216] Document PEP 557 Data Classes (dataclasses module) In-Reply-To: <1512439511.23.0.213398074469.issue32216@psf.upfronthosting.co.za> Message-ID: <1517584466.82.0.467229070634.issue32216@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Do you have an ETA for the documentation PR? I would be happy to review it. ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 10:16:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 02 Feb 2018 15:16:17 +0000 Subject: [issue32749] Remove dbm.dumb behavior deprecated in 3.6 Message-ID: <1517584577.48.0.467229070634.issue32749@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : Some behavior of dbm.dumb databases which was different from the behavior of other dbm databases was deprecated in 3.6 (issue21708). Now it is a time to remove it. ---------- components: Library (Lib) messages: 311497 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Remove dbm.dumb behavior deprecated in 3.6 type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 10:24:22 2018 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 02 Feb 2018 15:24:22 +0000 Subject: [issue32216] Document PEP 557 Data Classes (dataclasses module) In-Reply-To: <1512439511.23.0.213398074469.issue32216@psf.upfronthosting.co.za> Message-ID: <1517585062.09.0.467229070634.issue32216@psf.upfronthosting.co.za> Eric V. Smith added the comment: I was hoping a volunteer would step up to write the documentation, as it's definitely not my forte. Raymond has also volunteered to help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 10:28:58 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 02 Feb 2018 15:28:58 +0000 Subject: [issue32749] Remove dbm.dumb behavior deprecated in 3.6 In-Reply-To: <1517584577.48.0.467229070634.issue32749@psf.upfronthosting.co.za> Message-ID: <1517585338.22.0.467229070634.issue32749@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +5330 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 10:50:39 2018 From: report at bugs.python.org (Ned Deily) Date: Fri, 02 Feb 2018 15:50:39 +0000 Subject: [issue32216] Document PEP 557 Data Classes (dataclasses module) In-Reply-To: <1512439511.23.0.213398074469.issue32216@psf.upfronthosting.co.za> Message-ID: <1517586639.16.0.467229070634.issue32216@psf.upfronthosting.co.za> Ned Deily added the comment: Marking this as a "deferred blocker" for exiting the beta phase. ---------- nosy: +ned.deily priority: high -> deferred blocker stage: -> needs patch versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 10:53:07 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 02 Feb 2018 15:53:07 +0000 Subject: [issue32748] Improve _asyncio.TaskStepMethWrapper and TaskWakeupMethWrapper reprs In-Reply-To: <1517564619.34.0.467229070634.issue32748@psf.upfronthosting.co.za> Message-ID: <1517586787.32.0.467229070634.issue32748@psf.upfronthosting.co.za> Yury Selivanov added the comment: I think I've fixed that. Can you give me a script to repro? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 11:17:09 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 02 Feb 2018 16:17:09 +0000 Subject: [issue32748] Improve _asyncio.TaskStepMethWrapper and TaskWakeupMethWrapper reprs In-Reply-To: <1517564619.34.0.467229070634.issue32748@psf.upfronthosting.co.za> Message-ID: <1517588229.74.0.467229070634.issue32748@psf.upfronthosting.co.za> Andrew Svetlov added the comment: False alarm, sorry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 11:17:26 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 02 Feb 2018 16:17:26 +0000 Subject: [issue32748] Improve _asyncio.TaskStepMethWrapper and TaskWakeupMethWrapper reprs In-Reply-To: <1517564619.34.0.467229070634.issue32748@psf.upfronthosting.co.za> Message-ID: <1517588246.48.0.467229070634.issue32748@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 11:19:59 2018 From: report at bugs.python.org (Kamil) Date: Fri, 02 Feb 2018 16:19:59 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517588399.91.0.467229070634.issue32394@psf.upfronthosting.co.za> Kamil added the comment: I suggest inserting the following code into socketmodule.c: CHANGE: #ifdef TCP_KEEPCNT PyModule_AddIntMacro(m, TCP_KEEPCNT); #endif TO: #ifdef TCP_KEEPCNT #if defined(_MSC_VER) && _MSC_VER >= 1800 // Windows 10 1703 (15063) if (IsWindows10CreatorsOrGreater()) { PyModule_AddIntMacro(m, TCP_KEEPCNT); } #endif #endif AND CHANGE: #ifdef TCP_FASTOPEN PyModule_AddIntMacro(m, TCP_FASTOPEN); #endif TO: #ifdef TCP_FASTOPEN #if defined(_MSC_VER) && _MSC_VER >= 1800 // Windows 10 1703 (Build: 14393) if (IsWindows10AnniversaryOrGreater()) { PyModule_AddIntMacro(m, TCP_FASTOPEN); } #endif #endif ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 11:24:01 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 02 Feb 2018 16:24:01 +0000 Subject: [issue32674] minor documentation fix for '__import__' In-Reply-To: <1516948902.25.0.467229070634.issue32674@psf.upfronthosting.co.za> Message-ID: <1517588641.0.0.467229070634.issue32674@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 9b7b3a64560269188fcb43445becc5aacb4de2dc by Mariatta in branch '2.7': bpo-32674: Improve the docstring for __import__ (GH-5339) (GH-5494) https://github.com/python/cpython/commit/9b7b3a64560269188fcb43445becc5aacb4de2dc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 11:25:38 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 02 Feb 2018 16:25:38 +0000 Subject: [issue32674] minor documentation fix for '__import__' In-Reply-To: <1516948902.25.0.467229070634.issue32674@psf.upfronthosting.co.za> Message-ID: <1517588738.86.0.467229070634.issue32674@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7, Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 11:31:25 2018 From: report at bugs.python.org (Kamil) Date: Fri, 02 Feb 2018 16:31:25 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517589085.26.0.467229070634.issue32394@psf.upfronthosting.co.za> Kamil added the comment: With ?orrect comments: CHANGE: #ifdef TCP_KEEPCNT PyModule_AddIntMacro(m, TCP_KEEPCNT); #endif TO: #ifdef TCP_KEEPCNT #if defined(_MSC_VER) && _MSC_VER >= 1800 if (IsWindows10CreatorsOrGreater()) { //Windows 10 1703(Build:15063 ) PyModule_AddIntMacro(m, TCP_KEEPCNT); } #endif #endif AND CHANGE: #ifdef TCP_FASTOPEN PyModule_AddIntMacro(m, TCP_FASTOPEN); #endif TO: #ifdef TCP_FASTOPEN #if defined(_MSC_VER) && _MSC_VER >= 1800 if (IsWindows10AnniversaryOrGreater()) { //Windows 10 1607(Build: 14393) PyModule_AddIntMacro(m, TCP_FASTOPEN); } #endif #endif ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 11:42:58 2018 From: report at bugs.python.org (Kamil) Date: Fri, 02 Feb 2018 16:42:58 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517589778.96.0.467229070634.issue32394@psf.upfronthosting.co.za> Kamil added the comment: I am sorry, this is the right version CHANGE: #ifdef TCP_KEEPCNT PyModule_AddIntMacro(m, TCP_KEEPCNT); #endif TO: #ifdef TCP_KEEPCNT #ifdef MS_WINDOWS #if defined(_MSC_VER) && _MSC_VER >= 1800 //on Windows avaible only from Windows 10 1703 (Build:15063 ) if (IsWindows10CreatorsOrGreater()) { PyModule_AddIntMacro(m, TCP_KEEPCNT); } #else PyModule_AddIntMacro(m, TCP_KEEPCNT); #endif #endif AND CHANGE: #ifdef TCP_FASTOPEN PyModule_AddIntMacro(m, TCP_FASTOPEN); #endif TO: #ifdef TCP_FASTOPEN #ifdef MS_WINDOWS #if defined(_MSC_VER) && _MSC_VER >= 1800 //on Windows avaible only from Windows 10 1607(Build: 14393) if (IsWindows10AnniversaryOrGreater()) { PyModule_AddIntMacro(m, TCP_FASTOPEN); } #else PyModule_AddIntMacro(m, TCP_FASTOPEN); #endif #endif ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 13:37:47 2018 From: report at bugs.python.org (Nick Smith) Date: Fri, 02 Feb 2018 18:37:47 +0000 Subject: [issue32750] lib2to3 log_error method behavior is inconsitent with documentation Message-ID: <1517596667.28.0.467229070634.issue32750@psf.upfronthosting.co.za> New submission from Nick Smith : The log_error method in refactor.RefactoringTool raises the exception: def log_error(self, msg, *args, **kwds): """Called when an error occurs.""" raise but every usage of it implies that it does not, e.g: def refactor_string(self, data, name): """Refactor a given input string. Args: data: a string holding the code to be refactored. name: a human-readable name for use in error/log messages. Returns: An AST corresponding to the refactored input stream; None if there were errors during the parse. """ # [..] try: tree = self.driver.parse_string(data) except Exception as err: self.log_error("Can't parse %s: %s: %s", name, err.__class__.__name__, err) return finally: # [..] This is the only explicit conflict I found in the documentation. From looking at the refactor_string function, it seems it should never raise on parse errors. Other uses of it are followed immediately by a return. I'd like to see log_error only log the exception and continue. ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 311507 nosy: soupytwist priority: normal severity: normal status: open title: lib2to3 log_error method behavior is inconsitent with documentation 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 Fri Feb 2 14:07:36 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 02 Feb 2018 19:07:36 +0000 Subject: [issue31356] Add context manager to temporarily disable GC In-Reply-To: <1504655244.01.0.877867263237.issue31356@psf.upfronthosting.co.za> Message-ID: <1517598456.06.0.467229070634.issue31356@psf.upfronthosting.co.za> Gregory P. Smith added the comment: The idea which this issue represents is not rejected. It is a good one, we found a need for it during the dev sprint last September. ---------- priority: release blocker -> normal resolution: rejected -> status: closed -> open versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 14:07:43 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 02 Feb 2018 19:07:43 +0000 Subject: [issue31356] Add context manager to temporarily disable GC In-Reply-To: <1504655244.01.0.877867263237.issue31356@psf.upfronthosting.co.za> Message-ID: <1517598463.48.0.467229070634.issue31356@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- stage: resolved -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 15:01:15 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Fri, 02 Feb 2018 20:01:15 +0000 Subject: [issue32751] wait_for(future, ...) should wait for the future (even if a timeout occurs) Message-ID: <1517601675.34.0.467229070634.issue32751@psf.upfronthosting.co.za> New submission from Nathaniel Smith : Currently, if you use asyncio.wait_for(future, timeout=....) and the timeout expires, then it (a) cancels to the future, and then (b) returns. This is fine if the future is a Future, because Future.cancel is synchronous and completes immediately. But if the future is a Task, then Task.cancel merely requests cancellation, and it will complete later (or not). In particular, this means that wait_for(coro, ...) can return with the coroutine still running, which is surprising. (Originally encountered by Alex Gr?nholm, who was using code like async with aclosing(agen): await wait_for(agen.asend(...), timeout=...) and then confused about why the call to agen.aclose was raising an error complaining that agen.asend was still running. Currently this requires an async_generator based async generator to trigger; with a native async generator, the problem is masked by bpo-32526.) ---------- components: asyncio messages: 311509 nosy: asvetlov, giampaolo.rodola, njs, yselivanov priority: normal severity: normal status: open title: wait_for(future, ...) should wait for the future (even if a timeout occurs) versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 15:04:57 2018 From: report at bugs.python.org (Dmitry Alimov) Date: Fri, 02 Feb 2018 20:04:57 +0000 Subject: [issue32743] Typo in hamt.c comments In-Reply-To: <1517505411.15.0.467229070634.issue32743@psf.upfronthosting.co.za> Message-ID: <1517601897.52.0.467229070634.issue32743@psf.upfronthosting.co.za> Dmitry Alimov added the comment: Fixed ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 15:16:00 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 02 Feb 2018 20:16:00 +0000 Subject: [issue32303] Namespace packages have inconsistent __loader__ and __spec__.loader In-Reply-To: <1513179703.14.0.213398074469.issue32303@psf.upfronthosting.co.za> Message-ID: <1517602560.96.0.467229070634.issue32303@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: New changeset bbbcf8693b876daae4469765aa62f8924f39a7d2 by Barry Warsaw in branch 'master': bpo-32303 - Consistency fixes for namespace loaders (#5481) https://github.com/python/cpython/commit/bbbcf8693b876daae4469765aa62f8924f39a7d2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 15:16:15 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 02 Feb 2018 20:16:15 +0000 Subject: [issue32303] Namespace packages have inconsistent __loader__ and __spec__.loader In-Reply-To: <1513179703.14.0.213398074469.issue32303@psf.upfronthosting.co.za> Message-ID: <1517602575.93.0.467229070634.issue32303@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5331 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 15:22:26 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 02 Feb 2018 20:22:26 +0000 Subject: [issue31356] Add context manager to temporarily disable GC In-Reply-To: <1504655244.01.0.877867263237.issue31356@psf.upfronthosting.co.za> Message-ID: <1517602946.84.0.467229070634.issue31356@psf.upfronthosting.co.za> Yury Selivanov added the comment: > The idea which this issue represents is not rejected. It is a good one, we found a need for it during the dev sprint last September. Well, not everybody thinks it is a good one. I, for instance, don't think it's a good idea, so it is at least one "-1". I saw Serhiy was unsure about this new feature too, so maybe there are two "-1"s; I don't know. So I kindly ask(-ed) for it to be openly discussed on python-dev, instead of making a unilateral decision. The problem with the current design is that GC can become enabled inside the 'with' block at any time: with gc.ensure_disabled(): # gc.is_enabled() might be True ! The GC can become enabled from another OS thread, as we have one GC per process. Adding a locking mechanism might be tricky in terms of implementation, and risky in terms of allowing people to accidentally have a deadlock or something. In short, I don't see any way to make this context manager to work reliably in CPython. Therefore, I think that the best location for a helper like this would be some unittesting helpers collection, as it can work only under some very specific conditions. The core 'gc' module is currently a collection of low-level primitives. I think we need a very solid motivation to add a core GC function that works unreliably and is suitable only for unittesting (at best). Maybe I'm completely wrong here, in which case I would love to be proved wrong and not just ignored. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 15:43:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 02 Feb 2018 20:43:18 +0000 Subject: [issue31356] Add context manager to temporarily disable GC In-Reply-To: <1504655244.01.0.877867263237.issue31356@psf.upfronthosting.co.za> Message-ID: <1517604198.65.0.467229070634.issue31356@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I concur with Yury in every point. The idea looks good for three core developers, but I just don't understand this. This feature looks useless and misleading to me. It is not atomic and doesn't ensure anything, despite its name. If it will be added in the stdlib, there should be very good explanation of its purpose and limitations in the documentation. And I agree that unittest may be better place than gc if the purpose of it is testing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 15:43:25 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 Feb 2018 20:43:25 +0000 Subject: [issue32614] Fix documentation examples of using re with escape sequences In-Reply-To: <1516574858.82.0.467229070634.issue32614@psf.upfronthosting.co.za> Message-ID: <1517604205.95.0.467229070634.issue32614@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: +serhiy.storchaka versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 15:45:03 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 02 Feb 2018 20:45:03 +0000 Subject: [issue31356] Add context manager to temporarily disable GC In-Reply-To: <1504655244.01.0.877867263237.issue31356@psf.upfronthosting.co.za> Message-ID: <1517604303.92.0.467229070634.issue31356@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Indeed if unit testing is the main use case, I don't really see the point of adding C code. People can code a simple helper using `contextlib.contextmanager` in a couple of lines. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 15:53:57 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 02 Feb 2018 20:53:57 +0000 Subject: [issue30516] Documentation for datetime substract operation incorrect? In-Reply-To: <1496179333.45.0.413102703331.issue30516@psf.upfronthosting.co.za> Message-ID: <1517604837.87.0.467229070634.issue30516@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +easy type: -> enhancement versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 16:02:20 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 02 Feb 2018 21:02:20 +0000 Subject: [issue32751] wait_for(future, ...) should wait for the future (even if a timeout occurs) In-Reply-To: <1517601675.34.0.467229070634.issue32751@psf.upfronthosting.co.za> Message-ID: <1517605340.87.0.467229070634.issue32751@psf.upfronthosting.co.za> Yury Selivanov added the comment: Looks like a bug. Andrew, if you have time to look at this, please feel free to go ahead; I'm going to be unavailable till Feb 12 (so I can take a look myself after that). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 16:16:35 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 Feb 2018 21:16:35 +0000 Subject: [issue32614] Fix documentation examples of using re with escape sequences In-Reply-To: <1516574858.82.0.467229070634.issue32614@psf.upfronthosting.co.za> Message-ID: <1517606195.44.0.467229070634.issue32614@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 66771422d0541289d0b1287bc3c28e8b5609f6b4 by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-32614: Modify re examples to use a raw string to prevent warning (GH-5265) https://github.com/python/cpython/commit/66771422d0541289d0b1287bc3c28e8b5609f6b4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 16:17:36 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 02 Feb 2018 21:17:36 +0000 Subject: [issue32614] Fix documentation examples of using re with escape sequences In-Reply-To: <1516574858.82.0.467229070634.issue32614@psf.upfronthosting.co.za> Message-ID: <1517606256.83.0.467229070634.issue32614@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5332 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 16:23:21 2018 From: report at bugs.python.org (Bar Harel) Date: Fri, 02 Feb 2018 21:23:21 +0000 Subject: [issue32734] Asyncio Lock safety issue (unlimited acquire) In-Reply-To: <1517424945.58.0.467229070634.issue32734@psf.upfronthosting.co.za> Message-ID: <1517606601.33.0.467229070634.issue32734@psf.upfronthosting.co.za> Change by Bar Harel : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 16:48:56 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 Feb 2018 21:48:56 +0000 Subject: [issue32614] Fix documentation examples of using re with escape sequences In-Reply-To: <1516574858.82.0.467229070634.issue32614@psf.upfronthosting.co.za> Message-ID: <1517608136.22.0.467229070634.issue32614@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +5333 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 16:50:47 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 Feb 2018 21:50:47 +0000 Subject: [issue32614] Fix documentation examples of using re with escape sequences In-Reply-To: <1516574858.82.0.467229070634.issue32614@psf.upfronthosting.co.za> Message-ID: <1517608247.06.0.467229070634.issue32614@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset c7de1d7ca62e2b67b90d6c178e63453c03833b75 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.7': bpo-32614: Modify re examples to use a raw string to prevent warning (GH-5265) (#5499) https://github.com/python/cpython/commit/c7de1d7ca62e2b67b90d6c178e63453c03833b75 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 17:04:02 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 02 Feb 2018 22:04:02 +0000 Subject: [issue32734] Asyncio Lock safety issue (unlimited acquire) In-Reply-To: <1517424945.58.0.467229070634.issue32734@psf.upfronthosting.co.za> Message-ID: <1517609042.5.0.467229070634.issue32734@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 2f79c014931cbb23b08a7d16c534a3cc9607ae14 by Yury Selivanov (Bar Harel) in branch 'master': bpo-32734: Fix asyncio.Lock multiple acquire safety issue (GH-5466) https://github.com/python/cpython/commit/2f79c014931cbb23b08a7d16c534a3cc9607ae14 ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 17:05:10 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 02 Feb 2018 22:05:10 +0000 Subject: [issue32734] Asyncio Lock safety issue (unlimited acquire) In-Reply-To: <1517424945.58.0.467229070634.issue32734@psf.upfronthosting.co.za> Message-ID: <1517609110.64.0.467229070634.issue32734@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5334 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 17:09:16 2018 From: report at bugs.python.org (Bar Harel) Date: Fri, 02 Feb 2018 22:09:16 +0000 Subject: [issue32734] Asyncio Lock safety issue (unlimited acquire) In-Reply-To: <1517424945.58.0.467229070634.issue32734@psf.upfronthosting.co.za> Message-ID: <1517609356.44.0.467229070634.issue32734@psf.upfronthosting.co.za> Change by Bar Harel : ---------- pull_requests: +5335 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 17:13:29 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 Feb 2018 22:13:29 +0000 Subject: [issue13553] Tkinter Tk args and Gnome Shell application name In-Reply-To: <1323306729.26.0.368335158355.issue13553@psf.upfronthosting.co.za> Message-ID: <1517609609.51.0.467229070634.issue13553@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: +Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 17:37:38 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 Feb 2018 22:37:38 +0000 Subject: [issue32614] Fix documentation examples of using re with escape sequences In-Reply-To: <1516574858.82.0.467229070634.issue32614@psf.upfronthosting.co.za> Message-ID: <1517611058.62.0.467229070634.issue32614@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset fbf8e823c02ac1c93a48609cc74e439e19ccb426 by Terry Jan Reedy in branch '3.6': [3.6] bpo-32614: Modify re examples to use a raw string to prevent wa? ?rning (GH-5265) (GH-5500) https://github.com/python/cpython/commit/fbf8e823c02ac1c93a48609cc74e439e19ccb426 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 17:38:37 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 Feb 2018 22:38:37 +0000 Subject: [issue32614] Fix documentation examples of using re with escape sequences In-Reply-To: <1516574858.82.0.467229070634.issue32614@psf.upfronthosting.co.za> Message-ID: <1517611117.67.0.467229070634.issue32614@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- assignee: docs at python -> terry.reedy resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 17:59:06 2018 From: report at bugs.python.org (Paul Pinterits) Date: Fri, 02 Feb 2018 22:59:06 +0000 Subject: [issue32752] no information about accessing typing.Generic type arguments Message-ID: <1517612346.62.0.467229070634.issue32752@psf.upfronthosting.co.za> New submission from Paul Pinterits : The documentation of the typing module explains how to instantiate generic types, but there is no information about how to extract the type arguments from a generic type. Example: >>> list_of_ints = typing.List[int] >>> >>> # how do we get out of list_of_ints? >>> list_of_ints.??? Through trial and error I've discovered list_of_ints.__args__, which *seems* to be what I'm looking for, but since it's never mentioned in the docs, it's unclear whether this __args__ attribute is an implementation detail or not. Please document the official/intended way to extract type arguments from a Generic. ---------- assignee: docs at python components: Documentation messages: 311520 nosy: Paul Pinterits, docs at python priority: normal severity: normal status: open title: no information about accessing typing.Generic type arguments type: enhancement versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 18:07:56 2018 From: report at bugs.python.org (Yarko Tymciurak) Date: Fri, 02 Feb 2018 23:07:56 +0000 Subject: [issue32753] ssl.SSLError exceptions in test_poplib Message-ID: <1517612876.52.0.467229070634.issue32753@psf.upfronthosting.co.za> New submission from Yarko Tymciurak : Just built v3.7.0b1, and have the following test hangs (see attached). My build is on Ubuntu 16.04; lsb_release -a output: LSB Version: core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:printing-9.20160110ubuntu0.2-amd64:printing-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch Distributor ID: Ubuntu Description: Ubuntu 16.04.3 LTS Release: 16.04 Codename: xenial My "usual" config / build process: $ make distclean $ ./configure --enable-shared --enable-loadable-sqlite-extensions --with-system-ffi --with-ensurepip=upgrade --enable-optimizations $ make -j I have been building 3.7 weekly, from master, and I've never seen anything like this before. ---------- components: asyncio files: v3.7.0b1-test-failure.txt messages: 311521 nosy: asvetlov, yarkot, yselivanov priority: normal severity: normal status: open title: ssl.SSLError exceptions in test_poplib type: crash versions: Python 3.7 Added file: https://bugs.python.org/file47421/v3.7.0b1-test-failure.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 18:11:06 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 02 Feb 2018 23:11:06 +0000 Subject: [issue32753] ssl.SSLError exceptions in test_poplib In-Reply-To: <1517612876.52.0.467229070634.issue32753@psf.upfronthosting.co.za> Message-ID: <1517613066.04.0.467229070634.issue32753@psf.upfronthosting.co.za> Change by R. David Murray : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 18:14:23 2018 From: report at bugs.python.org (Yarko Tymciurak) Date: Fri, 02 Feb 2018 23:14:23 +0000 Subject: [issue32753] ssl.SSLError exceptions in test_poplib In-Reply-To: <1517612876.52.0.467229070634.issue32753@psf.upfronthosting.co.za> Message-ID: <1517613263.17.0.467229070634.issue32753@psf.upfronthosting.co.za> Yarko Tymciurak added the comment: ...also, my initial build (after inspecting git log) was from (as I usually do) master/HEAD; To check that this was indeed from v3.7.0b1 release, I `distclean` and checked out the v3.7.0b1 tag, and rebuilt. (Looks like same error / behavior). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 18:14:28 2018 From: report at bugs.python.org (William Woodall) Date: Fri, 02 Feb 2018 23:14:28 +0000 Subject: [issue32423] The Windows SDK version 10.0.15063.0 was not found In-Reply-To: <1514094015.43.0.213398074469.issue32423@psf.upfronthosting.co.za> Message-ID: <1517613268.02.0.467229070634.issue32423@psf.upfronthosting.co.za> William Woodall added the comment: I can confirm this bug using both VS 2015 and VS 2017 on Windows 10. The patch provided by isuruf works for me too. ---------- nosy: +wjwwood _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 18:14:40 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 02 Feb 2018 23:14:40 +0000 Subject: [issue32734] Asyncio Lock safety issue (unlimited acquire) In-Reply-To: <1517424945.58.0.467229070634.issue32734@psf.upfronthosting.co.za> Message-ID: <1517613280.77.0.467229070634.issue32734@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 2b5937ec0ae88cd0b4cc0c8534f21c435ee94662 by Yury Selivanov (Miss Islington (bot)) in branch '3.7': bpo-32734: Fix asyncio.Lock multiple acquire safety issue (GH-5466) (#5501) https://github.com/python/cpython/commit/2b5937ec0ae88cd0b4cc0c8534f21c435ee94662 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 18:15:33 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 02 Feb 2018 23:15:33 +0000 Subject: [issue32734] Asyncio Lock safety issue (unlimited acquire) In-Reply-To: <1517424945.58.0.467229070634.issue32734@psf.upfronthosting.co.za> Message-ID: <1517613333.83.0.467229070634.issue32734@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 7e4cf8e95d2971ae0d5fb417152183070184293f by Yury Selivanov (Bar Harel) in branch '3.6': [3.6] bpo-32734: Fix asyncio.Lock multiple acquire safety issue (GH-5466) (#5502) https://github.com/python/cpython/commit/7e4cf8e95d2971ae0d5fb417152183070184293f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 18:17:23 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 02 Feb 2018 23:17:23 +0000 Subject: [issue32734] Asyncio Lock safety issue (unlimited acquire) In-Reply-To: <1517424945.58.0.467229070634.issue32734@psf.upfronthosting.co.za> Message-ID: <1517613443.38.0.467229070634.issue32734@psf.upfronthosting.co.za> Yury Selivanov added the comment: Thank you, Bar! Looking forward to see more contributions to asyncio from you! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 18:11:16 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 02 Feb 2018 23:11:16 +0000 Subject: [issue32753] ssl.SSLError exceptions in test_poplib In-Reply-To: <1517612876.52.0.467229070634.issue32753@psf.upfronthosting.co.za> Message-ID: <1517613076.27.0.467229070634.issue32753@psf.upfronthosting.co.za> Change by R. David Murray : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 18:21:48 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 02 Feb 2018 23:21:48 +0000 Subject: [issue32753] ssl.SSLError exceptions in test_poplib In-Reply-To: <1517612876.52.0.467229070634.issue32753@psf.upfronthosting.co.za> Message-ID: <1517613708.95.0.467229070634.issue32753@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- nosy: -yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 18:29:02 2018 From: report at bugs.python.org (Alexander Mohr) Date: Fri, 02 Feb 2018 23:29:02 +0000 Subject: [issue32754] feature request: asyncio.gather/wait cancel children on first exception Message-ID: <1517614142.6.0.467229070634.issue32754@psf.upfronthosting.co.za> New submission from Alexander Mohr : currently gather/wait allow you to return on the first exception and leave the children executing. A very common use case that I have is of launching multiple tasks, and if any of them fail, then all should fail..otherwise the other tasks would continue running w/o anyone listening for the results. To accomplish this I wrote a method like the following: https://gist.github.com/thehesiod/524a1f005d0f3fb61a8952f272d8709e. I think it would be useful to many others as on optional perhaps a parameter to each of these methods. What do you guys think? ---------- components: asyncio messages: 311527 nosy: asvetlov, thehesiod, yselivanov priority: normal severity: normal status: open title: feature request: asyncio.gather/wait cancel children on first exception versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 18:31:43 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 02 Feb 2018 23:31:43 +0000 Subject: [issue32754] feature request: asyncio.gather/wait cancel children on first exception In-Reply-To: <1517614142.6.0.467229070634.issue32754@psf.upfronthosting.co.za> Message-ID: <1517614303.8.0.467229070634.issue32754@psf.upfronthosting.co.za> Yury Selivanov added the comment: I think it's a good idea and I wanted to implement it by copying TaskGroups from curio in 3.7. But then I saw Trio's nurseries and I have a few ideas about slightly different design inspired by both curio and Trio :) I have some very WIP code that I plan to finish in a few weeks. I'll update this issue then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 19:49:28 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 03 Feb 2018 00:49:28 +0000 Subject: [issue32303] Namespace packages have inconsistent __loader__ and __spec__.loader In-Reply-To: <1513179703.14.0.213398074469.issue32303@psf.upfronthosting.co.za> Message-ID: <1517618968.22.0.467229070634.issue32303@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: New changeset a23d30f64bd9c5655cfae7f359d4279c47f6cab3 by Barry Warsaw in branch '3.7': bpo-32303 - Consistency fixes for namespace loaders (GH-5481) (#5503) https://github.com/python/cpython/commit/a23d30f64bd9c5655cfae7f359d4279c47f6cab3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 19:58:43 2018 From: report at bugs.python.org (pmpp) Date: Sat, 03 Feb 2018 00:58:43 +0000 Subject: [issue26855] android: add platform.android_ver() In-Reply-To: <1461676711.89.0.563475479331.issue26855@psf.upfronthosting.co.za> Message-ID: <1517619523.32.0.467229070634.issue26855@psf.upfronthosting.co.za> Change by pmpp : ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 20:04:30 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 03 Feb 2018 01:04:30 +0000 Subject: [issue32303] Namespace packages have inconsistent __loader__ and __spec__.loader In-Reply-To: <1513179703.14.0.213398074469.issue32303@psf.upfronthosting.co.za> Message-ID: <1517619870.56.0.467229070634.issue32303@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- pull_requests: +5336 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 20:20:00 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 03 Feb 2018 01:20:00 +0000 Subject: [issue16024] Doc cleanup regarding path=fd, dir_fd, follow_symlinks, etc In-Reply-To: <1348500599.22.0.118178834994.issue16024@psf.upfronthosting.co.za> Message-ID: <1517620800.54.0.467229070634.issue16024@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- pull_requests: +5337 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 20:22:18 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 03 Feb 2018 01:22:18 +0000 Subject: [issue16024] Doc cleanup regarding path=fd, dir_fd, follow_symlinks, etc In-Reply-To: <1348500599.22.0.118178834994.issue16024@psf.upfronthosting.co.za> Message-ID: <1517620938.68.0.467229070634.issue16024@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Larry, I've made a pull request for your patch. It seemed like most of the original text was still in place, so I thought you might still want these changes. You had also made changes to the What's New, but I didn't include those changes. ---------- nosy: +csabella versions: +Python 3.8 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 22:23:51 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 03 Feb 2018 03:23:51 +0000 Subject: [issue32216] Document PEP 557 Data Classes (dataclasses module) In-Reply-To: <1512439511.23.0.213398074469.issue32216@psf.upfronthosting.co.za> Message-ID: <1517628231.09.0.467229070634.issue32216@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: I'd be interested to help write the PR for this. ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 23:21:17 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 03 Feb 2018 04:21:17 +0000 Subject: [issue32303] Namespace packages have inconsistent __loader__ and __spec__.loader In-Reply-To: <1513179703.14.0.213398074469.issue32303@psf.upfronthosting.co.za> Message-ID: <1517631677.48.0.467229070634.issue32303@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: New changeset a71397fb6603d0fe673acd7765c74699cd28fe7b by Barry Warsaw in branch '3.6': [3.6] bpo-32303 - Consistency fixes for namespace loaders (GH-5481) (#5504) https://github.com/python/cpython/commit/a71397fb6603d0fe673acd7765c74699cd28fe7b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 23:21:37 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 03 Feb 2018 04:21:37 +0000 Subject: [issue32303] Namespace packages have inconsistent __loader__ and __spec__.loader In-Reply-To: <1513179703.14.0.213398074469.issue32303@psf.upfronthosting.co.za> Message-ID: <1517631697.07.0.467229070634.issue32303@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 23:21:56 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 03 Feb 2018 04:21:56 +0000 Subject: [issue32305] Namespace packages have inconsistent __file__ and __spec__.origin In-Reply-To: <1513180121.5.0.213398074469.issue32305@psf.upfronthosting.co.za> Message-ID: <1517631716.28.0.467229070634.issue32305@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 23:27:04 2018 From: report at bugs.python.org (Eric Snow) Date: Sat, 03 Feb 2018 04:27:04 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1517632024.21.0.467229070634.issue32604@psf.upfronthosting.co.za> Change by Eric Snow : ---------- pull_requests: +5338 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 23:36:10 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 03 Feb 2018 04:36:10 +0000 Subject: [issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x In-Reply-To: <1500463733.4.0.83678923325.issue30968@psf.upfronthosting.co.za> Message-ID: <1517632570.94.0.467229070634.issue30968@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +5339 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 23:49:51 2018 From: report at bugs.python.org (Eric Snow) Date: Sat, 03 Feb 2018 04:49:51 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1517633391.68.0.467229070634.issue32604@psf.upfronthosting.co.za> Eric Snow added the comment: New changeset 4e9da0d163731caa79811c723c703ee416c31826 by Eric Snow in branch 'master': bpo-32604: Fix memory leaks in the new _xxsubinterpreters module. (#5507) https://github.com/python/cpython/commit/4e9da0d163731caa79811c723c703ee416c31826 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 23:51:07 2018 From: report at bugs.python.org (Eric Snow) Date: Sat, 03 Feb 2018 04:51:07 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1517633467.15.0.467229070634.issue32604@psf.upfronthosting.co.za> Eric Snow added the comment: I've landed a PR that fixes all the memory leaks in the module. It also fixes the 2 defects reported by coverity. The only thing left here is to get the module building under Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 2 23:53:20 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 03 Feb 2018 04:53:20 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1517633600.19.0.467229070634.issue32604@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5340 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 00:03:04 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 03 Feb 2018 05:03:04 +0000 Subject: [issue8722] Documentation for __getattr__ In-Reply-To: <1273896658.97.0.575873001655.issue8722@psf.upfronthosting.co.za> Message-ID: <1517634184.36.0.467229070634.issue8722@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Nick, this is about better documenting the behavior of __get(set/del)attr__ in 3.x it relations to AttributeError in a property. I think I understand what it does and think the patch is correct. Could you either review or suggest someone else who better understands core behavior like this? ---------- components: +Interpreter Core nosy: +ncoghlan versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 00:24:46 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 03 Feb 2018 05:24:46 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1517635486.07.0.467229070634.issue30928@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +5341 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 00:25:41 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 03 Feb 2018 05:25:41 +0000 Subject: [issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x In-Reply-To: <1500463733.4.0.83678923325.issue30968@psf.upfronthosting.co.za> Message-ID: <1517635541.05.0.467229070634.issue30968@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: -5339 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 00:39:00 2018 From: report at bugs.python.org (Eric Snow) Date: Sat, 03 Feb 2018 05:39:00 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1517636340.34.0.467229070634.issue32604@psf.upfronthosting.co.za> Eric Snow added the comment: New changeset f33ecedcad5a001735fa4ded5d21caa2cbf27911 by Eric Snow (Miss Islington (bot)) in branch '3.7': bpo-32604: Fix memory leaks in the new _xxsubinterpreters module. (GH-5507) https://github.com/python/cpython/commit/f33ecedcad5a001735fa4ded5d21caa2cbf27911 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 00:52:36 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 03 Feb 2018 05:52:36 +0000 Subject: [issue30968] test_get_font (idlelib.idle_test.test_config.IdleConfTest) failure on x86 Windows7 3.x In-Reply-To: <1500463733.4.0.83678923325.issue30968@psf.upfronthosting.co.za> Message-ID: <1517637156.4.0.467229070634.issue30968@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +5342 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 00:52:36 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 03 Feb 2018 05:52:36 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1517637156.85.0.467229070634.issue30928@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 72584d23a54855ef5843d7475b7c5a904e3ef713 by Terry Jan Reedy in branch '3.6': [3.6] bpo-30928: prepare idlelib/NEWS.txt for 3.6.5 entries. (#5508) https://github.com/python/cpython/commit/72584d23a54855ef5843d7475b7c5a904e3ef713 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 01:00:20 2018 From: report at bugs.python.org (Eric Snow) Date: Sat, 03 Feb 2018 06:00:20 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1517637620.6.0.467229070634.issue32604@psf.upfronthosting.co.za> Eric Snow added the comment: FYI, out of 2389 source lines in the C extension, 1563 are the channel-related code. That means the non-channel code is 826 lines (about a third). That non-channel code does not depend on the channel code at all and I considered splitting the source out, but figured there wasn't enough benefit. However, I might revisit the matter later when I circle back to PEP 554. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 01:25:02 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 03 Feb 2018 06:25:02 +0000 Subject: [issue32692] test_threading.test_set_and_clear fails in AppVeyor CI In-Reply-To: <1517129650.59.0.467229070634.issue32692@psf.upfronthosting.co.za> Message-ID: <1517639102.58.0.467229070634.issue32692@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 01:30:04 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 03 Feb 2018 06:30:04 +0000 Subject: [issue32730] Allow py launcher to launch other registered Pythons In-Reply-To: <1517414233.69.0.467229070634.issue32730@psf.upfronthosting.co.za> Message-ID: <1517639404.37.0.467229070634.issue32730@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 01:40:16 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 03 Feb 2018 06:40:16 +0000 Subject: [issue32691] "pdb -m " sets __main__.__package__ incorrectly In-Reply-To: <1517115891.43.0.467229070634.issue32691@psf.upfronthosting.co.za> Message-ID: <1517640016.35.0.467229070634.issue32691@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset 38bfa8418f5d39bcc7478b8f7aef4a632c26172e by Nick Coghlan (Mario Corchero) in branch 'master': bpo-32691: Use mod_spec.parent when running modules with pdb (GH-5474) https://github.com/python/cpython/commit/38bfa8418f5d39bcc7478b8f7aef4a632c26172e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 01:41:25 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 03 Feb 2018 06:41:25 +0000 Subject: [issue32691] "pdb -m " sets __main__.__package__ incorrectly In-Reply-To: <1517115891.43.0.467229070634.issue32691@psf.upfronthosting.co.za> Message-ID: <1517640085.52.0.467229070634.issue32691@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5343 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 02:05:44 2018 From: report at bugs.python.org (Nitish) Date: Sat, 03 Feb 2018 07:05:44 +0000 Subject: [issue29317] test_copyxattr_symlinks fails In-Reply-To: <1484782411.92.0.520036190929.issue29317@psf.upfronthosting.co.za> Message-ID: <1517641544.23.0.467229070634.issue29317@psf.upfronthosting.co.za> Change by Nitish : ---------- nosy: +nitishch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 03:02:54 2018 From: report at bugs.python.org (yang) Date: Sat, 03 Feb 2018 08:02:54 +0000 Subject: [issue32729] socket error handling needed In-Reply-To: <1517380649.99.0.467229070634.issue32729@psf.upfronthosting.co.za> Message-ID: <1517644974.23.0.467229070634.issue32729@psf.upfronthosting.co.za> yang added the comment: When timeout error occurred in urllib3.Poolmanager.urlopen(), the built-in TimeoutError raised which is not caught in existing timeout exception clause. Thus, It is caught by 'error' except and it is not checking Nonetype so that raising IndexError It patched that error and detailed in PR-5458 https://github.com/python/cpython/pull/5458 Thank you and sorry for not good at english. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 04:08:40 2018 From: report at bugs.python.org (INADA Naoki) Date: Sat, 03 Feb 2018 09:08:40 +0000 Subject: [issue32729] socket error handling needed In-Reply-To: <1517380649.99.0.467229070634.issue32729@psf.upfronthosting.co.za> Message-ID: <1517648920.49.0.467229070634.issue32729@psf.upfronthosting.co.za> INADA Naoki added the comment: It may be bug of raising TimeoutError, not catching. That's why I want example code to reproduce. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 04:15:47 2018 From: report at bugs.python.org (INADA Naoki) Date: Sat, 03 Feb 2018 09:15:47 +0000 Subject: [issue32729] socket error handling needed In-Reply-To: <1517380649.99.0.467229070634.issue32729@psf.upfronthosting.co.za> Message-ID: <1517649347.69.0.467229070634.issue32729@psf.upfronthosting.co.za> INADA Naoki added the comment: And your screenshot doesn't contain "full" traceback chain. It can be very important hint about who creates invalid TimeoutError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 05:03:48 2018 From: report at bugs.python.org (=?utf-8?b?0K7RgNC40Lkg0J/Rg9GF0LDQu9GM0YHQutC40Lk=?=) Date: Sat, 03 Feb 2018 10:03:48 +0000 Subject: [issue32755] Several cookies with the same name get intermixed Message-ID: <1517652228.92.0.467229070634.issue32755@psf.upfronthosting.co.za> New submission from ???? ?????????? : I'm using python 3.5.4. The site gives me two headers: I'm using aiohttp that iterates the headers and if it's set-cookie, calls SimpleCookie.load(). The latter maintains a dict inside by the cookie name. So that's what happens, first we add a dict entry with LOGIN_SESSION=deleted and phony expiration date. Next cookie, the valid one, gets into the same dict entry, updates the value to the right one, but expiration date remains in the past. The result is that this cookie is not used. I don't know the good way of handling it. Maybe clear the cookie fields before updating the dict? Or this behaviour is intended? I think the situation itself is wrong, the site shouldn't be sending this, but how to cope with it? ---------- components: Extension Modules messages: 311544 nosy: ???? ?????????? priority: normal severity: normal status: open title: Several cookies with the same name get intermixed type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 05:54:37 2018 From: report at bugs.python.org (yang) Date: Sat, 03 Feb 2018 10:54:37 +0000 Subject: [issue32729] socket error handling needed In-Reply-To: <1517380649.99.0.467229070634.issue32729@psf.upfronthosting.co.za> Message-ID: <1517655277.68.0.467229070634.issue32729@psf.upfronthosting.co.za> yang added the comment: Oh.. you are right. I think it's my bug. here is code ``` import urllib3 import certifi from functools import wraps import signal from urllib3 import Timeout def timeoutdec(sec): def decorator(func): def _timeout(signum, frame): raise TimeoutError() @wraps(func) def wrapper(*args, **kwargs): signal.signal(signal.SIGALRM, _timeout) signal.alarm(sec) try: result = func(*args, **kwargs) finally: signal.alarm(0) return result return wrapper return decorator @timeoutdec(2) def for_test(): timeout = Timeout(connect=10.0, read=2.0) url = 'http://httpbin.org/delay/7' method = 'GET' body = None headers = None http = urllib3.PoolManager(timeout=timeout, cert_reqs='CERT_REQUIRED', ca_certs=certifi.where()) while True: response = http.urlopen(method, url, body=body, headers=headers, preload_content=True) print(response.data) for_test() ``` here is the code that i got same traceback. maybe the TimeoutError is raised from my code, timeoutdec(). I thought it was python bug. sorry for bothering you. and I will close my PR-32729. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 07:31:44 2018 From: report at bugs.python.org (Yauhen) Date: Sat, 03 Feb 2018 12:31:44 +0000 Subject: [issue32756] argparse: parse_known_args: raising exception on unknown arg following known one Message-ID: <1517661104.06.0.467229070634.issue32756@psf.upfronthosting.co.za> New submission from Yauhen : steps to reproduce: import argparse import sys parser = argparse.ArgumentParser(prog=sys.argv[0], add_help=False) parser.add_argument('-a', action='store_true') parsed_args, unknown_args = parser.parse_known_args(sys.argv[1:]) print(parsed_args) print(unknown_args) Expected result: $ python arparse_test.py -ab Namespace(a=True) ['b'] Actual result: $ python arparse_test.py -ab usage: arparse_test.py [-a] arparse_test.py: error: argument -a: ignored explicit argument 'b' ---------- components: Library (Lib) messages: 311546 nosy: actionless priority: normal pull_requests: 5345 severity: normal status: open title: argparse: parse_known_args: raising exception on unknown arg following known one versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 07:40:17 2018 From: report at bugs.python.org (David CARLIER) Date: Sat, 03 Feb 2018 12:40:17 +0000 Subject: [issue32493] UUID Module - FreeBSD build failure In-Reply-To: <1515092270.67.0.467229070634.issue32493@psf.upfronthosting.co.za> Message-ID: <1517661617.3.0.467229070634.issue32493@psf.upfronthosting.co.za> David CARLIER added the comment: Probably. Seems workable under Apple otherwise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 07:42:53 2018 From: report at bugs.python.org (Yauhen) Date: Sat, 03 Feb 2018 12:42:53 +0000 Subject: [issue32756] argparse: parse_known_args: raising exception on unknown arg following known one In-Reply-To: <1517661104.06.0.467229070634.issue32756@psf.upfronthosting.co.za> Message-ID: <1517661773.79.0.467229070634.issue32756@psf.upfronthosting.co.za> Yauhen added the comment: It was a mistake in expected result, should be: $ python arparse_test.py -ab -c Namespace(a=True) ['-b', '-c'] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 08:40:49 2018 From: report at bugs.python.org (amirjn) Date: Sat, 03 Feb 2018 13:40:49 +0000 Subject: [issue3177] Add shutil.open In-Reply-To: <1214221105.24.0.576717506983.issue3177@psf.upfronthosting.co.za> Message-ID: <1517665249.12.0.467229070634.issue3177@psf.upfronthosting.co.za> amirjn added the comment: same problem here ---------- nosy: +amirjn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 08:42:47 2018 From: report at bugs.python.org (amirjn) Date: Sat, 03 Feb 2018 13:42:47 +0000 Subject: [issue27923] PEP 467 -- Minor API improvements for binary sequences In-Reply-To: <1472691379.75.0.669592694643.issue27923@psf.upfronthosting.co.za> Message-ID: <1517665367.8.0.467229070634.issue27923@psf.upfronthosting.co.za> amirjn added the comment: i didnt find anything at http://devguide.python.org/communication/ ---------- nosy: +amirjn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 08:42:56 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 03 Feb 2018 13:42:56 +0000 Subject: [issue30109] make reindent failed. In-Reply-To: <1492658256.6.0.028215188728.issue30109@psf.upfronthosting.co.za> Message-ID: <1517665376.96.0.467229070634.issue30109@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Does this just need to be cherry-picked to 2.7 to be able to close it? ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 08:43:38 2018 From: report at bugs.python.org (amirjn) Date: Sat, 03 Feb 2018 13:43:38 +0000 Subject: [issue3177] Add shutil.open In-Reply-To: <1214221105.24.0.576717506983.issue3177@psf.upfronthosting.co.za> Message-ID: <1517665418.07.0.467229070634.issue3177@psf.upfronthosting.co.za> amirjn added the comment: same problem here ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 08:55:55 2018 From: report at bugs.python.org (amirjn) Date: Sat, 03 Feb 2018 13:55:55 +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: <1517666155.07.0.467229070634.issue32680@psf.upfronthosting.co.za> amirjn added the comment: same problem at apple.com ---------- nosy: +amirjn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 08:57:00 2018 From: report at bugs.python.org (amirjn) Date: Sat, 03 Feb 2018 13:57:00 +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: <1517666220.73.0.467229070634.issue32680@psf.upfronthosting.co.za> amirjn added the comment: apple.com ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 09:12:12 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 03 Feb 2018 14:12:12 +0000 Subject: [issue30109] make reindent failed. In-Reply-To: <1492658256.6.0.028215188728.issue30109@psf.upfronthosting.co.za> Message-ID: <1517667132.29.0.467229070634.issue30109@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks for the ping. Almost forgotten about this issue. This can't be cherry-picked cleanly. I need to first backport the new testcase to 2.7, and see if it passes. If the test failed in 2.7 then I need to work on actually backporting the change. I should have time to do it later tonight. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 09:16:26 2018 From: report at bugs.python.org (amirjn) Date: Sat, 03 Feb 2018 14:16:26 +0000 Subject: [issue27923] PEP 467 -- Minor API improvements for binary sequences In-Reply-To: <1472691379.75.0.669592694643.issue27923@psf.upfronthosting.co.za> Message-ID: <1517667386.12.0.467229070634.issue27923@psf.upfronthosting.co.za> amirjn added the comment: We got same problem at https://www.blogs.va.gov/ can any one help? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 09:47:11 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 03 Feb 2018 14:47:11 +0000 Subject: [issue32107] Improve MAC address calculation and fix test_uuid.py In-Reply-To: <1511284223.14.0.213398074469.issue32107@psf.upfronthosting.co.za> Message-ID: <1517669231.97.0.467229070634.issue32107@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I think this issue is resolved, right? Closing. Please reopen if there's anything left to do. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 09:48:37 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 03 Feb 2018 14:48:37 +0000 Subject: [issue30300] asyncio.Controller In-Reply-To: <1494181497.37.0.0898291474199.issue30300@psf.upfronthosting.co.za> Message-ID: <1517669317.09.0.467229070634.issue30300@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: There doesn't seem to be much appetite for this in the stdlib, so closing. It'll just have to live in a third party module. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 11:46:36 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 03 Feb 2018 16:46:36 +0000 Subject: [issue32739] collections.deque rotate(n=1) default value not documented In-Reply-To: <1517463893.34.0.467229070634.issue32739@psf.upfronthosting.co.za> Message-ID: <1517676396.08.0.467229070634.issue32739@psf.upfronthosting.co.za> Raymond Hettinger added the comment: New changeset 589c718a8e3bde017350f248f7f1c009240eb52b by Raymond Hettinger in branch 'master': bpo-32739: Show default value for rotate() (GH-5485) https://github.com/python/cpython/commit/589c718a8e3bde017350f248f7f1c009240eb52b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 11:46:38 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 03 Feb 2018 16:46:38 +0000 Subject: [issue32739] collections.deque rotate(n=1) default value not documented In-Reply-To: <1517463893.34.0.467229070634.issue32739@psf.upfronthosting.co.za> Message-ID: <1517676398.54.0.467229070634.issue32739@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5346 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 11:47:37 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 03 Feb 2018 16:47:37 +0000 Subject: [issue32739] collections.deque rotate(n=1) default value not documented In-Reply-To: <1517463893.34.0.467229070634.issue32739@psf.upfronthosting.co.za> Message-ID: <1517676457.07.0.467229070634.issue32739@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5347 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 12:08:44 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 03 Feb 2018 17:08:44 +0000 Subject: [issue32739] collections.deque rotate(n=1) default value not documented In-Reply-To: <1517463893.34.0.467229070634.issue32739@psf.upfronthosting.co.za> Message-ID: <1517677724.83.0.467229070634.issue32739@psf.upfronthosting.co.za> Raymond Hettinger added the comment: New changeset 52f745852e49498d7dd86fd309ae57f6a7af568f by Raymond Hettinger (Miss Islington (bot)) in branch '3.7': bpo-32739: Show default value for rotate() (GH-5485) (GH-5514) https://github.com/python/cpython/commit/52f745852e49498d7dd86fd309ae57f6a7af568f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 12:09:15 2018 From: report at bugs.python.org (hadimene) Date: Sat, 03 Feb 2018 17:09:15 +0000 Subject: [issue32757] Python 2.7 : Buffer Overflow vulnerability in exec() function Message-ID: <1517677752.38.0.467229070634.issue32757@psf.upfronthosting.co.za> New submission from hadimene : Hello ! Recently while debugging my python code I discovered an stack-based Buffer overflow Vulnerability in Python 2.7 and lower versions . This vulnerability is caused by exec() builtin function when we create "recursive" function using exec() ... Example : We want to Print "hello World !" str and we encode print "hello world" ) using chr() or unichr() print "hello World " becomes exec(chr(112)+chr(114)+chr(105)+chr(110)+chr(116)+chr(40)+chr(39)+chr(104)+chr(101)+chr(108)+chr(108)+chr(111)+chr(32)+chr(119)+chr(111)+chr(114)+chr(108)+chr(100)+chr(32)+chr(33)+chr(32)+chr(39)+chr(41)+chr(10)+chr(35)) and if we re-encode the result : exec() the result would be exec(chr(101)+chr(120)+chr(101)+chr(99)+chr(40)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(49)+chr(50)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(49)+chr(52)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(48)+chr(53)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(49)+chr(48)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(49)+chr(54)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(52)+chr(48)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(51)+chr(57)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(48)+chr(52)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(48)+chr(49)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(48)+chr(56)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(48)+chr(56)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(49)+chr(49)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(51)+chr(50)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(49)+chr(57)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(49)+chr(49)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(49)+chr(52)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(48)+chr(56)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(48)+chr(48)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(51)+chr(50)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(51)+chr(51)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(51)+chr(50)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(51)+chr(57)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(52)+chr(49)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(49)+chr(48)+chr(41)+chr(43)+chr(99)+chr(104)+chr(114)+chr(40)+chr(51)+chr(53)+chr(41)+chr(41)+chr(35)) If you do this manipulation 6-7 times and you run the encoded script then the Python Interpreter program will crash with a Segmentation Fault as error : (https://lepetithacker.files.wordpress.com/2018/01/capture-dc3a9cran-2018-01-31-191359.png) We can check the Segmentation Fault using gdb ( GNU Debugger ) https://lepetithacker.files.wordpress.com/2018/01/capture-dc3a9cran-2018-01-31-202241.png ) To get an Segmentation Fault error you can just run poc.py ! Conclusion In my opinion , to patch this vulnerability developers need to give more memory/buffer to the exec() arguments , and verify if the buffer can contains exec() arguments in integrality without any overflow ! An attacker could control the memory of an server written in python if the builtin function exec() is used and python version i of the server is 2.7 or lower (every version of python2 could be vulnerable like Python 2.9 but I didn't tried yet ) ---------- components: Interpreter Core files: poc.py messages: 311561 nosy: hadimene priority: normal severity: normal status: open title: Python 2.7 : Buffer Overflow vulnerability in exec() function type: security versions: Python 2.7 Added file: https://bugs.python.org/file47422/poc.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 12:20:41 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Sat, 03 Feb 2018 17:20:41 +0000 Subject: [issue32757] Python 2.7 : Buffer Overflow vulnerability in exec() function In-Reply-To: <1517677752.38.0.467229070634.issue32757@psf.upfronthosting.co.za> Message-ID: <1517678441.02.0.467229070634.issue32757@psf.upfronthosting.co.za> Josh Rosenberg added the comment: A server that exposes arbitrary exec's to user-submitted data can already be controlled. exec can do anything that Python can do, that's the whole point. Sure, crashing Python is bad, but it could also keep Python alive and start dumping the database to arbitrary people, deleting files, etc. Also, your Proof of Concept code is cluttered with pointless garbage AFAICT. Do you really need all the unused multiline strings to trigger this? ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 12:29:44 2018 From: report at bugs.python.org (hadimene) Date: Sat, 03 Feb 2018 17:29:44 +0000 Subject: [issue32757] Python 2.7 : Buffer Overflow vulnerability in exec() function In-Reply-To: <1517677752.38.0.467229070634.issue32757@psf.upfronthosting.co.za> Message-ID: <1517678984.07.0.467229070634.issue32757@psf.upfronthosting.co.za> hadimene added the comment: Hello ! Thanks for the fast response but I tested and print() appears to be vulnerable too using chr() characters and yes the junk comments are useless ... ---------- Added file: https://bugs.python.org/file47423/poc-print.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 12:34:50 2018 From: report at bugs.python.org (hadimene) Date: Sat, 03 Feb 2018 17:34:50 +0000 Subject: [issue32757] Python 2.7 : Buffer Overflow vulnerability in exec() function In-Reply-To: <1517677752.38.0.467229070634.issue32757@psf.upfronthosting.co.za> Message-ID: <1517679290.41.0.467229070634.issue32757@psf.upfronthosting.co.za> hadimene added the comment: the comments lines are not needed ! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 12:35:16 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 03 Feb 2018 17:35:16 +0000 Subject: [issue32227] singledispatch support for type annotations In-Reply-To: <1512509052.55.0.213398074469.issue32227@psf.upfronthosting.co.za> Message-ID: <1517679316.57.0.467229070634.issue32227@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Hello, I believe this could be closed as resolved? Do you think it should be added to the What's New? page for 3.7? ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 12:36:28 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 03 Feb 2018 17:36:28 +0000 Subject: [issue31356] Add context manager to temporarily disable GC In-Reply-To: <1504655244.01.0.877867263237.issue31356@psf.upfronthosting.co.za> Message-ID: <1517679388.22.0.467229070634.issue31356@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Nick and Raymond: do you remember what our original motivating use cases were for this idea during the sprint? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 12:57:09 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 03 Feb 2018 17:57:09 +0000 Subject: [issue20632] Define a new __key__ protocol In-Reply-To: <1392423475.26.0.500398402328.issue20632@psf.upfronthosting.co.za> Message-ID: <1517680629.58.0.467229070634.issue20632@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I wonder if this would make sense as a parameter to dataclass now. ---------- nosy: +csabella versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 13:22:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 03 Feb 2018 18:22:51 +0000 Subject: [issue32758] Stack overflow when parse long expression to AST Message-ID: <1517682171.17.0.467229070634.issue32758@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : Python 2 can crash when compile long expression. >>> x = eval('""' + '+chr(33)'*100000) Segmentation fault (core dumped) This was fixed in Python 3. RecursionError is raised now. >>> x = eval('""' + '+chr(33)'*100000) Traceback (most recent call last): File "", line 1, in RecursionError: maximum recursion depth exceeded during compilation >>> x = eval('+chr(33)'*1000000) Traceback (most recent call last): File "", line 1, in RecursionError: maximum recursion depth exceeded during compilation But compiling to AST still can crash. >>> import ast >>> x = ast.parse('+chr(33)'*1000000) Segmentation fault (core dumped) ---------- components: Interpreter Core messages: 311568 nosy: benjamin.peterson, brett.cannon, ncoghlan, serhiy.storchaka, yselivanov priority: normal severity: normal status: open title: Stack overflow when parse long expression to AST type: crash versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 13:27:42 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 03 Feb 2018 18:27:42 +0000 Subject: [issue32739] collections.deque rotate(n=1) default value not documented In-Reply-To: <1517463893.34.0.467229070634.issue32739@psf.upfronthosting.co.za> Message-ID: <1517682462.08.0.467229070634.issue32739@psf.upfronthosting.co.za> Raymond Hettinger added the comment: New changeset 7eb3d1e7da42112ba879a5f8602891fa17963f9e by Raymond Hettinger (Miss Islington (bot)) in branch '3.6': bpo-32739: Show default value for rotate() (GH-5485) (GH-5515) https://github.com/python/cpython/commit/7eb3d1e7da42112ba879a5f8602891fa17963f9e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 13:29:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 03 Feb 2018 18:29:48 +0000 Subject: [issue32758] Stack overflow when parse long expression to AST In-Reply-To: <1517682171.17.0.467229070634.issue32758@psf.upfronthosting.co.za> Message-ID: <1517682587.99.0.467229070634.issue32758@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There is also a regression in 3.7 when compile a long expression. In 3.6: >>> compile('+a'*1000000, '?', 'eval') Traceback (most recent call last): File "", line 1, in RecursionError: maximum recursion depth exceeded during compilation In 3.7: >>> compile('+a'*1000000, '?', 'eval') Segmentation fault (core dumped) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 15:23:42 2018 From: report at bugs.python.org (Zachary Ware) Date: Sat, 03 Feb 2018 20:23:42 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1517689422.85.0.467229070634.issue32604@psf.upfronthosting.co.za> Change by Zachary Ware : ---------- pull_requests: +5348 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 16:10:59 2018 From: report at bugs.python.org (pmpp) Date: Sat, 03 Feb 2018 21:10:59 +0000 Subject: [issue31356] Add context manager to temporarily disable GC In-Reply-To: <1504655244.01.0.877867263237.issue31356@psf.upfronthosting.co.za> Message-ID: <1517692259.04.0.467229070634.issue31356@psf.upfronthosting.co.za> Change by pmpp : ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 16:14:22 2018 From: report at bugs.python.org (OO O) Date: Sat, 03 Feb 2018 21:14:22 +0000 Subject: [issue32759] multiprocessing.Array do not release shared memory Message-ID: <1517692462.01.0.467229070634.issue32759@psf.upfronthosting.co.za> New submission from OO O : OS: Win10 / 8.1 Python: 3.5 / 3.6 My program use mp.Array to share huge data. But suffer from out of memory after running for a while. But Windows task manager didn't show which process use that huge memory. And I use pympler to check my python memory usage. Still shows noting. So, I use RamMap to check, it shows a huge shared memory is used. I can reproduce the case by the simple test code: #------------------------------------------------------- import numpy as np import multiprocessing as mp import gc def F (): a = mp.Array ( 'I', 1800000000, lock = False ) # F () gc.collect () #------------------------------------------------------- No matter how hard I tried. the memory is not released. I put what I tried in the attachment picture. ---------- components: Windows files: result.jpg messages: 311571 nosy: OO O, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: multiprocessing.Array do not release shared memory type: resource usage versions: Python 3.6 Added file: https://bugs.python.org/file47424/result.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 16:24:00 2018 From: report at bugs.python.org (JamesDinh) Date: Sat, 03 Feb 2018 21:24:00 +0000 Subject: [issue32760] [Python Shell command issue] Message-ID: <1517693040.31.0.467229070634.issue32760@psf.upfronthosting.co.za> New submission from JamesDinh : Hi Python dev. team, I would like to report below error: 1) Tittle: Running Linux shell command from python file always leads to reset config error. 2) Environment: + Linux distro: Both Ubuntu 16.04 64b and Fedora 25 happen this issue + Python: Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609] on linux2 3) Reproduce route: These commands can be run normally from Linux terminal: [I use buildroot for my embedded project] ./configure O=output project_name debug initramfs nofirewall make O=output But when I tried to call them from Python file, the configure command always lead to Restart config... - and all the new configuration values are discarded. For your information, I tried these options: a) spkConfigureCmd = ["./configure","O=output", "project_name","debug","initramfs","nofirewall"] subprocess.check_call(spkConfigureCmd) spkBuildCmd = ["make","O=output"] subprocess.check_call(spkBuildCmd) b) os.system("./configure O=output project_name debug initramfs nofirewall && make O=output") c) fid = open('ax2spkbuild.sh','w') fid.write('./configure O=output project_name debug initramfs nofirewall\n') fid.write('make O=output\n') fid.close() os.system('chmod +x ax2spkbuild.sh') os.system('./ax2spkbuild.sh') Actually I tried with another simple command like 'pwd', 'cat', 'echo' and they are working well. I wonder how come Python executes the Linux shell commands, which are slightly different to the Terminal typed commands. ---------- components: Build messages: 311572 nosy: JamesDinhBugPython priority: normal severity: normal status: open title: [Python Shell command issue] type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 16:30:50 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 03 Feb 2018 21:30:50 +0000 Subject: [issue32739] collections.deque rotate(n=1) default value not documented In-Reply-To: <1517463893.34.0.467229070634.issue32739@psf.upfronthosting.co.za> Message-ID: <1517693450.64.0.467229070634.issue32739@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- pull_requests: +5349 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 16:39:33 2018 From: report at bugs.python.org (OO O) Date: Sat, 03 Feb 2018 21:39:33 +0000 Subject: [issue32759] multiprocessing.Array do not release shared memory In-Reply-To: <1517692462.01.0.467229070634.issue32759@psf.upfronthosting.co.za> Message-ID: <1517693973.42.0.467229070634.issue32759@psf.upfronthosting.co.za> Change by OO O : ---------- versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 16:54:08 2018 From: report at bugs.python.org (OO O) Date: Sat, 03 Feb 2018 21:54:08 +0000 Subject: [issue32759] multiprocessing.Array do not release shared memory In-Reply-To: <1517692462.01.0.467229070634.issue32759@psf.upfronthosting.co.za> Message-ID: <1517694848.74.0.467229070634.issue32759@psf.upfronthosting.co.za> OO O added the comment: mp.heap.BufferWrapper._heap = mp.heap.Heap () gc.collect () This is working!! The memory is cleared. Just delete the globe _heap and recreate a new one, but is the the correct way??? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 16:57:04 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 03 Feb 2018 21:57:04 +0000 Subject: [issue32739] collections.deque rotate(n=1) default value not documented In-Reply-To: <1517463893.34.0.467229070634.issue32739@psf.upfronthosting.co.za> Message-ID: <1517695024.36.0.467229070634.issue32739@psf.upfronthosting.co.za> Raymond Hettinger added the comment: New changeset 42e8ea9f69c133a4bbb9e496f68a05926b99c2da by Raymond Hettinger in branch '2.7': bpo-32739: Show default value for rotate() (GH-5517) https://github.com/python/cpython/commit/42e8ea9f69c133a4bbb9e496f68a05926b99c2da ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 17:24:20 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 03 Feb 2018 22:24:20 +0000 Subject: [issue32761] IDLE Keymap for Cntl-A Message-ID: <1517696660.49.0.467229070634.issue32761@psf.upfronthosting.co.za> New submission from Raymond Hettinger : The default keymap for Cntl-A should be , the same as Cntl-KeyLeft. This is consistent with how Cntl-A behaves at the bash prompt and in Emacs. >>> print('Hello World') ^--- Cntl-A should take you here ^------- Cntl-A currently takes you here (which is never helpful). ---------- assignee: terry.reedy components: IDLE messages: 311575 nosy: rhettinger, terry.reedy priority: normal severity: normal status: open title: IDLE Keymap for Cntl-A _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 17:32:43 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 03 Feb 2018 22:32:43 +0000 Subject: [issue32739] collections.deque rotate(n=1) default value not documented In-Reply-To: <1517463893.34.0.467229070634.issue32739@psf.upfronthosting.co.za> Message-ID: <1517697163.12.0.467229070634.issue32739@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 18:32:41 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 03 Feb 2018 23:32:41 +0000 Subject: [issue32216] Document PEP 557 Data Classes (dataclasses module) In-Reply-To: <1512439511.23.0.213398074469.issue32216@psf.upfronthosting.co.za> Message-ID: <1517700761.34.0.467229070634.issue32216@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I'd be interested to help write the PR for this. I've already started on drafting these docs. Would you like to work together? ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 19:36:14 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 Feb 2018 00:36:14 +0000 Subject: [issue32746] More misspellings, mostly in source code. In-Reply-To: <1517550926.68.0.467229070634.issue32746@psf.upfronthosting.co.za> Message-ID: <1517704574.12.0.467229070634.issue32746@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset c3d9508ff22ece9a96892b628dd5813e2fb0cd80 by Terry Jan Reedy (Leo Arias) in branch 'master': bpo-32746: Fix multiple typos (GH-5144) https://github.com/python/cpython/commit/c3d9508ff22ece9a96892b628dd5813e2fb0cd80 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 19:37:21 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 04 Feb 2018 00:37:21 +0000 Subject: [issue32746] More misspellings, mostly in source code. In-Reply-To: <1517550926.68.0.467229070634.issue32746@psf.upfronthosting.co.za> Message-ID: <1517704641.75.0.467229070634.issue32746@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5350 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 20:27:04 2018 From: report at bugs.python.org (INADA Naoki) Date: Sun, 04 Feb 2018 01:27:04 +0000 Subject: [issue27923] PEP 467 -- Minor API improvements for binary sequences In-Reply-To: <1472691379.75.0.669592694643.issue27923@psf.upfronthosting.co.za> Message-ID: <1517707624.89.0.467229070634.issue27923@psf.upfronthosting.co.za> INADA Naoki added the comment: Hmm, can you read this instead? https://github.com/python/devguide/blob/master/communication.rst ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 20:38:24 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 Feb 2018 01:38:24 +0000 Subject: [issue32746] More misspellings, mostly in source code. In-Reply-To: <1517550926.68.0.467229070634.issue32746@psf.upfronthosting.co.za> Message-ID: <1517708304.78.0.467229070634.issue32746@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +5351 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 20:39:45 2018 From: report at bugs.python.org (Ma Lin) Date: Sun, 04 Feb 2018 01:39:45 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517708385.99.0.467229070634.issue32394@psf.upfronthosting.co.za> Change by Ma Lin : ---------- pull_requests: +5352 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 20:41:46 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 Feb 2018 01:41:46 +0000 Subject: [issue32746] More misspellings, mostly in source code. In-Reply-To: <1517550926.68.0.467229070634.issue32746@psf.upfronthosting.co.za> Message-ID: <1517708506.09.0.467229070634.issue32746@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset e86db34dd3b43dc9c9beb21a82cd2c3b7c4c05df by Terry Jan Reedy (Miss Islington (bot)) in branch '3.7': [3.7] bpo-32746: Fix multiple typos (GH-5144) (GH-5520) https://github.com/python/cpython/commit/e86db34dd3b43dc9c9beb21a82cd2c3b7c4c05df ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 20:50:35 2018 From: report at bugs.python.org (Ma Lin) Date: Sun, 04 Feb 2018 01:50:35 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517709035.65.0.467229070634.issue32394@psf.upfronthosting.co.za> Ma Lin added the comment: I create a new one (PR 5523), I'm not a C & socket expert, so if you want to improve/polish the patch, feel free to create a new PR based on (or not) it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 21:00:26 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 Feb 2018 02:00:26 +0000 Subject: [issue32746] More misspellings, mostly in source code. In-Reply-To: <1517550926.68.0.467229070634.issue32746@psf.upfronthosting.co.za> Message-ID: <1517709626.77.0.467229070634.issue32746@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset c90a5dec03fbef3a26479c800d5d6d15c44d5afb by Terry Jan Reedy in branch '3.6': [3.6] bpo-32746: Fix multiple typos (GH-5144) (GH-5522) https://github.com/python/cpython/commit/c90a5dec03fbef3a26479c800d5d6d15c44d5afb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 21:01:12 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 Feb 2018 02:01:12 +0000 Subject: [issue32746] More misspellings, mostly in source code. In-Reply-To: <1517550926.68.0.467229070634.issue32746@psf.upfronthosting.co.za> Message-ID: <1517709672.22.0.467229070634.issue32746@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 21:12:13 2018 From: report at bugs.python.org (bbayles) Date: Sun, 04 Feb 2018 02:12:13 +0000 Subject: [issue32695] tarfile.open() raises TypeError when using compresslevel parameter with LZMA In-Reply-To: <1517152925.99.0.467229070634.issue32695@psf.upfronthosting.co.za> Message-ID: <1517710333.02.0.467229070634.issue32695@psf.upfronthosting.co.za> bbayles added the comment: In working on a patch I convinced myself that a better change might just be to document that you can use the *preset* keyword for LZMA compression instead of *compresslevel*. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 22:25:34 2018 From: report at bugs.python.org (Christopher Barker) Date: Sun, 04 Feb 2018 03:25:34 +0000 Subject: [issue32216] Document PEP 557 Data Classes (dataclasses module) In-Reply-To: <1512439511.23.0.213398074469.issue32216@psf.upfronthosting.co.za> Message-ID: <1517714734.78.0.467229070634.issue32216@psf.upfronthosting.co.za> Christopher Barker added the comment: Thanks Raymond. Can a draft be put in a gitHub repo so we can all help out? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 22:36:58 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 04 Feb 2018 03:36:58 +0000 Subject: [issue32216] Document PEP 557 Data Classes (dataclasses module) In-Reply-To: <1512439511.23.0.213398074469.issue32216@psf.upfronthosting.co.za> Message-ID: <1517715418.37.0.467229070634.issue32216@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: > I've already started on drafting these docs. Would you like to work together? Sure, Raymond. Let me know how I can help :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 3 23:13:44 2018 From: report at bugs.python.org (shangdahao) Date: Sun, 04 Feb 2018 04:13:44 +0000 Subject: [issue32337] Dict order is now guaranteed, so add tests and doc for it In-Reply-To: <1514287514.34.0.213398074469.issue32337@psf.upfronthosting.co.za> Message-ID: <1517717624.53.0.467229070634.issue32337@psf.upfronthosting.co.za> shangdahao added the comment: Thanks zhang, I have updated it in the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 00:08:20 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 04 Feb 2018 05:08:20 +0000 Subject: [issue32337] Dict order is now guaranteed, so add tests and doc for it In-Reply-To: <1514287514.34.0.213398074469.issue32337@psf.upfronthosting.co.za> Message-ID: <1517720900.52.0.467229070634.issue32337@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 00:42:10 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 04 Feb 2018 05:42:10 +0000 Subject: [issue32720] Format mini-language integer definition is incorrect In-Reply-To: <1517287529.39.0.467229070634.issue32720@psf.upfronthosting.co.za> Message-ID: <1517722930.87.0.467229070634.issue32720@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 8b5fa289fdb04b6b919cf95fa99246aa872e47a8 by Mariatta (nathankerr96) in branch 'master': bpo-32720: Fixed the definition for width and precision in format mini-language doc (GH-5482) https://github.com/python/cpython/commit/8b5fa289fdb04b6b919cf95fa99246aa872e47a8 ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 00:43:17 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 04 Feb 2018 05:43:17 +0000 Subject: [issue32720] Format mini-language integer definition is incorrect In-Reply-To: <1517287529.39.0.467229070634.issue32720@psf.upfronthosting.co.za> Message-ID: <1517722997.17.0.467229070634.issue32720@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5353 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 00:44:16 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 04 Feb 2018 05:44:16 +0000 Subject: [issue32720] Format mini-language integer definition is incorrect In-Reply-To: <1517287529.39.0.467229070634.issue32720@psf.upfronthosting.co.za> Message-ID: <1517723056.86.0.467229070634.issue32720@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5354 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 01:03:23 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 04 Feb 2018 06:03:23 +0000 Subject: [issue32720] Format mini-language integer definition is incorrect In-Reply-To: <1517287529.39.0.467229070634.issue32720@psf.upfronthosting.co.za> Message-ID: <1517724203.89.0.467229070634.issue32720@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 133514e9dcea9c8cc9d9dd459b1a7fb502747d7e by Mariatta (Miss Islington (bot)) in branch '3.7': bpo-32720: Fixed the definition for width and precision in format mini-language doc (GH-5482) (GH-5524) https://github.com/python/cpython/commit/133514e9dcea9c8cc9d9dd459b1a7fb502747d7e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 01:21:47 2018 From: report at bugs.python.org (Steve Dower) Date: Sun, 04 Feb 2018 06:21:47 +0000 Subject: [issue32759] multiprocessing.Array do not release shared memory In-Reply-To: <1517692462.01.0.467229070634.issue32759@psf.upfronthosting.co.za> Message-ID: <1517725307.65.0.467229070634.issue32759@psf.upfronthosting.co.za> Change by Steve Dower : ---------- nosy: +davin, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 01:26:18 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 04 Feb 2018 06:26:18 +0000 Subject: [issue32720] Format mini-language integer definition is incorrect In-Reply-To: <1517287529.39.0.467229070634.issue32720@psf.upfronthosting.co.za> Message-ID: <1517725578.81.0.467229070634.issue32720@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 3bd749b2122c17b835dc438cdaef63bfdfd61344 by Mariatta (Miss Islington (bot)) in branch '3.6': bpo-32720: Fixed the definition for width and precision in format mini-language doc (GH-5482) (GH-5525) https://github.com/python/cpython/commit/3bd749b2122c17b835dc438cdaef63bfdfd61344 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 01:28:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Feb 2018 06:28:50 +0000 Subject: [issue32720] Format mini-language integer definition is incorrect In-Reply-To: <1517287529.39.0.467229070634.issue32720@psf.upfronthosting.co.za> Message-ID: <1517725730.78.0.467229070634.issue32720@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What about arg_name and element_index? >>> '{}'.format(123) '123' >>> '{0}'.format(123) '123' >>> '{0x0}'.format(123) Traceback (most recent call last): File "", line 1, in KeyError: '0x0' >>> '{0_0}'.format(123) Traceback (most recent call last): File "", line 1, in KeyError: '0_0' >>> '{0[0]}'.format([123]) '123' >>> '{0[0x0]}'.format([123]) Traceback (most recent call last): File "", line 1, in TypeError: list indices must be integers or slices, not str >>> '{0[0_0]}'.format([123]) Traceback (most recent call last): File "", line 1, in TypeError: list indices must be integers or slices, not str ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 01:36:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Feb 2018 06:36:09 +0000 Subject: [issue32739] collections.deque rotate(n=1) default value not documented In-Reply-To: <1517463893.34.0.467229070634.issue32739@psf.upfronthosting.co.za> Message-ID: <1517726169.82.0.467229070634.issue32739@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Isn't there a missed "not"? ---------- nosy: +serhiy.storchaka status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 03:06:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Feb 2018 08:06:17 +0000 Subject: [issue30977] reduce uuid.UUID() memory footprint In-Reply-To: <1500570928.48.0.991848922118.issue30977@psf.upfronthosting.co.za> Message-ID: <1517731577.09.0.467229070634.issue30977@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 03:07:18 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 04 Feb 2018 08:07:18 +0000 Subject: [issue32691] "pdb -m " sets __main__.__package__ incorrectly In-Reply-To: <1517115891.43.0.467229070634.issue32691@psf.upfronthosting.co.za> Message-ID: <1517731638.84.0.467229070634.issue32691@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset 1a0239e12e161609fdf68f13cedbabca9bf353f1 by Nick Coghlan (Miss Islington (bot)) in branch '3.7': [3.7] bpo-32691: Use mod_spec.parent when running modules with pdb (GH-5510) https://github.com/python/cpython/commit/1a0239e12e161609fdf68f13cedbabca9bf353f1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 03:40:20 2018 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Sun, 04 Feb 2018 08:40:20 +0000 Subject: [issue30256] Adding a SyncManager Queue proxy to a SyncManager dict or Namespace proxy raises an exception In-Reply-To: <1493812414.86.0.361870744934.issue30256@psf.upfronthosting.co.za> Message-ID: <1517733620.75.0.467229070634.issue30256@psf.upfronthosting.co.za> Hrvoje Nik?i? added the comment: I encountered this bug while testing the code in this StackOverflow answer: https://stackoverflow.com/a/48565011/1600898 The code at the end of the answer runs on Python 3.5, but fails on 3.6 with the "unexpected keyword argument 'manager_owned'" error. If someone knows of a workaround until the PR is accepted, it would be appreciated as well. ---------- nosy: +hniksic _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 03:53:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Feb 2018 08:53:53 +0000 Subject: [issue10544] yield expression inside generator expression does nothing In-Reply-To: <1290799279.15.0.89740732651.issue10544@psf.upfronthosting.co.za> Message-ID: <1517734433.57.0.467229070634.issue10544@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 07ca9afaa8768b44baf816b4998d209ed3e0088f by Serhiy Storchaka in branch 'master': bpo-10544: Disallow "yield" in comprehensions and generator expressions. (GH-4564) https://github.com/python/cpython/commit/07ca9afaa8768b44baf816b4998d209ed3e0088f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 05:16:59 2018 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Sun, 04 Feb 2018 10:16:59 +0000 Subject: [issue30256] Adding a SyncManager Queue proxy to a SyncManager dict or Namespace proxy raises an exception In-Reply-To: <1493812414.86.0.361870744934.issue30256@psf.upfronthosting.co.za> Message-ID: <1517739419.95.0.467229070634.issue30256@psf.upfronthosting.co.za> Hrvoje Nik?i? added the comment: The issue is also present in Python 3.7.0b1. ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 05:33:45 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 04 Feb 2018 10:33:45 +0000 Subject: [issue32072] Issues with binary plists In-Reply-To: <1511031976.48.0.213398074469.issue32072@psf.upfronthosting.co.za> Message-ID: <1517740425.3.0.467229070634.issue32072@psf.upfronthosting.co.za> Ronald Oussoren added the comment: @larry: plists are Apple's equivalent to Windows INI files ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 05:54:27 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 04 Feb 2018 10:54:27 +0000 Subject: [issue28099] Drop Mac OS X Tiger support in Python 3.6 In-Reply-To: <1473677501.77.0.96699360086.issue28099@psf.upfronthosting.co.za> Message-ID: <1517741667.61.0.467229070634.issue28099@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I agree, as long as there are other buildbots for macOS (and there appear to be buildbots for macOS 10.12 and 10.13). It would be nice to have buildbots running the OS releases for which installers are build (10.6 and 10.9), but that's a different issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 06:52:03 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 04 Feb 2018 11:52:03 +0000 Subject: [issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x In-Reply-To: <1516595654.84.0.467229070634.issue32616@psf.upfronthosting.co.za> Message-ID: <1517745123.33.0.467229070634.issue32616@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Is there anything we (the CPython developers) can do about this? If I read the issue correctly clang 5.x generates faster binaries than clang 3.x and 4.x. If that is indeed the issue there's probably not much we can do about this. BTW. I'm -1 on building the installer with anything but the compiler included in Xcode (and it would be nice to build with a recent version of Xcode to use an up-to-date compiler and SDK) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 06:55:23 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 04 Feb 2018 11:55:23 +0000 Subject: [issue32762] Choose protocol implementation on transport.set_protocol() Message-ID: <1517745323.72.0.467229070634.issue32762@psf.upfronthosting.co.za> New submission from Andrew Svetlov : New buffered transports was introduced in Python 3.7. Actual transport implementation (get_buffer() or data_received()) is determined in transport constructor. Protocol can be changed by `set_protocol()` method, the implementation should be reselected again. Both selector-based and proactor transports are affected. ---------- components: asyncio messages: 311598 nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Choose protocol implementation on transport.set_protocol() versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 07:53:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Feb 2018 12:53:57 +0000 Subject: [issue30688] support named Unicode escapes (\N{name}) in re In-Reply-To: <1497685136.94.0.225619820407.issue30688@psf.upfronthosting.co.za> Message-ID: <1517748837.17.0.467229070634.issue30688@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 09:13:49 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 04 Feb 2018 14:13:49 +0000 Subject: [issue32227] singledispatch support for type annotations In-Reply-To: <1512509052.55.0.213398074469.issue32227@psf.upfronthosting.co.za> Message-ID: <1517753629.05.0.467229070634.issue32227@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: > Do you think it should be added to the What's New? page for 3.7? I leave this up to ?ukasz. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 09:30:37 2018 From: report at bugs.python.org (Boss Kwei) Date: Sun, 04 Feb 2018 14:30:37 +0000 Subject: [issue32763] write() method in Transport should not buffer data Message-ID: <1517754637.18.0.467229070634.issue32763@psf.upfronthosting.co.za> New submission from Boss Kwei : write() method implemented in https://github.com/python/cpython/blob/master/Lib/asyncio/selector_events.py#L830 is not stable in somecases. If this method was called too quickly, separate data will be packed and sent in same tcp package, which may be considered as unexpected behavior. ---------- components: asyncio messages: 311600 nosy: Boss Kwei, asvetlov, yselivanov priority: normal severity: normal status: open title: write() method in Transport should not buffer data versions: Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 09:59:31 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 04 Feb 2018 14:59:31 +0000 Subject: [issue32763] write() method in Transport should not buffer data In-Reply-To: <1517754637.18.0.467229070634.issue32763@psf.upfronthosting.co.za> Message-ID: <1517756371.5.0.467229070634.issue32763@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Transport buffers writes if kernel buffer is full, the behavior is intentional and present starting from very beginning of asyncio development. Moreover, two plain socket.send() calls can be joined into single TCP packet, TCP protocol is a STREAM of data by design, not a sequence of packets. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 10:22:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Feb 2018 15:22:17 +0000 Subject: [issue31851] test_subprocess hangs randomly on Windows with Python 3.x In-Reply-To: <1508781289.15.0.213398074469.issue31851@psf.upfronthosting.co.za> Message-ID: <1517757737.02.0.467229070634.issue31851@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: When ran tests in 3.8 on Windows I got a number of dialpog windows with the following text: --------------------------- Microsoft Visual C++ Runtime Library --------------------------- Debug Assertion Failed! Program: C:\py\cpython3.8\PCBuild\win32\python_d.exe File: minkernel\crts\ucrt\src\appcrt\lowio\osfinfo.cpp Line: 258 Expression: _osfile(fh) & FOPEN For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts. (Press Retry to debug the application) And tests are hung. When ran tests in 3.7 on Windows I got multiple messages "minkernel\crts\ucrt\src\appcrt\lowio\write.cpp(49) : Assertion failed: (_osfile(fh) & FOPEN)" on output. This may be related. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 11:01:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Feb 2018 16:01:42 +0000 Subject: [issue32764] Popen doesn't work on Windows when args is a list Message-ID: <1517760102.46.0.467229070634.issue32764@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : test_subprocess is failing on Windows. C:\py\cpython3.7>./python -m test -uall -v -m test_nonexisting_with_pipes test_subprocess Running Debug|Win32 interpreter... == CPython 3.7.0b1+ (heads/3.7:1a0239e, Feb 4 2018, 16:19:37) [MSC v.1911 32 bit (Intel)] == Windows-10-10.0.16299-SP0 little-endian == cwd: C:\py\cpython3.7\build\test_python_11092 == CPU count: 2 == encodings: locale=cp1251, FS=utf-8 Run tests sequentially 0:00:00 [1/1] test_subprocess test_nonexisting_with_pipes (test.test_subprocess.ProcessTestCase) ... FAIL test_nonexisting_with_pipes (test.test_subprocess.ProcessTestCaseNoPoll) ... skipped 'Test needs selectors.PollSelector' ====================================================================== FAIL: test_nonexisting_with_pipes (test.test_subprocess.ProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\py\cpython3.7\lib\test\test_subprocess.py", line 1194, in test_nonexisting_with_pipes self.assertEqual(stderr, "") AssertionError: 'Traceback (most recent call last):\n Fil[923 chars]le\n' != '' Diff is 965 characters long. Set self.maxDiff to None to see it. ---------------------------------------------------------------------- Ran 2 tests in 0.171s FAILED (failures=1, skipped=1) test test_subprocess failed test_subprocess failed 1 test failed: test_subprocess Total duration: 391 ms Tests result: FAILURE Here stderr is: Traceback (most recent call last): File "C:\py\cpython3.7\lib\subprocess.py", line 1101, in _execute_child args = os.fsdecode(args) # os.PathLike -> str File "C:\py\cpython3.7\\lib\os.py", line 821, in fsdecode filename = fspath(filename) # Does type-checking of `filename`. TypeError: expected str, bytes or os.PathLike object, not list During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 16, in File "C:\py\cpython3.7\lib\subprocess.py", line 756, in __init__ restore_signals, start_new_session) File "C:\py\cpython3.7\lib\subprocess.py", line 1104, in _execute_child args[0] = os.fsdecode(args[0]) # os.PathLike -> str File "C:\py\cpython3.7\\lib\os.py", line 821, in fsdecode filename = fspath(filename) # Does type-checking of `filename`. TypeError: expected str, bytes or os.PathLike object, not tuple In _execute_child args is passed to os.fsdecode() unless it is a string. In this case args is a list. os.fsdecode() doesn't accept a list. The regression was introduced in issue31961. ---------- components: Library (Lib), Windows messages: 311603 nosy: Phaqui, gregory.p.smith, paul.moore, serhiy.storchaka, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: Popen doesn't work on Windows when args is a list type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 11:02:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Feb 2018 16:02:14 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1517760134.69.0.467229070634.issue31961@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This made tests failing on Windows. See issue32764. ---------- nosy: +serhiy.storchaka stage: commit review -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 11:06:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Feb 2018 16:06:25 +0000 Subject: [issue30693] tarfile add uses random order In-Reply-To: <1497751410.94.0.779622739852.issue30693@psf.upfronthosting.co.za> Message-ID: <1517760385.36.0.467229070634.issue30693@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Tests are failing on Windows. ====================================================================== ERROR: test_ordered_recursion (test.test_tarfile.Bz2WriteTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\py\cpython3.7\lib\unittest\mock.py", line 1191, in patched return func(*args, **keywargs) File "C:\py\cpython3.7\lib\test\test_tarfile.py", line 1152, in test_ordered_recursion support.unlink(os.path.join(path, "1")) File "C:\py\cpython3.7\lib\test\support\__init__.py", line 394, in unlink _unlink(filename) File "C:\py\cpython3.7\lib\test\support\__init__.py", line 344, in _unlink _waitfor(os.unlink, filename) File "C:\py\cpython3.7\lib\test\support\__init__.py", line 341, in _waitfor RuntimeWarning, stacklevel=4) RuntimeWarning: tests may fail, delete still pending for C:\py\cpython3.7\build\test_python_8504\@test_8504_tmp-tardir\directory\1 ====================================================================== ERROR: test_directory_size (test.test_tarfile.GzipWriteTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\py\cpython3.7\lib\test\test_tarfile.py", line 1121, in test_directory_size os.mkdir(path) FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\\py\\cpython3.7\\build\\test_python_8504\\@test_8504_tmp-tardir\\directory' ====================================================================== ERROR: test_ordered_recursion (test.test_tarfile.GzipWriteTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\py\cpython3.7\lib\unittest\mock.py", line 1191, in patched return func(*args, **keywargs) File "C:\py\cpython3.7\lib\test\test_tarfile.py", line 1137, in test_ordered_recursion os.mkdir(path) FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\\py\\cpython3.7\\build\\test_python_8504\\@test_8504_tmp-tardir\\directory' ====================================================================== ERROR: test_directory_size (test.test_tarfile.LzmaWriteTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\py\cpython3.7\lib\test\test_tarfile.py", line 1121, in test_directory_size os.mkdir(path) FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\\py\\cpython3.7\\build\\test_python_8504\\@test_8504_tmp-tardir\\directory' ====================================================================== ERROR: test_ordered_recursion (test.test_tarfile.LzmaWriteTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\py\cpython3.7\lib\unittest\mock.py", line 1191, in patched return func(*args, **keywargs) File "C:\py\cpython3.7\lib\test\test_tarfile.py", line 1137, in test_ordered_recursion os.mkdir(path) FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\\py\\cpython3.7\\build\\test_python_8504\\@test_8504_tmp-tardir\\directory' ====================================================================== ERROR: test_directory_size (test.test_tarfile.WriteTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\py\cpython3.7\lib\test\test_tarfile.py", line 1121, in test_directory_size os.mkdir(path) FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\\py\\cpython3.7\\build\\test_python_8504\\@test_8504_tmp-tardir\\directory' ====================================================================== ERROR: test_ordered_recursion (test.test_tarfile.WriteTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\py\cpython3.7\lib\unittest\mock.py", line 1191, in patched return func(*args, **keywargs) File "C:\py\cpython3.7\lib\test\test_tarfile.py", line 1137, in test_ordered_recursion os.mkdir(path) FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\\py\\cpython3.7\\build\\test_python_8504\\@test_8504_tmp-tardir\\directory' ---------------------------------------------------------------------- ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 11:07:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Feb 2018 16:07:24 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1517760444.55.0.467229070634.issue31961@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 11:17:22 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 04 Feb 2018 16:17:22 +0000 Subject: [issue32739] collections.deque rotate(n=1) default value not documented In-Reply-To: <1517463893.34.0.467229070634.issue32739@psf.upfronthosting.co.za> Message-ID: <1517761042.39.0.467229070634.issue32739@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- pull_requests: +5355 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 11:55:44 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 04 Feb 2018 16:55:44 +0000 Subject: [issue32765] IDLE: Update configdialog docstrings to reflect extension integration Message-ID: <1517763344.13.0.467229070634.issue32765@psf.upfronthosting.co.za> New submission from Cheryl Sabella : The layout of the general tab changed with #27099, but the docstrings weren't updated with the new widgets. ---------- assignee: terry.reedy components: IDLE messages: 311606 nosy: csabella, terry.reedy priority: normal severity: normal status: open title: IDLE: Update configdialog docstrings to reflect extension integration type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 11:56:45 2018 From: report at bugs.python.org (Anders Lorentsen) Date: Sun, 04 Feb 2018 16:56:45 +0000 Subject: [issue32764] Popen doesn't work on Windows when args is a list In-Reply-To: <1517760102.46.0.467229070634.issue32764@psf.upfronthosting.co.za> Message-ID: <1517763405.02.0.467229070634.issue32764@psf.upfronthosting.co.za> Anders Lorentsen added the comment: This is strange, because _execute_child calls os.fsdecode with `args` as the argument, which may be a list. os.fsdecode calls fspath. Now, the python docstring of _fspath, as defined in Lib/os.py on line 1031, clearly states that it will raise a TypeError if the argument is not of type bytes, str or is a os.PathLike object, and that's probably why I wrote the initial code the way I did (catching TypeError from os.fsdecode). Doesn't the try-except block actually catch this TypeError? I don't understand off the top of my head why my code doesn't catch this exception.. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 11:57:01 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 04 Feb 2018 16:57:01 +0000 Subject: [issue32765] IDLE: Update configdialog docstrings to reflect extension integration In-Reply-To: <1517763344.13.0.467229070634.issue32765@psf.upfronthosting.co.za> Message-ID: <1517763421.11.0.467229070634.issue32765@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +5356 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 12:03:33 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 04 Feb 2018 17:03:33 +0000 Subject: [issue30569] Tutorial section 2.1 has *nix example at 3.7, but Windows at 3.6 In-Reply-To: <1496609553.39.0.613003310721.issue30569@psf.upfronthosting.co.za> Message-ID: <1517763813.34.0.467229070634.issue30569@psf.upfronthosting.co.za> Cheryl Sabella added the comment: This is still an issue. Since it's more than updating the release version, I think someone more knowledgeable than me should fix it. I wouldn't want to miss something that should be included. ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 12:11:12 2018 From: report at bugs.python.org (Anders Lorentsen) Date: Sun, 04 Feb 2018 17:11:12 +0000 Subject: [issue32764] Popen doesn't work on Windows when args is a list In-Reply-To: <1517760102.46.0.467229070634.issue32764@psf.upfronthosting.co.za> Message-ID: <1517764272.07.0.467229070634.issue32764@psf.upfronthosting.co.za> Anders Lorentsen added the comment: Also, isn't there continuous integration testing? Everything passed on the PR, so where does this come from? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 12:15:28 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 04 Feb 2018 17:15:28 +0000 Subject: [issue32761] IDLE Keymap for Cntl-A In-Reply-To: <1517696660.49.0.467229070634.issue32761@psf.upfronthosting.co.za> Message-ID: <1517764528.89.0.467229070634.issue32761@psf.upfronthosting.co.za> Cheryl Sabella added the comment: That's interesting. I've always thought of Control+A to be 'select all'. https://en.wikipedia.org/wiki/Table_of_keyboard_shortcuts Do you think a new keybinding theme should be added for bash/emacs? I don't know how well emacs would work without allowing combinations like Control+X, Control-F. ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 12:16:23 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 04 Feb 2018 17:16:23 +0000 Subject: [issue32739] collections.deque rotate(n=1) default value not documented In-Reply-To: <1517463893.34.0.467229070634.issue32739@psf.upfronthosting.co.za> Message-ID: <1517764583.42.0.467229070634.issue32739@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5357 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 12:17:05 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 04 Feb 2018 17:17:05 +0000 Subject: [issue32739] collections.deque rotate(n=1) default value not documented In-Reply-To: <1517463893.34.0.467229070634.issue32739@psf.upfronthosting.co.za> Message-ID: <1517764625.4.0.467229070634.issue32739@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5358 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 12:25:30 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 04 Feb 2018 17:25:30 +0000 Subject: [issue32739] collections.deque rotate(n=1) default value not documented In-Reply-To: <1517463893.34.0.467229070634.issue32739@psf.upfronthosting.co.za> Message-ID: <1517765130.55.0.467229070634.issue32739@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- pull_requests: +5359 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 12:45:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 04 Feb 2018 17:45:07 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1517766307.73.0.467229070634.issue31961@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Actually this feature looks wrong to me. The args argument is either a sequence containing a program name and arguments, or a command line string. In the first case supporting path-like objects makes sense, and this was supported. But the command line is not a path-like object. It is a concatenation of quoted program name and arguments. Neither operation for path-like objects makes sense for a command line. I think this change should be reverted. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 12:57:24 2018 From: report at bugs.python.org (John Hossbach) Date: Sun, 04 Feb 2018 17:57:24 +0000 Subject: [issue32766] 4.7.7. Function Annotations Message-ID: <1517767044.74.0.467229070634.issue32766@psf.upfronthosting.co.za> New submission from John Hossbach : https://docs.python.org/3.5/tutorial/controlflow.html#function-annotations The end of the first paragraph states, "The following example has a positional argument, a keyword argument, and the return value annotated:" However, the only function call is f('spam') which has a single positional argument. I believe the author was referencing the output of print("Annotations:", f.__annotations__) which was: Annotations: {'ham': , 'return': , 'eggs': } and then confused that with 4.7.2. Keyword Arguments (https://docs.python.org/3.5/tutorial/controlflow.html#keyword-arguments) where it points out that keyword arguments follow positional arguments. However, the difference between identifying a positional argument vs keyword argument is done at the function CALL, not the function DEFINITION since any argument can be both positional or keyword, depending on how it is referenced. Moreover, the last sentence in 4.7.2. Keyword Arguments, points out that the order of unsorted sequences is undefined, which would then explain why 'return' appears in the middle here instead of at the end. ---------- assignee: docs at python components: Documentation messages: 311612 nosy: John Hossbach, docs at python priority: normal severity: normal status: open title: 4.7.7. Function Annotations versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 13:34:12 2018 From: report at bugs.python.org (Anders Lorentsen) Date: Sun, 04 Feb 2018 18:34:12 +0000 Subject: [issue32764] Popen doesn't work on Windows when args is a list In-Reply-To: <1517760102.46.0.467229070634.issue32764@psf.upfronthosting.co.za> Message-ID: <1517769252.38.0.467229070634.issue32764@psf.upfronthosting.co.za> Anders Lorentsen added the comment: Wait a minute. The failing test is test_nonexisting_with_pipes, and it fails because args[0] is a tuple - how can that be? Nobody is supposed to pass cmd=sequence-where-first-element-is-a-tuple! Is everything all right with the test itself? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 13:58:49 2018 From: report at bugs.python.org (Larry Hastings) Date: Sun, 04 Feb 2018 18:58:49 +0000 Subject: [issue32620] [3.5] Travis CI fails on Python 3.5 with "pyenv: version `3.5' not installed" In-Reply-To: <1516618613.48.0.467229070634.issue32620@psf.upfronthosting.co.za> Message-ID: <1517770729.3.0.467229070634.issue32620@psf.upfronthosting.co.za> Change by Larry Hastings : ---------- pull_requests: +5360 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 14:27:00 2018 From: report at bugs.python.org (Tim Peters) Date: Sun, 04 Feb 2018 19:27:00 +0000 Subject: [issue32767] Mutating a list while iterating: clarify the docs Message-ID: <1517772420.88.0.467229070634.issue32767@psf.upfronthosting.co.za> New submission from Tim Peters : This has come up repeatedly, and the docs should be updated to resolve it: https://stackoverflow.com/questions/48603998/python-iterating-over-a-list-but-i-want-to-add-to-that-list-while-in-the-loop/48604036#48604036 Seemingly the only relevant documentation is in the reference manual, but it's flawed: https://docs.python.org/3.7/reference/compound_stmts.html#the-for-statement - The behavior it's describing is specific to list iterators, but it pretends to apply to "mutable sequences" in general (which may or may not mimic list iterators in relevant respects). - It's not clear that the "length of the sequence" (list!) is evaluated anew on each iteration (not, e.g., captured once at the start of the `for` loop). - While it describes things that can go wrong, it doesn't describe the common useful case: appending to a list during iteration (for example, in a breadth-first search). ---------- assignee: docs at python components: Documentation messages: 311614 nosy: docs at python, tim.peters priority: normal severity: normal stage: needs patch status: open title: Mutating a list while iterating: clarify the docs type: enhancement versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 14:40:19 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 04 Feb 2018 19:40:19 +0000 Subject: [issue32753] ssl.SSLError exceptions in test_poplib In-Reply-To: <1517612876.52.0.467229070634.issue32753@psf.upfronthosting.co.za> Message-ID: <1517773219.75.0.467229070634.issue32753@psf.upfronthosting.co.za> Christian Heimes added the comment: It's a duplicate of #32706. The new cert validation code causes the handshake to terminate properly. The old asyncore based test routine is not able to handle this correctly when the machine is under heavy load. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test_check_hostname() of test_ftplib started to fail randomly _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 14:37:10 2018 From: report at bugs.python.org (Larry Hastings) Date: Sun, 04 Feb 2018 19:37:10 +0000 Subject: [issue32620] [3.5] Travis CI fails on Python 3.5 with "pyenv: version `3.5' not installed" In-Reply-To: <1516618613.48.0.467229070634.issue32620@psf.upfronthosting.co.za> Message-ID: <1517773030.46.0.467229070634.issue32620@psf.upfronthosting.co.za> Larry Hastings added the comment: New changeset 71b94e30b1d63c789908482b3b808cc613e57267 by larryhastings in branch '3.4': [3.4] [3.5] bpo-32620: Remove failing pyenv call from CI config (GH-5274) (#5533) https://github.com/python/cpython/commit/71b94e30b1d63c789908482b3b808cc613e57267 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 14:44:24 2018 From: report at bugs.python.org (Larry Hastings) Date: Sun, 04 Feb 2018 19:44:24 +0000 Subject: [issue32620] [3.5] Travis CI fails on Python 3.5 with "pyenv: version `3.5' not installed" In-Reply-To: <1516618613.48.0.467229070634.issue32620@psf.upfronthosting.co.za> Message-ID: <1517773464.24.0.467229070634.issue32620@psf.upfronthosting.co.za> Larry Hastings added the comment: I wanted it in 3.4 too, it was breaking CI. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 14:47:52 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 04 Feb 2018 19:47:52 +0000 Subject: [issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken In-Reply-To: <1496250931.44.0.236459920081.issue30528@psf.upfronthosting.co.za> Message-ID: <1517773672.81.0.467229070634.issue30528@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- nosy: +pmoody _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 14:39:12 2018 From: report at bugs.python.org (bbayles) Date: Sun, 04 Feb 2018 19:39:12 +0000 Subject: [issue32728] Extend zipfile's compression level support to LZMA In-Reply-To: <1517330840.6.0.467229070634.issue32728@psf.upfronthosting.co.za> Message-ID: <1517773152.29.0.467229070634.issue32728@psf.upfronthosting.co.za> Change by bbayles : ---------- keywords: +patch pull_requests: +5361 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 14:38:54 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 04 Feb 2018 19:38:54 +0000 Subject: [issue32706] test_check_hostname() of test_ftplib started to fail randomly In-Reply-To: <1517225256.94.0.467229070634.issue32706@psf.upfronthosting.co.za> Message-ID: <1517773134.01.0.467229070634.issue32706@psf.upfronthosting.co.za> Christian Heimes added the comment: poplib is also affected, see #32753 ---------- priority: normal -> high stage: patch review -> needs patch type: -> behavior versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 15:24:35 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 04 Feb 2018 20:24:35 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517775875.51.0.467229070634.issue32394@psf.upfronthosting.co.za> Andrew Svetlov added the comment: We don't remove unsupported socket flags on Unix, why should we do it for Windows? ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 15:28:35 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 04 Feb 2018 20:28:35 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517776115.87.0.467229070634.issue32394@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Socket constants a compile time values, obviously concrete operation system might not support a flag -- but we do nothing with it in runtime. All flags available on compile time are exposed, it's true for modules like socket, os, select etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 16:52:39 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Sun, 04 Feb 2018 21:52:39 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517781159.98.0.467229070634.issue32394@psf.upfronthosting.co.za> Nathaniel Smith added the comment: The other option would be to always hide the new constant on Windows in 3.6, and make it unconditionally available on 3.7. ---------- nosy: +njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 17:05:13 2018 From: report at bugs.python.org (VA) Date: Sun, 04 Feb 2018 22:05:13 +0000 Subject: [issue32768] object.__new__ does not accept arguments if __bases__ is changed Message-ID: <1517781912.98.0.467229070634.issue32768@psf.upfronthosting.co.za> New submission from VA : object.__new__ takes only the class argument, but it still accepts extra arguments if a class doesn't override __new__, and rejects them otherwise. (This is because __new__ will receive the same arguments as __init__ but __new__ shouldn't need to be overridden just to remove args) However, if a class has a custom __new__ at one point (in a parent class), and at a later point __bases__ is changed, object.__new__ will still reject arguments, although __new__ may not be overridden anymore at that point. See attached file. I can't check with all Python 3 versions, but the same code works fine in Python 2. ---------- files: bases.py messages: 311622 nosy: VA priority: normal severity: normal status: open title: object.__new__ does not accept arguments if __bases__ is changed type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file47425/bases.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 17:27:06 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 04 Feb 2018 22:27:06 +0000 Subject: [issue32739] collections.deque rotate(n=1) default value not documented In-Reply-To: <1517463893.34.0.467229070634.issue32739@psf.upfronthosting.co.za> Message-ID: <1517783226.76.0.467229070634.issue32739@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 18:05:06 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 04 Feb 2018 23:05:06 +0000 Subject: [issue31529] IDLE: Add docstrings and tests for editor.py reload functions In-Reply-To: <1505912780.79.0.243335137038.issue31529@psf.upfronthosting.co.za> Message-ID: <1517785506.91.0.467229070634.issue31529@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Hi Terry, Could you put this one on your radar for review? Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 18:11:25 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 Feb 2018 23:11:25 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1517785885.9.0.467229070634.issue30928@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Add 1 new entry to all 3 versions. There will likely be merge conflicts to be resolved because the lower context is not the same, but this should establish a uniform lower context for the immediate future. ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 18:13:13 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 04 Feb 2018 23:13:13 +0000 Subject: [issue32769] Add 'annotations' to the glossary Message-ID: <1517785993.54.0.467229070634.issue32769@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- assignee: docs at python components: Documentation keywords: easy nosy: csabella, docs at python priority: normal severity: normal status: open title: Add 'annotations' to the glossary type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 18:15:23 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 Feb 2018 23:15:23 +0000 Subject: [issue32765] IDLE: Update configdialog docstrings to reflect extension integration In-Reply-To: <1517763344.13.0.467229070634.issue32765@psf.upfronthosting.co.za> Message-ID: <1517786123.77.0.467229070634.issue32765@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 845d86485e35a26478aedb3dc127d632fdc65759 by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-32765: Update configdialog General tab create page docstring (GH-5529) https://github.com/python/cpython/commit/845d86485e35a26478aedb3dc127d632fdc65759 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 18:16:37 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 04 Feb 2018 23:16:37 +0000 Subject: [issue32765] IDLE: Update configdialog docstrings to reflect extension integration In-Reply-To: <1517763344.13.0.467229070634.issue32765@psf.upfronthosting.co.za> Message-ID: <1517786197.93.0.467229070634.issue32765@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5362 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 18:17:30 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 04 Feb 2018 23:17:30 +0000 Subject: [issue32765] IDLE: Update configdialog docstrings to reflect extension integration In-Reply-To: <1517763344.13.0.467229070634.issue32765@psf.upfronthosting.co.za> Message-ID: <1517786250.63.0.467229070634.issue32765@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5363 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 18:28:00 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 Feb 2018 23:28:00 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1517786880.62.0.467229070634.issue30928@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Correction: entries currently go under "What's New in IDLE 3.7.0" for both master and 3.7 branches. Each "What's New in IDLE 3.x.0" is "since 3.(x-1).0 was released. (We used to not branch off x+1 until the first x.0rc1, instead of at x.0b1, so the overlap was much less.) I will edit to make that explicit. So only 3.6 should have conflicts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 18:38:08 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 Feb 2018 23:38:08 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1517787488.68.0.467229070634.issue30928@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +5364 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 18:39:25 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 Feb 2018 23:39:25 +0000 Subject: [issue32765] IDLE: Update configdialog docstrings to reflect extension integration In-Reply-To: <1517763344.13.0.467229070634.issue32765@psf.upfronthosting.co.za> Message-ID: <1517787565.08.0.467229070634.issue32765@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 5b933aa8ec8b1c04488c26b3d61b813e237f55d9 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.7': bpo-32765: Update configdialog General tab create page docstring (GH-5529) (GH-5537) https://github.com/python/cpython/commit/5b933aa8ec8b1c04488c26b3d61b813e237f55d9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 19:05:25 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 05 Feb 2018 00:05:25 +0000 Subject: [issue32765] IDLE: Update configdialog docstrings to reflect extension integration In-Reply-To: <1517763344.13.0.467229070634.issue32765@psf.upfronthosting.co.za> Message-ID: <1517789125.59.0.467229070634.issue32765@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 1c2b138671656abf8563a0cd7ef27c8c2e0be4e6 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.6': bpo-32765: Update configdialog General tab create page docstring (GH-5529) (GH-5538) https://github.com/python/cpython/commit/1c2b138671656abf8563a0cd7ef27c8c2e0be4e6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 19:06:15 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 05 Feb 2018 00:06:15 +0000 Subject: [issue32765] IDLE: Update configdialog docstrings to reflect extension integration In-Reply-To: <1517763344.13.0.467229070634.issue32765@psf.upfronthosting.co.za> Message-ID: <1517789175.22.0.467229070634.issue32765@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 19:06:41 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 05 Feb 2018 00:06:41 +0000 Subject: [issue32765] IDLE: Update configdialog docstrings to reflect extension integration In-Reply-To: <1517763344.13.0.467229070634.issue32765@psf.upfronthosting.co.za> Message-ID: <1517789201.47.0.467229070634.issue32765@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thanks for catching this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 19:34:34 2018 From: report at bugs.python.org (Anthony Flury) Date: Mon, 05 Feb 2018 00:34:34 +0000 Subject: [issue32770] collections.counter examples are misleading Message-ID: <1517790874.74.0.467229070634.issue32770@psf.upfronthosting.co.za> New submission from Anthony Flury : The first example given for collections.Counter is misleading - the documentation ideally should show the 'best' (one and only one) way to do something and the example is this : >>> # Tally occurrences of words in a list >>> cnt = Counter() >>> for word in ['red', 'blue', 'red', 'green', 'blue', 'blue']: ... cnt[word] += 1 >>> cnt Counter({'blue': 3, 'red': 2, 'green': 1}) clearly this could simply be : >>> # Tally occurrences of words in a list >>> cnt = Counter(['red', 'blue', 'red', 'green', 'blue', 'blue']) >>> cnt Counter({'blue': 3, 'red': 2, 'green': 1}) (i.e. the iteration through the array is unneeded in this example). The 2nd example is better in showing the 'entry-level' use of the Counter class. There possibly does need to be a simple example of when you might manually increment the Counter class - but I don't think that the examples given illustrate that in a useful way; and I personally haven't come across a use-case for manually incrementing the Counter class entires that couldn't be accomplished with a comprehension or generator expression passed directly to the Counter constructor. ---------- assignee: docs at python components: Documentation messages: 311630 nosy: anthony-flury, docs at python priority: normal severity: normal status: open title: collections.counter examples are misleading versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 20:18:19 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 05 Feb 2018 01:18:19 +0000 Subject: [issue5594] IDLE startup configuration In-Reply-To: <1238311210.52.0.532490988344.issue5594@psf.upfronthosting.co.za> Message-ID: <1517793499.55.0.467229070634.issue5594@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +patch, patch pull_requests: +5366, 5367 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 20:18:41 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 05 Feb 2018 01:18:41 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1517793521.07.0.467229070634.issue30928@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 4abcbc0f0de8dc3c245950e118cd9d374dbfe42b by Terry Jan Reedy (Miss Islington (bot)) in branch '3.7': bpo-30928: IDLE - update NEWS.txt. (GH-5539) (GH-5540) https://github.com/python/cpython/commit/4abcbc0f0de8dc3c245950e118cd9d374dbfe42b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 20:18:57 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 05 Feb 2018 01:18:57 +0000 Subject: [issue5594] IDLE startup configuration In-Reply-To: <1238311210.52.0.532490988344.issue5594@psf.upfronthosting.co.za> Message-ID: <1517793537.73.0.467229070634.issue5594@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- dependencies: +IDLE: Add docstrings and tests for editor.py reload functions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 20:22:20 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 05 Feb 2018 01:22:20 +0000 Subject: [issue5594] IDLE startup configuration In-Reply-To: <1238311210.52.0.532490988344.issue5594@psf.upfronthosting.co.za> Message-ID: <1517793740.85.0.467229070634.issue5594@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I created a pull request for this ticket. I did not include any of the other issues/tickets for using the command line information on restart or any of the issues with running certain code. I also added template code to be used in a new editor window. It made the Startup tab look nicer. :-) ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 20:18:14 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 05 Feb 2018 01:18:14 +0000 Subject: [issue5594] IDLE startup configuration In-Reply-To: <1238311210.52.0.532490988344.issue5594@psf.upfronthosting.co.za> Message-ID: <1517793494.36.0.467229070634.issue5594@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +5366 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 20:16:40 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 05 Feb 2018 01:16:40 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1517793400.44.0.467229070634.issue30928@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5365 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 21:03:25 2018 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 05 Feb 2018 02:03:25 +0000 Subject: [issue8722] Documentation for __getattr__ In-Reply-To: <1273896658.97.0.575873001655.issue8722@psf.upfronthosting.co.za> Message-ID: <1517796205.61.0.467229070634.issue8722@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset d1f318105b8781b01f3507d5cb0fd841b977d5f2 by Nick Coghlan (Cheryl Sabella) in branch 'master': bpo-8722: Document __getattr__ behavior with AttributeError in property (GH-4754) https://github.com/python/cpython/commit/d1f318105b8781b01f3507d5cb0fd841b977d5f2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 21:19:59 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 05 Feb 2018 02:19:59 +0000 Subject: [issue32771] merge the underlying data stores of unicodedata and the str type Message-ID: <1517797199.65.0.467229070634.issue32771@psf.upfronthosting.co.za> New submission from Benjamin Peterson : Both Objects/unicodeobject.c and Modules/unicodedatamodule.c rely on large generated databases (Objects/unicodetype_db.h, Modules/unicodename_db.h, Modules/unicodedata_db.h). This separation made sense in Python 2 where Unicode was less of an important part of the language than Python3-recall Python 2's configure script has --without-unicode!. However, in Python 3, Unicode is a core language concept and literally baked into the syntax of the language. I therefore propose moving all of unicodedata's tables and algorithms into the interpreter core proper and converting Modules/unicodedata.c into a facade. This will remove awkward maneuvers like ast.c importing unicodedata in order to perform normalization. Having unicodedata readily accessible to the str type would also permit higher a fidelity unicode implementation. For example, implementing language-tailored str.lower() requires having canonical combining class of a character available. This data lives only in unicodedata currently. ---------- components: Unicode messages: 311634 nosy: benjamin.peterson, ezio.melotti, vstinner priority: normal severity: normal stage: needs patch status: open title: merge the underlying data stores of unicodedata and the str type type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 21:35:03 2018 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 05 Feb 2018 02:35:03 +0000 Subject: [issue31356] Add context manager to temporarily disable GC In-Reply-To: <1504655244.01.0.877867263237.issue31356@psf.upfronthosting.co.za> Message-ID: <1517798103.16.0.467229070634.issue31356@psf.upfronthosting.co.za> Nick Coghlan added the comment: If I recall the discussion correctly, it was: 1. That this was worth doing precisely because the naive approach is likely to be broken in the presence of multiple threads; 2. It was only worth doing either as a true global disable that accounted for multi-threading (e.g. backed by a counted semaphore or the functional equivalent), or else by making gc enable/disable status have a thread local toggle in addition to the global one (so the context manager can ensure "GC is off *in this thread*, regardless of the global status"). Either of those two options requires changes to the main GC machinery though, as otherwise you basically *can't* write a correct context manager for this use case, since a direct call to gc.enable() in another thread would always be problematic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 21:38:14 2018 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 05 Feb 2018 02:38:14 +0000 Subject: [issue32720] Format mini-language integer definition is incorrect In-Reply-To: <1517287529.39.0.467229070634.issue32720@psf.upfronthosting.co.za> Message-ID: <1517798294.03.0.467229070634.issue32720@psf.upfronthosting.co.za> Nick Coghlan added the comment: I didn't think to check those - it looks like they have the same problem with the same fix (i.e. the actual syntax is "digit+"). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 21:39:08 2018 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 05 Feb 2018 02:39:08 +0000 Subject: [issue32691] "pdb -m " sets __main__.__package__ incorrectly In-Reply-To: <1517115891.43.0.467229070634.issue32691@psf.upfronthosting.co.za> Message-ID: <1517798348.89.0.467229070634.issue32691@psf.upfronthosting.co.za> Change by Nick Coghlan : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 21:41:28 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 05 Feb 2018 02:41:28 +0000 Subject: [issue8722] Documentation for __getattr__ In-Reply-To: <1273896658.97.0.575873001655.issue8722@psf.upfronthosting.co.za> Message-ID: <1517798488.41.0.467229070634.issue8722@psf.upfronthosting.co.za> Change by miss-islington : ---------- keywords: +patch pull_requests: +5368 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 21:42:30 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 05 Feb 2018 02:42:30 +0000 Subject: [issue8722] Documentation for __getattr__ In-Reply-To: <1273896658.97.0.575873001655.issue8722@psf.upfronthosting.co.za> Message-ID: <1517798550.32.0.467229070634.issue8722@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5369 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 22:10:03 2018 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 05 Feb 2018 03:10:03 +0000 Subject: [issue8722] Documentation for __getattr__ In-Reply-To: <1273896658.97.0.575873001655.issue8722@psf.upfronthosting.co.za> Message-ID: <1517800203.15.0.467229070634.issue8722@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset a8c25d1c7f0d395861cc3e10dd01989150891c95 by Nick Coghlan (Miss Islington (bot)) in branch '3.6': [3.6] bpo-8722: Document __getattr__ behavior with AttributeError in property (GH-5542) https://github.com/python/cpython/commit/a8c25d1c7f0d395861cc3e10dd01989150891c95 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 22:11:46 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 05 Feb 2018 03:11:46 +0000 Subject: [issue32720] Format mini-language integer definition is incorrect In-Reply-To: <1517287529.39.0.467229070634.issue32720@psf.upfronthosting.co.za> Message-ID: <1517800306.86.0.467229070634.issue32720@psf.upfronthosting.co.za> Change by Mariatta Wijaya : ---------- pull_requests: +5370 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 22:16:51 2018 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 05 Feb 2018 03:16:51 +0000 Subject: [issue8722] Documentation for __getattr__ In-Reply-To: <1273896658.97.0.575873001655.issue8722@psf.upfronthosting.co.za> Message-ID: <1517800611.73.0.467229070634.issue8722@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset fea0a12f6bee4a36b2c9533003e33a12c58d2d91 by Nick Coghlan (Miss Islington (bot)) in branch '3.7': [3.7] bpo-8722: Document __getattr__ behavior with AttributeError in property (GH-5543) https://github.com/python/cpython/commit/fea0a12f6bee4a36b2c9533003e33a12c58d2d91 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 22:21:21 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 05 Feb 2018 03:21:21 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1517800881.09.0.467229070634.issue31961@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Don't revert something just because you found a bug, we can fix it. fwiw, the PR passed appveyor's Windows run: https://ci.appveyor.com/project/python/cpython/build/3.7build11551 So if there's a bug, we're missing some kind of test coverage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 22:27:03 2018 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 05 Feb 2018 03:27:03 +0000 Subject: [issue8722] Documentation for __getattr__ In-Reply-To: <1273896658.97.0.575873001655.issue8722@psf.upfronthosting.co.za> Message-ID: <1517801223.95.0.467229070634.issue8722@psf.upfronthosting.co.za> Nick Coghlan added the comment: Thanks for the patch Cheryl, and for the reviews Terry! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 22:47:21 2018 From: report at bugs.python.org (Ma Lin) Date: Mon, 05 Feb 2018 03:47:21 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517802441.94.0.467229070634.issue32394@psf.upfronthosting.co.za> Ma Lin added the comment: > We don't remove unsupported socket flags on Unix, why should we do it for Windows? We have this problem because: compile with new Windows SDK, but run on old version Windows. On Linux/Unix, the compile-time headers always consist with the system, so there should not has this problem. Correct me if I'm wrong. > The other option would be to always hide the new constant on Windows in 3.6, and make it unconditionally available on 3.7. Search on GitHub [1], most people only check whether `socket` has such flags, like this: if hasattr(socket, "TCP_KEEPCNT"): ... Most of they don't check platform or Python version, so I'm -1 on this option. ----------------- TCP_KEEPIDLE and TCP_KEEPINTVL were added in Windows 10 1709. [2] The master branch on AppVeyor is using 10.0.16229 (1709) SDK. [3] While 3.6 branch is using 10.0.15062 (1703) SDK. [4] If you agree the way of PR 5523, maybe we should remove these two flags as well. [1] https://github.com/search?l=Python&p=1&q=TCP_KEEPCNT&type=Code&utf8=%E2%9C%93 [2] https://msdn.microsoft.com/en-us/library/windows/desktop/ms738596.aspx [3] https://github.com/isuruf/cpython/blob/master/PCbuild/python.props#L78 [4] https://github.com/isuruf/cpython/blob/3.6/PCbuild/python.props#L77 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 23:11:33 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 05 Feb 2018 04:11:33 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517803893.9.0.467229070634.issue32394@psf.upfronthosting.co.za> INADA Naoki added the comment: > On Linux/Unix, the compile-time headers always consist with the system, so there should not has this problem. > Correct me if I'm wrong. No. Compile-time and run-time system is not always consist. Kernel version may be upgraded / downgraded after Python is built. And header version may not be consistent with kernel version. There are some cases that system may return error for unsupported setsockopt() on Linux. So I think websocket-client should catch OSError for setsockopt. But if there are many broken libraries in the world, it's considerable that hide it on Python side. Kamil said "This behavior breaks many libraries that i use." But I saw only websocket-client. How many other libraries? ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 23:36:16 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 05 Feb 2018 04:36:16 +0000 Subject: [issue32770] collections.counter examples are misleading In-Reply-To: <1517790874.74.0.467229070634.issue32770@psf.upfronthosting.co.za> Message-ID: <1517805376.67.0.467229070634.issue32770@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks for the suggestion. I respectfully disagree. The "core" functionality of Counter is the ability to write c['x'] += 1 without risking a KeyError. The add-on capability is to process an entire iterable all at once. This is analogous to the list() builtin- where the core ability is to write s.append(e) and there is a convenience of calling list(iterable). Another reason the first example goes first because it is simple. It shows counting in isolation with no other distractions (an in-vitro example). The second example is in a more complex environment incorporating file access and regular expressions (an in-vivo example). FWIW, there are plenty of examples of using the += style. Here's one I use in my Python courses: 'Scan a log file from a NASA server' import collections, re, pprint visited = collections.Counter() with open('notes/nasa_19950801.log') as f: for line in f: mo = re.search(r'GET\s+(\S+)\s+200', line) if mo is not None: url = mo.group(1) visited[url] += 1 pprint.pprint(visited.most_common(20)) I've had good luck with people understanding the docs as-is, so I'm going to decline the suggestion. I do appreciate you taking the time to share your thoughts. ---------- assignee: docs at python -> rhettinger nosy: +rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 23:43:29 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 05 Feb 2018 04:43:29 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517805809.67.0.467229070634.issue32394@psf.upfronthosting.co.za> INADA Naoki added the comment: It seems Linux has TCP_KEEPCNT from very old ages and just checking it's existence was OK for many years. So I'm +0.5 on this Python-side fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 4 23:37:11 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 05 Feb 2018 04:37:11 +0000 Subject: [issue20632] Define a new __key__ protocol In-Reply-To: <1392423475.26.0.500398402328.issue20632@psf.upfronthosting.co.za> Message-ID: <1517805431.3.0.467229070634.issue20632@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 01:11:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Feb 2018 06:11:45 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1517811105.96.0.467229070634.issue31961@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The bug itself can be easily fixed. But I think this PR shouldn't be merged at first place. Not all functions should accept path-like objects for arbitrary arguments. Only if the argument semantically is a path, a path-like object should be accepted. Several similar propositions already were rejected for this reason. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 01:25:19 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 05 Feb 2018 06:25:19 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1517811919.41.0.467229070634.issue30928@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +5371 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 01:29:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Feb 2018 06:29:02 +0000 Subject: [issue31356] Add context manager to temporarily disable GC In-Reply-To: <1504655244.01.0.877867263237.issue31356@psf.upfronthosting.co.za> Message-ID: <1517812142.38.0.467229070634.issue31356@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: 1. The used approach was broken in the presence of multiple threads too. It didn't guarantee even that GC will be disabled in the next line. 2. What is a sense of disabling GC in a single thread? Objects in Python are not thread local, they are accessible from all threads, and collecting garbage in one thread affects other threads. For truly disabling GC globally you need to use a counted semaphore or other synchronization primitives, and this can be implemented at Python level. But what are use cases for this context manager? Isn't naive approach enough? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 03:05:16 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 05 Feb 2018 08:05:16 +0000 Subject: [issue31930] IDLE: Pressing "Home" on Windows places cursor before ">>>" In-Reply-To: <1509660581.35.0.213398074469.issue31930@psf.upfronthosting.co.za> Message-ID: <1517817916.92.0.467229070634.issue31930@psf.upfronthosting.co.za> Terry J. Reedy added the comment: On #32761, Raymond reports that is ^A ('Home' for him) is bound to <>, he sees the same behavior. So this is not Windows only. Any change to EditorWindow.home_callback must be tested on all 3 major systems before merging. I hope to fix this and other Shell issues by separating prompt and code entry, in a proposal-in-progress, but home_callback would still need editing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 03:06:06 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 05 Feb 2018 08:06:06 +0000 Subject: [issue32761] Create IDLE Modern Mac keyset In-Reply-To: <1517696660.49.0.467229070634.issue32761@psf.upfronthosting.co.za> Message-ID: <1517817966.75.0.467229070634.issue32761@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Mac key bindings and Shell home method behavior are separate and long-standing issues. They were discussed together in #18444, and this could be considered a duplicate thereof. However, the two issues need to be discussed and solved separately. 1. The bindings of and <> on Macs. The more general issue is IDLE key bindings on MacOSX. Here are the beginning-of-line and select-all bindings in the various keysets. >From idlelib/config-keys.def [IDLE Classic Windows] beginning-of-line= select-all= [IDLE Classic Unix] beginning-of-line= select-all= [IDLE Modern Unix] # default on *nix, design by Serhiy Storchaka beginning-of-line = select-all = [IDLE Classic Mac] # so obsolete that it almost should be removed? beginning-of-line= select-all= [IDLE Classic OSX] beginning-of-line = select-all = I am guessing that Raymond is using a Mac and a customized version of IDLE Classic OSX with Control-Key-A added as either *a* or *the* binding of the <, in Shell. Jumping to the physical start of line was fixed, at least on *nix and Windows, in #3851. I remember verifying this. Yet now, on Win 10, the old behavior is back. So, this is not only a Mac issue and this part is a duplicate of #31930. The underlying issue is the mixing of a read-only prompt and the first line of a possibly multiline read-write Python statement in the Shell text widget. This also leads to the indent problem and a couple of other minor issues. In retrospect, I consider this mixing a design mistake and I am working on a suggestion about fixing it. ---------- nosy: +ned.deily title: IDLE Keymap for Cntl-A -> Create IDLE Modern Mac keyset _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 03:14:17 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 05 Feb 2018 08:14:17 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1517818457.61.0.467229070634.issue30928@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 7bd5a75bbe28219d3fc18a239c2c554d1850abcb by Terry Jan Reedy in branch '3.6': bpo-30928: IDLE - update NEWS.txt [GH-5539] (GH-5545) https://github.com/python/cpython/commit/7bd5a75bbe28219d3fc18a239c2c554d1850abcb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 03:19:42 2018 From: report at bugs.python.org (JamesDinh) Date: Mon, 05 Feb 2018 08:19:42 +0000 Subject: [issue32760] [Python Shell command issue] In-Reply-To: <1517693040.31.0.467229070634.issue32760@psf.upfronthosting.co.za> Message-ID: <1517818782.64.0.467229070634.issue32760@psf.upfronthosting.co.za> JamesDinh added the comment: Hi, >From this stackoverflow thread: https://stackoverflow.com/questions/716011/why-cant-environmental-variables-set-in-python-persist I find out there is an abnormal environment variable setting affects by using shell command. Do you have some explanation for the shell command runs? For your information, if I run below commands: os.system("export MYENVPATH=/opt/toolchain/gcc") os.system("./configure O=output project_name debug initramfs nofirewall && make O=output") Then the configure command can't detect the MYENVPATH value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 03:21:30 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 05 Feb 2018 08:21:30 +0000 Subject: [issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x In-Reply-To: <1516595654.84.0.467229070634.issue32616@psf.upfronthosting.co.za> Message-ID: <1517818890.06.0.467229070634.issue32616@psf.upfronthosting.co.za> INADA Naoki added the comment: It seems clang4 failed to efficient register assigning. FYI, --without-computed-gotos configure option make penalty smaller. clang 5 (wihtout CGs): 2.653426 clang 5 (with CGs): 1.997584 clang 4 (without CGs): 3.330879 clang 4 (with CGs): 8.585673 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 03:23:55 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 05 Feb 2018 08:23:55 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517819035.88.0.467229070634.issue32394@psf.upfronthosting.co.za> Andrew Svetlov added the comment: What's about other OS/flags? Should we commit that every exposed socket flag is supported in runtime? It looks like very heavy burden. Or the issue is specific for TCP_KEEPCNT for Windows only? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 03:27:36 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 05 Feb 2018 08:27:36 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517819256.37.0.467229070634.issue32394@psf.upfronthosting.co.za> INADA Naoki added the comment: > What's about other OS/flags? > Should we commit that every exposed socket flag is supported in runtime? It looks like very heavy burden. I agree with you. It almost impossible. > Or the issue is specific for TCP_KEEPCNT for Windows only? As far as my understanding, Yes. This issue is only for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 03:46:55 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Mon, 05 Feb 2018 08:46:55 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517820415.32.0.467229070634.issue32394@psf.upfronthosting.co.za> Nathaniel Smith added the comment: I definitely don't think we should get into the game of trying to guess which flags are supported at runtime and only exposing those. It's not as simple as keeping a table of OS versions -- which would be hard enough to get right -- but on Linux you can have things like vendor backports of features to old versions, or a new kernel that happens to have had a particular feature configured out of it. (For example, AFAIK some major cloud providers still use kernels that have had IPv6 support removed entirely.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 04:13:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Feb 2018 09:13:42 +0000 Subject: [issue32771] merge the underlying data stores of unicodedata and the str type In-Reply-To: <1517797199.65.0.467229070634.issue32771@psf.upfronthosting.co.za> Message-ID: <1517822022.0.0.467229070634.issue32771@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: +1. And perhaps a new C API for direct access to the Unicode DB should be provided. ---------- components: +Interpreter Core nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 04:25:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Feb 2018 09:25:32 +0000 Subject: [issue32768] object.__new__ does not accept arguments if __bases__ is changed In-Reply-To: <1517781912.98.0.467229070634.issue32768@psf.upfronthosting.co.za> Message-ID: <1517822732.45.0.467229070634.issue32768@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The problem is that class C(B): pass C.__bases__ = (A,) and class C(A): pass are not fully equivalent. In the first case type->tp_new != object_new. ---------- components: +Interpreter Core nosy: +ncoghlan, serhiy.storchaka versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 04:29:10 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 05 Feb 2018 09:29:10 +0000 Subject: [issue32720] Format mini-language integer definition is incorrect In-Reply-To: <1517287529.39.0.467229070634.issue32720@psf.upfronthosting.co.za> Message-ID: <1517822950.28.0.467229070634.issue32720@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 7a561afd2c79f63a6008843b83733911d07f0119 by Mariatta in branch 'master': bpo-32720: Fixed the replacement field grammar documentation. (GH-5544) https://github.com/python/cpython/commit/7a561afd2c79f63a6008843b83733911d07f0119 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 04:30:18 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 05 Feb 2018 09:30:18 +0000 Subject: [issue32720] Format mini-language integer definition is incorrect In-Reply-To: <1517287529.39.0.467229070634.issue32720@psf.upfronthosting.co.za> Message-ID: <1517823018.95.0.467229070634.issue32720@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5372 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 04:31:11 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 05 Feb 2018 09:31:11 +0000 Subject: [issue32720] Format mini-language integer definition is incorrect In-Reply-To: <1517287529.39.0.467229070634.issue32720@psf.upfronthosting.co.za> Message-ID: <1517823071.87.0.467229070634.issue32720@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5373 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 04:46:17 2018 From: report at bugs.python.org (Ma Lin) Date: Mon, 05 Feb 2018 09:46:17 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517823977.74.0.467229070634.issue32394@psf.upfronthosting.co.za> Ma Lin added the comment: > Or the issue is specific for TCP_KEEPCNT for Windows only? Four flags involved. In this table, result column is search results from GitHub. keyword available result TCP_FASTOPEN win10 1607+ 778 TCP_KEEPCNT win10 1703+ 3356 TCP_KEEPIDLE win10 1709+ 4820 TCP_KEEPINTVL win10 1709+ 3410 3.6 branch is using 1703 SDK, 3.7/3.8 branches are using 1709 SDK. This discussion is beyond my knowledge, I keep watch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 05:46:52 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 05 Feb 2018 10:46:52 +0000 Subject: [issue9216] FIPS support for hashlib In-Reply-To: <1278721335.16.0.522410247151.issue9216@psf.upfronthosting.co.za> Message-ID: <1517827612.97.0.467229070634.issue9216@psf.upfronthosting.co.za> Change by Charalampos Stratakis : ---------- pull_requests: +5374 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 05:59:38 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 05 Feb 2018 10:59:38 +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: <1517828378.65.0.467229070634.issue30698@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 06:07:49 2018 From: report at bugs.python.org (Narendra L) Date: Mon, 05 Feb 2018 11:07:49 +0000 Subject: [issue32772] lstrip not working when string has =e in it Message-ID: <1517828869.78.0.467229070634.issue32772@psf.upfronthosting.co.za> New submission from Narendra L : Lstrip not working as expected when the string has "=e" in it. Python 2.7.11 (default, Jan 22 2016, 08:28:37) >>> test = "Cookie: test-Debug=edttrace=expires=1517828996" >>> test.lstrip('Cookie: test-Debug=') 'dttrace=expires=1517828996' ---------- components: Library (Lib) messages: 311659 nosy: Narendra L priority: normal severity: normal status: open title: lstrip not working when string has =e in it 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 Feb 5 06:13:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Feb 2018 11:13:48 +0000 Subject: [issue32772] lstrip not working when string has =e in it In-Reply-To: <1517828869.78.0.467229070634.issue32772@psf.upfronthosting.co.za> Message-ID: <1517829228.33.0.467229070634.issue32772@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It works as documented. Removes characters specified by the argument from the string. In your example the argument contains "e", but doesn't contain "d". Therefore starting characters up to "d" have been removed. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 06:17:25 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 05 Feb 2018 11:17:25 +0000 Subject: [issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x In-Reply-To: <1516595654.84.0.467229070634.issue32616@psf.upfronthosting.co.za> Message-ID: <1517829445.67.0.467229070634.issue32616@psf.upfronthosting.co.za> INADA Naoki added the comment: This is assembly code for FAST_DISPATCH() https://paste.ubuntu.com/26523948/ It seems there are many redundant spills. But I don't know how to remove them. Are their clang expert? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 06:19:09 2018 From: report at bugs.python.org (Narendra L) Date: Mon, 05 Feb 2018 11:19:09 +0000 Subject: [issue32772] lstrip not working when string has =e in it In-Reply-To: <1517828869.78.0.467229070634.issue32772@psf.upfronthosting.co.za> Message-ID: <1517829549.54.0.467229070634.issue32772@psf.upfronthosting.co.za> Narendra L added the comment: If you see output dttrace.... e is missing see working example >>> test = "Cookie: test-Debug=edttrace=expires=1517828996" >>> test.lstrip('Cookie: test-Debug=') 'dttrace=expires=1517828996' # e missing here >>> test = "Cookie: test-Debug=adttrace=expires=1517828996" >>> test.lstrip('Cookie: test-Debug=') 'adttrace=expires=1517828996' # Works correct here ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 06:24:06 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 05 Feb 2018 11:24:06 +0000 Subject: [issue32772] lstrip not working when string has =e in it In-Reply-To: <1517828869.78.0.467229070634.issue32772@psf.upfronthosting.co.za> Message-ID: <1517829846.69.0.467229070634.issue32772@psf.upfronthosting.co.za> Christian Heimes added the comment: Please read the documentation again. lstrip doesn't work like you assume: >>> "cbaabcdef".lstrip("abc") 'def' ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 07:11:42 2018 From: report at bugs.python.org (Michael Felt) Date: Mon, 05 Feb 2018 12:11:42 +0000 Subject: [issue27643] test_ctypes fails on AIX with xlc In-Reply-To: <1469718089.88.0.404760174195.issue27643@psf.upfronthosting.co.za> Message-ID: <1517832702.45.0.467229070634.issue27643@psf.upfronthosting.co.za> Change by Michael Felt : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 07:12:16 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 05 Feb 2018 12:12:16 +0000 Subject: [issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28) In-Reply-To: <1516789649.91.0.467229070634.issue32647@psf.upfronthosting.co.za> Message-ID: <1517832736.11.0.467229070634.issue32647@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: So what would be the best way to proceed from here? Add a check or just link to dl unconditionally? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 07:33:28 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 05 Feb 2018 12:33:28 +0000 Subject: [issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28) In-Reply-To: <1516789649.91.0.467229070634.issue32647@psf.upfronthosting.co.za> Message-ID: <1517834008.01.0.467229070634.issue32647@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +5375 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 07:33:55 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 05 Feb 2018 12:33:55 +0000 Subject: [issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28) In-Reply-To: <1516789649.91.0.467229070634.issue32647@psf.upfronthosting.co.za> Message-ID: <1517834035.44.0.467229070634.issue32647@psf.upfronthosting.co.za> Christian Heimes added the comment: configure.ac already contains the check: AC_CHECK_LIB(dl, dlopen) It should be enough to add: if sysconfig.get_config_var('HAVE_LIBDL'): libs.append('dl') to ctypes. ---------- type: -> compile error versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 08:11:56 2018 From: report at bugs.python.org (Anthony Flury) Date: Mon, 05 Feb 2018 13:11:56 +0000 Subject: [issue32770] collections.counter examples are misleading In-Reply-To: <1517790874.74.0.467229070634.issue32770@psf.upfronthosting.co.za> Message-ID: <1517836316.25.0.467229070634.issue32770@psf.upfronthosting.co.za> Anthony Flury added the comment: Raymond, I completely understand your comment but I do disagree. My view would be that the documentation of the stdlib should document the entry level use cases. The first example given uses nothing special from the Counter class - you could implement exactly the same with a defaultdict(int) - the only difference would be that output will read defaultdict(,{'blue': 3, 'red': 2, 'green': 1}). I think the examples in the documentation should at least demonstrate something important on the class being documented - and the first example doesn't. I am very tempted to re-open - but I wont - no benefit in bouncing the status as we discuss this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 08:51:21 2018 From: report at bugs.python.org (Julien Palard) Date: Mon, 05 Feb 2018 13:51:21 +0000 Subject: [issue32613] Use PEP 397 py launcher in windows faq In-Reply-To: <1516572429.98.0.467229070634.issue32613@psf.upfronthosting.co.za> Message-ID: <1517838681.23.0.467229070634.issue32613@psf.upfronthosting.co.za> Change by Julien Palard : ---------- keywords: +patch pull_requests: +5376 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 09:00:06 2018 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 05 Feb 2018 14:00:06 +0000 Subject: [issue32768] object.__new__ does not accept arguments if __bases__ is changed In-Reply-To: <1517781912.98.0.467229070634.issue32768@psf.upfronthosting.co.za> Message-ID: <1517839206.29.0.467229070634.issue32768@psf.upfronthosting.co.za> Nick Coghlan added the comment: I've added Guido to the thread, as my initial reaction is to propose deprecating writable __bases__ rather than trying to support it properly. However, if we do decide to fix it, then the potential path to resolution I would suggest is: 1. Factor out all of the slot derivation code from its current location into a separate helper function 2. Adjust the descriptor for __bases__ to rerun all of that code when the bases are changed That still wouldn't be guaranteed to work entirely reliably (since there are some actions taken in the first initialisation that make it hard for us to tell whether a method came from the class definition or was added implicitly by the class machinery, and any class decorators wouldn't be executed again, and we wouldn't be running __init_subclass__ for any of the new base classes either). ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 09:33:43 2018 From: report at bugs.python.org (Tim Graham) Date: Mon, 05 Feb 2018 14:33:43 +0000 Subject: [issue25988] collections.abc.Indexable In-Reply-To: <1451686739.56.0.219134772531.issue25988@psf.upfronthosting.co.za> Message-ID: <1517841223.88.0.467229070634.issue25988@psf.upfronthosting.co.za> Tim Graham added the comment: The last commit that added the deprecation warning needs to be added to the 3.7 branch. ---------- nosy: +Tim.Graham _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 09:34:43 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 05 Feb 2018 14:34:43 +0000 Subject: [issue32613] Use PEP 397 py launcher in windows faq In-Reply-To: <1516572429.98.0.467229070634.issue32613@psf.upfronthosting.co.za> Message-ID: <1517841283.55.0.467229070634.issue32613@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Just for my info, what's the origin of 'py' ? and why does 'py' exists? ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 09:37:36 2018 From: report at bugs.python.org (Julien Palard) Date: Mon, 05 Feb 2018 14:37:36 +0000 Subject: [issue32613] Use PEP 397 py launcher in windows faq In-Reply-To: <1516572429.98.0.467229070634.issue32613@psf.upfronthosting.co.za> Message-ID: <1517841456.83.0.467229070634.issue32613@psf.upfronthosting.co.za> Julien Palard added the comment: The py command come from PEP 397, its rational will be more verbose than me [1], but in a nutshell it's a wrapper trying to find the right python according to some heuristics like the shebang. [1]: https://www.python.org/dev/peps/pep-0397/#rationale ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 10:28:22 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 05 Feb 2018 15:28:22 +0000 Subject: [issue30339] test_multiprocessing_main_handling: "RuntimeError: Timed out waiting for results" on x86 Windows7 3.x In-Reply-To: <1494463699.01.0.364437710045.issue30339@psf.upfronthosting.co.za> Message-ID: <1517844502.49.0.467229070634.issue30339@psf.upfronthosting.co.za> St?phane Wirtel added the comment: TLDR; but there is a new status for the associated PR https://github.com/python/cpython/pull/1978 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 11:00:36 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 05 Feb 2018 16:00:36 +0000 Subject: [issue32760] [Python Shell command issue] In-Reply-To: <1517693040.31.0.467229070634.issue32760@psf.upfronthosting.co.za> Message-ID: <1517846436.12.0.467229070634.issue32760@psf.upfronthosting.co.za> St?phane Wirtel added the comment: It's normal, when you execute a command, there is a fork/exec, fork for the new process, and the exec will replace the memory of the previous process by the new process. in os.system, you use ('export MYENVPATH=/usr/bin/gcc') but this variable only exists for the $SHELL process, once this one is finished, the variable is just destroyed. You have to pass all the env variables when you call your process, read the doc of subprocess.Popen, there is a env variable, you have to pass the value to this parameter https://docs.python.org/2.7/library/subprocess.html?highlight=subprocess#subprocess.Popen ---------- nosy: +matrixise stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 11:01:16 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Mon, 05 Feb 2018 16:01:16 +0000 Subject: [issue32773] distutils should NOT preserve timestamps Message-ID: <1517846476.27.0.467229070634.issue32773@psf.upfronthosting.co.za> New submission from Jeroen Demeyer : When a Python project is installed, distutils copies the files from the build to install directory using copy_file(). In this copy operation, timestamps are preserved. In other words, the timestamp of the installed file equals the timestamp of the source file. By contrast, autotools does not preserve timestamps: the timestamp of the installed files equals the time of installation. This makes more sense because of dependency checking: if you reinstall a package, you typically want to rebuild everything depending on that package. This issue is mostly relevant for installing .h files: most build systems (including distutils itself) provide a way to recompile C/C++ source files if they depend on a changed header file. But that only works if the timestamp of the header is updated when it is installed. Note that ./command/build_py.py contains a comment # XXX copy_file by default preserves atime and mtime. IMHO this is # the right thing to do, but perhaps it should be an option -- in # particular, a site administrator might want installed files to # reflect the time of installation rather than the last # modification time before the installed release. but without justification. ---------- components: Distutils messages: 311673 nosy: dstufft, eric.araujo, erik.bray, jdemeyer priority: normal severity: normal status: open title: distutils should NOT preserve timestamps 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 Feb 5 11:12:03 2018 From: report at bugs.python.org (R. David Murray) Date: Mon, 05 Feb 2018 16:12:03 +0000 Subject: [issue32768] object.__new__ does not accept arguments if __bases__ is changed In-Reply-To: <1517781912.98.0.467229070634.issue32768@psf.upfronthosting.co.za> Message-ID: <1517847123.96.0.467229070634.issue32768@psf.upfronthosting.co.za> Change by R. David Murray : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 11:35:56 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 05 Feb 2018 16:35:56 +0000 Subject: [issue32774] distutils: cyclic reference in the documentation Message-ID: <1517848556.04.0.467229070634.issue32774@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- assignee: docs at python components: Documentation nosy: docs at python, matrixise priority: normal severity: normal status: open title: distutils: cyclic reference in the documentation versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 11:38:23 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 05 Feb 2018 16:38:23 +0000 Subject: [issue32774] distutils: cyclic reference in the documentation Message-ID: <1517848703.32.0.467229070634.issue32774@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- keywords: +patch pull_requests: +5377 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 11:39:31 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 05 Feb 2018 16:39:31 +0000 Subject: [issue32774] distutils: cyclic reference in the documentation Message-ID: <1517848771.32.0.467229070634.issue32774@psf.upfronthosting.co.za> New submission from St?phane Wirtel : in the documentation of the distutils module, there is a cyclic references, just remove them because I think it's useless. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 11:43:14 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 05 Feb 2018 16:43:14 +0000 Subject: [issue32773] distutils should NOT preserve timestamps In-Reply-To: <1517846476.27.0.467229070634.issue32773@psf.upfronthosting.co.za> Message-ID: <1517848994.4.0.467229070634.issue32773@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 11:53:48 2018 From: report at bugs.python.org (Michael Felt) Date: Mon, 05 Feb 2018 16:53:48 +0000 Subject: [issue27643] test_ctypes fails on AIX with xlc In-Reply-To: <1469718089.88.0.404760174195.issue27643@psf.upfronthosting.co.za> Message-ID: <1517849628.7.0.467229070634.issue27643@psf.upfronthosting.co.za> Change by Michael Felt : ---------- pull_requests: +5378 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 11:56:50 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 05 Feb 2018 16:56:50 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1517849810.69.0.467229070634.issue31961@psf.upfronthosting.co.za> Gregory P. Smith added the comment: got any pointers to those? I want to familiarize myself with existing arguments for/against such a feature in subprocess to decide. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 12:07:12 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 05 Feb 2018 17:07:12 +0000 Subject: [issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28) In-Reply-To: <1516789649.91.0.467229070634.issue32647@psf.upfronthosting.co.za> Message-ID: <1517850432.07.0.467229070634.issue32647@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I use Fedora 27, Please, could you give the instructions for your build, I could test locally and check if the patch fixes the issue. Thank you ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 12:09:42 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 05 Feb 2018 17:09:42 +0000 Subject: [issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28) In-Reply-To: <1516789649.91.0.467229070634.issue32647@psf.upfronthosting.co.za> Message-ID: <1517850582.63.0.467229070634.issue32647@psf.upfronthosting.co.za> Christian Heimes added the comment: St?phane, the issue is only reproducible with latest Fedora rawhide. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 12:32:53 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 05 Feb 2018 17:32:53 +0000 Subject: [issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28) In-Reply-To: <1516789649.91.0.467229070634.issue32647@psf.upfronthosting.co.za> Message-ID: <1517851973.54.0.467229070634.issue32647@psf.upfronthosting.co.za> St?phane Wirtel added the comment: maybe I miss something but I have downloaded the last fedora:rawhide with docker, just update it via dnf update and install all the dependencies for git and python docker --rm -it fedora:rawhide /bin/bash dnf update dnf install git-core dnf builddep python3 git clone --depth=1 https://github.com/python/cpython cd cpython ./configure && make and I have no issue with ctypes. What are your instructions for the build? Thank you ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 12:44:24 2018 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 05 Feb 2018 17:44:24 +0000 Subject: [issue32768] object.__new__ does not accept arguments if __bases__ is changed In-Reply-To: <1517781912.98.0.467229070634.issue32768@psf.upfronthosting.co.za> Message-ID: <1517852664.11.0.467229070634.issue32768@psf.upfronthosting.co.za> Guido van Rossum added the comment: Yeah, I think the use case for assigning to __bases__ has not been shown. I believe we've seen other situations where the initial list of base classes is used in some computation that affects how the class works, so I doubt it has ever been sound. Though maybe the OP ("VA") has a real use case where they discovered this? Then it would be nice to know about it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 13:12:51 2018 From: report at bugs.python.org (R. David Murray) Date: Mon, 05 Feb 2018 18:12:51 +0000 Subject: [issue32774] distutils: cyclic reference in the documentation In-Reply-To: <1517848771.32.0.467229070634.issue32774@psf.upfronthosting.co.za> Message-ID: <1517854371.52.0.467229070634.issue32774@psf.upfronthosting.co.za> R. David Murray added the comment: This is a common pattern in our documentation. It is done because ":mod:`xxx`" means that xxx should be formatted as a module name, rather than anything else. While it is true that the formatting for most such references is currently the same, it could be different in principle, and is for a few. It is in some ways unfortunate that it also always results in a link, so you will indeed find a number of places where the prefix is omitted, mostly commonly when the same entity is referenced several times in the same paragraph. So, it is not completely clear cut, but I would recommend rejecting this and leaving the docs as is. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 13:36:28 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 05 Feb 2018 18:36:28 +0000 Subject: [issue31215] Add version changed notes for OpenSSL 1.1.0 compatibility In-Reply-To: <1502860659.7.0.930691554308.issue31215@psf.upfronthosting.co.za> Message-ID: <1517855788.83.0.467229070634.issue31215@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +easy versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 14:04:46 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 05 Feb 2018 19:04:46 +0000 Subject: [issue32774] distutils: cyclic reference in the documentation In-Reply-To: <1517848771.32.0.467229070634.issue32774@psf.upfronthosting.co.za> Message-ID: <1517857486.55.0.467229070634.issue32774@psf.upfronthosting.co.za> St?phane Wirtel added the comment: ok, it's fine for me, I close this issue ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 14:23:15 2018 From: report at bugs.python.org (Tim Graham) Date: Mon, 05 Feb 2018 19:23:15 +0000 Subject: [issue30349] Preparation for advanced set syntax in regular expressions In-Reply-To: <1494576853.44.0.660813121244.issue30349@psf.upfronthosting.co.za> Message-ID: <1517858595.48.0.467229070634.issue30349@psf.upfronthosting.co.za> Tim Graham added the comment: It might be worth adding part of the problematic regex to the warning message. For Django's tests, I see an error like "FutureWarning: Possible nested set at position 17 return re.compile(res).match". It took some effort to track down the source. A partial traceback is: File "/home/tim/code/django/django/core/management/commands/loaddata.py", line 247, in find_fixtures for candidate in glob.iglob(glob.escape(path) + '*'): File "/home/tim/code/cpython/Lib/glob.py", line 72, in _iglob for name in glob_in_dir(dirname, basename, dironly): File "/home/tim/code/cpython/Lib/glob.py", line 83, in _glob1 return fnmatch.filter(names, pattern) File "/home/tim/code/cpython/Lib/fnmatch.py", line 52, in filter match = _compile_pattern(pat) File "/home/tim/code/cpython/Lib/fnmatch.py", line 46, in _compile_pattern return re.compile(res).match File "/home/tim/code/cpython/Lib/re.py", line 240, in compile return _compile(pattern, flags) File "/home/tim/code/cpython/Lib/re.py", line 292, in _compile p = sre_compile.compile(pattern, flags) File "/home/tim/code/cpython/Lib/sre_compile.py", line 764, in compile p = sre_parse.parse(p, flags) File "/home/tim/code/cpython/Lib/sre_parse.py", line 930, in parse p = _parse_sub(source, pattern, flags & SRE_FLAG_VERBOSE, 0) File "/home/tim/code/cpython/Lib/sre_parse.py", line 426, in _parse_sub not nested and not items)) File "/home/tim/code/cpython/Lib/sre_parse.py", line 816, in _parse p = _parse_sub(source, state, sub_verbose, nested + 1) File "/home/tim/code/cpython/Lib/sre_parse.py", line 426, in _parse_sub not nested and not items)) File "/home/tim/code/cpython/Lib/sre_parse.py", line 524, in _parse FutureWarning, stacklevel=nested + 6 FutureWarning: Possible nested set at position 17 As an aside, I'm not sure how to fix the warning in Django. It comes from the test added in https://github.com/django/django/commit/98df288ddaba9787e4a370f12aba51c2b9133142 where a path like 'tests/fixtures/fixtures/fixture_with[special]chars' is run through glob.escape() which creates 'tests/fixtures/fixtures/fixture_with[[]special]chars'. ---------- nosy: +Tim.Graham _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 14:36:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Feb 2018 19:36:51 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1517859411.64.0.467229070634.issue31961@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't remember all details, here is what I have found. Issue28230 and issue28231 -- the support of path-like object was added only for external names (paths of archives, paths of added files, paths for extraction), but not for internal names. Issue29447 -- the initial idea was rejected, and it seems to me that the tempfile module doesn't need any changes. Path-like objects already are accepted for the dir argument, but they shouldn't be accepted for arguments like pre or suf which are not paths. Issue29448 is only tangentially related. It's rejection is based on issue29447. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 14:43:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Feb 2018 19:43:06 +0000 Subject: [issue30349] Preparation for advanced set syntax in regular expressions In-Reply-To: <1494576853.44.0.660813121244.issue30349@psf.upfronthosting.co.za> Message-ID: <1517859786.75.0.467229070634.issue30349@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Good catch! fnmatch.translate() can produce a pattern which emits a warning when compiled. Could you please open a separate issue for this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 14:55:35 2018 From: report at bugs.python.org (Bernhard M. Wiedemann) Date: Mon, 05 Feb 2018 19:55:35 +0000 Subject: [issue30693] tarfile add uses random order In-Reply-To: <1497751410.94.0.779622739852.issue30693@psf.upfronthosting.co.za> Message-ID: <1517860535.69.0.467229070634.issue30693@psf.upfronthosting.co.za> Change by Bernhard M. Wiedemann : ---------- keywords: +patch pull_requests: +5379 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 14:57:16 2018 From: report at bugs.python.org (Bernhard M. Wiedemann) Date: Mon, 05 Feb 2018 19:57:16 +0000 Subject: [issue30693] tarfile add uses random order In-Reply-To: <1497751410.94.0.779622739852.issue30693@psf.upfronthosting.co.za> Message-ID: <1517860636.24.0.467229070634.issue30693@psf.upfronthosting.co.za> Bernhard M. Wiedemann added the comment: Serhiy, can you test https://github.com/python/cpython/pull/5557 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 15:05:04 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 05 Feb 2018 20:05:04 +0000 Subject: [issue32752] no information about accessing typing.Generic type arguments In-Reply-To: <1517612346.62.0.467229070634.issue32752@psf.upfronthosting.co.za> Message-ID: <1517861104.66.0.467229070634.issue32752@psf.upfronthosting.co.za> St?phane Wirtel added the comment: with the help command, you have a good documentation, help(list_of_ints), but you are right, there is no functions/methods for your need. in the code of typing, there is a comment about __args__ but it is not used by the documentation. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 15:07:22 2018 From: report at bugs.python.org (Tim Graham) Date: Mon, 05 Feb 2018 20:07:22 +0000 Subject: [issue32775] fnmatch.translate() can produce a pattern which emits a nested set warning Message-ID: <1517861242.52.0.467229070634.issue32775@psf.upfronthosting.co.za> New submission from Tim Graham : As discussed in issue30349#msg311684, fnmatch.translate() can produce a pattern which emits a nested set warning: >>> import fnmatch, re >>> re.compile(fnmatch.translate('[[]foo]')) __main__:1: FutureWarning: Possible nested set at position 10 re.compile('(?s:\\(.s:[[]foo\\\\\\]\\)\\\\Z)\\Z') ---------- components: Library (Lib) messages: 311687 nosy: Tim.Graham, serhiy.storchaka priority: normal severity: normal status: open title: fnmatch.translate() can produce a pattern which emits a nested set warning type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 15:08:17 2018 From: report at bugs.python.org (Tim Graham) Date: Mon, 05 Feb 2018 20:08:17 +0000 Subject: [issue30349] Preparation for advanced set syntax in regular expressions In-Reply-To: <1494576853.44.0.660813121244.issue30349@psf.upfronthosting.co.za> Message-ID: <1517861297.48.0.467229070634.issue30349@psf.upfronthosting.co.za> Tim Graham added the comment: Okay, I created #32775. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 15:17:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Feb 2018 20:17:38 +0000 Subject: [issue32775] fnmatch.translate() can produce a pattern which emits a nested set warning In-Reply-To: <1517861242.52.0.467229070634.issue32775@psf.upfronthosting.co.za> Message-ID: <1517861858.0.0.467229070634.issue32775@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is easy to fix sets starting with '['. It is more hard to fix sets with doubled '-', '&', '|' or '~'. >>> fnmatch.fnmatch('#', '[#--]') /home/serhiy/py/cpython/Lib/fnmatch.py:46: FutureWarning: Possible set difference at position 6 return re.compile(res).match True ---------- assignee: -> serhiy.storchaka priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 15:48:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Feb 2018 20:48:35 +0000 Subject: [issue32749] Remove dbm.dumb behavior deprecated in 3.6 In-Reply-To: <1517584577.48.0.467229070634.issue32749@psf.upfronthosting.co.za> Message-ID: <1517863715.1.0.467229070634.issue32749@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 Feb 5 15:49:52 2018 From: report at bugs.python.org (Jay Yin) Date: Mon, 05 Feb 2018 20:49:52 +0000 Subject: [issue32773] distutils should NOT preserve timestamps In-Reply-To: <1517846476.27.0.467229070634.issue32773@psf.upfronthosting.co.za> Message-ID: <1517863792.53.0.467229070634.issue32773@psf.upfronthosting.co.za> Jay Yin added the comment: Will an option be added to copy_file() function? if we did we could probably make it preserve the times by default and have an -- option to make it update? ---------- nosy: +jayyin11043 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 15:47:40 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 05 Feb 2018 20:47:40 +0000 Subject: [issue32749] Remove dbm.dumb behavior deprecated in 3.6 In-Reply-To: <1517584577.48.0.467229070634.issue32749@psf.upfronthosting.co.za> Message-ID: <1517863660.25.0.467229070634.issue32749@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 6c85efa5a66d7b254aa22a39d47f36c040d7a04e by Serhiy Storchaka in branch 'master': bpo-32749: Make dbm.dumb databases more cosistent with other dbm databases. (#5497) https://github.com/python/cpython/commit/6c85efa5a66d7b254aa22a39d47f36c040d7a04e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 16:22:42 2018 From: report at bugs.python.org (holger) Date: Mon, 05 Feb 2018 21:22:42 +0000 Subject: [issue32776] asyncio SIGCHLD scalability problems Message-ID: <1517865762.95.0.467229070634.issue32776@psf.upfronthosting.co.za> New submission from holger : I intended to use the asyncio framework for building an end-to-end test for our software. In the test I would spawn somewhere between 5k to 10k processes and have the same number of sockets to manage. When I built a prototype I ran into some scaling issues. Instead of launching our real software I tested it with calls to sleep 30. At some point started processes would finish, a SIGCHLD would be delivered to python and then it would fail: Exception ignored when trying to write to the signal wakeup fd: BlockingIOError: [Errno 11] Resource temporarily unavailable Using strace I saw something like: send(5, "\0", 1, 0) = -1 EAGAIN (Resource temporarily unavailable) waitpid(12218, 0xbf8592d8, WNOHANG) = 0 waitpid(12219, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG) = 12219 send(5, "\0", 1, 0) = -1 EAGAIN (Resource temporarily unavailable) waitpid(12220, 0xbf8592d8, WNOHANG) = 0 waitpid(12221, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG) = 12221 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=12293, si_uid=1001, si_status=0, si_utime=0, si_stime= 0} --- getpid() = 11832 write(5, "\21", 1) = -1 EAGAIN (Resource temporarily unavailable) sigreturn({mask=[]}) = 12221 write(2, "Exception ignored when trying to"..., 64) = 64 write(2, "BlockingIOError: [Errno 11] Reso"..., 61) = 61 Looking at the code I see that si_pid of the signal will be ignored and instead wait(2) will be called for all processes. This doesn't seem to scale well enough for my intended use case. I think what could be done is one of the following: * Switch to signalfd for the event notification? * Take si_pid and instead of just notifying that work is there.. inform about the PID that exited? * Use wait(-1,... if there can be only one SIGCHLD handler to collect any dead child ---------- components: asyncio messages: 311692 nosy: asvetlov, holger+lp, yselivanov priority: normal severity: normal status: open title: asyncio SIGCHLD scalability problems _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 16:23:01 2018 From: report at bugs.python.org (Jay Yin) Date: Mon, 05 Feb 2018 21:23:01 +0000 Subject: [issue32642] add support for path-like objects in sys.path In-Reply-To: <1516771632.94.0.467229070634.issue32642@psf.upfronthosting.co.za> Message-ID: <1517865781.67.0.467229070634.issue32642@psf.upfronthosting.co.za> Jay Yin added the comment: This looks a lot like https://bugs.python.org/issue32446, I'd like to tackle this, if we are going through with it. ---------- nosy: +jayyin11043 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 17:26:18 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Mon, 05 Feb 2018 22:26:18 +0000 Subject: [issue32776] asyncio SIGCHLD scalability problems In-Reply-To: <1517865762.95.0.467229070634.issue32776@psf.upfronthosting.co.za> Message-ID: <1517869578.51.0.467229070634.issue32776@psf.upfronthosting.co.za> Nathaniel Smith added the comment: There's two separate issues here: the warning spew because asyncio's internal signal handling code starts losing signals when they arrive too quickly, and the way the child reaping loop polls all the children on every SIGCHLD, which makes reaping N children an O(N**2) operation. The warning spew is inherent in asyncio's current signal handling design. (BTW, Victor, here's an answer to your question in https://bugs.python.org/issue30050#msg291533 about whether this overflow can happen in real life :-).) It's not *terribly* harmful ? losing some SIGCHLDs among thousands doesn't matter. It does mean that you could lose other signals if they happen to arrive at the same time, e.g. SIGINT and SIGTERM are probably ignored while this is happening. For the O(N**2) issue, I think you can work around it by using some incantation involving set_child_watcher and the FastChildWatcher class. These aren't documented (maybe someone should document them!) and I don't know the exact details off the top of my head, but it is a public interface for making your child reaping O(N). (This uses the wait(-1, ...) trick. Unfortunately there are arcane technical limitations with signalfd and si_pid that mean they can't solve this problem. Something like CLONE_FD would help, but that patch was never merged into Linux.) You might also consider switching to something like uvloop, which has a more robust event loop implementation underneath. I haven't checked, but I'm pretty sure it'd fix the signal buffer overflow issue, and I doubt they use an O(N**2) child reaping algorithm. ---------- nosy: +njs, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 17:33:14 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Mon, 05 Feb 2018 22:33:14 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1517869994.31.0.467229070634.issue31961@psf.upfronthosting.co.za> Nathaniel Smith added the comment: I think I agree with Serhiy here... the whole difference between run([a]) and run(a) is that in the first case 'a' is treated as a path, and in the second it isn't. This distinction long predates pathlib. Say I have an oddly named binary with an embedded space in its name: bin = Path("/bin/ls -l") # Check that this weird file actually exists: assert bin.exists() # runs this weird file subprocess.run([bin]) # Currently an error; if this is implemented, would run # /bin/ls, and pass it the -l argument. Refers to something # completely different than our .exists() call above. subprocess.run(bin) ---------- nosy: +njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 17:46:12 2018 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 05 Feb 2018 22:46:12 +0000 Subject: [issue32768] object.__new__ does not accept arguments if __bases__ is changed In-Reply-To: <1517781912.98.0.467229070634.issue32768@psf.upfronthosting.co.za> Message-ID: <1517870772.37.0.467229070634.issue32768@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'd also ask whether the use case can be satisfied by rebinding __class__ instead of __bases__. That's far better defined than replacing the contents of the bases list and attempting to dynamically recalculate the MRO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 18:06:29 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 05 Feb 2018 23:06:29 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1517871989.47.0.467229070634.issue31961@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I agree with both of you at this point. TODO: Revert the PR and backport that to the 3.7 branch (i'll take care of it) ---------- resolution: fixed -> stage: resolved -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 18:06:42 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 05 Feb 2018 23:06:42 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1517872002.5.0.467229070634.issue31961@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- nosy: +ned.deily priority: normal -> release blocker versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 18:40:49 2018 From: report at bugs.python.org (Anders Lorentsen) Date: Mon, 05 Feb 2018 23:40:49 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1517874049.29.0.467229070634.issue31961@psf.upfronthosting.co.za> Anders Lorentsen added the comment: > # runs this weird file > subprocess.run([bin]) > # Currently an error; if this is implemented, would run > # /bin/ls, and pass it the -l argument. Refers to something > # completely different than our .exists() call above. I do not understand where it is stated that this is the behavior. My understanding was that if run() is passed a single argument, it will interpret the string "/bin/ls -l" to mean "run the `/bin/ls` program, and pass it one argument `-l`, whereas if instead run() is given a list, it will literally treat the first element as the program to run, regardless of how many spaces or whatever else it contains ... And as such, if `bin` is a Path-like object, this issue tries to resolve that run([bin]) works as excepted, but run(bin) fails horribly. Sure, I can understand that for strings it may not feel natural how these two things are interpreted differently, but if `bin` is a Path-like object, it at least feels very natural to me that then it should be run as the program name itself (as "paths" does not have arguments). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 19:59:41 2018 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 06 Feb 2018 00:59:41 +0000 Subject: [issue15873] datetime: add ability to parse RFC 3339 dates and times In-Reply-To: <1346965730.56.0.810546720554.issue15873@psf.upfronthosting.co.za> Message-ID: <1517878781.39.0.467229070634.issue15873@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- pull_requests: +5380 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 19:59:43 2018 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 06 Feb 2018 00:59:43 +0000 Subject: [issue15873] datetime: add ability to parse RFC 3339 dates and times In-Reply-To: <1346965730.56.0.810546720554.issue15873@psf.upfronthosting.co.za> Message-ID: <1517878783.07.0.467229070634.issue15873@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- pull_requests: +5380, 5381 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 20:34:03 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Tue, 06 Feb 2018 01:34:03 +0000 Subject: [issue32777] subprocess: child_exec() uses _Py_set_inheritable() which is not async-signal-safe Message-ID: <1517880843.05.0.467229070634.issue32777@psf.upfronthosting.co.za> New submission from Alexey Izbyshev : _Py_set_inheritable() raises a Python-level exception on error and thus is not async-signal-safe, but child_exec() must use only async-signal-safe functions because it's executed between fork() and exec(). Since a non-raising version is already implemented in Python/fileutils.c for internal use (set_inheritable), I suggest to simply expose it via another public function (similar to _Py_open_noraise(), etc.). ---------- components: Library (Lib) messages: 311699 nosy: izbyshev, vstinner priority: normal severity: normal status: open title: subprocess: child_exec() uses _Py_set_inheritable() which is not async-signal-safe type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 20:44:45 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Tue, 06 Feb 2018 01:44:45 +0000 Subject: [issue32777] subprocess: child_exec() uses _Py_set_inheritable() which is not async-signal-safe In-Reply-To: <1517880843.05.0.467229070634.issue32777@psf.upfronthosting.co.za> Message-ID: <1517881485.4.0.467229070634.issue32777@psf.upfronthosting.co.za> Change by Alexey Izbyshev : ---------- keywords: +patch pull_requests: +5382 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 21:08:01 2018 From: report at bugs.python.org (Tim Peters) Date: Tue, 06 Feb 2018 02:08:01 +0000 Subject: [issue32767] Mutating a list while iterating: clarify the docs In-Reply-To: <1517772420.88.0.467229070634.issue32767@psf.upfronthosting.co.za> Message-ID: <1517882881.56.0.467229070634.issue32767@psf.upfronthosting.co.za> Tim Peters added the comment: Some other points to consider: I don't think this belongs in the `for` statement docs at all. Instead they should merely _note_ that what happens if a sequence being iterated over is mutated is up to the sequence iterator. Then, e.g., the `list` docs should spell out the behavior currently (but, as already noted, incompletely) described. From StackOverflow experience, I may be the only person in the world who knows that list behavior here is documented under the `for` statement - everyone else gives up after not finding a word about it in the `list` docs ;-) `collections.deque` docs, in contrast, may wish to document the behavior of its iterators. They in fact work hard to raise an exception if a size-changing mutation occurs during iteration, but that doesn't appear to be documented. It's worth debating whether it should be. Are there other mutable sequence types in the standard distribution? ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 21:16:15 2018 From: report at bugs.python.org (REBECCA VICKERS) Date: Tue, 06 Feb 2018 02:16:15 +0000 Subject: [issue32778] Hi Message-ID: <6B48E606-FEC1-421A-994D-3C03D696E1DF@icloud.com> New submission from REBECCA VICKERS : Sent from my iPhone ---------- messages: 311701 nosy: REBECCAVICKERS0000000 priority: normal severity: normal status: open title: Hi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 21:21:09 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 06 Feb 2018 02:21:09 +0000 Subject: [issue32770] collections.counter examples are misleading In-Reply-To: <1517790874.74.0.467229070634.issue32770@psf.upfronthosting.co.za> Message-ID: <1517883669.82.0.467229070634.issue32770@psf.upfronthosting.co.za> Cheryl Sabella added the comment: You know, I'm not sure if I had ever seen that example before. When you click Counter at the top of the page, it goes right to the class definition, which is past the example. Having said that, I really like the example. Until now, I didn't realize what Raymond said above about Counters (that the core ability is to write c['x'] += 1 without a KeyError). So, thanks to this report, I learned that today! One thing that did surprise me in the example is that I expected the repr to be in insertion order in 3.7. The class description says 'It is an unordered collection where elements are stored as dictionary keys' and I was wondering if that was still true since dicts now have a guaranteed order. I tried it on the example, which still printed Counter({'blue': 3, 'red': 2, 'green': 1})! Of course it makes sense after looking at the code because it calls `most_common` in the repr, but I hadn't realized that before. So, two things learned about Counter today. :-) Anyway, writing this here to ask about the wording regarding 'unordered collection'. Thanks! ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 21:28:50 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 06 Feb 2018 02:28:50 +0000 Subject: [issue15873] datetime: add ability to parse RFC 3339 dates and times In-Reply-To: <1346965730.56.0.810546720554.issue15873@psf.upfronthosting.co.za> Message-ID: <1517884130.66.0.467229070634.issue15873@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: New changeset 22864bc8e4a076bbac748ccda6c27f1ec41b53e7 by Alexander Belopolsky (Paul Ganssle) in branch 'master': Add What's new entry for datetime.fromisoformat (#5559) https://github.com/python/cpython/commit/22864bc8e4a076bbac748ccda6c27f1ec41b53e7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 22:12:47 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 06 Feb 2018 03:12:47 +0000 Subject: [issue32778] Hi In-Reply-To: <6B48E606-FEC1-421A-994D-3C03D696E1DF@icloud.com> Message-ID: <1517886767.09.0.467229070634.issue32778@psf.upfronthosting.co.za> Change by Steven D'Aprano : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 23:47:02 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 06 Feb 2018 04:47:02 +0000 Subject: [issue32777] subprocess: child_exec() uses _Py_set_inheritable() which is not async-signal-safe In-Reply-To: <1517880843.05.0.467229070634.issue32777@psf.upfronthosting.co.za> Message-ID: <1517892422.64.0.467229070634.issue32777@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- assignee: -> gregory.p.smith nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 5 23:48:49 2018 From: report at bugs.python.org (Paul Fisher) Date: Tue, 06 Feb 2018 04:48:49 +0000 Subject: [issue32779] urljoining an empty query string doesn't clear query string Message-ID: <1517892529.44.0.467229070634.issue32779@psf.upfronthosting.co.za> New submission from Paul Fisher : urljoining with '?' will not clear a query string: ACTUAL: >>> import urllib.parse >>> urllib.parse.urljoin('http://a/b/c?d=e', '?') 'http://a/b/c?d=e' EXPECTED: 'http://a/b/c' (optionally, with a ? at the end) WhatWG's URL standard expects a relative URL consisting of only a ? to replace a query string: https://url.spec.whatwg.org/#relative-state Seen in versions 3.6 and 2.7, but probably also affects later versions. ---------- components: Library (Lib) messages: 311704 nosy: Paul Fisher priority: normal severity: normal status: open title: urljoining an empty query string doesn't clear query string type: behavior versions: Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 00:27:59 2018 From: report at bugs.python.org (Eric Wieser) Date: Tue, 06 Feb 2018 05:27:59 +0000 Subject: [issue32780] ctypes: memoryview gives incorrect PEP3118 format strings for both packed and unpacked structs Message-ID: <1517894879.39.0.467229070634.issue32780@psf.upfronthosting.co.za> New submission from Eric Wieser : Discovered [here](https://github.com/numpy/numpy/issues/10528) Consider the following structure, and a memoryview created from it: class foo(ctypes.Structure): _fields_ = [('one', ctypes.c_uint8), ('two', ctypes.c_uint32)] f = foo() mf = memoryview(f) We'd expect this to insert padding, and it does: >>> mf.itemsize 8 But that padding doesn't show up in the format string: >>> mf.format 'T{ No padding is added when using non-native size and alignment, e.g. with ?? But ctypes doesn't even get it right for packed structs: class foop(ctypes.Structure): _fields_ = [('one', ctypes.c_uint8), ('two', ctypes.c_uint32)] _pack_ = 1 f = foo() mf = memoryview(f) The size is what we'd expect: >>> mf.itemsize 5 But the format is garbage: >>> mf.format 'B' # sizeof(byte) == 5!? ---------- components: ctypes messages: 311705 nosy: Eric.Wieser priority: normal severity: normal status: open title: ctypes: memoryview gives incorrect PEP3118 format strings for both packed and unpacked structs 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 Feb 6 00:33:47 2018 From: report at bugs.python.org (Eric Wieser) Date: Tue, 06 Feb 2018 05:33:47 +0000 Subject: [issue32780] ctypes: memoryview gives incorrect PEP3118 format strings for both packed and unpacked structs In-Reply-To: <1517894879.39.0.467229070634.issue32780@psf.upfronthosting.co.za> Message-ID: <1517895227.14.0.467229070634.issue32780@psf.upfronthosting.co.za> Change by Eric Wieser : ---------- keywords: +patch pull_requests: +5383 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 00:40:05 2018 From: report at bugs.python.org (Eric Wieser) Date: Tue, 06 Feb 2018 05:40:05 +0000 Subject: [issue32780] ctypes: memoryview gives incorrect PEP3118 format strings for both packed and unpacked structs In-Reply-To: <1517894879.39.0.467229070634.issue32780@psf.upfronthosting.co.za> Message-ID: <1517895605.27.0.467229070634.issue32780@psf.upfronthosting.co.za> Change by Eric Wieser : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 01:05:20 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 06 Feb 2018 06:05:20 +0000 Subject: [issue32777] subprocess: child_exec() uses _Py_set_inheritable() which is not async-signal-safe In-Reply-To: <1517880843.05.0.467229070634.issue32777@psf.upfronthosting.co.za> Message-ID: <1517897120.94.0.467229070634.issue32777@psf.upfronthosting.co.za> Gregory P. Smith added the comment: out of curiosity, did you actually diagnose a process deadlocked due to this or was it noted via code inspection? this issue has been around since 3.4 and the file descriptor inheritance changes from the looks of things. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 01:09:36 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 06 Feb 2018 06:09:36 +0000 Subject: [issue32777] subprocess: child_exec() uses _Py_set_inheritable() which is not async-signal-safe In-Reply-To: <1517880843.05.0.467229070634.issue32777@psf.upfronthosting.co.za> Message-ID: <1517897376.73.0.467229070634.issue32777@psf.upfronthosting.co.za> Gregory P. Smith added the comment: New changeset c1e46e94de38a92f98736af9a42d89c3975a9919 by Gregory P. Smith (Alexey Izbyshev) in branch 'master': bpo-32777: Fix _Py_set_inheritable async-safety in subprocess (GH-5560) https://github.com/python/cpython/commit/c1e46e94de38a92f98736af9a42d89c3975a9919 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 01:09:48 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 06 Feb 2018 06:09:48 +0000 Subject: [issue32777] subprocess: child_exec() uses _Py_set_inheritable() which is not async-signal-safe In-Reply-To: <1517880843.05.0.467229070634.issue32777@psf.upfronthosting.co.za> Message-ID: <1517897388.57.0.467229070634.issue32777@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5385 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 01:10:43 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 06 Feb 2018 06:10:43 +0000 Subject: [issue32777] subprocess: child_exec() uses _Py_set_inheritable() which is not async-signal-safe In-Reply-To: <1517880843.05.0.467229070634.issue32777@psf.upfronthosting.co.za> Message-ID: <1517897443.03.0.467229070634.issue32777@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5386 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 01:31:24 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 06 Feb 2018 06:31:24 +0000 Subject: [issue32777] subprocess: child_exec() uses _Py_set_inheritable() which is not async-signal-safe In-Reply-To: <1517880843.05.0.467229070634.issue32777@psf.upfronthosting.co.za> Message-ID: <1517898684.97.0.467229070634.issue32777@psf.upfronthosting.co.za> Gregory P. Smith added the comment: New changeset 2bb0bfafb0beb819b7c60d9004382ce6867847c0 by Gregory P. Smith (Miss Islington (bot)) in branch '3.7': bpo-32777: Fix _Py_set_inheritable async-safety in subprocess (GH-5560) (GH-5562) https://github.com/python/cpython/commit/2bb0bfafb0beb819b7c60d9004382ce6867847c0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 01:51:12 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 06 Feb 2018 06:51:12 +0000 Subject: [issue32777] subprocess: child_exec() uses _Py_set_inheritable() which is not async-signal-safe In-Reply-To: <1517880843.05.0.467229070634.issue32777@psf.upfronthosting.co.za> Message-ID: <1517899872.35.0.467229070634.issue32777@psf.upfronthosting.co.za> Gregory P. Smith added the comment: New changeset b90c68586e1f2c45c736dd38880f182be267e2ef by Gregory P. Smith (Miss Islington (bot)) in branch '3.6': bpo-32777: Fix _Py_set_inheritable async-safety in subprocess (GH-5560) (GH-5563) https://github.com/python/cpython/commit/b90c68586e1f2c45c736dd38880f182be267e2ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 01:52:35 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 06 Feb 2018 06:52:35 +0000 Subject: [issue32777] subprocess: child_exec() uses _Py_set_inheritable() which is not async-signal-safe In-Reply-To: <1517880843.05.0.467229070634.issue32777@psf.upfronthosting.co.za> Message-ID: <1517899955.96.0.467229070634.issue32777@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- components: +Extension Modules resolution: -> fixed stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 02:20:23 2018 From: report at bugs.python.org (Anthony Flury) Date: Tue, 06 Feb 2018 07:20:23 +0000 Subject: [issue32770] collections.counter examples are misleading In-Reply-To: <1517790874.74.0.467229070634.issue32770@psf.upfronthosting.co.za> Message-ID: <1517901623.21.0.467229070634.issue32770@psf.upfronthosting.co.za> Anthony Flury added the comment: Cheryl : When you iterate around a counter instance it does return keys in the order they are first encountered/inserted - so I agree with you that it is an ordered collection from Python 3.7 onwards (although the iteration and the repr are ordered in different orders. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 02:25:26 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 06 Feb 2018 07:25:26 +0000 Subject: [issue5594] IDLE: execute stored startup code on each Shell start. In-Reply-To: <1238311210.52.0.532490988344.issue5594@psf.upfronthosting.co.za> Message-ID: <1517901926.64.0.467229070634.issue5594@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Currently, Shell start and restart act differently. Start can execute one of -s file, -c command, or neither (and there are other command line options). Restart prints a RESTART separator banner and optionally runs an edit buffer, but ignores all or most command-line options. I would like to try to solve this and related issues by simplifying pyshell so that there is a uniform user process startup, rather than initial start and later restart. Shell would always print a START header banner, adjusted according to which, if any, pre-defined code it was going to run, run the code, and then print a prompt for interactive input. My hesitation about making -s or -c repeat, expressed on another issue, is that someone might want stop repeating with exiting. I think an adequate solution would be a new section of the Shell menu with radio buttons such as () No startup, () Start file, and () Start command, with inapplicable choices grayed out. The above should be a separate new issue and a dependency of this one. === This issue has 2 parts. 1. Make it possible to run Shell startup code when IDLE is not started from the command line, which it usually is not, and without adding a separate startup script and icon. The two subproposals are storing in IDLE's user config either a filename (which file could also be used without IDLE) or a code block. I am willing to do both. 2. Make it possible to run the new Shell startup code each time Shell starts without running editor code. I don't want to do 1. without 2., and I don't want to make re-running possibly only for new sources. I propose that we first fix re-running for existing sources, as described above, so that when 1. is done after, 2. easily follows. === About the patch: You picked a non-trivial issue ;-), and review will not be quick. Could you list the 'other issues'? Even if they are handled later with separate PRs (if not rejected) I want to have them in mind before doing this. For instance, they may affect my idea of how we should split the General tab. I am not sure whether I have ever tested that -s, for instance, works correctly. Certainly not recently. User code must be exec'ed within the run process by run.py code and not run in main's global context by python. This is why I am unsure about using -c, as that should do the latter before run code takes over. === Editor template code is different issue. I think it needs separate discussion, with consideration of how other editors work. AFAIK, there is no existing issue, so a new one is needed. My own use case, is for a separate project where most files, but not all, start with a template. Currently with IDLE, I open the template and immediately save with the new name. If I could instead start with a blank and insert the template, I could not accidentally overwrite. With multiple projects, I would probably want multiple templates. The File menu could have a entry such as 'New, with template'. I have expected to split the General tab. I was thinking there should be a new 'Editor' tab, which would seem to be the place for editor template information. I think both template file(s) and a config template block should be options. === For code entry, whether startup code or template, the patch uses a Text widget with scrollbar added. I believe tkinter already has such. However, I agree with Cherniavsky that an IDLE editor would be even better. However, we really need a small editor frame, with no menu, rather than a separate window. The OK and Apply buttons would 'save' the contents. I have already intended to factor a subclassable editor frame out of EditorWindow. (I have also thought of using a subclass of such as the code entry area for Shell.) Startup and template code would be two other uses. ---------- title: IDLE startup configuration -> IDLE: execute stored startup code on each Shell start. versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 02:25:34 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Tue, 06 Feb 2018 07:25:34 +0000 Subject: [issue32777] subprocess: child_exec() uses _Py_set_inheritable() which is not async-signal-safe In-Reply-To: <1517880843.05.0.467229070634.issue32777@psf.upfronthosting.co.za> Message-ID: <1517901934.35.0.467229070634.issue32777@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: > out of curiosity, did you actually diagnose a process deadlocked due to this or was it noted via code inspection? The latter. I noted it while working on another issue. While it was easy to trigger a malloc() in child_exec() by e.g. specifying an invalid fd in pass_fds for Popen, I haven't tried to arrange a deadlock. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 02:40:56 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 06 Feb 2018 07:40:56 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517902856.26.0.467229070634.issue32394@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I suggest closing the issue as "won't fix": checking in runtime for only for TCP flags on Windows is a weird exception. Checking all flags on all supported platforms is impossible. Client libraries should process such situations themself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 02:44:33 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Tue, 06 Feb 2018 07:44:33 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517903073.89.0.467229070634.issue32394@psf.upfronthosting.co.za> Nathaniel Smith added the comment: I'm sympathetic to the idea that we don't want to carry around these checks, but also to the idea that this caused a regression in a micro release and that's not cool. Hence the idea that maybe we should keep everything the way it is in 3.7, but disable the new constants in 3.6, so that it arrives as part of a major release. OTOH it's been in 3.6 for like 6 weeks already so I guess a lot of the affected parties are already working around it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 02:56:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 06 Feb 2018 07:56:07 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1517903767.06.0.467229070634.issue31961@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Anders, the problem is that running subprocess.run(executable) instead of subprocess.run([executable]) (where executable is a path to a program) is a bug. For example it doesn't work if the path contains spaces. And PR 4329 encourages making this bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 03:13:25 2018 From: report at bugs.python.org (VA) Date: Tue, 06 Feb 2018 08:13:25 +0000 Subject: [issue32768] object.__new__ does not accept arguments if __bases__ is changed In-Reply-To: <1517781912.98.0.467229070634.issue32768@psf.upfronthosting.co.za> Message-ID: <1517904805.76.0.467229070634.issue32768@psf.upfronthosting.co.za> VA added the comment: The use case is a little more complex. I have a plugin system, with abstract interfaces. Plugins can't import each other, but plugins should be able to allowed to depend on another plugin (using string codes, still no direct imports), and even subclass another plugin's classes (and override some of their methods). In the sample code, A and C would be 2 plugins, and B would be a helper class (with string code parameters) whose purpose is to make a temporary bridge between A and C. A should work standalone. C would use A's code but could reimplement some of A's methods. B is a internal class that has A and C at hand, and changes C's __bases__ to point to A. I have been suggested other solutions, like using composition (a C instance would have an "a" field pointing to an A instance) to avoid inheritance altogether, or using the "type()" function in B.__new__ to create a custom class inheriting A. None of these solutions are really satisfying because they prevent C from using "super(...)" to refer to A methods. Rebinding __class__ simply does not allow to override methods at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 03:17:53 2018 From: report at bugs.python.org (Po-Hsu Lin) Date: Tue, 06 Feb 2018 08:17:53 +0000 Subject: [issue32781] lzh_tw is missing in locale.py Message-ID: <1517905073.42.0.467229070634.issue32781@psf.upfronthosting.co.za> New submission from Po-Hsu Lin : The lzh_tw locale (Literary Chinese) is not available in Lib/locale.py This issue will cause error like: Traceback (most recent call last): File "/usr/share/apport/apport-gtk", line 598, in app.run_argv() File "/usr/lib/python3/dist-packages/apport/ui.py", line 694, in run_argv return self.run_crashes() File "/usr/lib/python3/dist-packages/apport/ui.py", line 245, in run_crashes logind_session[1] > self.report.get_timestamp(): File "/usr/lib/python3/dist-packages/apport/report.py", line 1684, in get_timestamp orig_ctime = locale.getlocale(locale.LC_TIME) File "/usr/lib/python3.6/locale.py", line 581, in getlocale return _parse_localename(localename) File "/usr/lib/python3.6/locale.py", line 490, in _parse_localename raise ValueError('unknown locale: %s' % localename) ValueError: unknown locale: lzh_TW This can be easily reproduced in Ubuntu 17.10, with English selected as the default language, but Timezone set to Taipei. This will set the locale to: $ locale LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE="en_US.UTF-8" LC_NUMERIC=lzh_TW LC_TIME=lzh_TW LC_COLLATE="en_US.UTF-8" LC_MONETARY=lzh_TW LC_MESSAGES="en_US.UTF-8" LC_PAPER=lzh_TW LC_NAME=lzh_TW LC_ADDRESS=lzh_TW LC_TELEPHONE=lzh_TW LC_MEASUREMENT=lzh_TW LC_IDENTIFICATION=lzh_TW LC_ALL= And when running some python script to call locale.py, you will see the error message above. ---------- components: Library (Lib) messages: 311717 nosy: cypressyew priority: normal severity: normal status: open title: lzh_tw is missing in locale.py versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 04:05:54 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 06 Feb 2018 09:05:54 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517907954.2.0.467229070634.issue32394@psf.upfronthosting.co.za> Andrew Svetlov added the comment: If the fix will land into 3.6 bugfix release only -- I can live with it, while the overall looks tricky. Ned Deily, what do you think about? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 04:10:20 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 06 Feb 2018 09:10:20 +0000 Subject: [issue32781] lzh_tw is missing in locale.py In-Reply-To: <1517905073.42.0.467229070634.issue32781@psf.upfronthosting.co.za> Message-ID: <1517908220.77.0.467229070634.issue32781@psf.upfronthosting.co.za> INADA Naoki added the comment: Maybe, relating to https://bugs.launchpad.net/ubuntu/+source/language-pack-zh-hant/+bug/1699540 ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 04:24:00 2018 From: report at bugs.python.org (Po-Hsu Lin) Date: Tue, 06 Feb 2018 09:24:00 +0000 Subject: [issue32781] lzh_tw is missing in locale.py In-Reply-To: <1517905073.42.0.467229070634.issue32781@psf.upfronthosting.co.za> Message-ID: <1517909040.94.0.467229070634.issue32781@psf.upfronthosting.co.za> Po-Hsu Lin added the comment: Yes, this is related to the language setting in Ubuntu, as the locale should be set to zh_TW instead of lzh_TW when the Timezone was set to Taipei. But even so, I think this bug is still valid, as the lzh_TW does not exist in the lib at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 04:39:42 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 06 Feb 2018 09:39:42 +0000 Subject: [issue32781] lzh_tw is missing in locale.py In-Reply-To: <1517905073.42.0.467229070634.issue32781@psf.upfronthosting.co.za> Message-ID: <1517909982.7.0.467229070634.issue32781@psf.upfronthosting.co.za> INADA Naoki added the comment: > But even so, I think this bug is still valid, as the lzh_TW does not exist in the lib at all. Python doesn't have locale database, while have some aliases. Python uses libc's locale. This exception is raised because `_parse_localename` doesn't support locale name without encoding. In case of zh_TW, alias is registered: 'zh_tw': 'zh_TW.big5', But I don't think adding `lzh_tw` to alias is good idea. There are no "one right alias table". In case of zh_tw, you may want zh_TW.UTF-8 rather than zh_TW.bit5, don't you? So I think supporting locale name without encoding is right way. Maybe, we should return None for encoding in such situation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 04:57:00 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Tue, 06 Feb 2018 09:57:00 +0000 Subject: [issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28) In-Reply-To: <1516789649.91.0.467229070634.issue32647@psf.upfronthosting.co.za> Message-ID: <1517911020.8.0.467229070634.issue32647@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: @Stephane, Currently the flag has been disabled on rawhide due to too many breakages but the bug is still there if you add '-z defs' to the linker flags. More info: https://src.fedoraproject.org/rpms/redhat-rpm-config/c/8d6c6d0761089dfb7e1eacf35112b3d7a3f0d1af?branch=master ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 06:31:25 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 06 Feb 2018 11:31:25 +0000 Subject: [issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x In-Reply-To: <1516595654.84.0.467229070634.issue32616@psf.upfronthosting.co.za> Message-ID: <1517916685.6.0.467229070634.issue32616@psf.upfronthosting.co.za> INADA Naoki added the comment: Bad news: --enable-optimization doesn't solve it. I hope same thing doesn't happen for Python 3. Anyone tried Xcode 9.3? What version of LLVM does Apple use? Anyway, I think we need help of LLVM expert. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 10:03:08 2018 From: report at bugs.python.org (Snidhi Sofpro) Date: Tue, 06 Feb 2018 15:03:08 +0000 Subject: [issue6766] Cannot modify dictionaries inside dictionaries using Managers from multiprocessing In-Reply-To: <1251049590.58.0.809281249474.issue6766@psf.upfronthosting.co.za> Message-ID: <1517929388.01.0.467229070634.issue6766@psf.upfronthosting.co.za> Snidhi Sofpro added the comment: Hi team, Looks like this issue remains per code below: import multiprocessing, sys, time, traceback; if __name__ == '__main__': print(sys.version); mpd = multiprocessing.Manager().dict(); mpd['prcss'] = {'q' : 'queue_1', 'ctlg' : 'ctlg_1' }; # update 1 - doesn't work! mpd['prcss'].update( { 'name': 'concfun_1'} ); print('Result of failed update 1:', mpd['prcss']); # update 2 - doesn't work! mpd['prcss']['name'] = 'concfun_1'; print('Result of failed update 2:', mpd['prcss']); # update 3 - works! mpd_prcss = mpd['prcss']; mpd_prcss['name'] = 'concfun_1'; mpd['prcss'] = mpd_prcss; print('Result of successful update 3:', mpd['prcss']); ### --- output ### 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)] Result of failed update 1: {'q': 'queue_1', 'ctlg': 'ctlg_1'} Result of failed update 2: {'q': 'queue_1', 'ctlg': 'ctlg_1'} Result of successful update 3: {'q': 'queue_1', 'ctlg': 'ctlg_1', 'name': 'concfun_1'} ---------- nosy: +Snidhi versions: -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 10:23:15 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 06 Feb 2018 15:23:15 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517930595.81.0.467229070634.issue32394@psf.upfronthosting.co.za> Ned Deily added the comment: > Ned Deily, what do you think about? I would like to have Steve's opinion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 10:33:39 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Tue, 06 Feb 2018 15:33:39 +0000 Subject: [issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28) In-Reply-To: <1516789649.91.0.467229070634.issue32647@psf.upfronthosting.co.za> Message-ID: <1517931219.31.0.467229070634.issue32647@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Just tested it for python3 on a rawhide system with the flag enabled and it works, ctypes is compiled successfully. python2 is not affected the same way though, various modules fail there with different undefined references issues when setting the flag. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 10:36:18 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Tue, 06 Feb 2018 15:36:18 +0000 Subject: [issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28) In-Reply-To: <1516789649.91.0.467229070634.issue32647@psf.upfronthosting.co.za> Message-ID: <1517931378.51.0.467229070634.issue32647@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Attaching the build log from python2. Near the end you can see the undefined references errors. ---------- Added file: https://bugs.python.org/file47426/py2buildlog _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 10:45:22 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 06 Feb 2018 15:45:22 +0000 Subject: [issue32622] Implement loop.sendfile In-Reply-To: <1517080969.81.0.467229070634.issue32622@psf.upfronthosting.co.za> Message-ID: <1517931922.97.0.467229070634.issue32622@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- pull_requests: +5387 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 10:50:36 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 06 Feb 2018 15:50:36 +0000 Subject: [issue32751] wait_for(future, ...) should wait for the future (even if a timeout occurs) In-Reply-To: <1517601675.34.0.467229070634.issue32751@psf.upfronthosting.co.za> Message-ID: <1517932236.08.0.467229070634.issue32751@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Hmm, I don't see an easy way to fix it. awaiting for cancelled task potentially can wait forever. Adding another timeout looks too confusing. Iterating over a couple of loop steps is not reliable: try/finally block in awaited task can perform async IO with unpredictable completion time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 10:55:47 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Tue, 06 Feb 2018 15:55:47 +0000 Subject: [issue32521] NIS module fails to build due to the removal of interfaces related to Sun RPC from glibc. In-Reply-To: <1515429303.77.0.467229070634.issue32521@psf.upfronthosting.co.za> Message-ID: <1517932547.37.0.467229070634.issue32521@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Reopenning the issue. python2 is still failing with the fix applied: gcc -pthread -fPIC -fno-strict-aliasing -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 -mcet -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -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 -mcet -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -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 -mcet -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -I. -IInclude -I/builddir/build/BUILD/Python-2.7.14/Include -c /builddir/build/BUILD/Python-2.7.14/Modules/nismodule.c -o Modules/nismodule.o /builddir/build/BUILD/Python-2.7.14/Modules/nismodule.c:17:10: fatal error: rpc/rpc.h: No such file or directory #include ^~~~~~~~~~~ compilation terminated. {standard input}: Assembler messages: {standard input}: Error: .size expression for nismodule.c does not evaluate to a constant make: *** [Makefile:1568: Modules/nismodule.o] Error 1 make: *** Waiting for unfinished jobs.... ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 11:10:54 2018 From: report at bugs.python.org (Anders Lorentsen) Date: Tue, 06 Feb 2018 16:10:54 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1517933454.04.0.467229070634.issue31961@psf.upfronthosting.co.za> Anders Lorentsen added the comment: What do you mean "is a bug", and "the PR would encourage this"? Can't it be fixed? Are you saying that just because it is a bug now, we should be discouraged from making it work in the way you'd expect it to work? If `exe` is a path, these two lines of code should do exactly the same, right? It seems unintuitive to me if they produce different results. run(exe) run([exe]) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 11:41:57 2018 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 06 Feb 2018 16:41:57 +0000 Subject: [issue32768] object.__new__ does not accept arguments if __bases__ is changed In-Reply-To: <1517904805.76.0.467229070634.issue32768@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: I fear that this is one of those cases that will longer in the tracker forever. We probably shouldn't have allowed assignment to __bases__, and the behavior is slightly surprising, but fixing it would be too complicated and there's not enough interest in getting it fixed. On Feb 6, 2018 12:13 AM, "VA" wrote: > > VA added the comment: > > The use case is a little more complex. > > I have a plugin system, with abstract interfaces. Plugins can't import > each other, but plugins should be able to allowed to depend on another > plugin (using string codes, still no direct imports), and even subclass > another plugin's classes (and override some of their methods). > > In the sample code, A and C would be 2 plugins, and B would be a helper > class (with string code parameters) whose purpose is to make a temporary > bridge between A and C. > A should work standalone. C would use A's code but could reimplement some > of A's methods. B is a internal class that has A and C at hand, and changes > C's __bases__ to point to A. > > I have been suggested other solutions, like using composition (a C > instance would have an "a" field pointing to an A instance) to avoid > inheritance altogether, or using the "type()" function in B.__new__ to > create a custom class inheriting A. > None of these solutions are really satisfying because they prevent C from > using "super(...)" to refer to A methods. > Rebinding __class__ simply does not allow to override methods at all. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 11:44:22 2018 From: report at bugs.python.org (Stefan Nordhausen) Date: Tue, 06 Feb 2018 16:44:22 +0000 Subject: [issue32368] Segfault when compiling many conditional expressions In-Reply-To: <1513614564.0.0.213398074469.issue32368@psf.upfronthosting.co.za> Message-ID: <1517935462.1.0.467229070634.issue32368@psf.upfronthosting.co.za> Stefan Nordhausen added the comment: The fix for https://bugs.python.org/issue31113 also fixed this issue. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 11:52:23 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 06 Feb 2018 16:52:23 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1517935943.74.0.467229070634.issue31961@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Nathaniel's specific description of a problem is wrong. A Path with embedded spaces is treated no different than one without by default. Where things change, and what needs fixing, is when shell=True is passed. In that case a PathLike object should not be allowed as it will be turned into a flat string passed to the shell for parsing. # I've created an executable bash script called "x/mybin -h" for this that just does: echo "hello from mybin $*" >>> run("x/mybin -h", shell=True) /bin/sh: 1: x/mybin: not found CompletedProcess(args='x/mybin -h', returncode=127) >>> run("x/mybin -h") hello from mybin CompletedProcess(args='x/mybin -h', returncode=0) >>> run(Path("x/mybin -h"), shell=True) /bin/sh: 1: x/mybin: not found CompletedProcess(args=PosixPath('x/mybin -h'), returncode=127) >>> run([Path("x/mybin -h")], shell=True) /bin/sh: 1: x/mybin: not found CompletedProcess(args=[PosixPath('x/mybin -h')], returncode=127) >>> run(Path("x/mybin -h")) hello from mybin CompletedProcess(args=PosixPath('x/mybin -h'), returncode=0) >>> run([Path("x/mybin -h")]) hello from mybin ---------- priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 11:54:36 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 06 Feb 2018 16:54:36 +0000 Subject: [issue32764] Popen doesn't work on Windows when args is a list In-Reply-To: <1517760102.46.0.467229070634.issue32764@psf.upfronthosting.co.za> Message-ID: <1517936076.22.0.467229070634.issue32764@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- assignee: -> gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 12:38:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 06 Feb 2018 17:38:31 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1517938711.45.0.467229070634.issue31961@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oh, my mistake. I thought the case when args is a string and shell=False is deprecated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 13:08:56 2018 From: report at bugs.python.org (Stefan Pochmann) Date: Tue, 06 Feb 2018 18:08:56 +0000 Subject: [issue32767] Mutating a list while iterating: clarify the docs In-Reply-To: <1517772420.88.0.467229070634.issue32767@psf.upfronthosting.co.za> Message-ID: <1517940536.71.0.467229070634.issue32767@psf.upfronthosting.co.za> Stefan Pochmann added the comment: Yes, there's also `array.array`. ---------- nosy: +Stefan Pochmann _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 13:08:58 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 06 Feb 2018 18:08:58 +0000 Subject: [issue30693] tarfile add uses random order In-Reply-To: <1497751410.94.0.779622739852.issue30693@psf.upfronthosting.co.za> Message-ID: <1517940538.38.0.467229070634.issue30693@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 4ad703b7ca463d1183539277dde90ffb1c808487 by Serhiy Storchaka (Bernhard M. Wiedemann) in branch 'master': bpo-30693: Fix tarfile test cleanup on MSWindows (#5557) https://github.com/python/cpython/commit/4ad703b7ca463d1183539277dde90ffb1c808487 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 13:10:04 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 06 Feb 2018 18:10:04 +0000 Subject: [issue30693] tarfile add uses random order In-Reply-To: <1497751410.94.0.779622739852.issue30693@psf.upfronthosting.co.za> Message-ID: <1517940604.48.0.467229070634.issue30693@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5388 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 13:16:41 2018 From: report at bugs.python.org (R. David Murray) Date: Tue, 06 Feb 2018 18:16:41 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1517941001.04.0.467229070634.issue31961@psf.upfronthosting.co.za> R. David Murray added the comment: "I thought the case when args is a string and shell=False is deprecated." IMO it ought to be :) See issue 7839 for background. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 13:33:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 06 Feb 2018 18:33:30 +0000 Subject: [issue30693] tarfile add uses random order In-Reply-To: <1497751410.94.0.779622739852.issue30693@psf.upfronthosting.co.za> Message-ID: <1517942010.01.0.467229070634.issue30693@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 2c6f6682768f401c297c584ef106d48c78697f67 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-30693: Fix tarfile test cleanup on MSWindows (GH-5557) (GH-5567) https://github.com/python/cpython/commit/2c6f6682768f401c297c584ef106d48c78697f67 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 13:38:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 06 Feb 2018 18:38:13 +0000 Subject: [issue30693] tarfile add uses random order In-Reply-To: <1497751410.94.0.779622739852.issue30693@psf.upfronthosting.co.za> Message-ID: <1517942293.66.0.467229070634.issue30693@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 Feb 6 13:49:54 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 06 Feb 2018 18:49:54 +0000 Subject: [issue32773] distutils should NOT preserve timestamps In-Reply-To: <1517846476.27.0.467229070634.issue32773@psf.upfronthosting.co.za> Message-ID: <1517942994.18.0.467229070634.issue32773@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: This is a bug report and not a feature request. I don't think that there should be an option. It should just do the right thing, which is NOT preserving timestamps. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 13:53:21 2018 From: report at bugs.python.org (Eric Wieser) Date: Tue, 06 Feb 2018 18:53:21 +0000 Subject: [issue32782] ctypes: memoryview gives incorrect PEP3118 itemsize for array of length zero Message-ID: <1517943201.04.0.467229070634.issue32782@psf.upfronthosting.co.za> New submission from Eric Wieser : Take the following simple structure: class Foo(ctypes.Structure): _fields_ = [('f', ctypes.uint32_t)] And construct some arrays with it: def get_array_view(N): return memoryview((Foo * N)()) In most cases, this works as expected, returning the size of one item: >>> get_array_view(10).itemsize 4 >>> get_array_view(1).itemsize 4 But when N=0, it returns the wrong result >>> get_array_view(0).itemsize 0 Which contradicts its `.format`, which still describes a 4-byte struct >>> get_array_view(0).format 'T{>I:one:}' This causes a downstream problem in numpy: >>> np.array(get_array_view(0)) RuntimeWarning: Item size computed from the PEP 3118 buffer format string does not match the actual item size. ---------- components: ctypes messages: 311740 nosy: Eric.Wieser priority: normal severity: normal status: open title: ctypes: memoryview gives incorrect PEP3118 itemsize for array of length zero type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 14:11:23 2018 From: report at bugs.python.org (R. David Murray) Date: Tue, 06 Feb 2018 19:11:23 +0000 Subject: [issue32773] distutils should NOT preserve timestamps In-Reply-To: <1517846476.27.0.467229070634.issue32773@psf.upfronthosting.co.za> Message-ID: <1517944283.48.0.467229070634.issue32773@psf.upfronthosting.co.za> R. David Murray added the comment: That's the right thing in your opinion[*], but probably not in the opinion of others, thus the need for an option. There is also backward compatibility to be considered. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 14:28:24 2018 From: report at bugs.python.org (Jay Yin) Date: Tue, 06 Feb 2018 19:28:24 +0000 Subject: [issue32773] distutils should NOT preserve timestamps In-Reply-To: <1517846476.27.0.467229070634.issue32773@psf.upfronthosting.co.za> Message-ID: <1517945304.36.0.467229070634.issue32773@psf.upfronthosting.co.za> Jay Yin added the comment: That's why I said to have the default be the old setting, so that any previous setups wouldn't need to changes (aka backward compat.) the option would give people the "option" to choose. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 14:29:02 2018 From: report at bugs.python.org (Jay Yin) Date: Tue, 06 Feb 2018 19:29:02 +0000 Subject: [issue32773] distutils should NOT preserve timestamps In-Reply-To: <1517846476.27.0.467229070634.issue32773@psf.upfronthosting.co.za> Message-ID: <1517945342.84.0.467229070634.issue32773@psf.upfronthosting.co.za> Jay Yin added the comment: I can tackle this if it's alright? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 14:29:48 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 06 Feb 2018 19:29:48 +0000 Subject: [issue32773] distutils should NOT preserve timestamps In-Reply-To: <1517846476.27.0.467229070634.issue32773@psf.upfronthosting.co.za> Message-ID: <1517945388.53.0.467229070634.issue32773@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: I am genuinely curious to hear a good reason why timestamps should be preserved by distutils. I cannot really imagine what could possibly break. As I said, this is the standard for many non-Python projects and it seems to work just fine. I can see one potential backwards-compatibility issue for projects abusing distutils to do things unrelated to installing Python packages. So I understand that you don't want to change the default in the copy_file() function, but only in the methods calling that function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 14:39:17 2018 From: report at bugs.python.org (Jay Yin) Date: Tue, 06 Feb 2018 19:39:17 +0000 Subject: [issue32773] distutils should NOT preserve timestamps In-Reply-To: <1517846476.27.0.467229070634.issue32773@psf.upfronthosting.co.za> Message-ID: <1517945957.79.0.467229070634.issue32773@psf.upfronthosting.co.za> Jay Yin added the comment: so what you're proposing, is that the function copy_file() itself, use defaults, but make it so that any functions that reference it not save the timing?, if so wouldn't that still require an internal option? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 14:43:11 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 06 Feb 2018 19:43:11 +0000 Subject: [issue32773] distutils should NOT preserve timestamps In-Reply-To: <1517846476.27.0.467229070634.issue32773@psf.upfronthosting.co.za> Message-ID: <1517946191.69.0.467229070634.issue32773@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > if so wouldn't that still require an internal option? No, you just need to change the calls to the copy_file() function to add the keyword argument preserve_times=False If you agree, then I could easily provide a patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 14:52:37 2018 From: report at bugs.python.org (Zhiming Wang) Date: Tue, 06 Feb 2018 19:52:37 +0000 Subject: [issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x In-Reply-To: <1516595654.84.0.467229070634.issue32616@psf.upfronthosting.co.za> Message-ID: <1517946757.93.0.467229070634.issue32616@psf.upfronthosting.co.za> Zhiming Wang added the comment: Turns out python 2.7.10 doesn't suffer from the performance issue even when compiled with stock clang 4.x, and upon further investigation, I tracked down the commit that introduced the regression: commit 2c992a0788536087bfd78da8f2c62b30a461d7e2 Author: Benjamin Peterson Date: Thu May 28 12:45:31 2015 -0500 backport computed gotos (#4753) So Naoki was right that computed gotos is (solely) to blame here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 15:02:16 2018 From: report at bugs.python.org (R. David Murray) Date: Tue, 06 Feb 2018 20:02:16 +0000 Subject: [issue32773] distutils should NOT preserve timestamps In-Reply-To: <1517846476.27.0.467229070634.issue32773@psf.upfronthosting.co.za> Message-ID: <1517947336.92.0.467229070634.issue32773@psf.upfronthosting.co.za> R. David Murray added the comment: We have a strong backward compatibility policy, especially for distutils, so even though you can't imagine a use case I think we should keep the default the same. You could try lobbying the folks at pypa and see if they disagree with me, since the opinion of the python core devs there would overrule me :) Or perhaps one or more of the other nosy people here will chime in. ---------- type: -> enhancement versions: -Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 15:47:53 2018 From: report at bugs.python.org (Matanya Stroh) Date: Tue, 06 Feb 2018 20:47:53 +0000 Subject: [issue32783] ln(2) isn't accurate in _math.c in cpython Message-ID: <1517950073.47.0.467229070634.issue32783@psf.upfronthosting.co.za> New submission from Matanya Stroh : In cpython/Modules/_math.c there is definition of as const ln2 the value that in that const isn't correct (at least not accurate) This is value that in the file: ln2 = 0.693147180559945286227 (cpython) but when calculating the value in wolframalpha, this is the value we get. ln2 = 0.6931471805599453094172321214581 (wolframalpha) and this is the value from Wikipedia ln2 = 0.693147180559945309417232121458 (wikipedia) also this is the thread in stackoverflow regarding this issue https://stackoverflow.com/questions/48644767/ln2-const-value-in-math-c-in-cpython ---------- components: Library (Lib) messages: 311749 nosy: matanya.stroh priority: normal severity: normal status: open title: ln(2) isn't accurate in _math.c in cpython type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 16:00:51 2018 From: report at bugs.python.org (R. David Murray) Date: Tue, 06 Feb 2018 21:00:51 +0000 Subject: [issue32783] ln(2) isn't accurate in _math.c in cpython In-Reply-To: <1517950073.47.0.467229070634.issue32783@psf.upfronthosting.co.za> Message-ID: <1517950851.43.0.467229070634.issue32783@psf.upfronthosting.co.za> Change by R. David Murray : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 16:11:57 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 06 Feb 2018 21:11:57 +0000 Subject: [issue32783] ln(2) isn't accurate in _math.c in cpython In-Reply-To: <1517950073.47.0.467229070634.issue32783@psf.upfronthosting.co.za> Message-ID: <1517951517.24.0.467229070634.issue32783@psf.upfronthosting.co.za> Christian Heimes added the comment: Welcome to the astounding world of IEEE 754 floating point operations. Python's float type is based on C's 64bit double precision float. The value in _math.c is as precise as a double is able to contain: >>> 0.6931471805599453094172321214581 == 0.693147180559945286227 True >>> 0.6931471805599453094172321214581 0.6931471805599453 >>> 0.693147180559945286227 0.6931471805599453 Strictly speaking any of the numbers in your initial message are wrong. It's not possible to express ln2 is a number of finite length. The approximations are usually good enough, though. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 16:12:01 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 06 Feb 2018 21:12:01 +0000 Subject: [issue5594] IDLE: execute stored startup code on each Shell start. In-Reply-To: <1238311210.52.0.532490988344.issue5594@psf.upfronthosting.co.za> Message-ID: <1517951521.41.0.467229070634.issue5594@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: -5367 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 16:35:15 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 06 Feb 2018 21:35:15 +0000 Subject: [issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x In-Reply-To: <1516595654.84.0.467229070634.issue32616@psf.upfronthosting.co.za> Message-ID: <1517952915.52.0.467229070634.issue32616@psf.upfronthosting.co.za> Ned Deily added the comment: Quick test: there doesn't seem to be a similar regression when building 3.6 with the current clang provided by Xcode 9.2, just with 2.7. And both 2.7 and 3.6 configure HAVE_COMPUTED_GOTOS on. Benjamin? (FWIW, the 2.7.x binaries provided by the python.org installers do not suffer from this performance regression as they are not built with clang.) ---------- components: -macOS nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 18:00:29 2018 From: report at bugs.python.org (Julien Palard) Date: Tue, 06 Feb 2018 23:00:29 +0000 Subject: [issue32430] Simplify Modules/Setup{,.dist,.local} In-Reply-To: <1514373303.98.0.213398074469.issue32430@psf.upfronthosting.co.za> Message-ID: <1517958029.95.0.467229070634.issue32430@psf.upfronthosting.co.za> Julien Palard added the comment: Taking arguments into account, this solution may work: - Continue to distribute a Setup.dist - Add a configure option to change it, as Victor said --setup-file should do it, the default value should be Setup.dist - Remove the `cp Setup.dist Setup` This solution fixes the issue32429 as there is no longer a copy, it does not starts to track the Setup file so it should nor introduce any issue while switching to and from branches with this modification, and allow one to have multiple named configurations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 19:00:01 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 07 Feb 2018 00:00:01 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517961601.96.0.467229070634.issue32394@psf.upfronthosting.co.za> Steve Dower added the comment: In this case I like the flags disappearing on older versions, just as they would if you built CPython on a version of Linux that didn't have the flags. The problem is that the Windows SDK always defines enum values for all Windows versions even if you are targeting an older version, as most APIs silently ignore unknown flags. Since there's no way to reliably remove the flags at build time, it'll have to be done at import time. In Python, existence normally implies availability, so we should maintain that here, especially since this API raises errors with these flags. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 19:02:54 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 07 Feb 2018 00:02:54 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517961774.57.0.467229070634.issue32394@psf.upfronthosting.co.za> Steve Dower added the comment: Oh, and checking Windows version is hard. Better for us to get it right than every single library to risk getting it wrong. (The code used in the second PR is not right - there are IsWindowsVersion* macros that are better.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 19:14:57 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 07 Feb 2018 00:14:57 +0000 Subject: [issue32783] ln(2) isn't accurate in _math.c in cpython In-Reply-To: <1517950073.47.0.467229070634.issue32783@psf.upfronthosting.co.za> Message-ID: <1517962497.73.0.467229070634.issue32783@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Thanks for the link to the Stackoverflow discussion. Currently there are three answers: two (correctly) answer that the constant as given is the most accurate value for IEEE-754 floats. Tim Peters has answered that: https://stackoverflow.com/a/48653387 "Either way, the code ensures the best 53-bit approximation to log(2) will be used." so there is no other value that ln2 can be given that is more accurate given the limitation of 53-bits. https://stackoverflow.com/a/48653387 The difference between the given value and the mathematically precise value is not a bug but intentional. I'm not closing this ticket as I think that this should be documented in the source, to prevent future confusion. ---------- nosy: +steven.daprano, tim.peters stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 19:45:18 2018 From: report at bugs.python.org (aicirbs) Date: Wed, 07 Feb 2018 00:45:18 +0000 Subject: [issue6135] subprocess seems to use local encoding and give no choice In-Reply-To: <1243494524.57.0.870766192683.issue6135@psf.upfronthosting.co.za> Message-ID: <1517964318.04.0.467229070634.issue6135@psf.upfronthosting.co.za> Change by aicirbs : ---------- pull_requests: +5389 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 19:46:33 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 07 Feb 2018 00:46:33 +0000 Subject: [issue6135] subprocess seems to use local encoding and give no choice In-Reply-To: <1243494524.57.0.870766192683.issue6135@psf.upfronthosting.co.za> Message-ID: <1517964393.74.0.467229070634.issue6135@psf.upfronthosting.co.za> Gregory P. Smith added the comment: New changeset fc1ce810f1da593648b4d19e7d582a235ec1dd37 by Gregory P. Smith (Brice Gros) in branch 'master': bpo-6135: Fix subprocess.check_output doc to mention changes in 3.6 (GH-5564) https://github.com/python/cpython/commit/fc1ce810f1da593648b4d19e7d582a235ec1dd37 ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 19:47:38 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 07 Feb 2018 00:47:38 +0000 Subject: [issue6135] subprocess seems to use local encoding and give no choice In-Reply-To: <1243494524.57.0.870766192683.issue6135@psf.upfronthosting.co.za> Message-ID: <1517964458.69.0.467229070634.issue6135@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5390 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 19:48:37 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 07 Feb 2018 00:48:37 +0000 Subject: [issue6135] subprocess seems to use local encoding and give no choice In-Reply-To: <1243494524.57.0.870766192683.issue6135@psf.upfronthosting.co.za> Message-ID: <1517964517.63.0.467229070634.issue6135@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5391 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 20:12:12 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 07 Feb 2018 01:12:12 +0000 Subject: [issue6135] subprocess seems to use local encoding and give no choice In-Reply-To: <1243494524.57.0.870766192683.issue6135@psf.upfronthosting.co.za> Message-ID: <1517965932.55.0.467229070634.issue6135@psf.upfronthosting.co.za> Gregory P. Smith added the comment: New changeset 4e7a964aaf4374fa2f6b45cf5161fa6cd53aec19 by Gregory P. Smith (Miss Islington (bot)) in branch '3.7': bpo-6135: Fix subprocess.check_output doc to mention changes in 3.6 (GH-5564) (GH-5572) https://github.com/python/cpython/commit/4e7a964aaf4374fa2f6b45cf5161fa6cd53aec19 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 20:14:22 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 07 Feb 2018 01:14:22 +0000 Subject: [issue32720] Format mini-language integer definition is incorrect In-Reply-To: <1517287529.39.0.467229070634.issue32720@psf.upfronthosting.co.za> Message-ID: <1517966062.79.0.467229070634.issue32720@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset a747cf6d9b87ea8c7ce3a42d09e5b966c8e83fa0 by Mariatta (Miss Islington (bot)) in branch '3.7': bpo-32720: Fixed the replacement field grammar documentation. (GH-5544) (GH-5546) https://github.com/python/cpython/commit/a747cf6d9b87ea8c7ce3a42d09e5b966c8e83fa0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 20:51:05 2018 From: report at bugs.python.org (cowlinator) Date: Wed, 07 Feb 2018 01:51:05 +0000 Subject: [issue32784] Wrong argument name for csv.DictReader in documentation Message-ID: <1517968265.54.0.467229070634.issue32784@psf.upfronthosting.co.za> New submission from cowlinator : The documentation for the csv.DictReader constructor (and presumably csv.DictWriter also) has the wrong name written for the first argument. This prevents the argument from being called by name. >>> file = open("file.txt", 'a') >>> csv.DictReader(csvfile=file) Traceback (most recent call last): File "", line 1, in TypeError: __init__() takes at least 2 arguments (1 given) >>> csv.DictReader(f=file) >>> # how could i have known it was named 'f'? Please change the documentation. ---------- messages: 311759 nosy: cowlinator priority: normal severity: normal status: open title: Wrong argument name for csv.DictReader in documentation versions: Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 21:11:33 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 07 Feb 2018 02:11:33 +0000 Subject: [issue6135] subprocess seems to use local encoding and give no choice In-Reply-To: <1243494524.57.0.870766192683.issue6135@psf.upfronthosting.co.za> Message-ID: <1517969493.95.0.467229070634.issue6135@psf.upfronthosting.co.za> Gregory P. Smith added the comment: New changeset 7f95c8c319c1ee593b130d0eb1d4947d9d7e008a by Gregory P. Smith (Miss Islington (bot)) in branch '3.6': bpo-6135: Fix subprocess.check_output doc to mention changes in 3.6 (GH-5564) (GH-5573) https://github.com/python/cpython/commit/7f95c8c319c1ee593b130d0eb1d4947d9d7e008a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 21:27:37 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 07 Feb 2018 02:27:37 +0000 Subject: [issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x In-Reply-To: <1516595654.84.0.467229070634.issue32616@psf.upfronthosting.co.za> Message-ID: <1517970457.78.0.467229070634.issue32616@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- keywords: +patch pull_requests: +5392 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 21:49:05 2018 From: report at bugs.python.org (R. David Murray) Date: Wed, 07 Feb 2018 02:49:05 +0000 Subject: [issue32784] Wrong argument name for csv.DictReader in documentation In-Reply-To: <1517968265.54.0.467229070634.issue32784@psf.upfronthosting.co.za> Message-ID: <1517971745.43.0.467229070634.issue32784@psf.upfronthosting.co.za> R. David Murray added the comment: In the python3 docs it is given as 'f'. In the python2 docs, it is not. I suppose a doc backport was missed. ---------- nosy: +r.david.murray versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 22:01:48 2018 From: report at bugs.python.org (Tim Peters) Date: Wed, 07 Feb 2018 03:01:48 +0000 Subject: [issue32783] ln(2) isn't accurate in _math.c in cpython In-Reply-To: <1517950073.47.0.467229070634.issue32783@psf.upfronthosting.co.za> Message-ID: <1517972508.0.0.467229070634.issue32783@psf.upfronthosting.co.za> Tim Peters added the comment: As I mentioned on StackOverflow, the literal in question appears to have been crafted to convert to the best possible 53-bit binary approximation to log(2) regardless of whether a compiler converts it to double precision (53 bits of precision) or to "double extended" (64 bits of precision). In the latter case, the literal is such that the "extra" trailing 11 bits are all zeroes. Since I doubt that's a potential issue anymore, even trying to document it would be confusing too ;-) So while I'll defer to Mark, I'm inclined to just close this as "not a bug". Math libraries typically bristle with code that's baffling to the uninitiated, and comments about things that don't matter can get in the way. The only thing a libm developer cares about here is whether or not the literal converts to the best double approximation to log(2) - and it does. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 6 23:10:34 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 07 Feb 2018 04:10:34 +0000 Subject: [issue32784] Wrong argument name for csv.DictReader in documentation In-Reply-To: <1517968265.54.0.467229070634.issue32784@psf.upfronthosting.co.za> Message-ID: <1517976634.44.0.467229070634.issue32784@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Side-note: You say "how could i have known it was named 'f'?" >>> help(csv.DictReader) class DictReader | Methods defined here: | | __init__(self, f, fieldnames=None, restkey=None, restval=None, dialect='excel', *args, **kwds) ... rest of class help ... Not saying the docs shouldn't be fixed, but the name is correctly given in the __init__ prototype (being implemented in Python, the names are always available to help() introspection, barring really specific cases of manual parsing of **kwargs). Just a general tip for the future. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 01:08:36 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Wed, 07 Feb 2018 06:08:36 +0000 Subject: [issue32751] wait_for(future, ...) should wait for the future (even if a timeout occurs) In-Reply-To: <1517601675.34.0.467229070634.issue32751@psf.upfronthosting.co.za> Message-ID: <1517983716.09.0.467229070634.issue32751@psf.upfronthosting.co.za> Nathaniel Smith added the comment: If a task refuses to be cancelled, then is waiting for it forever actually wrong? That's the same thing as happens if I do 'task.cancel(); await task', right? Currently wait_for will abandon such a task, but then it's still left running in the background indefinitely (creating a memory leak or worse). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 01:27:44 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 07 Feb 2018 06:27:44 +0000 Subject: [issue32784] Wrong argument name for csv.DictReader in documentation In-Reply-To: <1517968265.54.0.467229070634.issue32784@psf.upfronthosting.co.za> Message-ID: <1517984864.79.0.467229070634.issue32784@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- keywords: +patch pull_requests: +5393 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 01:33:04 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 07 Feb 2018 06:33:04 +0000 Subject: [issue32784] Wrong argument name for csv.DictReader in documentation In-Reply-To: <1517968265.54.0.467229070634.issue32784@psf.upfronthosting.co.za> Message-ID: <1517985184.45.0.467229070634.issue32784@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I just fixed the documentation, but I think we should change the name of the first parameter in master for 3.8. Maybe for 3.7, because we have to fix the docs. @david, what is your opinion? I am going to propose a PR for the naming of the first argument ---------- keywords: +needs review -patch nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 01:56:02 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 07 Feb 2018 06:56:02 +0000 Subject: [issue32785] Change the name of the 'f' argument of csv.DictReader and csv.DictWriter Message-ID: <1517986562.49.0.467229070634.issue32785@psf.upfronthosting.co.za> New submission from St?phane Wirtel : The name of the first argument of csv.DictReader and csv.DictWriter is 'f', I propose to rename it to 'csvfile' to be more consistent. It's just a small refactoring based on the issue #32784 ---------- messages: 311766 nosy: matrixise priority: normal severity: normal status: open title: Change the name of the 'f' argument of csv.DictReader and csv.DictWriter versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 02:00:20 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Feb 2018 07:00:20 +0000 Subject: [issue32785] Change the name of the 'f' argument of csv.DictReader and csv.DictWriter In-Reply-To: <1517986562.49.0.467229070634.issue32785@psf.upfronthosting.co.za> Message-ID: <1517986820.92.0.467229070634.issue32785@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Duplicate of issue16026. ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> csv.DictReader argument names documented incorrectly _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 02:04:29 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Feb 2018 07:04:29 +0000 Subject: [issue32784] Wrong argument name for csv.DictReader in documentation In-Reply-To: <1517968265.54.0.467229070634.issue32784@psf.upfronthosting.co.za> Message-ID: <1517987069.88.0.467229070634.issue32784@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See issue16026 for the fix in 3.x. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 02:19:38 2018 From: report at bugs.python.org (Eric Wieser) Date: Wed, 07 Feb 2018 07:19:38 +0000 Subject: [issue32782] ctypes: memoryview gives incorrect PEP3118 itemsize for array of length zero In-Reply-To: <1517943201.04.0.467229070634.issue32782@psf.upfronthosting.co.za> Message-ID: <1517987978.05.0.467229070634.issue32782@psf.upfronthosting.co.za> Change by Eric Wieser : ---------- keywords: +patch pull_requests: +5394 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 02:34:07 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 07 Feb 2018 07:34:07 +0000 Subject: [issue32784] Wrong argument name for csv.DictReader in documentation In-Reply-To: <1517968265.54.0.467229070634.issue32784@psf.upfronthosting.co.za> Message-ID: <1517988847.81.0.467229070634.issue32784@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi @Serhiy I try to use the cherry-picking method for the patch from 3.6 but without success, I preferred to reuse my initial commit and remove the News.d entry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 02:35:50 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 07 Feb 2018 07:35:50 +0000 Subject: [issue32785] Change the name of the 'f' argument of csv.DictReader and csv.DictWriter In-Reply-To: <1517986562.49.0.467229070634.issue32785@psf.upfronthosting.co.za> Message-ID: <1517988950.23.0.467229070634.issue32785@psf.upfronthosting.co.za> St?phane Wirtel added the comment: thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 02:37:54 2018 From: report at bugs.python.org (Myungseo Kang) Date: Wed, 07 Feb 2018 07:37:54 +0000 Subject: [issue32786] Didnot work strftime() when hangeul in format sting Message-ID: <1517989074.34.0.467229070634.issue32786@psf.upfronthosting.co.za> New submission from Myungseo Kang : Good morning. I have a question while writing Python code in Django. I got empty string when I ran code in a screenshot. But it works in python interprerter(python manage.py shell). I don't know why it works or didn't work. I think maybe hangeul is related. Please confirm this issue. I used Django 1.11, Python 3.4.4 version. ---------- components: Argument Clinic files: ?????????? 2018-02-07 ???? 3.24.05.png messages: 311771 nosy: larry, leop0ld priority: normal severity: normal status: open title: Didnot work strftime() when hangeul in format sting type: behavior versions: Python 3.4 Added file: https://bugs.python.org/file47427/?????????? 2018-02-07 ???? 3.24.05.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 02:39:42 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 07 Feb 2018 07:39:42 +0000 Subject: [issue32768] object.__new__ does not accept arguments if __bases__ is changed In-Reply-To: <1517781912.98.0.467229070634.issue32768@psf.upfronthosting.co.za> Message-ID: <1517989182.78.0.467229070634.issue32768@psf.upfronthosting.co.za> Nick Coghlan added the comment: >From VA's description of the intended use case, this actually sounds a bit like a variant of https://bugs.python.org/issue29944: one reason that replacing C with a new dynamically constructed type won't work reliably is because some of the methods might have captured references to the original type via closure cells, so zero-arg super() will still fail, even if you rebind the name at the module level. Even __set_name__ can't reliably help with that, since it would rely on every descriptor passing on the __set_name__ call to wrapped objects. While the problem likely isn't fixable for the class-cloning case, we may be able to do something about the class-replacement case by exposing the zero-arg super() class cell as an attribute on the class object. If we did that, then methods on the original class could be pointed at the new class by doing "original_class.__classcell__.cell_contents = new_class". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 03:01:20 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 07 Feb 2018 08:01:20 +0000 Subject: [issue32751] wait_for(future, ...) should wait for the future (even if a timeout occurs) In-Reply-To: <1517601675.34.0.467229070634.issue32751@psf.upfronthosting.co.za> Message-ID: <1517990480.84.0.467229070634.issue32751@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Agree. Should we report about cancelled but still executing tasks? It would be a nice feature. I'm talking not about `wait_for` only but task cancellation in general. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 03:04:04 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 07 Feb 2018 08:04:04 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1517990644.63.0.467229070634.issue32394@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Ok ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 03:21:27 2018 From: report at bugs.python.org (Eryk Sun) Date: Wed, 07 Feb 2018 08:21:27 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1517991687.8.0.467229070634.issue31961@psf.upfronthosting.co.za> Eryk Sun added the comment: If a PathLike args value is supported in Windows, then it must be processed through list2cmdline, in case it needs to be quoted. Also, the preferred usage is to pass args as a list when shell is false. This common case shouldn't be penalized as a TypeError. Also, passing `executable` as PathLike should be supported, as is already the case in the POSIX implementation. For example. _execute_child: if executable is not None and not isinstance(executable, str): executable = os.fsdecode(executable) if not isinstance(args, str): try: args = list2cmdline(args) except TypeError: if isinstance(args, bytes): args = os.fsdecode(args) elif isinstance(args, os.PathLike): args = list2cmdline([args]) else: raise list2cmdline should support PathLike arguments via os.fsdecode. This removes an existing inconsistency since the POSIX implementation converts args via PyUnicode_FSConverter in Modules/_posixsubprocess.c. For example: list2cmdline: for arg in seq: if not isinstance(arg, str): arg = os.fsdecode(arg) Finally, passing args as a string when shell is false can never be deprecated on Windows. list2cmdline works in most cases, but Windows CreateProcess takes a command line, and applications are free to parse the command line however they want. IMHO, the case that should be deprecated is passing args as a list/sequence when shell is true. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 03:46:38 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Wed, 07 Feb 2018 08:46:38 +0000 Subject: [issue32751] wait_for(future, ...) should wait for the future (even if a timeout occurs) In-Reply-To: <1517601675.34.0.467229070634.issue32751@psf.upfronthosting.co.za> Message-ID: <1517993198.01.0.467229070634.issue32751@psf.upfronthosting.co.za> Nathaniel Smith added the comment: How do you tell the difference between a cancelled task that's about to exit, and one that will never exit? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 04:08:31 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 07 Feb 2018 09:08:31 +0000 Subject: [issue32751] wait_for(future, ...) should wait for the future (even if a timeout occurs) In-Reply-To: <1517601675.34.0.467229070634.issue32751@psf.upfronthosting.co.za> Message-ID: <1517994511.52.0.467229070634.issue32751@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Theoretically we can start monitoring cancelled tasks and report about them if the task is still not finished, say, in a minute or two. It is a new feature, sure. I'm fine with waiting for cancelled task in wait_for(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 04:19:32 2018 From: report at bugs.python.org (Po-Hsu Lin) Date: Wed, 07 Feb 2018 09:19:32 +0000 Subject: [issue32781] lzh_tw is missing in locale.py In-Reply-To: <1517905073.42.0.467229070634.issue32781@psf.upfronthosting.co.za> Message-ID: <1517995172.37.0.467229070634.issue32781@psf.upfronthosting.co.za> Po-Hsu Lin added the comment: Yes I think you are right, return None sounds like a good approach to me as we might have zh_TW translated but not lzh_TW. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 04:47:32 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 07 Feb 2018 09:47:32 +0000 Subject: [issue32786] Didnot work strftime() when hangeul in format sting In-Reply-To: <1517989074.34.0.467229070634.issue32786@psf.upfronthosting.co.za> Message-ID: <20180207094726.GA17254@xps.casernes.local> St?phane Wirtel added the comment: Thank you for your contribution, Just one question, do you have the same issue with Python 3.6 because Python 3.4 is a security release, Python 3.6 is a bugfix release. Thank you, ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 05:07:24 2018 From: report at bugs.python.org (Roundup Robot) Date: Wed, 07 Feb 2018 10:07:24 +0000 Subject: [issue29248] os.readlink fails on Windows In-Reply-To: <1484208560.98.0.375529555783.issue29248@psf.upfronthosting.co.za> Message-ID: <1517998044.98.0.467229070634.issue29248@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +5395 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 05:09:40 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 07 Feb 2018 10:09:40 +0000 Subject: [issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x In-Reply-To: <1516595654.84.0.467229070634.issue32616@psf.upfronthosting.co.za> Message-ID: <1517998180.13.0.467229070634.issue32616@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 2942b909d9a428e6683d90b3436cfa4a81bd5d8a by INADA Naoki in branch '2.7': bpo-32616: Disable computed gotos by default for clang < 5 (GH-5574) https://github.com/python/cpython/commit/2942b909d9a428e6683d90b3436cfa4a81bd5d8a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 05:16:16 2018 From: report at bugs.python.org (SSE4) Date: Wed, 07 Feb 2018 10:16:16 +0000 Subject: [issue29248] os.readlink fails on Windows In-Reply-To: <1484208560.98.0.375529555783.issue29248@psf.upfronthosting.co.za> Message-ID: <1517998576.44.0.467229070634.issue29248@psf.upfronthosting.co.za> SSE4 added the comment: opened PR https://github.com/python/cpython/pull/5577 ---------- nosy: +SSE4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 05:28:08 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 07 Feb 2018 10:28:08 +0000 Subject: [issue1100942] Add datetime.time.strptime and datetime.date.strptime Message-ID: <1517999288.95.0.467229070634.issue1100942@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- pull_requests: +5396 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 05:34:53 2018 From: report at bugs.python.org (Thomas Arendsen Hein) Date: Wed, 07 Feb 2018 10:34:53 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1517999693.95.0.467229070634.issue16202@psf.upfronthosting.co.za> Thomas Arendsen Hein added the comment: I just stumbled across this problem when starting "idle3" in a directory containing a copy of textwrap.py which was not compatible with python3. In issue13506 idle3 was changed to behave like the regular python shell, i.e. as described here in this issue, and since my ~/.pythonrc.py imports readline, I could reproduce this problem by creating a bogus readline.py file and starting a python interpreter. So besides being a security issue when starting python or idle in untrusted directories, it may cause technical issues when working in directories containing .py files with certain names. ---------- nosy: +ThomasAH _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 05:41:02 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 07 Feb 2018 10:41:02 +0000 Subject: [issue1100942] Add datetime.time.strptime and datetime.date.strptime Message-ID: <1518000062.45.0.467229070634.issue1100942@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I have updated the patch for 3.8, create a PR and fixed the documentation of _strptime._strptime, because this function returns a 3-tuple and not a 2-tuple as indicated in its comment. Thank you ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 06:02:53 2018 From: report at bugs.python.org (Larry Hastings) Date: Wed, 07 Feb 2018 11:02:53 +0000 Subject: [issue32786] Didnot work strftime() when hangeul in format sting In-Reply-To: <1517989074.34.0.467229070634.issue32786@psf.upfronthosting.co.za> Message-ID: <1518001373.64.0.467229070634.issue32786@psf.upfronthosting.co.za> Larry Hastings added the comment: This is not an Argument Clinic problem. ---------- components: +Library (Lib) -Argument Clinic _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 06:46:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Feb 2018 11:46:10 +0000 Subject: [issue32787] Better error handling in ctypes Message-ID: <1518003970.21.0.467229070634.issue32787@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The proposed patch makes unexpected errors raised when look up an attribute or a key in a dict (like MemoryError, KeyboardInterrupt, etc) be leaked to a user instead of be overridden by TypeError or AttributeError. ---------- components: Extension Modules, ctypes messages: 311785 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Better error handling in ctypes type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 06:46:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Feb 2018 11:46:47 +0000 Subject: [issue32787] Better error handling in ctypes In-Reply-To: <1518003970.21.0.467229070634.issue32787@psf.upfronthosting.co.za> Message-ID: <1518004007.89.0.467229070634.issue32787@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +5397 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 06:49:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Feb 2018 11:49:42 +0000 Subject: [issue32787] Better error handling in ctypes In-Reply-To: <1518003970.21.0.467229070634.issue32787@psf.upfronthosting.co.za> Message-ID: <1518004182.13.0.467229070634.issue32787@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +amaury.forgeotdarc, belopolsky, meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 07:01:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Feb 2018 12:01:54 +0000 Subject: [issue32788] Better error handling in sqlite3 Message-ID: <1518004914.65.0.467229070634.issue32788@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The proposed patch makes unexpected errors raised when look up an attribute or a key in a dict (like MemoryError, KeyboardInterrupt, etc) be leaked to a user instead of be overridden by TypeError or AttributeError. ---------- components: Extension Modules messages: 311786 nosy: ghaering, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Better error handling in sqlite3 type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 07:03:00 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Feb 2018 12:03:00 +0000 Subject: [issue32788] Better error handling in sqlite3 In-Reply-To: <1518004914.65.0.467229070634.issue32788@psf.upfronthosting.co.za> Message-ID: <1518004980.53.0.467229070634.issue32788@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +5398 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 07:04:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Feb 2018 12:04:43 +0000 Subject: [issue31572] Avoid suppressing all exceptions in PyObject_HasAttr() In-Reply-To: <1506275205.91.0.662869765666.issue31572@psf.upfronthosting.co.za> Message-ID: <1518005083.81.0.467229070634.issue31572@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- dependencies: +Better error handling in ctypes, Better error handling in sqlite3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 07:06:56 2018 From: report at bugs.python.org (R. David Murray) Date: Wed, 07 Feb 2018 12:06:56 +0000 Subject: [issue32784] Wrong argument name for csv.DictReader in documentation In-Reply-To: <1517968265.54.0.467229070634.issue32784@psf.upfronthosting.co.za> Message-ID: <1518005216.06.0.467229070634.issue32784@psf.upfronthosting.co.za> R. David Murray added the comment: St?phane: I don't understand your question about changing the name of the parameter. As far as I can see the only thing to do here is backport the doc fix to 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 07:26:34 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 07 Feb 2018 12:26:34 +0000 Subject: [issue32784] Wrong argument name for csv.DictReader in documentation In-Reply-To: <1517968265.54.0.467229070634.issue32784@psf.upfronthosting.co.za> Message-ID: <1518006394.16.0.467229070634.issue32784@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi David, At the final, I didn't propose my PR with the renaming. because PyPy and CPython use f as the first parameter of these classes. If @Serhiy does the review of my PR, we can close this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 07:35:21 2018 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 07 Feb 2018 12:35:21 +0000 Subject: [issue32783] ln(2) isn't accurate in _math.c in cpython In-Reply-To: <1517950073.47.0.467229070634.issue32783@psf.upfronthosting.co.za> Message-ID: <1518006921.55.0.467229070634.issue32783@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I'm inclined to just close this as "not a bug". Sounds good to me. The ideal would probably be to use a hex literal here. They're part of C99 (see section 6.4.4.2), but last time I checked Visual Studio didn't support them. I don't know whether that's changed recently. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 08:35:29 2018 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 07 Feb 2018 13:35:29 +0000 Subject: [issue32783] ln(2) isn't accurate in _math.c in cpython In-Reply-To: <1517950073.47.0.467229070634.issue32783@psf.upfronthosting.co.za> Message-ID: <1518010529.25.0.467229070634.issue32783@psf.upfronthosting.co.za> Mark Dickinson added the comment: Closing. There's no actual bug here. ---------- resolution: -> not a bug stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 10:46:00 2018 From: report at bugs.python.org (Stefan Pochmann) Date: Wed, 07 Feb 2018 15:46:00 +0000 Subject: [issue32767] Mutating a list while iterating: clarify the docs In-Reply-To: <1517772420.88.0.467229070634.issue32767@psf.upfronthosting.co.za> Message-ID: <1518018360.17.0.467229070634.issue32767@psf.upfronthosting.co.za> Stefan Pochmann added the comment: And `bytearray`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 10:53:39 2018 From: report at bugs.python.org (Pedro) Date: Wed, 07 Feb 2018 15:53:39 +0000 Subject: [issue32789] Note missing from logging.debug() docs Message-ID: <1518018819.58.0.467229070634.issue32789@psf.upfronthosting.co.za> New submission from Pedro : The docs for Logger.debug() (https://docs.python.org/3/library/logging.html#logging.Logger.debug) specify that exc_info can take an exception instance as of version 3.5. However, the docs for logging.debug() (https://docs.python.org/3/library/logging.html#logging.debug) do not, even though logging.debug() redirects to an instance of Logger and so can take the same types of arguments. ---------- assignee: docs at python components: Documentation messages: 311792 nosy: docs at python, pgacv2 priority: normal severity: normal status: open title: Note missing from logging.debug() docs type: enhancement versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 11:01:32 2018 From: report at bugs.python.org (Pedro) Date: Wed, 07 Feb 2018 16:01:32 +0000 Subject: [issue32789] Note missing from logging.debug() docs In-Reply-To: <1518018819.58.0.467229070634.issue32789@psf.upfronthosting.co.za> Message-ID: <1518019292.52.0.467229070634.issue32789@psf.upfronthosting.co.za> Pedro added the comment: Might be cleaner to just say, "The arguments are interpreted as for debug/info/warning/error/critical/exception/log," but with the bookmark URL pointing to the Logger methods. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 11:05:42 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 07 Feb 2018 16:05:42 +0000 Subject: [issue32784] Wrong argument name for csv.DictReader in documentation In-Reply-To: <1517968265.54.0.467229070634.issue32784@psf.upfronthosting.co.za> Message-ID: <1518019542.37.0.467229070634.issue32784@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 672fd7d8162f76aff8423fa5c7bfd2b1e91faf57 by Mariatta (St?phane Wirtel) in branch '2.7': bpo-32784: Wrong argument name for csv.DictReader in documentation (GH-5575) https://github.com/python/cpython/commit/672fd7d8162f76aff8423fa5c7bfd2b1e91faf57 ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 11:07:00 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 07 Feb 2018 16:07:00 +0000 Subject: [issue32784] Wrong argument name for csv.DictReader in documentation In-Reply-To: <1517968265.54.0.467229070634.issue32784@psf.upfronthosting.co.za> Message-ID: <1518019620.62.0.467229070634.issue32784@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks everyone! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 11:09:37 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 07 Feb 2018 16:09:37 +0000 Subject: [issue32769] Add 'annotations' to the glossary Message-ID: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> New submission from St?phane Wirtel : There is a description of the annotation in the Glossary, but with 'function annotation' maybe we could rename 'function annotation' by 'annotation' ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 11:17:38 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 07 Feb 2018 16:17:38 +0000 Subject: [issue31937] Add the term "dunder" to the glossary In-Reply-To: <1509742669.66.0.213398074469.issue31937@psf.upfronthosting.co.za> Message-ID: <1518020258.37.0.467229070634.issue31937@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- keywords: +patch pull_requests: +5399 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 11:18:10 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 07 Feb 2018 16:18:10 +0000 Subject: [issue31937] Add the term "dunder" to the glossary In-Reply-To: <1509742669.66.0.213398074469.issue31937@psf.upfronthosting.co.za> Message-ID: <1518020290.1.0.467229070634.issue31937@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Just added the term in the glossary If you want to review this PR, thank you ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 12:17:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Feb 2018 17:17:38 +0000 Subject: [issue32775] fnmatch.translate() can produce a pattern which emits a nested set warning In-Reply-To: <1517861242.52.0.467229070634.issue32775@psf.upfronthosting.co.za> Message-ID: <1518023858.4.0.467229070634.issue32775@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +5400 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 12:29:14 2018 From: report at bugs.python.org (R. David Murray) Date: Wed, 07 Feb 2018 17:29:14 +0000 Subject: [issue31937] Add the term "dunder" to the glossary In-Reply-To: <1509742669.66.0.213398074469.issue31937@psf.upfronthosting.co.za> Message-ID: <1518024554.66.0.467229070634.issue31937@psf.upfronthosting.co.za> R. David Murray added the comment: EAFP and BDFL are not python folk terminology (the former never was, the latter may have originated with us but it has widespread use). They are also acronyms. 'dunder' is the phonetic spelling of a way of pronouncing punctuation. Raymond's examples of 'stir' and 'repper' are similar: phonetic spellings of ways of pronouncing something that isn't a word. It seems to me that such phonetic spellings do no belong in the glossary. The counter argument is that unlike the other two 'dunder' does appear *occasionally* in text...but the only place it appears in our documentation (that I can find via grep) is in the enum docs, and there it should be replaced by the correct term "special methods", especially since it there it is spelled "__dunder__". For 'stir' and 'repper' the text spelling is __str__/str and __repr__/repr, for 'dunder XXX' the correct text spelling is the special method name, and for the "dunder method" the correct spelling (and I would argue the correct pronunciation :) is "special method". That is, 'dunder' is mostly used in speech, not text. It is not a "word" in the sense that the rest of the glossary entries are. So, I vote with Raymond and others that this term does *not* belong in our glossary. I recommend closing this issue as rejected. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 14:53:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Feb 2018 19:53:02 +0000 Subject: [issue32585] Add ttk::spinbox to tkinter.ttk In-Reply-To: <1516209431.55.0.467229070634.issue32585@psf.upfronthosting.co.za> Message-ID: <1518033182.46.0.467229070634.issue32585@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Tests that are failing on my computer: ====================================================================== FAIL: test_command (tkinter.test.test_ttk.test_widgets.SpinboxTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/tkinter/test/test_ttk/test_widgets.py", line 1145, in test_command self.assertTrue(success) AssertionError: [] is not true ====================================================================== FAIL: test_format (tkinter.test.test_ttk.test_widgets.SpinboxTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/tkinter/test/test_ttk/test_widgets.py", line 1199, in test_format self.assertEqual(len(value), 10) AssertionError: 1 != 10 ====================================================================== FAIL: test_increment (tkinter.test.test_ttk.test_widgets.SpinboxTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/tkinter/test/test_ttk/test_widgets.py", line 1186, in test_increment self.assertEqual(self.spin.get(), '5') AssertionError: '1' != '5' - 1 + 5 ====================================================================== FAIL: test_to (tkinter.test.test_ttk.test_widgets.SpinboxTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/tkinter/test/test_ttk/test_widgets.py", line 1163, in test_to self.assertEqual(self.spin.get(), '5') AssertionError: '4' != '5' - 4 + 5 ====================================================================== FAIL: test_values (tkinter.test.test_ttk.test_widgets.SpinboxTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/tkinter/test/test_ttk/test_widgets.py", line 1248, in test_values self.assertEqual(self.spin.get(), '1') AssertionError: 'a' != '1' - a + 1 ====================================================================== FAIL: test_wrap (tkinter.test.test_ttk.test_widgets.SpinboxTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/tkinter/test/test_ttk/test_widgets.py", line 1220, in test_wrap self.assertEqual(self.spin.get(), '1') AssertionError: '10' != '1' - 10 ? - + 1 ---------------------------------------------------------------------- This may be a race condition depended on window manager or speed of CPU or GPU. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 15:07:12 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 07 Feb 2018 20:07:12 +0000 Subject: [issue31937] Add the term "dunder" to the glossary In-Reply-To: <1509742669.66.0.213398074469.issue31937@psf.upfronthosting.co.za> Message-ID: <1518034032.89.0.467229070634.issue31937@psf.upfronthosting.co.za> St?phane Wirtel added the comment: David, I have no objection to closing this issue and I totally agree with your comment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 15:34:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Feb 2018 20:34:18 +0000 Subject: [issue32585] Add ttk::spinbox to tkinter.ttk In-Reply-To: <1516209431.55.0.467229070634.issue32585@psf.upfronthosting.co.za> Message-ID: <1518035658.86.0.467229070634.issue32585@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is because of HiDPI display. Mouse events are generated with pixel coordinates (x=width - 5, y=5), but these coordinates are out of a button on scaled widget. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 15:41:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Feb 2018 20:41:03 +0000 Subject: [issue32585] Add ttk::spinbox to tkinter.ttk In-Reply-To: <1516209431.55.0.467229070634.issue32585@psf.upfronthosting.co.za> Message-ID: <1518036063.71.0.467229070634.issue32585@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If set DPI to low value, the size of a spinbox widget (winfo_width(), winfo_height()) is (185, 20), and the test is passed. If set it to high value, the size is (305, 30), and the test is failed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 16:21:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 07 Feb 2018 21:21:01 +0000 Subject: [issue32585] Add ttk::spinbox to tkinter.ttk In-Reply-To: <1516209431.55.0.467229070634.issue32585@psf.upfronthosting.co.za> Message-ID: <1518038461.71.0.467229070634.issue32585@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have fixed tests on HiDPI displays. Two issues are left: 1. test_command still fails randomly. Seems adding update_idletasks() invocation fixes this. And calling pack() looks redundant. 2. Following warnings are emitted: SpinboxTest.OPTIONS doesn't contain "exportselection" SpinboxTest.OPTIONS doesn't contain "font" SpinboxTest.OPTIONS doesn't contain "foreground" Just add these options to the list. Maybe conditionally if they are not supported in 8.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 16:40:43 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 07 Feb 2018 21:40:43 +0000 Subject: [issue30825] csv.Sniffer does not detect lineterminator In-Reply-To: <1498944224.71.0.636990812421.issue30825@psf.upfronthosting.co.za> Message-ID: <1518039643.92.0.467229070634.issue30825@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The csv expert listed in https://devguide.python.org/experts/ is marked as inactive, and I have never used the module. So you might need to ask for help on core-mentorship list. The csv doc for Sniffer.sniff says "Analyze the given sample and return a Dialect subclass reflecting the parameters found." It is not clear to me whether 'the parameters found' is meant to be all possible parameters or just those found. So, to be conservative, I will initially treat this an a feature addition for the the next version, rather than a bug to also be fixed in current versions. It does seem like a reasonable request. ---------- nosy: +skip.montanaro, terry.reedy type: behavior -> enhancement versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 16:45:02 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 07 Feb 2018 21:45:02 +0000 Subject: [issue30825] csv.Sniffer does not detect lineterminator In-Reply-To: <1498944224.71.0.636990812421.issue30825@psf.upfronthosting.co.za> Message-ID: <1518039902.65.0.467229070634.issue30825@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Looking at the code and docstring, lineterminator was intentionally (knowingly) not sniffed, making this a feature addition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 16:55:37 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 07 Feb 2018 21:55:37 +0000 Subject: [issue30825] csv.Sniffer does not detect lineterminator In-Reply-To: <1498944224.71.0.636990812421.issue30825@psf.upfronthosting.co.za> Message-ID: <1518040537.32.0.467229070634.issue30825@psf.upfronthosting.co.za> Terry J. Reedy added the comment: While Sniffer *returns* a dialect with lineterminator = '\r\n', it *uses* '\n' for splitting. This is slightly odd, as it leaves lines terminated by '\r' while detecting within-line parameters, but it does not affect such detection. Are there csv files in the wild that use \r as line terminator. If so, they will not currently get split. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 16:58:16 2018 From: report at bugs.python.org (Alan Moore) Date: Wed, 07 Feb 2018 21:58:16 +0000 Subject: [issue32585] Add ttk::spinbox to tkinter.ttk In-Reply-To: <1518038461.71.0.467229070634.issue32585@psf.upfronthosting.co.za> Message-ID: <4819dabe-0b08-d22d-68bf-399529ed80ee@alandmoore.com> Alan Moore added the comment: Thanks, I'm guessing? the update_idletasks() needed to be called after changing the value of command, since the button clicks do this as part of the method. If that's not right, let me know. I've added the options to the list and pushed the changes to the PR. On 02/07/2018 03:21 PM, Serhiy Storchaka wrote: > Serhiy Storchaka added the comment: > > I have fixed tests on HiDPI displays. Two issues are left: > > 1. test_command still fails randomly. Seems adding update_idletasks() invocation fixes this. And calling pack() looks redundant. > > 2. Following warnings are emitted: > > SpinboxTest.OPTIONS doesn't contain "exportselection" > SpinboxTest.OPTIONS doesn't contain "font" > SpinboxTest.OPTIONS doesn't contain "foreground" > > Just add these options to the list. Maybe conditionally if they are not supported in 8.5. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 16:59:17 2018 From: report at bugs.python.org (Jay Yin) Date: Wed, 07 Feb 2018 21:59:17 +0000 Subject: [issue32773] distutils should NOT preserve timestamps In-Reply-To: <1517846476.27.0.467229070634.issue32773@psf.upfronthosting.co.za> Message-ID: <1518040757.59.0.467229070634.issue32773@psf.upfronthosting.co.za> Jay Yin added the comment: would it be ok for me to make a patch for this as practice?, I will be making a PR though, I will be making the -- option available for backward compatibility. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 17:38:42 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 07 Feb 2018 22:38:42 +0000 Subject: [issue32706] test_check_hostname() of test_ftplib started to fail randomly In-Reply-To: <1517225256.94.0.467229070634.issue32706@psf.upfronthosting.co.za> Message-ID: <1518043122.56.0.467229070634.issue32706@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Yep, I'm seeing those same failures in our internal build of 3.7.0b1. I'll just disable the tests for now and nosy on this issue. ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 17:43:54 2018 From: report at bugs.python.org (Jay Yin) Date: Wed, 07 Feb 2018 22:43:54 +0000 Subject: [issue32773] distutils should NOT preserve timestamps In-Reply-To: <1517846476.27.0.467229070634.issue32773@psf.upfronthosting.co.za> Message-ID: <1518043434.71.0.467229070634.issue32773@psf.upfronthosting.co.za> Change by Jay Yin : ---------- keywords: +patch pull_requests: +5401 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 19:37:10 2018 From: report at bugs.python.org (Ma Lin) Date: Thu, 08 Feb 2018 00:37:10 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1518050230.88.0.467229070634.issue32394@psf.upfronthosting.co.za> Change by Ma Lin : ---------- pull_requests: +5403 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 19:38:31 2018 From: report at bugs.python.org (Ma Lin) Date: Thu, 08 Feb 2018 00:38:31 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1518050311.08.0.467229070634.issue32394@psf.upfronthosting.co.za> Ma Lin added the comment: Here is PR 5585 for 3.6 branch. For 3.7+, I would suggest patch in socketmodule.c like this: PyMODINIT_FUNC PyInit__socket(void) { PyObject *m, *has_ipv6; ... ... ... +#ifdef MS_WINDOWS + return remove_unusable_flags(m); +#else return m; +#endif } In this way, we handle the flags in a separated function remove_unusable_flags(m). It keeps both socket.py and socketmodule.c neat. Timelines FYI: 3.6.5 candidate: 2018-03-12 (tenative) 3.6.5 final: 2018-03-26 (tentative) 3.7.0 beta 2: 2018-02-26 3.7.0 beta 3: 2018-03-26 3.7.0 beta 4: 2018-04-30 > What's about other OS/flags? > Should we commit that every exposed socket flag is supported in runtime? > It looks like very heavy burden. I have an idea about this concern, I will post it after some experiments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 20:06:25 2018 From: report at bugs.python.org (Myungseo Kang) Date: Thu, 08 Feb 2018 01:06:25 +0000 Subject: [issue32786] Didnot work strftime() when hangeul in format sting In-Reply-To: <1517989074.34.0.467229070634.issue32786@psf.upfronthosting.co.za> Message-ID: <1518051985.04.0.467229070634.issue32786@psf.upfronthosting.co.za> Myungseo Kang added the comment: It works correctly in python 3.6 I think this problem is occured only python 3.4 First, I changed this code like below. ``` '{0:%Y}? {0:%-m}? {0:%-d}?'.format(proposal.hold_end_date) ``` But I wonder why doesn't work in only python 3.4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 20:14:09 2018 From: report at bugs.python.org (Larry Hastings) Date: Thu, 08 Feb 2018 01:14:09 +0000 Subject: [issue32786] Didnot work strftime() when hangeul in format sting In-Reply-To: <1517989074.34.0.467229070634.issue32786@psf.upfronthosting.co.za> Message-ID: <1518052449.67.0.467229070634.issue32786@psf.upfronthosting.co.za> Change by Larry Hastings : ---------- nosy: -larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 21:08:36 2018 From: report at bugs.python.org (=?utf-8?q?Severin_W=C3=BCnsch?=) Date: Thu, 08 Feb 2018 02:08:36 +0000 Subject: [issue32790] Keep trailing zeros in precision for string format option g Message-ID: <1518055716.96.0.467229070634.issue32790@psf.upfronthosting.co.za> New submission from Severin W?nsch : The documentation starts the the string format parameter 'g': General format. For a given precision p >= 1, this rounds the number to **p significant digits** and then formats the result in either fixed-point format or in scientific notation, depending on its magnitude. I think the behavior of format is inconsistent here: >>> format(0.1949, '.2g') returns '0.19' as expected but >>> format(0.1950, '.2g') returns '0.2' instead of '0.20' This behavior for float is in my opinion the correct one here >>> format(0.1950, '.2f') returns '0.20' ---------- messages: 311813 nosy: sk1d priority: normal severity: normal status: open title: Keep trailing zeros in precision for string format option g type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 7 22:25:27 2018 From: report at bugs.python.org (WilliamM) Date: Thu, 08 Feb 2018 03:25:27 +0000 Subject: [issue32791] Add\Remove Programs entry is not created. Message-ID: <1518060327.94.0.467229070634.issue32791@psf.upfronthosting.co.za> New submission from WilliamM : I've been writing a script for the Python 3.X install package and encountering some issues due to that. I'm using the installation property InstallAllUsers=1 but find that Python is still placing it's Add/Remove programs entry in user context. Applications usually write system level installs to HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall or HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall What I'm encountering with Python is that it's writing them to HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall This is causing some difficulty as it prevents software such as SCCM, KACE, Altiris from being able to detect the main program install or a user with elevated privileges from being able to remove it. Deploying the software will end up with the entry located the System Account's registry within HKU\S-5-1-18\Software\Microsoft\WIndows\CurrentVersion\Uninstall\{Prodct GUID} To add a bit more info, only the dependencies show up in HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall Python 3.6.4 TCL/TK support (32-Bit) Python 3.6.4 Development Libraries (32-Bit) Python 3.6.5 Documentation (32-Bit) Python 3.6.4 Utility Scripts (32-Bit) Python 3.6.4 Executables (32-Bit) Python launcher (32-Bit) Python 3.6.4 Test Suite (32-Bit) Python 3.6.4 Core Interpreter (32-Bit) Python 3.6.4 Standard Library (32-Bit) However the "Python 3.6.4 (32-Bit)" Install that has the installation and bundled uninstall package is located in HKU\S-1-5-18\Software\Microsoft\WIndows\CurrentVersion\Uninstall\{9218130b-5ad0-4cf7-82be-6993cfd6cb84} Is there a known workaround/solution for this or something that can be resolved in a later build? ---------- components: Windows messages: 311814 nosy: WilliamM, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Add\Remove Programs entry is not created. type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 01:30:20 2018 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 08 Feb 2018 06:30:20 +0000 Subject: [issue32431] Two bytes objects of zero length don't compare equal In-Reply-To: <1514387834.13.0.213398074469.issue32431@psf.upfronthosting.co.za> Message-ID: <1518071420.25.0.467229070634.issue32431@psf.upfronthosting.co.za> Xiang Zhang added the comment: In my mind I don't think here is any problem. The code val = PyBytes_FromStringAndSize (NULL, 20); Py_SIZE(val) = 0; doesn't create a zero length bytes object. A resizing I think should always means reorganizing the internal representation, including changing the size attribute. Using Py_SIZE won't trigger a full resizing. The code is not resizing but just breaks the internal representation and then leads to bugs. In C level, if you want, it's easy to muck Python objects. And exposing that much implementation details in documentation seems unnecessary. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 02:26:40 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 08 Feb 2018 07:26:40 +0000 Subject: [issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x In-Reply-To: <1516595654.84.0.467229070634.issue32616@psf.upfronthosting.co.za> Message-ID: <1518074800.56.0.467229070634.issue32616@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 03:14:27 2018 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 08 Feb 2018 08:14:27 +0000 Subject: [issue32790] Keep trailing zeros in precision for string format option g In-Reply-To: <1518055716.96.0.467229070634.issue32790@psf.upfronthosting.co.za> Message-ID: <1518077667.03.0.467229070634.issue32790@psf.upfronthosting.co.za> Mark Dickinson added the comment: The behaviour here is intentional, though the reasons for doing it this way are at least partly historical: it's the way that %g formatting works in C's *printf functions (see C99 7.19.6.1p8 for details), and as a direct result of that it's also the way that old-style %-based formatting works in Python. That behaviour then got transferred to the new-style .format-based formatting for consistency. I don't think we can or should change the current behaviour here: there's a significant risk of breaking existing code. However, note that C does offer an *alternate* mode for .g-style formatting, using the '#' character, and this is also available in Python's formatting, both %-based and format-based: >>> "%.2g" % 0.1950 '0.2' >>> "%#.2g" % 0.1950 '0.20' and >>> format(0.1950, '.2g') '0.2' >>> format(0.1950, '#.2g') '0.20' Does this meet your needs? ---------- nosy: +eric.smith, mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 03:46:17 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 08 Feb 2018 08:46:17 +0000 Subject: [issue32792] ChainMap should preserve order of underlying mappings Message-ID: <1518079577.65.0.467229070634.issue32792@psf.upfronthosting.co.za> New submission from Raymond Hettinger : This also applies to 3.6 because ChainMap can be used with OrderedDict. ---------- components: Library (Lib) messages: 311817 nosy: rhettinger priority: normal severity: normal status: open title: ChainMap should preserve order of underlying mappings type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 03:49:29 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 08 Feb 2018 08:49:29 +0000 Subject: [issue32792] ChainMap should preserve order of underlying mappings In-Reply-To: <1518079577.65.0.467229070634.issue32792@psf.upfronthosting.co.za> Message-ID: <1518079769.39.0.467229070634.issue32792@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +5404 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 04:05:18 2018 From: report at bugs.python.org (TaoQingyun) Date: Thu, 08 Feb 2018 09:05:18 +0000 Subject: [issue32793] smtplib: duplicated debug message Message-ID: <1518080718.92.0.467229070634.issue32793@psf.upfronthosting.co.za> New submission from TaoQingyun <845767657 at qq.com>: ``` if self.debuglevel > 0: self._print_debug('connect:', (host, port)) ``` The above both in _get_socket and connect method, and connect also invoke _get_socket. ---------- components: Library (Lib) files: smtp.patch keywords: patch messages: 311818 nosy: qingyunha priority: normal severity: normal status: open title: smtplib: duplicated debug message 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/file47428/smtp.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 04:07:52 2018 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 08 Feb 2018 09:07:52 +0000 Subject: [issue32794] PyNumber_Float counterpart that doesn't accept strings Message-ID: <1518080872.68.0.467229070634.issue32794@psf.upfronthosting.co.za> New submission from Mark Dickinson : Our abstract objects layer in the C-API includes PyNumber_Float [1], which is equivalent to a Python-level `float` call, including the behaviour of accepting strings. I'm not convinced that it's a particularly useful function: I suspect that it's more common to need to either convert a string to a float, or to convert a float-y object (i.e., something whose type implements __float__) to a float, but not both at once. The second need is precisely the one that most of the math module has: accept anything that implements __float__, but don't accept strings. Yesterday I found myself writing the following code for a 3rd-party extension module: static PyObject * _validate_float(PyObject *value) { double value_as_double; /* Fast path: avoid creating a new object if it's not necessary. */ if (PyFloat_CheckExact(value)) { Py_INCREF(value); return value; } value_as_double = PyFloat_AsDouble(value); if (value_as_double == -1.0 && PyErr_Occurred()) { return NULL; } return PyFloat_FromDouble(value_as_double); } Would it be worth adding a new C-API level function that does essentially the above? The semantics of such a function seem clear cut. The major problem would be figuring out what to call it, since to me PyNumber_Float is the one obvious name for such behaviour, but it's already taken. :-) Please note that I'm not suggesting removing / deprecating / changing the existing PyNumber_Float. That would amount to gratuitous breakage. [1] https://docs.python.org/3.6/c-api/number.html#c.PyNumber_Float ---------- components: Interpreter Core messages: 311819 nosy: mark.dickinson priority: normal severity: normal status: open title: PyNumber_Float counterpart that doesn't accept strings type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 04:11:07 2018 From: report at bugs.python.org (Mike Lewis) Date: Thu, 08 Feb 2018 09:11:07 +0000 Subject: [issue32795] subprocess.check_output() with timeout does not exit if child process does not generate output after timeout Message-ID: <1518081067.06.0.467229070634.issue32795@psf.upfronthosting.co.za> New submission from Mike Lewis : When using a timeout with check_output(), the call does not terminate unless the child process generates output after the timeout. Looking at the code, it appears there is a second call to communicate() after the timeout has happened, presumably to retrieve any remaining output. This call appears to hang until the child process generates output. I have two test cases (for Python 2.7 / subprocess32 and Python 3 / subprocess respectively). They show the same behaviour, the Python 2.7 version has been reproduced on Ubuntu 16.04.3 and Centos 7 and the Python 3 version on Ubuntu 16.043. Each test case has a first example where bash executes a long sleep before generating output and where the timeout is not respected, and a second example that generates output at intervals and the timeout is respected. Relevant code also attached below for reference: then = time.time() print("Subprocess with idle stdout at timeout: start at {}".format(then)) try: output = subprocess.check_output(["bash", "-c", "echo Subcall; sleep 5; echo Done;"], stderr=subprocess.STDOUT, timeout=1) now = time.time() print("Finish at: {}, {:.0f} seconds".format(now, now-then)) print(output) except subprocess.TimeoutExpired as te: now = time.time() print("Timed out at: {}, {:.0f} seconds".format(now, now-then)) then = time.time() print("Generating stdout from subprocess: start at ", then) try: output = subprocess.check_output(["bash", "-c", "echo Subcall; for i in 1 2 3 4 5; do sleep 1; echo $i; done; echo Done;"], stderr=subprocess.STDOUT, timeout=1) now = time.time() print("Finish at: {}, {:.0f} seconds".format(now, now-then)) print(output) except subprocess.TimeoutExpired as te: now = time.time() print("Timed out at: {}, {:.0f} seconds".format(now, now-then)) ---------- components: Library (Lib) files: timeout_examples.tgz messages: 311820 nosy: Mike Lewis priority: normal severity: normal status: open title: subprocess.check_output() with timeout does not exit if child process does not generate output after timeout type: behavior versions: Python 2.7, Python 3.5 Added file: https://bugs.python.org/file47429/timeout_examples.tgz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 04:12:59 2018 From: report at bugs.python.org (Mike Lewis) Date: Thu, 08 Feb 2018 09:12:59 +0000 Subject: [issue32795] subprocess.check_output() with timeout does not exit if child process does not generate output after timeout In-Reply-To: <1518081067.06.0.467229070634.issue32795@psf.upfronthosting.co.za> Message-ID: <1518081179.84.0.467229070634.issue32795@psf.upfronthosting.co.za> Mike Lewis added the comment: Example of the output: $ ./timeout.py Subprocess with idle stdout at timeout: start at 1518081130.44 Timed out at: 1518081135.45, 5 seconds Generating stdout from subprocess: start at 1518081135.45 Timed out at: 1518081136.47, 1 seconds As you see, the 1 second timeout is respected in the second case where the child process is generating output. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 04:16:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 08 Feb 2018 09:16:31 +0000 Subject: [issue32792] ChainMap should preserve order of underlying mappings In-Reply-To: <1518079577.65.0.467229070634.issue32792@psf.upfronthosting.co.za> Message-ID: <1518081391.2.0.467229070634.issue32792@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +ned.deily, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 04:24:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 08 Feb 2018 09:24:41 +0000 Subject: [issue32792] ChainMap should preserve order of underlying mappings In-Reply-To: <1518079577.65.0.467229070634.issue32792@psf.upfronthosting.co.za> Message-ID: <1518081881.02.0.467229070634.issue32792@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: An alternate implementation: d = {} for mapping in reversed(self.maps): d.update(mapping) return iter(d) Unfortunately both implementations work only with hashable keys. In general case mappings may be not hashtables. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 04:31:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 08 Feb 2018 09:31:44 +0000 Subject: [issue32794] PyNumber_Float counterpart that doesn't accept strings In-Reply-To: <1518080872.68.0.467229070634.issue32794@psf.upfronthosting.co.za> Message-ID: <1518082304.22.0.467229070634.issue32794@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Maybe use PyNumber_Check() to distinguish these two cases? if (PyNumber_Check(obj)) return PyNumber_Float(obj); PyErr_SetString(PyExc_TypeError, "not a number"); return NULL; ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 04:50:40 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 08 Feb 2018 09:50:40 +0000 Subject: [issue32794] PyNumber_Float counterpart that doesn't accept strings In-Reply-To: <1518080872.68.0.467229070634.issue32794@psf.upfronthosting.co.za> Message-ID: <1518083440.68.0.467229070634.issue32794@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: For converting a string to a float there is PyFloat_FromString(). So that this part of functionality of PyNumber_Float() is redundant. In long perspective it would be worth to deprecate it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 05:00:42 2018 From: report at bugs.python.org (Jensen Taylor) Date: Thu, 08 Feb 2018 10:00:42 +0000 Subject: [issue32796] 3.8-dev definition not available Message-ID: <1518084042.14.0.467229070634.issue32796@psf.upfronthosting.co.za> New submission from Jensen Taylor : I can't build with Python 3.8 yet on Travis-CI because of this ---------- messages: 311825 nosy: Jensen Taylor priority: normal severity: normal status: open title: 3.8-dev definition not available versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 05:04:15 2018 From: report at bugs.python.org (Christian Heimes) Date: Thu, 08 Feb 2018 10:04:15 +0000 Subject: [issue32796] 3.8-dev definition not available In-Reply-To: <1518084042.14.0.467229070634.issue32796@psf.upfronthosting.co.za> Message-ID: <1518084255.16.0.467229070634.issue32796@psf.upfronthosting.co.za> Christian Heimes added the comment: 3.8 is master branch. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 05:10:46 2018 From: report at bugs.python.org (Christian Heimes) Date: Thu, 08 Feb 2018 10:10:46 +0000 Subject: [issue32796] 3.8-dev definition not available In-Reply-To: <1518084042.14.0.467229070634.issue32796@psf.upfronthosting.co.za> Message-ID: <1518084646.3.0.467229070634.issue32796@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm not sure I follow. Are you having trouble to locate the 3.8 branch or are you missing 3.8-dev on Travis CI? The 3.8 branch is the master branch. Python upstream development does not provide dev builds for Travis CI. Please report the issue with Travis CI. There is nothing we can do from our side. By the way, you won't be able to compile TLS/SSL support on Travis CI. Python 3.7 requires OpenSSL >= 1.0.2 but Ubuntu 14.04 has only 1.0.1. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 05:39:37 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Thu, 08 Feb 2018 10:39:37 +0000 Subject: [issue32796] 3.8-dev definition not available In-Reply-To: <1518084042.14.0.467229070634.issue32796@psf.upfronthosting.co.za> Message-ID: <1518086377.2.0.467229070634.issue32796@psf.upfronthosting.co.za> Nathaniel Smith added the comment: I think you meant to file this on pyenv, which is the tool that travis needs to have updated to know about 3.8 before they can start providing builds. Their bug tracker is here: https://github.com/pyenv/pyenv/issues ---------- nosy: +njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 06:55:24 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Thu, 08 Feb 2018 11:55:24 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work Message-ID: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> New submission from Jeroen Demeyer : Displaying the source code in tracebacks for Cython-compiled extension modules in IPython no longer works due to PEP 302. Various fixes are possible, the two most obvious ones are: 1. linecache should continue searching for the source file even if loader.get_source() returns None. 2. the method ExtensionFileLoader.get_source() should be removed (instead of being implemented and returning None). Now why was this broken and how do the above fix that? When IPython needs to display a traceback, it uses linecache.getlines() to get the source code to display. For Cython extensions, the filename is a correct *relative* filename (it must be a relative filename since Cython does not know where the sources will be after installation). Since the filename is relative, linecache does not immediately find it, so it looks for a PEP 302 loader. For extension modules (Cython or not), it finds an instance of ExtensionFileLoader. If the loader has a get_source() method, then it uses that to get the sources. Since ExtensionFileLoader.get_source() returns None, linecache stops looking further for sources. Instead, what should happen is that linecache continues looking for the sources in sys.path where it has a chance of finding them (if they are installed somewhere in sys.path). ---------- components: Library (Lib) messages: 311829 nosy: erik.bray, jdemeyer priority: normal severity: normal status: open title: Tracebacks from Cython modules no longer work _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 08:30:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 08 Feb 2018 13:30:47 +0000 Subject: [issue32585] Add ttk::spinbox to tkinter.ttk In-Reply-To: <1516209431.55.0.467229070634.issue32585@psf.upfronthosting.co.za> Message-ID: <1518096647.16.0.467229070634.issue32585@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: All tests are passed. Ned, is it possible to get this feature in 3.7? I didn't have possibility to merge it before 3.7b1. This is just an addition of a simple class. It should be added years ago, it was not added before just due to oversight. This doesn't affect any other code, but may be used in future enhancements of IDLE. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 09:37:37 2018 From: report at bugs.python.org (=?utf-8?q?Severin_W=C3=BCnsch?=) Date: Thu, 08 Feb 2018 14:37:37 +0000 Subject: [issue32790] Keep trailing zeros in precision for string format option g In-Reply-To: <1518055716.96.0.467229070634.issue32790@psf.upfronthosting.co.za> Message-ID: <1518100657.64.0.467229070634.issue32790@psf.upfronthosting.co.za> Severin W?nsch added the comment: This meet my needs. Maybe the documentation could also add this information in the chart for 'g' here: https://docs.python.org/3.7/library/string.html#format-specification-mini-language as only into the running text. As I did not notice it. As the text in the table for 'g' is already long, if you do not want to add all the same information again, add at least that trailing zeros will get removed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 10:06:59 2018 From: report at bugs.python.org (Byron Hawkins) Date: Thu, 08 Feb 2018 15:06:59 +0000 Subject: [issue32798] mmap.flush() on Linux does not accept the "offset" and "size" args Message-ID: <1518102419.01.0.467229070634.issue32798@psf.upfronthosting.co.za> New submission from Byron Hawkins : open_file = open("file.txt", "r+b") file_map = mmap.mmap(open_file, 0) file_map.seek(offset) file_map.write("foobar") # success file_map.flush() # success file_map.flush(offset, len("foobar")) # Fails with "errno 22" This example passes correct arguments to mmap.flush(), yet it fails with errno 22. So the arguments are not valid on linux. If the bug cannot be fixed, then all reference to those two arguments should be removed from the code and documentation related to Linux. ---------- components: Library (Lib) messages: 311832 nosy: byronhawkins priority: normal severity: normal status: open title: mmap.flush() on Linux does not accept the "offset" and "size" args type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 10:11:03 2018 From: report at bugs.python.org (Christian Heimes) Date: Thu, 08 Feb 2018 15:11:03 +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: <1518102663.84.0.467229070634.issue32798@psf.upfronthosting.co.za> Christian Heimes added the comment: offset must be a multiple of pagesize. This is a known but undocumented restriction on some platforms, see http://man7.org/linux/man-pages/man2/msync.2.html ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +christian.heimes, docs at python priority: normal -> low type: crash -> behavior versions: +Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 10:14:12 2018 From: report at bugs.python.org (Christian Heimes) Date: Thu, 08 Feb 2018 15:14: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: <1518102852.82.0.467229070634.issue32798@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm marking this as a low priority and simple documentation bug. The mmap module exposes the page size of the architecture as mmap.PAGESIZE. ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 10:22:34 2018 From: report at bugs.python.org (Byron Hawkins) Date: Thu, 08 Feb 2018 15:22:34 +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: <1518103354.23.0.467229070634.issue32798@psf.upfronthosting.co.za> Byron Hawkins added the comment: Couldn't the implementation check the page size and throw a better error (for relevant platforms)? Or better yet, adjust the offset to the nearest inclusive page boundary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 10:28:27 2018 From: report at bugs.python.org (Eli Ribble) Date: Thu, 08 Feb 2018 15:28:27 +0000 Subject: [issue32799] returned a result with an error set Message-ID: <1518103707.85.0.467229070634.issue32799@psf.upfronthosting.co.za> New submission from Eli Ribble : We've had about 200 occurrences of this error in various parts of our code. I have captured stack traces using sentry so I may be able to provide more detail if requested. The ultimate problem is that a SystemError is raised from within contextlib. The message of the SystemError is: " returned a result with an error set" The code, according to sentry, that is emitting this error is: python3.6/contextlib.py in helper at line 159 """ @wraps(func) def helper(*args, **kwds): > return _GeneratorContextManager(func, args, kwds) return helper I'm reporting this bug primarily because of the documentation at https://docs.python.org/3/library/exceptions.html#SystemError and I'm using CPython ---------- components: Library (Lib) files: Screen Shot 2018-02-08 at 8.28.00 AM.png messages: 311836 nosy: EliRibble priority: normal severity: normal status: open title: returned a result with an error set type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file47430/Screen Shot 2018-02-08 at 8.28.00 AM.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 10:33:14 2018 From: report at bugs.python.org (sblondon) Date: Thu, 08 Feb 2018 15:33:14 +0000 Subject: [issue32800] Replace deprecated link to new page on w3c site Message-ID: <1518103994.08.0.467229070634.issue32800@psf.upfronthosting.co.za> New submission from sblondon : The documentation about namespace of ElemenTree (https://docs.python.org/3/library/xml.etree.elementtree.html#parsing-xml-with-namespaces) has a link for 'default namespace' to 'https://www.w3.org/TR/2006/REC-xml-names-20060816/#defaulting'. This page displays a big red message because the page is outdated. It can be replaced by the new one: https://www.w3.org/TR/xml-names/#defaulting The content of the paragraph in the new version is equivalent to the old one. I can provide a PR if you are interested. ---------- assignee: docs at python components: Documentation messages: 311837 nosy: docs at python, sblondon priority: normal severity: normal status: open title: Replace deprecated link to new page on w3c site type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 11:09:49 2018 From: report at bugs.python.org (=?utf-8?b?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?=) Date: Thu, 08 Feb 2018 16:09:49 +0000 Subject: [issue32801] Lib/_strptime.py: utilize all() Message-ID: <1518106189.47.0.467229070634.issue32801@psf.upfronthosting.co.za> New submission from ????? ???????? : diff --git a/Lib/_strptime.py b/Lib/_strptime.py --- a/Lib/_strptime.py +++ b/Lib/_strptime.py @@ -238,10 +238,7 @@ class TimeRE(dict): """ to_convert = sorted(to_convert, key=len, reverse=True) - for value in to_convert: - if value != '': - break - else: + if all(value == '' for value in to_convert): return '' regex = '|'.join(re_escape(stuff) for stuff in to_convert) regex = '(?P<%s>%s' % (directive, regex) ---------- components: Library (Lib) messages: 311838 nosy: dilyan.palauzov priority: normal severity: normal status: open title: Lib/_strptime.py: utilize all() versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 12:09:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 08 Feb 2018 17:09:14 +0000 Subject: [issue30688] support named Unicode escapes (\N{name}) in re In-Reply-To: <1497685136.94.0.225619820407.issue30688@psf.upfronthosting.co.za> Message-ID: <1518109754.78.0.467229070634.issue30688@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +5405 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 12:32:33 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 08 Feb 2018 17:32:33 +0000 Subject: [issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x In-Reply-To: <1516595654.84.0.467229070634.issue32616@psf.upfronthosting.co.za> Message-ID: <1518111153.02.0.467229070634.issue32616@psf.upfronthosting.co.za> INADA Naoki added the comment: I'm sorry, my patch doesn't work on Xcode (Apple LLVM). computed-gotos is still enabled by default. Apple doesn't expose LLVM version. It's really annoying. $ cat x.c #include int main() { printf("__clang__ : %d\n", __clang__); printf("__llvm__ : %d\n", __llvm__); printf("__VERSION__ : %s\n", __VERSION__); printf("__clang_version__ : %s\n", __clang_version__); printf("__clang_major__ : %d\n", __clang_major__); printf("__clang_minor__ : %d\n", __clang_minor__); printf("__clang_patchlevel__ : %d\n", __clang_patchlevel__); } $ cc x.c && ./a.out __clang__ : 1 __llvm__ : 1 __VERSION__ : 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2) __clang_version__ : 9.0.0 (clang-900.0.39.2) __clang_major__ : 9 __clang_minor__ : 0 __clang_patchlevel__ : 0 ---------- resolution: fixed -> stage: resolved -> status: closed -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 12:36:34 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 08 Feb 2018 17:36:34 +0000 Subject: [issue32799] returned a result with an error set In-Reply-To: <1518103707.85.0.467229070634.issue32799@psf.upfronthosting.co.za> Message-ID: <1518111394.52.0.467229070634.issue32799@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Since contextlib._GeneratorContextManager is implemented in Python, it is unlikely that it is a culprit of the error. Do you use any third-party extensions? Likely some extension provoked the error. Can you provide a minimal script that reproduces the issue? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 13:44:47 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 08 Feb 2018 18:44:47 +0000 Subject: [issue32802] Travis does not compile Python if there is one change in the Documentation Message-ID: <1518115487.35.0.467229070634.issue32802@psf.upfronthosting.co.za> New submission from St?phane Wirtel : If there is one .rst file in a commit, Travis does not compile Python, since this commit https://github.com/python/cpython/commit/b2ec3615c81ca4f3c938245842a45956da8d5acb Here is a fix. ---------- messages: 311841 nosy: matrixise priority: normal severity: normal status: open title: Travis does not compile Python if there is one change in the Documentation versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 13:50:53 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 08 Feb 2018 18:50:53 +0000 Subject: [issue32802] Travis does not compile Python if there is one change in the Documentation In-Reply-To: <1518115487.35.0.467229070634.issue32802@psf.upfronthosting.co.za> Message-ID: <1518115853.39.0.467229070634.issue32802@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- keywords: +patch pull_requests: +5406 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 13:59:15 2018 From: report at bugs.python.org (Zhiming Wang) Date: Thu, 08 Feb 2018 18:59:15 +0000 Subject: [issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x In-Reply-To: <1516595654.84.0.467229070634.issue32616@psf.upfronthosting.co.za> Message-ID: <1518116355.58.0.467229070634.issue32616@psf.upfronthosting.co.za> Zhiming Wang added the comment: Yeah, Apple LLVM versions are a major headache. I resorted to feature detection, using C++ coroutines support as the clang 5 distinguisher[1]: $ cat /tmp/test/stub.cc #include int main() { return 0; } $ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v Apple LLVM version 9.0.0 (clang-900.0.39.2) Target: x86_64-apple-darwin17.4.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 -o stub stub.cc -fcoroutines-ts -stdlib=libc++ stub.cc:1:10: fatal error: 'experimental/coroutine' file not found #include ^~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. $ /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v Apple LLVM version 9.1.0 (clang-902.0.31) Target: x86_64-apple-darwin17.4.0 Thread model: posix InstalledDir: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin $ /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -o stub stub.cc -fcoroutines-ts -stdlib=libc++ Here Xcode.app is Xcode 9.2 and Xcode-beta.app is Xcode 9.3 beta 2. The conclusion here seems to be that Apple LLVM 9.0.0 is based on LLVM 4, while Apple LLVM 9.1.0 is based on LLVM 5. [1] http://releases.llvm.org/5.0.0/tools/clang/docs/ReleaseNotes.html#major-new-features ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 14:15:01 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 08 Feb 2018 19:15:01 +0000 Subject: [issue32802] Travis does not compile Python if there is one change in the Documentation In-Reply-To: <1518115487.35.0.467229070634.issue32802@psf.upfronthosting.co.za> Message-ID: <1518117301.8.0.467229070634.issue32802@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 32921f90821ab54ffb757b7e996e5b7a71fac25e by Mariatta (St?phane Wirtel) in branch 'master': bpo-32802: Fix Travis build (GH-5589) https://github.com/python/cpython/commit/32921f90821ab54ffb757b7e996e5b7a71fac25e ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 14:15:12 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 08 Feb 2018 19:15:12 +0000 Subject: [issue32802] Travis does not compile Python if there is one change in the Documentation In-Reply-To: <1518115487.35.0.467229070634.issue32802@psf.upfronthosting.co.za> Message-ID: <1518117312.64.0.467229070634.issue32802@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5407 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 14:16:09 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 08 Feb 2018 19:16:09 +0000 Subject: [issue32802] Travis does not compile Python if there is one change in the Documentation In-Reply-To: <1518115487.35.0.467229070634.issue32802@psf.upfronthosting.co.za> Message-ID: <1518117369.98.0.467229070634.issue32802@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5408 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 14:18:39 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 08 Feb 2018 19:18:39 +0000 Subject: [issue32802] Travis does not compile Python if there is one change in the Documentation In-Reply-To: <1518115487.35.0.467229070634.issue32802@psf.upfronthosting.co.za> Message-ID: <1518117519.08.0.467229070634.issue32802@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Good catch! Thanks St?phane. I'm thinking it will be best for other PRs to rebase against this new travis configuration. But that seems like a lot of work... ---------- assignee: -> Mariatta stage: patch review -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 14:24:19 2018 From: report at bugs.python.org (Sanyam Khurana) Date: Thu, 08 Feb 2018 19:24:19 +0000 Subject: [issue8525] Display exception's subclasses in help() In-Reply-To: <1272150602.3.0.323796636819.issue8525@psf.upfronthosting.co.za> Message-ID: <1518117859.97.0.467229070634.issue8525@psf.upfronthosting.co.za> Change by Sanyam Khurana : ---------- assignee: -> CuriousLearner versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 14:25:33 2018 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 08 Feb 2018 19:25:33 +0000 Subject: [issue32794] PyNumber_Float counterpart that doesn't accept strings In-Reply-To: <1518080872.68.0.467229070634.issue32794@psf.upfronthosting.co.za> Message-ID: <1518117933.61.0.467229070634.issue32794@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Maybe use PyNumber_Check() [...] Ah, that works. It reads better than the `PyFloat_AsDouble` solution, too, since it's far from obvious that `PyFloat_AsDouble` goes to the trouble to coerce a float-y thing to a float. I did some searching around to see if I could find evidence that anyone besides me thinks this is a good idea, but I didn't come up with much. In the NumPy source, for example, it's more common to want a C `double` than another Python object, and I guess that's going to be true for other 3rd party libraries, too. And I'm also realising that part of what I need here is a *Python*-level solution to the problem, something like this: def _validate_float(value): """ Coerce an arbitrary Python object to a float, or raise TypeError. """ if type(value) is float: # fast path for common case return value try: nb_float = type(value).__float__ except AttributeError: raise TypeError( "Object of type {!r} not coerceable to float".format(type(value))) return nb_float(value) (and the _validate_float I posted earlier was really just there because the C extension module needed to be able to do the same thing as the equivalent Python code above). All in all, I don't think I can make a good case for this. I'll close the issue. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 14:34:02 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 08 Feb 2018 19:34:02 +0000 Subject: [issue32791] Add\Remove Programs entry is not created. In-Reply-To: <1518060327.94.0.467229070634.issue32791@psf.upfronthosting.co.za> Message-ID: <1518118442.1.0.467229070634.issue32791@psf.upfronthosting.co.za> Steve Dower added the comment: This is the same as issue25166 It can't be fixed easily (Wix doesn't actually support this), but I have some ideas that have been looking okayish. Still hoping to get it to work fully for 3.7, but as it affects the installer we may not have enough time for testing to get it into this release. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Windows AllUsers installation places uninstaller in user profile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 14:40:01 2018 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 08 Feb 2018 19:40:01 +0000 Subject: [issue32790] Keep trailing zeros in precision for string format option g In-Reply-To: <1518055716.96.0.467229070634.issue32790@psf.upfronthosting.co.za> Message-ID: <1518118801.4.0.467229070634.issue32790@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Maybe the documentation could also add this information in the chart for 'g' here: Agreed that that would make sense. All the information is *there* in the docs (the alternate format is described a bit above that table), but it's not very easy to extract the information. And that table entry is misleading as it currently is, since it suggests that trailing zeros are removed unconditionally: "In both cases insignificant trailing zeros are removed from the significand, and the decimal point is also removed if there are no remaining digits following it." Perhaps we could adopt something like the wording in the C standard, where it says: > Finally, unless the # flag is used, any trailing zeros are removed > from the fractional portion of the result and the decimal-point > character is removed if there is no fractional portion remaining. Re-classifying as a documentation issue. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 14:42:49 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 08 Feb 2018 19:42:49 +0000 Subject: [issue32802] Travis does not compile Python if there is one change in the Documentation In-Reply-To: <1518115487.35.0.467229070634.issue32802@psf.upfronthosting.co.za> Message-ID: <1518118969.11.0.467229070634.issue32802@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset ad3997c592ee9b75fdcd44a0eaa51d748a2e2394 by Mariatta (Miss Islington (bot)) in branch '3.7': bpo-32802: Fix Travis build (GH-5589) (GH-5590) https://github.com/python/cpython/commit/ad3997c592ee9b75fdcd44a0eaa51d748a2e2394 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 15:01:26 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 08 Feb 2018 20:01:26 +0000 Subject: [issue32802] Travis does not compile Python if there is one change in the Documentation In-Reply-To: <1518115487.35.0.467229070634.issue32802@psf.upfronthosting.co.za> Message-ID: <1518120086.87.0.467229070634.issue32802@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset fe92c441519d0c4fc93bb98fc1bb4e225dea44c4 by Mariatta (Miss Islington (bot)) in branch '3.6': bpo-32802: Fix Travis build (GH-5589) (GH-5591) https://github.com/python/cpython/commit/fe92c441519d0c4fc93bb98fc1bb4e225dea44c4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 15:01:47 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 08 Feb 2018 20:01:47 +0000 Subject: [issue32802] Travis does not compile Python if there is one change in the Documentation In-Reply-To: <1518115487.35.0.467229070634.issue32802@psf.upfronthosting.co.za> Message-ID: <1518120107.25.0.467229070634.issue32802@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks! ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 15:14:51 2018 From: report at bugs.python.org (ppperry) Date: Thu, 08 Feb 2018 20:14:51 +0000 Subject: [issue8525] Display exceptions' subclasses in help() In-Reply-To: <1272150602.3.0.323796636819.issue8525@psf.upfronthosting.co.za> Message-ID: <1518120891.93.0.467229070634.issue8525@psf.upfronthosting.co.za> Change by ppperry : ---------- title: Display exception's subclasses in help() -> Display exceptions' subclasses in help() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 15:24:23 2018 From: report at bugs.python.org (Eli Ribble) Date: Thu, 08 Feb 2018 20:24:23 +0000 Subject: [issue32799] returned a result with an error set In-Reply-To: <1518103707.85.0.467229070634.issue32799@psf.upfronthosting.co.za> Message-ID: <1518121463.16.0.467229070634.issue32799@psf.upfronthosting.co.za> Eli Ribble added the comment: To my knowledge, no, we don't use any python extensions. Unless extensions can be installed via pip, in which case I would need to audit our many dependencies to determine if any of them ultimately pull in any extensions as part of a pip install. I can't provide a minimal script, no, we don't reproduce it deterministically. Like I said, our application runs all the time and we appear to have about ~200 instances where the problem has been caught by our uncaught exception handling system. The repro of the bug does not appear to have a set correlation with exercise of a particular feature or a particular application state. Given the exception is a thin wrapper around linux syscalls, my guess is something like select(), it's likely the issue has to do with transient network communication problems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 16:27:40 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 08 Feb 2018 21:27:40 +0000 Subject: [issue32690] Return function locals() in order of creation? In-Reply-To: <1517109391.6.0.467229070634.issue32690@psf.upfronthosting.co.za> Message-ID: <1518125260.51.0.467229070634.issue32690@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- pull_requests: +5409 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 16:32:40 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 08 Feb 2018 21:32:40 +0000 Subject: [issue32792] ChainMap should preserve order of underlying mappings In-Reply-To: <1518079577.65.0.467229070634.issue32792@psf.upfronthosting.co.za> Message-ID: <1518125560.38.0.467229070634.issue32792@psf.upfronthosting.co.za> Ned Deily added the comment: See discussion on PR 5586 regarding backporting to 3.6.x. ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 16:56:44 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 08 Feb 2018 21:56:44 +0000 Subject: [issue32585] Add ttk::spinbox to tkinter.ttk In-Reply-To: <1516209431.55.0.467229070634.issue32585@psf.upfronthosting.co.za> Message-ID: <1518127004.55.0.467229070634.issue32585@psf.upfronthosting.co.za> Ned Deily added the comment: It is past the feature code cutoff for 3.7.0 but the risks seem low and the benefit reasonably high. Please make sure it is merged ASAP to allow time for buildbot exposure, etc, prior to 370b2. ---------- stage: test needed -> commit review versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 18:25:09 2018 From: report at bugs.python.org (jasen betts) Date: Thu, 08 Feb 2018 23:25:09 +0000 Subject: [issue32803] smtplib: LMTP broken in the case of multiple RCPT Message-ID: <1518132309.75.0.467229070634.issue32803@psf.upfronthosting.co.za> New submission from jasen betts : smtplib's LMTP support is broken, LMTP returns multiple responses at and of data if there have been multiple successful RCPT TO commands, but smtplib::data() only looks for a single response. see the example conversation on page 3 of RFC2033 This makes LMTP unusable if there is more than one RCPT ---------- components: Library (Lib) messages: 311854 nosy: jasen betts priority: normal severity: normal status: open title: smtplib: LMTP broken in the case of multiple RCPT 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 Thu Feb 8 18:33:24 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 08 Feb 2018 23:33:24 +0000 Subject: [issue32803] smtplib: LMTP broken in the case of multiple RCPT In-Reply-To: <1518132309.75.0.467229070634.issue32803@psf.upfronthosting.co.za> Message-ID: <1518132804.52.0.467229070634.issue32803@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: 3.5 and 3.4 are in security fix only mode, so narrowing the relevant versions. ---------- nosy: +barry versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 19:03:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Feb 2018 00:03:57 +0000 Subject: [issue32585] Add ttk::spinbox to tkinter.ttk In-Reply-To: <1516209431.55.0.467229070634.issue32585@psf.upfronthosting.co.za> Message-ID: <1518134637.81.0.467229070634.issue32585@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset a48e78a0b7761dd74f1d03fc69e0f6caa6f02fe6 by Serhiy Storchaka (Alan D Moore) in branch 'master': bpo-32585: Add tkinter.ttk.Spinbox. (#5221) https://github.com/python/cpython/commit/a48e78a0b7761dd74f1d03fc69e0f6caa6f02fe6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 19:04:46 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Feb 2018 00:04:46 +0000 Subject: [issue32585] Add ttk::spinbox to tkinter.ttk In-Reply-To: <1516209431.55.0.467229070634.issue32585@psf.upfronthosting.co.za> Message-ID: <1518134686.16.0.467229070634.issue32585@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Ned. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 19:05:07 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 09 Feb 2018 00:05:07 +0000 Subject: [issue32585] Add ttk::spinbox to tkinter.ttk In-Reply-To: <1516209431.55.0.467229070634.issue32585@psf.upfronthosting.co.za> Message-ID: <1518134707.9.0.467229070634.issue32585@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5410 stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 19:57:53 2018 From: report at bugs.python.org (Ma Lin) Date: Fri, 09 Feb 2018 00:57:53 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1518137873.93.0.467229070634.issue32394@psf.upfronthosting.co.za> Ma Lin added the comment: > What's about other OS/flags? > Should we commit that every exposed socket flag is supported in runtime? > It looks like very heavy burden. Let alone run-time check. Flags only depend on .C code and the building SDK, therefore, for a certain official release (e.g. CPython 3.6.5), the flags are fixed. Then it is possible to get a flag-snapshot of a certain official release. I wrote a script to dump/compare these flags in some Windows related modules (written in C language), see attached file winsdk_watchdog.py. Let me demonstrate how to use it: > Comparing from A to B: > A: 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)] > B: 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)] > > socket added 2 constants: {'TCP_KEEPCNT', 'TCP_FASTOPEN'} > > Finished, 1 modules changed constants. Comparing official 3.6.3 (1607 SDK) with official 3.6.4 (1703 SDK). It caught the 2 flags lead to this issue. > Comparing from A to B: > A: 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)] > B: 3.7.0b1 (v3.7.0b1:9561d7f, Jan 31 2018, 07:26:34) [MSC v.1900 64 bit (AMD64)] > > _winapi added 15 constants: {'NORMAL_PRIORITY_CLASS', 'FILE_TYPE_DISK', 'IDLE_PRIORITY_C > LASS', 'CREATE_DEFAULT_ERROR_MODE', 'CREATE_BREAKAWAY_FROM_JOB', 'FILE_TYPE_PIPE', 'FILE > _TYPE_REMOTE', 'BELOW_NORMAL_PRIORITY_CLASS', 'DETACHED_PROCESS', 'FILE_TYPE_CHAR', 'REA > LTIME_PRIORITY_CLASS', 'FILE_TYPE_UNKNOWN', 'ABOVE_NORMAL_PRIORITY_CLASS', 'CREATE_NO_WI > NDOW', 'HIGH_PRIORITY_CLASS'} > > socket added 3 constants: {'TCP_KEEPIDLE', 'TCP_KEEPINTVL', 'MSG_ERRQUEUE'} > > mmap added 1 constants: {'ACCESS_DEFAULT'} > > Finished, 3 modules changed constants. Comparing official 3.6.4 (1703 SDK) with official 3.7.0b1 (1709 SDK). _winapi added 15 constants, after searching on GitHub repository, we know they were added in 2 commits: https://github.com/python/cpython/commit/b5d9e0811463f3b28ba355a9e0bee7f1682854e3#diff-c5f7cb301f3746a4c77e8bcd91d9f897 https://github.com/python/cpython/commit/b2a6083eb0384f38839d3f1ed32262a3852026fa#diff-c5f7cb301f3746a4c77e8bcd91d9f897 So they can be ignored. socket added 3 constants. After exploring, we know the 2 flags (TCP_KEEPIDLE, TCP_KEEPINTVL) were added by 1709 SDK, so we need to handle them during run-time as well. Another new flag MSG_ERRQUEUE was also added by 1709 SDK, we need a socket expert decide what to do. mmap added 1 constants. It was added in: https://github.com/python/cpython/commit/5a8a84b34fbc385bf112819fe3b65503e33a33fa#diff-a8a9c2d912381058181c8ffe496aa39b Also ignore it. This check is only needed after switching to a newer Windows SDK. As the file name, it's a watchdog of Windows SDK. Some people build third-party-build by themselves, it's also possible to create a unittest, and teach it how to recognize flexible-flags (may be removed during run-time). For example, a man builds CPython 3.7.0b1 with 1607 SDK (official 3.7.0b1 build with 1709 SDK), then he got a prompt like this: > These flags are missing in socket module: > 'TCP_KEEPCNT', 'TCP_FASTOPEN', 'TCP_KEEPIDLE', 'TCP_KEEPINTVL', 'MSG_ERRQUEUE' > Maybe you are using a older SDK than official release's, or these flags are removed in this machine during run-time. If he build CPython 3.7.0b1 with 1903 SDK in two years later, he may got prompt like this: > Unknown flags appear in socket module: > 'TCP_XXXXXX', 'TCP_YYYYYY', 'TCP_ZZZZZZ' > They were added by newer Windows SDK, please make sure.... ---------- Added file: https://bugs.python.org/file47431/winsdk_watchdog.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 20:28:41 2018 From: report at bugs.python.org (cowlinator) Date: Fri, 09 Feb 2018 01:28:41 +0000 Subject: [issue32784] Wrong argument name for csv.DictReader in documentation In-Reply-To: <1517968265.54.0.467229070634.issue32784@psf.upfronthosting.co.za> Message-ID: <1518139721.88.0.467229070634.issue32784@psf.upfronthosting.co.za> cowlinator added the comment: Hi, thanks for the quick action on this! The documentation is still wrong for 3.5 . I had selected 3.5 for the affected versions, but I guess it got removed? ---------- versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 20:32:40 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 09 Feb 2018 01:32:40 +0000 Subject: [issue32784] Wrong argument name for csv.DictReader in documentation In-Reply-To: <1517968265.54.0.467229070634.issue32784@psf.upfronthosting.co.za> Message-ID: <1518139960.5.0.467229070634.issue32784@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: 3.5 is for security fixes only now. We don't do documentation or regular bug fixes there anymore. ---------- versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 20:33:21 2018 From: report at bugs.python.org (Julian O) Date: Fri, 09 Feb 2018 01:33:21 +0000 Subject: [issue32804] urllib.retrieve documentation doesn't mention context parameter Message-ID: <1518140001.56.0.467229070634.issue32804@psf.upfronthosting.co.za> New submission from Julian O : In 2014, urlretrieve was changed to accept a context parameter to configure, for example, SSL settings. Ref: https://github.com/python/cpython/commit/b206473ef8a7abe9abf5ab8776ea3bcb90adc747 However, 2.7.14 documentation does not mention this parameter. > urllib.urlretrieve(url[, filename[, reporthook[, data]]]) Ref: https://docs.python.org/2/library/urllib.html ---------- assignee: docs at python components: Documentation messages: 311861 nosy: docs at python, julian_o priority: normal severity: normal status: open title: urllib.retrieve documentation doesn't mention context parameter versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 21:45:11 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 09 Feb 2018 02:45:11 +0000 Subject: [issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x In-Reply-To: <1516595654.84.0.467229070634.issue32616@psf.upfronthosting.co.za> Message-ID: <1518144311.29.0.467229070634.issue32616@psf.upfronthosting.co.za> INADA Naoki added the comment: How can we distinguish Apple LLVM with LLVM easily? Or should we disable computed-gotos by default on LLVM? It's only for Python 2. 5x slowdown is too large comparing to 10% speedup. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 22:36:28 2018 From: report at bugs.python.org (Ned Deily) Date: Fri, 09 Feb 2018 03:36:28 +0000 Subject: [issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x In-Reply-To: <1516595654.84.0.467229070634.issue32616@psf.upfronthosting.co.za> Message-ID: <1518147388.17.0.467229070634.issue32616@psf.upfronthosting.co.za> Ned Deily added the comment: Can anyone explain what the difference is between 2.7 and 3.6, i.e. why there is the performance regression for 2.7 but not for 3.6 using the same compiler instance? It would be better to understand and solve that problem rather than trying to special case compiler versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 22:49:23 2018 From: report at bugs.python.org (Jay Yin) Date: Fri, 09 Feb 2018 03:49:23 +0000 Subject: [issue32642] add support for path-like objects in sys.path In-Reply-To: <1516771632.94.0.467229070634.issue32642@psf.upfronthosting.co.za> Message-ID: <1518148163.12.0.467229070634.issue32642@psf.upfronthosting.co.za> Jay Yin added the comment: what file(s) is/are the sys.path code located in? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 22:54:25 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 09 Feb 2018 03:54:25 +0000 Subject: [issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x In-Reply-To: <1516595654.84.0.467229070634.issue32616@psf.upfronthosting.co.za> Message-ID: <1518148465.77.0.467229070634.issue32616@psf.upfronthosting.co.za> INADA Naoki added the comment: I don't know exactly. But as far as I saw, Python 3's eval loop has less function-wide local variables. For example, ROT_THREE uses only block local variable. https://github.com/python/cpython/blob/a48e78a0b7761dd74f1d03fc69e0f6caa6f02fe6/Python/ceval.c#L1109-L1111 On the other hand, there are more function-wide local variables in Python 2. And some of them are used over `case`s actually. https://github.com/python/cpython/blob/672fd7d8162f76aff8423fa5c7bfd2b1e91faf57/Python/ceval.c#L802-L807 I suspect that's why LLVM4 failed to optimize Python 2 but success to optimize Python 3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 8 23:28:40 2018 From: report at bugs.python.org (Ned Deily) Date: Fri, 09 Feb 2018 04:28:40 +0000 Subject: [issue32761] Create IDLE Modern Mac keyset In-Reply-To: <1517696660.49.0.467229070634.issue32761@psf.upfronthosting.co.za> Message-ID: <1518150520.57.0.467229070634.issue32761@psf.upfronthosting.co.za> Ned Deily added the comment: Terry, it would be better to get opinions from others who really use IDLE on macOS. But, FWIW: - I agree with Raymond that Ctrl-A makes much more sense as the default for beginning of line for the reasons he cites. - Command-A is appropriate for select-all. - Should the Classic Mac keyset be removed? Probably - Designing a more modern macOS keyset is probably still a good idea (but I'm not volunteering to do it!) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 00:54:37 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 09 Feb 2018 05:54:37 +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: <1518155677.04.0.467229070634.issue32804@psf.upfronthosting.co.za> St?phane Wirtel added the comment: effectively, there is no documentation about this new parameter. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 00:54:58 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 09 Feb 2018 05:54:58 +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: <1518155698.22.0.467229070634.issue32804@psf.upfronthosting.co.za> Change by St?phane Wirtel : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 03:12:32 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 09 Feb 2018 08:12:32 +0000 Subject: [issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x In-Reply-To: <1516595654.84.0.467229070634.issue32616@psf.upfronthosting.co.za> Message-ID: <1518163952.13.0.467229070634.issue32616@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I different question w.r.t. detection of the clang/llvm version on Apple's system compiler: Is it worthwhile to do so? If the compiler included in the Xcode 9.3 beta (and hence likely the one in Xcode 9.3 final) fixes the performance issue a very large subset of people building Python for themselves will get a fixed compiler fairly soon. It would then be enough to warn about this issue in a readme file for other users. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 03:26:56 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 09 Feb 2018 08:26:56 +0000 Subject: [issue30528] ipaddress.IPv{4,6}Network.reverse_pointer is broken In-Reply-To: <1496250931.44.0.236459920081.issue30528@psf.upfronthosting.co.za> Message-ID: <1518164816.45.0.467229070634.issue30528@psf.upfronthosting.co.za> Ronald Oussoren added the comment: documents that this attribute contains the name of the DNS name that could be used to query for PTR record. That functionality is not well defined for a network object. It might therefore be better to just raise an exception for this attribute on network objects. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 04:27:39 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Feb 2018 09:27:39 +0000 Subject: [issue32805] Possible integer overflow when call PyDTrace_GC_DONE() Message-ID: <1518168459.08.0.467229070634.issue32805@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : PyDTrace_GC_DONE() accepts the argument of type int. But it is called with the sum of collected and uncollectable objects which has type Py_ssize_t and can be larger that maximal int. This produces a compiler warning on Windows: ..\Modules\gcmodule.c(978): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data [D:\buildarea\3.x.bolen-windows10\build\PCbuild\pythoncore.vcxproj] and looks as not false alarm. ---------- components: Interpreter Core messages: 311870 nosy: lukasz.langa, serhiy.storchaka priority: normal severity: normal status: open title: Possible integer overflow when call PyDTrace_GC_DONE() type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 04:47:46 2018 From: report at bugs.python.org (Yuri Kanivetsky) Date: Fri, 09 Feb 2018 09:47:46 +0000 Subject: [issue32806] locally imported modules are unaccessible in lambdas in pdb Message-ID: <1518169666.43.0.467229070634.issue32806@psf.upfronthosting.co.za> New submission from Yuri Kanivetsky : Consider the following script: # import pdb; pdb.set_trace() # import re def f(): import re print((lambda: re.findall('a', 'aaa'))()) import pdb; pdb.set_trace() print('test') f() When you run it and try to evaluate `(lambda: re.findall('a', 'aaa'))()`, you get: ['a', 'a', 'a'] > /home/yuri/_/1.py(7)f() -> print('test') (Pdb) (lambda: re.findall('a', 'aaa'))() *** NameError: name 're' is not defined (Pdb) import re (Pdb) (lambda: re.findall('a', 'aaa'))() *** NameError: name 're' is not defined (Pdb) With the commented out breakpoint it works: > /home/yuri/_/a.py(3)() -> def f(): (Pdb) import re (Pdb) (lambda: re.findall('a', 'aaa'))() ['a', 'a', 'a'] (Pdb) Also it works with uncommented global import and second breakpoint: ['a', 'a', 'a'] > /srv/http/sl/makosh/a.py(7)f() -> print('test') (Pdb) (lambda: re.findall('a', 'aaa'))() ['a', 'a', 'a'] (Pdb) >From what I can see the issue occurs when there's no `re` in `globals` argument here: https://github.com/python/cpython/blob/v3.6.4/Lib/pdb.py#L376 I've run into it when trying to grep some object's attribute names, like: !list(filter(lambda x: re.search('class', x), dir(__name__))) ---------- messages: 311871 nosy: Yuri Kanivetsky priority: normal severity: normal status: open title: locally imported modules are unaccessible in lambdas in pdb type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 05:44:05 2018 From: report at bugs.python.org (Arka) Date: Fri, 09 Feb 2018 10:44:05 +0000 Subject: [issue32807] Add Message-ID: <1518173045.02.0.467229070634.issue32807@psf.upfronthosting.co.za> Change by Arka : ---------- nosy: Arka priority: normal severity: normal status: open title: Add _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 05:46:26 2018 From: report at bugs.python.org (Arka) Date: Fri, 09 Feb 2018 10:46:26 +0000 Subject: [issue32807] Add 'str' property to PathLib Message-ID: <1518173186.93.0.467229070634.issue32807@psf.upfronthosting.co.za> New submission from Arka : Add 'str' property to PurePath in PathLib that calls __str__ function and returns the string representation of the path. It is easier to use than str(Path). Many existing methods accept only strings as a path. ---------- components: +Library (Lib) title: Add -> Add 'str' property to PathLib versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 05:48:17 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 09 Feb 2018 10:48:17 +0000 Subject: [issue32807] Add 'str' property to PathLib In-Reply-To: <1518173186.93.0.467229070634.issue32807@psf.upfronthosting.co.za> Message-ID: <1518173297.39.0.467229070634.issue32807@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I have seen your PR, why did you close it? ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 05:49:51 2018 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 09 Feb 2018 10:49:51 +0000 Subject: [issue32807] Add 'str' property to PathLib In-Reply-To: <1518173186.93.0.467229070634.issue32807@psf.upfronthosting.co.za> Message-ID: <1518173391.98.0.467229070634.issue32807@psf.upfronthosting.co.za> St?phane Wirtel added the comment: and currently for the feature, the PR should be based on master and not 3.5 or 3.6. because these branch are only for the security and bugfix modes. Read the devguide at this url: https://devguide.python.org/#status-of-python-branches ---------- versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 05:52:11 2018 From: report at bugs.python.org (Christian Heigele) Date: Fri, 09 Feb 2018 10:52:11 +0000 Subject: [issue32808] subprocess.check_output opens an unwanted command line window after fall creator update Message-ID: <1518173531.96.0.467229070634.issue32808@psf.upfronthosting.co.za> New submission from Christian Heigele : Hi, I have two machines, both Windows 10, both with python 2.7.12 (bug is also reproducible with 2.7.14), one of them has the Fall creator update (-> version 1709) and one doesn't (->version 1607). When I execute the checkout on some executable that is available on both machines, I get different behaviours: One the one without the fall creator update I get the output of that executable as expected as the return value. One the machine with the update I see a new command line window popping up, the executable runs through, and the return value of check_output is an empty string. I'll use it like follow: f = subprocess.check_output(['svn.exe', '--help']) ---------- components: Windows messages: 311875 nosy: Christian Heigele, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: subprocess.check_output opens an unwanted command line window after fall creator update versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 05:59:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Feb 2018 10:59:44 +0000 Subject: [issue32807] Add 'str' property to PathLib In-Reply-To: <1518173186.93.0.467229070634.issue32807@psf.upfronthosting.co.za> Message-ID: <1518173984.47.0.467229070634.issue32807@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Are you aware of PEP 519? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 06:11:49 2018 From: report at bugs.python.org (Arka) Date: Fri, 09 Feb 2018 11:11:49 +0000 Subject: [issue32807] Add 'str' property to PathLib In-Reply-To: <1518173186.93.0.467229070634.issue32807@psf.upfronthosting.co.za> Message-ID: <1518174709.16.0.467229070634.issue32807@psf.upfronthosting.co.za> Change by Arka : ---------- keywords: +patch pull_requests: +5411 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 06:18:23 2018 From: report at bugs.python.org (Arka) Date: Fri, 09 Feb 2018 11:18:23 +0000 Subject: [issue32807] Add 'str' property to PathLib In-Reply-To: <1518173186.93.0.467229070634.issue32807@psf.upfronthosting.co.za> Message-ID: <1518175103.33.0.467229070634.issue32807@psf.upfronthosting.co.za> Arka added the comment: @matrixise Because the bots were saying, 'skip news', 'skip issue' labels are not found. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 06:30:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Feb 2018 11:30:22 +0000 Subject: [issue32775] fnmatch.translate() can produce a pattern which emits a nested set warning In-Reply-To: <1517861242.52.0.467229070634.issue32775@psf.upfronthosting.co.za> Message-ID: <1518175822.62.0.467229070634.issue32775@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 23cdbfa744f0ec0e9e7575d378df4cb758691cd3 by Serhiy Storchaka in branch 'master': bpo-32775: Fix regular expression warnings in fnmatch. (#5583) https://github.com/python/cpython/commit/23cdbfa744f0ec0e9e7575d378df4cb758691cd3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 06:31:30 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 09 Feb 2018 11:31:30 +0000 Subject: [issue32775] fnmatch.translate() can produce a pattern which emits a nested set warning In-Reply-To: <1517861242.52.0.467229070634.issue32775@psf.upfronthosting.co.za> Message-ID: <1518175890.36.0.467229070634.issue32775@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5412 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 06:40:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Feb 2018 11:40:16 +0000 Subject: [issue32585] Add ttk::spinbox to tkinter.ttk In-Reply-To: <1516209431.55.0.467229070634.issue32585@psf.upfronthosting.co.za> Message-ID: <1518176416.36.0.467229070634.issue32585@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 105fcbfd6a91abea0ecd71e53651f39ad6f6039b by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-32585: Add tkinter.ttk.Spinbox. (GH-5221) (GH-5592) https://github.com/python/cpython/commit/105fcbfd6a91abea0ecd71e53651f39ad6f6039b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 06:41:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Feb 2018 11:41:16 +0000 Subject: [issue32585] Add ttk::spinbox to tkinter.ttk In-Reply-To: <1516209431.55.0.467229070634.issue32585@psf.upfronthosting.co.za> Message-ID: <1518176476.06.0.467229070634.issue32585@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your contribution Alan! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 06:56:55 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Feb 2018 11:56:55 +0000 Subject: [issue32775] fnmatch.translate() can produce a pattern which emits a nested set warning In-Reply-To: <1517861242.52.0.467229070634.issue32775@psf.upfronthosting.co.za> Message-ID: <1518177415.26.0.467229070634.issue32775@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 0e361730b0954f7560640dd932f00f507e328c45 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-32775: Fix regular expression warnings in fnmatch. (GH-5583) (GH-5596) https://github.com/python/cpython/commit/0e361730b0954f7560640dd932f00f507e328c45 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 06:57:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Feb 2018 11:57:42 +0000 Subject: [issue32775] fnmatch.translate() can produce a pattern which emits a nested set warning In-Reply-To: <1517861242.52.0.467229070634.issue32775@psf.upfronthosting.co.za> Message-ID: <1518177462.17.0.467229070634.issue32775@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 Feb 9 07:48:23 2018 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Fri, 09 Feb 2018 12:48:23 +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: <1518180503.97.0.467229070634.issue32798@psf.upfronthosting.co.za> ???? ????????? added the comment: Actually documented: http://man7.org/linux/man-pages/man2/msync.2.html EINVAL: addr is not a multiple of PAGESIZE; ---------- nosy: +socketpair _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 08:20:30 2018 From: report at bugs.python.org (Michal Niklas) Date: Fri, 09 Feb 2018 13:20:30 +0000 Subject: [issue32809] Python 3.6 on Windows problem with source encoding header Message-ID: <1518182430.26.0.467229070634.issue32809@psf.upfronthosting.co.za> New submission from Michal Niklas : I have strange error with source encoding header. I usually use it from template which looks like: #!/usr/bin/env python # -*- coding: utf8 -*- This works well on Linux machines with Python 2.x and 3.x, but on Windows machines it works well only with Python 2.x. When I use Python 3.6 it often works, but for some sources interpreter reports: SyntaxError: encoding problem: utf8 It is easy to "correct": you can change "utf8" to "utf-8". Strange thing is that even on Windows with Python 3.6 it works well with the same source encoding header but with little edited source file. I tried to create simplest file that shows this error but works well when I delete one empty line. Error on Windows with Python 3.6: c:\temp>C:\Users\mn\AppData\Local\Programs\Python\Python36-32\python.exe zz2_err .py File "zz2_err.py", line 2 SyntaxError: encoding problem: utf8 Works well with Python 2.7: c:\temp>zz2_err.py Python: 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] ver: $Id: zz.py 3367 2018-02-07 07:26:19Z mn $ Works well when I delete one empty line: c:\temp>C:\Users\mn\AppData\Local\Programs\Python\Python36-32\python.exe zz2_err.py Python: 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit (Intel)] ver: $Id: zz.py 3367 2018-02-07 07:26:19Z mn $ SHA1 sum of source that breaks Python 3.6: c:\temp>fciv -sha1 zz2_err.py // // File Checksum Integrity Verifier version 2.05. // 4176921690c9ea9259c57c9fcc3cda84aa51015e zz2_err.py The same source on Linux works well with both Python 2.7 and Python 3.6: [mn:] sha1sum zz2_err.py 4176921690c9ea9259c57c9fcc3cda84aa51015e zz2_err.py [mn:] python zz2_err.py Python: 2.7.13 (default, Dec 1 2017, 09:21:53) [GCC 6.4.1 20170727 (Red Hat 6.4.1-1)] ver: $Id: zz.py 3367 2018-02-07 07:26:19Z mn $ [mn:] python3 zz2_err.py Python: 3.5.4 (default, Oct 9 2017, 12:07:29) [GCC 6.4.1 20170727 (Red Hat 6.4.1-1)] ver: $Id: zz.py 3367 2018-02-07 07:26:19Z mn $ [mn:] ll zz2_err.py -rw-rw-r-- 1 mn mn 266 02-09 14:12 zz2_err.py ---------- components: Interpreter Core files: zz2_err.zip messages: 311883 nosy: mniklas priority: normal severity: normal status: open title: Python 3.6 on Windows problem with source encoding header type: compile error versions: Python 3.6 Added file: https://bugs.python.org/file47432/zz2_err.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 09:05:21 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 09 Feb 2018 14:05:21 +0000 Subject: [issue32807] Add 'str' property to PathLib In-Reply-To: <1518173186.93.0.467229070634.issue32807@psf.upfronthosting.co.za> Message-ID: <1518185121.07.0.467229070634.issue32807@psf.upfronthosting.co.za> R. David Murray added the comment: This would not be a pythonic API. ---------- nosy: +r.david.murray resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 09:13:34 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 09 Feb 2018 14:13:34 +0000 Subject: [issue32807] Add 'str' property to PathLib In-Reply-To: <1518173186.93.0.467229070634.issue32807@psf.upfronthosting.co.za> Message-ID: <1518185614.36.0.467229070634.issue32807@psf.upfronthosting.co.za> R. David Murray added the comment: That was kind of an abrupt message, let me be more verbose: thank you for wanting to improve python, but as Serhiy pointed out we already solved the problem you are considering via PEP 519. In addition to that we consider str(x) to be the right way to get the string representation of something. Adding an attribute containing the string value is not how python operates in general, so we wouldn't make an exception for this class (and note that this possibility was discussed in the lead up to PEP 519 and rejected). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 09:19:06 2018 From: report at bugs.python.org (Simon Lipp) Date: Fri, 09 Feb 2018 14:19:06 +0000 Subject: [issue24255] Replace debuglevel-related logic with logging In-Reply-To: <1432189554.94.0.727112934658.issue24255@psf.upfronthosting.co.za> Message-ID: <1518185946.65.0.467229070634.issue24255@psf.upfronthosting.co.za> Change by Simon Lipp : ---------- nosy: +sloonz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 09:23:26 2018 From: report at bugs.python.org (Eryk Sun) Date: Fri, 09 Feb 2018 14:23:26 +0000 Subject: [issue32808] subprocess.check_output opens an unwanted command line window after fall creator update In-Reply-To: <1518173531.96.0.467229070634.issue32808@psf.upfronthosting.co.za> Message-ID: <1518186206.21.0.467229070634.issue32808@psf.upfronthosting.co.za> Eryk Sun added the comment: Is it just for this particular svn.exe application, or is it for any application (e.g. tasklist.exe)? The symptoms sound like svn.exe is spawning a new instance of itself with the `CREATE_NEW_CONSOLE` creation flag, which allocates a new console and replaces the standard handles if they aren't explicitly set by STARTUPINFO. svn.exe could be doing this indirectly via ShellExecute[Ex] in order to elevate via the "runas" verb. Try running Python elevated (run as administrator), in which case svn.exe may behave normally. ---------- nosy: +eryksun type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 10:04:21 2018 From: report at bugs.python.org (Christian Heigele) Date: Fri, 09 Feb 2018 15:04:21 +0000 Subject: [issue32808] subprocess.check_output opens an unwanted command line window after fall creator update In-Reply-To: <1518173531.96.0.467229070634.issue32808@psf.upfronthosting.co.za> Message-ID: <1518188661.39.0.467229070634.issue32808@psf.upfronthosting.co.za> Christian Heigele added the comment: That sounds like a hint in the right direction, for tasklist and also other non-windows tools, e.g. git the check_output works fine. Starting it in an administrator prompt however didn't change the behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 10:13:18 2018 From: report at bugs.python.org (Christian Heigele) Date: Fri, 09 Feb 2018 15:13:18 +0000 Subject: [issue32808] subprocess.check_output opens an unwanted command line window after fall creator update In-Reply-To: <1518173531.96.0.467229070634.issue32808@psf.upfronthosting.co.za> Message-ID: <1518189198.46.0.467229070634.issue32808@psf.upfronthosting.co.za> Christian Heigele added the comment: Fiy: If I explicitly parse the creationflag CREATE_NEW_CONSOLE I see the window popping up on both machines, but only on one I get the correctly filled output. process = subprocess.Popen(['svn.exe', '--help'], stdout=subprocess.PIPE, creationflags=subprocess.CREATE_NEW_CONSOLE) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 10:17:18 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 09 Feb 2018 15:17:18 +0000 Subject: [issue32808] subprocess.check_output opens an unwanted command line window after fall creator update In-Reply-To: <1518173531.96.0.467229070634.issue32808@psf.upfronthosting.co.za> Message-ID: <1518189438.46.0.467229070634.issue32808@psf.upfronthosting.co.za> Steve Dower added the comment: More likely it's set to use the WINDOWS subsystem and the allocates the console when it detects you've passed --help. Is this the regular build of SVN or from one of the GUI tools? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 10:24:48 2018 From: report at bugs.python.org (Christian Heigele) Date: Fri, 09 Feb 2018 15:24:48 +0000 Subject: [issue32808] subprocess.check_output opens an unwanted command line window after fall creator update In-Reply-To: <1518173531.96.0.467229070634.issue32808@psf.upfronthosting.co.za> Message-ID: <1518189888.95.0.467229070634.issue32808@psf.upfronthosting.co.za> Christian Heigele added the comment: @Steve: It's the command line variant delivered with tortoiseSvn, and it happens both in 1.9.7 and 1.9.5 Also it occurs not only with --help but also with the other svn arguments, e.g. up ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 10:39:36 2018 From: report at bugs.python.org (Eryk Sun) Date: Fri, 09 Feb 2018 15:39:36 +0000 Subject: [issue32808] subprocess.check_output opens an unwanted command line window after fall creator update In-Reply-To: <1518173531.96.0.467229070634.issue32808@psf.upfronthosting.co.za> Message-ID: <1518190776.15.0.467229070634.issue32808@psf.upfronthosting.co.za> Eryk Sun added the comment: Setting CREATE_NEW_CONSOLE in Python isn't the same since Popen explicitly sets the standard handles via STARTUPINFO. I installed TortoiseSVN-1.9.7.27907-x64-svn-1.9.7.msi in Windows 10 release 1709, but I can't reproduce your issue. Does it work correctly for you in the command prompt? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 10:54:42 2018 From: report at bugs.python.org (Erik Bray) Date: Fri, 09 Feb 2018 15:54:42 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: Erik Bray added the comment: On Feb 8, 2018 12:55, "Jeroen Demeyer" wrote: New submission from Jeroen Demeyer : Displaying the source code in tracebacks for Cython-compiled extension modules in IPython no longer works due to PEP 302. Various fixes are possible, the two most obvious ones are: To be clear this is nothing to do with PEP 302, but has more to do with details of the import system reimplementation of Python 3.3, which PEP 302 predates by quite a lot. linecache should continue searching for the source file even if loader.get_source() returns None. I don't necessarily agree here. For some modules there may not be a real file associated with it in the first place, much less on sys.path. I'm not exactly sure why that fallback is there in the first place, but if a module does have a __loader__ that should have the say of where the module's source code is found (if at all). 2. the method ExtensionFileLoader.get_source() should be removed (instead of being implemented and returning None). Why? What would that help with? PEP 302 says get_source() can return None of no sources are found. That ExtensionFileLoader does this is not wrong (though it might be nice if it had a way to show C sources). It certainly doesn't know anything about Cython. If anything, as you and I discussed, Cython should be providing its own loader for Cython modules (and perhaps have a way to better distinguish Cython modules from other extension modules). Now why was this broken and how do the above fix that? When IPython needs to display a traceback, it uses linecache.getlines() to get the source code to display. For Cython extensions, the filename is a correct *relative* filename (it must be a relative filename since Cython does not know where the sources will be after installation). Since the filename is relative, linecache does not immediately find it, so it looks for a PEP 302 loader. For extension modules (Cython or not), it finds an instance of ExtensionFileLoader. If the loader has a get_source() method, then it uses that to get the sources. Since ExtensionFileLoader.get_source() returns None, linecache stops looking further for sources. Instead, what should happen is that linecache continues looking for the sources in sys.path where it has a chance of finding them (if they are installed somewhere in sys.path). The problem with this analysis is that the fact that this used to work at all was relying on undocumented behavior. Also in the case of Sage, which was using this to find Cython sources, it's because we were putting Cython sources on a sys.path entry which is not a normal thing to do. I don't think there's a bug in Python here, and that this is a problem that needs to be solved on the Cython end. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 10:54:47 2018 From: report at bugs.python.org (Eryk Sun) Date: Fri, 09 Feb 2018 15:54:47 +0000 Subject: [issue32809] Python 3.6 on Windows problem with source encoding header In-Reply-To: <1518182430.26.0.467229070634.issue32809@psf.upfronthosting.co.za> Message-ID: <1518191687.77.0.467229070634.issue32809@psf.upfronthosting.co.za> Eryk Sun added the comment: zz2_err.py uses LF line endings instead of CRLF line endings. This is incompatible with text mode I/O in Microsoft C, which leads to undefined behavior. See issue 20844 and issue 27797. ---------- nosy: +eryksun resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> SyntaxError: encoding problem: iso-8859-1 on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 11:01:03 2018 From: report at bugs.python.org (Christian Heigele) Date: Fri, 09 Feb 2018 16:01:03 +0000 Subject: [issue32808] subprocess.check_output opens an unwanted command line window after fall creator update In-Reply-To: <1518173531.96.0.467229070634.issue32808@psf.upfronthosting.co.za> Message-ID: <1518192063.22.0.467229070634.issue32808@psf.upfronthosting.co.za> Christian Heigele added the comment: @Erik: That looks exactly like my setup, too bad that it's not reproducible:(. I'll try to find other machines in my company that also have the 1709 update already installed, and try to reproduce it there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 11:11:11 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Fri, 09 Feb 2018 16:11:11 +0000 Subject: [issue32642] add support for path-like objects in sys.path In-Reply-To: <1516771632.94.0.467229070634.issue32642@psf.upfronthosting.co.za> Message-ID: <1518192671.61.0.467229070634.issue32642@psf.upfronthosting.co.za> Chih-Hsuan Yen added the comment: > what file(s) is/are the sys.path code located in? If I understand it correctly, sys.path is handled in importlib._bootstrap_external.PathFinder.find_spec(). I can patch PathFinder for handling path-like objects: https://github.com/yan12125/cpython/commit/e3fd473b54cbb368533e651fd896bbc813a43924 Here's an example usage: # t.py import pathlib import sys sys.path.append(pathlib.Path('foo')) import s # foo/s.py print(123) ---------- nosy: +yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 11:13:35 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 09 Feb 2018 16:13:35 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1518192815.72.0.467229070634.issue32797@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > Why? What would that help with? PEP 302 says get_source() can return None [if] no sources are found. Returning None implies that it's absolutely impossible that there are sources to be found. But in certain cases (in the case of Cython), extension modules do have sources. So ExtensionFileLoader should assume that there may or may not be sources to be found. That is signalled by not implementing "get_source()". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 11:34:03 2018 From: report at bugs.python.org (Jeroen Demeyer) Date: Fri, 09 Feb 2018 16:34:03 +0000 Subject: [issue32797] Tracebacks from Cython modules no longer work In-Reply-To: <1518090924.55.0.467229070634.issue32797@psf.upfronthosting.co.za> Message-ID: <1518194043.42.0.467229070634.issue32797@psf.upfronthosting.co.za> Jeroen Demeyer added the comment: > I don't think there's a bug in Python here, and that this is a problem that needs to be solved on the Cython end. I'm not necessarily disagreeing here. It all depends on how ExtensionFileLoader is meant to be used. Should it try to support extension modules in the narrow sense (hand-written .c files) or in the broad sense (any kind of extension module, possibly auto-generated). Doing that properly in Cython would almost certainly need PEP 489 support though (Cython is in the process of implementing that, but apparently it's not easy) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 12:09:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Feb 2018 17:09:59 +0000 Subject: [issue30157] csv.Sniffer.sniff() regex error In-Reply-To: <1493085066.27.0.612102662908.issue30157@psf.upfronthosting.co.za> Message-ID: <1518196199.85.0.467229070634.issue30157@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +5413 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 12:11:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Feb 2018 17:11:35 +0000 Subject: [issue30157] csv.Sniffer.sniff() regex error In-Reply-To: <1493085066.27.0.612102662908.issue30157@psf.upfronthosting.co.za> Message-ID: <1518196295.4.0.467229070634.issue30157@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Since the original author didn't respond for long time I have recreated PR 1273 as PR 5601. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 12:11:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Feb 2018 17:11:49 +0000 Subject: [issue30157] csv.Sniffer.sniff() regex error In-Reply-To: <1493085066.27.0.612102662908.issue30157@psf.upfronthosting.co.za> Message-ID: <1518196309.16.0.467229070634.issue30157@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- versions: +Python 3.8 -Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 12:39:42 2018 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 09 Feb 2018 17:39:42 +0000 Subject: [issue32158] Suppress (and other contextlib context managers) should work as decorators (where appropriate) In-Reply-To: <1511897986.14.0.213398074469.issue32158@psf.upfronthosting.co.za> Message-ID: <1518197982.45.0.467229070634.issue32158@psf.upfronthosting.co.za> Jason R. Coombs added the comment: In [this question](https://stackoverflow.com/a/48710609/70170), I encounter another case where a decorator would be useful. Without the decorator: def is_docker(): path = '/proc/self/cgroup' return ( os.path.exists('/.dockerenv') or os.path.isfile(path) and any('docker' in line for line in open(path)) ) With the decorator: @suppress(FileNotFoundError) def is_docker(): return ( os.path.exists('/.dockerenv') or any('docker' in line for line in open('/proc/self/cgroup')) ) The decorator enables several improvements: - The boolean expression is now two expressions joined by 'or', which is semantically easier to parse and thus less prone to error than the three joined by and/or. - There's no longer a need to create a path variable and reference it twice, allowing the value to appear inline where it's most relevant. - The code is one line shorter. - The body of the function is two lines shorter. - The key behaviors the function is seeking to achieve are prominently presented. Acknowledged there are two caveats: - It's unclear the exception really is only expected in the 'open' call. - In the case where the exception is suppressed, the function will return None, which while resolving to boolean False, isn't False. Those caveats could be addressed, but will sacrifice readability or conciseness. I don't think this use-case warrants re-opening the ticket or revisiting the issue, but I wanted to share for consideration. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 12:51:33 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 09 Feb 2018 17:51:33 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1518198693.06.0.467229070634.issue32769@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: This is a rather small change, so probably it would be easier to discuss it in a PR. ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 12:57:04 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 09 Feb 2018 17:57:04 +0000 Subject: [issue32752] no information about accessing typing.Generic type arguments In-Reply-To: <1517612346.62.0.467229070634.issue32752@psf.upfronthosting.co.za> Message-ID: <1518199024.91.0.467229070634.issue32752@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: There is a third party library on PyPI called typing_inspect that provides thin wrappers around internal APIs to get lots of useful information about generics and other special types in typing. If there will be more requests like this, then the most used functions from there might be moved to typing itself. Or is it already enough? (Especially in view of recent typing refactoring that simplified the internal APIs.) ---------- nosy: +gvanrossum, levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 13:00:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Feb 2018 18:00:51 +0000 Subject: [issue30157] csv.Sniffer.sniff() regex error In-Reply-To: <1493085066.27.0.612102662908.issue30157@psf.upfronthosting.co.za> Message-ID: <1518199251.6.0.467229070634.issue30157@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 2411292ba8155327125d8a1da8a4c9fa003d5909 by Serhiy Storchaka in branch 'master': bpo-30157: Fix csv.Sniffer.sniff() regex pattern. (GH-5601) https://github.com/python/cpython/commit/2411292ba8155327125d8a1da8a4c9fa003d5909 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 13:02:01 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 09 Feb 2018 18:02:01 +0000 Subject: [issue30157] csv.Sniffer.sniff() regex error In-Reply-To: <1493085066.27.0.612102662908.issue30157@psf.upfronthosting.co.za> Message-ID: <1518199321.02.0.467229070634.issue30157@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5414 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 13:11:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Feb 2018 18:11:25 +0000 Subject: [issue30157] csv.Sniffer.sniff() regex error In-Reply-To: <1493085066.27.0.612102662908.issue30157@psf.upfronthosting.co.za> Message-ID: <1518199885.95.0.467229070634.issue30157@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +5415 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 13:16:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Feb 2018 18:16:06 +0000 Subject: [issue30157] csv.Sniffer.sniff() regex error In-Reply-To: <1493085066.27.0.612102662908.issue30157@psf.upfronthosting.co.za> Message-ID: <1518200166.15.0.467229070634.issue30157@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +5416 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 14:33:23 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 09 Feb 2018 19:33:23 +0000 Subject: [issue32158] Suppress (and other contextlib context managers) should work as decorators (where appropriate) In-Reply-To: <1511897986.14.0.213398074469.issue32158@psf.upfronthosting.co.za> Message-ID: <1518204803.31.0.467229070634.issue32158@psf.upfronthosting.co.za> R. David Murray added the comment: The designed use case of suppress is to cover a *single line* of python code. It should *not* be a decorator. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 14:35:27 2018 From: report at bugs.python.org (R. David Murray) Date: Fri, 09 Feb 2018 19:35:27 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1518204927.69.0.467229070634.issue32769@psf.upfronthosting.co.za> R. David Murray added the comment: PRs are for discussing proposed text/code. Discussion of whether or not to do this belongs here. (I have no opinion on this issue myself.) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 14:43:33 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 09 Feb 2018 19:43:33 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1518205413.61.0.467229070634.issue32769@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: I wanted to say implicitly that I like the idea, and that we should figure out details in a PR. But of course if someone is against this, then we should wait with a PR. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 14:49:33 2018 From: report at bugs.python.org (David Beazley) Date: Fri, 09 Feb 2018 19:49:33 +0000 Subject: [issue32810] Expose ags_gen and agt_gen in asynchronous generators Message-ID: <1518205773.11.0.467229070634.issue32810@psf.upfronthosting.co.za> New submission from David Beazley : Libraries such as Curio and asyncio provide a debugging facility that allows someone to view the call stack of generators/coroutines. For example, the _task_get_stack() function in asyncio/base_tasks.py. This works by manually walking up the chain of coroutines (by following cr_frame and gi_frame links as appropriate). The only problem is that it doesn't work if control flow falls into an async generator because an "async_generator_asend" instance is encountered and there is no meaningful way to proceed any further with stack inspection. This problem could be fixed if "async_generator_asend" and "async_generator_athrow" instances exposed the underlying "ags_gen" and "agt_gen" attribute that's held inside the corresponding C structures in Objects/genobject.c. Note: I made a quick and dirty "hack" to Python to extract "ags_gen" and verified that having this information would allow me to get complete stack traces in Curio. ---------- messages: 311906 nosy: dabeaz priority: normal severity: normal status: open title: Expose ags_gen and agt_gen in asynchronous generators type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 16:16:15 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Feb 2018 21:16:15 +0000 Subject: [issue32750] lib2to3 log_error method behavior is inconsitent with documentation In-Reply-To: <1517596667.28.0.467229070634.issue32750@psf.upfronthosting.co.za> Message-ID: <1518210975.48.0.467229070634.issue32750@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: +benjamin.peterson versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 16:17:09 2018 From: report at bugs.python.org (Yarko Tymciurak) Date: Fri, 09 Feb 2018 21:17:09 +0000 Subject: [issue32810] Expose ags_gen and agt_gen in asynchronous generators In-Reply-To: <1518205773.11.0.467229070634.issue32810@psf.upfronthosting.co.za> Message-ID: <1518211029.59.0.467229070634.issue32810@psf.upfronthosting.co.za> Change by Yarko Tymciurak : ---------- nosy: +yarkot _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 16:26:01 2018 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 09 Feb 2018 21:26:01 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1518211561.14.0.467229070634.issue32769@psf.upfronthosting.co.za> Guido van Rossum added the comment: I'm all for adding a bunch of terms related to type hints/annotations to the Glossary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 16:52:55 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Fri, 09 Feb 2018 21:52:55 +0000 Subject: [issue32810] Expose ags_gen and agt_gen in asynchronous generators In-Reply-To: <1518205773.11.0.467229070634.issue32810@psf.upfronthosting.co.za> Message-ID: <1518213175.63.0.467229070634.issue32810@psf.upfronthosting.co.za> Change by Nathaniel Smith : ---------- nosy: +asvetlov, giampaolo.rodola, njs, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 17:00:56 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Feb 2018 22:00:56 +0000 Subject: [issue30157] csv.Sniffer.sniff() regex error In-Reply-To: <1493085066.27.0.612102662908.issue30157@psf.upfronthosting.co.za> Message-ID: <1518213656.24.0.467229070634.issue30157@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 2ef69a1d45de8aa41c45d32d9ee1ff227bb1a566 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-30157: Fix csv.Sniffer.sniff() regex pattern. (GH-5601) (GH-5602) https://github.com/python/cpython/commit/2ef69a1d45de8aa41c45d32d9ee1ff227bb1a566 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 17:01:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Feb 2018 22:01:42 +0000 Subject: [issue30157] csv.Sniffer.sniff() regex error In-Reply-To: <1493085066.27.0.612102662908.issue30157@psf.upfronthosting.co.za> Message-ID: <1518213702.92.0.467229070634.issue30157@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 504f19145ca5738162d6a720fa45b364ac8c0384 by Serhiy Storchaka in branch '3.6': [3.6] bpo-30157: Fix csv.Sniffer.sniff() regex pattern. (GH-5601) (GH-5603) https://github.com/python/cpython/commit/504f19145ca5738162d6a720fa45b364ac8c0384 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 17:02:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Feb 2018 22:02:07 +0000 Subject: [issue30157] csv.Sniffer.sniff() regex error In-Reply-To: <1493085066.27.0.612102662908.issue30157@psf.upfronthosting.co.za> Message-ID: <1518213727.09.0.467229070634.issue30157@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset e7197936c987bdf31b6b7b1dab275d1a762e03b3 by Serhiy Storchaka in branch '2.7': [2.7] bpo-30157: Fix csv.Sniffer.sniff() regex pattern. (GH-5601) (GH-5604) https://github.com/python/cpython/commit/e7197936c987bdf31b6b7b1dab275d1a762e03b3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 17:03:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Feb 2018 22:03:21 +0000 Subject: [issue30157] csv.Sniffer.sniff() regex error In-Reply-To: <1493085066.27.0.612102662908.issue30157@psf.upfronthosting.co.za> Message-ID: <1518213801.95.0.467229070634.issue30157@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your contribution Jake! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 17:08:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Feb 2018 22:08:19 +0000 Subject: [issue30688] support named Unicode escapes (\N{name}) in re In-Reply-To: <1497685136.94.0.225619820407.issue30688@psf.upfronthosting.co.za> Message-ID: <1518214099.84.0.467229070634.issue30688@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset a445feb72902e4a3c5ae712f0c289309e1580d52 by Serhiy Storchaka in branch 'master': bpo-30688: Support \N{name} escapes in re patterns. (GH-5588) https://github.com/python/cpython/commit/a445feb72902e4a3c5ae712f0c289309e1580d52 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 17:09:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 09 Feb 2018 22:09:13 +0000 Subject: [issue30688] support named Unicode escapes (\N{name}) in re In-Reply-To: <1497685136.94.0.225619820407.issue30688@psf.upfronthosting.co.za> Message-ID: <1518214153.92.0.467229070634.issue30688@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your contribution Jonathan! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 17:39:45 2018 From: report at bugs.python.org (buhtz) Date: Fri, 09 Feb 2018 22:39:45 +0000 Subject: [issue21084] IDLE can't deal with characters above the range (U+0000-U+FFFF) In-Reply-To: <1396008065.84.0.00802001667749.issue21084@psf.upfronthosting.co.za> Message-ID: <1518215985.14.0.467229070634.issue21084@psf.upfronthosting.co.za> Change by buhtz : ---------- nosy: +buhtz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 18:14:59 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Feb 2018 23:14:59 +0000 Subject: [issue32755] Several cookies with the same name get intermixed In-Reply-To: <1517652228.92.0.467229070634.issue32755@psf.upfronthosting.co.za> Message-ID: <1518218099.21.0.467229070634.issue32755@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This tracker is for modifying the cpython distribution -- the interpreter, stdlib, doc, and other associated files. Questions about using cpython and 3rd party libraries like aiohttp should be directed elsewhere. So, the relevant question here is whether http.cookies has a bug. I reproduced the reported behavior in 3.7.0b1. >>> from http.cookies import SimpleCookie >>> sc = SimpleCookie() >>> sc.load('LOGIN_SESSION=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/; domain=.etoday.co.kr') >>> sc >>> sc.keys() dict_keys(['LOGIN_SESSION']) >>> sc['LOGIN_SESSION'] >>> sc.load('LOGIN_SESSION=18676-0.53621000; path=/; domain=.etoday.co.kr') >>> sc['LOGIN_SESSION'] The Morsel created in the first call is used in the second call because _parse_string ends with assert tp == TYPE_KEYVALUE rval, cval = value self.__set(key, rval, cval) M = self[key] and __set begins with M = self.get(key, Morsel()) M.set(key, real_value, coded_value) dict.__setitem__(self, key, M) Is this a bug? I know little about cookies, but https://tools.ietf.org/html/rfc2109.html has " 4.3.3 Cookie Management If a user agent receives a Set-Cookie response header whose NAME is the same as a pre-existing cookie, and whose Domain and Path attribute values exactly (string) match those of a pre-existing cookie, the new cookie supersedes the old. ..." I don't know if pre-existing means 'previous session', 'previous server response', or 'previous header'. I have no idea if duplicate cookies in the same response is even legal. Even if it is, the server would do better to not do so or explicitly give a new expires date. And if we do make a change, we might limit it to future versions. David, what do you think? Close as 'not a bug' or 'fix'? ---------- nosy: +r.david.murray, terry.reedy versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 18:18:48 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Feb 2018 23:18:48 +0000 Subject: [issue32756] argparse: parse_known_args: raising exception on unknown arg following known one In-Reply-To: <1517661104.06.0.467229070634.issue32756@psf.upfronthosting.co.za> Message-ID: <1518218328.92.0.467229070634.issue32756@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: +bethard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 18:32:42 2018 From: report at bugs.python.org (Anthony Sottile) Date: Fri, 09 Feb 2018 23:32:42 +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: <1518219162.93.0.467229070634.issue30945@psf.upfronthosting.co.za> Anthony Sottile added the comment: Seeing this as well when running the cpython test suite in docker: ``` $ ./python -m test.test_asyncio ... [18 similar traces omitted] ====================================================================== ERROR: test_sock_sendfile_zero_size (test.test_asyncio.test_unix_events.SelectorEventLoopUnixSockSendfileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/code/Lib/test/test_asyncio/test_unix_events.py", line 559, in test_sock_sendfile_zero_size sock, proto = self.prepare() File "/code/Lib/test/test_asyncio/test_unix_events.py", line 483, in prepare lambda: proto, support.HOST, port)) File "/code/Lib/test/test_asyncio/test_unix_events.py", line 476, in run_loop return self.loop.run_until_complete(coro) File "/code/Lib/asyncio/base_events.py", line 566, in run_until_complete return future.result() File "/code/Lib/asyncio/base_events.py", line 1346, in create_server % (sa, err.strerror.lower())) from None OSError: [Errno 99] error while attempting to bind on address ('::1', 39527, 0, 0): cannot assign requested address ---------------------------------------------------------------------- ``` I'm going to try and write a patch to skip these tests (there's already a helper) ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 18:52:27 2018 From: report at bugs.python.org (Anthony Sottile) Date: Fri, 09 Feb 2018 23:52:27 +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: <1518220347.26.0.467229070634.issue30945@psf.upfronthosting.co.za> Anthony Sottile added the comment: Actually, my issue seems to be something more strange. The host being passed in is `localhost` which resolves to: ``` >>> pprint.pprint(socket.getaddrinfo('localhost', 80)) [(, , 6, '', ('127.0.0.1', 80)), (, , 17, '', ('127.0.0.1', 80)), (, , 0, '', ('127.0.0.1', 80)), (, , 6, '', ('::1', 80, 0, 0)), (, , 17, '', ('::1', 80, 0, 0)), (, , 0, '', ('::1', 80, 0, 0))] ``` asyncio is picking ipv6 because of this code: https://github.com/python/cpython/blob/a445feb72902e4a3c5ae712f0c289309e1580d52/Lib/asyncio/base_events.py#L1334-L1340 despite my host not actually having an ipv6 network hooked up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 18:53:38 2018 From: report at bugs.python.org (Anthony Sottile) Date: Fri, 09 Feb 2018 23:53:38 +0000 Subject: [issue30945] loop.create_server does not detect if the interface is IPv6 enabled In-Reply-To: <1500285874.65.0.183073718331.issue30945@psf.upfronthosting.co.za> Message-ID: <1518220418.12.0.467229070634.issue30945@psf.upfronthosting.co.za> Anthony Sottile added the comment: Applying this patch makes the tests pass for me, but I don't think the patch is appropriate (just hides the bug): ``` $ git diff diff --git a/Lib/test/test_asyncio/test_unix_events.py b/Lib/test/test_asyncio/test_unix_events.py index 5bd76d3..ff6c4e1 100644 --- a/Lib/test/test_asyncio/test_unix_events.py +++ b/Lib/test/test_asyncio/test_unix_events.py @@ -480,7 +480,7 @@ class SelectorEventLoopUnixSockSendfileTests(test_utils.TestCase): proto = self.MyProto(self.loop) port = support.find_unused_port() server = self.run_loop(self.loop.create_server( - lambda: proto, support.HOST, port)) + lambda: proto, support.HOSTv4, port)) self.run_loop(self.loop.sock_connect(sock, (support.HOST, port))) def cleanup(): ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 18:58:33 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Feb 2018 23:58:33 +0000 Subject: [issue32757] Python 2.7 : Buffer Overflow vulnerability in exec() function In-Reply-To: <1517677752.38.0.467229070634.issue32757@psf.upfronthosting.co.za> Message-ID: <1518220713.87.0.467229070634.issue32757@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am pretty sure that if one deletes the prefix 'exec(' and suffic ')' and just executes argument expression that has something on the order of 10000 chr(nn) calls added together, one would get the same result. In other words, I believe that the outer exec and the origin of the expression and the individual nn values are irrelevant. It is known that the Python compiler handles at least some recursive expressions with recursion and therefore has limits on the complexity of expressions it can handle. The stackoverflow crash, instead of an exception, *is* a bug. It was fixed sometime in 3.x. With 3.6.4: C:\Users\Terry>python f:/dev/tem/poc.py RecursionError: maximum recursion depth exceeded during compilation Perhaps one of the compiler experts knows whether the fix cannot be backported (within reasonable effort) or just has not been. ---------- nosy: +benjamin.peterson, brett.cannon, ncoghlan, terry.reedy, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 19:02:11 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Feb 2018 00:02:11 +0000 Subject: [issue32757] Python 2.7 : Buffer Overflow vulnerability in exec() function In-Reply-To: <1517677752.38.0.467229070634.issue32757@psf.upfronthosting.co.za> Message-ID: <1518220931.9.0.467229070634.issue32757@psf.upfronthosting.co.za> Terry J. Reedy added the comment: #32758 is about situations where stackoverflow *can* occur in 3.x. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 19:18:23 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 10 Feb 2018 00:18:23 +0000 Subject: [issue32769] Add 'annotations' to the glossary In-Reply-To: <1518019777.95.0.467229070634.issue32769@psf.upfronthosting.co.za> Message-ID: <1518221903.84.0.467229070634.issue32769@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 19:22:41 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Feb 2018 00:22:41 +0000 Subject: [issue32758] Stack overflow when parse long expression to AST In-Reply-To: <1517682171.17.0.467229070634.issue32758@psf.upfronthosting.co.za> Message-ID: <1518222161.34.0.467229070634.issue32758@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Experimenting on Windows with IDLE's current 3.7 Shell, where a user process crash restarts Shell, compile('+a'*31365, '?', 'eval') consistently gives RecursionError, values a bit larger sometimes crash, and values much larger (32000, at max) consistently crash. Perhaps it is not just a coincidence that the regressed lower limit for crashing is near 2**15. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 19:29:54 2018 From: report at bugs.python.org (Alexander Mohr) Date: Sat, 10 Feb 2018 00:29:54 +0000 Subject: [issue32811] test_os.py fails when run in docker container on OSX host Message-ID: <1518222594.14.0.467229070634.issue32811@psf.upfronthosting.co.za> New submission from Alexander Mohr : This test fails when run in a debian docker container from a OSX host with the following error: test test_os failed -- Traceback (most recent call last): File "/build/Python-3.6.3/Lib/test/test_os.py", line 3273, in test_attributes self.check_entry(entry, 'dir', True, False, False) File "/build/Python-3.6.3/Lib/test/test_os.py", line 3228, in check_entry os.stat(entry.path, follow_symlinks=False).st_ino) AssertionError: 3018467 != 1419357 works fine when run on ubuntu host. If this is a docker problem I'd be happy to report there. ---------- components: Build messages: 311921 nosy: thehesiod priority: normal severity: normal status: open title: test_os.py fails when run in docker container on OSX host type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 19:30:44 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Feb 2018 00:30:44 +0000 Subject: [issue32758] Stack overflow when parse long expression to AST In-Reply-To: <1517682171.17.0.467229070634.issue32758@psf.upfronthosting.co.za> Message-ID: <1518222644.52.0.467229070634.issue32758@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Ditto as to the limit for ast.parse. >>> import ast; ast.parse('+chr(33)'*32000) ============================ RESTART: Shell ========================= >>> import ast; ast.parse('+chr(33)'*31000) <_ast.Module object at 0x000001E7920F34A8> I see the same in 3.6 and 3.5, so this is not a 3.7 regression. Rather, was the ast.parse behavior somehow copied into compile for 3.7, perhaps by 'simplifying' code? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 19:31:20 2018 From: report at bugs.python.org (fangyizhou) Date: Sat, 10 Feb 2018 00:31:20 +0000 Subject: [issue30688] support named Unicode escapes (\N{name}) in re In-Reply-To: <1497685136.94.0.225619820407.issue30688@psf.upfronthosting.co.za> Message-ID: <1518222680.62.0.467229070634.issue30688@psf.upfronthosting.co.za> fangyizhou added the comment: Hello This leads to build failures due to circular dependency At generate-posix-vars stage, unicodedata is imported (due to import pprint)but it has not been built due to it being a C module. However, building C modules happen after generate-posix-vars. See full message below. ./python.exe -E -S -m sysconfig --generate-posix-vars ;\ if test $? -ne 0 ; then \ echo "generate-posix-vars failed" ; \ rm -f ./pybuilddir.txt ; \ exit 1 ; \ fi Traceback (most recent call last): File "/Users/fangyi/cpython/Lib/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/Users/fangyi/cpython/Lib/runpy.py", line 85, in _run_code exec(code, run_globals) File "/Users/fangyi/cpython/Lib/sysconfig.py", line 700, in _main() File "/Users/fangyi/cpython/Lib/sysconfig.py", line 688, in _main _generate_posix_vars() File "/Users/fangyi/cpython/Lib/sysconfig.py", line 350, in _generate_posix_vars import pprint File "/Users/fangyi/cpython/Lib/pprint.py", line 38, in import re File "/Users/fangyi/cpython/Lib/re.py", line 123, in import sre_compile File "/Users/fangyi/cpython/Lib/sre_compile.py", line 14, in import sre_parse File "/Users/fangyi/cpython/Lib/sre_parse.py", line 16, in import unicodedata ModuleNotFoundError: No module named 'unicodedata' generate-posix-vars failed ---------- nosy: +fangyizhou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 19:35:50 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 10 Feb 2018 00:35:50 +0000 Subject: [issue32810] Expose ags_gen and agt_gen in asynchronous generators In-Reply-To: <1518205773.11.0.467229070634.issue32810@psf.upfronthosting.co.za> Message-ID: <1518222950.11.0.467229070634.issue32810@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- components: +asyncio _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 19:45:27 2018 From: report at bugs.python.org (Alexander Mohr) Date: Sat, 10 Feb 2018 00:45:27 +0000 Subject: [issue32811] test_os.py fails when run in docker container on OSX host In-Reply-To: <1518222594.14.0.467229070634.issue32811@psf.upfronthosting.co.za> Message-ID: <1518223527.56.0.467229070634.issue32811@psf.upfronthosting.co.za> Alexander Mohr added the comment: btw there are some other tests that fail too after removing that test like: test test_tokenize failed -- Traceback (most recent call last): File "/build/Python-3.6.3/Lib/test/test_tokenize.py", line 1557, in test_random_files testfiles.remove(os.path.join(tempdir, "test_%s.py") % f) ValueError: list.remove(x): x not in list ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 19:51:24 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Feb 2018 00:51:24 +0000 Subject: [issue32766] 4.7.7. Function Annotations In-Reply-To: <1517767044.74.0.467229070634.issue32766@psf.upfronthosting.co.za> Message-ID: <1518223884.27.0.467229070634.issue32766@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 3.5 and its docs are frozen except for security patches. The 3.7 doc is identical. The sentence refers to the def statement and perhaps should say so. It should end with 'a required argument, an optional argument, and the return value annotated'. Or maybe better, 'annotations for ... and the return value.' In 3.6, cpython dicts became (unofficially) input ordered. In 3.7, this became official for Python dicts. The example output should be changed to what it is now. (This is an example where the change produces better output.) Annotations: {'ham': , 'eggs': , 'return': } ---------- nosy: +terry.reedy versions: +Python 3.6, Python 3.7, Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 20:13:18 2018 From: report at bugs.python.org (Fangyi Zhou) Date: Sat, 10 Feb 2018 01:13:18 +0000 Subject: [issue30688] support named Unicode escapes (\N{name}) in re In-Reply-To: <1497685136.94.0.225619820407.issue30688@psf.upfronthosting.co.za> Message-ID: <1518225198.45.0.467229070634.issue30688@psf.upfronthosting.co.za> Change by Fangyi Zhou : ---------- pull_requests: +5417 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 21:41:04 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 10 Feb 2018 02:41:04 +0000 Subject: [issue30688] support named Unicode escapes (\N{name}) in re In-Reply-To: <1497685136.94.0.225619820407.issue30688@psf.upfronthosting.co.za> Message-ID: <1518230464.7.0.467229070634.issue30688@psf.upfronthosting.co.za> Ned Deily added the comment: The buidbots are broken by this. Please fix or revert. ---------- nosy: +ned.deily priority: normal -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 21:45:18 2018 From: report at bugs.python.org (john) Date: Sat, 10 Feb 2018 02:45:18 +0000 Subject: [issue32812] edited code only runs after closing and re-opening Python. Message-ID: <1518230717.87.0.467229070634.issue32812@psf.upfronthosting.co.za> New submission from john : For some reason, whenever I make a change to my code in Python, I have to restart Python for the change to take effect. Otherwise Python just runs whatever the code was when I opened the .py file. Worth noting is that this has not always been true, and is not always true. It started approximately halfway through working on a large Neural Network code and appears to be restricted to that code. (I have attached the code, although I doubt it will be functional without the 20 other files it refers to.) This has become a huge pain in the neck, wasting an estimated 23.7% of my life. Please send help. Thanks! ^.^ ---------- files: train.py messages: 311927 nosy: johnschwarcz priority: normal severity: normal status: open title: edited code only runs after closing and re-opening Python. versions: Python 3.6 Added file: https://bugs.python.org/file47433/train.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 21:48:25 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 10 Feb 2018 02:48:25 +0000 Subject: [issue32812] edited code only runs after closing and re-opening Python. In-Reply-To: <1518230717.87.0.467229070634.issue32812@psf.upfronthosting.co.za> Message-ID: <1518230905.66.0.467229070634.issue32812@psf.upfronthosting.co.za> Ned Deily added the comment: You are going to need to be much more specific about exactly what steps you are taking to see the results you are concerned about. Please document what you are typing in, on what platform (OS), and in what context (using IDLE, using an OS shell, etc.). ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 21:57:04 2018 From: report at bugs.python.org (john) Date: Sat, 10 Feb 2018 02:57:04 +0000 Subject: [issue32812] edited code only runs after closing and re-opening Python. In-Reply-To: <1518230717.87.0.467229070634.issue32812@psf.upfronthosting.co.za> Message-ID: <1518231424.31.0.467229070634.issue32812@psf.upfronthosting.co.za> john added the comment: I apologize, I'm very new to coding so I'm not very familiar with all the terminologies. I'm user Spyder (Python 3.6) on Windows 10. I run my code in Console via highlighting and Shift + Enter. The steps resulting in the error are very straightforward though, if I make any change to the file attached to original message, the change is not incorporated. Spyder just runs the code as it was written when I opened the .py file. For any change to a code to take effect, I have to close and reopen Spyder. I apologize if this still isn't specific enough. Please let me know what other information I should provide. Again, I apologize for my lack of knowledge in this area. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 22:09:41 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 10 Feb 2018 03:09:41 +0000 Subject: [issue32811] test_os.py fails when run in docker container on OSX host In-Reply-To: <1518222594.14.0.467229070634.issue32811@psf.upfronthosting.co.za> Message-ID: <1518232181.72.0.467229070634.issue32811@psf.upfronthosting.co.za> Ned Deily added the comment: The test runs fins running natively on the various macOS systems I have access to. I don't have access to a Docker configuration for macOS so I am unable to reproduce and it's not a configuration we explicitly support. Perhaps you can try debugging the test run on your configuration, for example by adding print() functions and the like. Otherwise, there's not likely to be any action on this. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 22:16:55 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 10 Feb 2018 03:16:55 +0000 Subject: [issue32812] edited code only runs after closing and re-opening Python. In-Reply-To: <1518230717.87.0.467229070634.issue32812@psf.upfronthosting.co.za> Message-ID: <1518232615.49.0.467229070634.issue32812@psf.upfronthosting.co.za> Ned Deily added the comment: OK, since you are using Spyder, you should ask for help with it. On the Spyder project page (https://pythonhosted.org/spyder/index.html), it looks like there is a Spyder forum here: https://groups.google.com/forum/#!forum/spyderlib Trying asking there. Good luck! ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 22:31:53 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Feb 2018 03:31:53 +0000 Subject: [issue32767] Mutating a list while iterating: clarify the docs In-Reply-To: <1517772420.88.0.467229070634.issue32767@psf.upfronthosting.co.za> Message-ID: <1518233513.98.0.467229070634.issue32767@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Replace 'sequence' with 'collection' and I agree. The for loop code just calls iter() and it.next() until an exception. The behavior of it.next for builtins should be documented with the builtins. (I think there is something already about dict iteration in the dict entry.) I agree we should say that the list iterator checks the internal index against the current .__len__() on each .next call. I had not thought about the usefullness of doing that for breadth-first search, so yes, mention that. ---------- nosy: +terry.reedy versions: -Python 2.7, Python 3.4, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 22:38:04 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Feb 2018 03:38:04 +0000 Subject: [issue32779] urljoining an empty query string doesn't clear query string In-Reply-To: <1517892529.44.0.467229070634.issue32779@psf.upfronthosting.co.za> Message-ID: <1518233884.49.0.467229070634.issue32779@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 22:39:11 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Feb 2018 03:39:11 +0000 Subject: [issue32780] ctypes: memoryview gives incorrect PEP3118 format strings for both packed and unpacked structs In-Reply-To: <1517894879.39.0.467229070634.issue32780@psf.upfronthosting.co.za> Message-ID: <1518233951.38.0.467229070634.issue32780@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: +amaury.forgeotdarc, belopolsky, meador.inge versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 22:39:18 2018 From: report at bugs.python.org (Nitish) Date: Sat, 10 Feb 2018 03:39:18 +0000 Subject: [issue32755] Several cookies with the same name get intermixed In-Reply-To: <1517652228.92.0.467229070634.issue32755@psf.upfronthosting.co.za> Message-ID: <1518233958.46.0.467229070634.issue32755@psf.upfronthosting.co.za> Change by Nitish : ---------- nosy: +nitishch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 22:40:05 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Feb 2018 03:40:05 +0000 Subject: [issue32782] ctypes: memoryview gives incorrect PEP3118 itemsize for array of length zero In-Reply-To: <1517943201.04.0.467229070634.issue32782@psf.upfronthosting.co.za> Message-ID: <1518234005.7.0.467229070634.issue32782@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: +amaury.forgeotdarc, belopolsky, meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 22:45:18 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Feb 2018 03:45:18 +0000 Subject: [issue32786] Didnot work strftime() when hangeul in format sting In-Reply-To: <1517989074.34.0.467229070634.issue32786@psf.upfronthosting.co.za> Message-ID: <1518234318.67.0.467229070634.issue32786@psf.upfronthosting.co.za> Terry J. Reedy added the comment: There are hundreds of bug fixes in 3.6 that are not in 3.4. If there is a Django version that works with 3.6 and you can otherwise upgrade, think about doing so. ---------- nosy: +terry.reedy resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 22:46:44 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Feb 2018 03:46:44 +0000 Subject: [issue32793] smtplib: duplicated debug message In-Reply-To: <1518080718.92.0.467229070634.issue32793@psf.upfronthosting.co.za> Message-ID: <1518234404.44.0.467229070634.issue32793@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: +giampaolo.rodola versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 22:58:54 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Feb 2018 03:58:54 +0000 Subject: [issue32800] Replace deprecated link to new page on w3c site In-Reply-To: <1518103994.08.0.467229070634.issue32800@psf.upfronthosting.co.za> Message-ID: <1518235134.9.0.467229070634.issue32800@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Ah, yes, the 'big red message' nicely gives the replacement. Please submit a PR against master. Include a news blurb if you can (explained in the devguide). If you cannot set the backport labels (I don't know of non-committer author's are allowed to, mention that all 3 are needed in a comment (I checked 2.7 and 3.8). ---------- nosy: +terry.reedy stage: -> needs patch type: enhancement -> behavior versions: +Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 23:10:03 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Feb 2018 04:10:03 +0000 Subject: [issue32801] Lib/_strptime.py: utilize all() In-Reply-To: <1518106189.47.0.467229070634.issue32801@psf.upfronthosting.co.za> Message-ID: <1518235803.8.0.467229070634.issue32801@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This looks straightforward. I believe we normally do not backport this type of change. The tests for _strptime.py are in test_strptime.py, not test__strptime.py. ---------- nosy: +terry.reedy stage: -> patch review type: -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 23:11:42 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Feb 2018 04:11: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: <1518235902.84.0.467229070634.issue32804@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 9 23:35:46 2018 From: report at bugs.python.org (Arka) Date: Sat, 10 Feb 2018 04:35:46 +0000 Subject: [issue32807] Add 'str' property to PathLib In-Reply-To: <1518173186.93.0.467229070634.issue32807@psf.upfronthosting.co.za> Message-ID: <1518237346.15.0.467229070634.issue32807@psf.upfronthosting.co.za> Arka added the comment: @Serhiy No, I wasn't aware of that. @R. David Murray Thank you, David. What you said, makes sense and I agree with you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 01:05:14 2018 From: report at bugs.python.org (Paul Fisher) Date: Sat, 10 Feb 2018 06:05:14 +0000 Subject: [issue32779] urljoining an empty query string doesn't clear query string In-Reply-To: <1517892529.44.0.467229070634.issue32779@psf.upfronthosting.co.za> Message-ID: <1518242714.98.0.467229070634.issue32779@psf.upfronthosting.co.za> Paul Fisher added the comment: I'm working on a patch for this and can have one up in the next week or so, once I get the CLA signed and other boxes ticked. I'm new to the Github process but hopefully it will be a good start for the discussion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 01:59:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 10 Feb 2018 06:59:32 +0000 Subject: [issue30688] support named Unicode escapes (\N{name}) in re In-Reply-To: <1497685136.94.0.225619820407.issue30688@psf.upfronthosting.co.za> Message-ID: <1518245972.95.0.467229070634.issue30688@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 5df5286abda57a0b3865d4fc3e25aaf1a820ef49 by Serhiy Storchaka (Zhou Fangyi) in branch 'master': bpo-30688: Import unicodedata only when needed. (GH-5606) https://github.com/python/cpython/commit/5df5286abda57a0b3865d4fc3e25aaf1a820ef49 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 02:03:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 10 Feb 2018 07:03:26 +0000 Subject: [issue30688] support named Unicode escapes (\N{name}) in re In-Reply-To: <1497685136.94.0.225619820407.issue30688@psf.upfronthosting.co.za> Message-ID: <1518246206.03.0.467229070634.issue30688@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Fangyi Zhou for your report and fix. Changes are trivial and didn't require to sign CLA. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 02:03:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 10 Feb 2018 07:03:38 +0000 Subject: [issue30688] support named Unicode escapes (\N{name}) in re In-Reply-To: <1497685136.94.0.225619820407.issue30688@psf.upfronthosting.co.za> Message-ID: <1518246218.41.0.467229070634.issue30688@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- priority: critical -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 02:04:15 2018 From: report at bugs.python.org (Steffen Ullrich) Date: Sat, 10 Feb 2018 07:04:15 +0000 Subject: [issue32813] SSL shared_ciphers implementation wrong - returns configured but not shared ciphers Message-ID: <1518246255.91.0.467229070634.issue32813@psf.upfronthosting.co.za> New submission from Steffen Ullrich : The current implementation of shared_ciphers uses the SSL_get_ciphers method. This method returns the list of configured ciphers (i.e. from the context) and not the list of ciphers shared between client and server. To get this list one can use the documented SSL_get_client_ciphers for OpenSSL >= 1.1.0, access ssl->sessions->ciphers directly or parse the result from the undocumented SSL_get_shared_ciphers for older versions of OpenSSL. See also https://stackoverflow.com/questions/48717497/python-ssl-shared-ciphers-not-as-documented/48718081#48718081 ---------- messages: 311940 nosy: noxxi priority: normal severity: normal status: open title: SSL shared_ciphers implementation wrong - returns configured but not shared ciphers type: behavior versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 02:25:17 2018 From: report at bugs.python.org (Cecile Tonglet) Date: Sat, 10 Feb 2018 07:25:17 +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: <1518247517.44.0.467229070634.issue30945@psf.upfronthosting.co.za> Cecile Tonglet added the comment: I see that the patch hasn't been applied to master on GitHub. Is there anything else expected from me on this ticket? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 02:08:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 10 Feb 2018 07:08:53 +0000 Subject: [issue32801] Lib/_strptime.py: utilize all() In-Reply-To: <1518106189.47.0.467229070634.issue32801@psf.upfronthosting.co.za> Message-ID: <1518246533.22.0.467229070634.issue32801@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Just if not any(to_convert): return '' ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 03:23:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 10 Feb 2018 08:23:18 +0000 Subject: [issue32757] Python 2.7 : Buffer Overflow vulnerability in exec() function In-Reply-To: <1517677752.38.0.467229070634.issue32757@psf.upfronthosting.co.za> Message-ID: <1518250998.71.0.467229070634.issue32757@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I was going to write that this issue was fixed in Python 3 and it was decided to not backport the fix to Python 2. This is mostly true. But unfortunately there is a similar way of crashing Python 3 (issue32758). This isn't a vulnerability. To exploit this bug the attacker need ability to execute an arbitrary code. An in that case crashing Python is not the worst result. This bug can cause a problem with generated code (as in your joke example). In any case I have doubts that the fix for Python 3 will be backported to Python 2. I don't see a simple solution, the code of Python 2 and Python 3 is different enough, and there is less than 2 years of official support of Python 2.7 left. I suggest to close this issue with the resolution "wont fix". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 03:53:30 2018 From: report at bugs.python.org (Steffen Ullrich) Date: Sat, 10 Feb 2018 08:53:30 +0000 Subject: [issue32813] SSL shared_ciphers implementation wrong - returns configured but not shared ciphers In-Reply-To: <1518246255.91.0.467229070634.issue32813@psf.upfronthosting.co.za> Message-ID: <1518252810.94.0.467229070634.issue32813@psf.upfronthosting.co.za> Steffen Ullrich added the comment: Actually, it looks like that neither SSL_get_shared ciphers nor SSL_get_client_ciphers nor accessing ssl->session->ciphers nor SSL_get_ciphers return the **shared** ciphers. The first three seem to return the ciphers offered by the client and the last one returns the ciphers set for the server. It looks like even the OpenSSL developers do not really know what they are doing. The same contents of ssl->session->ciphers is made available through the functions SSL_get_shared_ciphers and SSL_get_client_ciphers which based on the names should return different information. And, the ciphers member of the ssl_session_st structure is documented in for the newest and even the oldest versions (i.e. like 0.9.8) as: STACK_OF(SSL_CIPHER) *ciphers; /* shared ciphers? */ In other words: the developers are not sure themselves if this contains the shared ciphers or not (and it does not, at least in OpenSSL 1.0.2 and OpenSSL 1.1.0). In other words: I doubt that there is a documented way to get the actually shared ciphers. One need probably to reimplement parts of the internal ssl3_choose_cipher function since this is the place where cipher_list and session->ciphers gets combined with various other restrictions (i.e. like type of certificate) to get the shared and thus the final cipher. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 04:00:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 10 Feb 2018 09:00:06 +0000 Subject: [issue32758] Stack overflow when parse long expression to AST In-Reply-To: <1517682171.17.0.467229070634.issue32758@psf.upfronthosting.co.za> Message-ID: <1518253206.75.0.467229070634.issue32758@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: On Linux the limit is much larger that 2**15. This depends on the stack size, it is smaller on Windows. The stack is overflowed by recursive call of ast2obj_expr in Python/Python-ast.c. The same problem exists in other recursive AST processing code: optimizing, unparsing. This is why 3.7 can crash in cases when 3.6 was not crashed. I don't see an easy way of fixing this. The common way is surrounding recursive calls with Py_EnterRecursiveCall()/Py_LeaveRecursiveCall(). But this make the limit too small (1000 by default). In other cases it is enough. The data structures with 1000 levels of nesting are rare. In any case the Python compiler has lower limit on nesting indented blocks. But in this case the linear sequence of binary operators is compiled to deeply nested structure. I see two hard ways of properly fixing this. 1. Rewrite all AST expression processing code with using an explicit stack instead of function stack. This will complicate a lot of C code too much. Python code should be rewritten too if you don't want to get a RecursionError in corner cases, but for common cases it can be left unmodified. 2. Change binary operations representation, so that a+b+c+d will be represented as ('+', (a, b, c, d)) instead of ('+', ('+', ('+', a, b), c), d). This is backward incompatible change and needs to rewrite any AST processing code (in C and Python). This solution can't be backported. But the resulting code will be simpler than when rewrite them for the first approach. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 04:51:35 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 10 Feb 2018 09:51:35 +0000 Subject: [issue32810] Expose ags_gen and agt_gen in asynchronous generators In-Reply-To: <1518205773.11.0.467229070634.issue32810@psf.upfronthosting.co.za> Message-ID: <1518256295.07.0.467229070634.issue32810@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Make sense at first glaze. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 05:46:21 2018 From: report at bugs.python.org (Segev Finer) Date: Sat, 10 Feb 2018 10:46:21 +0000 Subject: [issue32814] smtplib.send_message mishandles 8BITMIME RFC 6152 Message-ID: <1518259581.24.0.467229070634.issue32814@psf.upfronthosting.co.za> New submission from Segev Finer : According to https://tools.ietf.org/html/rfc6152 you should only send an 8bit email body when the server advertises 8BITMIME in the EHLO, and you should declare it with BODY=8BITMIME in the MAIL command. The default cte_type is 8bit for the new default email policy which is what will be used by smtplib.send_message when it calls BytesGenerator.flatten, but it will not set BODY=8BITMIME even if the message has any 8-bit characters. It will only set BODY=8BITMIME if the message uses any utf-8 mail/from addresses. This means that a message with ASCII addresses and an 8-bit utf-8 body will be sent without BODY=8BITMIME (I think that's actually quite common). What should be done is checking if the server advertises 8BITMIME, and if it doesn't use cte_type=7bit; if it does we should set BODY=8BITMIME if the policy is using cte_type=8bit. I don't know whether any real email server chokes on this. But it's best to follow the RFC, I think. ---------- components: Library (Lib), email messages: 311947 nosy: Segev Finer, barry, r.david.murray priority: normal severity: normal status: open title: smtplib.send_message mishandles 8BITMIME RFC 6152 type: behavior versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 06:12:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 10 Feb 2018 11:12:16 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1518261136.11.0.467229070634.issue31961@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a complex issue for doing it right. Related issues -- supporting bytes paths on Windows, supporting path-like executable, deprecating some corner cases. I suggest to revert this change now and try to do it right in 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 08:23:01 2018 From: report at bugs.python.org (Segev Finer) Date: Sat, 10 Feb 2018 13:23:01 +0000 Subject: [issue32815] Document text parameter to subprocess.Popen Message-ID: <1518268981.78.0.467229070634.issue32815@psf.upfronthosting.co.za> New submission from Segev Finer : The new text parameter in subprocess was documented for subprocess.run but not for subprocess.Popen in the Sphinx documentation. It is documented in the docstring for both though. ---------- assignee: docs at python components: Documentation messages: 311949 nosy: Segev Finer, docs at python priority: normal severity: normal status: open title: Document text parameter to subprocess.Popen type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 08:29:06 2018 From: report at bugs.python.org (David Beazley) Date: Sat, 10 Feb 2018 13:29:06 +0000 Subject: [issue32810] Expose ags_gen and agt_gen in asynchronous generators In-Reply-To: <1518205773.11.0.467229070634.issue32810@psf.upfronthosting.co.za> Message-ID: <1518269346.24.0.467229070634.issue32810@psf.upfronthosting.co.za> David Beazley added the comment: I've attached a file that illustrates the issue. (Side thought: this would be nice to have in inspect or traceback) ---------- Added file: https://bugs.python.org/file47434/agen.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 08:40:58 2018 From: report at bugs.python.org (Segev Finer) Date: Sat, 10 Feb 2018 13:40:58 +0000 Subject: [issue32370] Wrong ANSI encoding used by subprocess for some locales In-Reply-To: <1513643091.19.0.213398074469.issue32370@psf.upfronthosting.co.za> Message-ID: <1518270058.65.0.467229070634.issue32370@psf.upfronthosting.co.za> Change by Segev Finer : ---------- keywords: +patch pull_requests: +5418 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 08:43:45 2018 From: report at bugs.python.org (Segev Finer) Date: Sat, 10 Feb 2018 13:43:45 +0000 Subject: [issue32370] Wrong ANSI encoding used by subprocess for some locales In-Reply-To: <1513643091.19.0.213398074469.issue32370@psf.upfronthosting.co.za> Message-ID: <1518270225.05.0.467229070634.issue32370@psf.upfronthosting.co.za> Change by Segev Finer : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 09:07:34 2018 From: report at bugs.python.org (Me01100Nobody) Date: Sat, 10 Feb 2018 14:07:34 +0000 Subject: [issue8796] Deprecate codecs.open() In-Reply-To: <1274642875.55.0.470910509558.issue8796@psf.upfronthosting.co.za> Message-ID: <1518271654.15.0.467229070634.issue8796@psf.upfronthosting.co.za> Change by Me01100Nobody : ---------- nosy: +Me01100Nobody _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 09:34:20 2018 From: report at bugs.python.org (sblondon) Date: Sat, 10 Feb 2018 14:34:20 +0000 Subject: [issue32800] Replace deprecated link to new page on w3c site In-Reply-To: <1518103994.08.0.467229070634.issue32800@psf.upfronthosting.co.za> Message-ID: <1518273260.99.0.467229070634.issue32800@psf.upfronthosting.co.za> Change by sblondon : ---------- keywords: +patch pull_requests: +5419 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 10:02:33 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 10 Feb 2018 15:02:33 +0000 Subject: [issue32813] SSL shared_ciphers implementation wrong - returns configured but not shared ciphers In-Reply-To: <1518246255.91.0.467229070634.issue32813@psf.upfronthosting.co.za> Message-ID: <1518274953.58.0.467229070634.issue32813@psf.upfronthosting.co.za> Change by Ned Deily : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 10:59:52 2018 From: report at bugs.python.org (Korabelnikov Aleksandr) Date: Sat, 10 Feb 2018 15:59:52 +0000 Subject: [issue32816] Python's json dumps/loads make integer keys of the dict str Message-ID: <1518278392.29.0.467229070634.issue32816@psf.upfronthosting.co.za> New submission from Korabelnikov Aleksandr : when i serialize and deserialize python built-in structure I'm expect output same as input arr2 = [1,2,'3'] arr2_json = json.dumps(arr2) json.loads(arr2_json) Out[16]: [1, 2, '3'] BUT when I'm tring do it with dict I got str keys instead of integer dict1 = {0: 'object0', '1': 'object2'} json1 = json.dumps(dict1) json.loads(json1) Out[6]: {'0': 'object0', '1': 'object2'} Notice keys must be [0, '1'] but actually are ['0', '1'] ---------- components: Library (Lib) messages: 311951 nosy: solin priority: normal severity: normal status: open title: Python's json dumps/loads make integer keys of the dict str type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 11:01:36 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 10 Feb 2018 16:01:36 +0000 Subject: [issue32370] Wrong ANSI encoding used by subprocess for some locales In-Reply-To: <1513643091.19.0.213398074469.issue32370@psf.upfronthosting.co.za> Message-ID: <1518278496.23.0.467229070634.issue32370@psf.upfronthosting.co.za> Steve Dower added the comment: The patch looks good, but the rest of the code for this looks horrible(and potentially a security risk)... maybe we ought to take this fix for now but prioritise replacing this whole function with a C implementation or at least a better search for the ipconfig tool. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 11:45:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 10 Feb 2018 16:45:44 +0000 Subject: [issue32816] Python's json dumps/loads make integer keys of the dict str In-Reply-To: <1518278392.29.0.467229070634.issue32816@psf.upfronthosting.co.za> Message-ID: <1518281144.78.0.467229070634.issue32816@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See the documentation. This is documented behavior. The JSON format supports only string keys, and all keys are coerced to strings when serialized to JSON. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 12:50:27 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 10 Feb 2018 17:50:27 +0000 Subject: [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1518285027.6.0.467229070634.issue11015@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- pull_requests: +5420 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 12:53:46 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 10 Feb 2018 17:53:46 +0000 Subject: [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1518285226.21.0.467229070634.issue11015@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I have created a pull request adding documentation for all of test.support, including script_helper.py. I hope this will be helpful. ---------- nosy: +csabella versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 14:40:51 2018 From: report at bugs.python.org (LaurentiuS) Date: Sat, 10 Feb 2018 19:40:51 +0000 Subject: [issue32817] MethodType ImportError, can't use random.py Message-ID: <1518291651.45.0.467229070634.issue32817@psf.upfronthosting.co.za> New submission from LaurentiuS : Whenever I'd convert .py to .exe with pyinstaller, this error would occur. I have already reinstalled Python, and yet the error remains. When i import random to Python IDLE, it runs it without any problems. ---------- components: Windows files: qwerqrwe.PNG messages: 311955 nosy: LaurentiuS, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: MethodType ImportError, can't use random.py type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file47435/qwerqrwe.PNG _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 14:41:15 2018 From: report at bugs.python.org (LaurentiuS) Date: Sat, 10 Feb 2018 19:41:15 +0000 Subject: [issue32817] MethodType ImportError, can't convert .py to .exe In-Reply-To: <1518291651.45.0.467229070634.issue32817@psf.upfronthosting.co.za> Message-ID: <1518291675.04.0.467229070634.issue32817@psf.upfronthosting.co.za> Change by LaurentiuS : ---------- title: MethodType ImportError, can't use random.py -> MethodType ImportError, can't convert .py to .exe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 15:37:17 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 10 Feb 2018 20:37:17 +0000 Subject: [issue32813] SSL shared_ciphers implementation wrong - returns configured but not shared ciphers In-Reply-To: <1518246255.91.0.467229070634.issue32813@psf.upfronthosting.co.za> Message-ID: <1518295037.0.0.467229070634.issue32813@psf.upfronthosting.co.za> Christian Heimes added the comment: Benjamin, you implemented the feature in bpo23186. Do you have any idea what's going on? ---------- assignee: -> christian.heimes components: +SSL nosy: +alex, benjamin.peterson, dstufft, janssen versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 15:46:30 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 10 Feb 2018 20:46:30 +0000 Subject: [issue32800] Replace deprecated link to new page on w3c site In-Reply-To: <1518103994.08.0.467229070634.issue32800@psf.upfronthosting.co.za> Message-ID: <1518295590.83.0.467229070634.issue32800@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: > If you cannot set the backport labels (I don't know of non-committer author's are allowed to, mention that all 3 are needed in a comment (I checked 2.7 and 3.8) Only committers (and the bots) can apply labels :) I've applied the necessary labels. ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 15:50:43 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 10 Feb 2018 20:50:43 +0000 Subject: [issue32800] Replace deprecated link to new page on w3c site In-Reply-To: <1518103994.08.0.467229070634.issue32800@psf.upfronthosting.co.za> Message-ID: <1518295843.64.0.467229070634.issue32800@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: I think the news blurb is not needed though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 15:52:50 2018 From: report at bugs.python.org (R. David Murray) Date: Sat, 10 Feb 2018 20:52:50 +0000 Subject: [issue32755] Several cookies with the same name get intermixed In-Reply-To: <1517652228.92.0.467229070634.issue32755@psf.upfronthosting.co.za> Message-ID: <1518295970.09.0.467229070634.issue32755@psf.upfronthosting.co.za> R. David Murray added the comment: Well, "supersedes" sounds like all the old cookie values should be discarded, so I'd be inclined to call this a bug. On the other hand, programs could be (inadvertently, probably) depending on this behavior, so I'd also be inclined to only fix it in the next release, since it is a non-trivial behavior change. I'm open to argument on that, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 16:03:10 2018 From: report at bugs.python.org (R. David Murray) Date: Sat, 10 Feb 2018 21:03:10 +0000 Subject: [issue32814] smtplib.send_message mishandles 8BITMIME RFC 6152 In-Reply-To: <1518259581.24.0.467229070634.issue32814@psf.upfronthosting.co.za> Message-ID: <1518296590.08.0.467229070634.issue32814@psf.upfronthosting.co.za> R. David Murray added the comment: I agree. I'll be happy to review a patch proposal. Not sure how I overlooked this when I implemented send_message, but that was early enough in my reading of all the RFC that I may have just missed that detail :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 16:06:52 2018 From: report at bugs.python.org (Steffen Ullrich) Date: Sat, 10 Feb 2018 21:06:52 +0000 Subject: [issue32813] SSL shared_ciphers implementation wrong - returns configured but not shared ciphers In-Reply-To: <1518246255.91.0.467229070634.issue32813@psf.upfronthosting.co.za> Message-ID: <1518296812.12.0.467229070634.issue32813@psf.upfronthosting.co.za> Steffen Ullrich added the comment: It looks like the function shared_ciphers actually returned the list of client ciphers when initially implemented although I think that the name is misleading and suggests that it would return the ciphers shared between client and server (i.e. same meaning of shared as in the infamous "no shared cipher" SSL handshake problem). Anyway, it looks like the original functionality was broken while adding support for OpenSSL 1.1.0 "Issue #26470: Port ssl and hashlib module to OpenSSL 1.1.0.". The relevant part of this change: https://github.com/python/cpython/commit/598894ff48e9c1171cb2ec1c798235826a75c7e0#diff-e1cc5bf74055e388cda128367a814c8fR1534 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 16:07:35 2018 From: report at bugs.python.org (R. David Murray) Date: Sat, 10 Feb 2018 21:07:35 +0000 Subject: [issue32817] MethodType ImportError, can't convert .py to .exe In-Reply-To: <1518291651.45.0.467229070634.issue32817@psf.upfronthosting.co.za> Message-ID: <1518296855.98.0.467229070634.issue32817@psf.upfronthosting.co.za> R. David Murray added the comment: PyInstaller is not part of the python standard library, you'll have to contact its community for help with this. ---------- nosy: +r.david.murray resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 16:24:47 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 10 Feb 2018 21:24:47 +0000 Subject: [issue32813] SSL shared_ciphers implementation wrong - returns configured but not shared ciphers In-Reply-To: <1518246255.91.0.467229070634.issue32813@psf.upfronthosting.co.za> Message-ID: <1518297887.86.0.467229070634.issue32813@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I suppose we should fix .shared_ciphers to be SSL_get_shared_ciphers() again and perhaps add .client_ciphers, which calls SSL_get_client_ciphers? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 17:19:21 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Feb 2018 22:19:21 +0000 Subject: [issue32800] Replace deprecated link to new page on w3c site In-Reply-To: <1518103994.08.0.467229070634.issue32800@psf.upfronthosting.co.za> Message-ID: <1518301161.61.0.467229070634.issue32800@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Agreed. This could have been done without a PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 17:37:50 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Feb 2018 22:37:50 +0000 Subject: [issue32801] Lib/_strptime.py: utilize all() In-Reply-To: <1518106189.47.0.467229070634.issue32801@psf.upfronthosting.co.za> Message-ID: <1518302270.6.0.467229070634.issue32801@psf.upfronthosting.co.za> Terry J. Reedy added the comment: And the conditional return can be done before sorting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 17:38:35 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 10 Feb 2018 22:38:35 +0000 Subject: [issue32813] SSL shared_ciphers implementation wrong - returns configured but not shared ciphers In-Reply-To: <1518246255.91.0.467229070634.issue32813@psf.upfronthosting.co.za> Message-ID: <1518302315.61.0.467229070634.issue32813@psf.upfronthosting.co.za> Christian Heimes added the comment: Yeah, looks like I used the wrong API when I ported to Python to OpenSSL 1.1.0, because there is no correct API. For client_context.set_ciphers("AES128-SHA256:AES256-SHA256") server_context.set_ciphers("AES128-SHA:AES256-SHA256") I'm getting: client_ciphers = {'AES128-SHA256', 'AES256-SHA256'} server_ciphers = {'AES256-SHA256', 'AES128-SHA'} shared_ciphers = {'AES128-SHA256', 'AES256-SHA256'} # SSL_get_client_ciphers() shared_ciphers = {'AES256-SHA256', 'AES128-SHA'} # SSL_get_ciphers() which are clearly both wrong. The only shared cipher is {'AES256-SHA256'}. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 17:39:45 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Feb 2018 22:39:45 +0000 Subject: [issue32800] Replace deprecated link to new page on w3c site In-Reply-To: <1518103994.08.0.467229070634.issue32800@psf.upfronthosting.co.za> Message-ID: <1518302385.39.0.467229070634.issue32800@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 8d1f2f40389c476d9240ec87a33da0373597c6af by Terry Jan Reedy (sblondon) in branch 'master': bpo-32800: Update link to w3c doc for xml default namespaces (GH-5609) https://github.com/python/cpython/commit/8d1f2f40389c476d9240ec87a33da0373597c6af ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 17:39:59 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 10 Feb 2018 22:39:59 +0000 Subject: [issue32800] Replace deprecated link to new page on w3c site In-Reply-To: <1518103994.08.0.467229070634.issue32800@psf.upfronthosting.co.za> Message-ID: <1518302399.72.0.467229070634.issue32800@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5421 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 17:40:51 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 10 Feb 2018 22:40:51 +0000 Subject: [issue32800] Replace deprecated link to new page on w3c site In-Reply-To: <1518103994.08.0.467229070634.issue32800@psf.upfronthosting.co.za> Message-ID: <1518302451.49.0.467229070634.issue32800@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5422 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 17:41:45 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 10 Feb 2018 22:41:45 +0000 Subject: [issue32813] SSL shared_ciphers implementation wrong - returns configured but not shared ciphers In-Reply-To: <1518246255.91.0.467229070634.issue32813@psf.upfronthosting.co.za> Message-ID: <1518302505.75.0.467229070634.issue32813@psf.upfronthosting.co.za> Christian Heimes added the comment: SSL_get_shared_ciphers() won't help either. Internally it gets the ciphers from s->session->ciphers just like SSL_get_client_ciphers(). It doesn't perform additional filtering. https://github.com/openssl/openssl/blob/OpenSSL_1_0_2f/ssl/ssl_lib.c#L1392-L1427 "works well for SSLv2, not so good for SSLv3" :/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 17:41:51 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 10 Feb 2018 22:41:51 +0000 Subject: [issue32800] Replace deprecated link to new page on w3c site In-Reply-To: <1518103994.08.0.467229070634.issue32800@psf.upfronthosting.co.za> Message-ID: <1518302511.5.0.467229070634.issue32800@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5423 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 17:44:19 2018 From: report at bugs.python.org (Julien Palard) Date: Sat, 10 Feb 2018 22:44:19 +0000 Subject: [issue19675] Pool dies with excessive workers, but does not cleanup In-Reply-To: <1384998739.89.0.441869255184.issue19675@psf.upfronthosting.co.za> Message-ID: <1518302659.35.0.467229070634.issue19675@psf.upfronthosting.co.za> Change by Julien Palard : ---------- pull_requests: +5424 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 18:03:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 10 Feb 2018 23:03:37 +0000 Subject: [issue32792] ChainMap should preserve order of underlying mappings In-Reply-To: <1518079577.65.0.467229070634.issue32792@psf.upfronthosting.co.za> Message-ID: <1518303817.29.0.467229070634.issue32792@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry, I was wrong. reversed() is not needed here. The advantage of this implementation is that it can be faster because of iterating mappings in C code instead of Python code. But the side effect of it is that the iterator keeps references to all values. If this is not desirable, the code can be written something like: return iter(dict.fromkeys(itertools.chain.from_iterable(self.maps))) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 18:08:36 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Feb 2018 23:08:36 +0000 Subject: [issue32800] Replace deprecated link to new page on w3c site In-Reply-To: <1518103994.08.0.467229070634.issue32800@psf.upfronthosting.co.za> Message-ID: <1518304116.39.0.467229070634.issue32800@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset e6033209754c5b01870791645044a791da1fa73f by Terry Jan Reedy (Miss Islington (bot)) in branch '3.7': bpo-32800: Update link to w3c doc for xml default namespaces (GH-5609) (GH-5611) https://github.com/python/cpython/commit/e6033209754c5b01870791645044a791da1fa73f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 18:51:31 2018 From: report at bugs.python.org (Alexander Mohr) Date: Sat, 10 Feb 2018 23:51:31 +0000 Subject: [issue32811] test_os.py fails when run in docker container on OSX host In-Reply-To: <1518222594.14.0.467229070634.issue32811@psf.upfronthosting.co.za> Message-ID: <1518306691.17.0.467229070634.issue32811@psf.upfronthosting.co.za> Alexander Mohr added the comment: sorry if my report is confusing, the issue is when run in a debian:stretch docker container on an OSX host, so running this: docker run --rm -ti docker:stretch on osx. So if you have access to an OSX machine and have docker running (18.02.0-ce-mac53) on your OSX machine it should reproduce there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 19:32:20 2018 From: report at bugs.python.org (Ma Lin) Date: Sun, 11 Feb 2018 00:32:20 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1518309140.89.0.467229070634.issue32394@psf.upfronthosting.co.za> Ma Lin added the comment: PR 5523 is prepared for master/3.7 branches. PR 5585 is prepared for 3.6 branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 19:35:41 2018 From: report at bugs.python.org (Alexander Mohr) Date: Sun, 11 Feb 2018 00:35:41 +0000 Subject: [issue32811] test_os.py fails when run in docker container on OSX host In-Reply-To: <1518222594.14.0.467229070634.issue32811@psf.upfronthosting.co.za> Message-ID: <1518309341.73.0.467229070634.issue32811@psf.upfronthosting.co.za> Alexander Mohr added the comment: here's how to repro, download fresh debian:stretch image, then install reqs for python: apt-get update && apt-get install curl build-essential libssl-dev libffi-dev libmemcached-dev zlib1g-dev install pyenv-installer: curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash install and activate python3.6.3: pyenv install 3.6.3 && pyenv global 3.6.3 run attached test script which I generated from the unittest ---------- Added file: https://bugs.python.org/file47436/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 19:42:24 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Feb 2018 00:42:24 +0000 Subject: [issue32800] Replace deprecated link to new page on w3c site In-Reply-To: <1518103994.08.0.467229070634.issue32800@psf.upfronthosting.co.za> Message-ID: <1518309744.23.0.467229070634.issue32800@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 9d8c24b79162711551394c8f8e6002342554791b by Terry Jan Reedy (Miss Islington (bot)) in branch '3.6': bpo-32800: Update link to w3c doc for xml default namespaces (GH-5609) GH-5612) https://github.com/python/cpython/commit/9d8c24b79162711551394c8f8e6002342554791b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 19:42:44 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Feb 2018 00:42:44 +0000 Subject: [issue32800] Replace deprecated link to new page on w3c site In-Reply-To: <1518103994.08.0.467229070634.issue32800@psf.upfronthosting.co.za> Message-ID: <1518309764.41.0.467229070634.issue32800@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset ea6e6444bdf983c99d9175a22dd054bf02ee22b4 by Terry Jan Reedy (Miss Islington (bot)) in branch '2.7': bpo-32800: Update link to w3c doc for xml default namespaces (GH-5609) (GH-5613) https://github.com/python/cpython/commit/ea6e6444bdf983c99d9175a22dd054bf02ee22b4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 19:44:57 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Feb 2018 00:44:57 +0000 Subject: [issue32800] Replace deprecated link to new page on w3c site In-Reply-To: <1518103994.08.0.467229070634.issue32800@psf.upfronthosting.co.za> Message-ID: <1518309897.12.0.467229070634.issue32800@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I meant, could have been done without a bpo issue. And since the blurb was added, I kept it. Thanks 'sbondon'. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 20:48:02 2018 From: report at bugs.python.org (Larry Hastings) Date: Sun, 11 Feb 2018 01:48:02 +0000 Subject: [issue32397] textwrap output may change if you wrap a paragraph twice In-Reply-To: <1513865443.17.0.213398074469.issue32397@psf.upfronthosting.co.za> Message-ID: <1518313682.72.0.467229070634.issue32397@psf.upfronthosting.co.za> Change by Larry Hastings : ---------- keywords: +patch pull_requests: +5425 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 21:35:12 2018 From: report at bugs.python.org (Xavier G. Domingo) Date: Sun, 11 Feb 2018 02:35:12 +0000 Subject: [issue32810] Expose ags_gen and agt_gen in asynchronous generators In-Reply-To: <1518205773.11.0.467229070634.issue32810@psf.upfronthosting.co.za> Message-ID: <1518316512.77.0.467229070634.issue32810@psf.upfronthosting.co.za> Change by Xavier G. Domingo : ---------- nosy: +xgdomingo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 21:36:29 2018 From: report at bugs.python.org (Xavier G. Domingo) Date: Sun, 11 Feb 2018 02:36:29 +0000 Subject: [issue32767] Mutating a list while iterating: clarify the docs In-Reply-To: <1517772420.88.0.467229070634.issue32767@psf.upfronthosting.co.za> Message-ID: <1518316589.42.0.467229070634.issue32767@psf.upfronthosting.co.za> Change by Xavier G. Domingo : ---------- nosy: +xgdomingo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 21:40:36 2018 From: report at bugs.python.org (Xavier G. Domingo) Date: Sun, 11 Feb 2018 02:40:36 +0000 Subject: [issue24255] Replace debuglevel-related logic with logging In-Reply-To: <1432189554.94.0.727112934658.issue24255@psf.upfronthosting.co.za> Message-ID: <1518316836.97.0.467229070634.issue24255@psf.upfronthosting.co.za> Change by Xavier G. Domingo : ---------- nosy: +xgdomingo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 21:45:45 2018 From: report at bugs.python.org (Xavier G. Domingo) Date: Sun, 11 Feb 2018 02:45:45 +0000 Subject: [issue32751] wait_for(future, ...) should wait for the future (even if a timeout occurs) In-Reply-To: <1517601675.34.0.467229070634.issue32751@psf.upfronthosting.co.za> Message-ID: <1518317145.73.0.467229070634.issue32751@psf.upfronthosting.co.za> Change by Xavier G. Domingo : ---------- nosy: +xgdomingo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 22:02:24 2018 From: report at bugs.python.org (Tim Peters) Date: Sun, 11 Feb 2018 03:02:24 +0000 Subject: [issue32767] Mutating a list while iterating: clarify the docs In-Reply-To: <1517772420.88.0.467229070634.issue32767@psf.upfronthosting.co.za> Message-ID: <1518318144.24.0.467229070634.issue32767@psf.upfronthosting.co.za> Tim Peters added the comment: Stefan, yup! Thank you. `array.array` and `bytearray` iterators appear to work the same way as `list` iterators here. Terry, the note in the `for` statement docs was written before there _was_ an iterator protocol. For example, here are the 1.5.1 docs: https://docs.python.org/release/1.5.1/ref/ref-9.html#HEADING9-27 Back then, the expression_list had to evaluate to a "string, tuple or list". Or so the docs said - I don't remember the implementation details. Regardless, I think we all agree the note is at best out of date ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 22:11:25 2018 From: report at bugs.python.org (Xavier G. Domingo) Date: Sun, 11 Feb 2018 03:11:25 +0000 Subject: [issue19495] context manager for measuring duration of blocks of code In-Reply-To: <1383588451.25.0.545990193953.issue19495@psf.upfronthosting.co.za> Message-ID: <1518318685.47.0.467229070634.issue19495@psf.upfronthosting.co.za> Change by Xavier G. Domingo : ---------- nosy: +xgdomingo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 22:26:17 2018 From: report at bugs.python.org (Fangyi Zhou) Date: Sun, 11 Feb 2018 03:26:17 +0000 Subject: [issue32731] getpass.getuser() raises an unspecified exceptions (ImportError, OSError, etc) In-Reply-To: <1517421752.06.0.467229070634.issue32731@psf.upfronthosting.co.za> Message-ID: <1518319577.53.0.467229070634.issue32731@psf.upfronthosting.co.za> Change by Fangyi Zhou : ---------- keywords: +patch pull_requests: +5426 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 22:26:42 2018 From: report at bugs.python.org (Brett Cannon) Date: Sun, 11 Feb 2018 03:26:42 +0000 Subject: [issue32758] Stack overflow when parse long expression to AST In-Reply-To: <1518253206.75.0.467229070634.issue32758@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: The other option is to simply not worry about it and acknowledge you can crash the compiler with a crazy-sized expression. Option 1 is too much work and option 2 takes us from an AST to more of an s-expression format which is a significant shift in design (now if people want to make that kind of change that's fine, but it should be consistent across the board). On Sat, Feb 10, 2018, 14:30 Serhiy Storchaka, wrote: > > Serhiy Storchaka added the comment: > > On Linux the limit is much larger that 2**15. This depends on the stack > size, it is smaller on Windows. > > The stack is overflowed by recursive call of ast2obj_expr in > Python/Python-ast.c. The same problem exists in other recursive AST > processing code: optimizing, unparsing. This is why 3.7 can crash in cases > when 3.6 was not crashed. > > I don't see an easy way of fixing this. The common way is surrounding > recursive calls with Py_EnterRecursiveCall()/Py_LeaveRecursiveCall(). But > this make the limit too small (1000 by default). In other cases it is > enough. The data structures with 1000 levels of nesting are rare. In any > case the Python compiler has lower limit on nesting indented blocks. But in > this case the linear sequence of binary operators is compiled to deeply > nested structure. > > I see two hard ways of properly fixing this. > > 1. Rewrite all AST expression processing code with using an explicit stack > instead of function stack. This will complicate a lot of C code too much. > Python code should be rewritten too if you don't want to get a > RecursionError in corner cases, but for common cases it can be left > unmodified. > > 2. Change binary operations representation, so that a+b+c+d will be > represented as ('+', (a, b, c, d)) instead of ('+', ('+', ('+', a, b), c), > d). This is backward incompatible change and needs to rewrite any AST > processing code (in C and Python). This solution can't be backported. But > the resulting code will be simpler than when rewrite them for the first > approach. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 22:47:07 2018 From: report at bugs.python.org (Alan Moore) Date: Sun, 11 Feb 2018 03:47:07 +0000 Subject: [issue32585] Add ttk::spinbox to tkinter.ttk In-Reply-To: <1518176476.06.0.467229070634.issue32585@psf.upfronthosting.co.za> Message-ID: <7df70a2a-2252-c158-df3f-a378236c3d8c@alandmoore.com> Alan Moore added the comment: Thank you for all your help! On 02/09/2018 05:41 AM, Serhiy Storchaka wrote: > Serhiy Storchaka added the comment: > > Thank you for your contribution Alan! > > ---------- > resolution: -> fixed > stage: patch review -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 23:27:54 2018 From: report at bugs.python.org (Ma Lin) Date: Sun, 11 Feb 2018 04:27:54 +0000 Subject: [issue32818] multiprocessing segmentfault under Windows compatibility mode Message-ID: <1518323274.11.0.467229070634.issue32818@psf.upfronthosting.co.za> New submission from Ma Lin : Reproduce: Right click python.exe -> properties -> compatibility tab -> enable compatibility mode (e.g. Windows 7) Then run this test will get a segmentfault: test_multiprocessing_main_handling.py CPython 3.6 is Ok. ---------- components: Windows messages: 311980 nosy: Ma Lin, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: multiprocessing segmentfault under Windows compatibility mode type: crash versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 23:48:39 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 11 Feb 2018 04:48:39 +0000 Subject: [issue32811] test_os.py fails when run in docker container on OSX host In-Reply-To: <1518222594.14.0.467229070634.issue32811@psf.upfronthosting.co.za> Message-ID: <1518324519.81.0.467229070634.issue32811@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the elaboration. Your report wasn't confusing. The fact remains that we don't test or claim to support Python running under Docker on macOS. If someone wants to investigate further (and re-open this issue), they are welcome to but I personally have no interest in it. Just taking a quick look at the Docker for Mac documentation indicates it implements its own file system, osxfs, with its own quirks. So, if that is in use, it could very well be the source of the test failures. I would think that running containers under Docker on macOS would be enough of a different animal that it would need to be considered a new platform with regard to Python support. Unless someone steps up and wants to fully support such a configuration (which would mean a buildbot among other things), I don't think we want to go down that path. Sorry! ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 10 23:54:04 2018 From: report at bugs.python.org (Ma Lin) Date: Sun, 11 Feb 2018 04:54:04 +0000 Subject: [issue32818] multiprocessing segmentfault under Windows compatibility mode In-Reply-To: <1518323274.11.0.467229070634.issue32818@psf.upfronthosting.co.za> Message-ID: <1518324844.92.0.467229070634.issue32818@psf.upfronthosting.co.za> Ma Lin added the comment: Here is two traceback messages: D:\git\cpython\PCbuild\win32>python.exe -X dev d:\git\cpython\Lib\test\test_multiprocess ing_main_handling.py ssssssssssssssssssssssssssFFFFFFFFFFFFF ====================================================================== FAIL: test_basic_script (__main__.SpawnCmdLineTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "d:\git\cpython\Lib\test\test_multiprocessing_main_handling.py", line 162, in test_basic_script self._check_script(script_name) File "d:\git\cpython\Lib\test\test_multiprocessing_main_handling.py", line 156, in _check_script rc, out, err = assert_python_ok(*run_args, __isolated=False) File "D:\git\cpython\lib\test\support\script_helper.py", line 151, in assert_python_ok return _assert_python(True, *args, **env_vars) File "D:\git\cpython\lib\test\support\script_helper.py", line 137, in _assert_python res.fail(cmd_line) File "D:\git\cpython\lib\test\support\script_helper.py", line 79, in fail err)) AssertionError: Process return code is 3221225477 command line: ['D:\\git\\cpython\\PCbuild\\win32\\python.exe', '-X', 'faulthandler', '-E ', 'C:\\Users\\anima\\AppData\\Local\\Temp\\tmplgfds7rc\\script.py', 'spawn'] stdout: --- --- stderr: --- Windows fatal exception: access violation Current thread 0x00001930 (most recent call first): File "D:\git\cpython\lib\multiprocessing\popen_spawn_win32.py", line 48 in __init__ File "D:\git\cpython\lib\multiprocessing\context.py", line 322 in _Popen File "D:\git\cpython\lib\multiprocessing\process.py", line 112 in start File "D:\git\cpython\lib\multiprocessing\pool.py", line 241 in _repopulate_pool File "D:\git\cpython\lib\multiprocessing\pool.py", line 176 in __init__ File "D:\git\cpython\lib\multiprocessing\context.py", line 119 in Pool File "C:\Users\anima\AppData\Local\Temp\tmplgfds7rc\script.py", line 27 in --- ====================================================================== FAIL: test_basic_script_no_suffix (__main__.SpawnCmdLineTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "d:\git\cpython\Lib\test\test_multiprocessing_main_handling.py", line 168, in test_basic_script_no_suffix self._check_script(script_name) File "d:\git\cpython\Lib\test\test_multiprocessing_main_handling.py", line 156, in _check_script rc, out, err = assert_python_ok(*run_args, __isolated=False) File "D:\git\cpython\lib\test\support\script_helper.py", line 151, in assert_python_ok return _assert_python(True, *args, **env_vars) File "D:\git\cpython\lib\test\support\script_helper.py", line 137, in _assert_python res.fail(cmd_line) File "D:\git\cpython\lib\test\support\script_helper.py", line 79, in fail err)) AssertionError: Process return code is 3221225477 command line: ['D:\\git\\cpython\\PCbuild\\win32\\python.exe', '-X', 'faulthandler', '-E ', 'C:\\Users\\anima\\AppData\\Local\\Temp\\tmpkovn5nfz\\script', 'spawn'] stdout: --- --- stderr: --- Windows fatal exception: access violation Current thread 0x00001d00 (most recent call first): File "D:\git\cpython\lib\multiprocessing\popen_spawn_win32.py", line 48 in __init__ File "D:\git\cpython\lib\multiprocessing\context.py", line 322 in _Popen File "D:\git\cpython\lib\multiprocessing\process.py", line 112 in start File "D:\git\cpython\lib\multiprocessing\pool.py", line 241 in _repopulate_pool File "D:\git\cpython\lib\multiprocessing\pool.py", line 176 in __init__ File "D:\git\cpython\lib\multiprocessing\context.py", line 119 in Pool File "C:\Users\anima\AppData\Local\Temp\tmpkovn5nfz\script", line 27 in --- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 00:17:05 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 11 Feb 2018 05:17:05 +0000 Subject: [issue32813] SSL shared_ciphers implementation wrong - returns configured but not shared ciphers In-Reply-To: <1518246255.91.0.467229070634.issue32813@psf.upfronthosting.co.za> Message-ID: <1518326225.51.0.467229070634.issue32813@psf.upfronthosting.co.za> Ned Deily added the comment: Christian, what is your take on the criticality of this? ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 02:02:01 2018 From: report at bugs.python.org (Nitish) Date: Sun, 11 Feb 2018 07:02:01 +0000 Subject: [issue32806] locally imported modules are unaccessible in lambdas in pdb In-Reply-To: <1518169666.43.0.467229070634.issue32806@psf.upfronthosting.co.za> Message-ID: <1518332521.55.0.467229070634.issue32806@psf.upfronthosting.co.za> Change by Nitish : ---------- nosy: +nitishch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 03:30:34 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 11 Feb 2018 08:30:34 +0000 Subject: [issue32792] ChainMap should preserve order of underlying mappings In-Reply-To: <1518079577.65.0.467229070634.issue32792@psf.upfronthosting.co.za> Message-ID: <1518337834.13.0.467229070634.issue32792@psf.upfronthosting.co.za> Raymond Hettinger added the comment: New changeset 3793f95f98c3112ce447288a5bf9899eb9e35423 by Raymond Hettinger in branch 'master': bpo-32792: Preserve mapping order in ChainMap() (GH-5586) https://github.com/python/cpython/commit/3793f95f98c3112ce447288a5bf9899eb9e35423 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 03:31:41 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 11 Feb 2018 08:31:41 +0000 Subject: [issue32792] ChainMap should preserve order of underlying mappings In-Reply-To: <1518079577.65.0.467229070634.issue32792@psf.upfronthosting.co.za> Message-ID: <1518337901.73.0.467229070634.issue32792@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5427 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 03:43:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Feb 2018 08:43:07 +0000 Subject: [issue32792] ChainMap should preserve order of underlying mappings In-Reply-To: <1518079577.65.0.467229070634.issue32792@psf.upfronthosting.co.za> Message-ID: <1518338587.28.0.467229070634.issue32792@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: On PR 5586 we discussed reverting the order of the iteration by mappings. There are reasons of doing this. But this adds a subtle behavior change. Currently list(ChainMap({1: int}, {1.0: float})) returns [1]. With reversed() it will return [1.0]. This change LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 03:49:54 2018 From: report at bugs.python.org (Jay Yin) Date: Sun, 11 Feb 2018 08:49:54 +0000 Subject: [issue32642] add support for path-like objects in sys.path In-Reply-To: <1516771632.94.0.467229070634.issue32642@psf.upfronthosting.co.za> Message-ID: <1518338994.61.0.467229070634.issue32642@psf.upfronthosting.co.za> Jay Yin added the comment: Thanks for the reply ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 03:52:52 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Feb 2018 08:52:52 +0000 Subject: [issue32792] ChainMap should preserve order of underlying mappings In-Reply-To: <1518079577.65.0.467229070634.issue32792@psf.upfronthosting.co.za> Message-ID: <1518339172.81.0.467229070634.issue32792@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The code in msg311969 doesn't reuse hash values. The following implementations do this: return iter({**m for m in reversed(self.maps)}) or, without keeping reverences to values: return iter(list({**m for m in reversed(self.maps)})) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 04:09:59 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 11 Feb 2018 09:09:59 +0000 Subject: [issue32792] ChainMap should preserve order of underlying mappings In-Reply-To: <1518079577.65.0.467229070634.issue32792@psf.upfronthosting.co.za> Message-ID: <1518340199.66.0.467229070634.issue32792@psf.upfronthosting.co.za> Raymond Hettinger added the comment: New changeset 170b3f79506480f78275a801822c9ff1283e16f2 by Raymond Hettinger (Miss Islington (bot)) in branch '3.7': bpo-32792: Preserve mapping order in ChainMap() (GH-5586) (#GH-5617) https://github.com/python/cpython/commit/170b3f79506480f78275a801822c9ff1283e16f2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 04:18:22 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 11 Feb 2018 09:18:22 +0000 Subject: [issue32792] ChainMap should preserve order of underlying mappings In-Reply-To: <1518079577.65.0.467229070634.issue32792@psf.upfronthosting.co.za> Message-ID: <1518340702.19.0.467229070634.issue32792@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > The code in msg311969 doesn't reuse hash values. That doesn't make sense. The dict.update() method reuses the hashes of the input mappings when possible. >>> from collections import ChainMap >>> class Int(int): def __hash__(self): print(f'Hashing {self}', file=sys.stderr) return int.__hash__(self) >>> import sys >>> d = { Int(1): 'f1', Int(2): 'f2' } Hashing 1 Hashing 2 >>> e = { Int(1): 's1', Int(3): 's3' } Hashing 1 Hashing 3 >>> c = ChainMap(d, e) >>> list(c) # Note, no calls to hash() were made [1, 3, 2] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 04:24:34 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Feb 2018 09:24:34 +0000 Subject: [issue32792] ChainMap should preserve order of underlying mappings In-Reply-To: <1518079577.65.0.467229070634.issue32792@psf.upfronthosting.co.za> Message-ID: <1518341074.24.0.467229070634.issue32792@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I referred to msg311969, not msg311822. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 04:29:52 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 11 Feb 2018 09:29:52 +0000 Subject: [issue32792] ChainMap should preserve order of underlying mappings In-Reply-To: <1518079577.65.0.467229070634.issue32792@psf.upfronthosting.co.za> Message-ID: <1518341392.7.0.467229070634.issue32792@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 Sun Feb 11 04:39:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Feb 2018 09:39:18 +0000 Subject: [issue32397] textwrap output may change if you wrap a paragraph twice In-Reply-To: <1513865443.17.0.213398074469.issue32397@psf.upfronthosting.co.za> Message-ID: <1518341958.5.0.467229070634.issue32397@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka type: -> behavior versions: +Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 04:51:42 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 11 Feb 2018 09:51:42 +0000 Subject: [issue32813] SSL shared_ciphers implementation wrong - returns configured but not shared ciphers In-Reply-To: <1518246255.91.0.467229070634.issue32813@psf.upfronthosting.co.za> Message-ID: <1518342702.27.0.467229070634.issue32813@psf.upfronthosting.co.za> Christian Heimes added the comment: I don't see the issue as critical. For me, the method is just a debugging tool. Benjamin, for which purpose did you add the method? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 04:55:16 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Feb 2018 09:55:16 +0000 Subject: [issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x In-Reply-To: <1516595654.84.0.467229070634.issue32616@psf.upfronthosting.co.za> Message-ID: <1518342916.92.0.467229070634.issue32616@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This should remain everyone that backporting performance improvements is not a no-brainer. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 04:55:28 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Feb 2018 09:55:28 +0000 Subject: [issue32616] Significant performance problems with Python 2.7 built with clang 3.x or 4.x In-Reply-To: <1516595654.84.0.467229070634.issue32616@psf.upfronthosting.co.za> Message-ID: <1518342928.59.0.467229070634.issue32616@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- nosy: -pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 05:48:12 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Feb 2018 10:48:12 +0000 Subject: [issue32370] Wrong ANSI encoding used by subprocess for some locales In-Reply-To: <1513643091.19.0.213398074469.issue32370@psf.upfronthosting.co.za> Message-ID: <1518346092.31.0.467229070634.issue32370@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 05:56:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Feb 2018 10:56:51 +0000 Subject: [issue32758] Stack overflow when parse long expression to AST In-Reply-To: <1517682171.17.0.467229070634.issue32758@psf.upfronthosting.co.za> Message-ID: <1518346611.05.0.467229070634.issue32758@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > The other option is to simply not worry about it and acknowledge you can > crash the compiler with a crazy-sized expression. Agreed, this is the most practical option. Do you want to write such acknowledgement? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 08:10:48 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 11 Feb 2018 13:10:48 +0000 Subject: [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1518354648.35.0.467229070634.issue11015@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset 988fb28431d3a3fc5dc6eb657c8a4baacc04d9ce by Nick Coghlan (Cheryl Sabella) in branch 'master': bpo-11015: Update test.support documentation (GH-5610) https://github.com/python/cpython/commit/988fb28431d3a3fc5dc6eb657c8a4baacc04d9ce ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 08:11:59 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 11 Feb 2018 13:11:59 +0000 Subject: [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1518354719.94.0.467229070634.issue11015@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5428 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 08:14:14 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 11 Feb 2018 13:14:14 +0000 Subject: [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1518354854.96.0.467229070634.issue11015@psf.upfronthosting.co.za> Nick Coghlan added the comment: I merged Cheryl's PR to the dev branch, and triggered the backport to 3.7. If nobody beats me to it, I'll merge the latter tomorrow :) ---------- assignee: docs at python -> ncoghlan resolution: -> fixed stage: patch review -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 08:16:21 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 11 Feb 2018 13:16:21 +0000 Subject: [issue32819] match_hostname() error reporting bug Message-ID: <1518354981.31.0.467229070634.issue32819@psf.upfronthosting.co.za> New submission from Christian Heimes : Since bpo #23033, ssl.match_hostname() no longer supports partial wildcard matching, e.g. "www*.example.org". In case of a partial match, _dnsname_match() fails with a confusing/wrong error message: >>> import ssl >>> ssl._dnsname_match('www*.example.com', 'www1.example.com') Traceback (most recent call last): File "", line 1, in File ".../cpython/Lib/ssl.py", line 198, in _dnsname_match "wildcard can only be present in the leftmost segment: " + repr(dn)) ssl.SSLCertVerificationError: ("wildcard can only be present in the leftmost segment: 'www*.example.com'",) The wildcard *is* in the leftmost segment. But it's not a full match but a partial match. The error message applies to a SAN dNSName like "*.*.example.org" or "www.*.example.com", however the function does not raise an error for multiple or non left-most wildcards: # multiple wildcards return None >>> ssl._dnsname_match('*.*.example.com', 'www.sub.example.com') # single wildcard in another label returns False >>> ssl._dnsname_match('www.*.example.com', 'www.sub.example.com') False ---------- assignee: christian.heimes components: SSL messages: 311996 nosy: christian.heimes priority: normal severity: normal status: open title: match_hostname() error reporting bug type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 09:58:36 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 11 Feb 2018 14:58:36 +0000 Subject: [issue32819] match_hostname() error reporting bug In-Reply-To: <1518354981.31.0.467229070634.issue32819@psf.upfronthosting.co.za> Message-ID: <1518361116.12.0.467229070634.issue32819@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +5429 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 10:21:46 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 11 Feb 2018 15:21:46 +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: <1518362506.91.0.467229070634.issue32798@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +5430 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 10:34:59 2018 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 11 Feb 2018 15:34:59 +0000 Subject: [issue32815] Document text parameter to subprocess.Popen In-Reply-To: <1518268981.78.0.467229070634.issue32815@psf.upfronthosting.co.za> Message-ID: <1518363299.31.0.467229070634.issue32815@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +5431 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 10:45:54 2018 From: report at bugs.python.org (Eric Osborne) Date: Sun, 11 Feb 2018 15:45:54 +0000 Subject: [issue32820] Add binary methods to ipaddress Message-ID: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> New submission from Eric Osborne : This issue adds two things to the ipaddress lib: * an __index__ method to allow bin(), oct(), hex() to work * a property method to get the fully padded (32-bit or 128-bit) address as a string ---------- components: Library (Lib) messages: 311997 nosy: ewosborne priority: normal severity: normal status: open title: Add binary methods to ipaddress type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 11:11:13 2018 From: report at bugs.python.org (Eric Osborne) Date: Sun, 11 Feb 2018 16:11:13 +0000 Subject: [issue32820] Add binary methods to ipaddress In-Reply-To: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: <1518365473.79.0.467229070634.issue32820@psf.upfronthosting.co.za> Eric Osborne added the comment: test_not_an_index_issue15559() disallows __index__, so nevermind. Will resubmit without __index__ to get the full binary string, though. ---------- resolution: -> rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 11:22:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Feb 2018 16:22:22 +0000 Subject: [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1518366142.32.0.467229070634.issue11015@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have left comments to PR. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 11:34:30 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 11 Feb 2018 16:34:30 +0000 Subject: [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1518366870.18.0.467229070634.issue11015@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset a0b998df314370f00502efe7ad84206f5bb782ff by Nick Coghlan (Miss Islington (bot)) in branch '3.7': bpo-11015: Update test.support documentation (GH-5619) https://github.com/python/cpython/commit/a0b998df314370f00502efe7ad84206f5bb782ff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 11:43:50 2018 From: report at bugs.python.org (Zachary Ware) Date: Sun, 11 Feb 2018 16:43:50 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1518367430.61.0.467229070634.issue32604@psf.upfronthosting.co.za> Zachary Ware added the comment: New changeset 310b05289b5d9550040f469e60b5e8e77f1022b6 by Zachary Ware in branch 'master': bpo-32604: Make _xxsubinterpreters build on Windows (GH-5516) https://github.com/python/cpython/commit/310b05289b5d9550040f469e60b5e8e77f1022b6 ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 11:44:58 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 11 Feb 2018 16:44:58 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1518367498.9.0.467229070634.issue32604@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5432 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 12:00:51 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 11 Feb 2018 17:00:51 +0000 Subject: [issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0) In-Reply-To: <1241895448.39.0.497331485225.issue5978@psf.upfronthosting.co.za> Message-ID: <1518368451.97.0.467229070634.issue5978@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +easy stage: -> needs patch type: behavior -> enhancement versions: +Python 3.8 -Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 12:07:03 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 11 Feb 2018 17:07:03 +0000 Subject: [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1518368823.2.0.467229070634.issue11015@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Thanks Nick for merging. Should I open a new PR to address Serhiy's review or fix them on the original PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 12:08:39 2018 From: report at bugs.python.org (Mario Corchero) Date: Sun, 11 Feb 2018 17:08:39 +0000 Subject: [issue32821] Add snippet on how to configure a "split" stream for console Message-ID: <1518368919.27.0.467229070634.issue32821@psf.upfronthosting.co.za> New submission from Mario Corchero : As discussed in python-ideas, it would be good to have a recipe on how to configure the logging stack to be able to log ``ERROR`` and above to stderr and ``INFO`` and below to stdout. It was proposed to add it into the cookbook rather than on the standard library. An alternative proposal was a "ConsoleHandler" that would do this by default. (https://github.com/mariocj89/cpython/commit/501cfcd0f4cad1e04d87b89784988c52a77a80ad) ---------- assignee: docs at python components: Documentation messages: 312003 nosy: docs at python, mariocj89 priority: normal severity: normal status: open title: Add snippet on how to configure a "split" stream for console versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 12:11:05 2018 From: report at bugs.python.org (Mario Corchero) Date: Sun, 11 Feb 2018 17:11:05 +0000 Subject: [issue32821] Add snippet on how to configure a "split" stream for console In-Reply-To: <1518368919.27.0.467229070634.issue32821@psf.upfronthosting.co.za> Message-ID: <1518369065.51.0.467229070634.issue32821@psf.upfronthosting.co.za> Change by Mario Corchero : ---------- keywords: +patch pull_requests: +5433 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 12:16:06 2018 From: report at bugs.python.org (Zachary Ware) Date: Sun, 11 Feb 2018 17:16:06 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1518369366.63.0.467229070634.issue32604@psf.upfronthosting.co.za> Zachary Ware added the comment: New changeset fe61e8d8c7cd1f6fb0ce7e9b8f0460b47b5f29a5 by Zachary Ware (Miss Islington (bot)) in branch '3.7': bpo-32604: Make _xxsubinterpreters build on Windows (GH-5624) https://github.com/python/cpython/commit/fe61e8d8c7cd1f6fb0ce7e9b8f0460b47b5f29a5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 12:26:06 2018 From: report at bugs.python.org (Eric Osborne) Date: Sun, 11 Feb 2018 17:26:06 +0000 Subject: [issue32820] Add bits method to ipaddress In-Reply-To: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: <1518369966.66.0.467229070634.issue32820@psf.upfronthosting.co.za> Eric Osborne added the comment: redoing with a bits() property method to return a string, a la: def bits(self): fstr = '0' + str(IPV4LENGTH) + 'b' return '0b' + format(int(self), fstr) Works thusly: import ipaddress as ip a = ip.IPv4Address('0.0.0.42') a.bits == '0b00000000000000000000000000101010' ---------- resolution: rejected -> title: Add binary methods to ipaddress -> Add bits method to ipaddress _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 12:38:36 2018 From: report at bugs.python.org (Eric Osborne) Date: Sun, 11 Feb 2018 17:38:36 +0000 Subject: [issue32820] Add bits method to ipaddress In-Reply-To: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: <1518370716.3.0.467229070634.issue32820@psf.upfronthosting.co.za> Change by Eric Osborne : ---------- keywords: +patch pull_requests: +5434 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 13:06:49 2018 From: report at bugs.python.org (Jeff Ramnani) Date: Sun, 11 Feb 2018 18:06:49 +0000 Subject: [issue21060] Better error message for setup.py upload command without sdist/bdist In-Reply-To: <1395737197.75.0.193444855893.issue21060@psf.upfronthosting.co.za> Message-ID: <1518372409.81.0.467229070634.issue21060@psf.upfronthosting.co.za> Jeff Ramnani added the comment: I think the error message you suggested is better than the one in the current patch. I've added a new patch with your improved message. I haven't submitted or updated a patch since the migration to GitHub. I can open a PR over on GitHub if that would make it easier for you. ---------- Added file: https://bugs.python.org/file47437/issue21060-py38.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 13:36:14 2018 From: report at bugs.python.org (Matt Ripley) Date: Sun, 11 Feb 2018 18:36:14 +0000 Subject: [issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package. In-Reply-To: <1517141127.29.0.467229070634.issue32545@psf.upfronthosting.co.za> Message-ID: <33011199.482640.1518374168850@mail.yahoo.com> Matt Ripley added the comment: Hi Steve, Finally sorted this out. I tried all the workarounds that I could find on the web for similar issues. In the end I needed to re-image windows 10. This was the only thinkg that sorted it out. So looked like the windows had ccorrupted preventing the msi installers. Thanks for your help. Best regards Matt From: Steve Dower To: matt.ripley at yahoo.co.uk Sent: Sunday, 28 January 2018, 12:05 Subject: [issue32545] Unable to install Python 3.7.0a4 on Windows 10 - Error 0x80070643: Failed to install MSI package. Steve Dower added the comment: >From the log file, all I can tell is that it failed to open the file containing information about ongoing installs. At a guess, another install was running (maybe failed?) and didn't clean up properly. Rebooting should generally resolve that. If it doesn't, you're either looking at serious OS corruption (worth testing if any other MSI installers work - Anaconda does not use MSI) or disk corruption. ---------- _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 13:38:41 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 11 Feb 2018 18:38:41 +0000 Subject: [issue30109] make reindent failed. In-Reply-To: <1492658256.6.0.028215188728.issue30109@psf.upfronthosting.co.za> Message-ID: <1518374321.45.0.467229070634.issue30109@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: make reindent is still failing on 2.7 branch, but I haven't had chance to look into the fix. Not really sure if we want to bother? Anyways, I've unassigned myself so if someone else want to look into it, they can. Not sure if it's worth the effort. (not a lot of people use it?) ---------- assignee: Mariatta -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 14:25:22 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Feb 2018 19:25:22 +0000 Subject: [issue32758] Stack overflow when parse long expression to AST In-Reply-To: <1517682171.17.0.467229070634.issue32758@psf.upfronthosting.co.za> Message-ID: <1518377122.23.0.467229070634.issue32758@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If ast_parse returns, a correct tree (A) rather than a buggy tree is a hard requirement. If ast_parse does not return, an exception (B) rather than a crash is strongly desired. We should not risk A to get B. I presume that Serhiy is suggesting that option 1 either has such a risk or would consume developer resources that might be better spent on other improvements. For Python, option 2, seems pretty useless for real code because there are much better ways to sum a long sequence: sum(iterable_of_numbers), seq.append, ''.join(iterable_of_string). Possible addition to the ast.parse entry. "Syntactically correct but extremely long or complex source strings may result in a RecursionError or program crash." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 14:26:24 2018 From: report at bugs.python.org (Nitish) Date: Sun, 11 Feb 2018 19:26:24 +0000 Subject: [issue32806] locally imported modules are unaccessible in lambdas in pdb In-Reply-To: <1518169666.43.0.467229070634.issue32806@psf.upfronthosting.co.za> Message-ID: <1518377184.59.0.467229070634.issue32806@psf.upfronthosting.co.za> Nitish added the comment: This can be traced back to the following issue: >>> c = compile("(lambda: re.findall('a', 'aaa'))()", "", "single") >>> import re as rea >>> exec(c, None, {'re': rea}) NameError: name 're' is not defined. Seeing disassembly of the compiled code, it used LOAD_GLOBAL to get re. This seems to be the problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 14:43:25 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Feb 2018 19:43:25 +0000 Subject: [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1518378205.63.0.467229070634.issue11015@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Since Nick already merged and backported, at least a new PR is needed. Since this is an old issue with a long discussion and several inactives on the nosy list, I suggest a new issue starting from the merge result as a base: "More revisions to test.support docs". Make a list of Serhiy's questions and comments. TESTFN_NONASCII - How different from TESTFN_UNICODE? PGO - value? True/False? TEST_SUPPORT_DIR - Not used. ... Add Nick, Serhiy, and me as nosy. We can discuss there how to handle the additional issues. ---------- components: +Documentation, Tests stage: backport needed -> resolved status: open -> closed versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 15:30:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Feb 2018 20:30:26 +0000 Subject: [issue30109] make reindent failed. In-Reply-To: <1492658256.6.0.028215188728.issue30109@psf.upfronthosting.co.za> Message-ID: <1518381026.24.0.467229070634.issue30109@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 15:46:57 2018 From: report at bugs.python.org (Nitish) Date: Sun, 11 Feb 2018 20:46:57 +0000 Subject: [issue32806] locally imported modules are unaccessible in lambdas in pdb In-Reply-To: <1518169666.43.0.467229070634.issue32806@psf.upfronthosting.co.za> Message-ID: <1518382017.03.0.467229070634.issue32806@psf.upfronthosting.co.za> Nitish added the comment: Sorry. I didn't finish my last message. Is the behaviour described in that message a bug? If yes, that would explain the original behaviour. If no, why not? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 15:58:25 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 11 Feb 2018 20:58:25 +0000 Subject: [issue32815] Document text parameter to subprocess.Popen In-Reply-To: <1518268981.78.0.467229070634.issue32815@psf.upfronthosting.co.za> Message-ID: <1518382705.24.0.467229070634.issue32815@psf.upfronthosting.co.za> Gregory P. Smith added the comment: New changeset e14c01037877768a3fe766e50d14993bd5d8a67e by Gregory P. Smith (Pablo Galindo) in branch 'master': bpo-32815: Improve docs on the subprocess API *text* parameter (GH-5622) https://github.com/python/cpython/commit/e14c01037877768a3fe766e50d14993bd5d8a67e ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 15:58:33 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 11 Feb 2018 20:58:33 +0000 Subject: [issue32815] Document text parameter to subprocess.Popen In-Reply-To: <1518268981.78.0.467229070634.issue32815@psf.upfronthosting.co.za> Message-ID: <1518382713.87.0.467229070634.issue32815@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5435 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 17:18:17 2018 From: report at bugs.python.org (David Rebbe) Date: Sun, 11 Feb 2018 22:18:17 +0000 Subject: [issue32822] finally block doesn't re-raise exception if return statement exists inside Message-ID: <1518387497.4.0.467229070634.issue32822@psf.upfronthosting.co.za> New submission from David Rebbe : According to the docs: "When an exception has occurred in the try clause and has not been handled by an except clause (or it has occurred in an except or else clause), it is re-raised after the finally clause has been executed." https://docs.python.org/2/tutorial/errors.html#defining-clean-up-actions This seems to not be the case if return inside a finally block, the exception needing to be thrown looks like its tossed out. I'm not sure if this is intended behavior and the docs need to be updated or python isn't doing the correct behavior. Python 3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 19:28:18) [MSC v.1600 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. ---------- components: Interpreter Core files: finally_test.py messages: 312014 nosy: David Rebbe priority: normal severity: normal status: open title: finally block doesn't re-raise exception if return statement exists inside type: behavior versions: Python 3.4 Added file: https://bugs.python.org/file47438/finally_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 17:44:33 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Feb 2018 22:44:33 +0000 Subject: [issue32822] finally block doesn't re-raise exception if return statement exists inside In-Reply-To: <1518387497.4.0.467229070634.issue32822@psf.upfronthosting.co.za> Message-ID: <1518389073.37.0.467229070634.issue32822@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is intended and documented behavior. https://docs.python.org/3/reference/compound_stmts.html#the-try-statement ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 18:09:45 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Feb 2018 23:09:45 +0000 Subject: [issue32801] Lib/_strptime.py: utilize all() In-Reply-To: <1518106189.47.0.467229070634.issue32801@psf.upfronthosting.co.za> Message-ID: <1518390585.87.0.467229070634.issue32801@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Serhiy, Is there any reason to not combine last two lines in one? - regex = '(?P<%s>%s' % (directive, regex) - return '%s)' % regex + return '(?P<%s>%s)' % (directive, regex) or to use f-string to then get + return f'(?P<{directive}>{regex})' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 18:19:05 2018 From: report at bugs.python.org (David Rebbe) Date: Sun, 11 Feb 2018 23:19:05 +0000 Subject: [issue32822] finally block doesn't re-raise exception if return statement exists inside In-Reply-To: <1518387497.4.0.467229070634.issue32822@psf.upfronthosting.co.za> Message-ID: <1518391145.98.0.467229070634.issue32822@psf.upfronthosting.co.za> David Rebbe added the comment: Oops I didn't realize I referenced the tutorial documentation. Maybe it would be better to mention this behavior in the tutorial documentation also. I've always assumed exception raises take priority over any return/break/continues. Behavior is backwards from what I'd expect but makes sense. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 18:21:04 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 11 Feb 2018 23:21:04 +0000 Subject: [issue32815] Document text parameter to subprocess.Popen In-Reply-To: <1518268981.78.0.467229070634.issue32815@psf.upfronthosting.co.za> Message-ID: <1518391264.23.0.467229070634.issue32815@psf.upfronthosting.co.za> Gregory P. Smith added the comment: New changeset ba4f218657efcba856d00eb320418355cce8309a by Gregory P. Smith (Miss Islington (bot)) in branch '3.7': bpo-32815: Improve docs on the subprocess API *text* parameter (GH-5622) (GH-5631) https://github.com/python/cpython/commit/ba4f218657efcba856d00eb320418355cce8309a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 18:21:39 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 11 Feb 2018 23:21:39 +0000 Subject: [issue32815] Document text parameter to subprocess.Popen In-Reply-To: <1518268981.78.0.467229070634.issue32815@psf.upfronthosting.co.za> Message-ID: <1518391299.76.0.467229070634.issue32815@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 Sun Feb 11 18:21:47 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 11 Feb 2018 23:21:47 +0000 Subject: [issue32820] Add bits method to ipaddress In-Reply-To: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: <1518391307.75.0.467229070634.issue32820@psf.upfronthosting.co.za> Eric V. Smith added the comment: Without commenting on how useful or desirable this would be, I'll point out the string can be computed as: return f'{int(self):#0{IPV4LENGTH+2}b}' ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 18:30:54 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Feb 2018 23:30:54 +0000 Subject: [issue32823] Regression in test -j behavior and time in 3.7.0b1 Message-ID: <1518391854.25.0.467229070634.issue32823@psf.upfronthosting.co.za> New submission from Terry J. Reedy : For me, on Windows, recent changes, since 3.7.0a4, have greatly reduced the benefit of j0 (= j14 on my system). For 3.6.4 (installed), the times are around 13:30 and 2:20. The times for 3.7.0a4 (installed) are about the same parallel and would have been for serial if not for a crash. For 3.7.0b1 and master, compiled with debug on, the times are around 24:00 and 11:10. As shown by the increase for serial from 13:30 to 24:00, debug by itself slows tests down by nearly half. For parallel, the slowdown from 2:20 to 11:40, is increased by an extra factor of more than 2. The reason is that parallel tests are done in batches of n (at least on windows). Before, a new test started in one of the 14 processes whenever the test in a process finished. All 12 cpus were kept busy until less than 12 tests remained. Now, 14 new tests are started when all the previous 14 finish. Therefore, cpus wait while the slowest test in a batch of 14 finishes. Beginning of old log: Run tests in parallel using 14 child processes 0:00:00 [ 1/413] test__opcode passed 0:00:00 [ 2/413] test__locale passed 0:00:00 [ 3/413] test__osx_support passed 0:00:00 [ 4/413] test_abc passed 0:00:01 [ 5/413] test_abstract_numbers passed 0:00:01 [ 6/413] test_aifc passed 0:00:02 [ 7/413] test_array passed 0:00:02 [ 8/413] test_asdl_parser skipped test_asdl_parser skipped -- test irrelevant for an installed Python 0:00:03 [ 9/413] test_argparse passed 0:00:04 [ 10/413] test_ast passed 0:00:04 [ 11/413] test_asyncgen passed 0:00:05 [ 12/413] test_unittest passed 0:00:06 [ 13/413] test_asynchat passed 0:00:06 [ 14/413] test_atexit passed 0:00:06 [ 15/413] test_audioop passed 0:00:06 [ 16/413] test_augassign passed 0:00:07 [ 17/413] test_asyncore passed 0:00:07 [ 18/413] test_baseexception passed 0:00:07 [ 19/413] test_base64 passed ... 0:00:29 [107/413] test_enum passed 0:00:30 [108/413] test_enumerate passed 0:00:30 [109/413] test_eof passed 0:00:30 [110/413] test_epoll skipped test_epoll skipped -- test works only on Linux 2.6 0:00:30 [111/413] test_errno passed Beginning of new log: Run tests in parallel using 14 child processes running: test_grammar (30 sec), test_opcodes (30 sec), test_dict (30 sec), test_builtin (30 sec), test_exceptions (30 sec), test_types (30 sec), test_unittest (30 sec), test_doctest (30 sec), test_doctest2 (30 sec), test_support (30 sec), test___all__ (30 sec), test___future__ (30 sec), test__locale (30 sec), test__opcode (30 sec) 0:00:41 [ 1/414] test_support passed -- running: test_grammar (41 sec), test_opcodes (41 sec), test_dict (41 sec), test_builtin (41 sec), test_exceptions (41 sec), test_types (41 sec), test_doctest (41 sec), test___all__ (41 sec), test___future__ (41 sec), test__locale (41 sec), test__opcode (41 sec) 0:00:41 [ 2/414] test_doctest2 passed -- running: test_grammar (41 sec), test___all__ (41 sec), test__locale (41 sec) 0:00:41 [ 3/414] test_unittest passed -- running: test___all__ (41 sec), test__locale (41 sec) 0:00:41 [ 4/414] test__opcode passed 0:00:41 [ 5/414] test_dict passed 0:00:41 [ 6/414] test_types passed 0:00:41 [ 7/414] test___future__ passed 0:00:41 [ 8/414] test_builtin passed 0:00:41 [ 9/414] test_doctest passed 0:00:41 [ 10/414] test_opcodes passed 0:00:41 [ 11/414] test_exceptions passed 0:00:41 [ 12/414] test_grammar passed 0:00:41 [ 13/414] test___all__ passed (40 sec) 0:00:41 [ 14/414] test__locale passed The slowest test took 40 sec, and the rest of the cpus waited. [snip list of running tests] 0:01:25 [ 15/414] test_audioop passed 0:01:25 [ 17/414] test_abstract_numbers passed 0:01:25 [ 18/414] test_abc passed 0:01:25 [ 19/414] test_aifc passed 0:01:25 [ 20/414] test_asdl_parser passed 0:01:25 [ 21/414] test_asyncgen passed 0:01:25 [ 22/414] test_atexit passed 0:01:25 [ 23/414] test_asyncio passed (42 sec) [snip output] 0:01:25 [ 25/414] test_ast passed 0:01:25 [ 26/414] test_asynchat passed 0:01:25 [ 27/414] test_array passed 0:01:25 [ 28/414] test__osx_support passed 28 tests done in 85 seconds versus 111 in 30 seconds. I think whatever caused this should be reversed. ---------- components: Tests messages: 312020 nosy: ncoghlan, terry.reedy, vstinner priority: normal severity: normal status: open title: Regression in test -j behavior and time in 3.7.0b1 type: performance versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 18:36:14 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Feb 2018 23:36:14 +0000 Subject: [issue32823] Regression in test -j behavior and time in 3.7.0b1 In-Reply-To: <1518391854.25.0.467229070634.issue32823@psf.upfronthosting.co.za> Message-ID: <1518392174.98.0.467229070634.issue32823@psf.upfronthosting.co.za> Terry J. Reedy added the comment: For me, on Windows, the tests for time, datetime, and _strptime have failures on the master branch, so I don't want to submit a PR just now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 18:36:37 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Feb 2018 23:36:37 +0000 Subject: [issue32823] Regression in test -j behavior and time in 3.7.0b1 In-Reply-To: <1518391854.25.0.467229070634.issue32823@psf.upfronthosting.co.za> Message-ID: <1518392197.98.0.467229070634.issue32823@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- Removed message: https://bugs.python.org/msg312021 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 18:37:02 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Feb 2018 23:37:02 +0000 Subject: [issue32801] Lib/_strptime.py: utilize all() In-Reply-To: <1518106189.47.0.467229070634.issue32801@psf.upfronthosting.co.za> Message-ID: <1518392222.73.0.467229070634.issue32801@psf.upfronthosting.co.za> Terry J. Reedy added the comment: For me, on Windows, the tests for time, datetime, and _strptime have failures on the master branch, so I don't want to submit a PR just now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 18:42:34 2018 From: report at bugs.python.org (Frank Griswold) Date: Sun, 11 Feb 2018 23:42:34 +0000 Subject: [issue32824] Docs: Using Python on a Macintosh has bad info per Apple site Message-ID: <1518392554.24.0.467229070634.issue32824@psf.upfronthosting.co.za> New submission from Frank Griswold : This chunk of docs has bad info in both Python2 and Python3 docs: 4.1.3. Configuration Python on OS X honors all standard Unix environment variables such as PYTHONPATH, but setting these variables for programs started from the Finder is non-standard as the Finder does not read your .profile or .cshrc at startup. You need to create a file ~/.MacOSX/environment.plist. See Apple?s Technical Document QA1067 for details. If you search for QA1067, you are informed that the document is legacy and unsupported, with a suggestion for where to look now. That suggested link leads to a 404. Searching the apple site, I find that at least some thoughtful developers think that configuring the environment isn't even possible, generally; and isn't considered good form even if so. Here: https://forums.developer.apple.com/message/217422 I have no problem setting things for my terminal, as a longtime (unix) user, but for others, this section probably needs a complete examination with an eye toward making it current. quite possibly by reorganizing it. ---------- assignee: docs at python components: Documentation messages: 312023 nosy: docs at python, griswolf priority: normal severity: normal status: open title: Docs: Using Python on a Macintosh has bad info per Apple site type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 18:49:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 11 Feb 2018 23:49:45 +0000 Subject: [issue32801] Lib/_strptime.py: utilize all() In-Reply-To: <1518106189.47.0.467229070634.issue32801@psf.upfronthosting.co.za> Message-ID: <1518392985.84.0.467229070634.issue32801@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't know such reason. I would not combine f-strings and regular expressions. Curly braces are syntactically meaningful in regular expressions, and regular expression which uses them for substituting look strange. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 19:22:31 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 12 Feb 2018 00:22:31 +0000 Subject: [issue20285] Improve object.__doc__ and help(object) output In-Reply-To: <1389920351.63.0.12805701843.issue20285@psf.upfronthosting.co.za> Message-ID: <1518394951.68.0.467229070634.issue20285@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Reponses on the pydev thread, which include 3 other coredevs: "a base for all classes." object entry in lib ref, function "the ultimate base class of all other classes." Martin Panter object is neither a base or superclass of itself, so the first of each pair above is not quite right. "the base class of the class heirarchy ['hierarchy']" Steven D'Aprano "the root of the class heirarchy" ditto + quotes from Java and Ruby Jeff Allen and Barry Warsaw like either, with BW slightly referring the first. I was thinking about 'tree' instead of 'hierachy', but 'class tree' is wrong and 'directed acyclic graph of classes' a bit wordy. While hierarchies are often thought of as trees, it is possible for someone to report to more than one person. No one supported the status quo. Martin also suggested a continuation: "When called, it accepts no arguments and returns a new unique and featureless object." Even though object, unlike any other class, is primarily used as a base class rather than instance source, the latter should be included. For other built-in classes, the summary line describes instances. I would leave out 'unique' as that could be confused with 'singleton'. I propose the following, which follows general docstring format, but describes the class instead of instances in the summary line. "The base class of the class hierarchy. When called, it accepts no arguments and returns a new featureless instance that has no instance attributes and cannot be given any." Passing arguments to object and trying to add attributes to object instances are two common beginner mistakes. ---------- versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 19:39:43 2018 From: report at bugs.python.org (Eric Osborne) Date: Mon, 12 Feb 2018 00:39:43 +0000 Subject: [issue32820] Add bits method to ipaddress In-Reply-To: <1518391307.75.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: Eric Osborne added the comment: Faster, too. My way: In [7]: %timeit bits(a) 1.67 ?s ? 7.31 ns per loop (mean ? std. dev. of 7 runs, 1000000 loops each) Your way: In [11]: %timeit b2(a) 1.2 ?s ? 5.93 ns per loop (mean ? std. dev. of 7 runs, 1000000 loops each) I was a little worried about doing it all as a clever one-liner but this seems worthwhile. I'll change the code I submitted. thanks! eric On Sun, Feb 11, 2018 at 6:21 PM Eric V. Smith wrote: > > Eric V. Smith added the comment: > > Without commenting on how useful or desirable this would be, I'll point > out the string can be computed as: > > return f'{int(self):#0{IPV4LENGTH+2}b}' > > ---------- > nosy: +eric.smith > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 19:47:27 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 12 Feb 2018 00:47:27 +0000 Subject: [issue32813] SSL shared_ciphers implementation wrong - returns configured but not shared ciphers In-Reply-To: <1518342702.27.0.467229070634.issue32813@psf.upfronthosting.co.za> Message-ID: <1518396444.1635878.1267363856.0E85AA47@webmail.messagingengine.com> Benjamin Peterson added the comment: I think at the time I was writing a Python version of the "openssl" tool. "openssl s_client" prints out what it says are the "Shared ciphers". So, yes, I agree the usecase is mostly debugging. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 11 23:41:29 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 12 Feb 2018 04:41:29 +0000 Subject: [issue32824] Docs: Using Python on a Macintosh has bad info per Apple site In-Reply-To: <1518392554.24.0.467229070634.issue32824@psf.upfronthosting.co.za> Message-ID: <1518410489.22.0.467229070634.issue32824@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the reminder. Yes, the whole "Using Python on a Macintosh" section is very much out-of-date and needs a complete rewrite. It has been on my To Do list for a long time; I'll see what I can do to expedite it. ---------- assignee: docs at python -> ned.deily nosy: +ned.deily priority: normal -> high stage: -> needs patch versions: +Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 00:20:33 2018 From: report at bugs.python.org (Zachary Ware) Date: Mon, 12 Feb 2018 05:20:33 +0000 Subject: [issue31562] snakebite.net is not available In-Reply-To: <1506188809.66.0.0162069541224.issue31562@psf.upfronthosting.co.za> Message-ID: <1518412833.19.0.467229070634.issue31562@psf.upfronthosting.co.za> Zachary Ware added the comment: Trent, any word on this? ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 00:30:45 2018 From: report at bugs.python.org (Brett Cannon) Date: Mon, 12 Feb 2018 05:30:45 +0000 Subject: [issue32758] Stack overflow when parse long expression to AST In-Reply-To: <1518346611.05.0.467229070634.issue32758@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Sun, Feb 11, 2018, 16:26 Serhiy Storchaka, wrote: > > Serhiy Storchaka added the comment: > > > The other option is to simply not worry about it and acknowledge you can > > crash the compiler with a crazy-sized expression. > > Agreed, this is the most practical option. Do you want to write such > acknowledgement? > I think adding a test to test_crashers and an appropriate comment pointing to this issue is sufficient. > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 02:31:26 2018 From: report at bugs.python.org (Christian Heigele) Date: Mon, 12 Feb 2018 07:31:26 +0000 Subject: [issue32808] subprocess.check_output opens an unwanted command line window after fall creator update In-Reply-To: <1518173531.96.0.467229070634.issue32808@psf.upfronthosting.co.za> Message-ID: <1518420686.14.0.467229070634.issue32808@psf.upfronthosting.co.za> Christian Heigele added the comment: Confirmed. On my private machine I just got the 1709 update and also don't have the error. Any further ideas what I can do? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 03:02:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Feb 2018 08:02:43 +0000 Subject: [issue32758] Stack overflow when parse long expression to AST In-Reply-To: <1517682171.17.0.467229070634.issue32758@psf.upfronthosting.co.za> Message-ID: <1518422563.75.0.467229070634.issue32758@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +docs at python stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 03:07:57 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 12 Feb 2018 08:07:57 +0000 Subject: [issue32720] Format mini-language integer definition is incorrect In-Reply-To: <1517287529.39.0.467229070634.issue32720@psf.upfronthosting.co.za> Message-ID: <1518422877.75.0.467229070634.issue32720@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 6708be744d032aeffab3e2cf0b064a41a719d8a1 by Miss Islington (bot) in branch '3.6': bpo-32720: Fixed the replacement field grammar documentation. (GH-5544) (GH-5547) https://github.com/python/cpython/commit/6708be744d032aeffab3e2cf0b064a41a719d8a1 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 03:09:29 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 12 Feb 2018 08:09:29 +0000 Subject: [issue32720] Format mini-language integer definition is incorrect In-Reply-To: <1517287529.39.0.467229070634.issue32720@psf.upfronthosting.co.za> Message-ID: <1518422969.46.0.467229070634.issue32720@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 04:44:47 2018 From: report at bugs.python.org (Christian Heigele) Date: Mon, 12 Feb 2018 09:44:47 +0000 Subject: [issue32808] subprocess.check_output opens an unwanted command line window after fall creator update In-Reply-To: <1518173531.96.0.467229070634.issue32808@psf.upfronthosting.co.za> Message-ID: <1518428687.32.0.467229070634.issue32808@psf.upfronthosting.co.za> Christian Heigele added the comment: Please stop investigation on this bug for now, it might be related to an in-house security tool. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 04:52:06 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 12 Feb 2018 09:52:06 +0000 Subject: [issue30717] Add unicode grapheme cluster break algorithm In-Reply-To: <1497986122.28.0.540580196076.issue30717@psf.upfronthosting.co.za> Message-ID: <1518429126.98.0.467229070634.issue30717@psf.upfronthosting.co.za> INADA Naoki added the comment: We missed 3.7 train. I'm sorry about I couldn't review it. But I have many shine features I want in 3.7 and I have no time to review all. Especially, I need to understand tr29. It was hard job to me. I think publishing this (and any other functions relating to unicode) to PyPI is better than waiting 3.8. It make possible to discuss API design with working code, and make it "battle tested" before adding it to standard library. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 05:14:02 2018 From: report at bugs.python.org (mps) Date: Mon, 12 Feb 2018 10:14:02 +0000 Subject: [issue32825] warn user of creation of multiple Tk instances Message-ID: <1518430442.75.0.467229070634.issue32825@psf.upfronthosting.co.za> New submission from mps : tkinter is the first GUI interface used by novices. They often get in trouble when they create a new Tk instance instead of a Toplevel. It would be helpful to output a warning message in this case (i.e. checking _default_root is not None and _support_default_root is True in the Tk initialization). Thank for your attention and best regards. - mps. ---------- components: Tkinter messages: 312036 nosy: mps priority: normal severity: normal status: open title: warn user of creation of multiple Tk instances type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 05:43:23 2018 From: report at bugs.python.org (Matthias Klose) Date: Mon, 12 Feb 2018 10:43:23 +0000 Subject: [issue32826] idle test fails at least on the 3.6 branch Message-ID: <1518432203.1.0.467229070634.issue32826@psf.upfronthosting.co.za> New submission from Matthias Klose : seen with the 3.6 branch 20180212, last known succeeding test is the 3.6.4 release. test test_idle failed -- Traceback (most recent call last): File "/home/packages/python/3.6/python3.6-3.6.4/Lib/idlelib/idle_test/test_help_about.py", line 78, in test_file_buttons self.assertEqual(f.readline().strip(), get('1.0', '1.end')) File "/home/packages/python/3.6/python3.6-3.6.4/build-debug/../Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1540: ordinal not in range(128) ---------- assignee: terry.reedy components: IDLE messages: 312037 nosy: doko, terry.reedy priority: normal severity: normal status: open title: idle test fails at least on the 3.6 branch versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 06:47:03 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Feb 2018 11:47:03 +0000 Subject: [issue32827] Fix incorrect usage of _PyUnicodeWriter_Prepare() Message-ID: <1518436023.7.0.467229070634.issue32827@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : Based on discussion in PR 660. _PyUnicodeWriter_Prepare() is used incorrectly in unicode_decode_call_errorhandler_writer(), _PyUnicode_DecodeUnicodeEscape() and PyUnicode_DecodeRawUnicodeEscape() in Objects/unicodeobject.c. The second argument is the number of characters that should be reserved after the current position. But in these places the total minimal size is passed to _PyUnicodeWriter_Prepare(). This can lead to allocating more memory than necessary. ---------- components: Interpreter Core, Unicode messages: 312038 nosy: ezio.melotti, serhiy.storchaka, vstinner, xiang.zhang priority: normal severity: normal status: open title: Fix incorrect usage of _PyUnicodeWriter_Prepare() type: resource usage versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 06:51:38 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Feb 2018 11:51:38 +0000 Subject: [issue32827] Fix incorrect usage of _PyUnicodeWriter_Prepare() In-Reply-To: <1518436023.7.0.467229070634.issue32827@psf.upfronthosting.co.za> Message-ID: <1518436298.02.0.467229070634.issue32827@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +5436 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 06:54:27 2018 From: report at bugs.python.org (=?utf-8?b?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?=) Date: Mon, 12 Feb 2018 11:54:27 +0000 Subject: [issue32828] compress "True if bool(x) else False" expressions Message-ID: <1518436467.62.0.467229070634.issue32828@psf.upfronthosting.co.za> New submission from ????? ???????? : diff --git a/Lib/_strptime.py b/Lib/_strptime.py --- a/Lib/_strptime.py +++ b/Lib/_strptime.py @@ -525,7 +525,7 @@ def _strptime(data_string, format="%a %b %d %H:%M:%S %Y"): # out the Julian day of the year. if julian is None and weekday is not None: if week_of_year is not None: - week_starts_Mon = True if week_of_year_start == 0 else False + week_starts_Mon = week_of_year_start == 0 julian = _calc_julian_from_U_or_W(year, week_of_year, weekday, week_starts_Mon) elif iso_year is not None and iso_week is not None: diff --git a/Lib/email/generator.py b/Lib/email/generator.py --- a/Lib/email/generator.py +++ b/Lib/email/generator.py @@ -59,7 +59,7 @@ class Generator: """ if mangle_from_ is None: - mangle_from_ = True if policy is None else policy.mangle_from_ + mangle_from_ = policy is None or policy.mangle_from_ self._fp = outfp self._mangle_from_ = mangle_from_ self.maxheaderlen = maxheaderlen diff --git a/Lib/test/test_buffer.py b/Lib/test/test_buffer.py --- a/Lib/test/test_buffer.py +++ b/Lib/test/test_buffer.py @@ -576,7 +576,7 @@ def rand_aligned_slices(maxdim=5, maxshape=16): minshape = 0 elif n >= 90: minshape = 1 - all_random = True if randrange(100) >= 80 else False + all_random = randrange(100) >= 80 lshape = [0]*ndim; rshape = [0]*ndim lslices = [0]*ndim; rslices = [0]*ndim diff --git a/Lib/test/test_decimal.py b/Lib/test/test_decimal.py --- a/Lib/test/test_decimal.py +++ b/Lib/test/test_decimal.py @@ -117,7 +117,7 @@ skip_expected = not os.path.isdir(directory) EXTENDEDERRORTEST = False # Test extra functionality in the C version (-DEXTRA_FUNCTIONALITY). -EXTRA_FUNCTIONALITY = True if hasattr(C, 'DecClamped') else False +EXTRA_FUNCTIONALITY = hasattr(C, 'DecClamped') requires_extra_functionality = unittest.skipUnless( EXTRA_FUNCTIONALITY, "test requires build with -DEXTRA_FUNCTIONALITY") skip_if_extra_functionality = unittest.skipIf( @@ -1455,7 +1455,7 @@ class ArithmeticOperatorsTest(unittest.TestCase): for x, y in qnan_pairs + snan_pairs: for op in order_ops + equality_ops: got = op(x, y) - expected = True if op is operator.ne else False + expected = op is operator.ne self.assertIs(expected, got, "expected {0!r} for operator.{1}({2!r}, {3!r}); " "got {4!r}".format( @@ -1468,7 +1468,7 @@ class ArithmeticOperatorsTest(unittest.TestCase): for x, y in qnan_pairs: for op in equality_ops: got = op(x, y) - expected = True if op is operator.ne else False + expected = op is operator.ne self.assertIs(expected, got, "expected {0!r} for " "operator.{1}({2!r}, {3!r}); " diff --git a/Lib/test/test_winreg.py b/Lib/test/test_winreg.py --- a/Lib/test/test_winreg.py +++ b/Lib/test/test_winreg.py @@ -20,13 +20,13 @@ except (IndexError, ValueError): # tuple of (major, minor) WIN_VER = sys.getwindowsversion()[:2] # Some tests should only run on 64-bit architectures where WOW64 will be. -WIN64_MACHINE = True if machine() == "AMD64" else False +WIN64_MACHINE = machine() == "AMD64" # Starting with Windows 7 and Windows Server 2008 R2, WOW64 no longer uses # registry reflection and formerly reflected keys are shared instead. # Windows 7 and Windows Server 2008 R2 are version 6.1. Due to this, some # tests are only valid up until 6.1 -HAS_REFLECTION = True if WIN_VER < (6, 1) else False +HAS_REFLECTION = WIN_VER < (6, 1) # Use a per-process key to prevent concurrent test runs (buildbot!) from # stomping on each other. ---------- components: Build messages: 312039 nosy: dilyan.palauzov priority: normal severity: normal status: open title: compress "True if bool(x) else False" expressions type: performance versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 07:06:40 2018 From: report at bugs.python.org (=?utf-8?b?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?=) Date: Mon, 12 Feb 2018 12:06:40 +0000 Subject: [issue32829] Lib/ be more pythonic Message-ID: <1518437200.03.0.467229070634.issue32829@psf.upfronthosting.co.za> New submission from ????? ???????? : diff --git a/Lib/distutils/command/sdist.py b/Lib/distutils/command/sdist.py --- a/Lib/distutils/command/sdist.py +++ b/Lib/distutils/command/sdist.py @@ -251,14 +251,11 @@ class sdist(Command): for fn in standards: if isinstance(fn, tuple): alts = fn - got_it = False for fn in alts: if self._cs_path_exists(fn): - got_it = True self.filelist.append(fn) break - - if not got_it: + else: self.warn("standard file not found: should have one of " + ', '.join(alts)) else: diff --git a/Lib/email/_header_value_parser.py b/Lib/email/_header_value_parser.py --- a/Lib/email/_header_value_parser.py +++ b/Lib/email/_header_value_parser.py @@ -567,14 +567,7 @@ class DisplayName(Phrase): @property def value(self): - quote = False - if self.defects: - quote = True - else: - for x in self: - if x.token_type == 'quoted-string': - quote = True - if quote: + if self.defects or any(x.token_type == 'quoted-string' for x in self): pre = post = '' if self[0].token_type=='cfws' or self[0][0].token_type=='cfws': pre = ' ' diff --git a/Lib/idlelib/config.py b/Lib/idlelib/config.py --- a/Lib/idlelib/config.py +++ b/Lib/idlelib/config.py @@ -402,7 +402,7 @@ class IdleConf: because setting 'name' to a builtin not defined in older IDLEs to display multiple error messages or quit. See https://bugs.python.org/issue25313. - When default = True, 'name2' takes precedence over 'name', + When default is True, 'name2' takes precedence over 'name', while older IDLEs will just use name. When default = False, 'name2' may still be set, but it is ignored. """ ---------- components: Build messages: 312040 nosy: dilyan.palauzov priority: normal severity: normal status: open title: Lib/ be more pythonic type: performance versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 07:09:38 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 12 Feb 2018 12:09:38 +0000 Subject: [issue32829] Lib/ be more pythonic In-Reply-To: <1518437200.03.0.467229070634.issue32829@psf.upfronthosting.co.za> Message-ID: <1518437378.56.0.467229070634.issue32829@psf.upfronthosting.co.za> Christian Heimes added the comment: We generally don't accept patches on bugs.python.org. Please open a pull request on github, see https://devguide.python.org/#contributing ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 07:14:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Feb 2018 12:14:51 +0000 Subject: [issue30109] make reindent failed. In-Reply-To: <1492658256.6.0.028215188728.issue30109@psf.upfronthosting.co.za> Message-ID: <1518437691.64.0.467229070634.issue30109@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: 2.7 needs different solution. The side effect of issue10639 in 2.7 was changing input and output files for the reindenter to Unicode files. This was not correct. Standard streams stdin/stdout in 2.7 are binary files, and the tokenizer needs the stream of bytes. The proposed PR makes input and output files for the reindenter binary files again, and implements detecting line separators for issue10639. After fixing Tools/scripts/reindent.py running `make reindent` fixed Lib/email/utils.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 07:29:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Feb 2018 12:29:06 +0000 Subject: [issue30109] make reindent failed. In-Reply-To: <1492658256.6.0.028215188728.issue30109@psf.upfronthosting.co.za> Message-ID: <1518438546.52.0.467229070634.issue30109@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +5437 stage: backport needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 07:33:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Feb 2018 12:33:05 +0000 Subject: [issue32820] Add bits method to ipaddress In-Reply-To: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: <1518438785.52.0.467229070634.issue32820@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The usefulness of this feature looks questionable to me. ---------- nosy: +nick, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 07:33:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Feb 2018 12:33:32 +0000 Subject: [issue32820] Add bits method to ipaddress In-Reply-To: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: <1518438812.31.0.467229070634.issue32820@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +ncoghlan -nick _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 07:39:58 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 12 Feb 2018 12:39:58 +0000 Subject: [issue32820] Add bits method to ipaddress In-Reply-To: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: <1518439198.36.0.467229070634.issue32820@psf.upfronthosting.co.za> Christian Heimes added the comment: I agree with Serhiy and Eric. It's a needless complication of the module. What's the actual use case of printing a human readable bit representation of an IP address? ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 07:51:45 2018 From: report at bugs.python.org (ChrisRands) Date: Mon, 12 Feb 2018 12:51:45 +0000 Subject: [issue32830] tkinter documentation suggests "from tkinter import *", contradicting PEP8 Message-ID: <1518439905.14.0.467229070634.issue32830@psf.upfronthosting.co.za> New submission from ChrisRands : Issue arose from this SO post: https://stackoverflow.com/questions/48746351/documentation-is-contradicting-pep8 The tkinter documentation suggests: from tkinter import * https://docs.python.org/3/library/tkinter.html But this obviously contradicts PEP8: "Wildcard imports (from import *) should be avoided" https://www.python.org/dev/peps/pep-0008/#imports Is tkinter a valid exception or is this a documentation bug? The commit of this line to the documentation is >10 years old (at least Python 2.4 I think): https://github.com/python/cpython/commit/116aa62bf54a39697e25f21d6cf6799f7faa1349#diff-05a258c160de90c51c1948689f788ef7R53 ---------- assignee: docs at python components: Documentation messages: 312045 nosy: ChrisRands, docs at python priority: normal severity: normal status: open title: tkinter documentation suggests "from tkinter import *", contradicting PEP8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 08:08:11 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 12 Feb 2018 13:08:11 +0000 Subject: [issue32831] IDLE: Add docstrings and tests for codecontext Message-ID: <1518440891.7.0.467229070634.issue32831@psf.upfronthosting.co.za> New submission from Cheryl Sabella : Add docstrings and tests for codecontext.py. ---------- assignee: terry.reedy components: IDLE messages: 312046 nosy: csabella, terry.reedy priority: normal severity: normal status: open title: IDLE: Add docstrings and tests for codecontext type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 08:09:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Feb 2018 13:09:32 +0000 Subject: [issue32830] tkinter documentation suggests "from tkinter import *", contradicting PEP8 In-Reply-To: <1518439905.14.0.467229070634.issue32830@psf.upfronthosting.co.za> Message-ID: <1518440972.24.0.467229070634.issue32830@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think tkinter is a valid exception. It provides the enormous number of names (mostly constants like RIGHT or VERTICAL) which are convenient to use without prefix. PEP 8 is a style guide for the code of the stdlib. Its suggestions are not mandatory for a user code. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 08:11:45 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 12 Feb 2018 13:11:45 +0000 Subject: [issue32831] IDLE: Add docstrings and tests for codecontext In-Reply-To: <1518440891.7.0.467229070634.issue32831@psf.upfronthosting.co.za> Message-ID: <1518441105.51.0.467229070634.issue32831@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +5438 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 08:22:58 2018 From: report at bugs.python.org (ChrisRands) Date: Mon, 12 Feb 2018 13:22:58 +0000 Subject: [issue32830] tkinter documentation suggests "from tkinter import *", contradicting PEP8 In-Reply-To: <1518439905.14.0.467229070634.issue32830@psf.upfronthosting.co.za> Message-ID: <1518441778.41.0.467229070634.issue32830@psf.upfronthosting.co.za> ChrisRands added the comment: Thanks Serhiy, you might be right (I am not a tkinter user myself). I also forgot to say that in PEP 328 tkinter is mentioned in this context: https://www.python.org/dev/peps/pep-0328/#rationale-for-parentheses ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 08:31:39 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 12 Feb 2018 13:31:39 +0000 Subject: [issue32830] tkinter documentation suggests "from tkinter import *", contradicting PEP8 In-Reply-To: <1518439905.14.0.467229070634.issue32830@psf.upfronthosting.co.za> Message-ID: <1518442299.88.0.467229070634.issue32830@psf.upfronthosting.co.za> Ned Deily added the comment: PEP 8 also says: "In particular: do not break backwards compatibility just to comply with this PEP!" This is one of those cases. There is a ton of code out there that depends on importing tkinter this way for the reasons Serhiy cited. Thanks for the suggestion but this usage is not going to change. ---------- nosy: +ned.deily resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 08:37:17 2018 From: report at bugs.python.org (Eric Osborne) Date: Mon, 12 Feb 2018 13:37:17 +0000 Subject: [issue32820] Add bits method to ipaddress In-Reply-To: <1518439198.36.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: Eric Osborne added the comment: It is often useful to have non-decimal representations of IP addresses. Hex shows up a lot in sniffer traces, which is why I wanted to provide __index__, but that's not going to happen. I use binary a lot when teaching subnet masking and address summarization - if you line up bit patterns it's much easier to show how things lay out. It's easy enough to use bin(int(addr)) but that doesn't zero-pad the string it returns. I find myself doing something like In [23]: a Out[23]: IPv4Address('1.2.3.4') In [24]: x = bin(int(a))[2:] In [25]: full_x = '0b' + ('0' * (32-len(x)) + x) In [26]: full_x Out[26]: '0b00000001000000100000001100000100' Although, as Eric Smith has pointed out, there's a one liner way to do this. But if an IP address can represent itself as an integer (IMO the least useful form) it should have at least a binary representation, and lack of a seperate __bin__ means this is as close as I could get. eric On Mon, Feb 12, 2018 at 7:39 AM Christian Heimes wrote: > > Christian Heimes added the comment: > > I agree with Serhiy and Eric. It's a needless complication of the module. > What's the actual use case of printing a human readable bit representation > of an IP address? > > ---------- > nosy: +christian.heimes > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 08:39:55 2018 From: report at bugs.python.org (ChrisRands) Date: Mon, 12 Feb 2018 13:39:55 +0000 Subject: [issue32830] tkinter documentation suggests "from tkinter import *", contradicting PEP8 In-Reply-To: <1518439905.14.0.467229070634.issue32830@psf.upfronthosting.co.za> Message-ID: <1518442795.72.0.467229070634.issue32830@psf.upfronthosting.co.za> ChrisRands added the comment: Ok thanks both for the clarification! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 08:46:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Feb 2018 13:46:13 +0000 Subject: [issue32820] Add bits method to ipaddress In-Reply-To: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: <1518443173.12.0.467229070634.issue32820@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I wouldn't say that "0b00000000000000010000110110111000100001011010001100000000000000000000000000000000100010100010111000000011011100000111001100110100" is a very human readable. For more readability it is better to group digits by 4 or 8, and why not use hexadecimal then? In any case the application of this feature looks pretty narrow to me. And since it can be implemented as a one-line function, I think it shouldn't be added in the stdlib. The ipaddress classes are already complex. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 08:49:39 2018 From: report at bugs.python.org (Sergey B Kirpichev) Date: Mon, 12 Feb 2018 13:49:39 +0000 Subject: [issue32832] doctest should support custom ps1/ps2 prompts Message-ID: <1518443379.42.0.467229070634.issue32832@psf.upfronthosting.co.za> New submission from Sergey B Kirpichev : The Python stdlib allows override of sys.ps1/ps2 (to make IPython-like dynamic prompts and so on). I believe it would be a good idea to support this in doctest too, to cover cases when given application uses different from defaults settings for the interpreter. Probably, we could add ps1/2 optional arguments for DoctestParser.__init__(). Some projects already patch doctest module for this, e.g. IPython: https://github.com/ipython/ipython/blob/master/IPython/testing/plugin/ipdoctest.py It shouldn't be too hard to port this feature. ---------- components: Library (Lib) messages: 312053 nosy: Sergey.Kirpichev priority: normal severity: normal status: open title: doctest should support custom ps1/ps2 prompts _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 08:52:55 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Feb 2018 13:52:55 +0000 Subject: [issue32830] tkinter documentation suggests "from tkinter import *", contradicting PEP8 In-Reply-To: <1518439905.14.0.467229070634.issue32830@psf.upfronthosting.co.za> Message-ID: <1518443575.76.0.467229070634.issue32830@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I want to add that the star import is more convenient when you experiment with Tkinter in REPL. You don't know what names will be needed when import Tkinter. The interpreter core has a special support of Tkinter. You don't need to run mainloop() for updating GUI in REPL. So this is a supported case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 09:31:11 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 12 Feb 2018 14:31:11 +0000 Subject: [issue13319] IDLE: Menu accelerator conflict between Format and Options In-Reply-To: <1320195837.58.0.031082649983.issue13319@psf.upfronthosting.co.za> Message-ID: <1518445871.0.0.467229070634.issue13319@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Maybe a solution for this would be to change the name of the 'Format' menu to something like 'Source'? Interestingly, the Format menu is available on outwin, even though that is output-only, so I guess 'Source' would only make sense if the other uses of an EditorWindow remove it from the menu. ---------- nosy: +csabella versions: +Python 3.8 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 09:35:06 2018 From: report at bugs.python.org (Ma Lin) Date: Mon, 12 Feb 2018 14:35:06 +0000 Subject: [issue32818] multiprocessing segmentfault under Windows compatibility mode In-Reply-To: <1518323274.11.0.467229070634.issue32818@psf.upfronthosting.co.za> Message-ID: <1518446106.71.0.467229070634.issue32818@psf.upfronthosting.co.za> Ma Lin added the comment: segmentfault conditions: 64bit Windows + 32bit Python + Compatibility Mode enabled. some infomation: 1, 64bit Python doesn't segmentfault. 2, 3.7.0a3 is ok, 3.7.0a4 segmentfaults. 3, unrelated to Windows SDK, switch from 1709 SDK to 1703 SDK also segmentfaults. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 10:06:48 2018 From: report at bugs.python.org (R. David Murray) Date: Mon, 12 Feb 2018 15:06:48 +0000 Subject: [issue32828] compress "True if bool(x) else False" expressions In-Reply-To: <1518436467.62.0.467229070634.issue32828@psf.upfronthosting.co.za> Message-ID: <1518448008.39.0.467229070634.issue32828@psf.upfronthosting.co.za> R. David Murray added the comment: The one in generator.py should not be changed, it is clearer as written. I don't have a strong opinion on the others. ---------- nosy: +r.david.murray resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 10:07:34 2018 From: report at bugs.python.org (=?utf-8?q?Krzysztof_Leszczy=C5=84ski?=) Date: Mon, 12 Feb 2018 15:07:34 +0000 Subject: [issue32833] argparse doesn't recognise two option aliases as equal Message-ID: <1518448054.3.0.467229070634.issue32833@psf.upfronthosting.co.za> Change by Krzysztof Leszczy?ski : ---------- components: Library (Lib) nosy: Krzysztof Leszczy?ski priority: normal severity: normal status: open title: argparse doesn't recognise two option aliases as equal type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 10:09:55 2018 From: report at bugs.python.org (=?utf-8?q?Krzysztof_Leszczy=C5=84ski?=) Date: Mon, 12 Feb 2018 15:09:55 +0000 Subject: [issue32833] argparse doesn't recognise two option aliases as equal Message-ID: <1518448195.82.0.467229070634.issue32833@psf.upfronthosting.co.za> New submission from Krzysztof Leszczy?ski : Step to reproduce: import argparse ap=argparse.ArgumentParser() ap.add_argument("--a-b", "--ab") v1=ap.parse_args(["--ab", "xx"]) print(v1) # v1==Namespace(a_b='xx') v2=ap.parse_args(["--a", "xx"]) # v2 should be equal to v1 but instead it raises an error, in spite that --a-b and --ab are aliases ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 10:35:00 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 12 Feb 2018 15:35:00 +0000 Subject: [issue32826] idle test fails at least on the 3.6 branch In-Reply-To: <1518432203.1.0.467229070634.issue32826@psf.upfronthosting.co.za> Message-ID: <1518449700.3.0.467229070634.issue32826@psf.upfronthosting.co.za> Terry J. Reedy added the comment: What system? test_idle passes on Windows. Unfortunately, none of the *nix or Mac buildbots run tkinter and hence no tests that require a live tk window, and this one does. Cheryl, what do you see on your linux? Byte 0xc3 in position 1540 is the first byte of the utf-8 encoding of the '?' in L?wis on line 27 of CREDITS.txt. So on your system, readline must be reading *and decoding* more of the file. I am puzzled that the test fails now if it passed with the 3.6.4 release, as it and the textfile have not been touched since last summer. The files are the same on all 3 python versions. In any case, I will add encoding='utf-8'to open. I will also use subtest to identify failing cases. I will need you to verify the fix on your system. ---------- nosy: +csabella stage: -> needs patch type: -> behavior versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 10:56:00 2018 From: report at bugs.python.org (R. David Murray) Date: Mon, 12 Feb 2018 15:56:00 +0000 Subject: [issue32828] compress "True if bool(x) else False" expressions In-Reply-To: <1518436467.62.0.467229070634.issue32828@psf.upfronthosting.co.za> Message-ID: <1518450960.08.0.467229070634.issue32828@psf.upfronthosting.co.za> R. David Murray added the comment: Oops. I actually didn't intend to close this, but thinking about it I'm going to leave it closed. We generally don't do this kind of "tidy work" unless we are touching the code for other reasons. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 10:54:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Feb 2018 15:54:11 +0000 Subject: [issue32826] idle test fails at least on the 3.6 branch In-Reply-To: <1518432203.1.0.467229070634.issue32826@psf.upfronthosting.co.za> Message-ID: <1518450851.49.0.467229070634.issue32826@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The failure is reproduced on Posix locale. Files are open with bare open() which uses the locale encoding by default. Which is ASCII in this case. ---------- components: +Tests keywords: +easy nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 11:08:19 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 12 Feb 2018 16:08:19 +0000 Subject: [issue32826] idle test fails at least on the 3.6 branch In-Reply-To: <1518432203.1.0.467229070634.issue32826@psf.upfronthosting.co.za> Message-ID: <1518451699.98.0.467229070634.issue32826@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +5439 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 11:10:44 2018 From: report at bugs.python.org (Eric Osborne) Date: Mon, 12 Feb 2018 16:10:44 +0000 Subject: [issue32820] Add bits method to ipaddress In-Reply-To: <1518443173.12.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: Eric Osborne added the comment: IPv6 is nasty no matter how you do it (cf. https://tools.ietf.org/html/rfc1924). And the ipaddr library already has hex (packed()). Binary's not about direct readabilty, but about ease of comparison. It's much easier to show the reader '0b00000001000000100000001100000100' '0b00000001000000100000001100000011' '0b11111111111111111111111111111100' and have them figure out whether the mask contains both hosts than to show them '1.2.3.4' '1.2.3.3' '255.255.255.252' and ask them to convert to binary in their heads. Without the zero padding on the left, this is very easy to get wrong. But I certainly agree that this is somewhat niche and a convenience function, and if the consensus is that this is too narrow for stdlib, so be it. eric On Mon, Feb 12, 2018 at 8:46 AM Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > I wouldn't say that > "0b00000000000000010000110110111000100001011010001100000000000000000000000000000000100010100010111000000011011100000111001100110100" > is a very human readable. For more readability it is better to group digits > by 4 or 8, and why not use hexadecimal then? > > In any case the application of this feature looks pretty narrow to me. And > since it can be implemented as a one-line function, I think it shouldn't be > added in the stdlib. The ipaddress classes are already complex. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 12:12:20 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 12 Feb 2018 17:12:20 +0000 Subject: [issue29248] os.readlink fails on Windows In-Reply-To: <1484208560.98.0.375529555783.issue29248@psf.upfronthosting.co.za> Message-ID: <1518455539.99.0.467229070634.issue29248@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5440 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 12:15:20 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 12 Feb 2018 17:15:20 +0000 Subject: [issue32826] idle test fails at least on the 3.6 branch In-Reply-To: <1518432203.1.0.467229070634.issue32826@psf.upfronthosting.co.za> Message-ID: <1518455720.88.0.467229070634.issue32826@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I just discovered that the default for me is some version of latin1, not ascii, so that utf-8 '?' is read as '??'. Hence, no UnicodeDecodeError even if '?' is being read and decoded by the initial readline call. I presume the same is true on current Windows buildbots. Hence, it was a bug to not include an encoding in the test file open calls. (The widget itself *does* use explicit 'ascii' or 'utf-8' encodings for open().) ---------- components: -Tests stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 12:10:43 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 12 Feb 2018 17:10:43 +0000 Subject: [issue29248] os.readlink fails on Windows In-Reply-To: <1484208560.98.0.375529555783.issue29248@psf.upfronthosting.co.za> Message-ID: <1518455443.11.0.467229070634.issue29248@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 3c34aad4e7a95913ec7db8e5e948a8fc69047bf7 by Berker Peksag (SSE4) in branch 'master': bpo-29248: Fix os.readlink() on Windows (GH-5577) https://github.com/python/cpython/commit/3c34aad4e7a95913ec7db8e5e948a8fc69047bf7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 12:14:15 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 12 Feb 2018 17:14:15 +0000 Subject: [issue29248] os.readlink fails on Windows In-Reply-To: <1484208560.98.0.375529555783.issue29248@psf.upfronthosting.co.za> Message-ID: <1518455655.95.0.467229070634.issue29248@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 12:42:26 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 12 Feb 2018 17:42:26 +0000 Subject: [issue32826] idle test fails at least on the 3.6 branch In-Reply-To: <1518432203.1.0.467229070634.issue32826@psf.upfronthosting.co.za> Message-ID: <1518457346.76.0.467229070634.issue32826@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I've been able to run the IDLE test suite on Linux. As far as this issue, there's also a readline in test_textview that you may want to add the encoding to, even though it's only reading __file__. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 13:04:23 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 12 Feb 2018 18:04:23 +0000 Subject: [issue32826] idle test fails at least on the 3.6 branch In-Reply-To: <1518432203.1.0.467229070634.issue32826@psf.upfronthosting.co.za> Message-ID: <1518458663.93.0.467229070634.issue32826@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I reproduced the exact failure by temporarily replacing 'utf-8' with 'ascii' in my clone. So I don't need anyone else to verify the fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 13:14:10 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 12 Feb 2018 18:14:10 +0000 Subject: [issue29248] os.readlink fails on Windows In-Reply-To: <1484208560.98.0.375529555783.issue29248@psf.upfronthosting.co.za> Message-ID: <1518459250.81.0.467229070634.issue29248@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset a1d33f742515dc70ae99bc3ea1c851729522afc3 by Berker Peksag (Miss Islington (bot)) in branch '3.6': bpo-29248: Fix os.readlink() on Windows (GH-5577) https://github.com/python/cpython/commit/a1d33f742515dc70ae99bc3ea1c851729522afc3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 13:16:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Feb 2018 18:16:45 +0000 Subject: [issue30109] make reindent failed. In-Reply-To: <1492658256.6.0.028215188728.issue30109@psf.upfronthosting.co.za> Message-ID: <1518459405.41.0.467229070634.issue30109@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 17cec70a38b297779b8fd3f081fb041d45ae1dff by Serhiy Storchaka in branch '2.7': bpo-30109: Fix reindent.py for non-ASCII files. (#5637) https://github.com/python/cpython/commit/17cec70a38b297779b8fd3f081fb041d45ae1dff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 13:17:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Feb 2018 18:17:44 +0000 Subject: [issue30109] make reindent failed. In-Reply-To: <1492658256.6.0.028215188728.issue30109@psf.upfronthosting.co.za> Message-ID: <1518459464.16.0.467229070634.issue30109@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 Feb 12 14:43:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 12 Feb 2018 19:43:13 +0000 Subject: [issue32834] test_gdb fails with Posix locale in 3.7 Message-ID: <1518464593.71.0.467229070634.issue32834@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : $ LC_ALL=C ./python -We -m test -vuall -m test_strings test_gdb ... ====================================================================== FAIL: test_strings (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of unicode strings ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython3.7/Lib/test/test_gdb.py", line 331, in test_strings check_repr('\u2620') File "/home/serhiy/py/cpython3.7/Lib/test/test_gdb.py", line 323, in check_repr self.assertGdbRepr(text) File "/home/serhiy/py/cpython3.7/Lib/test/test_gdb.py", line 271, in assertGdbRepr % (gdb_repr, exp_repr, gdb_output))) AssertionError: "'\\u2620'" != "'?'" - '\u2620' + '?' : "'\\u2620'" did not equal expected "'?'"; full output was: Breakpoint 1 at 0x11a4df: file Python/bltinmodule.c, line 1215. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Breakpoint 1, builtin_id (self=self at entry=, v='\u2620') at Python/bltinmodule.c:1215 1215 { #0 builtin_id (self=, v='\u2620') at Python/bltinmodule.c:1215 ---------------------------------------------------------------------- This looks be related to PEP 538. ---------- messages: 312069 nosy: ncoghlan, serhiy.storchaka priority: normal severity: normal status: open title: test_gdb fails with Posix locale in 3.7 type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 14:44:51 2018 From: report at bugs.python.org (Jay Yin) Date: Mon, 12 Feb 2018 19:44:51 +0000 Subject: [issue32642] add support for path-like objects in sys.path In-Reply-To: <1516771632.94.0.467229070634.issue32642@psf.upfronthosting.co.za> Message-ID: <1518464691.42.0.467229070634.issue32642@psf.upfronthosting.co.za> Jay Yin added the comment: ok, so I found the PathFinder class you referenced, just making sure, this issue pertains to changing "self.path"'s usage and declaration to be a path-like object instead of the hard coded 'sys', 'path' returns? or is that part of it already?, also since this uses a tuple to keep track of the parent path, is there functionality in the path-like objects to find parent paths? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 14:47:50 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 12 Feb 2018 19:47:50 +0000 Subject: [issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong. In-Reply-To: <1512467694.45.0.213398074469.issue32221@psf.upfronthosting.co.za> Message-ID: <1518464870.79.0.467229070634.issue32221@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 7766b96ab80b04509bbac708ee5ecf3c1c5934fc by Yury Selivanov (????????? ????) in branch 'master': bpo-32221: makeipaddr(): remove interface part + speedup (GH-5449) (#5449) https://github.com/python/cpython/commit/7766b96ab80b04509bbac708ee5ecf3c1c5934fc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 14:48:07 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 12 Feb 2018 19:48:07 +0000 Subject: [issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong. In-Reply-To: <1512467694.45.0.213398074469.issue32221@psf.upfronthosting.co.za> Message-ID: <1518464887.58.0.467229070634.issue32221@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5441 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 14:51:22 2018 From: report at bugs.python.org (Jay Yin) Date: Mon, 12 Feb 2018 19:51:22 +0000 Subject: [issue32642] add support for path-like objects in sys.path In-Reply-To: <1516771632.94.0.467229070634.issue32642@psf.upfronthosting.co.za> Message-ID: <1518465082.88.0.467229070634.issue32642@psf.upfronthosting.co.za> Jay Yin added the comment: https://github.com/python/cpython/blob/3c34aad4e7a95913ec7db8e5e948a8fc69047bf7/Lib/importlib/_bootstrap_external.py#L1069-L1090 those are the particular class and lines I'm referring to ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 14:58:31 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 12 Feb 2018 19:58:31 +0000 Subject: [issue32826] idle test fails at least on the 3.6 branch In-Reply-To: <1518432203.1.0.467229070634.issue32826@psf.upfronthosting.co.za> Message-ID: <1518465511.56.0.467229070634.issue32826@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset f34e03ec0ea6a4cef8d966087c77e616c4a5893b by Terry Jan Reedy in branch 'master': bpo-32826: Add "encoding=utf-8" to open() in idle_test/test_help_about. (GH-5639) https://github.com/python/cpython/commit/f34e03ec0ea6a4cef8d966087c77e616c4a5893b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 14:58:34 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 12 Feb 2018 19:58:34 +0000 Subject: [issue32826] idle test fails at least on the 3.6 branch In-Reply-To: <1518432203.1.0.467229070634.issue32826@psf.upfronthosting.co.za> Message-ID: <1518465514.78.0.467229070634.issue32826@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5442 stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 14:59:35 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 12 Feb 2018 19:59:35 +0000 Subject: [issue32826] idle test fails at least on the 3.6 branch In-Reply-To: <1518432203.1.0.467229070634.issue32826@psf.upfronthosting.co.za> Message-ID: <1518465575.91.0.467229070634.issue32826@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5443 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 15:12:26 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 12 Feb 2018 20:12:26 +0000 Subject: [issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong. In-Reply-To: <1512467694.45.0.213398074469.issue32221@psf.upfronthosting.co.za> Message-ID: <1518466346.29.0.467229070634.issue32221@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 0442599961f966a3dc7f3fe6a3c0d5765fcf2082 by Yury Selivanov (Miss Islington (bot)) in branch '3.7': bpo-32221: makeipaddr(): remove interface part + speedup (GH-5449) (GH-5449) (#5641) https://github.com/python/cpython/commit/0442599961f966a3dc7f3fe6a3c0d5765fcf2082 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 15:12:56 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 12 Feb 2018 20:12:56 +0000 Subject: [issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong. In-Reply-To: <1512467694.45.0.213398074469.issue32221@psf.upfronthosting.co.za> Message-ID: <1518466376.85.0.467229070634.issue32221@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 Feb 12 15:35:00 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 12 Feb 2018 20:35:00 +0000 Subject: [issue32826] idle test fails at least on the 3.6 branch In-Reply-To: <1518432203.1.0.467229070634.issue32826@psf.upfronthosting.co.za> Message-ID: <1518467700.6.0.467229070634.issue32826@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 38b4dd7f83fbdce6fe970088cd89b80f074a13f6 by Miss Islington (bot) in branch '3.7': bpo-32826: Add "encoding=utf-8" to open() in idle_test/test_help_about. (GH-5639) https://github.com/python/cpython/commit/38b4dd7f83fbdce6fe970088cd89b80f074a13f6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 15:48:33 2018 From: report at bugs.python.org (Julien Palard) Date: Mon, 12 Feb 2018 20:48:33 +0000 Subject: [issue24665] CJK support for textwrap In-Reply-To: <1437276510.99.0.116072917153.issue24665@psf.upfronthosting.co.za> Message-ID: <1518468513.57.0.467229070634.issue24665@psf.upfronthosting.co.za> Julien Palard added the comment: I reread issue6755, issue12485, issue12499, and issue12568 about the textwrap/char width topic, and went to those conclusions: - It's a hard topic [1][2], so we may not succeed in a single shot. - The work is already done by wcwidth in the libc, which does not exists on windows and may not exist on MacOS. - The work is already partially done for CJK in the Unicode standard. So I'm OK with adding CJK support to textwrap *as a first step*, which means I'm *not* ok with the CJK parameter to the wrap function, as maybe in the future we'll do more. I'm also not OK with this being not the default, as many code using textwrap do not know in advance if they need CJK, they should not care, it should be done right by default. But having CJK support by default also mean we'll have to fallback silently to a non-unicode textwrap if unicodedata is not available, as Victor said in PR-89 "Python requires optparse to compile modules like unicodedata, optparse imports textwrap which now always requires unicodedata", which may or may not lead to surprising behavior. [1] The unicode standard is not clear about character width (not its role, font dependent), only where it's OK to put the line break. [2] CJK is not enough, there's plenty of other characters of width not equal to one, like combining characters, tabulations, non-printables, Prepended_Concatenation_Mark having a typical width of zero but sometimes 1, U+00AD being tricky, Hangul Jamo medial vowels and final consonants are "conjoining", and so on... this need a huge effort / attention, this if we're going down this hole it means a lot of maintenance / new issues about this or that character being reported with the "wrong" size. ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 15:56:22 2018 From: report at bugs.python.org (Fangyi Zhou) Date: Mon, 12 Feb 2018 20:56:22 +0000 Subject: [issue32731] getpass.getuser() raises an unspecified exceptions (ImportError, OSError, etc) In-Reply-To: <1517421752.06.0.467229070634.issue32731@psf.upfronthosting.co.za> Message-ID: <1518468982.09.0.467229070634.issue32731@psf.upfronthosting.co.za> Fangyi Zhou added the comment: Hi. I've updated the docs. I'm wondering if the code needs to be patched as well. Essentially we should raise a unified Exception for unable to get the username I suppose? Please let me know if you have any comments/suggestions on wording. Thanks. ---------- nosy: +fangyizhou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 16:02:09 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 12 Feb 2018 21:02:09 +0000 Subject: [issue29248] os.readlink fails on Windows In-Reply-To: <1484208560.98.0.375529555783.issue29248@psf.upfronthosting.co.za> Message-ID: <1518469329.85.0.467229070634.issue29248@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5445 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 15:53:53 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 12 Feb 2018 20:53:53 +0000 Subject: [issue32826] idle test fails at least on the 3.6 branch In-Reply-To: <1518432203.1.0.467229070634.issue32826@psf.upfronthosting.co.za> Message-ID: <1518468833.01.0.467229070634.issue32826@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 46daf39453023767eef3b6876d4a34996e124397 by Miss Islington (bot) in branch '3.6': bpo-32826: Add "encoding=utf-8" to open() in idle_test/test_help_about. (GH-5639) https://github.com/python/cpython/commit/46daf39453023767eef3b6876d4a34996e124397 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 16:12:23 2018 From: report at bugs.python.org (Jay Yin) Date: Mon, 12 Feb 2018 21:12:23 +0000 Subject: [issue32835] Add documention mentioning that Cygwin isn't fully compatible Message-ID: <1518469943.71.0.467229070634.issue32835@psf.upfronthosting.co.za> New submission from Jay Yin : I didn't find any documentation stating that Cygwin isn't currently compatible with building, I was wondering if it would be good to add documentation stating this and that it would be an area requiring help. ---------- assignee: docs at python components: Documentation messages: 312080 nosy: docs at python, jayyin11043 priority: normal severity: normal status: open title: Add documention mentioning that Cygwin isn't fully compatible 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 Feb 12 16:33:51 2018 From: report at bugs.python.org (Martijn Pieters) Date: Mon, 12 Feb 2018 21:33:51 +0000 Subject: [issue32836] Symbol table for comprehensions (list, dict, set) still includes temporary _[1] variable Message-ID: <1518471231.56.0.467229070634.issue32836@psf.upfronthosting.co.za> New submission from Martijn Pieters : In Python 2.6, a list comprehension was implemented in the current scope using a temporary _[1] variable to hold the list object: >>> import dis >>> dis.dis(compile('[x for x in y]', '?', 'exec')) 1 0 BUILD_LIST 0 3 DUP_TOP 4 STORE_NAME 0 (_[1]) 7 LOAD_NAME 1 (y) 10 GET_ITER >> 11 FOR_ITER 13 (to 27) 14 STORE_NAME 2 (x) 17 LOAD_NAME 0 (_[1]) 20 LOAD_NAME 2 (x) 23 LIST_APPEND 24 JUMP_ABSOLUTE 11 >> 27 DELETE_NAME 0 (_[1]) 30 POP_TOP 31 LOAD_CONST 0 (None) 34 RETURN_VALUE Nick Cochlan moved comprehensions into a separate scope in #1660500, and removed the need for a temporary variable in the process (the list / dict / set lives only on the stack). However, the symbol table generates the _[1] name: >>> import symtable >>> symtable.symtable('[x for x in y]', '?', 'exec').get_children()[0].get_symbols() [, , ] Can this be dropped? I think all temporary variable handling can be ripped out. ---------- messages: 312081 nosy: mjpieters priority: normal severity: normal status: open title: Symbol table for comprehensions (list, dict, set) still includes temporary _[1] variable _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 16:16:18 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 12 Feb 2018 21:16:18 +0000 Subject: [issue32835] Add documention mentioning that Cygwin isn't fully compatible In-Reply-To: <1518469943.71.0.467229070634.issue32835@psf.upfronthosting.co.za> Message-ID: <1518470178.94.0.467229070634.issue32835@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- keywords: +easy stage: -> needs patch type: -> enhancement versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 16:39:47 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 12 Feb 2018 21:39:47 +0000 Subject: [issue29248] os.readlink fails on Windows In-Reply-To: <1484208560.98.0.375529555783.issue29248@psf.upfronthosting.co.za> Message-ID: <1518471587.78.0.467229070634.issue29248@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 74ebbaeb566dc10031756430ec5c896e56d0e491 by Miss Islington (bot) in branch '3.7': bpo-29248: Fix os.readlink() on Windows (GH-5577) https://github.com/python/cpython/commit/74ebbaeb566dc10031756430ec5c896e56d0e491 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 16:56:46 2018 From: report at bugs.python.org (R. David Murray) Date: Mon, 12 Feb 2018 21:56:46 +0000 Subject: [issue32835] Add documention mentioning that Cygwin isn't fully compatible In-Reply-To: <1518469943.71.0.467229070634.issue32835@psf.upfronthosting.co.za> Message-ID: <1518472606.53.0.467229070634.issue32835@psf.upfronthosting.co.za> R. David Murray added the comment: We don't (can't) document everything we're *not* compatible with, we can only realisticly document what we support. I thought we did that, but all I can find at the moment is PEP 11, which you are correct, does not list cygwin as a no-longer-supported platform (although we'd like to support it, see the many issues in this tracker about it). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 17:00:10 2018 From: report at bugs.python.org (Jay Yin) Date: Mon, 12 Feb 2018 22:00:10 +0000 Subject: [issue32835] Add documention mentioning that Cygwin isn't fully compatible In-Reply-To: <1518469943.71.0.467229070634.issue32835@psf.upfronthosting.co.za> Message-ID: <1518472810.31.0.467229070634.issue32835@psf.upfronthosting.co.za> Jay Yin added the comment: ah I see, hence the *currently* incompatible, there must be some way of tracking areas in need of help without having to use the search, kind of like the way Github uses labels. ---------- type: enhancement -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 17:01:41 2018 From: report at bugs.python.org (Roundup Robot) Date: Mon, 12 Feb 2018 22:01:41 +0000 Subject: [issue32779] urljoining an empty query string doesn't clear query string In-Reply-To: <1517892529.44.0.467229070634.issue32779@psf.upfronthosting.co.za> Message-ID: <1518472901.37.0.467229070634.issue32779@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +5446 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 17:02:47 2018 From: report at bugs.python.org (paul j3) Date: Mon, 12 Feb 2018 22:02:47 +0000 Subject: [issue32833] argparse doesn't recognise two option aliases as equal In-Reply-To: <1518448195.82.0.467229070634.issue32833@psf.upfronthosting.co.za> Message-ID: <1518472967.5.0.467229070634.issue32833@psf.upfronthosting.co.za> Change by paul j3 : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 17:04:54 2018 From: report at bugs.python.org (paul j3) Date: Mon, 12 Feb 2018 22:04:54 +0000 Subject: [issue32756] argparse: parse_known_args: raising exception on unknown arg following known one In-Reply-To: <1517661104.06.0.467229070634.issue32756@psf.upfronthosting.co.za> Message-ID: <1518473093.99.0.467229070634.issue32756@psf.upfronthosting.co.za> Change by paul j3 : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 17:07:39 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 12 Feb 2018 22:07:39 +0000 Subject: [issue32837] IDLE: require encoding argument for textview.view_file Message-ID: <1518473259.79.0.467229070634.issue32837@psf.upfronthosting.co.za> New submission from Terry J. Reedy : Built-in open has an encoding parameter whose default value depends on the system: 'ascii' for some POSIX locales; 'latin1' or similar for most Windows sold in the USA or western Europe; and ???. In idlelib.textview, the signature for view_file currently includes 'encoding=None'. There have been 2 issues, #32826 and another, about tests using the default failing because of 'L?wis' on line 27 of CREDITS.txt. It therefore seems an error for a global cross-platform application to use the default encoding. To prevent this, we should remove '=None' from the encoding part of the view_file definition and make view_file calls explicitly pass an encoding. For IDLE itself, this will be 'ascii' or 'utf-8'. This expands upon a note by Cheryl Sabella in #32826 about one of the three calls that fail with the change until fixed. I will not default to 'utf-8' because 'ascii' catches erroneous non-ascii characters in ascii-only files. For instance, a draft of README.txt was prepared with an editor that replaced ascii " and " with left and right quotes. I will not restricting the encoding otherwise because there might be external uses of the file that use other encodings. PR to follow as soon as I get bpo number. ---------- assignee: terry.reedy components: IDLE messages: 312085 nosy: terry.reedy priority: normal severity: normal stage: commit review status: open title: IDLE: require encoding argument for textview.view_file type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 17:18:05 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 12 Feb 2018 22:18:05 +0000 Subject: [issue32837] IDLE: require encoding argument for textview.view_file In-Reply-To: <1518473259.79.0.467229070634.issue32837@psf.upfronthosting.co.za> Message-ID: <1518473885.79.0.467229070634.issue32837@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +5447 stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 17:28:44 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 12 Feb 2018 22:28:44 +0000 Subject: [issue32826] idle test fails at least on the 3.6 branch In-Reply-To: <1518432203.1.0.467229070634.issue32826@psf.upfronthosting.co.za> Message-ID: <1518474524.21.0.467229070634.issue32826@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Serhiy, thanks for comment and review. Cheryl, #32837 expands upon your comment. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 17:42:44 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 12 Feb 2018 22:42:44 +0000 Subject: [issue32837] IDLE: require encoding argument for textview.view_file In-Reply-To: <1518473259.79.0.467229070634.issue32837@psf.upfronthosting.co.za> Message-ID: <1518475364.09.0.467229070634.issue32837@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 688722cedd6437910ff185ecf94fb3b749ad37f2 by Terry Jan Reedy in branch 'master': bpo-32837: IDLE - require encoding argument for textview.view_file. (GH-5646) https://github.com/python/cpython/commit/688722cedd6437910ff185ecf94fb3b749ad37f2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 17:43:55 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 12 Feb 2018 22:43:55 +0000 Subject: [issue32837] IDLE: require encoding argument for textview.view_file In-Reply-To: <1518473259.79.0.467229070634.issue32837@psf.upfronthosting.co.za> Message-ID: <1518475435.65.0.467229070634.issue32837@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5448 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 17:44:50 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 12 Feb 2018 22:44:50 +0000 Subject: [issue32837] IDLE: require encoding argument for textview.view_file In-Reply-To: <1518473259.79.0.467229070634.issue32837@psf.upfronthosting.co.za> Message-ID: <1518475490.3.0.467229070634.issue32837@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5449 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 17:47:00 2018 From: report at bugs.python.org (Berker Peksag) Date: Mon, 12 Feb 2018 22:47:00 +0000 Subject: [issue29248] os.readlink fails on Windows In-Reply-To: <1484208560.98.0.375529555783.issue29248@psf.upfronthosting.co.za> Message-ID: <1518475620.93.0.467229070634.issue29248@psf.upfronthosting.co.za> Berker Peksag added the comment: Thank you, Craig and SSE4. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 18:15:05 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 12 Feb 2018 23:15:05 +0000 Subject: [issue32837] IDLE: require encoding argument for textview.view_file In-Reply-To: <1518473259.79.0.467229070634.issue32837@psf.upfronthosting.co.za> Message-ID: <1518477305.05.0.467229070634.issue32837@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 65c32bbe85862ab5eb52a0d4340e844e13d0f7ee by Miss Islington (bot) in branch '3.7': bpo-32837: IDLE - require encoding argument for textview.view_file. (GH-5646) https://github.com/python/cpython/commit/65c32bbe85862ab5eb52a0d4340e844e13d0f7ee ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 18:40:14 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 12 Feb 2018 23:40:14 +0000 Subject: [issue32837] IDLE: require encoding argument for textview.view_file In-Reply-To: <1518473259.79.0.467229070634.issue32837@psf.upfronthosting.co.za> Message-ID: <1518478814.76.0.467229070634.issue32837@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 9fad857444d90b9c6c36c31f5f07e57f390a70f2 by Miss Islington (bot) in branch '3.6': bpo-32837: IDLE - require encoding argument for textview.view_file. (GH-5646) https://github.com/python/cpython/commit/9fad857444d90b9c6c36c31f5f07e57f390a70f2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 20:07:41 2018 From: report at bugs.python.org (Julien Palard) Date: Tue, 13 Feb 2018 01:07:41 +0000 Subject: [issue24665] CJK support for textwrap In-Reply-To: <1437276510.99.0.116072917153.issue24665@psf.upfronthosting.co.za> Message-ID: <1518484061.41.0.467229070634.issue24665@psf.upfronthosting.co.za> Change by Julien Palard : ---------- pull_requests: +5450 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 20:07:48 2018 From: report at bugs.python.org (Julien Palard) Date: Tue, 13 Feb 2018 01:07:48 +0000 Subject: [issue24665] CJK support for textwrap In-Reply-To: <1437276510.99.0.116072917153.issue24665@psf.upfronthosting.co.za> Message-ID: <1518484068.62.0.467229070634.issue24665@psf.upfronthosting.co.za> Change by Julien Palard : ---------- pull_requests: +5450, 5451 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 20:32:14 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Tue, 13 Feb 2018 01:32:14 +0000 Subject: [issue32833] argparse doesn't recognise two option aliases as equal In-Reply-To: <1518448195.82.0.467229070634.issue32833@psf.upfronthosting.co.za> Message-ID: <1518485534.7.0.467229070634.issue32833@psf.upfronthosting.co.za> Josh Rosenberg added the comment: To be clear, the specific error is: error: ambiguous option: --a could match --a-b, --ab which makes sense if they're separate switches, but doesn't make sense when both expansions are aliases of one another. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 20:34:55 2018 From: report at bugs.python.org (ruffsl) Date: Tue, 13 Feb 2018 01:34:55 +0000 Subject: [issue20928] xml.etree.ElementInclude does not include nested xincludes In-Reply-To: <1394829606.55.0.5394943571.issue20928@psf.upfronthosting.co.za> Message-ID: <1518485695.22.0.467229070634.issue20928@psf.upfronthosting.co.za> ruffsl added the comment: I see it's been a few years, but I would still like to see xml.etree.ElementInclude support nested xincludes, as lxml does. Additionally, I'd like to have the default_loader attempt to open the href with respect to the original xml file's dirname, as again with lxml, as opposed to just assuming its relative to the working directory for the session. Let me know if there are any changes you'd like to see in the latest patch here, and I could incorporate those into a new PR? ---------- nosy: +ruffsl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 21:15:05 2018 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 13 Feb 2018 02:15:05 +0000 Subject: [issue32820] Add bits method to ipaddress In-Reply-To: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: <1518488105.02.0.467229070634.issue32820@psf.upfronthosting.co.za> Nick Coghlan added the comment: I think the aspect that makes this potentially worthy of a helper function is the need to dynamically adjust the field width based on whether you're printing an IPv4 address or an IPv6 one, whether you're printing it in binary or hexadecimal, whether you're printing separator characters, and whether you're printing the base indicator prefix. For example, consider the following: ``` >>> ip4 = ipaddress.ip_address("1.2.3.4") >>> ip4 IPv4Address('1.2.3.4') >>> ip6 = ipaddress.ip_address("::1:2:3:4") >>> ip6 IPv6Address('::1:2:3:4') >>> format(int(ip4), "#041_b") '0b0000_0001_0000_0010_0000_0011_0000_0100' >>> format(int(ip6), "#041_x") '0x0000_0000_0000_0000_0001_0002_0003_0004' ``` The "41" in those examples comes from "prefix_len + (num_bits / bits_per_char) + (num_bits / bits_per_char / chars_per_separator) - 1": IPv4 in binary: 2 + (32 / 1) + (32 / 1 / 4) - 1 = 2 + 32 + 8 - 1 = 41 IPv6 in hex: 2 + (128 / 4) + (128 / 1 / 4) - 1 = 2 + 32 + 8 - 1 = 41 So I think the potentially interesting method to implement here would be *__format__*, such that the field width calculation could be made implicit based on the other options selected. While backwards compatibility means that IP address formatting would still need to be equivalent to "str(ip)" by default, it would be reasonably straightforward to make "format(ip, 'b')" output the number in binary, "format(ip, 'x')" do it in hex, and "format(ip, 'n')" be equivalent to "b" for IPv4 addresses, and "x" for IPv6 ones. Unlike ordinary numbers, the IP addresses would always be zero-padded to a fixed width (32-bits for IPv4, 128 bits for IPv6), but "#" and "_" would be accepted to indicate whether or to add the base indicator prefix and/or group separators. Given those enhancements, the display examples above would become: ``` >>> format(ip4, "#_n") '0b0000_0001_0000_0010_0000_0011_0000_0100' >>> format(ip6, "#_n") '0x0000_0000_0000_0000_0001_0002_0003_0004' ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 21:26:33 2018 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 13 Feb 2018 02:26:33 +0000 Subject: [issue32827] Fix incorrect usage of _PyUnicodeWriter_Prepare() In-Reply-To: <1518436023.7.0.467229070634.issue32827@psf.upfronthosting.co.za> Message-ID: <1518488793.76.0.467229070634.issue32827@psf.upfronthosting.co.za> Xiang Zhang added the comment: Nice. The only question I have is this is a bugfix or enhancement? Current code seems won't cause any problem but just allocates more memory than needed. ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 21:33:33 2018 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 13 Feb 2018 02:33:33 +0000 Subject: [issue32834] test_gdb fails with Posix locale in 3.7 In-Reply-To: <1518464593.71.0.467229070634.issue32834@psf.upfronthosting.co.za> Message-ID: <1518489213.13.0.467229070634.issue32834@psf.upfronthosting.co.za> Nick Coghlan added the comment: I can reproduce this, but it looks to me like it's being triggered by UTF-8 mode rather than locale coercion (the "LC_ALL=C" setting will implicitly disable locale coercion entirely): ``` $ LANG=C PYTHONCOERCECLOCALE=warn ./python -We -m test -uall -m test_strings test_gdb Python detected LC_CTYPE=C: LC_CTYPE coerced to C.UTF-8 (set another locale or PYTHONCOERCECLOCALE=0 to disable this locale coercion behavior). Run tests sequentially 0:00:00 load avg: 0.34 [1/1] test_gdb 1 test OK. Total duration: 2 sec Tests result: SUCCESS $ LC_ALL=C PYTHONUTF8=0 ./python -We -m test -uall -m test_strings test_gdb Run tests sequentially 0:00:00 load avg: 0.17 [1/1] test_gdb 1 test OK. Total duration: 2 sec Tests result: SUCCESS ``` I expect the fix will be to adjust test_gdb's expectations in this case, as there's going to be a genuine difference between gdb's locale dependent behaviour and Python's UTF-8 mode behaviour. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 21:48:16 2018 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 13 Feb 2018 02:48:16 +0000 Subject: [issue20632] Define a new __key__ protocol In-Reply-To: <1392423475.26.0.500398402328.issue20632@psf.upfronthosting.co.za> Message-ID: <1518490096.34.0.467229070634.issue20632@psf.upfronthosting.co.za> Nick Coghlan added the comment: For now, I'm going to close this as "out of date", with the guidance being "Define a data class instead" (since that gets rid of the historical boilerplate a different way: auto-generating suitable methods based on the field declarations). If somebody comes up with a use case for this protocol idea that isn't adequately covered by data classes, then they can bring it up on python-ideas, and we can look at revisiting the question. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 22:01:36 2018 From: report at bugs.python.org (paul j3) Date: Tue, 13 Feb 2018 03:01:36 +0000 Subject: [issue32833] argparse doesn't recognise two option aliases as equal In-Reply-To: <1518448195.82.0.467229070634.issue32833@psf.upfronthosting.co.za> Message-ID: <1518490896.17.0.467229070634.issue32833@psf.upfronthosting.co.za> paul j3 added the comment: Subparsers have aliases, argument option strings don't, at least not formally. Once an argument is added, its flags are entered in several lists. One list belongs to the Action itself, another belongs to the parser (it might actually be a dictionary). The code could check that '--a-b' and '--ab' belong to the same Action, but I suspect it doesn't, at least not at the point where it is checking for ambiguity. We can look at the code to verify this. It is also entirely likely that this issue has already been raised. There are other issues regarding how it checks for abbreviations (and how to disable abbreviations). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 22:32:56 2018 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 13 Feb 2018 03:32:56 +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: <1518492776.21.0.467229070634.issue32798@psf.upfronthosting.co.za> Xiang Zhang added the comment: One thing to note is the behaviour seems fit implementation detail. POSIX doesn't requires this for both mmap and msync, it's optional: The mmap( ) function may fail if: [EINVAL] The addr argument (if MAP_FIXED was specified) or off is not a multiple of the page size as returned The msync( ) function may fail if: [EINVAL] The value of addr is not a multiple of the page size as returned by sysconf( ). ---------- nosy: +berker.peksag, pablogsal, xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 22:37:14 2018 From: report at bugs.python.org (paul j3) Date: Tue, 13 Feb 2018 03:37:14 +0000 Subject: [issue32833] argparse doesn't recognise two option aliases as equal In-Reply-To: <1518448195.82.0.467229070634.issue32833@psf.upfronthosting.co.za> Message-ID: <1518493034.15.0.467229070634.issue32833@psf.upfronthosting.co.za> paul j3 added the comment: When I run your setup in ipython, I see a display of the newly added Action: Out[2]: _StoreAction(option_strings=['--a-b', '--ab'], dest='a_b', nargs=None, const=None, default=None, type=None, choices=None, help=None, metavar=None) Note the 'option_strings' list. This strings are also entered as keys in a parser dictionary: In [6]: list(ap._option_string_actions.keys()) Out[6]: ['--a-b', '--help', '--ab', '-h'] The values are the corresponding Actions, in this case the default 'help' one, and the newly added 'StoreAction'. So the parser can only tell if two keys are 'aliases' by checking for matching values. The abbreviation ambiguity error is raised in 'parser._parse_optional'. If 'ap.allow_abbrev' is does ap._get_option_tuples('--a') and raises the error if this returns more than one Action. It does not check whether the multiple actions has the same ID. I suppose it could, but it doesn't. The option string is passed to the Action.__call__: def __call__(self, parser, namespace, values, option_string=None): setattr(namespace, self.dest, values) None of the defined Action subclasses makes use of the this 'option_string' parameter (that I recall). But I can easily imagine writing a custom Action class that does make use of this parameter. Are aliases like this needed? Seems they just clutter the help: usage: ipython3 [-h] [--a-b A_B] optional arguments: -h, --help show this help message and exit --a-b A_B, --ab A_B The clutter will be more obvious with longer realistic flags. Here the aliases end up disabling the '--a' abbreviation. '--a-' still works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 23:12:06 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Tue, 13 Feb 2018 04:12:06 +0000 Subject: [issue20632] Define a new __key__ protocol In-Reply-To: <1392423475.26.0.500398402328.issue20632@psf.upfronthosting.co.za> Message-ID: <1518495126.84.0.467229070634.issue20632@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Do data classes let you define some fields as being excluded from the equality/ordering/hashing? I got the impression that if a field existed, it was part of the "key" no matter what, which isn't necessarily correct in the general case. Simple examples would be attributes that equivalent C++ would tag with the mutable keyword; they're not part of the logical state of the instance (e.g. debugging counters or whatever), so they shouldn't be included in the "key". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 12 23:17:33 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Tue, 13 Feb 2018 04:17:33 +0000 Subject: [issue20632] Define a new __key__ protocol In-Reply-To: <1392423475.26.0.500398402328.issue20632@psf.upfronthosting.co.za> Message-ID: <1518495453.66.0.467229070634.issue20632@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Ah, never mind. Looks like dataclasses.InitVar fields seem to be the answer to excluding a field from the auto-generated methods. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 01:26:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 13 Feb 2018 06:26:43 +0000 Subject: [issue32827] Fix incorrect usage of _PyUnicodeWriter_Prepare() In-Reply-To: <1518436023.7.0.467229070634.issue32827@psf.upfronthosting.co.za> Message-ID: <1518503203.03.0.467229070634.issue32827@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think this is a bugfix and should be backported. This is why I made a separate PR rather of suggesting changes to PR 660. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 01:27:36 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 13 Feb 2018 06:27:36 +0000 Subject: [issue32827] Fix incorrect usage of _PyUnicodeWriter_Prepare() In-Reply-To: <1518436023.7.0.467229070634.issue32827@psf.upfronthosting.co.za> Message-ID: <1518503256.11.0.467229070634.issue32827@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset b7e2d67f7c035f09c921ca4e7a36529cd502ccf7 by Serhiy Storchaka in branch 'master': bpo-32827: Fix usage of _PyUnicodeWriter_Prepare() in decoding errors handler. (GH-5636) https://github.com/python/cpython/commit/b7e2d67f7c035f09c921ca4e7a36529cd502ccf7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 01:28:23 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 13 Feb 2018 06:28:23 +0000 Subject: [issue32837] IDLE: require encoding argument for textview.view_file In-Reply-To: <1518473259.79.0.467229070634.issue32837@psf.upfronthosting.co.za> Message-ID: <1518503303.93.0.467229070634.issue32837@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 01:28:48 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 13 Feb 2018 06:28:48 +0000 Subject: [issue32827] Fix incorrect usage of _PyUnicodeWriter_Prepare() In-Reply-To: <1518436023.7.0.467229070634.issue32827@psf.upfronthosting.co.za> Message-ID: <1518503328.44.0.467229070634.issue32827@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5452 stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 01:29:45 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 13 Feb 2018 06:29:45 +0000 Subject: [issue32827] Fix incorrect usage of _PyUnicodeWriter_Prepare() In-Reply-To: <1518436023.7.0.467229070634.issue32827@psf.upfronthosting.co.za> Message-ID: <1518503385.94.0.467229070634.issue32827@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5453 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 01:29:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 13 Feb 2018 06:29:57 +0000 Subject: [issue32370] Wrong ANSI encoding used by subprocess for some locales In-Reply-To: <1513643091.19.0.213398074469.issue32370@psf.upfronthosting.co.za> Message-ID: <1518503397.6.0.467229070634.issue32370@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset da6c3da6c33c6bf794f741e348b9c6d86cc43ec5 by Serhiy Storchaka (Segev Finer) in branch 'master': bpo-32370: Use the correct encoding for ipconfig output in the uuid module. (GH-5608) https://github.com/python/cpython/commit/da6c3da6c33c6bf794f741e348b9c6d86cc43ec5 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 01:31:02 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 13 Feb 2018 06:31:02 +0000 Subject: [issue32370] Wrong ANSI encoding used by subprocess for some locales In-Reply-To: <1513643091.19.0.213398074469.issue32370@psf.upfronthosting.co.za> Message-ID: <1518503462.51.0.467229070634.issue32370@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5454 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 02:15:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 13 Feb 2018 07:15:59 +0000 Subject: [issue32827] Fix incorrect usage of _PyUnicodeWriter_Prepare() In-Reply-To: <1518436023.7.0.467229070634.issue32827@psf.upfronthosting.co.za> Message-ID: <1518506159.88.0.467229070634.issue32827@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 09819ef05a9a1b13321b56c09f48ca45b46e8656 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.7': bpo-32827: Fix usage of _PyUnicodeWriter_Prepare() in decoding errors handler. (GH-5636) (GH-5650) https://github.com/python/cpython/commit/09819ef05a9a1b13321b56c09f48ca45b46e8656 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 02:16:20 2018 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 13 Feb 2018 07:16:20 +0000 Subject: [issue30579] Allow traceback objects to be instantiated/mutated/annotated In-Reply-To: <1496720513.53.0.619437315354.issue30579@psf.upfronthosting.co.za> Message-ID: <1518506180.65.0.467229070634.issue30579@psf.upfronthosting.co.za> Change by Nick Coghlan : ---------- pull_requests: +5455 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 02:24:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 13 Feb 2018 07:24:44 +0000 Subject: [issue32370] Wrong ANSI encoding used by subprocess for some locales In-Reply-To: <1513643091.19.0.213398074469.issue32370@psf.upfronthosting.co.za> Message-ID: <1518506684.41.0.467229070634.issue32370@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +5456 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 02:27:18 2018 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 13 Feb 2018 07:27:18 +0000 Subject: [issue20632] Define a new __key__ protocol In-Reply-To: <1392423475.26.0.500398402328.issue20632@psf.upfronthosting.co.za> Message-ID: <1518506838.11.0.467229070634.issue20632@psf.upfronthosting.co.za> Nick Coghlan added the comment: It isn't InitVar that you want for that use case (that's just for passing extra information to __post_init__). Instead, you want: extra_field = field(compare=False): int # Excluded from __hash__, __eq_, etc You can also exclude a field from __hash__, but keep it in the comparison methods: unhashed_field = field(hash=False): int # Excluded from __hash__ only ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 02:35:21 2018 From: report at bugs.python.org (Nitish) Date: Tue, 13 Feb 2018 07:35:21 +0000 Subject: [issue32836] Symbol table for comprehensions (list, dict, set) still includes temporary _[1] variable In-Reply-To: <1518471231.56.0.467229070634.issue32836@psf.upfronthosting.co.za> Message-ID: <1518507321.53.0.467229070634.issue32836@psf.upfronthosting.co.za> Change by Nitish : ---------- nosy: +nitishch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 03:11:01 2018 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 13 Feb 2018 08:11:01 +0000 Subject: [issue30579] Allow traceback objects to be instantiated/mutated/annotated In-Reply-To: <1496720513.53.0.619437315354.issue30579@psf.upfronthosting.co.za> Message-ID: <1518509461.61.0.467229070634.issue30579@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset aec7532ed3ccbd29d3429a3f375e25f956c44003 by Nick Coghlan in branch 'master': bpo-30579: Docs for dynamic traceback creation (GH-5653) https://github.com/python/cpython/commit/aec7532ed3ccbd29d3429a3f375e25f956c44003 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 03:12:09 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 13 Feb 2018 08:12:09 +0000 Subject: [issue30579] Allow traceback objects to be instantiated/mutated/annotated In-Reply-To: <1496720513.53.0.619437315354.issue30579@psf.upfronthosting.co.za> Message-ID: <1518509529.65.0.467229070634.issue30579@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5457 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 03:22:54 2018 From: report at bugs.python.org (Ma Lin) Date: Tue, 13 Feb 2018 08:22:54 +0000 Subject: [issue32818] multiprocessing segmentfault under Windows compatibility mode In-Reply-To: <1518323274.11.0.467229070634.issue32818@psf.upfronthosting.co.za> Message-ID: <1518510174.42.0.467229070634.issue32818@psf.upfronthosting.co.za> Ma Lin added the comment: Git bisect says this is the first bad commit: https://github.com/python/cpython/commit/b2a6083eb0384f38839d3f1ed32262a3852026fa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 03:53:45 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 13 Feb 2018 08:53:45 +0000 Subject: [issue30579] Allow traceback objects to be instantiated/mutated/annotated In-Reply-To: <1496720513.53.0.619437315354.issue30579@psf.upfronthosting.co.za> Message-ID: <1518512025.65.0.467229070634.issue30579@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 53374cc57f33f1afb22924da3a76ec6cf9e4afc1 by Miss Islington (bot) in branch '3.7': bpo-30579: Docs for dynamic traceback creation (GH-5653) https://github.com/python/cpython/commit/53374cc57f33f1afb22924da3a76ec6cf9e4afc1 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 03:58:30 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 13 Feb 2018 08:58:30 +0000 Subject: [issue32370] Wrong ANSI encoding used by subprocess for some locales In-Reply-To: <1513643091.19.0.213398074469.issue32370@psf.upfronthosting.co.za> Message-ID: <1518512310.29.0.467229070634.issue32370@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 9b5a90b975ef32b261d60b8ec06504f4ffd00d63 by Miss Islington (bot) in branch '3.7': bpo-32370: Use the correct encoding for ipconfig output in the uuid module. (GH-5608) https://github.com/python/cpython/commit/9b5a90b975ef32b261d60b8ec06504f4ffd00d63 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 04:02:24 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 13 Feb 2018 09:02:24 +0000 Subject: [issue32827] Fix incorrect usage of _PyUnicodeWriter_Prepare() In-Reply-To: <1518436023.7.0.467229070634.issue32827@psf.upfronthosting.co.za> Message-ID: <1518512544.57.0.467229070634.issue32827@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5458 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 04:15:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 13 Feb 2018 09:15:26 +0000 Subject: [issue32370] Wrong ANSI encoding used by subprocess for some locales In-Reply-To: <1513643091.19.0.213398074469.issue32370@psf.upfronthosting.co.za> Message-ID: <1518513326.24.0.467229070634.issue32370@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c3f9d7e0ea30e94c901d13e1d43ff0be1e5dbcb7 by Serhiy Storchaka in branch '3.6': [3.6] bpo-32370: Use the correct encoding for ipconfig output in the uuid module. (GH-5608). (#5654) https://github.com/python/cpython/commit/c3f9d7e0ea30e94c901d13e1d43ff0be1e5dbcb7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 04:18:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 13 Feb 2018 09:18:06 +0000 Subject: [issue32370] Wrong ANSI encoding used by subprocess for some locales In-Reply-To: <1513643091.19.0.213398074469.issue32370@psf.upfronthosting.co.za> Message-ID: <1518513486.48.0.467229070634.issue32370@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 Feb 13 04:18:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 13 Feb 2018 09:18:35 +0000 Subject: [issue32836] Symbol table for comprehensions (list, dict, set) still includes temporary _[1] variable In-Reply-To: <1518471231.56.0.467229070634.issue32836@psf.upfronthosting.co.za> Message-ID: <1518513515.83.0.467229070634.issue32836@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 04:32:53 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 13 Feb 2018 09:32:53 +0000 Subject: [issue32827] Fix incorrect usage of _PyUnicodeWriter_Prepare() In-Reply-To: <1518436023.7.0.467229070634.issue32827@psf.upfronthosting.co.za> Message-ID: <1518514373.91.0.467229070634.issue32827@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 310b424c476e3de3370990e5b9a10acc64ed17f8 by Miss Islington (bot) in branch '3.6': bpo-32827: Fix usage of _PyUnicodeWriter_Prepare() in decoding errors handler. (GH-5636) https://github.com/python/cpython/commit/310b424c476e3de3370990e5b9a10acc64ed17f8 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 04:33:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 13 Feb 2018 09:33:43 +0000 Subject: [issue32827] Fix incorrect usage of _PyUnicodeWriter_Prepare() In-Reply-To: <1518436023.7.0.467229070634.issue32827@psf.upfronthosting.co.za> Message-ID: <1518514423.12.0.467229070634.issue32827@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 Feb 13 05:28:40 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 13 Feb 2018 10:28:40 +0000 Subject: [issue31787] various refleaks when calling the __init__() method of an object more than once In-Reply-To: <1507972588.41.0.213398074469.issue31787@psf.upfronthosting.co.za> Message-ID: <1518517720.48.0.467229070634.issue31787@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset d019bc8319ea35e93bf4baa38098ff1b57cd3ee5 by INADA Naoki (Oren Milman) in branch 'master': bpo-31787: Prevent refleaks when calling __init__() more than once (GH-3995) https://github.com/python/cpython/commit/d019bc8319ea35e93bf4baa38098ff1b57cd3ee5 ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 05:29:47 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 13 Feb 2018 10:29:47 +0000 Subject: [issue31787] various refleaks when calling the __init__() method of an object more than once In-Reply-To: <1507972588.41.0.213398074469.issue31787@psf.upfronthosting.co.za> Message-ID: <1518517787.21.0.467229070634.issue31787@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5459 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 05:33:35 2018 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 13 Feb 2018 10:33:35 +0000 Subject: [issue29803] Remove some redandunt ops in unicodeobject.c Message-ID: <1518518015.05.0.467229070634.issue29803@psf.upfronthosting.co.za> New submission from Xiang Zhang : New changeset 2b77a921e6a4dee236047ac8d69cf9f915916fdc by Xiang Zhang in branch 'master': bpo-29803: remove a redandunt op and fix a comment in unicodeobject.c (#660) https://github.com/python/cpython/commit/2b77a921e6a4dee236047ac8d69cf9f915916fdc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 05:37:00 2018 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 13 Feb 2018 10:37:00 +0000 Subject: [issue29803] Remove some redandunt ops in unicodeobject.c In-Reply-To: <1518518015.05.0.467229070634.issue29803@psf.upfronthosting.co.za> Message-ID: <1518518220.58.0.467229070634.issue29803@psf.upfronthosting.co.za> Change by Xiang Zhang : ---------- 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 Feb 13 06:09:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 13 Feb 2018 11:09:44 +0000 Subject: [issue32838] Fix Python versions in the table of magic numbers Message-ID: <1518520184.53.0.467229070634.issue32838@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : All changes to the magic number in Lib/importlib/_bootstrap_external.py are attributed with 3.7a0. But they were made at different stages. There is also inconsistency in specifying Python version for older changes. Some authors specify the first Python version after bumping the magic number (i.e. the version that was released with this magic number). Others specify the Python version after which the bumping was made. I think the former is correct. The proposed PR fixes Python versions and adds issue numbers if known. I have tracked only changes in Python 3.x. ---------- messages: 312115 nosy: benjamin.peterson, pitrou, serhiy.storchaka priority: normal severity: normal status: open title: Fix Python versions in the table of magic numbers versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 06:11:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 13 Feb 2018 11:11:41 +0000 Subject: [issue32838] Fix Python versions in the table of magic numbers In-Reply-To: <1518520184.53.0.467229070634.issue32838@psf.upfronthosting.co.za> Message-ID: <1518520301.78.0.467229070634.issue32838@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +5460 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 06:28:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 13 Feb 2018 11:28:47 +0000 Subject: [issue32489] Allow 'continue' in 'finally' clause In-Reply-To: <1515013867.94.0.467229070634.issue32489@psf.upfronthosting.co.za> Message-ID: <1518521327.06.0.467229070634.issue32489@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +5461 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 06:29:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 13 Feb 2018 11:29:16 +0000 Subject: [issue32489] Allow 'continue' in 'finally' clause In-Reply-To: <1515013867.94.0.467229070634.issue32489@psf.upfronthosting.co.za> Message-ID: <1518521356.34.0.467229070634.issue32489@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: -5461 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 06:32:21 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 13 Feb 2018 11:32:21 +0000 Subject: [issue31787] various refleaks when calling the __init__() method of an object more than once In-Reply-To: <1507972588.41.0.213398074469.issue31787@psf.upfronthosting.co.za> Message-ID: <1518521541.71.0.467229070634.issue31787@psf.upfronthosting.co.za> miss-islington added the comment: New changeset ef20abed7f2ae0ba54b1d287f5fe601be80c1128 by Miss Islington (bot) in branch '3.7': bpo-31787: Prevent refleaks when calling __init__() more than once (GH-3995) https://github.com/python/cpython/commit/ef20abed7f2ae0ba54b1d287f5fe601be80c1128 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 06:41:31 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 13 Feb 2018 11:41:31 +0000 Subject: [issue31787] various refleaks when calling the __init__() method of an object more than once In-Reply-To: <1507972588.41.0.213398074469.issue31787@psf.upfronthosting.co.za> Message-ID: <1518522091.16.0.467229070634.issue31787@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- pull_requests: +5462 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 07:45:17 2018 From: report at bugs.python.org (Fangyi Zhou) Date: Tue, 13 Feb 2018 12:45:17 +0000 Subject: [issue32795] subprocess.check_output() with timeout does not exit if child process does not generate output after timeout In-Reply-To: <1518081067.06.0.467229070634.issue32795@psf.upfronthosting.co.za> Message-ID: <1518525917.88.0.467229070634.issue32795@psf.upfronthosting.co.za> Fangyi Zhou added the comment: I think the issue is that the process is not terminated. If you increase the sleep duration, you would see that the sleep process is not killed by SIGKILL. ---------- nosy: +fangyizhou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 08:15:28 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 13 Feb 2018 13:15:28 +0000 Subject: [issue31787] various refleaks when calling the __init__() method of an object more than once In-Reply-To: <1507972588.41.0.213398074469.issue31787@psf.upfronthosting.co.za> Message-ID: <1518527728.6.0.467229070634.issue31787@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 47316342417146f62653bc3c3dd505bfacc5e956 by INADA Naoki in branch '3.6': bpo-31787: Prevent refleaks when calling __init__() more than once (GH-3995) https://github.com/python/cpython/commit/47316342417146f62653bc3c3dd505bfacc5e956 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 08:15:49 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 13 Feb 2018 13:15:49 +0000 Subject: [issue31787] various refleaks when calling the __init__() method of an object more than once In-Reply-To: <1507972588.41.0.213398074469.issue31787@psf.upfronthosting.co.za> Message-ID: <1518527749.52.0.467229070634.issue31787@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 08:38:15 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 13 Feb 2018 13:38:15 +0000 Subject: [issue32839] Add after_info as a function to tkinter Message-ID: <1518529095.33.0.467229070634.issue32839@psf.upfronthosting.co.za> New submission from Cheryl Sabella : In tkinter, after_cancel has a call to after info: data = self.tk.call('after', 'info', id) Since this is a supported command, there should be a function to access it directly. https://www.tcl.tk/man/tcl8.6/TclCmd/after.htm ---------- components: Tkinter messages: 312119 nosy: csabella priority: normal severity: normal status: open title: Add after_info as a function to tkinter type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 08:38:37 2018 From: report at bugs.python.org (Eric Osborne) Date: Tue, 13 Feb 2018 13:38:37 +0000 Subject: [issue32820] Add bits method to ipaddress In-Reply-To: <1518488105.02.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: Eric Osborne added the comment: This is an interesting idea. I hacked together something to handle IPv4 and pushed it to the repository. It works, but I'm afraid it may be kinda ugly. Do you have any examples of good, pythonic ways to parse the format string or otherwise extend __format__? I didn't see many examples in stdlib, and the ones I did got pretty deep into it pretty quick. Test output: IPv4 address 1.2.3.4 format: b 00000001000000100000001100000100 format: n 00000001000000100000001100000100 format: x 01020304 format: _b 0000_0001_0000_0010_0000_0011_0000_0100 format: _n 0000_0001_0000_0010_0000_0011_0000_0100 format: _x 0102_0304 format: #b 0b00000001000000100000001100000100 format: #n 0b00000001000000100000001100000100 format: #x 0x01020304 format: #_b 0b0000_0001_0000_0010_0000_0011_0000_0100 format: #_n 0b0000_0001_0000_0010_0000_0011_0000_0100 format: #_x 0x0102_0304 Thanks! eric On Mon, Feb 12, 2018 at 9:15 PM Nick Coghlan wrote: > > Nick Coghlan added the comment: > > I think the aspect that makes this potentially worthy of a helper function > is the need to dynamically adjust the field width based on whether you're > printing an IPv4 address or an IPv6 one, whether you're printing it in > binary or hexadecimal, whether you're printing separator characters, and > whether you're printing the base indicator prefix. > > For example, consider the following: > > ``` > >>> ip4 = ipaddress.ip_address("1.2.3.4") > >>> ip4 > IPv4Address('1.2.3.4') > >>> ip6 = ipaddress.ip_address("::1:2:3:4") > >>> ip6 > IPv6Address('::1:2:3:4') > >>> format(int(ip4), "#041_b") > '0b0000_0001_0000_0010_0000_0011_0000_0100' > >>> format(int(ip6), "#041_x") > '0x0000_0000_0000_0000_0001_0002_0003_0004' > ``` > > The "41" in those examples comes from "prefix_len + (num_bits / > bits_per_char) + (num_bits / bits_per_char / chars_per_separator) - 1": > > IPv4 in binary: 2 + (32 / 1) + (32 / 1 / 4) - 1 = 2 + 32 + 8 - 1 = 41 > IPv6 in hex: 2 + (128 / 4) + (128 / 1 / 4) - 1 = 2 + 32 + 8 - 1 = 41 > > So I think the potentially interesting method to implement here would be > *__format__*, such that the field width calculation could be made implicit > based on the other options selected. > > While backwards compatibility means that IP address formatting would still > need to be equivalent to "str(ip)" by default, it would be reasonably > straightforward to make "format(ip, 'b')" output the number in binary, > "format(ip, 'x')" do it in hex, and "format(ip, 'n')" be equivalent to "b" > for IPv4 addresses, and "x" for IPv6 ones. > > Unlike ordinary numbers, the IP addresses would always be zero-padded to a > fixed width (32-bits for IPv4, 128 bits for IPv6), but "#" and "_" would be > accepted to indicate whether or to add the base indicator prefix and/or > group separators. > > Given those enhancements, the display examples above would become: > > ``` > >>> format(ip4, "#_n") > '0b0000_0001_0000_0010_0000_0011_0000_0100' > >>> format(ip6, "#_n") > '0x0000_0000_0000_0000_0001_0002_0003_0004' > ``` > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 09:04:58 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 13 Feb 2018 14:04:58 +0000 Subject: [issue31787] various refleaks when calling the __init__() method of an object more than once In-Reply-To: <1507972588.41.0.213398074469.issue31787@psf.upfronthosting.co.za> Message-ID: <1518530698.86.0.467229070634.issue31787@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- pull_requests: +5463 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 09:12:11 2018 From: report at bugs.python.org (Berker Peksag) Date: Tue, 13 Feb 2018 14:12:11 +0000 Subject: [issue32820] Add bits method to ipaddress In-Reply-To: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: <1518531131.3.0.467229070634.issue32820@psf.upfronthosting.co.za> Berker Peksag added the comment: Eric, please delete the previous message when you reply by email. Keeping the previous message makes your comment harder to read. See https://bugs.python.org/issue32820#msg312050 on browser for example. ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 09:12:20 2018 From: report at bugs.python.org (Berker Peksag) Date: Tue, 13 Feb 2018 14:12:20 +0000 Subject: [issue32820] Add bits method to ipaddress In-Reply-To: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: <1518531140.74.0.467229070634.issue32820@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- nosy: -berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 09:19:03 2018 From: report at bugs.python.org (=?utf-8?b?0K7RgNC40Lkg0J/Rg9GF0LDQu9GM0YHQutC40Lk=?=) Date: Tue, 13 Feb 2018 14:19:03 +0000 Subject: [issue32755] Several cookies with the same name get intermixed In-Reply-To: <1517652228.92.0.467229070634.issue32755@psf.upfronthosting.co.za> Message-ID: <1518531543.9.0.467229070634.issue32755@psf.upfronthosting.co.za> ???? ?????????? added the comment: "Questions about using cpython and 3rd party libraries like aiohttp should be directed elsewhere." Sorry, I thought http is part of "stdlib"? But if sending this here is totally wrong, I beg pardon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 09:30:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 13 Feb 2018 14:30:53 +0000 Subject: [issue32839] Add after_info as a function to tkinter In-Reply-To: <1518529095.33.0.467229070634.issue32839@psf.upfronthosting.co.za> Message-ID: <1518532253.37.0.467229070634.issue32839@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What is the use case for this method? How it could be used? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 09:41:23 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 13 Feb 2018 14:41:23 +0000 Subject: [issue31787] various refleaks when calling the __init__() method of an object more than once In-Reply-To: <1507972588.41.0.213398074469.issue31787@psf.upfronthosting.co.za> Message-ID: <1518532883.05.0.467229070634.issue31787@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset f0bc645dfede8118c84844bad319cd952c4d1905 by INADA Naoki in branch 'master': bpo-31787: Skip refleak check when _hashlib is not available (GH-5660) https://github.com/python/cpython/commit/f0bc645dfede8118c84844bad319cd952c4d1905 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 09:42:34 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 13 Feb 2018 14:42:34 +0000 Subject: [issue31787] various refleaks when calling the __init__() method of an object more than once In-Reply-To: <1507972588.41.0.213398074469.issue31787@psf.upfronthosting.co.za> Message-ID: <1518532954.59.0.467229070634.issue31787@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5464 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 09:43:29 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 13 Feb 2018 14:43:29 +0000 Subject: [issue31787] various refleaks when calling the __init__() method of an object more than once In-Reply-To: <1507972588.41.0.213398074469.issue31787@psf.upfronthosting.co.za> Message-ID: <1518533009.01.0.467229070634.issue31787@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5465 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 09:45:26 2018 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 13 Feb 2018 14:45:26 +0000 Subject: [issue32820] Add bits method to ipaddress In-Reply-To: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: <1518533126.13.0.467229070634.issue32820@psf.upfronthosting.co.za> Eric V. Smith added the comment: If you don't recognize the format string, you want to fall back to: return super().__format__(fmt) Since that will call object.__format__, it will generate an error if fmt is not the empty string, which is what it does currently for IP addresses. As far as parsing the format specifier, you're on your own. _pydecimal.py has a version that parses something very similar (or maybe identical) to the mini-language used by float, int, str, etc. But I'm not sure you need to go that far. Since you can define any format spec you'd like, you're not constrained to the mini-language used by the built-in types (see datetime for an example, which just calls strftime). I think the _pydecimal.py approach of using a regex isn't bad, but you might want to delay loading re until __format__ is called. Before you go too far down this path, I think this should probably be taken to python-ideas to hash out what the format spec for IP addresses would look like, or even if this is a good idea at all. I'm generally supportive of handling it through __format__(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 10:07:40 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 13 Feb 2018 15:07:40 +0000 Subject: [issue31787] various refleaks when calling the __init__() method of an object more than once In-Reply-To: <1507972588.41.0.213398074469.issue31787@psf.upfronthosting.co.za> Message-ID: <1518534460.21.0.467229070634.issue31787@psf.upfronthosting.co.za> miss-islington added the comment: New changeset e81a6c86c89da02a0da719926198ab72edab2e05 by Miss Islington (bot) in branch '3.7': bpo-31787: Skip refleak check when _hashlib is not available (GH-5660) https://github.com/python/cpython/commit/e81a6c86c89da02a0da719926198ab72edab2e05 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 10:24:16 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 13 Feb 2018 15:24:16 +0000 Subject: [issue32839] Add after_info as a function to tkinter In-Reply-To: <1518529095.33.0.467229070634.issue32839@psf.upfronthosting.co.za> Message-ID: <1518535456.32.0.467229070634.issue32839@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I was working on the tests for issue32831. One of the methods was `__del__` which made sure timer events were canceled with `after_cancel`. In the test, to assert that the after events no longer existed after calling `__del__` and after reading the Tcl documentation for `after`, I tried to call `after_info` but it didn't exist. So I added a call to `self.tk.call('after', 'info', id)` directly to assert that the after events no longer existed. I don't know if there is a general need to know whether timer or idle events exist, but this command gives that information. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 10:33:52 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 13 Feb 2018 15:33:52 +0000 Subject: [issue31787] various refleaks when calling the __init__() method of an object more than once In-Reply-To: <1507972588.41.0.213398074469.issue31787@psf.upfronthosting.co.za> Message-ID: <1518536032.77.0.467229070634.issue31787@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 5d0d0eaf3ccee4349a5bed6e7741d09d56f2ab50 by Miss Islington (bot) in branch '3.6': bpo-31787: Skip refleak check when _hashlib is not available (GH-5660) https://github.com/python/cpython/commit/5d0d0eaf3ccee4349a5bed6e7741d09d56f2ab50 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 10:45:15 2018 From: report at bugs.python.org (Trent Nelson) Date: Tue, 13 Feb 2018 15:45:15 +0000 Subject: [issue31562] snakebite.net is not available In-Reply-To: <1506188809.66.0.0162069541224.issue31562@psf.upfronthosting.co.za> Message-ID: <1518536715.18.0.467229070634.issue31562@psf.upfronthosting.co.za> Trent Nelson added the comment: Unfortunately the host backing blackhole.snakebite.net and whitehole.snakebite.net is no longer available. I still think the underlying test is valuable, though -- are there any PSF boxes/containers that could fulfill this role? (I used pf on FreeBSD to set up the two firewall rules: https://github.com/python/cpython/blob/master/Lib/test/test_timeout.py#L183. If a new box were to be sourced I presume it would be a Linux instance, so the rules would need to be ported to whatever the Linux firewall on the box is.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 11:09:06 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 13 Feb 2018 16:09:06 +0000 Subject: [issue20632] Define a new __key__ protocol In-Reply-To: <1392423475.26.0.500398402328.issue20632@psf.upfronthosting.co.za> Message-ID: <1518538146.01.0.467229070634.issue20632@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Thanks, Nick. When I first came across this issue, I thought that dataclasses would take care of what you wrote below, but after looking at the original discussion on python-dev, I thought the problem was ordering None within a comparison with None being a valid value in SQLite. For example, >>> a = [1, None, 'a'] >>> b = [1, 5, 'b'] >>> a == b False >>> a < b Traceback (most recent call last): File "", line 1, in TypeError: '<' not supported between instances of 'NoneType' and 'int' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 11:09:58 2018 From: report at bugs.python.org (R. David Murray) Date: Tue, 13 Feb 2018 16:09:58 +0000 Subject: [issue31562] snakebite.net is not available In-Reply-To: <1506188809.66.0.0162069541224.issue31562@psf.upfronthosting.co.za> Message-ID: <1518538198.04.0.467229070634.issue31562@psf.upfronthosting.co.za> R. David Murray added the comment: There is a host dedicated to providing test infrastructure. I forget the name. Benjamin has done things with it in the past. ---------- nosy: +benjamin.peterson, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 11:52:20 2018 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 13 Feb 2018 16:52:20 +0000 Subject: [issue16251] pickle special methods are looked up on the instance rather than the type In-Reply-To: <1350411894.01.0.763638555345.issue16251@psf.upfronthosting.co.za> Message-ID: <1518540740.32.0.467229070634.issue16251@psf.upfronthosting.co.za> ?ukasz Langa added the comment: FWIW I withdrew my PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 12:32:17 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 13 Feb 2018 17:32:17 +0000 Subject: [issue32839] Add after_info as a function to tkinter In-Reply-To: <1518529095.33.0.467229070634.issue32839@psf.upfronthosting.co.za> Message-ID: <1518543137.41.0.467229070634.issue32839@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm not sure what after_info(id) should return. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 13:27:54 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 13 Feb 2018 18:27:54 +0000 Subject: [issue32839] Add after_info as a function to tkinter In-Reply-To: <1518529095.33.0.467229070634.issue32839@psf.upfronthosting.co.za> Message-ID: <1518546474.67.0.467229070634.issue32839@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +5466 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 13:29:31 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 13 Feb 2018 18:29:31 +0000 Subject: [issue32839] Add after_info as a function to tkinter In-Reply-To: <1518529095.33.0.467229070634.issue32839@psf.upfronthosting.co.za> Message-ID: <1518546571.21.0.467229070634.issue32839@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I've made a pull request. I understand that you may not want to add this functionality, but perhaps the docstring will answer your questions. I took it from the Tcl docs page. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 13:35:12 2018 From: report at bugs.python.org (Fangyi Zhou) Date: Tue, 13 Feb 2018 18:35:12 +0000 Subject: [issue32795] subprocess.check_output() with timeout does not exit if child process does not generate output after timeout In-Reply-To: <1518081067.06.0.467229070634.issue32795@psf.upfronthosting.co.za> Message-ID: <1518546912.72.0.467229070634.issue32795@psf.upfronthosting.co.za> Fangyi Zhou added the comment: As far as I have discovered, the bash process is killed by after the timeout. Presumably the pipe is still open due to the sleep process, so in order to retrieve any output from stdout/stderr, the read waits on the pipe, hence leading to timeout not respected. We can fix this issue in 2 ways (1) kill process tree when timeout happens (2) force closing the pipes after timeout, but this will leave the sub-processes detached and it will be kept running I don't know which way is better, hopefully someone with more knowledge can engage in the discussion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 13:44:04 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 13 Feb 2018 18:44:04 +0000 Subject: [issue31562] snakebite.net is not available In-Reply-To: <1506188809.66.0.0162069541224.issue31562@psf.upfronthosting.co.za> Message-ID: <1518547444.33.0.467229070634.issue31562@psf.upfronthosting.co.za> Benjamin Peterson added the comment: pythontest.net ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 14:06:09 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 13 Feb 2018 19:06:09 +0000 Subject: [issue21196] Name mangling example in Python tutorial In-Reply-To: <1397133080.37.0.870141660622.issue21196@psf.upfronthosting.co.za> Message-ID: <1518548769.83.0.467229070634.issue21196@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Chandan or Berker, Any interest in making a Github pull request for this patch? ---------- nosy: +csabella versions: +Python 3.7, Python 3.8 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 15:10:38 2018 From: report at bugs.python.org (J. Morton) Date: Tue, 13 Feb 2018 20:10:38 +0000 Subject: [issue32840] Must install python 3.6.3 when 3.6.4 already installed Message-ID: <1518552638.75.0.467229070634.issue32840@psf.upfronthosting.co.za> New submission from J. Morton : Got a 0x8070666 "Setup Failed - another version installed" popup message when installing 3.6.3 with 3.6.4 and 3.5.1 already installed (all are "just for me" installs). The problem is independent of word length. It should be possible to install any/every earlier version (within reason) provided the earlier version is "virtualized" by being placed in it's own folder (which I was what I was doing). Please accomodate this capability as it is often needed to support users using earlier versions of Python. Environment: 64 bit Win7 Enterprise SP1 on a IM controlled machine. Possible red herring: IM recently upgraded java on this machine to "1.8.0_151". 32 and 64 bit versions of all releases are installed on this machine. ---------- components: Installation messages: 312138 nosy: NaCl priority: normal severity: normal status: open title: Must install python 3.6.3 when 3.6.4 already installed type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 16:08:35 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 13 Feb 2018 21:08:35 +0000 Subject: [issue32755] Several cookies with the same name get intermixed In-Reply-To: <1517652228.92.0.467229070634.issue32755@psf.upfronthosting.co.za> Message-ID: <1518556115.73.0.467229070634.issue32755@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Yes, http.cookies is part of the stdlib. This is why I continued "the relevant question here is whether http.cookies has a bug", verified the cookie behavior you reported, and added information relevant to its possible bugginess. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 16:30:02 2018 From: report at bugs.python.org (Bar Harel) Date: Tue, 13 Feb 2018 21:30:02 +0000 Subject: [issue32841] Asyncio.Condition prevents cancellation Message-ID: <1518557402.2.0.467229070634.issue32841@psf.upfronthosting.co.za> New submission from Bar Harel : Hey guys, A week after a serious asyncio.Lock bug, I found another bug that makes asyncio.Condition ignore and prevent cancellation in some cases due to an "except: pass" which tbh is a little embarrassing. What happens is that during the time it takes to get back a conditional lock after notifying it, asyncio completely ignores all cancellations sent to the waiting task. le_bug.py: Contains the bug le_patch.diff: Contains a very simple fix (will send a pull on Github too) le_meme.jpg: Contains my face after debugging this for 4 hours Yuri, I hope you didn't miss me during this week ;-) -- Bar ---------- components: asyncio files: le_bug.py messages: 312140 nosy: asvetlov, bar.harel, yselivanov priority: normal severity: normal status: open title: Asyncio.Condition prevents cancellation type: behavior versions: Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file47439/le_bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 16:30:09 2018 From: report at bugs.python.org (Bar Harel) Date: Tue, 13 Feb 2018 21:30:09 +0000 Subject: [issue32841] Asyncio.Condition prevents cancellation In-Reply-To: <1518557402.2.0.467229070634.issue32841@psf.upfronthosting.co.za> Message-ID: <1518557409.19.0.467229070634.issue32841@psf.upfronthosting.co.za> Change by Bar Harel : ---------- keywords: +patch Added file: https://bugs.python.org/file47440/le_patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 16:30:18 2018 From: report at bugs.python.org (Bar Harel) Date: Tue, 13 Feb 2018 21:30:18 +0000 Subject: [issue32841] Asyncio.Condition prevents cancellation In-Reply-To: <1518557402.2.0.467229070634.issue32841@psf.upfronthosting.co.za> Message-ID: <1518557418.87.0.467229070634.issue32841@psf.upfronthosting.co.za> Change by Bar Harel : Added file: https://bugs.python.org/file47441/le_meme.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 16:59:08 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 13 Feb 2018 21:59:08 +0000 Subject: [issue32841] Asyncio.Condition prevents cancellation In-Reply-To: <1518557402.2.0.467229070634.issue32841@psf.upfronthosting.co.za> Message-ID: <1518559148.06.0.467229070634.issue32841@psf.upfronthosting.co.za> Yury Selivanov added the comment: le_meme.jpg is a pretty common facial expression when one debugs locks/conditions, so let's not attach it in the future :) We try to keep the bug tracker free of unnecessary information. As for the bug?please submit a PR! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 16:59:14 2018 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 13 Feb 2018 21:59:14 +0000 Subject: [issue32841] Asyncio.Condition prevents cancellation In-Reply-To: <1518557402.2.0.467229070634.issue32841@psf.upfronthosting.co.za> Message-ID: <1518559154.66.0.467229070634.issue32841@psf.upfronthosting.co.za> Change by Yury Selivanov : Removed file: https://bugs.python.org/file47441/le_meme.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 17:25:26 2018 From: report at bugs.python.org (Bar Harel) Date: Tue, 13 Feb 2018 22:25:26 +0000 Subject: [issue32841] Asyncio.Condition prevents cancellation In-Reply-To: <1518557402.2.0.467229070634.issue32841@psf.upfronthosting.co.za> Message-ID: <1518560726.07.0.467229070634.issue32841@psf.upfronthosting.co.za> Change by Bar Harel : ---------- pull_requests: +5467 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 17:45:06 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 13 Feb 2018 22:45:06 +0000 Subject: [issue32839] Add after_info as a function to tkinter In-Reply-To: <1518529095.33.0.467229070634.issue32839@psf.upfronthosting.co.za> Message-ID: <1518561906.65.0.467229070634.issue32839@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am in favor of exposing all of tk where it makes sense to do so, and I think it does here. After 'translating' the tk after_info entry into tkinter-ese, I would expect and want that root.after_info(root.after(f, 100000))[0] is f be true. the same as would be true of the tcl equivalent. (This could even be a test.) It appears that the current patch instead returns a (python) reference to the tcl wrapper of f. The fact that python callbacks get wrapped as tcl callbacks is currently transparent to tkinter users and should remain so. Serhiy, I presume that this is what you were uncertain about. I am presuming above that f can be recovered. Returning the function kind as 'timer' or 'idle' is fine. In other contexts, an enumeration would be a possibility, but this does not seem to fit tkinter. I presume a bad id results in TclError. Do other tkinter functions allow TclError to propagate? My impression is no. If so, it should be replaced here in a way consistent with other tkinter practice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 18:00:51 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Tue, 13 Feb 2018 23:00:51 +0000 Subject: [issue32841] Asyncio.Condition prevents cancellation In-Reply-To: <1518557402.2.0.467229070634.issue32841@psf.upfronthosting.co.za> Message-ID: <1518562851.08.0.467229070634.issue32841@psf.upfronthosting.co.za> Nathaniel Smith added the comment: Interesting case! This is super subtle. I think the patch is correct though. (In Trio this is one of the cases where we use shielding: https://github.com/python-trio/trio/blob/f48d8922dfe2118bfaaf9a85f2524e58146ba369/trio/_sync.py#L749-L752 . But asyncio.shield has different semantics -- it still delivers the CancelledError to the caller, which is no good in this case.) ---------- nosy: +njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 18:38:26 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 13 Feb 2018 23:38:26 +0000 Subject: [issue18802] ipaddress documentation errors In-Reply-To: <1377118857.87.0.169407991036.issue18802@psf.upfronthosting.co.za> Message-ID: <1518565106.57.0.467229070634.issue18802@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Jon/Berker, Are you interested in making a Github pull request for this? Thanks! ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 18:44:18 2018 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 13 Feb 2018 23:44:18 +0000 Subject: [issue27846] Base64 expansion factor is 4 to 3, not 6 to 4 In-Reply-To: <1472030737.8.0.133776759316.issue27846@psf.upfronthosting.co.za> Message-ID: <1518565458.96.0.467229070634.issue27846@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +5468 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 18:48:19 2018 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 13 Feb 2018 23:48:19 +0000 Subject: [issue27846] Base64 expansion factor is 4 to 3, not 6 to 4 In-Reply-To: <1472030737.8.0.133776759316.issue27846@psf.upfronthosting.co.za> Message-ID: <1518565699.15.0.467229070634.issue27846@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz versions: +Python 3.7, Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 19:03:22 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 14 Feb 2018 00:03:22 +0000 Subject: [issue21196] Name mangling example in Python tutorial In-Reply-To: <1397133080.37.0.870141660622.issue21196@psf.upfronthosting.co.za> Message-ID: <1518566602.46.0.467229070634.issue21196@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- pull_requests: +5469 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 19:08:57 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 14 Feb 2018 00:08:57 +0000 Subject: [issue27846] Base64 expansion factor is 4 to 3, not 6 to 4 In-Reply-To: <1472030737.8.0.133776759316.issue27846@psf.upfronthosting.co.za> Message-ID: <1518566937.02.0.467229070634.issue27846@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 88c38a4049ded0e1f197fec3e76be7c0c0e83d7a by Berker Peksag (Zackery Spytz) in branch 'master': bpo-27846: Delete incorrect note in base64 docs (GH-5666) https://github.com/python/cpython/commit/88c38a4049ded0e1f197fec3e76be7c0c0e83d7a ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 19:09:16 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 14 Feb 2018 00:09:16 +0000 Subject: [issue27846] Base64 expansion factor is 4 to 3, not 6 to 4 In-Reply-To: <1472030737.8.0.133776759316.issue27846@psf.upfronthosting.co.za> Message-ID: <1518566956.34.0.467229070634.issue27846@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5470 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 19:10:04 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 14 Feb 2018 00:10:04 +0000 Subject: [issue27846] Base64 expansion factor is 4 to 3, not 6 to 4 In-Reply-To: <1472030737.8.0.133776759316.issue27846@psf.upfronthosting.co.za> Message-ID: <1518567004.71.0.467229070634.issue27846@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5471 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 19:22:39 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 14 Feb 2018 00:22:39 +0000 Subject: [issue26743] Unable to import random with python2.7 on power pc based machine In-Reply-To: <1460509006.04.0.361461231746.issue26743@psf.upfronthosting.co.za> Message-ID: <1518567759.08.0.467229070634.issue26743@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Since there hasn't been activity on this for nearly 2 years, should it be closed as third party? Stefan seemed to conclude that it was a WindRiver issue. Thanks! ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 19:48:03 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 14 Feb 2018 00:48:03 +0000 Subject: [issue27846] Base64 expansion factor is 4 to 3, not 6 to 4 In-Reply-To: <1472030737.8.0.133776759316.issue27846@psf.upfronthosting.co.za> Message-ID: <1518569283.02.0.467229070634.issue27846@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 2e8d9003ed7a97955c36fa19a9ce7c43d9ec83e1 by Berker Peksag (Miss Islington (bot)) in branch '3.7': bpo-27846: Delete incorrect note in base64 docs (GH-5666) https://github.com/python/cpython/commit/2e8d9003ed7a97955c36fa19a9ce7c43d9ec83e1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 19:48:30 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 14 Feb 2018 00:48:30 +0000 Subject: [issue27846] Base64 expansion factor is 4 to 3, not 6 to 4 In-Reply-To: <1472030737.8.0.133776759316.issue27846@psf.upfronthosting.co.za> Message-ID: <1518569310.94.0.467229070634.issue27846@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset b93a52b136fd2285f2891eef91c50e3d36ea6f36 by Berker Peksag (Miss Islington (bot)) in branch '3.6': bpo-27846: Delete incorrect note in base64 docs (GH-5666) https://github.com/python/cpython/commit/b93a52b136fd2285f2891eef91c50e3d36ea6f36 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 19:50:03 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 14 Feb 2018 00:50:03 +0000 Subject: [issue27846] Base64 expansion factor is 4 to 3, not 6 to 4 In-Reply-To: <1472030737.8.0.133776759316.issue27846@psf.upfronthosting.co.za> Message-ID: <1518569403.23.0.467229070634.issue27846@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 21:06:41 2018 From: report at bugs.python.org (YoSTEALTH) Date: Wed, 14 Feb 2018 02:06:41 +0000 Subject: [issue32842] Fixing epoll timeout logics Message-ID: <1518574001.96.0.467229070634.issue32842@psf.upfronthosting.co.za> New submission from YoSTEALTH : # current if timeout is None: timeout = -1 elif timeout <= 0: timeout = 0 # changed if timeout is None: timeout = -1 elif timeout < -1: timeout = 0 what if "timeout=-1" ? - currently it would result in being timeout=0 ---------- messages: 312150 nosy: YoSTEALTH priority: normal severity: normal status: open title: Fixing epoll timeout logics type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 21:10:13 2018 From: report at bugs.python.org (YoSTEALTH) Date: Wed, 14 Feb 2018 02:10:13 +0000 Subject: [issue32842] Fixing epoll timeout logics In-Reply-To: <1518574001.96.0.467229070634.issue32842@psf.upfronthosting.co.za> Message-ID: <1518574213.28.0.467229070634.issue32842@psf.upfronthosting.co.za> Change by YoSTEALTH : ---------- keywords: +patch pull_requests: +5472 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 21:11:34 2018 From: report at bugs.python.org (Zachary Ware) Date: Wed, 14 Feb 2018 02:11:34 +0000 Subject: [issue30638] Additional dependencies and rule for `make regen-all` In-Reply-To: <1497274981.52.0.670681266709.issue30638@psf.upfronthosting.co.za> Message-ID: <1518574294.59.0.467229070634.issue30638@psf.upfronthosting.co.za> Change by Zachary Ware : ---------- keywords: +patch pull_requests: +5473 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 21:23:57 2018 From: report at bugs.python.org (paul j3) Date: Wed, 14 Feb 2018 02:23:57 +0000 Subject: [issue32756] argparse: parse_known_args: raising exception on unknown arg following known one In-Reply-To: <1517661104.06.0.467229070634.issue32756@psf.upfronthosting.co.za> Message-ID: <1518575037.3.0.467229070634.issue32756@psf.upfronthosting.co.za> paul j3 added the comment: This error message is intentional. In def consume_optional(start_index): # identify additional optionals in the same arg string # (e.g. -xyz is the same as -x -y -z if no args are required) # if the action is a single-dash option and takes no # arguments, try to parse more single-dash options out # of the tail of the option string chars = self.prefix_chars if arg_count == 0 and option_string[1] not in chars: action_tuples.append((action, [], option_string)) char = option_string[0] option_string = char + explicit_arg[0] new_explicit_arg = explicit_arg[1:] or None optionals_map = self._option_string_actions if option_string in optionals_map: action = optionals_map[option_string] explicit_arg = new_explicit_arg else: msg = _('ignored explicit argument %r') raise ArgumentError(action, msg % explicit_arg) In other words, it doesn't just split off that extra character and add it to 'argument_strings' for further handling. Either 'b' is an argument for the '-a' flag or it is a '-b' flag itself. It can't be a positional or extra. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 21:27:23 2018 From: report at bugs.python.org (paul j3) Date: Wed, 14 Feb 2018 02:27:23 +0000 Subject: [issue32756] argparse: parse_known_args: raising exception on unknown arg following known one In-Reply-To: <1517661104.06.0.467229070634.issue32756@psf.upfronthosting.co.za> Message-ID: <1518575243.8.0.467229070634.issue32756@psf.upfronthosting.co.za> paul j3 added the comment: Try adding a simple positional argument. '-ab' would still produce this error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 21:29:26 2018 From: report at bugs.python.org (YoSTEALTH) Date: Wed, 14 Feb 2018 02:29:26 +0000 Subject: [issue32842] Fixing epoll timeout logics In-Reply-To: <1518574001.96.0.467229070634.issue32842@psf.upfronthosting.co.za> Message-ID: <1518575366.95.0.467229070634.issue32842@psf.upfronthosting.co.za> Change by YoSTEALTH : ---------- pull_requests: +5474 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 21:29:28 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 14 Feb 2018 02:29:28 +0000 Subject: [issue32838] Fix Python versions in the table of magic numbers In-Reply-To: <1518520301.8.0.714561066657.issue32838@psf.upfronthosting.co.za> Message-ID: <1518575364.1845666.1270097904.4E0A3642@webmail.messagingengine.com> Benjamin Peterson added the comment: Maybe we should simply delete this comment? I'm not sure how useful it is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 22:06:13 2018 From: report at bugs.python.org (YoSTEALTH) Date: Wed, 14 Feb 2018 03:06:13 +0000 Subject: [issue32842] Fixing epoll timeout logics In-Reply-To: <1518574001.96.0.467229070634.issue32842@psf.upfronthosting.co.za> Message-ID: <1518577573.42.0.467229070634.issue32842@psf.upfronthosting.co.za> YoSTEALTH added the comment: my confusion comes from epoll.poll(timeout=-1, maxevents=-1) has nothing to do with selectors.BaseSelector.select(timeout=None) ---------- resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 22:26:38 2018 From: report at bugs.python.org (Nitish) Date: Wed, 14 Feb 2018 03:26:38 +0000 Subject: [issue32489] Allow 'continue' in 'finally' clause In-Reply-To: <1515013867.94.0.467229070634.issue32489@psf.upfronthosting.co.za> Message-ID: <1518578798.47.0.467229070634.issue32489@psf.upfronthosting.co.za> Change by Nitish : ---------- nosy: +nitishch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 23:35:44 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 14 Feb 2018 04:35:44 +0000 Subject: [issue32836] Symbol table for comprehensions (list, dict, set) still includes temporary _[1] variable In-Reply-To: <1518471231.56.0.467229070634.issue32836@psf.upfronthosting.co.za> Message-ID: <1518582944.28.0.467229070634.issue32836@psf.upfronthosting.co.za> Nick Coghlan added the comment: We still need to the ".0" style temporary variables that are used for argument names in the implicitly generated functions, but it's definitely plausible that we're not actually using the "_[1]" style hidden variables anywhere anymore. ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 23:56:02 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 14 Feb 2018 04:56:02 +0000 Subject: [issue32820] Add bits method to ipaddress In-Reply-To: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: <1518584162.51.0.467229070634.issue32820@psf.upfronthosting.co.za> Nick Coghlan added the comment: Aye, definitely worth a thread on python-ideas. My rationale for suggesting something based on the built-in numeric codes is that it makes it straightforward for *users* to transfer knowledge from that mini-language. As far as parsing goes, I was thinking of something along the lines of the following naive approach: typechar = fmt[-1:] if not typechar or typechar not in ("b", "n", "x"): return super().__format__(fmt) prefix, group_sep, suffix = fmt[:-1].rpartition("_") if prefix and prefix != "#" or suffix: return super().__format__(fmt) field_width = self._calculate_field_width(typechar) return format(int(self), f"{prefix}0{field_width}{group_sep}{type_char}") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 13 23:57:58 2018 From: report at bugs.python.org (Zachary Ware) Date: Wed, 14 Feb 2018 04:57:58 +0000 Subject: [issue30638] Additional dependencies and rule for `make regen-all` In-Reply-To: <1497274981.52.0.670681266709.issue30638@psf.upfronthosting.co.za> Message-ID: <1518584278.42.0.467229070634.issue30638@psf.upfronthosting.co.za> Change by Zachary Ware : ---------- pull_requests: +5475 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 00:28:19 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Wed, 14 Feb 2018 05:28:19 +0000 Subject: [issue32841] Asyncio.Condition prevents cancellation In-Reply-To: <1518557402.2.0.467229070634.issue32841@psf.upfronthosting.co.za> Message-ID: <1518586099.81.0.467229070634.issue32841@psf.upfronthosting.co.za> Nathaniel Smith added the comment: It does make me wonder if asyncio.shield *should* wait for the thing it's shielding though, so that it *would* work in this case? (Similar to bpo-32751.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 00:40:26 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 14 Feb 2018 05:40:26 +0000 Subject: [issue21196] Name mangling example in Python tutorial In-Reply-To: <1397133080.37.0.870141660622.issue21196@psf.upfronthosting.co.za> Message-ID: <1518586826.17.0.467229070634.issue21196@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I don't think we should advertise how to manually mangle the names. That isn't a best practice. The feature is automatic for a reason. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 01:46:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 14 Feb 2018 06:46:08 +0000 Subject: [issue32839] Add after_info as a function to tkinter In-Reply-To: <1518529095.33.0.467229070634.issue32839@psf.upfronthosting.co.za> Message-ID: <1518590768.77.0.467229070634.issue32839@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: On one side, the first item of the list returned by the Tcl command `after info $id` is a name of the Tcl command generated by Tkinter. It is internal, it was not exposed to Tkinter users before, and the API for restoring the original Python callable is private. On other side, `after info` can return not only events created by Tkinter, but events created by Tcl (either by direct execution of Tcl script, this is still can be useful with programming with Tkinter, or created by the Tcl standard library or third-party Tcl libraries). In that case a Python callable can't be returned. This is what I was uncertain about. Maybe after_info() should return a Python callable if possible, and keep the original result otherwise? This complicates its implementation and definition. TclError is legal and expected. In some methods it is caught, either because the method is purposed to be called at widget destroying stage, when the order of different cleanup procedures is not specified, and Tcl names can be destroyed before destroying Tkinter wrappers, or because the method was implemented differently in the past, and catching TclError is needed for backward compatibility. after_info() is not the case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 01:57:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 14 Feb 2018 06:57:09 +0000 Subject: [issue32839] Add after_info as a function to tkinter In-Reply-To: <1518529095.33.0.467229070634.issue32839@psf.upfronthosting.co.za> Message-ID: <1518591429.97.0.467229070634.issue32839@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Note that in the tests for issue32831 you need to use call('after', 'info') if you want to backport them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 02:05:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 14 Feb 2018 07:05:54 +0000 Subject: [issue32838] Fix Python versions in the table of magic numbers In-Reply-To: <1518520184.53.0.467229070634.issue32838@psf.upfronthosting.co.za> Message-ID: <1518591954.24.0.467229070634.issue32838@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think it is useful to have such table somewhere. It give the impression about the history of bytecode and pyc format. There are third-party projects that try to support Python bytecode of different versions, they need such table. There is a simplified version of this table in PC/launcher.c, it is needed for suggesting the Python version by the magic number. And this table is just interesting for Python developers, especially if they made the change in the bytecode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 02:31:39 2018 From: report at bugs.python.org (Nitish) Date: Wed, 14 Feb 2018 07:31:39 +0000 Subject: [issue32836] Symbol table for comprehensions (list, dict, set) still includes temporary _[1] variable In-Reply-To: <1518471231.56.0.467229070634.issue32836@psf.upfronthosting.co.za> Message-ID: <1518593499.52.0.467229070634.issue32836@psf.upfronthosting.co.za> Change by Nitish : ---------- keywords: +patch pull_requests: +5476 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 02:34:47 2018 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 14 Feb 2018 07:34:47 +0000 Subject: [issue26743] Unable to import random with python2.7 on power pc based machine In-Reply-To: <1460509006.04.0.361461231746.issue26743@psf.upfronthosting.co.za> Message-ID: <1518593687.17.0.467229070634.issue26743@psf.upfronthosting.co.za> Mark Dickinson added the comment: @csabella: Agreed. Let's close. Thanks! ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 03:12:46 2018 From: report at bugs.python.org (Bar Harel) Date: Wed, 14 Feb 2018 08:12:46 +0000 Subject: [issue32841] Asyncio.Condition prevents cancellation In-Reply-To: <1518586099.81.0.467229070634.issue32841@psf.upfronthosting.co.za> Message-ID: Bar Harel added the comment: I don't think so. Having shield not cancel immediately but rather wait and cancel will cause long timed shielded operations to stall the task cancellation, usually for no good. This isn't the general case. However, adding another function which does so might just be a good idea. I think another parameter to shield to choose cancellation time will clutter the function call. On Wed, Feb 14, 2018, 7:28 AM Nathaniel Smith wrote: > > Nathaniel Smith added the comment: > > It does make me wonder if asyncio.shield *should* wait for the thing it's > shielding though, so that it *would* work in this case? (Similar to > bpo-32751.) > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 04:18:19 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 14 Feb 2018 09:18:19 +0000 Subject: [issue32841] Asyncio.Condition prevents cancellation In-Reply-To: <1518557402.2.0.467229070634.issue32841@psf.upfronthosting.co.za> Message-ID: <1518599899.01.0.467229070634.issue32841@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New changeset 5746510b7aef423fa4afc92b2abb919307b1dbb9 by Andrew Svetlov (Bar Harel) in branch 'master': bpo-32841: Fix cancellation in awaiting asyncio.Condition (#5665) https://github.com/python/cpython/commit/5746510b7aef423fa4afc92b2abb919307b1dbb9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 04:19:28 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 14 Feb 2018 09:19:28 +0000 Subject: [issue32841] Asyncio.Condition prevents cancellation In-Reply-To: <1518557402.2.0.467229070634.issue32841@psf.upfronthosting.co.za> Message-ID: <1518599968.87.0.467229070634.issue32841@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5477 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 04:20:20 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 14 Feb 2018 09:20:20 +0000 Subject: [issue32841] Asyncio.Condition prevents cancellation In-Reply-To: <1518557402.2.0.467229070634.issue32841@psf.upfronthosting.co.za> Message-ID: <1518600020.6.0.467229070634.issue32841@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5478 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 04:47:38 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 14 Feb 2018 09:47:38 +0000 Subject: [issue32841] Asyncio.Condition prevents cancellation In-Reply-To: <1518557402.2.0.467229070634.issue32841@psf.upfronthosting.co.za> Message-ID: <1518601658.1.0.467229070634.issue32841@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 8caee0fa572e8ced00df553a7bdca49ddaf729e8 by Miss Islington (bot) in branch '3.7': bpo-32841: Fix cancellation in awaiting asyncio.Condition (GH-5665) https://github.com/python/cpython/commit/8caee0fa572e8ced00df553a7bdca49ddaf729e8 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 05:10:25 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 14 Feb 2018 10:10:25 +0000 Subject: [issue32841] Asyncio.Condition prevents cancellation In-Reply-To: <1518557402.2.0.467229070634.issue32841@psf.upfronthosting.co.za> Message-ID: <1518603025.11.0.467229070634.issue32841@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New changeset a23eecab9a0b724bdfde83d159ac2415927f042a by Andrew Svetlov (Miss Islington (bot)) in branch '3.6': bpo-32841: Fix cancellation in awaiting asyncio.Condition (GH-5665) (GH-5683) https://github.com/python/cpython/commit/a23eecab9a0b724bdfde83d159ac2415927f042a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 05:11:19 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 14 Feb 2018 10:11:19 +0000 Subject: [issue32841] Asyncio.Condition prevents cancellation In-Reply-To: <1518557402.2.0.467229070634.issue32841@psf.upfronthosting.co.za> Message-ID: <1518603079.56.0.467229070634.issue32841@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Thanks Bar Harel ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 05:21:20 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Wed, 14 Feb 2018 10:21:20 +0000 Subject: [issue32841] Asyncio.Condition prevents cancellation In-Reply-To: <1518557402.2.0.467229070634.issue32841@psf.upfronthosting.co.za> Message-ID: <1518603680.31.0.467229070634.issue32841@psf.upfronthosting.co.za> Nathaniel Smith added the comment: > Having shield not cancel immediately but rather wait and cancel will cause long timed shielded operations to stall the task cancellation, usually for no good. This isn't the general case. What I'm suggesting is that maybe it actually is good in the general case :-). If an operation can't be cancelled, that's too bad, but it's generally still better to wait then to silently leak it into the background. ---------- nosy: -miss-islington resolution: fixed -> stage: resolved -> patch review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 05:24:25 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 14 Feb 2018 10:24:25 +0000 Subject: [issue32841] Asyncio.Condition prevents cancellation In-Reply-To: <1518557402.2.0.467229070634.issue32841@psf.upfronthosting.co.za> Message-ID: <1518603865.52.0.467229070634.issue32841@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Well, makes sense ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 05:31:47 2018 From: report at bugs.python.org (Zachary Ware) Date: Wed, 14 Feb 2018 10:31:47 +0000 Subject: [issue30455] Generate C code from token.py and not vice versa In-Reply-To: <1495628509.86.0.512362155714.issue30455@psf.upfronthosting.co.za> Message-ID: <1518604307.23.0.467229070634.issue30455@psf.upfronthosting.co.za> Change by Zachary Ware : ---------- keywords: +patch pull_requests: +5479 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 05:32:23 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 14 Feb 2018 10:32:23 +0000 Subject: [issue30455] Generate C code from token.py and not vice versa In-Reply-To: <1495628509.86.0.512362155714.issue30455@psf.upfronthosting.co.za> Message-ID: <1518604343.75.0.467229070634.issue30455@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: -5479 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 06:18:06 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 14 Feb 2018 11:18:06 +0000 Subject: [issue32843] More revisions to test.support docs Message-ID: <1518607086.66.0.467229070634.issue32843@psf.upfronthosting.co.za> New submission from Cheryl Sabella : Serhiy had made the following comments on the pull request for issue11015, but that PR was merged before applying his requested changes. This issue is to address his concerns. TESTFN_NONASCII - How different from TESTFN_UNICODE? PGO - value? True/False? TEST_SUPPORT_DIR - Not used. max_memuse - Not used. MISSING_C_DOCSTRINGS - Remove `Return` since it's a constant. HAVE_DOCSTRINGS - Remove `Check` since it's a constant. Possibly group the next 3 to avoid repetition: unlink(filename) - Add an explanation why this is needed (due to antiviruses that can hold files open and prevent thy deletion). rmdir(filename) - Add an explanation why this is needed (due to antiviruses that can hold files open and prevent thy deletion). rmtree(path) - Add an explanation why this is needed (due to antiviruses that can hold files open and prevent thy deletion). make_legacy_pyc(source) - Add markup references to PEPs. system_must_validate_cert(f) - This is a decorator and change text to "Skip the test on TLS certificate validation failures.". match_test(test) and set_match_tests(patterns) - Used internally to regrtest. Remove or ask Victor to document as the current documentation is useless. check_impl_detail(**guards) - Document that a boolean is returned and check the docstring to include more information. get_original_stdout - Add (). strip_python_strerr(stderr) - Typo `strip_python_stderr` and make it clear that *stderr* is a byte string. disable_faulthandler() - Wrong description. disable_gc() - Add that it works only if it was enabled. start_threads(threads, unlock=None) - Document that *threads* is a sequence of threads and document what unlock is. calcobjsize(fmt) - Add the purpose of this - calcobjsize() returns the size of Python object (PyObject) whose structure is defined by fmt with account of Python object header. calcvobjsize(fmt) - Same as above for PyVarObject. requires_freebsd_version(*min_version) - Change to skip the test instead of Raise. cpython_only(test) - Remove argument. no_tracing(func) - Remove argument. refcount_test(test) - Remove argument. reap_threads(func) - Remove argument. bigaddrspacetest(f) - Remove argument. import_module(name, deprecated=False, *, required_on()) - Missed = check_free_after_iterating(test, iter, cls, args=()) - This description is misleading. This function doesn't test iter. iter is either iter or reversed, cls is a base iterable class, args are arguments for its constructor. The true description is too complex, I suggest to remove this function from the documentation. missing_compiler_executable(cmd_names=[]) - It is used only in distutils tests and should be in distutils.tests.support. CleanImport(*module_names) - Format DeprecationWarning as a link. DirsOnSysPath(*paths) - Format first sys.path as a link, Keeps the first one (in the above sentence) and format other mentions as ``sys.path`` or :data:`!sys.path`. SaveSignals() - How to use it? Matcher() - This class is used only in test_logging, and only with TestHandler. These classes should be documented together and with references to logging. I'm not sure they should be in test.support. BasicTestRunner() - This is an internal class used for implementing run_unittest(). No need to expose it. TestHandler(logging.handlers.BufferingHandler) - I'm not sure it should be in test.support rather of test_logging. assert_python_ok(*args, **env_vars) - Since this is a keyword argument name, it should be formatter as *__cleanenv*. ---------- assignee: docs at python components: Documentation messages: 312170 nosy: csabella, docs at python, ncoghlan, serhiy.storchaka, terry.reedy priority: normal severity: normal status: open title: More revisions to test.support docs type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 06:22:55 2018 From: report at bugs.python.org (Yauhen) Date: Wed, 14 Feb 2018 11:22:55 +0000 Subject: [issue32756] argparse: parse_known_args: raising exception on unknown arg following known one In-Reply-To: <1517661104.06.0.467229070634.issue32756@psf.upfronthosting.co.za> Message-ID: <1518607375.33.0.467229070634.issue32756@psf.upfronthosting.co.za> Yauhen added the comment: I am adding one more testcase in order to clarify more the problem: import argparse import sys parser = argparse.ArgumentParser(prog=sys.argv[0], add_help=False) parser.add_argument('-a', action='store_true') parser.add_argument('-b', action='store_true') parser.add_argument('-c', action='store_true') parsed_args, unknown_args = parser.parse_known_args(sys.argv[1:]) print(parsed_args) print(unknown_args) $ python argparse_test.py -ab Namespace(a=True, b=True, c=False) [] Expected result: $ python argparse_test.py -ab -cd Namespace(a=True, b=True, c=True) ['-d'] Actual result: $ python argparse_test.py -ab -cd usage: argparse_test.py [-a] [-b] [-c] argparse_test.py: error: argument -c: ignored explicit argument 'd' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 07:14:12 2018 From: report at bugs.python.org (Fangyi Zhou) Date: Wed, 14 Feb 2018 12:14:12 +0000 Subject: [issue32795] subprocess.check_output() with timeout does not exit if child process does not generate output after timeout In-Reply-To: <1518081067.06.0.467229070634.issue32795@psf.upfronthosting.co.za> Message-ID: <1518610452.01.0.467229070634.issue32795@psf.upfronthosting.co.za> Change by Fangyi Zhou : ---------- keywords: +patch pull_requests: +5480 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 07:15:09 2018 From: report at bugs.python.org (Fangyi Zhou) Date: Wed, 14 Feb 2018 12:15:09 +0000 Subject: [issue32795] subprocess.check_output() with timeout does not exit if child process does not generate output after timeout In-Reply-To: <1518081067.06.0.467229070634.issue32795@psf.upfronthosting.co.za> Message-ID: <1518610509.55.0.467229070634.issue32795@psf.upfronthosting.co.za> Fangyi Zhou added the comment: I choose to implement the first way. I believe this is in favour in prevention of resource leaks and zombie processes. https://github.com/python/cpython/pull/5684 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 08:44:31 2018 From: report at bugs.python.org (Devin Bayer) Date: Wed, 14 Feb 2018 13:44:31 +0000 Subject: [issue17050] argparse.REMAINDER doesn't work as first argument In-Reply-To: <1359276661.57.0.274871702559.issue17050@psf.upfronthosting.co.za> Message-ID: <1518615871.1.0.467229070634.issue17050@psf.upfronthosting.co.za> Change by Devin Bayer : ---------- nosy: +akvadrako _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 08:46:11 2018 From: report at bugs.python.org (Devin Bayer) Date: Wed, 14 Feb 2018 13:46:11 +0000 Subject: [issue17050] argparse.REMAINDER doesn't work as first argument In-Reply-To: <1359276661.57.0.274871702559.issue17050@psf.upfronthosting.co.za> Message-ID: <1518615971.58.0.467229070634.issue17050@psf.upfronthosting.co.za> Devin Bayer added the comment: Can we at least document that argparse.REMAINDER cannot be used as the first argument? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 08:48:23 2018 From: report at bugs.python.org (Devin Bayer) Date: Wed, 14 Feb 2018 13:48:23 +0000 Subject: [issue17050] argparse.REMAINDER doesn't work as first argument In-Reply-To: <1359276661.57.0.274871702559.issue17050@psf.upfronthosting.co.za> Message-ID: <1518616103.24.0.467229070634.issue17050@psf.upfronthosting.co.za> Devin Bayer added the comment: I don't understand how this is about positionals vs optionals. REMAINDER is supposed to capture everything from that point forward, not just positionals. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 09:17:03 2018 From: report at bugs.python.org (Eryk Sun) Date: Wed, 14 Feb 2018 14:17:03 +0000 Subject: [issue32795] subprocess.check_output() with timeout does not exit if child process does not generate output after timeout In-Reply-To: <1518081067.06.0.467229070634.issue32795@psf.upfronthosting.co.za> Message-ID: <1518617823.07.0.467229070634.issue32795@psf.upfronthosting.co.za> Eryk Sun added the comment: Work on related issues extends back 9 years to issue 5115. Also see issue 26534. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 10:00:52 2018 From: report at bugs.python.org (Eric Osborne) Date: Wed, 14 Feb 2018 15:00:52 +0000 Subject: [issue32820] Add bits method to ipaddress In-Reply-To: <1518584162.51.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: Eric Osborne added the comment: Cool, I will kick it over to python-ideas. I checked in some code to handle the format string and it's a lot like what you're suggesting, so I'll leave that in there and see what happens. Thanks! eric On Tue, Feb 13, 2018 at 11:56 PM Nick Coghlan wrote: > > Nick Coghlan added the comment: > > Aye, definitely worth a thread on python-ideas. My rationale for > suggesting something based on the built-in numeric codes is that it makes > it straightforward for *users* to transfer knowledge from that > mini-language. > > As far as parsing goes, I was thinking of something along the lines of the > following naive approach: > > typechar = fmt[-1:] > if not typechar or typechar not in ("b", "n", "x"): > return super().__format__(fmt) > prefix, group_sep, suffix = fmt[:-1].rpartition("_") > if prefix and prefix != "#" or suffix: > return super().__format__(fmt) > field_width = self._calculate_field_width(typechar) > return format(int(self), > f"{prefix}0{field_width}{group_sep}{type_char}") > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 11:13:18 2018 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 14 Feb 2018 16:13:18 +0000 Subject: [issue32436] Implement PEP 567 In-Reply-To: <1516666281.22.0.467229070634.issue32436@psf.upfronthosting.co.za> Message-ID: <1518624798.51.0.467229070634.issue32436@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- pull_requests: +5481 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 11:39:26 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 14 Feb 2018 16:39:26 +0000 Subject: [issue32839] Add after_info as a function to tkinter In-Reply-To: <1518529095.33.0.467229070634.issue32839@psf.upfronthosting.co.za> Message-ID: <1518626366.89.0.467229070634.issue32839@psf.upfronthosting.co.za> Cheryl Sabella added the comment: >>> It is internal, it was not exposed to Tkinter users before, and the API for restoring the original Python callable is private. I thought `bind(sequence)` also returned these internal Tcl function names? For example, if I do a print on the set_breakpoint_here text widget in IDLE, it prints : if {"[140358823678376set_breakpoint_here %# %b %f %h %k %s %t %w %x %y %A %E %K %N %W %T %X %Y %D]" == "break"} break In order for it to return the python function name, I think the `after` function would need to write to a dictionary of `name: func` where name is currently used as the Tcl function name that is registered? Is there something in tkinter that does this now that it could be modeled from? Since events are removed from Tcl once that are invoked, how would the dictionary be cleaned up? Would after_info need to be polled every once in a while to clean up the dictionary or would it just exist until the object is destroyed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 13:08:28 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 14 Feb 2018 18:08:28 +0000 Subject: [issue20632] Define a new __key__ protocol In-Reply-To: <1392423475.26.0.500398402328.issue20632@psf.upfronthosting.co.za> Message-ID: <1518631708.89.0.467229070634.issue20632@psf.upfronthosting.co.za> Nick Coghlan added the comment: Allowing for None-first and None-last ordering is a fair use case, but I'm not sure a __key__ protocol is the right answer to that - as your own example shows, it gets tricky when dealing with nested containers. It may make sense to raise the question on python-ideas for Python 3.8+, though, with Python-side ordering of database records as the main motivating use case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 14:39:50 2018 From: report at bugs.python.org (paul j3) Date: Wed, 14 Feb 2018 19:39:50 +0000 Subject: [issue17050] argparse.REMAINDER doesn't work as first argument In-Reply-To: <1359276661.57.0.274871702559.issue17050@psf.upfronthosting.co.za> Message-ID: <1518637190.5.0.467229070634.issue17050@psf.upfronthosting.co.za> paul j3 added the comment: This is another expression of the bigger problem of handling arguments that look like flags. In optparse the 'nargs' (or equivalent, it doesn't handle positionals), control how many arguments an Option takes, regardless of their form. In argparse, the distinction between a option (flag) and argument has priority. So it is difficult to treat strings like '--def' as a plain argument. The default behavior is to treat it as an optional flag. https://bugs.python.org/issue9334 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 14:53:19 2018 From: report at bugs.python.org (Devin Bayer) Date: Wed, 14 Feb 2018 19:53:19 +0000 Subject: [issue17050] argparse.REMAINDER doesn't work as first argument In-Reply-To: <1359276661.57.0.274871702559.issue17050@psf.upfronthosting.co.za> Message-ID: <1518637999.26.0.467229070634.issue17050@psf.upfronthosting.co.za> Devin Bayer added the comment: I still don't understand how that corresponds to the described behavior of REMAINDER and what it has to do with this bug. How can REMAINDER possibly ever work if optionals take priority? However it does when it's not the first argument. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 15:45:43 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 14 Feb 2018 20:45:43 +0000 Subject: [issue32840] Must install python 3.6.3 when 3.6.4 already installed In-Reply-To: <1518552638.75.0.467229070634.issue32840@psf.upfronthosting.co.za> Message-ID: <1518641143.22.0.467229070634.issue32840@psf.upfronthosting.co.za> Change by Ned Deily : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 16:10:48 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Wed, 14 Feb 2018 21:10:48 +0000 Subject: [issue32844] subprocess may incorrectly redirect a low fd to stderr if another low fd is closed Message-ID: <1518642648.87.0.467229070634.issue32844@psf.upfronthosting.co.za> New submission from Alexey Izbyshev : When redirecting, subprocess attempts to achieve the following state: each fd to be redirected to is less than or equal to the fd it is redirected from, which is necessary because redirection occurs in the ascending order of destination descriptors. It fails to do so if a low fd (< 2) is redirected to stderr and another low fd is closed, which may lead to an incorrect redirection, for example: $ cat test.py import os import subprocess import sys os.close(0) subprocess.call([sys.executable, '-c', 'import sys; print("Hello", file=sys.stderr)'], stdin=2, stderr=1) $ python3 test.py 2>/dev/null $ python3 test.py >/dev/null Hello Expected behavior: $ python3 test.py >/dev/null $ python3 test.py 2>/dev/null Hello ---------- components: Extension Modules, Library (Lib) messages: 312181 nosy: gregory.p.smith, izbyshev priority: normal severity: normal status: open title: subprocess may incorrectly redirect a low fd to stderr if another low fd is closed type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 16:16:07 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Wed, 14 Feb 2018 21:16:07 +0000 Subject: [issue32844] subprocess may incorrectly redirect a low fd to stderr if another low fd is closed In-Reply-To: <1518642648.87.0.467229070634.issue32844@psf.upfronthosting.co.za> Message-ID: <1518642967.49.0.467229070634.issue32844@psf.upfronthosting.co.za> Change by Alexey Izbyshev : ---------- keywords: +patch pull_requests: +5482 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 16:22:06 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Wed, 14 Feb 2018 21:22:06 +0000 Subject: [issue32844] subprocess may incorrectly redirect a low fd to stderr if another low fd is closed In-Reply-To: <1518642648.87.0.467229070634.issue32844@psf.upfronthosting.co.za> Message-ID: <1518643326.58.0.467229070634.issue32844@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: Note that the PR doesn't attempt to fix leaking of low dup'ed fds to the child. I'll file a separate report for that in a while. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 18:11:47 2018 From: report at bugs.python.org (Eric Cousineau) Date: Wed, 14 Feb 2018 23:11:47 +0000 Subject: [issue32845] Mac: Local modules can shadow builtins (e.g. a local `math.py` can shadow `math`) Message-ID: <1518649906.98.0.467229070634.issue32845@psf.upfronthosting.co.za> New submission from Eric Cousineau : We ran into an issue with our library; we build a submodule named `math.so`, and have a test `math_test` which is ran in the same directory as this module (since this is how we've written it with Bazel's generated Python binaries): https://github.com/RobotLocomotion/drake/issues/8041 This happens for us on HighSierra / Sierra MacOS (for *.py and *.so modules); Ubuntu Linux seems fine. I have a reproduction script just for *.py files here: https://github.com/EricCousineau-TRI/repro/blob/b08bc47/bug/mac_builtin_shadow/test.sh#L38 (attached this as `test.sh`) The module is exposed on the path given that it neighbors the first execution of the `import_test.py` script. The second execution (where the `import_test.py` script is moved up one level) succeeds on Mac (s.t. the `math.py` is not in `sys.path`). This behavior seems to violate the documentation: https://docs.python.org/2/tutorial/modules.html#the-module-search-path ---------- components: macOS files: test.sh messages: 312183 nosy: Eric Cousineau, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Mac: Local modules can shadow builtins (e.g. a local `math.py` can shadow `math`) type: behavior versions: Python 2.7 Added file: https://bugs.python.org/file47442/test.sh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 18:19:05 2018 From: report at bugs.python.org (paul j3) Date: Wed, 14 Feb 2018 23:19:05 +0000 Subject: [issue17050] argparse.REMAINDER doesn't work as first argument In-Reply-To: <1359276661.57.0.274871702559.issue17050@psf.upfronthosting.co.za> Message-ID: <1518650345.62.0.467229070634.issue17050@psf.upfronthosting.co.za> paul j3 added the comment: Oops, I see I already mentioned 9334. Here the parsing sequence is a bit different, and the fix I suggest there would not apply here. But the underlying issue is still there - the parser has, in its first iteration, determined that the '--def' looks like an optional. This first scan focuses on the form, not on possible 'nargs' sequences. In _parse_known_args() it alternates between 'consume_positionals' and 'consume_optional' In the docs example: '--foo B cmd --arg1 XX ZZ' It finds the '--foo' and parses that as optional, consuming the 'B' Next it finds 'cmd', and so starts to parse positionals. Here is pays attention to the REMAINDER, and thus consumes 'cmd' and the following strings. In other words, once it starts to parse positionals, it can parse as many as match their nargs. The same applies to the 'abc --def' example given at the start of this question. But in the 2nd example, with just the REMAINDER and a ['--def'], it doesn't parse any positionals. The code has this comment: # consume any Positionals preceding the next option There aren't any strings preceding the '--def', so it moves on to parsing this 'optional'. Yes, I know you think it really is a positional, because you know about the REMAINDER nargs, but the code doesn't know this (or at least doesn't check for that possibility. As stressed in 9334, when a dashed string is used in a argument like slot, there's an inherent ambiguity. Should it treat as a (potential) error, or accept the programmer and/or user is going against convention? https://bugs.python.org/issue9334#msg111691 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 18:35:27 2018 From: report at bugs.python.org (paul j3) Date: Wed, 14 Feb 2018 23:35:27 +0000 Subject: [issue17050] argparse.REMAINDER doesn't work as first argument In-Reply-To: <1359276661.57.0.274871702559.issue17050@psf.upfronthosting.co.za> Message-ID: <1518651327.93.0.467229070634.issue17050@psf.upfronthosting.co.za> paul j3 added the comment: REMAINDER is not widely used, and probably was not tested thoroughly during development. It works for the example given in the docs. A variant, argparse.PARSER ('A...') is widely used. This is, effectively, REMAINDER ('...') that requires an initial non-optional string. Sort of what '+' is to '*'. I suspect REMAINDER is most reliable when used as nargs for an optional, e.g. add_argument('--rest', nargs=argparse.REMAINDER) That way it's clear to everyone, developer, user, and the parser that the following strings are to be taken is. When parsing the command line, clarity should have priority over convenience. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 19:07:38 2018 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 15 Feb 2018 00:07:38 +0000 Subject: [issue32845] Mac: Local modules can shadow builtins (e.g. a local `math.py` can shadow `math`) In-Reply-To: <1518649906.98.0.467229070634.issue32845@psf.upfronthosting.co.za> Message-ID: <1518653258.47.0.467229070634.issue32845@psf.upfronthosting.co.za> Eric V. Smith added the comment: This is the expected behavior, fortunately or not. "math" is not builtin in the sense that is used in that paragraph. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 19:21:14 2018 From: report at bugs.python.org (Devin Bayer) Date: Thu, 15 Feb 2018 00:21:14 +0000 Subject: [issue17050] argparse.REMAINDER doesn't work as first argument In-Reply-To: <1359276661.57.0.274871702559.issue17050@psf.upfronthosting.co.za> Message-ID: <1518654074.08.0.467229070634.issue17050@psf.upfronthosting.co.za> Devin Bayer added the comment: This bug is 5 years old and you are arguing what? That it doesn't matter because it's rarely used compared to some undocumented useless alternative? It's mildly interesting to hear about some implementation detail but I really don't care. I think you're just wasting your time. I want the docs to match the implementation. But it doesn't matter - argparse is shit anyway - I'll just write my own parser. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 19:22:10 2018 From: report at bugs.python.org (Devin Bayer) Date: Thu, 15 Feb 2018 00:22:10 +0000 Subject: [issue17050] argparse.REMAINDER doesn't work as first argument In-Reply-To: <1359276661.57.0.274871702559.issue17050@psf.upfronthosting.co.za> Message-ID: <1518654130.95.0.467229070634.issue17050@psf.upfronthosting.co.za> Change by Devin Bayer : ---------- nosy: -akvadrako _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 19:23:33 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 15 Feb 2018 00:23:33 +0000 Subject: [issue32846] Deletion of large sets of strings is extra slow Message-ID: <1518654213.84.0.467229070634.issue32846@psf.upfronthosting.co.za> New submission from Terry J. Reedy : https://metarabbit.wordpress.com/2018/02/05/pythons-weak-performance-matters/, a blog post on cpython speed, clains "deleting a set of 1 billion strings takes >12 hours". (No other details provided.) I don't have the 100+ gigabytes of ram needed to confirm this, but with installed 64 bit 3.7.0b1 with Win10 and 12 gigabyes, I confirmed that there is a pronounced super-linear growth in string set deletion (unlike with an integer set). At least half of ram was available. Seconds to create and delete sets millions integers strings of items create delete create delete 1 .08 .02 .36 .08 2 .15 .03 .75 .17 4 .30 .06 1.55 .36 8 .61 .12 3.18 .76 16 1.22 .24 6.48 1.80 < slightly more than double 32 2.4 .50 13.6 5.56 < more than triple 64 4.9 1.04 28 19 < nearly quadruple 128 10.9 2.25 100 56 80 < quadruple with 1.5 x size For 100 million strings, I got about the same 56 and 80 seconds when timing with a clock, without the timeit gc suppression. I interrupted the 128M string run after several minutes. Even if there is swapping to disk during creation, I would not expect it during deletion. The timeit code: import timeit for i in (1,2,4,8,16,32,64,128): print(i, 'int') print(timeit.Timer(f's = {{n for n in range({i}*1000000)}}') .timeit(number=1)) print(timeit.Timer('del s', f's = {{n for n in range({i}*1000000)}}') .timeit(number=1)) for i in (1,2,4,8,16,32,64,100): print(i, 'str') print(timeit.Timer(f's = {{str(n) for n in range({i}*1000000)}}') .timeit(number=1)) print(timeit.Timer('del s', f's = {{str(n) for n in range({i}*1000000)}}') .timeit(number=1)) Raymond, I believe you monitor the set implementation, and I know Victor is interested in timing and performance. ---------- messages: 312188 nosy: rhettinger, terry.reedy, vstinner priority: normal severity: normal stage: needs patch status: open title: Deletion of large sets of strings is extra slow type: performance versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 19:56:24 2018 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 15 Feb 2018 00:56:24 +0000 Subject: [issue32845] Mac: Local modules can shadow builtins (e.g. a local `math.py` can shadow `math`) In-Reply-To: <1518649906.98.0.467229070634.issue32845@psf.upfronthosting.co.za> Message-ID: <1518656184.16.0.467229070634.issue32845@psf.upfronthosting.co.za> Eric V. Smith added the comment: Removing macOS since this isn't Mac specific. ---------- components: +Interpreter Core -macOS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 20:08:51 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 15 Feb 2018 01:08:51 +0000 Subject: [issue32845] Mac: Local modules can shadow builtins (e.g. a local `math.py` can shadow `math`) In-Reply-To: <1518649906.98.0.467229070634.issue32845@psf.upfronthosting.co.za> Message-ID: <1518656931.41.0.467229070634.issue32845@psf.upfronthosting.co.za> Ned Deily added the comment: This had me confused for a while. But eric.smith's comment is the clue to what's going on here: > This is the expected behavior, fortunately or not. "math" is not builtin in the sense that is used in that paragraph. The difference in behavior that you are seeing seems to be due to the fact that the Debian/Ubuntu uses a non-standard build to build-in the standard lib "math" module, whereas the Mac version you are using undoubtedly does not. You can see this behavior yourself if you build your own version of python (either 2.7 or 3.x) on your Ubuntu system. You should now see the same behavior you see on the Mac. For example: # on a current Debian system $ /usr/bin/python2.7 -c 'import sys,math;print(sys.modules["math"])' # on a current Mac system using the python.org 2.7.14 $ /usr/local/bin/python2.7 -c 'import sys,math;print(sys.modules["math"])' So, I don't think this is an issue at all. Please reopen if you think there is actually a problem here. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 21:21:54 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 15 Feb 2018 02:21:54 +0000 Subject: [issue32839] Add after_info as a function to tkinter In-Reply-To: <1518529095.33.0.467229070634.issue32839@psf.upfronthosting.co.za> Message-ID: <1518661314.36.0.467229070634.issue32839@psf.upfronthosting.co.za> Terry J. Reedy added the comment: A person who can create a tcl callback with tk.call can inquire with tk.call('after', 'info', id). That does not cover callbacks created by tcl or extensions thereof, but references to such callbacks are unlikely to be useful to anyone who does not know any tcl. I see these choices for after_info(id): A. Return the tcl script reference even when it wraps a python function. I don't like this, as the tcl reference is useless to most people. B. Convert the reference to a Python function if possible but return it if not. This is a bit awkward to document and any use requires a type check. Having a function return such different types, depending on the input, is frowned upon. C. Convert the reference to a function if possibe and raise TypeError or ValueError is not. This is incomplete but easier for a pure Python programmer to deal with. The documentation could specify how those who want a tcl reference can get it. D. Don't implement after_info(id), at least not now, and just after_info(). Information about the current existence of a callback is contained in the list returned by after_info(). Each of the following pairs should be equivalent: assertIn(id, after_info()) assertEqual(len(after_info(id)), 2) assertNotIn(id, after_info()) assertRaises(TclError, after_info, id) (For testing after_info(), assertIn and assertNotIn avoid assuming that tcl does not add any internal callbacks.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 14 22:11:57 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 15 Feb 2018 03:11:57 +0000 Subject: [issue32847] Add DirectoryNotEmptyError subclass of OSError Message-ID: <1518664317.8.0.467229070634.issue32847@psf.upfronthosting.co.za> New submission from Barry A. Warsaw : I just ran across errno 39 (Directory not empty) when using Path.rename(newdir) when newdir already existed and was not empty. I realized that OSError exceptions don't have a DirectoryNotEmptyError subclass. Maybe we should add one? Probably not important or common enough to add for 3.7 given we're in beta now. ---------- messages: 312192 nosy: barry priority: normal severity: normal status: open title: Add DirectoryNotEmptyError subclass of OSError versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 00:31:20 2018 From: report at bugs.python.org (Jay Yin) Date: Thu, 15 Feb 2018 05:31:20 +0000 Subject: [issue32773] distutils should NOT preserve timestamps In-Reply-To: <1517846476.27.0.467229070634.issue32773@psf.upfronthosting.co.za> Message-ID: <1518672679.99.0.467229070634.issue32773@psf.upfronthosting.co.za> Change by Jay Yin : ---------- pull_requests: +5483 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 00:42:58 2018 From: report at bugs.python.org (Jay Yin) Date: Thu, 15 Feb 2018 05:42:58 +0000 Subject: [issue32642] add support for path-like objects in sys.path In-Reply-To: <1516771632.94.0.467229070634.issue32642@psf.upfronthosting.co.za> Message-ID: <1518673378.39.0.467229070634.issue32642@psf.upfronthosting.co.za> Change by Jay Yin : ---------- keywords: +patch pull_requests: +5484 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 02:20:06 2018 From: report at bugs.python.org (Arun Solomon) Date: Thu, 15 Feb 2018 07:20:06 +0000 Subject: [issue32848] Valgrind error with python Message-ID: <1518679206.96.0.467229070634.issue32848@psf.upfronthosting.co.za> New submission from Arun Solomon : Hi... I am facing the problem python along with valgrind. I was getting default valgrind warnings messages. I have created the sample.py. sample.py file does not have any code. I created empty py file to confirm that my code does not have any memory leaks. Following is the valgrind command that I am using in command line: valgrind --leak-check=full --show-reachable=yes --error-limit=no --gen-suppressions=all --log-file=msm_suppress.log -v /home/arunspra/py_src/Python-2.7.5/python sample.py I was getting plenty of valgrind warnings. I surfed in the google and I got to know that i need to configure python by disabling pymalloc. As said by technical peoples, If pymalloc was disabled, we would not got any memory related errors. But i was getting the memory related error. Following is my command that i used to disable pymalloc: ./configure --without-pymalloc --with-pydebug make Then I ran above said valgrind command. I was getting 1299 valgrind warnings. If i enable pymalloc, I was getting only 108 valgrind warnings. Following is my software versions: Cent os: 7.3 Python: 2.7.5 Valgrind: 3.12.0 PS: If i configure and build python, i was getting an Import Error: No module named netifaces. I am using netifaces in my project. If i use system inbuilt python, i am not getting netifaces import error. Can anyone please advice me to resolve this issue. ---------- components: Build files: suppress.zip messages: 312193 nosy: Arun Solomon, vstinner priority: normal severity: normal status: open title: Valgrind error with python type: compile error versions: Python 2.7 Added file: https://bugs.python.org/file47443/suppress.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 04:20:31 2018 From: report at bugs.python.org (Rudolph Froger) Date: Thu, 15 Feb 2018 09:20:31 +0000 Subject: [issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams Message-ID: <1518686430.4.0.467229070634.issue32849@psf.upfronthosting.co.za> New submission from Rudolph Froger : Sometimes a new Python 3.6.4 process is aborted by the kernel (FreeBSD 11.1) (before loading my Python files). Found in syslog: kernel: pid 22433 (python3.6), uid 2014: exited on signal 6 (core dumped) Fatal Python error: Py_Initialize: can't initialize sys standard streams OSError: [Errno 9] Bad file descriptor I've been able to run ktrace on such a Python process, see attachment. See around line 940: "RET fstat -1 errno 9 Bad file descriptor" ---------- files: alles-23978 messages: 312194 nosy: rudolphf priority: normal severity: normal status: open title: Fatal Python error: Py_Initialize: can't initialize sys standard streams versions: Python 3.6 Added file: https://bugs.python.org/file47444/alles-23978 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 04:27:06 2018 From: report at bugs.python.org (=?utf-8?q?Lum=C3=ADr_Balhar?=) Date: Thu, 15 Feb 2018 09:27:06 +0000 Subject: [issue21258] Add __iter__ support for mock_open In-Reply-To: <1397671005.18.0.0743040241878.issue21258@psf.upfronthosting.co.za> Message-ID: <1518686826.4.0.467229070634.issue21258@psf.upfronthosting.co.za> Change by Lum?r Balhar : ---------- nosy: +frenzy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 04:27:37 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 15 Feb 2018 09:27:37 +0000 Subject: [issue32781] lzh_tw is missing in locale.py In-Reply-To: <1517905073.42.0.467229070634.issue32781@psf.upfronthosting.co.za> Message-ID: <1518686857.89.0.467229070634.issue32781@psf.upfronthosting.co.za> INADA Naoki added the comment: lzh_tw was added in this commit: https://github.com/bminor/glibc/commit/5057e7ce826bb0be3f476408b2ae364042f2a9bb#diff-3d056472e12e5dc464fa44144719b82f I don't know why Python should have such a large locale alias table. I added Serhiy to nosy list because he is author of issue20079. Serhiy, how do you think about making UTF-8 as default charset and drop all aliases like "xx_YY" -> "xx_YY.UTF-8" ? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 04:28:51 2018 From: report at bugs.python.org (Rudolph Froger) Date: Thu, 15 Feb 2018 09:28:51 +0000 Subject: [issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams In-Reply-To: <1518686430.4.0.467229070634.issue32849@psf.upfronthosting.co.za> Message-ID: <1518686931.44.0.467229070634.issue32849@psf.upfronthosting.co.za> Change by Rudolph Froger : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 04:56:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 15 Feb 2018 09:56:35 +0000 Subject: [issue32781] lzh_tw is missing in locale.py In-Reply-To: <1517905073.42.0.467229070634.issue32781@psf.upfronthosting.co.za> Message-ID: <1518688595.79.0.467229070634.issue32781@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm not sure that wrong guess is better that exception. It looks to me that there is something wrong with the way we use the alias table. It is glibc centric, but some entries contradict glibc, because the X11 alias have a precedence. There are known issues on OS X. I think the other way for determining the locale encoding should be used. ---------- nosy: +benjamin.peterson, lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 05:03:40 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 15 Feb 2018 10:03:40 +0000 Subject: [issue32781] lzh_tw is missing in locale.py In-Reply-To: <1517905073.42.0.467229070634.issue32781@psf.upfronthosting.co.za> Message-ID: <1518689020.86.0.467229070634.issue32781@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue20087. It added lzh_tw locale, but later this change was reverted. Thus I close this issue as a duplicate. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Mismatch between glibc and X11 locale.alias _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 05:22:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 15 Feb 2018 10:22:53 +0000 Subject: [issue32839] Add after_info as a function to tkinter In-Reply-To: <1518529095.33.0.467229070634.issue32839@psf.upfronthosting.co.za> Message-ID: <1518690173.1.0.467229070634.issue32839@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Since events are removed from Tcl once that are invoked, how would the dictionary be cleaned up? Would after_info need to be polled every once in a while to clean up the dictionary or would it just exist until the object is destroyed? Good question. Currently the reference to a callable is kept in the dict until the object is destroyed. This can be considered as a bug (see issue1524639). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 05:30:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 15 Feb 2018 10:30:48 +0000 Subject: [issue32839] Add after_info as a function to tkinter In-Reply-To: <1518529095.33.0.467229070634.issue32839@psf.upfronthosting.co.za> Message-ID: <1518690648.65.0.467229070634.issue32839@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I agreed with Cheryl's conclusion that likely after_cancel() had been called with None. The comments about 8.4 is wrong, and the solution in issue763637 is not correct. The current code code deletes the script for the first event if pass None to after_cancel(). Do you ming to open a PR for proper solving issue763637 Cheryl? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 06:00:04 2018 From: report at bugs.python.org (Iryna Shcherbina) Date: Thu, 15 Feb 2018 11:00:04 +0000 Subject: [issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture In-Reply-To: <1489413054.1.0.4012026352.issue29804@psf.upfronthosting.co.za> Message-ID: <1518692404.82.0.467229070634.issue29804@psf.upfronthosting.co.za> Iryna Shcherbina added the comment: PR 1559 fixes the issue in Fedora builds on arm64. The issue is no longer reproducible with Python 3.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 06:04:20 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 15 Feb 2018 11:04:20 +0000 Subject: [issue32779] urljoining an empty query string doesn't clear query string In-Reply-To: <1517892529.44.0.467229070634.issue32779@psf.upfronthosting.co.za> Message-ID: <1518692660.48.0.467229070634.issue32779@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Python follows not WhatWG but RFC. https://tools.ietf.org/html/rfc3986#section-5.2.2 is proper definition for url joining algorithm. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 07:28:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 15 Feb 2018 12:28:41 +0000 Subject: [issue32846] Deletion of large sets of strings is extra slow In-Reply-To: <1518654213.84.0.467229070634.issue32846@psf.upfronthosting.co.za> Message-ID: <1518697721.62.0.467229070634.issue32846@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 07:53:35 2018 From: report at bugs.python.org (R. David Murray) Date: Thu, 15 Feb 2018 12:53:35 +0000 Subject: [issue32848] Valgrind error with python In-Reply-To: <1518679206.96.0.467229070634.issue32848@psf.upfronthosting.co.za> Message-ID: <1518699215.95.0.467229070634.issue32848@psf.upfronthosting.co.za> R. David Murray added the comment: Did you notice that our configure has a --with-valgrind option? In any case, there isn't a bug in python here that you are reporting. If you want to continue to learn about our existing support for valgrind and find things that can be improved, you are welcome to open a more specific issue in the future. I would suggest seeking help on the python-list mailing list for learning about this, and for your second question. ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed type: compile error -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 08:33:46 2018 From: report at bugs.python.org (Arun Solomon) Date: Thu, 15 Feb 2018 13:33:46 +0000 Subject: [issue32848] Valgrind error with python In-Reply-To: <1518679206.96.0.467229070634.issue32848@psf.upfronthosting.co.za> Message-ID: <1518701626.47.0.467229070634.issue32848@psf.upfronthosting.co.za> Arun Solomon added the comment: Hi, I ran with the following command to configure python with valgrind: ./configure --without-pymalloc --with-pydebug --with-valgrind I was getting the following error: configure: error: Valgrind support requested but headers not available Python: 2.7.5 Valgrind: 3.12.0 How can i resolve this error? ---------- resolution: not a bug -> status: closed -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 08:39:14 2018 From: report at bugs.python.org (Stefan Krah) Date: Thu, 15 Feb 2018 13:39:14 +0000 Subject: [issue32848] Valgrind error with python In-Reply-To: <1518679206.96.0.467229070634.issue32848@psf.upfronthosting.co.za> Message-ID: <1518701954.37.0.467229070634.issue32848@psf.upfronthosting.co.za> Stefan Krah added the comment: You have two options: a) ./configure CFLAGS="-O0 -g" --without-pymalloc b) ./configure CFLAGS="-O0 -g" --with-valgrind For b) you need the Valgrind headers installed. --with-pydebug is always wrong when using Valgrind. ---------- nosy: +skrah status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 08:40:50 2018 From: report at bugs.python.org (Stefan Krah) Date: Thu, 15 Feb 2018 13:40:50 +0000 Subject: [issue32848] Valgrind error with python In-Reply-To: <1518679206.96.0.467229070634.issue32848@psf.upfronthosting.co.za> Message-ID: <1518702050.94.0.467229070634.issue32848@psf.upfronthosting.co.za> Change by Stefan Krah : ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 08:57:50 2018 From: report at bugs.python.org (Arun Solomon) Date: Thu, 15 Feb 2018 13:57:50 +0000 Subject: [issue32848] Valgrind error with python In-Reply-To: <1518679206.96.0.467229070634.issue32848@psf.upfronthosting.co.za> Message-ID: <1518703070.14.0.467229070634.issue32848@psf.upfronthosting.co.za> Arun Solomon added the comment: Hi Stefan, I tried with two configure options. Both of them, I am getting the same error. configure: error: Valgrind support requested but headers not available ---------- resolution: not a bug -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 09:02:32 2018 From: report at bugs.python.org (Matthias Urlichs) Date: Thu, 15 Feb 2018 14:02:32 +0000 Subject: [issue32850] Run gc_collect() before complaining about dangling threads Message-ID: <1518703352.66.0.467229070634.issue32850@psf.upfronthosting.co.za> New submission from Matthias Urlichs : Lib/test/support/__init__.py::threading_cleanup() complains about dangling threads even if the reference in question would be cleaned up by the garbage collector. This is not useful, esp. when the list of referrers to the "dangling" thread looks like this: [, , ] Thus I propose to check, run gc, check again, and only *then* complain-and-wait. Hence the attached patch for your consideration. ---------- components: Tests files: gc.patch keywords: patch messages: 312206 nosy: smurfix priority: normal severity: normal status: open title: Run gc_collect() before complaining about dangling threads type: resource usage versions: Python 3.7 Added file: https://bugs.python.org/file47445/gc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 09:12:42 2018 From: report at bugs.python.org (Matthias Urlichs) Date: Thu, 15 Feb 2018 14:12:42 +0000 Subject: [issue32850] Run gc_collect() before complaining about dangling threads In-Reply-To: <1518703352.66.0.467229070634.issue32850@psf.upfronthosting.co.za> Message-ID: <1518703962.74.0.467229070634.issue32850@psf.upfronthosting.co.za> Matthias Urlichs added the comment: Upon further consideration (and following the observation that my test cases no longer block for two seconds each after applying the first version of this patch): we do not want to clear the reference to "dangling_threads" since that's a weakset. We want to clear the "thread" variable, which holds a reference to a random member of that set, which will arbitrarily block the cleanup loop from ever succeeding. Updated patch attached. ---------- Added file: https://bugs.python.org/file47446/gc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 09:13:47 2018 From: report at bugs.python.org (Christian Heimes) Date: Thu, 15 Feb 2018 14:13:47 +0000 Subject: [issue32848] Valgrind error with python In-Reply-To: <1518679206.96.0.467229070634.issue32848@psf.upfronthosting.co.za> Message-ID: <1518704027.38.0.467229070634.issue32848@psf.upfronthosting.co.za> Christian Heimes added the comment: You are missing some dependencies. You have to install valgrind development package. This is a bug tracker, not a support forum. Please use the Python users mailing list or #python IRC channel to get help. ---------- nosy: +christian.heimes resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 09:25:51 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 15 Feb 2018 14:25:51 +0000 Subject: [issue32846] Deletion of large sets of strings is extra slow In-Reply-To: <1518654213.84.0.467229070634.issue32846@psf.upfronthosting.co.za> Message-ID: <1518704751.04.0.467229070634.issue32846@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: For lists and dicts the time of deletion is virtually linear. 1 int 5.2 9.8 2 int 5.8 9.7 4 int 5.6 9.8 8 int 5.8 10.0 16 int 5.5 9.7 32 int 5.4 9.6 64 int 5.6 9.0 128 int 5.6 8.7 1 str 7.6 13.3 2 str 8.0 13.8 4 str 7.4 14.0 8 str 7.5 14.3 16 str 7.6 14.4 32 str 8.0 14.7 64 str 7.9 14.3 100 str 8.1 14.0 1 int 60.4 10.5 2 int 61.0 11.1 4 int 61.1 10.4 8 int 60.1 11.1 16 int 61.1 10.1 32 int 61.5 9.9 64 int 60.7 9.6 128 int 60.8 9.4 1 str 204.9 15.4 2 str 247.4 15.8 4 str 275.3 16.1 8 str 299.3 14.8 16 str 312.8 14.8 32 str 329.2 14.2 64 str 344.5 14.1 100 str 386.2 14.4 (third and forth columns are time in nanoseconds per item, for creation and deletion) But when shuffle the input data before creating a collection, the deletion time becomes superlinear (and much slower). 1 int 17.4 38.9 2 int 19.1 41.3 4 int 24.4 46.3 8 int 28.0 49.5 16 int 28.1 53.4 32 int 29.8 67.2 64 int 35.2 90.6 128 int 42.6 143.1 1 str 21.1 56.3 2 str 24.3 58.2 4 str 27.1 63.6 8 str 27.3 73.9 16 str 29.4 99.2 32 str 34.3 144.8 64 str 41.8 229.5 100 str 46.3 338.4 In former examples (list, ordered dict) objects are iterated and deleted in order of creation. But in the set of strings items are deleted in non-predicable random order. I suppose the non-linear effect is related to memory management. ---------- nosy: +lemburg, tim.peters, twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 09:57:27 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 15 Feb 2018 14:57:27 +0000 Subject: [issue32846] Deletion of large sets of strings is extra slow In-Reply-To: <1518654213.84.0.467229070634.issue32846@psf.upfronthosting.co.za> Message-ID: <1518706647.7.0.467229070634.issue32846@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 10:18:19 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 15 Feb 2018 15:18:19 +0000 Subject: [issue32845] Mac: Local modules can shadow builtins (e.g. a local `math.py` can shadow `math`) In-Reply-To: <1518649906.98.0.467229070634.issue32845@psf.upfronthosting.co.za> Message-ID: <1518707899.06.0.467229070634.issue32845@psf.upfronthosting.co.za> Ned Deily added the comment: P.S. This issue points out once again why it is generally a bad idea to shadow or mix-and-match standard library module names. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 10:22:39 2018 From: report at bugs.python.org (Eric Cousineau) Date: Thu, 15 Feb 2018 15:22:39 +0000 Subject: [issue32845] Mac: Local modules can shadow builtins (e.g. a local `math.py` can shadow `math`) In-Reply-To: <1518649906.98.0.467229070634.issue32845@psf.upfronthosting.co.za> Message-ID: <1518708159.88.0.467229070634.issue32845@psf.upfronthosting.co.za> Eric Cousineau added the comment: > P.S. This issue points out once again why it is generally a bad idea to shadow or mix-and-match standard library module names. Duly noted! And thank y'all for the explanations! Can I ask if it's bad practice to use a standard library module name as a submodule, e.g. `example_module.math`? TBH, this all arises because we use Bazel and wanted to modularize our tests - we place them under `test/{name}.py` neighboring the target (sub)module, and Bazel presently generates a wrapper script which is executed in the same directory as the (sub)module, which is why this (unintended) shadowing occurs. I would like still like to have a submodule named `math`, so I can just teach our Bazel rules to not run the test in the same directory -- if having submodules named `math` is not frowned upon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 10:24:36 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 15 Feb 2018 15:24:36 +0000 Subject: [issue32846] Deletion of large sets of strings is extra slow In-Reply-To: <1518654213.84.0.467229070634.issue32846@psf.upfronthosting.co.za> Message-ID: <1518708276.37.0.467229070634.issue32846@psf.upfronthosting.co.za> Change by Serhiy Storchaka : Added file: https://bugs.python.org/file47447/bench_del.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 11:11:29 2018 From: report at bugs.python.org (TROUVERIE Joachim) Date: Thu, 15 Feb 2018 16:11:29 +0000 Subject: [issue32851] Complete your registration to Python tracker -- key uxOb1XizINE32OvAnH7tUiKMx4tFqGdK In-Reply-To: <20180215160836.49F95153B4E@psf.upfronthosting.co.za> Message-ID: <8a9a259a27901b596aca1e6bfec0951f@mailserver.linoame.fr> New submission from TROUVERIE Joachim : Thanks Le 15-02-2018 17:08, Python tracker a ?crit : > To complete your registration of the user "joack" with > Python tracker, please do one of the following: > > - send a reply to report at bugs.python.org and maintain the subject line as is (the > reply's additional "Re:" is ok), > > - or visit the following URL: > > https://bugs.python.org/?@action=confrego&otk=uxOb1XizINE32OvAnH7tUiKMx4tFqGdK [1] Links: ------ [1] https://bugs.python.org/?@action=confrego&otk=uxOb1XizINE32OvAnH7tUiKMx4tFqGdK ---------- messages: 312212 nosy: joack priority: normal severity: normal status: open title: Complete your registration to Python tracker -- key uxOb1XizINE32OvAnH7tUiKMx4tFqGdK _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 11:14:07 2018 From: report at bugs.python.org (R. David Murray) Date: Thu, 15 Feb 2018 16:14:07 +0000 Subject: [issue32851] Complete your registration to Python tracker -- key uxOb1XizINE32OvAnH7tUiKMx4tFqGdK Message-ID: <1518711247.59.0.467229070634.issue32851@psf.upfronthosting.co.za> Change by R. David Murray : ---------- Removed message: https://bugs.python.org/msg312212 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 11:14:47 2018 From: report at bugs.python.org (R. David Murray) Date: Thu, 15 Feb 2018 16:14:47 +0000 Subject: [issue32851] mistake Message-ID: <1518711287.77.0.467229070634.issue32851@psf.upfronthosting.co.za> Change by R. David Murray : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed title: Complete your registration to Python tracker -- key uxOb1XizINE32OvAnH7tUiKMx4tFqGdK -> mistake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 11:39:05 2018 From: report at bugs.python.org (Kyle Altendorf) Date: Thu, 15 Feb 2018 16:39:05 +0000 Subject: [issue32852] trace changes sys.argv from list to tuple Message-ID: <1518712745.86.0.467229070634.issue32852@psf.upfronthosting.co.za> New submission from Kyle Altendorf : Normally sys.argv is a list but when using the trace module sys.argv gets changed to a tuple. In my case this caused an issue with running an entry point due to the line: sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) When researching I found: https://stackoverflow.com/questions/47688568/trace-sys-argv-args-typeerror-tuple-object-does-not-support-item-assig They point out where trace assigns a tuple to sys.argv. https://github.com/python/cpython/blob/master/Lib/trace.py#L708 I'll see what I can do to put together a quick patch. $ cat t.py import sys print(sys.version) print(type(sys.argv)) $ /home/altendky/.pyenv/versions/3.7.0a2/bin/python t.py 3.7.0a2 (default, Feb 15 2018, 11:20:36) [GCC 6.3.0 20170516] $ /home/altendky/.pyenv/versions/3.7.0a2/bin/python -m trace --trace t.py --- modulename: t, funcname: t.py(1): import sys t.py(3): print(sys.version) 3.7.0a2 (default, Feb 15 2018, 11:20:36) [GCC 6.3.0 20170516] t.py(5): print(type(sys.argv)) --- modulename: trace, funcname: _unsettrace trace.py(71): sys.settrace(None) ---------- components: Library (Lib) messages: 312213 nosy: altendky priority: normal severity: normal status: open title: trace changes sys.argv from list to tuple versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 11:52:04 2018 From: report at bugs.python.org (Eli_B) Date: Thu, 15 Feb 2018 16:52:04 +0000 Subject: [issue32853] struct's docstring implies alignment is always performed Message-ID: <1518713524.32.0.467229070634.issue32853@psf.upfronthosting.co.za> New submission from Eli_B : In module struct's docstring, it says: "... The optional first format char indicates byte order, size and alignment:\n @: native order, size & alignment (default)\n =: native order, std. size & alignment\n <: little-endian, std. size & alignment\n >: big-endian, std. size & alignment\n !: same as >\n ..." The wording sounds like either native or standard alignment is performed, regardless of the optional first format char. In comparison, the table in https://docs.python.org/3.8/library/struct.html#byte-order-size-and-alignment states that in all modes other than the default, no alignment is performed. This is the actual behavior of the module. ---------- assignee: docs at python components: Documentation messages: 312214 nosy: Eli_B, docs at python priority: normal severity: normal status: open title: struct's docstring implies alignment is always performed type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 11:53:46 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 15 Feb 2018 16:53:46 +0000 Subject: [issue32846] Deletion of large sets of strings is extra slow In-Reply-To: <1518654213.84.0.467229070634.issue32846@psf.upfronthosting.co.za> Message-ID: <1518713626.47.0.467229070634.issue32846@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > In former examples (list, ordered dict) objects are iterated and deleted >in order of creation. But in the set of strings items are deleted in > non-predicable random order. I suppose the non-linear effect is > related to memory management. That makes sense. We're likely seeing an artifact of a favorable correspondence between the container pointer order and the order that the referred-to objects were created in memory in this somewhat non-representative test case. That is why lists lose the favorable timing when the data is shuffled. If the test bench creates all the referred-to objects in consecutive memory locations, then any container accessing those objects consecutively will benefit from spatial cache locality. (i.e. If there is more than one datum per cache line, the second read is virtually free. Likewise, memory controller read-ahead makes a long series of consecutive accesses cheaper.) It would be nice is the timing were run on strings instead of integers. Ints are somewhat weird in that the hashes of consecutive integers are themselves consecutive, you can fit two ints in one cache line. I'm not sure whether it applies here, but there may also be a branch-prediction effect as well: https://stackoverflow.com/questions/11227809/why-is-it-faster-to-process-a-sorted-array-than-an-unsorted-array FWIW, the deallocation routine for sets isn't doing anything special. It just calls Py_DECREF in a loop: static void set_dealloc(PySetObject *so) { setentry *entry; Py_ssize_t used = so->used; /* bpo-31095: UnTrack is needed before calling any callbacks */ PyObject_GC_UnTrack(so); Py_TRASHCAN_SAFE_BEGIN(so) if (so->weakreflist != NULL) PyObject_ClearWeakRefs((PyObject *) so); for (entry = so->table; used > 0; entry++) { if (entry->key && entry->key != dummy) { used--; Py_DECREF(entry->key); } } if (so->table != so->smalltable) PyMem_DEL(so->table); Py_TYPE(so)->tp_free(so); Py_TRASHCAN_SAFE_END(so) } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 12:13:29 2018 From: report at bugs.python.org (Kyle Altendorf) Date: Thu, 15 Feb 2018 17:13:29 +0000 Subject: [issue32852] trace changes sys.argv from list to tuple In-Reply-To: <1518712745.86.0.467229070634.issue32852@psf.upfronthosting.co.za> Message-ID: <1518714809.01.0.467229070634.issue32852@psf.upfronthosting.co.za> Change by Kyle Altendorf : ---------- keywords: +patch pull_requests: +5485 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 12:34:48 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 15 Feb 2018 17:34:48 +0000 Subject: [issue32846] Deletion of large sets of strings is extra slow In-Reply-To: <1518654213.84.0.467229070634.issue32846@psf.upfronthosting.co.za> Message-ID: <1518716088.2.0.467229070634.issue32846@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The 4th graph in this article may be showing the reason for the growth in random access times as the size gets bigger: https://www.extremetech.com/extreme/188776-how-l1-and-l2-cpu-caches-work-and-why-theyre-an-essential-part-of-modern-chips ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 12:49:54 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 15 Feb 2018 17:49:54 +0000 Subject: [issue32845] Mac: Local modules can shadow builtins (e.g. a local `math.py` can shadow `math`) In-Reply-To: <1518649906.98.0.467229070634.issue32845@psf.upfronthosting.co.za> Message-ID: <1518716994.44.0.467229070634.issue32845@psf.upfronthosting.co.za> Ned Deily added the comment: The example you gave caused problems because of the use of the ambiguous unqualified name "math". If you are careful to use qualified names, and/or perhaps use alias names ("as") to increase readability, there shouldn't be any problems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 13:10:32 2018 From: report at bugs.python.org (John Crawford) Date: Thu, 15 Feb 2018 18:10:32 +0000 Subject: [issue32854] Add ** Map Unpacking Support for namedtuple Message-ID: <1518718232.91.0.467229070634.issue32854@psf.upfronthosting.co.za> New submission from John Crawford : At present, `collections.namedtuple` does not support `**` map unpacking despite being a mapping style data structure. For example: >>> from collections import namedtuple >>> A = namedtuple("A", "a b c") >>> a = A(10, 20, 30) >>> def t(*args, **kwargs): ... print(f'args={args!r}, kwargs={kwargs!r}') ... >>> t(*a) args=(10, 20, 30), kwargs={} >>> t(**a) Traceback (most recent call last): File "", line 1, in TypeError: t() argument after ** must be a mapping, not A >>> No doubt, the lack of current support is due to namespace conflicts that result from trying to provide a `keys` method amidst also supporting attribute-style access to the `namedtuple` class. As we can see, providing a `keys` attribute in the `namedtuple` produces an interesting result: >>> Record = namedtuple("Record", "title keys description") >>> t(**Record(1, 2, 3)) Traceback (most recent call last): File "", line 1, in TypeError: attribute of type 'int' is not callable >>> To me, this calls out a design flaw in the `**` unpacking operator where it depends on a method that uses a non-system naming convention. It would make far more sense for the `**` operator to utilize a `__keys__` method rather than the current `keys` method. After all, the `____` naming convention was introduced to avoid namespace conflict problems like this one. ---------- components: Library (Lib) messages: 312218 nosy: John Crawford priority: normal severity: normal status: open title: Add ** Map Unpacking Support for namedtuple type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 13:40:29 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Thu, 15 Feb 2018 18:40:29 +0000 Subject: [issue32850] Run gc_collect() before complaining about dangling threads In-Reply-To: <1518703352.66.0.467229070634.issue32850@psf.upfronthosting.co.za> Message-ID: <1518720029.34.0.467229070634.issue32850@psf.upfronthosting.co.za> Change by Nathaniel Smith : ---------- nosy: +ezio.melotti, njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 13:52:50 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 15 Feb 2018 18:52:50 +0000 Subject: [issue32854] Add ** Map Unpacking Support for namedtuple In-Reply-To: <1518718232.91.0.467229070634.issue32854@psf.upfronthosting.co.za> Message-ID: <1518720770.89.0.467229070634.issue32854@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The intended way to support **unpacking is the _asdict() method: t(**a._asdict()) It doesn't really make sense to add direct support for **unpacking because named tuples are sequences and not mappings. To support **unpacking, we would have to add a keys() method and modify __getitem__() to handle both integer indexing and string key lookup. Once we have **a and a[k] and a.keys(), people would also want a.values() a.items() etc. The world gets murky when both sequence and mapping behaviors become commingled. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 14:26:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 15 Feb 2018 19:26:25 +0000 Subject: [issue32854] Add ** Map Unpacking Support for namedtuple In-Reply-To: <1518718232.91.0.467229070634.issue32854@psf.upfronthosting.co.za> Message-ID: <1518722785.73.0.467229070634.issue32854@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Concur with Raymond. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 15:04:12 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 15 Feb 2018 20:04:12 +0000 Subject: [issue32840] Must install python 3.6.3 when 3.6.4 already installed In-Reply-To: <1518552638.75.0.467229070634.issue32840@psf.upfronthosting.co.za> Message-ID: <1518725052.16.0.467229070634.issue32840@psf.upfronthosting.co.za> Steve Dower added the comment: This is a big feature request, as our current installer technology is specifically designed for ease of upgrading between minor versions (e.g. 3.6.3->3.6.4). We would need to completely rewrite our installers. If you want to avoid the installers completely and have partially isolated instances, consider the packages on nuget.org (see https://www.nuget.org/packages?q=publisher%3A%22Python+Software+Foundation%22 ). Note that these may break if you have installed a similar (same x.y) version of Python using the installer, but won't have any trouble if you have used Nuget to install all the versions on your machine. For fully isolated instances, you can add a "python._pth" file to these after they have been extracted (or a pyvenv.cfg with applocal=1 for Python 3.5). This will suppress all registry lookups that may be confused by normal installs, as well as environment variables and optionally user site packages and .pth files. ---------- type: behavior -> enhancement versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 15:06:28 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 15 Feb 2018 20:06:28 +0000 Subject: [issue32840] Must install python 3.6.3 when 3.6.4 already installed In-Reply-To: <1518552638.75.0.467229070634.issue32840@psf.upfronthosting.co.za> Message-ID: <1518725188.42.0.467229070634.issue32840@psf.upfronthosting.co.za> Steve Dower added the comment: > The problem is independent of word length. There should be no problem installing 3.6.4 of one architecture and 3.6.3 of the other at the same time. I myself do this all the time with every version of Python. You can't do it if they are the same architecture. Please confirm that this particular scenario does not work, and provide log files for both the successful and the failed install. There may be an issue specific to your environment that we can help diagnose. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 15:28:51 2018 From: report at bugs.python.org (Paul Fisher) Date: Thu, 15 Feb 2018 20:28:51 +0000 Subject: [issue32779] urljoining an empty query string doesn't clear query string In-Reply-To: <1517892529.44.0.467229070634.issue32779@psf.upfronthosting.co.za> Message-ID: <1518726531.71.0.467229070634.issue32779@psf.upfronthosting.co.za> Paul Fisher added the comment: In this case, the RFC is mismatched from the actual behaviour of browsers (as described and codified by WhatWG). It was surprising to me that urljoin() didn't do what I percieved as "the right thing" (and I expect other users would too). I would personally expect urljoin to do "the thing that everybody else does". Is there a sensible way to reduce this mismatch? For reference, Java's stdlib does what I would expect here: URI base = URI.create("https://example.com/?a=b"); URI rel = base.resolve("?"); System.out.println(rel); https://example.com/? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 20:21:32 2018 From: report at bugs.python.org (Tommy Carstensen) Date: Fri, 16 Feb 2018 01:21:32 +0000 Subject: [issue29480] Mac OSX Installer SSL Roots In-Reply-To: <1486553442.34.0.041490536597.issue29480@psf.upfronthosting.co.za> Message-ID: <1518744092.02.0.467229070634.issue29480@psf.upfronthosting.co.za> Tommy Carstensen added the comment: I can't user requests, urllib, pandas.read_html(), etc. because of this. I don't have root access / sudo rights. I've tried downloading OpenSSL from openssl.org and then installing with: `./config --prefix=/my/home/dir ; make ; make install` Then I tried installing Python with: `export CFLAGS="-I/my/home/dir/include" ; export LDFLAGS="-L/my/home/dir/lib" ; ./configure prefix=/my/home/dir ; make ; make install` But it doesn't work. How can I install Python3.6 without root access / admin rights? Thanks! ---------- nosy: +Tommy.Carstensen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 21:33:36 2018 From: report at bugs.python.org (Jay Yin) Date: Fri, 16 Feb 2018 02:33:36 +0000 Subject: [issue32855] Add documention stating supported Platforms Message-ID: <1518748416.8.0.467229070634.issue32855@psf.upfronthosting.co.za> New submission from Jay Yin : we can probably add a section that includes all supported platforms and possibly "partially" supported platforms, and maybe include platforms that currently aren't supported but want/plan to be supported. ---------- assignee: docs at python components: Documentation messages: 312225 nosy: docs at python, jayyin11043 priority: normal severity: normal status: open title: Add documention stating supported Platforms _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 15 22:02:08 2018 From: report at bugs.python.org (Ned Deily) Date: Fri, 16 Feb 2018 03:02:08 +0000 Subject: [issue32855] Add documention stating supported Platforms In-Reply-To: <1518748416.8.0.467229070634.issue32855@psf.upfronthosting.co.za> Message-ID: <1518750128.08.0.467229070634.issue32855@psf.upfronthosting.co.za> Change by Ned Deily : ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 00:02:15 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 16 Feb 2018 05:02:15 +0000 Subject: [issue32846] Deletion of large sets of strings is extra slow In-Reply-To: <1518654213.84.0.467229070634.issue32846@psf.upfronthosting.co.za> Message-ID: <1518757335.4.0.467229070634.issue32846@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Random idea: For some range of array sizes (bigger than L3 cache), there might be a net benefit to sorting L1-sized clumps of pointers before making the Py_DECREF calls. Possibly, the cost of sorting would be offset by improved memory access patterns. On the other hand, this might just optimize an artificial benchmark that isn't representative of real code where the data is actually being used. In that case, the program is already going to have to hop all over memory just to access the referred-to objects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 00:07:52 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 16 Feb 2018 05:07:52 +0000 Subject: [issue29480] Mac OSX Installer SSL Roots In-Reply-To: <1486553442.34.0.041490536597.issue29480@psf.upfronthosting.co.za> Message-ID: <1518757672.38.0.467229070634.issue29480@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I would like to suggest that the OSX installer automatically run "Install Certificates.command", or display a prompt to users saying "Run Now" during installation. +1 This would be really helpful. I occasionally get entire rooms full of Mac users with a fresh install of Python 3.6 who immediately get stuck with something as simple as: urllib.request.urlopen('http://www.python.org').read() The error messages that pop up are decidedly unhelpful. This is especially mystifying because the original request uses "http" and the site itself redirects to "https". ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 03:41:23 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 16 Feb 2018 08:41:23 +0000 Subject: [issue32856] Optimize the `for y in [x]` idiom in comprehensions Message-ID: <1518770483.24.0.467229070634.issue32856@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : There were a number of discussions about adding new syntax for temporary variables in comprehensions. The last was started yesterday on Python-Ideas (https://mail.python.org/pipermail/python-ideas/2018-February/048971.html). The problem is that all syntaxes proposed before are ugly. There are common solutions of this problem (calculating common subexpression only once): using internal comprehension or generator, or refactoring the inner expression as a local function where local variables can be used. For example [f(x) + g(f(x)) for x in range(10)] can be rewritten as f_samples = (f(x) for x in range(10)) [y+g(y) for y in f_samples] or def func(x): y = f(x) return y + g(y) [func(x) for x in range(10)] Stephan Houben suggested other idea (https://mail.python.org/pipermail/python-ideas/2018-February/048971.html): perform an assignment by iterating a one-element list. [y + g(y) for x in range(10) for y in [f(x)]] I never seen this idiom before, but seems it is well known for some other developers, and it looks less clumsy than other solutions with current syntax. Its advantage over hypothetical syntax ideas is that it is an existing syntax. Its disadvantage over hypothetical syntax ideas is that iterating a one-element list is slightly slower that a simple assignment. The proposed PR makes `for y in [f(x)]` in comprehensions as fast as just an assignment `y = f(x)`. This will make this idiom more preferable for performance reasons. Other existing solutions, iterating an inner generator and calling a local function in a loop, have an overhead. ---------- components: Interpreter Core messages: 312228 nosy: benjamin.peterson, brett.cannon, ncoghlan, serhiy.storchaka, yselivanov priority: normal severity: normal status: open title: Optimize the `for y in [x]` idiom in comprehensions type: performance versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 03:47:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 16 Feb 2018 08:47:48 +0000 Subject: [issue32856] Optimize the `for y in [x]` idiom in comprehensions In-Reply-To: <1518770483.24.0.467229070634.issue32856@psf.upfronthosting.co.za> Message-ID: <1518770868.17.0.467229070634.issue32856@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +5487 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 03:47:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 16 Feb 2018 08:47:48 +0000 Subject: [issue32856] Optimize the `for y in [x]` idiom in comprehensions In-Reply-To: <1518770483.24.0.467229070634.issue32856@psf.upfronthosting.co.za> Message-ID: <1518770868.26.0.467229070634.issue32856@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch, patch pull_requests: +5486, 5487 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 05:23:20 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 16 Feb 2018 10:23:20 +0000 Subject: [issue32856] Optimize the `for y in [x]` idiom in comprehensions In-Reply-To: <1518770483.24.0.467229070634.issue32856@psf.upfronthosting.co.za> Message-ID: <1518776600.24.0.467229070634.issue32856@psf.upfronthosting.co.za> Steven D'Aprano added the comment: +1 Please also support using a one-element tuple: `for y in (f(x),)` ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 05:43:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 16 Feb 2018 10:43:57 +0000 Subject: [issue32856] Optimize the `for y in [x]` idiom in comprehensions In-Reply-To: <1518770483.24.0.467229070634.issue32856@psf.upfronthosting.co.za> Message-ID: <1518777837.48.0.467229070634.issue32856@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 08:03:38 2018 From: report at bugs.python.org (Fangyi Zhou) Date: Fri, 16 Feb 2018 13:03:38 +0000 Subject: [issue5115] Extend subprocess.kill to be able to kill process groups In-Reply-To: <1233370260.58.0.70597374825.issue5115@psf.upfronthosting.co.za> Message-ID: <1518786218.81.0.467229070634.issue5115@psf.upfronthosting.co.za> Change by Fangyi Zhou : ---------- nosy: +fangyizhou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 08:03:48 2018 From: report at bugs.python.org (Fangyi Zhou) Date: Fri, 16 Feb 2018 13:03:48 +0000 Subject: [issue26534] subprocess.check_output with shell=True ignores the timeout In-Reply-To: <1457653531.44.0.556796452495.issue26534@psf.upfronthosting.co.za> Message-ID: <1518786228.93.0.467229070634.issue26534@psf.upfronthosting.co.za> Change by Fangyi Zhou : ---------- nosy: +fangyizhou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 08:20:14 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 16 Feb 2018 13:20:14 +0000 Subject: [issue32857] tkinter after_cancel does not behave correctly when called with id=None Message-ID: <1518787214.25.0.467229070634.issue32857@psf.upfronthosting.co.za> New submission from Cheryl Sabella : This was discovered while working on issue32839. An old comment added for issue763637 resulted in further research and it was determined that the comment: ! data = self.tk.call('after', 'info', id) ! # In Tk 8.3, splitlist returns: (script, type) ! # In Tk 8.4, splitlist returns: (script,) wasn't correct. The underlying difference is that the call to 'after info' returns different results depending on the way it's called. If it's called with an 'id', it will return a tuple of (script, type) if the id is valid or a TclError if the id isn't valid. However, if id is None, then 'after info' returns a tuple of all the event ids for the widget. In the case of the original bug in issue763637, the reported message shows the return value of `('after#53',)`, which is definitely an after event id and not a (script,) tuple. Serhiy mentions on issue32839 that the current code also deletes the script for the first event if after_cancel is called with None. https://bugs.python.org/issue32839#msg312199 ---------- components: Tkinter messages: 312231 nosy: csabella priority: normal severity: normal status: open title: tkinter after_cancel does not behave correctly when called with id=None type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 08:24:06 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 16 Feb 2018 13:24:06 +0000 Subject: [issue32839] Add after_info as a function to tkinter In-Reply-To: <1518529095.33.0.467229070634.issue32839@psf.upfronthosting.co.za> Message-ID: <1518787446.21.0.467229070634.issue32839@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I created issue32857 for the after_cancel issue. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 08:45:27 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 16 Feb 2018 13:45:27 +0000 Subject: [issue32857] tkinter after_cancel does not behave correctly when called with id=None In-Reply-To: <1518787214.25.0.467229070634.issue32857@psf.upfronthosting.co.za> Message-ID: <1518788727.45.0.467229070634.issue32857@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I can open a PR for this, but thought it might be best to discuss it first as far as what should happen with None. 1. Raise an error that it's an incorrect call. 2. Ignore it and just return. 3. Loop through all the events and after_cancel each one. Tcl allows the after_cancel call to be an id or script(s), but they don't have functionality that would cancel everything (unless all the `script` values were sent). FWIW, if no parameters are sent, this is the Tcl code: if (objc < 3) { Tcl_WrongNumArgs(interp, 2, objv, "id|command"); return TCL_ERROR; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 09:39:23 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 16 Feb 2018 14:39:23 +0000 Subject: [issue32857] tkinter after_cancel does not behave correctly when called with id=None In-Reply-To: <1518787214.25.0.467229070634.issue32857@psf.upfronthosting.co.za> Message-ID: <1518791963.84.0.467229070634.issue32857@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I prefer the option 1. Even if calling after_cancel(None) would make sense, currently it silently does wrong things, and it is more errorproof to make it raising an exception. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 09:47:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 16 Feb 2018 14:47:43 +0000 Subject: [issue32857] tkinter after_cancel does not behave correctly when called with id=None In-Reply-To: <1518787214.25.0.467229070634.issue32857@psf.upfronthosting.co.za> Message-ID: <1518792463.27.0.467229070634.issue32857@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- stage: -> needs patch versions: +Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 10:04:18 2018 From: report at bugs.python.org (Larry Cook) Date: Fri, 16 Feb 2018 15:04:18 +0000 Subject: [issue29612] TarFile.extract() suffers from hard links inside tarball In-Reply-To: <1487671846.82.0.103027933595.issue29612@psf.upfronthosting.co.za> Message-ID: <1518793458.26.0.467229070634.issue29612@psf.upfronthosting.co.za> Larry Cook added the comment: I recently hit this with Python 2.7.5 and 2.7.13. It has a very simple repro. Just specify the same file twice on the command line to tar (GNU 1.26): % tar cvf test.tar test.txt test.txt test.txt test.txt % tar tvf test.tar -rw-r--r-- root/root 24 2018-02-16 09:35 test.txt hrw-r--r-- root/root 0 2018-02-16 09:35 test.txt link to test.txt % python2.7 Python 2.7.5 (default, Aug 4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import tarfile >>> tarball = tarfile.open("test.tar") >>> tarball.extractall() Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python2.7/tarfile.py", line 2047, in extractall self.extract(tarinfo, path) File "/usr/lib64/python2.7/tarfile.py", line 2084, in extract self._extract_member(tarinfo, os.path.join(path, tarinfo.name)) File "/usr/lib64/python2.7/tarfile.py", line 2168, in _extract_member self.makelink(tarinfo, targetpath) File "/usr/lib64/python2.7/tarfile.py", line 2252, in makelink os.link(tarinfo._link_target, targetpath) OSError: [Errno 2] No such file or directory >>> ---------- nosy: +Larry Cook _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 10:47:44 2018 From: report at bugs.python.org (=?utf-8?q?Lu=C3=ADs_Pedro_Coelho?=) Date: Fri, 16 Feb 2018 15:47:44 +0000 Subject: [issue32846] Deletion of large sets of strings is extra slow In-Reply-To: <1518654213.84.0.467229070634.issue32846@psf.upfronthosting.co.za> Message-ID: <1518796064.36.0.467229070634.issue32846@psf.upfronthosting.co.za> Lu?s Pedro Coelho added the comment: Original poster here. The benchmark is artificial, but the problem setting is not. I did have a problem that is roughly: interesting = set(line.strip() for line in open(...)) for line in open(...): key,rest = line.split('\t', 1) if key in interesting: process(rest) Deleting the set (when it goes out of scope) was a significant chunk of the time. Surprisingly, deleting a very large set takes much longer than creating it. Here are my controlled measurements (created with the attached script, which itself uses Jug http://jug.rtfd.io and assumes a file `input.txt` is present). N create (s) delete (s) 1 0.00 0.00 10 0.00 0.00 100 0.00 0.00 1000 0.00 0.00 10000 0.01 0.00 100000 0.15 0.01 1000000 1.14 0.12 10000000 11.44 2.24 100000000 126.41 70.34 200000000 198.04 258.44 300000000 341.27 646.81 400000000 522.70 1044.97 500000000 564.07 1744.54 600000000 1380.04 3364.06 700000000 1797.82 3300.20 800000000 1294.20 4410.22 900000000 3045.38 7646.59 1000000000 3467.31 11042.97 1100000000 5162.35 13750.22 1200000000 6581.90 12544.67 1300000000 1612.60 17204.67 1400000000 1788.13 23772.84 1500000000 6922.16 25068.49 ---------- nosy: +luis at luispedro.org Added file: https://bugs.python.org/file47448/time-set.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 11:03:18 2018 From: report at bugs.python.org (=?utf-8?q?Stefan_R=C3=BCster?=) Date: Fri, 16 Feb 2018 16:03:18 +0000 Subject: [issue32858] Improve OpenSSL ECDH support Message-ID: <1518796997.98.0.467229070634.issue32858@psf.upfronthosting.co.za> New submission from Stefan R?ster : Tested with OpenSSL v1.1.0g, Python does not support selection of curve Curve25519 with _ssl.ctx.set_ecdh_curve("X25519"). Additionally the DH key exchange parameters (which curve has been chosen, what DH bit size was used) are not available through any SSL or Context method. ---------- components: Library (Lib) messages: 312237 nosy: Stefan R?ster priority: normal severity: normal status: open title: Improve OpenSSL ECDH support type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 11:34:46 2018 From: report at bugs.python.org (Christian Heimes) Date: Fri, 16 Feb 2018 16:34:46 +0000 Subject: [issue32858] Improve OpenSSL ECDH support In-Reply-To: <1518796997.98.0.467229070634.issue32858@psf.upfronthosting.co.za> Message-ID: <1518798886.65.0.467229070634.issue32858@psf.upfronthosting.co.za> Christian Heimes added the comment: Please elaborate, how did you test that the curve is not support? Python calls SSL_CTX_set_ecdh_auto(self->ctx, 1) to auto configure curves. >>> import ssl >>> ssl = ssl.SSLContext() >>> ssl.set_ecdh_curve('X25519') Traceback (most recent call last): File "", line 1, in ssl.SSLError: unknown group (_ssl.c:3954) The error message means that EC_KEY_new_by_curve_name() does not support X25519's group. Some notes: * OpenSSL 1.0.2+ supports SSL_CTX_set1_curves_list() besides SSL_CTX_set_tmp_ecdh() * OpenSSL has no API to get configured curves from a context. * I'm not sure how useful SSL_get1_curves() and SSL_get_shared_curve() would be for a general audience. To reduce our maintenance burden, we only wrap functions that are useful or required. ---------- assignee: -> christian.heimes components: +SSL -Library (Lib) nosy: +alex, christian.heimes, dstufft, janssen stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 11:47:56 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 16 Feb 2018 16:47:56 +0000 Subject: [issue32436] Implement PEP 567 In-Reply-To: <1516666281.22.0.467229070634.issue32436@psf.upfronthosting.co.za> Message-ID: <1518799676.2.0.467229070634.issue32436@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset bd093355a6aaf2f4ca3ed153e195da57870a55eb by Yury Selivanov in branch 'master': bpo-32436: Add docs for contextvars (#5685) https://github.com/python/cpython/commit/bd093355a6aaf2f4ca3ed153e195da57870a55eb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 11:48:02 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 16 Feb 2018 16:48:02 +0000 Subject: [issue32436] Implement PEP 567 In-Reply-To: <1516666281.22.0.467229070634.issue32436@psf.upfronthosting.co.za> Message-ID: <1518799682.64.0.467229070634.issue32436@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5488 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 11:48:43 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 16 Feb 2018 16:48:43 +0000 Subject: [issue32436] Implement PEP 567 In-Reply-To: <1516666281.22.0.467229070634.issue32436@psf.upfronthosting.co.za> Message-ID: <1518799723.6.0.467229070634.issue32436@psf.upfronthosting.co.za> Yury Selivanov added the comment: With the basic documentation committed, I'm now closing this issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 11:56:53 2018 From: report at bugs.python.org (Christian Heimes) Date: Fri, 16 Feb 2018 16:56:53 +0000 Subject: [issue32858] Improve OpenSSL ECDH support In-Reply-To: <1518796997.98.0.467229070634.issue32858@psf.upfronthosting.co.za> Message-ID: <1518800213.25.0.467229070634.issue32858@psf.upfronthosting.co.za> Christian Heimes added the comment: When I replace the current implementation of SSLContext.set_ecdh_curve() with an implementation based on SSL_CTX_set1_curves_list(), then I'm able to configure X25519 curve for ECDH. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 11:57:54 2018 From: report at bugs.python.org (sruester) Date: Fri, 16 Feb 2018 16:57:54 +0000 Subject: [issue32858] Improve OpenSSL ECDH support In-Reply-To: <1518796997.98.0.467229070634.issue32858@psf.upfronthosting.co.za> Message-ID: <1518800274.47.0.467229070634.issue32858@psf.upfronthosting.co.za> Change by sruester : ---------- keywords: +patch pull_requests: +5489 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 12:03:20 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 16 Feb 2018 17:03:20 +0000 Subject: [issue32436] Implement PEP 567 In-Reply-To: <1516666281.22.0.467229070634.issue32436@psf.upfronthosting.co.za> Message-ID: <1518800600.23.0.467229070634.issue32436@psf.upfronthosting.co.za> miss-islington added the comment: New changeset af6eaae306dce5095a350348432cc8595efc0211 by Miss Islington (bot) in branch '3.7': bpo-32436: Add docs for contextvars (GH-5685) https://github.com/python/cpython/commit/af6eaae306dce5095a350348432cc8595efc0211 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 12:09:13 2018 From: report at bugs.python.org (sruester) Date: Fri, 16 Feb 2018 17:09:13 +0000 Subject: [issue32858] Improve OpenSSL ECDH support In-Reply-To: <1518796997.98.0.467229070634.issue32858@psf.upfronthosting.co.za> Message-ID: <1518800953.13.0.467229070634.issue32858@psf.upfronthosting.co.za> sruester added the comment: With OpenSSL 1.1.0g, the Code int nid = OBJ_sn2nid("X25519"); EC_KEY *key = EC_KEY_new_by_curve_name(nid); printf("id:%i key:%p\n", nid, key); gives id:1034 key:(nil) EC_KEY_new_by_curve_name is IMHO not the best option to define client side curves. It can only select a single curve to be offered to the server, and it does not (for whatever reason) support X25519 yet. SSL_CTX_set1_curves_list() provides both, selection of multiple curves for the client's preference list and it supports X25519 out of the box. Aside from this I am missing a method in SSLSocket to give me information about the key exchange (DH, ECDH, which curve was chosen, which bit size DH keys had, ...). I prepared a pull request which addresses both. Please review and be gentle, it is my first pull request here :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 12:13:59 2018 From: report at bugs.python.org (sruester) Date: Fri, 16 Feb 2018 17:13:59 +0000 Subject: [issue32858] Improve OpenSSL ECDH support In-Reply-To: <1518796997.98.0.467229070634.issue32858@psf.upfronthosting.co.za> Message-ID: <1518801239.24.0.467229070634.issue32858@psf.upfronthosting.co.za> sruester added the comment: Attached script shows usage ---------- Added file: https://bugs.python.org/file47449/ssl-host-check.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 12:26:59 2018 From: report at bugs.python.org (Christian Heimes) Date: Fri, 16 Feb 2018 17:26:59 +0000 Subject: [issue32858] Improve OpenSSL ECDH support In-Reply-To: <1518796997.98.0.467229070634.issue32858@psf.upfronthosting.co.za> Message-ID: <1518802019.84.0.467229070634.issue32858@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks! I rejected your initial PR. In the past we added some cruft or badly designed features to the SSL module. I'm in the process of cleaning the module up. Any new feature or revised method should be designed carefully and added to PEP 543. The PEP defines a general TLS API that is less OpenSSL centric. The ssl module is and will stay a thin wrapper around OpenSSL. But we are trying to implement new features in a general, abstract way that work with other TLS implementations like SecureTransport, SChannel, or NSS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 12:31:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 16 Feb 2018 17:31:57 +0000 Subject: [issue32856] Optimize the `for y in [x]` idiom in comprehensions In-Reply-To: <1518770483.24.0.467229070634.issue32856@psf.upfronthosting.co.za> Message-ID: <1518802317.94.0.467229070634.issue32856@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here are some microbenchmarks. But since this code always is a part of complex expression it may be not make sense to talk about its pure speed. $ ./python -m timeit -s 'a = list(range(1000))' -- '[y for x in a for y in [x]]' Unpatched: 5000 loops, best of 5: 81.4 usec per loop Patched: 10000 loops, best of 5: 19.8 usec per loop For comparison the variant without temporary variable: $ ./python -m timeit -s 'a = list(range(1000))' -- '[x for x in a]' 20000 loops, best of 5: 15.6 usec per loop The overhead of using temporary variable is decreased from 66 usec to 4.2 usec (by 16 times). In more realistic examples the subexpression assigned to temporary variable is slow. Otherwise it would be not worth to use a temporary variable. Therefore the relative speed up of the whole comprehension expression caused by this optimization is much smaller. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 12:37:29 2018 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 16 Feb 2018 17:37:29 +0000 Subject: [issue32856] Optimize the `for y in [x]` idiom in comprehensions In-Reply-To: <1518770483.24.0.467229070634.issue32856@psf.upfronthosting.co.za> Message-ID: <1518802649.14.0.467229070634.issue32856@psf.upfronthosting.co.za> Yury Selivanov added the comment: I'm still not sure whether we should enable this optimization or not. I haven't ever seen this pattern used in any Python code I worked with, so I suspect it's quite a rare hack. Giving it a fast-path would give this pattern extra visibility and might encourage people to use it. And the pattern itself... Well, it's quite ugly and barely readable. IMO it's way better to simply rewrite such comprehension to an equivalent 'for' statement. So I guess I'm -0 on this change. I suggest to ask Guido on the mailing list if he agrees that this language patten is worth optimizing/promoting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 12:46:50 2018 From: report at bugs.python.org (sruester) Date: Fri, 16 Feb 2018 17:46:50 +0000 Subject: [issue32858] Improve OpenSSL ECDH support In-Reply-To: <1518796997.98.0.467229070634.issue32858@psf.upfronthosting.co.za> Message-ID: <1518803210.44.0.467229070634.issue32858@psf.upfronthosting.co.za> sruester added the comment: I'd really love to see kxinfo() or a similar method in the standard. I chose to implement it similar to cipher() which seemed to be a good idea then. If there are any objections, please let's discuss how that information can be made available otherwise. If that's ok, I will open another pull request which only contains kxinfo or similar. It is, however, not sufficient without set_ecdh_curve's support for X25519 in some cases (my case ^^). Changing the implementation of set_ecdh_curve seems necessary anyway, as it does not support X25519 at all, and it does not allow defining multiple curves. Maybe we can do both, update PEP 543 to address the needs and implement it (in an OpenSSL centric way) for the current version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 14:12:39 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 16 Feb 2018 19:12:39 +0000 Subject: [issue32846] Deletion of large sets of strings is extra slow In-Reply-To: <1518654213.84.0.467229070634.issue32846@psf.upfronthosting.co.za> Message-ID: <1518808359.54.0.467229070634.issue32846@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks for the info. Here is what I surmise from the data. * The shape of the curve matches the expected memory latency curve for random memory accesses for a given working set size. The graph of your measurements looks similar in shape to this one: https://www.extremetech.com/wp-content/uploads/2014/08/latency.png * The last line of the measurements has N=1,500,000,000. That would give an approx 70GB setobject that refers to another 100Gb (or more) of strings. Unless you are working with an extraordinary machine, most of that data will have been swapped to disk. * Dividing the 1,500,000,000 elements by the time of 25,068 seconds gives about 60,000 deletions per second. This number coincides nicely with the random access performance of a typical SSD rated at 50,000 IOPs. If this reasoning is sound, all it proves is that random accesses to virtual memory are limited by the speed of the hardware for that virtual memory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 14:41:51 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 16 Feb 2018 19:41:51 +0000 Subject: [issue32857] tkinter after_cancel does not behave correctly when called with id=None In-Reply-To: <1518787214.25.0.467229070634.issue32857@psf.upfronthosting.co.za> Message-ID: <1518810110.99.0.467229070634.issue32857@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +5490 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 14:57:30 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 16 Feb 2018 19:57:30 +0000 Subject: [issue32846] Deletion of large sets of strings is extra slow In-Reply-To: <1518654213.84.0.467229070634.issue32846@psf.upfronthosting.co.za> Message-ID: <1518811050.87.0.467229070634.issue32846@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Lu?s, what you really need for the problem you outline is an immutable set with one operation, 'in', aside from create and delete. If specialized to strings only, it could internally stores only character sequences, rather than Python objects. I suspect someone has written such a class (in C), but did not find anything on pypi.python.org. Lacking that, the following experiment suggests that you might be able to restore near O(n) time by partitioning the set of keys into a collection of sets. My 16M set took 6.48 and 1.80 seconds. Times 4 is 25.9 and 7.2. My 64M set took 28 and 19 seconds, but 4 16M sets take 26.3 and 7.5 seconds, only about 5% more than the x4 target. print(timeit.Timer( 's = [{str(n) for n in range(i*1000000, (i+16)*1000000)}' ' for i in (0, 16, 32, 48)]') .timeit(number=1)) print(timeit.Timer( 'del s', 's = [{str(n) for n in range(i*1000000, (i+16)*1000000)}' ' for i in (0, 16, 32, 48)]') .timeit(number=1)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 15:17:41 2018 From: report at bugs.python.org (Kyle Altendorf) Date: Fri, 16 Feb 2018 20:17:41 +0000 Subject: [issue32852] trace changes sys.argv from list to tuple In-Reply-To: <1518712745.86.0.467229070634.issue32852@psf.upfronthosting.co.za> Message-ID: <1518812261.53.0.467229070634.issue32852@psf.upfronthosting.co.za> Change by Kyle Altendorf : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 15:19:15 2018 From: report at bugs.python.org (Jay Crotts) Date: Fri, 16 Feb 2018 20:19:15 +0000 Subject: [issue32495] Adding Timer to multiprocessing In-Reply-To: <1515106635.63.0.467229070634.issue32495@psf.upfronthosting.co.za> Message-ID: <1518812355.4.0.467229070634.issue32495@psf.upfronthosting.co.za> Jay Crotts added the comment: Closing this issue, for the reasons Antoine outlined. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 15:37:53 2018 From: report at bugs.python.org (Kyle Altendorf) Date: Fri, 16 Feb 2018 20:37:53 +0000 Subject: [issue32852] trace changes sys.argv from list to tuple In-Reply-To: <1518712745.86.0.467229070634.issue32852@psf.upfronthosting.co.za> Message-ID: <1518813473.86.0.467229070634.issue32852@psf.upfronthosting.co.za> Change by Kyle Altendorf : ---------- pull_requests: +5491 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 15:38:22 2018 From: report at bugs.python.org (Kyle Altendorf) Date: Fri, 16 Feb 2018 20:38:22 +0000 Subject: [issue32852] trace changes sys.argv from list to tuple In-Reply-To: <1518712745.86.0.467229070634.issue32852@psf.upfronthosting.co.za> Message-ID: <1518813502.58.0.467229070634.issue32852@psf.upfronthosting.co.za> Change by Kyle Altendorf : ---------- pull_requests: +5492 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 15:41:34 2018 From: report at bugs.python.org (Jay Crotts) Date: Fri, 16 Feb 2018 20:41:34 +0000 Subject: [issue32854] Add ** Map Unpacking Support for namedtuple In-Reply-To: <1518718232.91.0.467229070634.issue32854@psf.upfronthosting.co.za> Message-ID: <1518813694.86.0.467229070634.issue32854@psf.upfronthosting.co.za> Jay Crotts added the comment: Would it be worth adding an example of unpacking such as, t(**a._asdict()), or something similar to the documentation ? ---------- nosy: +jcrotts _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 15:47:09 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 16 Feb 2018 20:47:09 +0000 Subject: [issue32825] warn user of creation of multiple Tk instances In-Reply-To: <1518430442.75.0.467229070634.issue32825@psf.upfronthosting.co.za> Message-ID: <1518814029.11.0.467229070634.issue32825@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 16:04:45 2018 From: report at bugs.python.org (Kyle Altendorf) Date: Fri, 16 Feb 2018 21:04:45 +0000 Subject: [issue32852] trace changes sys.argv from list to tuple In-Reply-To: <1518712745.86.0.467229070634.issue32852@psf.upfronthosting.co.za> Message-ID: <1518815085.55.0.467229070634.issue32852@psf.upfronthosting.co.za> Change by Kyle Altendorf : ---------- pull_requests: +5493 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 16:04:52 2018 From: report at bugs.python.org (Kyle Altendorf) Date: Fri, 16 Feb 2018 21:04:52 +0000 Subject: [issue32852] trace changes sys.argv from list to tuple In-Reply-To: <1518712745.86.0.467229070634.issue32852@psf.upfronthosting.co.za> Message-ID: <1518815092.75.0.467229070634.issue32852@psf.upfronthosting.co.za> Change by Kyle Altendorf : ---------- pull_requests: +5494 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 16:09:35 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 16 Feb 2018 21:09:35 +0000 Subject: [issue32829] Lib/ be more pythonic In-Reply-To: <1518437200.03.0.467229070634.issue32829@psf.upfronthosting.co.za> Message-ID: <1518815375.43.0.467229070634.issue32829@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Dilyan, please explain what you believe the problems to be and how the patch solves it. These seem to be 3 separate issues. Do not change idlelib.config. config_main.def contain 'default = True' or 'default = False' and that is what the docstring references. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 16:38:31 2018 From: report at bugs.python.org (sruester) Date: Fri, 16 Feb 2018 21:38:31 +0000 Subject: [issue32858] Improve OpenSSL ECDH support In-Reply-To: <1518796997.98.0.467229070634.issue32858@psf.upfronthosting.co.za> Message-ID: <1518817111.75.0.467229070634.issue32858@psf.upfronthosting.co.za> Change by sruester : ---------- pull_requests: +5495 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 17:11:49 2018 From: report at bugs.python.org (paul j3) Date: Fri, 16 Feb 2018 22:11:49 +0000 Subject: [issue17050] argparse.REMAINDER doesn't work as first argument In-Reply-To: <1359276661.57.0.274871702559.issue17050@psf.upfronthosting.co.za> Message-ID: <1518819109.37.0.467229070634.issue17050@psf.upfronthosting.co.za> paul j3 added the comment: A REMAINDER that would work with a flag-like string would be too powerful, too greedy. In [64]: p = argparse.ArgumentParser(); In [65]: p.add_argument('--foo'); In [66]: p.add_argument('rest', nargs='...'); If the flag is first, its Action works: In [67]: p.parse_args('--foo x a b c'.split()) Out[67]: Namespace(foo='x', rest=['a', 'b', 'c']) If there's a non-flag string, REMAINDER grabs everything: In [68]: p.parse_args('d --foo x a b c'.split()) Out[68]: Namespace(foo=None, rest=['d', '--foo', 'x', 'a', 'b', 'c']) Imagine a REMAINDER could act with '--foo' as the first string. In[67] would then parse as Out[68] but without the 'd'. In documented use 'cmd' acts as a gatekeeper, allowing the REMAINDER to grab the rest. So does the '--rest' flag in: p.add_argument('--rest', nargs='...') Double dash is another gatekeeper: In [69]: p.parse_args('-- --foo x a b c'.split()) Out[69]: Namespace(foo=None, rest=['--', '--foo', 'x', 'a', 'b', 'c']) If you don't want such a gatekeeper, why used argparse at all? Why not use sys.argv[1:] directly? So some sort of warning about the limitations of REMAINDER would be good. But the trick is to come up with something that is clear but succinct. The argparse documentation is already daunting to beginners. A closed request to document the argparse.PARSER option: https://bugs.python.org/issue16988 A closed request to document '...' https://bugs.python.org/issue24647 There was also an issue asking to treat unrecognized flags as plain arguments. I don't recall the status of that issue. With that, REMAINDER could grab '--bar a b c', but 'fail' with '--foo a b c'. It would interesting to test such a variation, but that would be even harder to document. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 18:10:17 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Fri, 16 Feb 2018 23:10:17 +0000 Subject: [issue32859] os.dup2() tests dup3() availability on each call Message-ID: <1518822617.35.0.467229070634.issue32859@psf.upfronthosting.co.za> New submission from Alexey Izbyshev : os.dup2() tests for dup3() system call availability at runtime, but doesn't remember the result across calls, repeating the test on each call with inheritable=False even if the test fails. Judging by the code, 'dup3_works' was intended to be static (the first time its value is checked it's always an initial one). ---------- components: Extension Modules, Library (Lib) messages: 312256 nosy: benjamin.peterson, izbyshev, vstinner priority: normal severity: normal status: open title: os.dup2() tests dup3() availability on each call type: performance versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 18:13:27 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Fri, 16 Feb 2018 23:13:27 +0000 Subject: [issue32859] os.dup2() tests dup3() availability on each call In-Reply-To: <1518822617.35.0.467229070634.issue32859@psf.upfronthosting.co.za> Message-ID: <1518822807.06.0.467229070634.issue32859@psf.upfronthosting.co.za> Change by Alexey Izbyshev : ---------- keywords: +patch pull_requests: +5497 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 18:31:42 2018 From: report at bugs.python.org (Eric Snow) Date: Fri, 16 Feb 2018 23:31:42 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1518823902.93.0.467229070634.issue32604@psf.upfronthosting.co.za> Change by Eric Snow : ---------- pull_requests: +5498 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 18:57:38 2018 From: report at bugs.python.org (Roger Erens) Date: Fri, 16 Feb 2018 23:57:38 +0000 Subject: [issue22167] iglob() has misleading documentation (does indeed store names internally) In-Reply-To: <1407460141.27.0.298063472331.issue22167@psf.upfronthosting.co.za> Message-ID: <1518825458.01.0.467229070634.issue22167@psf.upfronthosting.co.za> Roger Erens added the comment: http://bugs.python.org/issue25596 has been closed... ---------- nosy: +Roger Erens _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 19:06:49 2018 From: report at bugs.python.org (Roger Erens) Date: Sat, 17 Feb 2018 00:06:49 +0000 Subject: [issue32860] Definition of iglob does not mention single star (unlike glob) Message-ID: <1518826009.15.0.467229070634.issue32860@psf.upfronthosting.co.za> New submission from Roger Erens : Although both glob and iglob have the same arity in Lib/glob.py: def glob(pathname, *, recursive=False) def iglob(pathname, *, recursive=False): the documentation only mentions for glob the single star https://docs.python.org/3/library/glob.html#glob.iglob: glob.glob(pathname, *, recursive=False) glob.iglob(pathname, recursive=False) ---------- assignee: docs at python components: Documentation messages: 312258 nosy: Roger Erens, docs at python priority: normal severity: normal status: open title: Definition of iglob does not mention single star (unlike glob) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 19:52:46 2018 From: report at bugs.python.org (Michael Lazar) Date: Sat, 17 Feb 2018 00:52:46 +0000 Subject: [issue32861] urllib.robotparser: incomplete __str__ methods Message-ID: <1518828766.79.0.467229070634.issue32861@psf.upfronthosting.co.za> New submission from Michael Lazar : Hello, I have stumbled upon a couple of inconsistencies in urllib.robotparser's __str__ methods. These appear to be unintentional omissions; basically the code was modified but the string methods were never updated. 1. The RobotFileParser.__str__ method doesn't include the default (*) User-agent entry. >>> from urllib.robotparser import RobotFileParser >>> parser = RobotFileParser() >>> text = """ ... User-agent: * ... Allow: /some/path ... Disallow: /another/path ... ... User-agent: Googlebot ... Allow: /folder1/myfile.html ... """ >>> parser.parse(text.splitlines()) >>> print(parser) User-agent: Googlebot Allow: /folder1/myfile.html >>> This is *especially* awkward when parsing a valid robots.txt that only contains a wildcard User-agent. >>> from urllib.robotparser import RobotFileParser >>> parser = RobotFileParser() >>> text = """ ... User-agent: * ... Allow: /some/path ... Disallow: /another/path ... """ >>> parser.parse(text.splitlines()) >>> print(parser) >>> 2. Support was recently added for `Crawl-delay` and `Request-Rate` lines, but __str__ does not include these. >>> from urllib.robotparser import RobotFileParser >>> parser = RobotFileParser() >>> text = """ ... User-agent: figtree ... Crawl-delay: 3 ... Request-rate: 9/30 ... Disallow: /tmp ... """ >>> parser.parse(text.splitlines()) >>> print(parser) User-agent: figtree Disallow: /tmp >>> 3. Two unnecessary trailing newlines are being appended to the string output (one for the last RuleLine and one for the last Entry) (see above examples) Taken on their own these are all minor issues, but they do make things quite confusing when using robotparser from the REPL! ---------- components: Library (Lib) messages: 312259 nosy: michael-lazar priority: normal severity: normal status: open title: urllib.robotparser: incomplete __str__ methods type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 20:53:48 2018 From: report at bugs.python.org (Eric Snow) Date: Sat, 17 Feb 2018 01:53:48 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1518832428.85.0.467229070634.issue32604@psf.upfronthosting.co.za> Eric Snow added the comment: New changeset 4c6955e2b0ccf88c705f8d1fac685a8e65f9699e by Eric Snow in branch 'master': bpo-32604: Clean up created subinterpreters before runtime finalization. (gh-5709) https://github.com/python/cpython/commit/4c6955e2b0ccf88c705f8d1fac685a8e65f9699e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 20:54:23 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 17 Feb 2018 01:54:23 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1518832463.54.0.467229070634.issue32604@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5499 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 20:56:15 2018 From: report at bugs.python.org (Michael Lazar) Date: Sat, 17 Feb 2018 01:56:15 +0000 Subject: [issue32861] urllib.robotparser: incomplete __str__ methods In-Reply-To: <1518828766.79.0.467229070634.issue32861@psf.upfronthosting.co.za> Message-ID: <1518832575.9.0.467229070634.issue32861@psf.upfronthosting.co.za> Change by Michael Lazar : ---------- keywords: +patch pull_requests: +5500 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 21:15:26 2018 From: report at bugs.python.org (Eric Snow) Date: Sat, 17 Feb 2018 02:15:26 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1518833726.43.0.467229070634.issue32604@psf.upfronthosting.co.za> Eric Snow added the comment: New changeset 3db05a3a9c109f49d54b4965852e41c657e9b117 by Eric Snow (Miss Islington (bot)) in branch '3.7': bpo-32604: Clean up created subinterpreters before runtime finalization. (gh-5710) https://github.com/python/cpython/commit/3db05a3a9c109f49d54b4965852e41c657e9b117 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 21:22:26 2018 From: report at bugs.python.org (Tim Peters) Date: Sat, 17 Feb 2018 02:22:26 +0000 Subject: [issue32846] Deletion of large sets of strings is extra slow In-Reply-To: <1518654213.84.0.467229070634.issue32846@psf.upfronthosting.co.za> Message-ID: <1518834146.48.0.467229070634.issue32846@psf.upfronthosting.co.za> Tim Peters added the comment: > Surprisingly, deleting a very large set takes much longer than creating it. Luis, that's not surprising ;-) When you create it, it's mostly the case that there's a vast chunk of raw memory from which many pieces are passed out in address order (to hold all the newly created Python objects). Memory access is thus mostly sequential. But when you delete it, that vast chunk of once-raw memory is visited in essentially random order (string hashes impose a pseudo-random order on where (pointers to) string objects are stored within a set's vector), defeating all the hardware features that greatly benefit from sequential access. More precisely, the set's internal vector is visited sequentially during deletion, but the string objects the pointers point _at_ are all over the place. Even if nothing is swapped to disk, it's likely that visiting a string object during deletion will miss on all cache levels, falling back to (much slower) RAM. Note that all the string objects must be visited during set deletion, in order to decrement their reference counts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 21:31:10 2018 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 17 Feb 2018 02:31:10 +0000 Subject: [issue32860] Definition of iglob does not mention single star (unlike glob) In-Reply-To: <1518826009.15.0.467229070634.issue32860@psf.upfronthosting.co.za> Message-ID: <1518834670.92.0.467229070634.issue32860@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +5502 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 21:59:24 2018 From: report at bugs.python.org (INADA Naoki) Date: Sat, 17 Feb 2018 02:59:24 +0000 Subject: [issue32846] Deletion of large sets of strings is extra slow In-Reply-To: <1518654213.84.0.467229070634.issue32846@psf.upfronthosting.co.za> Message-ID: <1518836364.72.0.467229070634.issue32846@psf.upfronthosting.co.za> INADA Naoki added the comment: One possible advice; try dict instead of set. Dict is (surprisingly) little smaller than set. And dict cleans items in insertion order when the dict is deleted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 22:15:59 2018 From: report at bugs.python.org (INADA Naoki) Date: Sat, 17 Feb 2018 03:15:59 +0000 Subject: [issue32846] Deletion of large sets of strings is extra slow In-Reply-To: <1518654213.84.0.467229070634.issue32846@psf.upfronthosting.co.za> Message-ID: <1518837359.3.0.467229070634.issue32846@psf.upfronthosting.co.za> INADA Naoki added the comment: > Dict is (surprisingly) little smaller than set. I'm sorry, I was wrong. dict is smaller than set only when len(d) is small. (typical case for namespace dict) In case of massive keys, dict is larger than set. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 22:24:02 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sat, 17 Feb 2018 03:24:02 +0000 Subject: [issue32862] os.dup2(fd, fd, inheritable=False) behaves inconsistently Message-ID: <1518837842.39.0.467229070634.issue32862@psf.upfronthosting.co.za> New submission from Alexey Izbyshev : os.dup2(fd, fd, inheritable=False) may fail or change fd inheritability in following ways: 1) POSIX without F_DUP2FD_CLOEXEC 1.1) dup3() is available (a common case for Linux): OSError (EINVAL, dup3() doesn't allow equal descriptors) 1.2) dup3() is not available: fd made non-inheritable 2) POSIX with F_DUP2FD_CLOEXEC (FreeBSD): inheritability is not changed 3) Windows: fd made non-inheritable In contrast, os.dup2(fd, fd, inheritable=True) never changes fd inheritability (same as before PEP 446 landed). I suggest to make os.dup2(fd, fd, inheritable=False) behave the same. ---------- components: Extension Modules, Library (Lib) messages: 312266 nosy: benjamin.peterson, izbyshev, vstinner priority: normal severity: normal status: open title: os.dup2(fd, fd, inheritable=False) behaves inconsistently type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 22:28:12 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sat, 17 Feb 2018 03:28:12 +0000 Subject: [issue32862] os.dup2(fd, fd, inheritable=False) behaves inconsistently In-Reply-To: <1518837842.39.0.467229070634.issue32862@psf.upfronthosting.co.za> Message-ID: <1518838092.43.0.467229070634.issue32862@psf.upfronthosting.co.za> Change by Alexey Izbyshev : ---------- keywords: +patch pull_requests: +5503 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 22:39:54 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 17 Feb 2018 03:39:54 +0000 Subject: [issue32860] Definition of iglob does not mention single star (unlike glob) In-Reply-To: <1518826009.15.0.467229070634.issue32860@psf.upfronthosting.co.za> Message-ID: <1518838794.02.0.467229070634.issue32860@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 6887d86e9a04b9c5718b08e5d9e1ca3cc1f53721 by Mariatta (Zackery Spytz) in branch 'master': bpo-32860: Fix a missing asterisk in the documentation for glob.iglob() (GH-5712) https://github.com/python/cpython/commit/6887d86e9a04b9c5718b08e5d9e1ca3cc1f53721 ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 22:40:07 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 17 Feb 2018 03:40:07 +0000 Subject: [issue32860] Definition of iglob does not mention single star (unlike glob) In-Reply-To: <1518826009.15.0.467229070634.issue32860@psf.upfronthosting.co.za> Message-ID: <1518838807.84.0.467229070634.issue32860@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5504 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 22:40:59 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 17 Feb 2018 03:40:59 +0000 Subject: [issue32860] Definition of iglob does not mention single star (unlike glob) In-Reply-To: <1518826009.15.0.467229070634.issue32860@psf.upfronthosting.co.za> Message-ID: <1518838859.56.0.467229070634.issue32860@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5505 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 22:42:42 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 17 Feb 2018 03:42:42 +0000 Subject: [issue32860] Definition of iglob does not mention single star (unlike glob) In-Reply-To: <1518826009.15.0.467229070634.issue32860@psf.upfronthosting.co.za> Message-ID: <1518838962.64.0.467229070634.issue32860@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks! ---------- 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 Fri Feb 16 22:51:11 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 17 Feb 2018 03:51:11 +0000 Subject: [issue32860] Definition of iglob does not mention single star (unlike glob) In-Reply-To: <1518826009.15.0.467229070634.issue32860@psf.upfronthosting.co.za> Message-ID: <1518839471.97.0.467229070634.issue32860@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 0f764110593b337161e9321671dc13b54ca0cf95 by Miss Islington (bot) in branch '3.7': bpo-32860: Fix a missing asterisk in the documentation for glob.iglob() (GH-5712) https://github.com/python/cpython/commit/0f764110593b337161e9321671dc13b54ca0cf95 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 16 22:58:13 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 17 Feb 2018 03:58:13 +0000 Subject: [issue32860] Definition of iglob does not mention single star (unlike glob) In-Reply-To: <1518826009.15.0.467229070634.issue32860@psf.upfronthosting.co.za> Message-ID: <1518839893.58.0.467229070634.issue32860@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 76591bc03a26e8fde143c25cb88a98f1c96f8bc2 by Miss Islington (bot) in branch '3.6': bpo-32860: Fix a missing asterisk in the documentation for glob.iglob() (GH-5712) https://github.com/python/cpython/commit/76591bc03a26e8fde143c25cb88a98f1c96f8bc2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 01:32:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 17 Feb 2018 06:32:42 +0000 Subject: [issue32852] trace changes sys.argv from list to tuple In-Reply-To: <1518712745.86.0.467229070634.issue32852@psf.upfronthosting.co.za> Message-ID: <1518849162.08.0.467229070634.issue32852@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 9f4223261fd129ad7b9a09b2b0d625d1bb90b22b by Serhiy Storchaka (Kyle Altendorf) in branch 'master': bpo-32852: Fix trace changing sys.argv to tuple. (GH-5692) https://github.com/python/cpython/commit/9f4223261fd129ad7b9a09b2b0d625d1bb90b22b ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 01:33:53 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 17 Feb 2018 06:33:53 +0000 Subject: [issue32852] trace changes sys.argv from list to tuple In-Reply-To: <1518712745.86.0.467229070634.issue32852@psf.upfronthosting.co.za> Message-ID: <1518849233.45.0.467229070634.issue32852@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5506 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 01:34:46 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 17 Feb 2018 06:34:46 +0000 Subject: [issue32852] trace changes sys.argv from list to tuple In-Reply-To: <1518712745.86.0.467229070634.issue32852@psf.upfronthosting.co.za> Message-ID: <1518849286.82.0.467229070634.issue32852@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5507 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 01:53:26 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 17 Feb 2018 06:53:26 +0000 Subject: [issue32852] trace changes sys.argv from list to tuple In-Reply-To: <1518712745.86.0.467229070634.issue32852@psf.upfronthosting.co.za> Message-ID: <1518850406.53.0.467229070634.issue32852@psf.upfronthosting.co.za> miss-islington added the comment: New changeset afb5e5583694798793d44f35f901aa912ece278a by Miss Islington (bot) in branch '3.7': bpo-32852: Fix trace changing sys.argv to tuple. (GH-5692) https://github.com/python/cpython/commit/afb5e5583694798793d44f35f901aa912ece278a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 02:14:43 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 17 Feb 2018 07:14:43 +0000 Subject: [issue32852] trace changes sys.argv from list to tuple In-Reply-To: <1518712745.86.0.467229070634.issue32852@psf.upfronthosting.co.za> Message-ID: <1518851683.55.0.467229070634.issue32852@psf.upfronthosting.co.za> miss-islington added the comment: New changeset dda938683c48197ab7e775144136f433a5d43103 by Miss Islington (bot) in branch '3.6': bpo-32852: Fix trace changing sys.argv to tuple. (GH-5692) https://github.com/python/cpython/commit/dda938683c48197ab7e775144136f433a5d43103 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 03:03:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 17 Feb 2018 08:03:25 +0000 Subject: [issue32852] trace changes sys.argv from list to tuple In-Reply-To: <1518712745.86.0.467229070634.issue32852@psf.upfronthosting.co.za> Message-ID: <1518854605.23.0.467229070634.issue32852@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your contribution Kyle. Usually backports a made after merging the original PR. Thanks to bots this is done in half-automatical way. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 03:09:22 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 17 Feb 2018 08:09:22 +0000 Subject: [issue22167] iglob() has misleading documentation (does indeed store names internally) In-Reply-To: <1407460141.27.0.298063472331.issue22167@psf.upfronthosting.co.za> Message-ID: <1518854962.94.0.467229070634.issue22167@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Unfortunately issue25596 didn't change anything about this issue. iglob() still stores names (actually DirEntry objects) of all files in a directory before starting yielding the first of them. Otherwise we cold exceed the limit of open file descriptors. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 03:13:55 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 17 Feb 2018 08:13:55 +0000 Subject: [issue32854] Add ** Map Unpacking Support for namedtuple In-Reply-To: <1518718232.91.0.467229070634.issue32854@psf.upfronthosting.co.za> Message-ID: <1518855235.27.0.467229070634.issue32854@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Would it be worth adding an example of unpacking such as, > t(**a._asdict()), or something similar to the documentation ? There are a myriad of uses for dictionaries and the namedtuple docs don't seem like to right place to cover them (**unpacking, str.format_map, str.__mod__, etc). Even the dict and OrderedDict docs don't cover these. Also, the use of somefunc(**nt._asdict()) isn't a common pattern. A requirement for **unpacking tends to nudge design choices towards an actual mapping rather than a tuple or tuple subclass for the underlying data store. That is likely why this hasn't come-up before. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 03:42:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 17 Feb 2018 08:42:37 +0000 Subject: [issue32854] Add ** Map Unpacking Support for namedtuple In-Reply-To: <1518718232.91.0.467229070634.issue32854@psf.upfronthosting.co.za> Message-ID: <1518856957.35.0.467229070634.issue32854@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I wandering if it is worth to add a general function that takes an object and a sequence of keys and return a mapping proxy that maps attribute names to values. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 07:09:45 2018 From: report at bugs.python.org (Luis Pedro Coelho) Date: Sat, 17 Feb 2018 12:09:45 +0000 Subject: [issue32846] Deletion of large sets of strings is extra slow In-Reply-To: <1518654213.84.0.467229070634.issue32846@psf.upfronthosting.co.za> Message-ID: <1518869385.42.0.467229070634.issue32846@psf.upfronthosting.co.za> Luis Pedro Coelho added the comment: I think some of this conversation is going off-topic, but there is no disk-swapping in my case. I realize ours is not a typical setup, but our normal machines have 256GB of RAM and the "big memory" compute nodes are >=1TB. Normally, swap is outright disabled. This really is an impressive case study on how much difference cache-locality can make. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 08:42:30 2018 From: report at bugs.python.org (Victor Domingos) Date: Sat, 17 Feb 2018 13:42:30 +0000 Subject: [issue32863] Missing support for Emojis in tkinter Message-ID: <1518874950.43.0.467229070634.issue32863@psf.upfronthosting.co.za> New submission from Victor Domingos : In the current Python 3.7.0b1, on macOS 10.12.6 Sierra (also on 10.11 El Capitan), which seems to include a newer Tcl/tk version, it still does not support a variety of UTF characters, including Emoji characters that nowadays are of very common use. A quick search on the web returns some hints that maybe Tcl/tk could be compiled with different options in order to unlock those characters: http://wiki.tcl.tk/515 https://core.tcl.tk/tk/tktview/6c0d7aec6713ab6a7c3e12dff7f26bff4679bc9d I am not sure if it is officially supported by now, but at least for me, as a Python and tkinter user, it would be a great improvement. Thanks in advance, With best regards, Victor Domingos My current version: Python 3.7.0b1 (v3.7.0b1:9561d7f501, Jan 30 2018, 19:10:11) [Clang 6.0 (clang-600.0.57)] on darwin Sample code that fails: import tkinter as tk import tkinter.ttk as ttk app = tk.Tk() b = ttk.Button(app, text="?") ------- Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tkinter/ttk.py", line 614, in __init__ Widget.__init__(self, master, "ttk::button", kw) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tkinter/ttk.py", line 559, in __init__ tkinter.Widget.__init__(self, master, widgetname, kw=kw) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tkinter/__init__.py", line 2293, in __init__ (widgetName, self._w) + extra + self._options(cnf)) _tkinter.TclError: character U+1f4e9 is above the range (U+0000-U+FFFF) allowed by Tcl ---------- components: Tkinter, Unicode, macOS messages: 312279 nosy: Victor Domingos, ezio.melotti, gpolo, ned.deily, ronaldoussoren, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Missing support for Emojis in tkinter type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 08:44:57 2018 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 17 Feb 2018 13:44:57 +0000 Subject: [issue32846] Deletion of large sets of strings is extra slow In-Reply-To: <1518869385.42.0.467229070634.issue32846@psf.upfronthosting.co.za> Message-ID: Marc-Andre Lemburg added the comment: Reminds of some experiments someone did a while ago as part of the GIL removal attempts where the ref count integers are all kept in a separate array. The intent there was to be able to do locking on a single array rather than on individual decref cells. This would solve the issue with having to jump around in memory to decref all objects, but I'm not sure whether the overall win would be a lot, since deallocation of the memory blocks typically requires accessing the block itself as well (to update the block chain list pointers), unless the memory allocator uses some smart cache local block management as well (I believe that pymalloc does, but could be wrong). In any case, this sounds like a fun experiment for a GSoC student. Perhaps the PSF could donate an AWS EC2 instance with enough RAM to do the experiments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 09:05:42 2018 From: report at bugs.python.org (Victor Domingos) Date: Sat, 17 Feb 2018 14:05:42 +0000 Subject: [issue32864] Visual glitches when animating ScrolledText instances using place geometry manager Message-ID: <1518876342.16.0.467229070634.issue32864@psf.upfronthosting.co.za> New submission from Victor Domingos : In the current Python 3.7.0b1, on macOS 10.12.6 Sierra (also on 10.11 El Capitan), which seems to include a newer Tcl/tk version, there seems to be some visual glitches when using the place() geometry manager to animate a ttk.Frame containing ScrolledText widgets. These issues do not happen when running the same code on current Python 3.6. Thanks in advance, With best regards, Victor Domingos My current version: Python 3.7.0b1 (v3.7.0b1:9561d7f501, Jan 30 2018, 19:10:11) [Clang 6.0 (clang-600.0.57)] on darwin -------- Here is an excerpt of my code (animated placement of the container frame): def show_entryform(self, *event): if not self.is_entryform_visible: self.is_entryform_visible = True self.btn_add.configure(state="disabled") # Formul?rio de entrada de dados (fundo da janela) self.my_statusbar.lift() if SLOW_MACHINE: self.entryframe.place( in_=self.my_statusbar, relx=1, y=0, anchor="se", relwidth=1, bordermode="outside") else: for y in range(-30, -12, 6): self.entryframe.update() y = y**2 self.entryframe.place( in_=self.my_statusbar, relx=1, y=y, anchor="se", relwidth=1, bordermode="outside") for y in range(-12, -3, 3): self.entryframe.update() y = y**2 self.entryframe.place( in_=self.my_statusbar, relx=1, y=y, anchor="se", relwidth=1, bordermode="outside") for y in range(-3, 0, 1): self.entryframe.update() y = y**2 self.entryframe.place( in_=self.my_statusbar, relx=1, y=y, anchor="se", relwidth=1, bordermode="outside") self.entryframe.lift() ----------- And the base class definition for the problematic widgets: class LabelText(ttk.Frame): """ Generate an empty tkinter.scrolledtext form field with a text label above it. """ def __init__(self, parent, label, style=None, width=0, height=0): ttk.Frame.__init__(self, parent) if style: self.label = ttk.Label(self, text=label, style=style, anchor="w") else: self.label = ttk.Label(self, text=label, anchor="w") self.scrolledtext = ScrolledText(self, font=("Helvetica-Neue", 12), highlightcolor="LightSteelBlue2", wrap='word', width=width, height=height) self.label.pack(side="top", fill="x", expand=False) self.scrolledtext.pack(side="top", fill="both", expand=True) ---------- components: Tkinter, macOS files: issues.jpg messages: 312281 nosy: Victor Domingos, gpolo, ned.deily, ronaldoussoren, serhiy.storchaka priority: normal severity: normal status: open title: Visual glitches when animating ScrolledText instances using place geometry manager type: behavior versions: Python 3.7, Python 3.8 Added file: https://bugs.python.org/file47450/issues.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 10:42:02 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sat, 17 Feb 2018 15:42:02 +0000 Subject: [issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams In-Reply-To: <1518686430.4.0.467229070634.issue32849@psf.upfronthosting.co.za> Message-ID: <1518882122.15.0.467229070634.issue32849@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: ktrace shows that dup(0) succeeded but fstat(0) failed. The symptom is the same as in #30225. Could you check whether any of the following quick tests produces the same error? python3 -c 'import os, subprocess, sys; r, w = os.pipe(); os.close(w); subprocess.call([sys.executable, "-c", ""], stdin=r)' python3 -c 'import os, subprocess, sys; r, w = os.pipe(); os.close(r); subprocess.call([sys.executable, "-c", ""], stdin=w)' ---------- nosy: +izbyshev, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 10:51:54 2018 From: report at bugs.python.org (Eryk Sun) Date: Sat, 17 Feb 2018 15:51:54 +0000 Subject: [issue32865] os.pipe creates inheritable FDs with a bad internal state on Windows Message-ID: <1518882714.97.0.467229070634.issue32865@psf.upfronthosting.co.za> New submission from Eryk Sun : File descriptors in Windows are implemented by the C runtime library's low I/O layer. The CRT maps native File handles to Unix-style file descriptors. Additionally, in order to support inheritance for spawn/exec, the CRT passes inheritable FDs in a reserved field of the CreateProcess STARTUPINFO record. A spawned child process uses this information to initialize its FD table at startup. Python's implementation of os.pipe creates File handles directly via CreatePipe. These handles are non-inheritable, which we want. However, it wraps them with inheritable file descriptors via _open_osfhandle, which we don't want. The solution is to include the flag _O_NOINHERIT in the _open_osfhandle call, which works even though this flag isn't explicitly documented as supported for this function. Here's an example of the issue. >>> fdr, fdw = os.pipe() >>> fdr, fdw (3, 4) >>> msvcrt.get_osfhandle(3), msvcrt.get_osfhandle(4) (440, 444) >>> os.get_handle_inheritable(440) False >>> os.get_handle_inheritable(444) False Note that os.get_inheritable assumes that FD and handle heritability are in sync, so it only queries handle information. The following FDs are actually inheritable, while the underlying File handles are not: >>> os.get_inheritable(3) False >>> os.get_inheritable(4) False This is a flawed assumption baked into _Py_get_inheritable and _Py_set_inheritable, especially since the latter has no effect on FD heritability. The CRT has no public functions to query and modify the heritability of existing FDs. Until it does (and maybe Steve Dower can request this from the MSVC devs), I see no point in pretending something works when it doesn't. This only creates problems. Let's spawn a child to show that these FDs are inherited in a bad state, which is a potential source of bugs and data corruption: >>> os.spawnl(os.P_WAIT, sys.executable, 'python') Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import os, msvcrt >>> msvcrt.get_osfhandle(3), msvcrt.get_osfhandle(4) (440, 444) As you can see, file descriptors 3 and 4 were inherited with the handle values from the parent process, but the handles themselves were not inherited. We'll be lucky if the handle values happen to be unassigned and remain so. However, they may be assigned or subsequently assigned to random kernel objects (e.g. a File, Job, Process, Thread, etc). On a related note, Python always opens files as non-inheritable, even for os.open (which IMO makes no sense; we have O_NOINHERIT or O_CLOEXEC for that). It's assumed that the FD can be made inheritable via os.set_inheritable, but this does not work on Windows, and as things stand with the public CRT API, it cannot work. For example: >>> os.open('test.txt', os.O_WRONLY) 3 >>> msvcrt.get_osfhandle(3) 460 >>> os.set_inheritable(3, True) >>> os.get_handle_inheritable(460) True >>> os.spawnl(os.P_WAIT, sys.executable, 'python') Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import msvcrt >>> msvcrt.get_osfhandle(3) Traceback (most recent call last): File "", line 1, in OSError: [Errno 9] Bad file descriptor The Windows handle was of course inherited, but that's not useful in this scenario, since the CRT didn't know to pass the FD in the process STARTUPINFO. It's essentially a leaked handle in the child. ---------- components: IO, Library (Lib), Windows messages: 312283 nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: os.pipe creates inheritable FDs with a bad internal state on Windows type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 13:02:50 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 17 Feb 2018 18:02:50 +0000 Subject: [issue31333] Implement ABCMeta in C In-Reply-To: <1504472061.83.0.294667499276.issue31333@psf.upfronthosting.co.za> Message-ID: <1518890570.06.0.467229070634.issue31333@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Isn't 800 lines of C code too high price for speeding up ABCs creation? This will save several microseconds per ABC creation. Even if the program creates 1000 ABCs, this can save just several milliseconds at start-up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 13:27:40 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 17 Feb 2018 18:27:40 +0000 Subject: [issue31333] Implement ABCMeta in C In-Reply-To: <1504472061.83.0.294667499276.issue31333@psf.upfronthosting.co.za> Message-ID: <1518892060.87.0.467229070634.issue31333@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: > Isn't 800 lines of C code too high price for speeding up ABCs creation? 800 lines of C code is not something hard to notice, so I suppose the answer is obvious for all people involved in the work on PR :-) > ...this can save just several milliseconds at start-up. The correct way to measure this is relative, not absolute. There are just few ABCs used by modules loaded at Python start-up, and it already allowed to save 10% of start-up time. My expectation is that the number will be similar for a typical Python app. Moreover, `isinstance` and `issubclass` (functions called often with ABCs) will be 1.5x faster. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 13:37:47 2018 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 17 Feb 2018 18:37:47 +0000 Subject: [issue20928] xml.etree.ElementInclude does not include nested xincludes In-Reply-To: <1394829606.55.0.5394943571.issue20928@psf.upfronthosting.co.za> Message-ID: <1518892667.19.0.467229070634.issue20928@psf.upfronthosting.co.za> Change by Stefan Behnel : ---------- pull_requests: +5508 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 13:38:27 2018 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 17 Feb 2018 18:38:27 +0000 Subject: [issue20928] xml.etree.ElementInclude does not include nested xincludes In-Reply-To: <1394829606.55.0.5394943571.issue20928@psf.upfronthosting.co.za> Message-ID: <1518892707.71.0.467229070634.issue20928@psf.upfronthosting.co.za> Stefan Behnel added the comment: The latest "fixed2" patch looks good to me, but the author didn't sign a contributors agreement. However, I did, and I already wrote the same thing for lxml, so I put together an initial PR. ---------- type: behavior -> enhancement versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 14:15:01 2018 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 17 Feb 2018 19:15:01 +0000 Subject: [issue31333] Implement ABCMeta in C In-Reply-To: <1518892060.87.0.467229070634.issue31333@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: > Isn't 800 lines of C code too high price for speeding up ABCs creation? I think it's well worth it. This has long felt as a sore point to me. On Sat, Feb 17, 2018 at 10:27 AM, Ivan Levkivskyi wrote: > > Ivan Levkivskyi added the comment: > > > Isn't 800 lines of C code too high price for speeding up ABCs creation? > > 800 lines of C code is not something hard to notice, so I suppose the > answer is obvious for all people involved in the work on PR :-) > > > ...this can save just several milliseconds at start-up. > > The correct way to measure this is relative, not absolute. There are just > few ABCs used by modules loaded at Python start-up, and it already allowed > to save 10% of start-up time. My expectation is that the number will be > similar for a typical Python app. Moreover, `isinstance` and `issubclass` > (functions called often with ABCs) will be 1.5x faster. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 16:12:20 2018 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 17 Feb 2018 21:12:20 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1518901940.97.0.467229070634.issue32604@psf.upfronthosting.co.za> Yury Selivanov added the comment: Eric, it looks like your recent commit introduced a refleak. We need to fix it before beta2. ~/d/p/cpython (master $) ? ./python.exe -m test -R3:3 test_multiprocessing_fork Run tests sequentially 0:00:00 load avg: 2.52 [1/1] test_multiprocessing_fork beginning 6 repetitions 123456 ...... test_multiprocessing_fork leaked [21, 2, 1] memory blocks, sum=24 test_multiprocessing_fork leaked [2, 0, 0] file descriptors, sum=2 test_multiprocessing_fork failed in 9 min 48 sec 1 test failed: test_multiprocessing_fork And just before it: ~/d/p/cpython ((bd093355?) $) ? ./python.exe -m test -R3:3 test_multiprocessing_fork Run tests sequentially 0:00:00 load avg: 3.70 [1/1] test_multiprocessing_fork beginning 6 repetitions 123456 ...... test_multiprocessing_fork passed in 9 min 12 sec 1 test OK. Total duration: 9 min 12 sec Tests result: SUCCESS ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 18:59:00 2018 From: report at bugs.python.org (Zachary Ware) Date: Sat, 17 Feb 2018 23:59:00 +0000 Subject: [issue30638] Additional dependencies and rule for `make regen-all` In-Reply-To: <1497274981.52.0.670681266709.issue30638@psf.upfronthosting.co.za> Message-ID: <1518911940.64.0.467229070634.issue30638@psf.upfronthosting.co.za> Zachary Ware added the comment: New changeset d6ff8a7037903497eff95fa32bdac2b6adf71505 by Zachary Ware in branch 'master': bpo-30638: Add clinic to `make regen-all` (GH-5671) https://github.com/python/cpython/commit/d6ff8a7037903497eff95fa32bdac2b6adf71505 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 18:59:14 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 17 Feb 2018 23:59:14 +0000 Subject: [issue30638] Additional dependencies and rule for `make regen-all` In-Reply-To: <1497274981.52.0.670681266709.issue30638@psf.upfronthosting.co.za> Message-ID: <1518911954.42.0.467229070634.issue30638@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5509 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 19:05:43 2018 From: report at bugs.python.org (Zachary Ware) Date: Sun, 18 Feb 2018 00:05:43 +0000 Subject: [issue30638] Additional dependencies and rule for `make regen-all` In-Reply-To: <1497274981.52.0.670681266709.issue30638@psf.upfronthosting.co.za> Message-ID: <1518912343.51.0.467229070634.issue30638@psf.upfronthosting.co.za> Change by Zachary Ware : ---------- pull_requests: +5510 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 19:08:31 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 18 Feb 2018 00:08:31 +0000 Subject: [issue32716] setup.py register --repository is broken In-Reply-To: <1517266728.23.0.467229070634.issue32716@psf.upfronthosting.co.za> Message-ID: <1518912511.58.0.467229070634.issue32716@psf.upfronthosting.co.za> ?ric Araujo added the comment: There are many open issues with .pypirc. I don?t think that -r URL is a supported use case though; the docs should say that the usage is to add a section in .pypirc to define a repo, then use -r repo-section-name. ---------- 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 Feb 17 19:24:01 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 18 Feb 2018 00:24:01 +0000 Subject: [issue30638] Additional dependencies and rule for `make regen-all` In-Reply-To: <1497274981.52.0.670681266709.issue30638@psf.upfronthosting.co.za> Message-ID: <1518913441.93.0.467229070634.issue30638@psf.upfronthosting.co.za> miss-islington added the comment: New changeset d5be8e13b0ccf4473300d3a1672fc113702cf66c by Miss Islington (bot) in branch '3.7': bpo-30638: Add clinic to `make regen-all` (GH-5671) https://github.com/python/cpython/commit/d5be8e13b0ccf4473300d3a1672fc113702cf66c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 19:28:42 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 18 Feb 2018 00:28:42 +0000 Subject: [issue21060] Better error message for setup.py upload command without sdist/bdist In-Reply-To: <1395737197.75.0.193444855893.issue21060@psf.upfronthosting.co.za> Message-ID: <1518913722.61.0.467229070634.issue21060@psf.upfronthosting.co.za> Change by ?ric Araujo : ---------- pull_requests: +5511 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 19:29:43 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 18 Feb 2018 00:29:43 +0000 Subject: [issue21060] Better error message for setup.py upload command without sdist/bdist In-Reply-To: <1395737197.75.0.193444855893.issue21060@psf.upfronthosting.co.za> Message-ID: <1518913783.18.0.467229070634.issue21060@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the feedback, I went with the cleaner phrasing. ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 20:27:25 2018 From: report at bugs.python.org (Zachary Ware) Date: Sun, 18 Feb 2018 01:27:25 +0000 Subject: [issue30638] Additional dependencies and rule for `make regen-all` In-Reply-To: <1497274981.52.0.670681266709.issue30638@psf.upfronthosting.co.za> Message-ID: <1518917245.53.0.467229070634.issue30638@psf.upfronthosting.co.za> Zachary Ware added the comment: New changeset c1b8aedfbabf6e5460b09f4792d80f18051d43d3 by Zachary Ware in branch '3.6': [3.6] bpo-30638: Add clinic to `make regen-all` (GH-5671) https://github.com/python/cpython/commit/c1b8aedfbabf6e5460b09f4792d80f18051d43d3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 21:17:48 2018 From: report at bugs.python.org (Eryk Sun) Date: Sun, 18 Feb 2018 02:17:48 +0000 Subject: [issue32865] os.pipe creates inheritable FDs with a bad internal state on Windows In-Reply-To: <1518882714.97.0.467229070634.issue32865@psf.upfronthosting.co.za> Message-ID: <1518920268.46.0.467229070634.issue32865@psf.upfronthosting.co.za> Eryk Sun added the comment: Note that the CRT checks at startup whether an inherited FD is valid by calling GetFileType. If the handle is invalid or not a File, then the FD effectively is not inherited. This doesn't completely avoid the problem, since there's still a chance the handle was already assigned to a File at startup. Also, it has to skip this check if the FD is flagged as a pipe, because a pipe is likely opened in synchronous mode and blocked on a read in the parent, in which case calling GetFileType would deadlock. For example: >>> os.pipe() (3, 4) >>> os.dup2(4, 5, False) # fd 5 is still inheritable >>> os.spawnl(os.P_WAIT, sys.executable, 'python') Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import os, msvcrt >>> msvcrt.get_osfhandle(5) 420 Handle 420 was not inherited, so it may be unassigned, or it could be for some random kernel object. It's assigned in this case: >>> os.get_handle_inheritable(420) False I have a function that calls NtQueryObject to get the type name for a kernel handle: >>> get_type_name(420) 'Semaphore' Now, let's model what could be a confusing bug for someone using this semaphore: >>> os.close(5) # BUGBUG >>> os.get_handle_inheritable(420) Traceback (most recent call last): File "", line 1, in OSError: [WinError 6] The handle is invalid ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 21:26:17 2018 From: report at bugs.python.org (Eryk Sun) Date: Sun, 18 Feb 2018 02:26:17 +0000 Subject: [issue32862] os.dup2(fd, fd, inheritable=False) behaves inconsistently In-Reply-To: <1518837842.39.0.467229070634.issue32862@psf.upfronthosting.co.za> Message-ID: <1518920777.51.0.467229070634.issue32862@psf.upfronthosting.co.za> Eryk Sun added the comment: In Windows the CRT file descriptor is actually still inheritable. This only makes the underlying OS handle non-inheritable. I don't think there's a way to make an existing FD non-inheritable using public CRT functions. See issue 32865. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 21:49:21 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 18 Feb 2018 02:49:21 +0000 Subject: [issue32866] zipimport loader.get_data() requires absolute zip file path Message-ID: <1518922161.55.0.467229070634.issue32866@psf.upfronthosting.co.za> New submission from Barry A. Warsaw : Over in https://gitlab.com/python-devs/importlib_resources/issues/48 we have a report of a FileNotFoundError when trying to read a resource from a zip file. Upon further debugging, I found that zipimport's loader.get_data() raises an unexpected OSError. Interestingly, if the path to the zip file is absolute, everything works as expected, but if the path is relative, then it fails. There's probably a missing abspath() in there somewhere, but as zipimport is written in C, I really didn't spend much time digging around in gdb. ---------- messages: 312296 nosy: barry priority: normal severity: normal status: open title: zipimport loader.get_data() requires absolute zip file path versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 23:30:58 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sun, 18 Feb 2018 04:30:58 +0000 Subject: [issue32865] os.pipe creates inheritable FDs with a bad internal state on Windows In-Reply-To: <1518882714.97.0.467229070634.issue32865@psf.upfronthosting.co.za> Message-ID: <1518928258.57.0.467229070634.issue32865@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: >Also, it has to skip this check if the FD is flagged as a pipe, because a pipe is likely opened in synchronous mode and blocked on a read in the parent, in which case calling GetFileType would deadlock. Does an FD get flagged as a pipe by calling GetFileType in _open_osfhandle? Also, it's totally unclear to me how something like GetFileType can interfere with I/O and cause a deadlock. My summary of this report. There are two issues. The first is a bug in os.pipe (creation of an inheritable descriptor with non-inheritable underlying handle). This can be fixed by using _open_osfhandle() correctly. The second is that os.set_inheritable() / _Py_set_inheritable() is broken on Windows because it may put descriptor and handle heritability out-of-sync (as happens e.g. in os.dup(), os.dup2(), _Py_fopen and friends). This is hard to fix because msvcrt doesn't have something like fcntl(F_SETFD) to change _O_NOINHERIT flag (though one nasty thought is to poke msvcrt internal structures like in _PyVerify_fd removed in #23524). Both issues cause out-of-sync which is usually hidden and harmless because people prefer subprocess.Popen() which doesn't have the ability to propagate msvcrt-level descriptors at all. The issue surfaces itself if pipes and os.spawn* are involved, leading to two types of inconsistency in the child: 1) Bogus "valid" descriptors referring to wrong handles 2) Unexpectedly invalid descriptors and leaked handles ---------- nosy: +izbyshev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 17 23:36:34 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sun, 18 Feb 2018 04:36:34 +0000 Subject: [issue32862] os.dup2(fd, fd, inheritable=False) behaves inconsistently In-Reply-To: <1518837842.39.0.467229070634.issue32862@psf.upfronthosting.co.za> Message-ID: <1518928594.36.0.467229070634.issue32862@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: @eryksun: Thank you for the note! I've commented on #32865. This adds even more inconsistency to this corner case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 00:06:43 2018 From: report at bugs.python.org (MaT1g3R) Date: Sun, 18 Feb 2018 05:06:43 +0000 Subject: [issue32867] argparse assertion failure with multiline metavars Message-ID: <1518930403.05.0.467229070634.issue32867@psf.upfronthosting.co.za> New submission from MaT1g3R : If I run this script with -h -----8<------------------ from argparse import ArgumentParser mapping = ['123456', '12345', '12345', '123'] p = ArgumentParser('11111111111111') p.add_argument('-v', '--verbose', help='verbose mode', action='store_true') p.add_argument('targets', help='installation targets', nargs='+', metavar='\n'.join(mapping)) p.parse_args() ---------8<-------------------- I get an error: ---------8<-------------------- Traceback (most recent call last): File "tmp.py", line 7, in p.parse_args() File "/usr/lib/python3.6/argparse.py", line 1730, in parse_args args, argv = self.parse_known_args(args, namespace) File "/usr/lib/python3.6/argparse.py", line 1762, in parse_known_args namespace, args = self._parse_known_args(args, namespace) File "/usr/lib/python3.6/argparse.py", line 1968, in _parse_known_args start_index = consume_optional(start_index) File "/usr/lib/python3.6/argparse.py", line 1908, in consume_optional take_action(action, args, option_string) File "/usr/lib/python3.6/argparse.py", line 1836, in take_action action(self, namespace, argument_values, option_string) File "/usr/lib/python3.6/argparse.py", line 1020, in __call__ parser.print_help() File "/usr/lib/python3.6/argparse.py", line 2362, in print_help self._print_message(self.format_help(), file) File "/usr/lib/python3.6/argparse.py", line 2346, in format_help return formatter.format_help() File "/usr/lib/python3.6/argparse.py", line 282, in format_help help = self._root_section.format_help() File "/usr/lib/python3.6/argparse.py", line 213, in format_help item_help = join([func(*args) for func, args in self.items]) File "/usr/lib/python3.6/argparse.py", line 213, in item_help = join([func(*args) for func, args in self.items]) File "/usr/lib/python3.6/argparse.py", line 334, in _format_usage assert ' '.join(pos_parts) == pos_usage AssertionError -----8<------------------ ---------- components: Library (Lib) messages: 312299 nosy: MaT1g3R priority: normal severity: normal status: open title: argparse assertion failure with multiline metavars type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 01:07:50 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Sun, 18 Feb 2018 06:07:50 +0000 Subject: [issue32865] os.pipe creates inheritable FDs with a bad internal state on Windows In-Reply-To: <1518882714.97.0.467229070634.issue32865@psf.upfronthosting.co.za> Message-ID: <1518934070.28.0.467229070634.issue32865@psf.upfronthosting.co.za> Change by Nathaniel Smith : ---------- nosy: +njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 02:44:39 2018 From: report at bugs.python.org (Eryk Sun) Date: Sun, 18 Feb 2018 07:44:39 +0000 Subject: [issue32865] os.pipe creates inheritable FDs with a bad internal state on Windows In-Reply-To: <1518882714.97.0.467229070634.issue32865@psf.upfronthosting.co.za> Message-ID: <1518939879.89.0.467229070634.issue32865@psf.upfronthosting.co.za> Eryk Sun added the comment: > The first is a bug in os.pipe (creation of an inheritable descriptor > with non-inheritable underlying handle). This can be fixed by using > _open_osfhandle() correctly. This is the only issue to be addressed here, and it's an easy fix. The problem also occurs in Modules/_io/winconsoleio.c. I digressed on the problems with _Py_get_inheritable and _Py_set_inheritable. Such problems need to be addressed in a separate issue. > Does an FD get flagged as a pipe by calling GetFileType in > _open_osfhandle? Yes, it calls GetFileType to check for a bad handle (FILE_TYPE_UNKNOWN) and also to flag whether the FD type is FDEV (FILE_TYPE_CHAR) or FPIPE (FILE_TYPE_PIPE). See lowio\osfinfo.cpp in the CRT source code. > Also, it's totally unclear to me how something like GetFileType > can interfere with I/O and cause a deadlock. You're right to question this. I couldn't reproduce this problem in Windows 10 using a local, anonymous pipe. GetFileType calls NtQueryVolumeInformationFile [1] to get the FileFsDeviceInformation for the referenced File. For local devices, the I/O Manager can simply copy the requested information from the associated Device object (e.g. \Device\NamedPipe); it doesn't even need to call the device driver with an IRP_MJ_QUERY_VOLUME_INFORMATION request. Maybe older implementations of the I/O Manager always waited to acquire the File's internal lock when opened in synchronous mode. Whether this is (or ever was) a valid reason, it's the reason given for skipping the call in the CRT function initialize_inherited_file_handles_nolock (lowio\ioinit.cpp). There's nothing we can do about it. The CRT will not validate an inherited pipe FD at startup. Also, even this validation can't help if the same handle just happens to be assigned to another File at startup. [1]: https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/ntifs/nf-ntifs-ntqueryvolumeinformationfile > Both issues cause out-of-sync which is usually hidden and harmless > because people prefer subprocess.Popen() Python has to respect file descriptors as a common resource in the process. Other libraries or an embedding application may be using the same CRT. It's not simply a matter of what's commonly used in pure-Python code. That said, os.system() is still commonly used, and the CRT implements _wsystem via common_spawnv. > one nasty thought is to poke msvcrt internal structures like in _PyVerify_fd That's an ugly option, but it may be the best (or only possible) approach until MSVC adds a public function to modify the heritability of an FD. On a related note, in looking at places where FDs are made non-inheritable, I see it's also used in _Py_fopen_obj. This function could be modified to use MSVC's "N" flag to ensure the underlying FD is opened with _O_NOINHERIT. glibc has a similar "e" flag for O_CLOEXEC. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 04:36:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 18 Feb 2018 09:36:35 +0000 Subject: [issue32864] Visual glitches when animating ScrolledText instances using place geometry manager In-Reply-To: <1518876342.16.0.467229070634.issue32864@psf.upfronthosting.co.za> Message-ID: <1518946595.97.0.467229070634.issue32864@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Tkinter is just a wrapper around Tcl/Tk. It is not responsible for visualization. Please report your issue on the Tk bug tracker https://core.tcl.tk/tk/reportlist. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 04:44:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 18 Feb 2018 09:44:10 +0000 Subject: [issue32863] Missing support for Emojis in tkinter In-Reply-To: <1518874950.43.0.467229070634.issue32863@psf.upfronthosting.co.za> Message-ID: <1518947050.29.0.467229070634.issue32863@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: AFAIK, the build with more than 16-bit characters is not well tested and not officially supported and may need patching other code. Supporting the fork of Tcl/Tk is out of the competency of the Python core development team. If you have successful experience with building and using Tcl/Tk with full Unicode support I suggest you to achieve the official status of this build and promote its distribution. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 05:05:23 2018 From: report at bugs.python.org (Srikanth Anantharam) Date: Sun, 18 Feb 2018 10:05:23 +0000 Subject: [issue28956] return minimum of modes for a multimodal distribution instead of raising a StatisticsError In-Reply-To: <1481602901.85.0.570887953824.issue28956@psf.upfronthosting.co.za> Message-ID: <1518948323.04.0.467229070634.issue28956@psf.upfronthosting.co.za> Change by Srikanth Anantharam : ---------- keywords: +patch pull_requests: +5512 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 05:08:48 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 18 Feb 2018 10:08:48 +0000 Subject: [issue28956] return minimum of modes for a multimodal distribution instead of raising a StatisticsError In-Reply-To: <1518948323.07.0.714561066657.issue28956@psf.upfronthosting.co.za> Message-ID: <20180218100841.GD10142@ando.pearwood.info> Steven D'Aprano added the comment: What makes the minimum mode better than the maximum? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 05:13:00 2018 From: report at bugs.python.org (Srikanth Anantharam) Date: Sun, 18 Feb 2018 10:13:00 +0000 Subject: [issue28956] return list of modes for a multimodal distribution instead of raising a StatisticsError In-Reply-To: <1481602901.85.0.570887953824.issue28956@psf.upfronthosting.co.za> Message-ID: <1518948780.63.0.467229070634.issue28956@psf.upfronthosting.co.za> Srikanth Anantharam added the comment: Please review the new PR with tests. I'll update the documentation if the PR is acceptable. ---------- title: return minimum of modes for a multimodal distribution instead of raising a StatisticsError -> return list of modes for a multimodal distribution instead of raising a StatisticsError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 07:42:04 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 18 Feb 2018 12:42:04 +0000 Subject: [issue31333] Implement ABCMeta in C In-Reply-To: <1504472061.83.0.294667499276.issue31333@psf.upfronthosting.co.za> Message-ID: <1518957724.43.0.467229070634.issue31333@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: New changeset 03e3c340a0156891a036d6dbdb9e348108826255 by Ivan Levkivskyi in branch 'master': bpo-31333: Re-implement ABCMeta in C (#5273) https://github.com/python/cpython/commit/03e3c340a0156891a036d6dbdb9e348108826255 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 07:49:52 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 18 Feb 2018 12:49:52 +0000 Subject: [issue31333] Implement ABCMeta in C In-Reply-To: <1504472061.83.0.294667499276.issue31333@psf.upfronthosting.co.za> Message-ID: <1518958192.3.0.467229070634.issue31333@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 Feb 18 07:58:26 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 18 Feb 2018 12:58:26 +0000 Subject: [issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module In-Reply-To: <1475421693.5.0.638809019729.issue28339@psf.upfronthosting.co.za> Message-ID: <1518958706.21.0.467229070634.issue28339@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: FWIW, this is fixed in 3.7 by PEP 560. I don't think we will be able to get rid of `sys._getframe` workaround on 3.6, so I propose to just close this. ---------- dependencies: -Provide a way to check for *real* typing.Union instances resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 08:07:43 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 18 Feb 2018 13:07:43 +0000 Subject: [issue32162] typing.Generic breaks __init_subclass__ In-Reply-To: <1511908063.67.0.213398074469.issue32162@psf.upfronthosting.co.za> Message-ID: <1518959263.44.0.467229070634.issue32162@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: FWIW, this is fixed in 3.7 by PEP 560, providing a separate fix for 3.6 is not easy, and you have a good workaround, so I propose to close this issue. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 08:29:47 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 18 Feb 2018 13:29:47 +0000 Subject: [issue31333] Implement ABCMeta in C In-Reply-To: <1504472061.83.0.294667499276.issue31333@psf.upfronthosting.co.za> Message-ID: <1518960587.84.0.467229070634.issue31333@psf.upfronthosting.co.za> Change by Ivan Levkivskyi : ---------- pull_requests: +5514 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 08:38:28 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 18 Feb 2018 13:38:28 +0000 Subject: [issue25988] collections.abc.Indexable In-Reply-To: <1451686739.56.0.219134772531.issue25988@psf.upfronthosting.co.za> Message-ID: <1518961108.47.0.467229070634.issue25988@psf.upfronthosting.co.za> Change by Ivan Levkivskyi : ---------- pull_requests: +5515 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 10:32:51 2018 From: report at bugs.python.org (Joachim Trouverie) Date: Sun, 18 Feb 2018 15:32:51 +0000 Subject: [issue32540] venv docs - doesn't match behavior In-Reply-To: <1515780433.02.0.467229070634.issue32540@psf.upfronthosting.co.za> Message-ID: <1518967971.37.0.467229070634.issue32540@psf.upfronthosting.co.za> Joachim Trouverie added the comment: Is there anybody working on this issue or can I make a PR ? ---------- nosy: +jtrouverie _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 10:38:37 2018 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 18 Feb 2018 15:38:37 +0000 Subject: [issue32540] venv docs - doesn't match behavior In-Reply-To: <1515780433.02.0.467229070634.issue32540@psf.upfronthosting.co.za> Message-ID: <1518968317.48.0.467229070634.issue32540@psf.upfronthosting.co.za> Jason R. Coombs added the comment: @jtrouverie: Yes, please do. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 11:27:43 2018 From: report at bugs.python.org (robotwizard) Date: Sun, 18 Feb 2018 16:27:43 +0000 Subject: [issue32868] python 3 docs' iterator example has python 2 code Message-ID: <1518971263.84.0.467229070634.issue32868@psf.upfronthosting.co.za> New submission from robotwizard : Please note this is my first issue. The documentation at https://docs.python.org/3/tutorial/classes.html#iterators on the second code block gives the example of iterating a string by creating an iterator out of it. However I tried it with python 3.5 and 3.6 and both give me a "str_iterator" which has no "next()" method. When I tried the code with python 2.7, it works. ---------- assignee: docs at python components: Documentation messages: 312312 nosy: docs at python, robotwizard, willingc priority: normal severity: normal status: open title: python 3 docs' iterator example has python 2 code versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 11:31:40 2018 From: report at bugs.python.org (robotwizard) Date: Sun, 18 Feb 2018 16:31:40 +0000 Subject: [issue32868] python 3 docs' iterator example has python 2 code In-Reply-To: <1518971263.84.0.467229070634.issue32868@psf.upfronthosting.co.za> Message-ID: <1518971500.67.0.467229070634.issue32868@psf.upfronthosting.co.za> robotwizard added the comment: I'm so sorry... I tried doing it.next() instead of next(it). I'm sincerely sorry. I promise not to be so frivolous about opening an issue on the bug tracker next time. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 11:35:34 2018 From: report at bugs.python.org (TROUVERIE Joachim) Date: Sun, 18 Feb 2018 16:35:34 +0000 Subject: [issue32540] venv docs - doesn't match behavior In-Reply-To: <1515780433.02.0.467229070634.issue32540@psf.upfronthosting.co.za> Message-ID: <1518971734.88.0.467229070634.issue32540@psf.upfronthosting.co.za> Change by TROUVERIE Joachim : ---------- keywords: +patch pull_requests: +5516 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 11:58:54 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sun, 18 Feb 2018 16:58:54 +0000 Subject: [issue32869] Incorrect dst buffer size for MultiByteToWideChar in _Py_fopen_obj Message-ID: <1518973134.04.0.467229070634.issue32869@psf.upfronthosting.co.za> New submission from Alexey Izbyshev : MultiByteToWideChar expects the destination buffer size to be given in wide characters, not bytes. This is currently not a real issue since _Py_fopen_obj is only used internally with mode being a short constant string in all call sites I've found. ---------- components: IO, Windows messages: 312314 nosy: izbyshev, paul.moore, steve.dower, tim.golden, vstinner, zach.ware priority: normal severity: normal status: open title: Incorrect dst buffer size for MultiByteToWideChar in _Py_fopen_obj type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 12:05:17 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sun, 18 Feb 2018 17:05:17 +0000 Subject: [issue32869] Incorrect dst buffer size for MultiByteToWideChar in _Py_fopen_obj In-Reply-To: <1518973134.04.0.467229070634.issue32869@psf.upfronthosting.co.za> Message-ID: <1518973517.69.0.467229070634.issue32869@psf.upfronthosting.co.za> Change by Alexey Izbyshev : ---------- keywords: +patch pull_requests: +5517 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 12:39:45 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 18 Feb 2018 17:39:45 +0000 Subject: [issue31333] Implement ABCMeta in C In-Reply-To: <1504472061.83.0.294667499276.issue31333@psf.upfronthosting.co.za> Message-ID: <1518975585.61.0.467229070634.issue31333@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: New changeset 38928992885d8a04b7188abdba3b04f350bde32d by Ivan Levkivskyi in branch '3.7': bpo-31333: Re-implement ABCMeta in C (GH-5733) https://github.com/python/cpython/commit/38928992885d8a04b7188abdba3b04f350bde32d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 12:41:01 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 18 Feb 2018 17:41:01 +0000 Subject: [issue25988] collections.abc.Indexable In-Reply-To: <1451686739.56.0.219134772531.issue25988@psf.upfronthosting.co.za> Message-ID: <1518975661.3.0.467229070634.issue25988@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: New changeset 0442de5ad7835814d60f46c22a22942abb101aef by Ivan Levkivskyi in branch '3.7': bpo-25988: Emit a warning when use or import ABCs from 'collections'. (GH-5734) https://github.com/python/cpython/commit/0442de5ad7835814d60f46c22a22942abb101aef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 12:44:28 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 18 Feb 2018 17:44:28 +0000 Subject: [issue25988] collections.abc.Indexable In-Reply-To: <1451686739.56.0.219134772531.issue25988@psf.upfronthosting.co.za> Message-ID: <1518975868.45.0.467229070634.issue25988@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks, Tim, for noticing that and thanks, Ivan, for taking care of it. I should have cherrypicked this into 3.7.0b1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 12:57:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 18 Feb 2018 17:57:26 +0000 Subject: [issue32869] Incorrect dst buffer size for MultiByteToWideChar in _Py_fopen_obj In-Reply-To: <1518973134.04.0.467229070634.issue32869@psf.upfronthosting.co.za> Message-ID: <1518976646.4.0.467229070634.issue32869@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset b3b4a9d3001f1fc7df8efcccdce081de54fa5eab by Serhiy Storchaka (Alexey Izbyshev) in branch 'master': bpo-32869: Fix incorrect dst buffer size for MultiByteToWideChar (#5739) https://github.com/python/cpython/commit/b3b4a9d3001f1fc7df8efcccdce081de54fa5eab ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 12:58:41 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 18 Feb 2018 17:58:41 +0000 Subject: [issue32869] Incorrect dst buffer size for MultiByteToWideChar in _Py_fopen_obj In-Reply-To: <1518973134.04.0.467229070634.issue32869@psf.upfronthosting.co.za> Message-ID: <1518976721.46.0.467229070634.issue32869@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5518 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 12:59:32 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 18 Feb 2018 17:59:32 +0000 Subject: [issue32869] Incorrect dst buffer size for MultiByteToWideChar in _Py_fopen_obj In-Reply-To: <1518973134.04.0.467229070634.issue32869@psf.upfronthosting.co.za> Message-ID: <1518976772.84.0.467229070634.issue32869@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5519 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 12:59:36 2018 From: report at bugs.python.org (Andrew Scheller) Date: Sun, 18 Feb 2018 17:59:36 +0000 Subject: [issue32870] Documentation typo (2.x only) for deque.remove Message-ID: <1518976776.93.0.467229070634.issue32870@psf.upfronthosting.co.za> New submission from Andrew Scheller : https://docs.python.org/2/library/collections.html#collections.deque.remove says "Removed the first occurrence of value." I believe the "Removed" should be changed to just "Remove" ? (this has already been fixed in the 3.x documentation https://docs.python.org/3/library/collections.html#collections.deque.remove ) ---------- assignee: docs at python components: Documentation messages: 312319 nosy: docs at python, lurchman priority: normal severity: normal status: open title: Documentation typo (2.x only) for deque.remove versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 13:08:55 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 18 Feb 2018 18:08:55 +0000 Subject: [issue25988] collections.abc.Indexable In-Reply-To: <1451686739.56.0.219134772531.issue25988@psf.upfronthosting.co.za> Message-ID: <1518977335.7.0.467229070634.issue25988@psf.upfronthosting.co.za> Change by Ned Deily : ---------- pull_requests: +5520 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 13:13:46 2018 From: report at bugs.python.org (Andrew Scheller) Date: Sun, 18 Feb 2018 18:13:46 +0000 Subject: [issue32870] Documentation typo (2.x only) for deque.remove In-Reply-To: <1518976776.93.0.467229070634.issue32870@psf.upfronthosting.co.za> Message-ID: <1518977626.84.0.467229070634.issue32870@psf.upfronthosting.co.za> Andrew Scheller added the comment: Looks like https://bugs.python.org/issue24269 is where this got fixed for the 3.x documentation ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 13:15:32 2018 From: report at bugs.python.org (Andrew Scheller) Date: Sun, 18 Feb 2018 18:15:32 +0000 Subject: [issue32870] Documentation typo (2.x only) for deque.remove In-Reply-To: <1518976776.93.0.467229070634.issue32870@psf.upfronthosting.co.za> Message-ID: <1518977732.55.0.467229070634.issue32870@psf.upfronthosting.co.za> Change by Andrew Scheller : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 13:18:46 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 18 Feb 2018 18:18:46 +0000 Subject: [issue25988] collections.abc.Indexable In-Reply-To: <1451686739.56.0.219134772531.issue25988@psf.upfronthosting.co.za> Message-ID: <1518977926.51.0.467229070634.issue25988@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 2e84e47626c6eafacc9f011cd9fccc8bf1c8508e by Ned Deily in branch '3.7': bpo-25988: add NEWS entry for 3.7.0b2 (#5743) https://github.com/python/cpython/commit/2e84e47626c6eafacc9f011cd9fccc8bf1c8508e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 13:40:09 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 18 Feb 2018 18:40:09 +0000 Subject: [issue32869] Incorrect dst buffer size for MultiByteToWideChar in _Py_fopen_obj In-Reply-To: <1518973134.04.0.467229070634.issue32869@psf.upfronthosting.co.za> Message-ID: <1518979209.36.0.467229070634.issue32869@psf.upfronthosting.co.za> miss-islington added the comment: New changeset ca82e3c0ec4d0d5ce4e1ffec98cc341cb5913446 by Miss Islington (bot) in branch '3.7': bpo-32869: Fix incorrect dst buffer size for MultiByteToWideChar (GH-5739) https://github.com/python/cpython/commit/ca82e3c0ec4d0d5ce4e1ffec98cc341cb5913446 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 13:51:19 2018 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 18 Feb 2018 18:51:19 +0000 Subject: [issue31333] Implement ABCMeta in C In-Reply-To: <1504472061.83.0.294667499276.issue31333@psf.upfronthosting.co.za> Message-ID: <1518979879.24.0.467229070634.issue31333@psf.upfronthosting.co.za> Guido van Rossum added the comment: Congratulations all on this milestone! And thanks reviewers for your thorough work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 13:58:11 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 18 Feb 2018 18:58:11 +0000 Subject: [issue32869] Incorrect dst buffer size for MultiByteToWideChar in _Py_fopen_obj In-Reply-To: <1518973134.04.0.467229070634.issue32869@psf.upfronthosting.co.za> Message-ID: <1518980291.57.0.467229070634.issue32869@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 65a13c19e86488119cc9bc192f5a0b846d90940f by Miss Islington (bot) in branch '3.6': bpo-32869: Fix incorrect dst buffer size for MultiByteToWideChar (GH-5739) https://github.com/python/cpython/commit/65a13c19e86488119cc9bc192f5a0b846d90940f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 14:47:50 2018 From: report at bugs.python.org (ruffsl) Date: Sun, 18 Feb 2018 19:47:50 +0000 Subject: [issue20928] xml.etree.ElementInclude does not include nested xincludes In-Reply-To: <1394829606.55.0.5394943571.issue20928@psf.upfronthosting.co.za> Message-ID: <1518983270.14.0.467229070634.issue20928@psf.upfronthosting.co.za> ruffsl added the comment: Hello @scoder, Thanks for looking into this. In addition to what I mentioned with lxml's use of the parent xml file's respect dirname when attempting to open the include element's href, do you think it would be possible to (optionally or by default) have the include processor provide the necessary xml:base attributes for compliance with the specification [1][2][3]. I know lxml partially does this, but not for recursive includes beyond a depth of one. Without this, it makes it impossible to track down the subsequent source for deep include paths, i.e. when you'd like to trace from what sequence of includes contributed the element in question. >From looking at the "fixed2", although the added lines 137-143 in ElementInclude.py appear to prevent infinite recursive includes, but I think it also prevents valid merging of include trajectories when expanding the tree of include paths. E.g. what happens if I state the inclusion of the same source multiple times elsewhere in the same file, or elsewhere in the include tree that is no way a sub-child of the current parent file. Isn't `already_included` unnecessarily global in scope, when it just need to be relative to the trajectory in the sequence of current branches; only checking a node is not simultaneously a parent and child along a single include trajectory? [1] https://stackoverflow.com/a/22791471/2577586 [2] https://www.w3.org/TR/xmlbase/ [3] http://xerces.apache.org/xerces2-j/faq-xinclude.html#faq-3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 15:52:21 2018 From: report at bugs.python.org (James Bailey) Date: Sun, 18 Feb 2018 20:52:21 +0000 Subject: [issue20928] xml.etree.ElementInclude does not include nested xincludes In-Reply-To: <1394829606.55.0.5394943571.issue20928@psf.upfronthosting.co.za> Message-ID: <1518987141.37.0.467229070634.issue20928@psf.upfronthosting.co.za> James Bailey added the comment: Agreed with ruffsl's concerns about the overly aggressive detection of infinite recursion. I also wonder if the hrefs should be normalized or canonized for the check? The check may miss infinite recursions if the hrefs happen to be written in non-matching but equivalent forms. Ex: relative versus absolute paths. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 16:37:29 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 18 Feb 2018 21:37:29 +0000 Subject: [issue31333] Implement ABCMeta in C In-Reply-To: <1504472061.83.0.294667499276.issue31333@psf.upfronthosting.co.za> Message-ID: <1518989849.39.0.467229070634.issue31333@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +5521 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 16:38:21 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 18 Feb 2018 21:38:21 +0000 Subject: [issue31333] Implement ABCMeta in C In-Reply-To: <1504472061.83.0.294667499276.issue31333@psf.upfronthosting.co.za> Message-ID: <1518989901.11.0.467229070634.issue31333@psf.upfronthosting.co.za> Terry J. Reedy added the comment: PR fixes typo in What's new: rewrittent ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 16:41:07 2018 From: report at bugs.python.org (Victor Porton) Date: Sun, 18 Feb 2018 21:41:07 +0000 Subject: [issue32871] Interrupt .communicate() on SIGTERM/INT Message-ID: <1518990067.61.0.467229070634.issue32871@psf.upfronthosting.co.za> New submission from Victor Porton : At https://docs.python.org/3/library/subprocess.html there is said nothing about what happens if our Python program terminates (by SIGTERM or SIGINT) while waiting for .communicate(). I assume to do something in this situation is just forgotten. Usually terminate of our program should also terminate the invoked script. It can be made by re-delivery SIGTERM/SIGINT or (on non-POSIX) by .terminate() method. Probably, it should be done by .terminate() method even on POSIX systems, to handle SIGTERM and SIGINT in the same way. ---------- components: Library (Lib) messages: 312328 nosy: porton priority: normal severity: normal status: open title: Interrupt .communicate() on SIGTERM/INT type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 16:46:52 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 18 Feb 2018 21:46:52 +0000 Subject: [issue31333] Implement ABCMeta in C In-Reply-To: <1504472061.83.0.294667499276.issue31333@psf.upfronthosting.co.za> Message-ID: <1518990412.11.0.467229070634.issue31333@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: New changeset 3fb813d2c67fe28cc98ae51e53a6890294b6e423 by Ivan Levkivskyi (Terry Jan Reedy) in branch 'master': bpo-31333: Fix typo in whatsnew/3.7.rst (GH-5744) https://github.com/python/cpython/commit/3fb813d2c67fe28cc98ae51e53a6890294b6e423 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 16:48:06 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 18 Feb 2018 21:48:06 +0000 Subject: [issue31333] Implement ABCMeta in C In-Reply-To: <1504472061.83.0.294667499276.issue31333@psf.upfronthosting.co.za> Message-ID: <1518990486.52.0.467229070634.issue31333@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5522 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 17:10:32 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Sun, 18 Feb 2018 22:10:32 +0000 Subject: [issue32869] Incorrect dst buffer size for MultiByteToWideChar in _Py_fopen_obj In-Reply-To: <1518973134.04.0.467229070634.issue32869@psf.upfronthosting.co.za> Message-ID: <1518991832.01.0.467229070634.issue32869@psf.upfronthosting.co.za> Change by Alexey Izbyshev : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 17:27:06 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 18 Feb 2018 22:27:06 +0000 Subject: [issue32869] Incorrect dst buffer size for MultiByteToWideChar in _Py_fopen_obj In-Reply-To: <1518973134.04.0.467229070634.issue32869@psf.upfronthosting.co.za> Message-ID: <1518992826.32.0.467229070634.issue32869@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your PR Alexey. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 17:35:42 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 18 Feb 2018 22:35:42 +0000 Subject: [issue31333] Implement ABCMeta in C In-Reply-To: <1504472061.83.0.294667499276.issue31333@psf.upfronthosting.co.za> Message-ID: <1518993342.26.0.467229070634.issue31333@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 034a945fa723bf68ca4127bb43bfa5c5be899f17 by Miss Islington (bot) in branch '3.7': bpo-31333: Fix typo in whatsnew/3.7.rst (GH-5744) https://github.com/python/cpython/commit/034a945fa723bf68ca4127bb43bfa5c5be899f17 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 18:36:34 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 18 Feb 2018 23:36:34 +0000 Subject: [issue31972] Inherited docstrings for pathlib classes are confusing In-Reply-To: <1510081543.19.0.213398074469.issue31972@psf.upfronthosting.co.za> Message-ID: <1518996994.16.0.467229070634.issue31972@psf.upfronthosting.co.za> ?ric Araujo added the comment: New changeset dfa015cf77a148d229ddc0a5b063562c9f9664f2 by ?ric Araujo (chason) in branch 'master': bpo-31972: Improve docstrings for pathlib classes (#5310) https://github.com/python/cpython/commit/dfa015cf77a148d229ddc0a5b063562c9f9664f2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 18:37:39 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 18 Feb 2018 23:37:39 +0000 Subject: [issue31972] Inherited docstrings for pathlib classes are confusing In-Reply-To: <1510081543.19.0.213398074469.issue31972@psf.upfronthosting.co.za> Message-ID: <1518997059.73.0.467229070634.issue31972@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5523 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 18:40:26 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 18 Feb 2018 23:40:26 +0000 Subject: [issue31972] Inherited docstrings for pathlib classes are confusing In-Reply-To: <1510081543.19.0.213398074469.issue31972@psf.upfronthosting.co.za> Message-ID: <1518997226.05.0.467229070634.issue31972@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5524 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 19:13:59 2018 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 19 Feb 2018 00:13:59 +0000 Subject: [issue20928] xml.etree.ElementInclude does not include nested xincludes In-Reply-To: <1518987141.37.0.467229070634.issue20928@psf.upfronthosting.co.za> Message-ID: <659EF89E-0529-4F4B-BA26-07C048B513E0@behnel.de> Stefan Behnel added the comment: > The check may miss infinite recursions if the hrefs happen to be written in non-matching but equivalent forms. Ex: relative versus absolute paths. I thought about that, too, but it's not a real problem. There are only a few different ways to spell the same file path, and once they are through, the recursion would still be detected and never become infinite. Admittedly, the current implementation might lower the overhead for attacks a little, but then, if an attacker can control the input anyway, then there is not really much to win by including the same file multiple times rather than including different files. Maybe we should add a "max_depth" parameter to limit the maximum recursion depth, defaulting to e.g. 5, that users would have to pass in order to say "I know what I'm doing". I agree with the comment about the overly restrictive global set, though. Included file paths should be collected only along an inclusion path and not across independent subtrees. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 19:37:02 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 19 Feb 2018 00:37:02 +0000 Subject: [issue31972] Inherited docstrings for pathlib classes are confusing In-Reply-To: <1510081543.19.0.213398074469.issue31972@psf.upfronthosting.co.za> Message-ID: <1519000622.95.0.467229070634.issue31972@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 5c81ed49412e41a671283cdb4c297dab52f5b7c5 by Miss Islington (bot) in branch '3.6': bpo-31972: Improve docstrings for pathlib classes (GH-5310) https://github.com/python/cpython/commit/5c81ed49412e41a671283cdb4c297dab52f5b7c5 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 19:48:09 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 19 Feb 2018 00:48:09 +0000 Subject: [issue31972] Inherited docstrings for pathlib classes are confusing In-Reply-To: <1510081543.19.0.213398074469.issue31972@psf.upfronthosting.co.za> Message-ID: <1519001289.87.0.467229070634.issue31972@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 19b7f6694af56a1c9fdc0f1f9fc09ae48439ab4c by Miss Islington (bot) in branch '3.7': bpo-31972: Improve docstrings for pathlib classes (GH-5310) https://github.com/python/cpython/commit/19b7f6694af56a1c9fdc0f1f9fc09ae48439ab4c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 20:00:42 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 19 Feb 2018 01:00:42 +0000 Subject: [issue31972] Inherited docstrings for pathlib classes are confusing In-Reply-To: <1510081543.19.0.213398074469.issue31972@psf.upfronthosting.co.za> Message-ID: <1519002042.52.0.467229070634.issue31972@psf.upfronthosting.co.za> Change by ?ric Araujo : ---------- assignee: docs at python -> eric.araujo resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 20:01:16 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 19 Feb 2018 01:01:16 +0000 Subject: [issue31972] Inherited docstrings for pathlib classes are confusing In-Reply-To: <1510081543.19.0.213398074469.issue31972@psf.upfronthosting.co.za> Message-ID: <1519002076.89.0.467229070634.issue31972@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the patch! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 20:43:34 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 19 Feb 2018 01:43:34 +0000 Subject: [issue21060] Better error message for setup.py upload command without sdist/bdist In-Reply-To: <1395737197.75.0.193444855893.issue21060@psf.upfronthosting.co.za> Message-ID: <1519004614.54.0.467229070634.issue21060@psf.upfronthosting.co.za> Change by ?ric Araujo : ---------- pull_requests: +5525 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 20:45:33 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 19 Feb 2018 01:45:33 +0000 Subject: [issue21060] Better error message for setup.py upload command without sdist/bdist In-Reply-To: <1395737197.75.0.193444855893.issue21060@psf.upfronthosting.co.za> Message-ID: <1519004733.72.0.467229070634.issue21060@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5526 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 22:45:14 2018 From: report at bugs.python.org (Zachary Ware) Date: Mon, 19 Feb 2018 03:45:14 +0000 Subject: [issue32682] test_zlib improve version parsing In-Reply-To: <1516982124.56.0.467229070634.issue32682@psf.upfronthosting.co.za> Message-ID: <1519011914.24.0.467229070634.issue32682@psf.upfronthosting.co.za> Zachary Ware added the comment: New changeset 4c7108a77144493d0aa6fc0105b67d3797e143f5 by Zachary Ware (pmp-p) in branch 'master': bpo-32682: Improve libz version parsing in test_zilb (GH-5347) https://github.com/python/cpython/commit/4c7108a77144493d0aa6fc0105b67d3797e143f5 ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 22:46:21 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 19 Feb 2018 03:46:21 +0000 Subject: [issue32682] test_zlib improve version parsing In-Reply-To: <1516982124.56.0.467229070634.issue32682@psf.upfronthosting.co.za> Message-ID: <1519011981.69.0.467229070634.issue32682@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5527 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 22:48:19 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 19 Feb 2018 03:48:19 +0000 Subject: [issue32682] test_zlib improve version parsing In-Reply-To: <1516982124.56.0.467229070634.issue32682@psf.upfronthosting.co.za> Message-ID: <1519012099.24.0.467229070634.issue32682@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5528 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 22:50:22 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 19 Feb 2018 03:50:22 +0000 Subject: [issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs) In-Reply-To: <1389087474.06.0.281853443562.issue20160@psf.upfronthosting.co.za> Message-ID: <1519012222.93.0.467229070634.issue20160@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5529 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 22:56:09 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 19 Feb 2018 03:56:09 +0000 Subject: [issue21060] Better error message for setup.py upload command without sdist/bdist In-Reply-To: <1395737197.75.0.193444855893.issue21060@psf.upfronthosting.co.za> Message-ID: <1519012569.21.0.467229070634.issue21060@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset eeb33651bfadcceea68bd27bb4c4d8de2e690656 by Mariatta (?ric Araujo) in branch '2.7': [2.7] bpo-21060 Improve error message for "setup.py upload" without dist files (GH-5726). https://github.com/python/cpython/commit/eeb33651bfadcceea68bd27bb4c4d8de2e690656 ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 22:56:10 2018 From: report at bugs.python.org (Zachary Ware) Date: Mon, 19 Feb 2018 03:56:10 +0000 Subject: [issue32682] test_zlib improve version parsing In-Reply-To: <1516982124.56.0.467229070634.issue32682@psf.upfronthosting.co.za> Message-ID: <1519012570.29.0.467229070634.issue32682@psf.upfronthosting.co.za> Change by Zachary Ware : ---------- stage: patch review -> commit review versions: +Python 3.6, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 23:10:01 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 19 Feb 2018 04:10:01 +0000 Subject: [issue32682] test_zlib improve version parsing In-Reply-To: <1516982124.56.0.467229070634.issue32682@psf.upfronthosting.co.za> Message-ID: <1519013401.75.0.467229070634.issue32682@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 0cd35817e8278588f04dc574f6eca53273799f25 by Miss Islington (bot) in branch '3.7': bpo-32682: Improve libz version parsing in test_zilb (GH-5347) https://github.com/python/cpython/commit/0cd35817e8278588f04dc574f6eca53273799f25 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 23:20:47 2018 From: report at bugs.python.org (pmpp) Date: Mon, 19 Feb 2018 04:20:47 +0000 Subject: [issue32682] test_zlib improve version parsing In-Reply-To: <1516982124.56.0.467229070634.issue32682@psf.upfronthosting.co.za> Message-ID: <1519014047.69.0.467229070634.issue32682@psf.upfronthosting.co.za> Change by pmpp : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 23:31:17 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 19 Feb 2018 04:31:17 +0000 Subject: [issue32682] test_zlib improve version parsing In-Reply-To: <1516982124.56.0.467229070634.issue32682@psf.upfronthosting.co.za> Message-ID: <1519014677.6.0.467229070634.issue32682@psf.upfronthosting.co.za> miss-islington added the comment: New changeset b0fd935360e81b6bb4733deed69f51516c771f7a by Miss Islington (bot) in branch '3.6': bpo-32682: Improve libz version parsing in test_zilb (GH-5347) https://github.com/python/cpython/commit/b0fd935360e81b6bb4733deed69f51516c771f7a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 23:57:52 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 19 Feb 2018 04:57:52 +0000 Subject: [issue21060] Better error message for setup.py upload command without sdist/bdist In-Reply-To: <1395737197.75.0.193444855893.issue21060@psf.upfronthosting.co.za> Message-ID: <1519016272.7.0.467229070634.issue21060@psf.upfronthosting.co.za> ?ric Araujo added the comment: Fixed in all branches. I messed up the ticket reference so some links are missing here. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 23:58:20 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 19 Feb 2018 04:58:20 +0000 Subject: [issue21060] Better error message for setup.py upload command without sdist/bdist In-Reply-To: <1395737197.75.0.193444855893.issue21060@psf.upfronthosting.co.za> Message-ID: <1519016300.25.0.467229070634.issue21060@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5530 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 18 23:59:53 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 19 Feb 2018 04:59:53 +0000 Subject: [issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs) In-Reply-To: <1389087474.06.0.281853443562.issue20160@psf.upfronthosting.co.za> Message-ID: <1519016393.26.0.467229070634.issue20160@psf.upfronthosting.co.za> Change by ?ric Araujo : ---------- pull_requests: -5529 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 02:49:23 2018 From: report at bugs.python.org (Rudolph Froger) Date: Mon, 19 Feb 2018 07:49:23 +0000 Subject: [issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams In-Reply-To: <1518686430.4.0.467229070634.issue32849@psf.upfronthosting.co.za> Message-ID: <1519026563.59.0.467229070634.issue32849@psf.upfronthosting.co.za> Rudolph Froger added the comment: I've tried your quick tests a few times but couldn't reproduce it immediately. The problem is a bit hard to reproduce anyway because launching Python processes can go well for a long time (many days; launching many processes every minute) until suddenly all NEW processes get aborted. It seems as if somehow something in the relation to the parent process goes wrong somehow. I've seen it happening with Python as the parent process but also with a plain shell process as the parent. Just starting Python (python -c "x = 1") can be enough to trigger this so it's not something which can be blamed on some library. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 03:33:42 2018 From: report at bugs.python.org (Eric Wieser) Date: Mon, 19 Feb 2018 08:33:42 +0000 Subject: [issue4921] Object lifetime and inner recursive function In-Reply-To: <1231759157.93.0.0851183541991.issue4921@psf.upfronthosting.co.za> Message-ID: <1519029222.6.0.467229070634.issue4921@psf.upfronthosting.co.za> Eric Wieser added the comment: Would it be possible for function self-reference cell vars to be weak references? This wouldn't solve the issue for co-recursive inner functions, but would at least prevent reference cycles for the more common case of simple recursive functions. ---------- nosy: +Eric.Wieser _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 04:03:48 2018 From: report at bugs.python.org (Matthias Klose) Date: Mon, 19 Feb 2018 09:03:48 +0000 Subject: [issue32872] backport of #32305 causes regressions in various packages Message-ID: <1519031028.52.0.467229070634.issue32872@psf.upfronthosting.co.za> New submission from Matthias Klose : The backport of issue #32305 causes regressions in several packaged namespace packages: https://bugs.debian.org/890621 https://bugs.debian.org/890754 while the change is intended, is it appropriate to backport it to 3.6? Please could you have a look, you might still have an appropriate chroot laying around ;) ---------- components: Library (Lib) keywords: 3.6regression messages: 312344 nosy: barry, doko, eric.smith priority: critical severity: normal status: open title: backport of #32305 causes regressions in various packages type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 04:25:23 2018 From: report at bugs.python.org (Joachim Trouverie) Date: Mon, 19 Feb 2018 09:25:23 +0000 Subject: [issue29612] TarFile.extract() suffers from hard links inside tarball In-Reply-To: <1487671846.82.0.103027933595.issue29612@psf.upfronthosting.co.za> Message-ID: <1519032323.04.0.467229070634.issue29612@psf.upfronthosting.co.za> Joachim Trouverie added the comment: Is there anybody working on this issue or can I create a branch concerning it ? ---------- nosy: +jtrouverie _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 05:46:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 19 Feb 2018 10:46:45 +0000 Subject: [issue32873] Pickling of typing types Message-ID: <1519037205.03.0.467229070634.issue32873@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : In 3.6 typing types are pickled by names: >>> import pickle, pickletools, typing >>> pickletools.optimize(pickle.dumps(typing.List)) b'\x80\x03ctyping\nList\n.' >>> pickletools.dis(pickletools.optimize(pickle.dumps(typing.List))) 0: \x80 PROTO 3 2: c GLOBAL 'typing List' 15: . STOP highest protocol among opcodes = 2 The side effect of this is that they are considered atomic by the copy module. In 3.7 the pickle data contains all private attributes. >>> pickletools.optimize(pickle.dumps(typing.List)) b'\x80\x03ctyping\n_GenericAlias\n)\x81}(X\x05\x00\x00\x00_inst\x89X\x08\x00\x00\x00_special\x88X\x05\x00\x00\x00_nameX\x04\x00\x00\x00ListX\n\x00\x00\x00__origin__cbuiltins\nlist\nX\x08\x00\x00\x00__args__ctyping\nTypeVar\n)\x81q\x00}(X\x04\x00\x00\x00nameX\x01\x00\x00\x00TX\x05\x00\x00\x00boundNX\x0b\x00\x00\x00constraints)X\x02\x00\x00\x00co\x89X\x06\x00\x00\x00contra\x89ub\x85X\x0e\x00\x00\x00__parameters__h\x00\x85X\t\x00\x00\x00__slots__Nub.' >>> pickletools.dis(pickletools.optimize(pickle.dumps(typing.List))) 0: \x80 PROTO 3 2: c GLOBAL 'typing _GenericAlias' 24: ) EMPTY_TUPLE 25: \x81 NEWOBJ 26: } EMPTY_DICT 27: ( MARK 28: X BINUNICODE '_inst' 38: \x89 NEWFALSE 39: X BINUNICODE '_special' 52: \x88 NEWTRUE 53: X BINUNICODE '_name' 63: X BINUNICODE 'List' 72: X BINUNICODE '__origin__' 87: c GLOBAL 'builtins list' 102: X BINUNICODE '__args__' 115: c GLOBAL 'typing TypeVar' 131: ) EMPTY_TUPLE 132: \x81 NEWOBJ 133: q BINPUT 0 135: } EMPTY_DICT 136: ( MARK 137: X BINUNICODE 'name' 146: X BINUNICODE 'T' 152: X BINUNICODE 'bound' 162: N NONE 163: X BINUNICODE 'constraints' 179: ) EMPTY_TUPLE 180: X BINUNICODE 'co' 187: \x89 NEWFALSE 188: X BINUNICODE 'contra' 199: \x89 NEWFALSE 200: u SETITEMS (MARK at 136) 201: b BUILD 202: \x85 TUPLE1 203: X BINUNICODE '__parameters__' 222: h BINGET 0 224: \x85 TUPLE1 225: X BINUNICODE '__slots__' 239: N NONE 240: u SETITEMS (MARK at 27) 241: b BUILD 242: . STOP highest protocol among opcodes = 2 Unpickling it creates a new object. And I'm not sure all invariants are satisfied. In additional to lesses efficiency and lost of preserving identity, such pickle can be incompatible with old Python versions and future Python versions if the internal representation of typing types will be changed. ---------- components: Library (Lib) messages: 312346 nosy: gvanrossum, levkivskyi, serhiy.storchaka priority: normal severity: normal status: open title: Pickling of typing types type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 06:09:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 19 Feb 2018 11:09:05 +0000 Subject: [issue31966] [EASY C][Windows] print('hello\n', end='', flush=True) raises OSError when ran with py -u In-Reply-To: <1510047605.77.0.213398074469.issue31966@psf.upfronthosting.co.za> Message-ID: <1519038545.43.0.467229070634.issue31966@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 06:16:30 2018 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 19 Feb 2018 11:16:30 +0000 Subject: [issue32387] Disallow untagged C extension import on major platforms In-Reply-To: <1513784874.54.0.213398074469.issue32387@psf.upfronthosting.co.za> Message-ID: <1519038990.5.0.467229070634.issue32387@psf.upfronthosting.co.za> Change by Stefan Behnel : ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 06:16:53 2018 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 19 Feb 2018 11:16:53 +0000 Subject: [issue32388] Remove cross-version binary compatibility In-Reply-To: <1513790879.02.0.213398074469.issue32388@psf.upfronthosting.co.za> Message-ID: <1519039013.02.0.467229070634.issue32388@psf.upfronthosting.co.za> Change by Stefan Behnel : ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 06:35:38 2018 From: report at bugs.python.org (sruester) Date: Mon, 19 Feb 2018 11:35:38 +0000 Subject: [issue32858] Improve OpenSSL ECDH support In-Reply-To: <1518796997.98.0.467229070634.issue32858@psf.upfronthosting.co.za> Message-ID: <1519040138.17.0.467229070634.issue32858@psf.upfronthosting.co.za> sruester added the comment: AppVeyor build failed for pull request 5707. It looks like there was a problem with the build environment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 06:56:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 19 Feb 2018 11:56:18 +0000 Subject: [issue31966] [EASY C][Windows] print('hello\n', end='', flush=True) raises OSError when ran with py -u In-Reply-To: <1510047605.77.0.213398074469.issue31966@psf.upfronthosting.co.za> Message-ID: <1519041378.32.0.467229070634.issue31966@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +5531 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 07:11:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 19 Feb 2018 12:11:02 +0000 Subject: [issue29116] Make str and bytes error messages on concatenation conform with other sequences In-Reply-To: <1483124211.75.0.715869443236.issue29116@psf.upfronthosting.co.za> Message-ID: <1519042262.14.0.467229070634.issue29116@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 Feb 19 07:13:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 19 Feb 2018 12:13:24 +0000 Subject: [issue24159] Misleading TypeError when pickling bytes to a file opened as text In-Reply-To: <1431268460.0.0.240754621807.issue24159@psf.upfronthosting.co.za> Message-ID: <1519042404.59.0.467229070634.issue24159@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 07:19:03 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 19 Feb 2018 12:19:03 +0000 Subject: [issue32858] Improve OpenSSL ECDH support In-Reply-To: <1518796997.98.0.467229070634.issue32858@psf.upfronthosting.co.za> Message-ID: <1519042743.53.0.467229070634.issue32858@psf.upfronthosting.co.za> Christian Heimes added the comment: Please split this issue into multiple issues, a bug report for the curve configuration bug and a feature request for kxinfo. The bug fix may land in 2.7, 3.6 and 3.7 while the new feature can only land in 3.8. Before you start coding, let's figure out an API first. For instance I don't like "kxinfo" as method name. It's a) a cryptic name and b) technically wrong for TLS 1.3 and PFS suites. Although people refer to DH as key exchange protocol, it's really a key agreement protocol. kRSA is a key exchange protocol. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 07:46:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 19 Feb 2018 12:46:16 +0000 Subject: [issue32857] tkinter after_cancel does not behave correctly when called with id=None In-Reply-To: <1518787214.25.0.467229070634.issue32857@psf.upfronthosting.co.za> Message-ID: <1519044376.3.0.467229070634.issue32857@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have noticed that there are no tests for after() and after_cancel(). Maybe first write tests for them and later add a test for this specific issue to them? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 07:47:27 2018 From: report at bugs.python.org (TROUVERIE Joachim) Date: Mon, 19 Feb 2018 12:47:27 +0000 Subject: [issue29612] TarFile.extract() suffers from hard links inside tarball In-Reply-To: <1487671846.82.0.103027933595.issue29612@psf.upfronthosting.co.za> Message-ID: <1519044447.04.0.467229070634.issue29612@psf.upfronthosting.co.za> Change by TROUVERIE Joachim : ---------- keywords: +patch pull_requests: +5532 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 08:28:39 2018 From: report at bugs.python.org (INADA Naoki) Date: Mon, 19 Feb 2018 13:28:39 +0000 Subject: [issue32846] Deletion of large sets of strings is extra slow In-Reply-To: <1518654213.84.0.467229070634.issue32846@psf.upfronthosting.co.za> Message-ID: <1519046919.45.0.467229070634.issue32846@psf.upfronthosting.co.za> INADA Naoki added the comment: @Luis, would you try dict instead of set? It's little larger than set, but delete elements by insertion order. But I don't think builtin data structure can be optimized for such workload. Maybe, LMBD[1] or some other KVS can help you. [1]: https://lmdb.readthedocs.io/en/release/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 08:41:06 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 19 Feb 2018 13:41:06 +0000 Subject: [issue32872] backport of #32305 causes regressions in various packages In-Reply-To: <1519031028.52.0.467229070634.issue32872@psf.upfronthosting.co.za> Message-ID: <1519047665.99.0.467229070634.issue32872@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Both of those upstreams should be using `if getattr(module, '__file__', None)` instead. The old behavior was an undocumented quirk. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 10:41:03 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 19 Feb 2018 15:41:03 +0000 Subject: [issue23462] All os.exec*e variants crash on Windows In-Reply-To: <1423903526.7.0.282245151833.issue23462@psf.upfronthosting.co.za> Message-ID: <1519054863.54.0.467229070634.issue23462@psf.upfronthosting.co.za> Change by Steve Dower : ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 10:56:06 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 19 Feb 2018 15:56:06 +0000 Subject: [issue32874] IDLE: Add tests for pyparse Message-ID: <1519055766.11.0.467229070634.issue32874@psf.upfronthosting.co.za> New submission from Cheryl Sabella : Add unit tests for pyparse.py in IDLE. ---------- assignee: terry.reedy components: IDLE messages: 312352 nosy: csabella, terry.reedy priority: normal severity: normal status: open title: IDLE: Add tests for pyparse type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 11:01:02 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 19 Feb 2018 16:01:02 +0000 Subject: [issue32874] IDLE: Add tests for pyparse In-Reply-To: <1519055766.11.0.467229070634.issue32874@psf.upfronthosting.co.za> Message-ID: <1519056062.46.0.467229070634.issue32874@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I also moved existing comments in pyparse.py to be docstrings. Adding the tests revealed a bug in the initialization of self.lastopenbracketpos, but I didn't make any changes to fix it. With the bug, the tests weren't repeatable, so I modified the tests to work with the bug in place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 11:02:12 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 19 Feb 2018 16:02:12 +0000 Subject: [issue32874] IDLE: Add tests for pyparse In-Reply-To: <1519055766.11.0.467229070634.issue32874@psf.upfronthosting.co.za> Message-ID: <1519056132.21.0.467229070634.issue32874@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +5533 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 11:21:21 2018 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 19 Feb 2018 16:21:21 +0000 Subject: [issue32873] Pickling of typing types In-Reply-To: <1519037205.03.0.467229070634.issue32873@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: I think it would be nice it would be pickled by name so the pickles are compatible between Python versions. What would we do for List[int]? How are regular ABCs pickled? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 11:43:37 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 19 Feb 2018 16:43:37 +0000 Subject: [issue32873] Pickling of typing types In-Reply-To: <1519037205.03.0.467229070634.issue32873@psf.upfronthosting.co.za> Message-ID: <1519058617.01.0.467229070634.issue32873@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Here is the situation for 3.6 and before: Generic classes are all actual class objects, so they are pickled as immutable. However this creates a problem, parameterized generics, such as `List[int]` _cannot_ be pickled in 3.6 and before, see https://github.com/python/typing/issues/511 (and this is something very hard to fix). Here is the situation for 3.7: Almost no generics are actual class objects, so they are pickled as usual. This also fixes the pickling problems in 3.6. However, there is one problematic thing, type variables, they should be pickled as immutable (i.e. by name reference), but I didn't have time to fix this, this is tracked in https://github.com/python/typing/issues/512 What is interesting this issue adds here is an idea that we can treat special typing aliases that are conceptually "unique" also as immutable. For example, `typing.List` will be pickled as "typing.List", while `typing.List[int]` will be pickled as _GenericAlias(, args=(,), ...) Conveniently, all the special typing aliases are already marked with `_special=True`, so the potential solution would be like this: class _GenericAlias: ... def __reduce__(self): if self._special: return 'typing.' + self._name return super().__reduce__() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 11:55:31 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 19 Feb 2018 16:55:31 +0000 Subject: [issue32457] Windows Python cannot handle an early PATH entry containing ".." and python.exe In-Reply-To: <1514660312.79.0.213398074469.issue32457@psf.upfronthosting.co.za> Message-ID: <1519059331.35.0.467229070634.issue32457@psf.upfronthosting.co.za> Change by Steve Dower : ---------- assignee: -> steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 11:56:21 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 19 Feb 2018 16:56:21 +0000 Subject: [issue32457] Windows Python cannot handle an early PATH entry containing ".." and python.exe In-Reply-To: <1514660312.79.0.213398074469.issue32457@psf.upfronthosting.co.za> Message-ID: <1519059381.98.0.467229070634.issue32457@psf.upfronthosting.co.za> Change by Steve Dower : ---------- keywords: +patch pull_requests: +5534 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 11:57:10 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 19 Feb 2018 16:57:10 +0000 Subject: [issue32409] venv activate.bat is UTF-8 encoded but uses current console codepage In-Reply-To: <1513938975.69.0.213398074469.issue32409@psf.upfronthosting.co.za> Message-ID: <1519059430.46.0.467229070634.issue32409@psf.upfronthosting.co.za> Steve Dower added the comment: Eryk's solution seems to be best, so I'll add that. ---------- assignee: -> steve.dower versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 11:58:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 19 Feb 2018 16:58:48 +0000 Subject: [issue32873] Pickling of typing types In-Reply-To: <1519037205.03.0.467229070634.issue32873@psf.upfronthosting.co.za> Message-ID: <1519059528.69.0.467229070634.issue32873@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think it would be better to pickle `typing.List[int]` as `operator.getitem(typing.List, int)`. def __reduce__(self): if self._special: return self._name # __module__ = 'typing' index = self._args if len(index) == 1: index, = index return operator.getitem, (self._unparametrized, index) And there may be a special case for Union. I tried to implement this, but it seems to me that parametrized type doesn't have a reference to unparametrized type, and I don't know this code enough for writing idiomatic code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 12:57:25 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 19 Feb 2018 17:57:25 +0000 Subject: [issue32872] backport of #32305 causes regressions in various packages In-Reply-To: <1519031028.52.0.467229070634.issue32872@psf.upfronthosting.co.za> Message-ID: <1519063045.23.0.467229070634.issue32872@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 13:11:12 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 19 Feb 2018 18:11:12 +0000 Subject: [issue32409] venv activate.bat is UTF-8 encoded but uses current console codepage In-Reply-To: <1513938975.69.0.213398074469.issue32409@psf.upfronthosting.co.za> Message-ID: <1519063872.63.0.467229070634.issue32409@psf.upfronthosting.co.za> Change by Steve Dower : ---------- keywords: +patch pull_requests: +5535 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 13:27:18 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 19 Feb 2018 18:27:18 +0000 Subject: [issue32872] backport of #32305 causes regressions in various packages In-Reply-To: <1519031028.52.0.467229070634.issue32872@psf.upfronthosting.co.za> Message-ID: <1519064838.55.0.467229070634.issue32872@psf.upfronthosting.co.za> Ned Deily added the comment: Now that we know that this change *does* break some existing code, I think it is worth having that talk as mentioned in PR 5481: "I suppose it's possible that this will break existing code, but I'd argue that because current behavior runs counter to the documentation and makes no sense given the inconsistencies, it is better to fix them. I propose this change be applied to 3.7 and 3.6, although if you, my friendly reviewer, disagrees about 3.6, we can talk about it!" The question I have is: is the problem the backport is trying to fix severe enough to cause package regressions in the middle of a maintenance release cycle? Sure, the third-party packages should be fixed and such a change is fine for 3.7 but we also kinda promise that installing a maintenance release should be painless. I don't know what is the right answer and I don't want to spend a lot of time on this but I'd like to get a bit more input on this before we go ahead with releasing it in 3.6.5. ---------- nosy: +brett.cannon, ncoghlan, ned.deily resolution: wont fix -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 13:31:39 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 19 Feb 2018 18:31:39 +0000 Subject: [issue32872] backport of #32305 causes regressions in various packages In-Reply-To: <1519031028.52.0.467229070634.issue32872@psf.upfronthosting.co.za> Message-ID: <1519065099.63.0.467229070634.issue32872@psf.upfronthosting.co.za> Change by Ned Deily : ---------- priority: critical -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 13:33:31 2018 From: report at bugs.python.org (Jay Crotts) Date: Mon, 19 Feb 2018 18:33:31 +0000 Subject: [issue32854] Add ** Map Unpacking Support for namedtuple In-Reply-To: <1518718232.91.0.467229070634.issue32854@psf.upfronthosting.co.za> Message-ID: <1519065211.1.0.467229070634.issue32854@psf.upfronthosting.co.za> Jay Crotts added the comment: Thanks Raymond, I wasn't sure if it was a common pattern or not, that makes sense. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 13:43:31 2018 From: report at bugs.python.org (Victor Porton) Date: Mon, 19 Feb 2018 18:43:31 +0000 Subject: [issue32875] Add __exit__() method to event loops Message-ID: <1519065811.74.0.467229070634.issue32875@psf.upfronthosting.co.za> New submission from Victor Porton : Please add `__exit__()` method to event loops, to use them with `with`. ---------- components: asyncio messages: 312360 nosy: asvetlov, porton, yselivanov priority: normal severity: normal status: open title: Add __exit__() method to event loops type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 13:47:12 2018 From: report at bugs.python.org (Brett Cannon) Date: Mon, 19 Feb 2018 18:47:12 +0000 Subject: [issue31937] Add the term "dunder" to the glossary In-Reply-To: <1509742669.66.0.213398074469.issue31937@psf.upfronthosting.co.za> Message-ID: <1519066032.54.0.467229070634.issue31937@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 14:10:36 2018 From: report at bugs.python.org (Eric Osborne) Date: Mon, 19 Feb 2018 19:10:36 +0000 Subject: [issue32820] Add bits method to ipaddress In-Reply-To: <1518584162.51.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: Eric Osborne added the comment: I brought it up on python-ideas. Since I've not been through this process before - what happens now? Do I wait for code review on github, or is there more I need to do? eric On Tue, Feb 13, 2018 at 11:56 PM Nick Coghlan wrote: > > Nick Coghlan added the comment: > > Aye, definitely worth a thread on python-ideas. My rationale for > suggesting something based on the built-in numeric codes is that it makes > it straightforward for *users* to transfer knowledge from that > mini-language. > > As far as parsing goes, I was thinking of something along the lines of the > following naive approach: > > typechar = fmt[-1:] > if not typechar or typechar not in ("b", "n", "x"): > return super().__format__(fmt) > prefix, group_sep, suffix = fmt[:-1].rpartition("_") > if prefix and prefix != "#" or suffix: > return super().__format__(fmt) > field_width = self._calculate_field_width(typechar) > return format(int(self), > f"{prefix}0{field_width}{group_sep}{type_char}") > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 14:26:48 2018 From: report at bugs.python.org (Eric Snow) Date: Mon, 19 Feb 2018 19:26:48 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1519068408.79.0.467229070634.issue32604@psf.upfronthosting.co.za> Eric Snow added the comment: @Yury, thanks! I thought I had checked before I made the PR, but apparently not. I'll git it fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 14:49:35 2018 From: report at bugs.python.org (Zachary Ware) Date: Mon, 19 Feb 2018 19:49:35 +0000 Subject: [issue30121] Windows: subprocess debug assertion on failure to execute the process In-Reply-To: <1492728235.69.0.898513798091.issue30121@psf.upfronthosting.co.za> Message-ID: <1519069775.64.0.467229070634.issue30121@psf.upfronthosting.co.za> Change by Zachary Ware : ---------- pull_requests: +5536 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 14:52:16 2018 From: report at bugs.python.org (Hanno Boeck) Date: Mon, 19 Feb 2018 19:52:16 +0000 Subject: [issue32876] HTMLParser raises exception on some inputs Message-ID: <1519069936.36.0.467229070634.issue32876@psf.upfronthosting.co.za> New submission from Hanno Boeck : I noticed that the HTMLParser will raise an exception on some inputs. I'm not sure what the expectations here are, but given that real-world HTML often contains all kinds of broken content I would assume an HTMLParser to always try to parse a document and not be interrupted by an exception if an error occurs. Here's a minified example: #!/usr/bin/env python3 import html.parser html.parser.HTMLParser().feed(" html.parser.HTMLParser().feed(" _______________________________________ From report at bugs.python.org Mon Feb 19 15:01:11 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Mon, 19 Feb 2018 20:01:11 +0000 Subject: [issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams In-Reply-To: <1518686430.4.0.467229070634.issue32849@psf.upfronthosting.co.za> Message-ID: <1519070471.68.0.467229070634.issue32849@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: Thank you for checking. If this issue happens even when Python is run manually from an ordinary shell, fixing it in the same way as in #30225 is probably not what you want because while the error message will be gone the corresponding std stream will be None (sys.stdin in the case that you ktrace'd). However, if fd 0 really becomes unusable for some reason, there isn't anything Python can do. Given your description and ktrace log, I can't imagine why fd 0 would behave strangely only in Python. I've attached a small C program to check fd 0. Could you compile it and run in an infinite loop from the shell in an attempt to reproduce this? ---------- Added file: https://bugs.python.org/file47451/fstat0.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 15:02:41 2018 From: report at bugs.python.org (Zachary Ware) Date: Mon, 19 Feb 2018 20:02:41 +0000 Subject: [issue30121] Windows: subprocess debug assertion on failure to execute the process In-Reply-To: <1492728235.69.0.898513798091.issue30121@psf.upfronthosting.co.za> Message-ID: <1519070561.52.0.467229070634.issue30121@psf.upfronthosting.co.za> Zachary Ware added the comment: New changeset 5537646bfacec463b450871dde31cb06c44a0556 by Zachary Ware in branch 'master': bpo-30121: Fix test_subprocess for Windows Debug builds (GH-5758) https://github.com/python/cpython/commit/5537646bfacec463b450871dde31cb06c44a0556 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 15:02:59 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 19 Feb 2018 20:02:59 +0000 Subject: [issue30121] Windows: subprocess debug assertion on failure to execute the process In-Reply-To: <1492728235.69.0.898513798091.issue30121@psf.upfronthosting.co.za> Message-ID: <1519070579.18.0.467229070634.issue30121@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5537 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 15:04:14 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 19 Feb 2018 20:04:14 +0000 Subject: [issue30121] Windows: subprocess debug assertion on failure to execute the process In-Reply-To: <1492728235.69.0.898513798091.issue30121@psf.upfronthosting.co.za> Message-ID: <1519070654.56.0.467229070634.issue30121@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5538 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 15:09:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 19 Feb 2018 20:09:13 +0000 Subject: [issue32876] HTMLParser raises exception on some inputs In-Reply-To: <1519069936.36.0.467229070634.issue32876@psf.upfronthosting.co.za> Message-ID: <1519070953.69.0.467229070634.issue32876@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 15:19:23 2018 From: report at bugs.python.org (Brett Cannon) Date: Mon, 19 Feb 2018 20:19:23 +0000 Subject: [issue32872] backport of #32305 causes regressions in various packages In-Reply-To: <1519031028.52.0.467229070634.issue32872@psf.upfronthosting.co.za> Message-ID: <1519071563.52.0.467229070634.issue32872@psf.upfronthosting.co.za> Brett Cannon added the comment: I'm personally fine if the change gets reverted. I don't think the odd behaviour is severe enough to justify breaking projects in a maintenance release. Besides, they will learn soon enough about their code breaking in Python 3.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 15:20:23 2018 From: report at bugs.python.org (Eric Snow) Date: Mon, 19 Feb 2018 20:20:23 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1519071623.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Eric Snow added the comment: I'm not seeing any refleak (on linux/clang). I'm guessing this is Windows-specific (based on use of "./python.exe"). How does test_multiprocessing_fork even run on Windows? I thought "fork" is an unsupported start method on Windows (see https://docs.python.org/3.7/library/multiprocessing.html#contexts-and-start-methods). Also, I'm not sure how my change might cause a refleak outside of code using the _xxsubinterpreters module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 15:23:22 2018 From: report at bugs.python.org (Eric Snow) Date: Mon, 19 Feb 2018 20:23:22 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1519071802.59.0.467229070634.issue32604@psf.upfronthosting.co.za> Eric Snow added the comment: Davin, any thoughts on how my most recent commit (for this issue) might be causing the leaks Yury found? ---------- nosy: +davin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 15:45:24 2018 From: report at bugs.python.org (Zachary Ware) Date: Mon, 19 Feb 2018 20:45:24 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1519073124.66.0.467229070634.issue32604@psf.upfronthosting.co.za> Zachary Ware added the comment: Looks like macOS rather than Windows, and I can't reproduce it locally with current master: 14:28 $ ./python.exe -m test -R3:3 test_multiprocessing_fork Run tests sequentially 0:00:00 load avg: 2.68 [1/1] test_multiprocessing_fork beginning 6 repetitions 123456 ...... test_multiprocessing_fork passed in 9 min 20 sec 1 test OK. Total duration: 9 min 20 sec Tests result: SUCCESS The Windows and Linux refleak buildbots [1] are currently unhappy about other things that appear to be unrelated. [1] http://buildbot.python.org/all/#/builders?tags=%2Brefleak ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 15:48:48 2018 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 19 Feb 2018 20:48:48 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1519073328.34.0.467229070634.issue32604@psf.upfronthosting.co.za> Yury Selivanov added the comment: FYI I found out about this refleak from https://mail.python.org/pipermail/python-checkins/2018-February/153907.html So it's definitely not Mac OS X specific thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 15:49:49 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 19 Feb 2018 20:49:49 +0000 Subject: [issue30121] Windows: subprocess debug assertion on failure to execute the process In-Reply-To: <1492728235.69.0.898513798091.issue30121@psf.upfronthosting.co.za> Message-ID: <1519073389.19.0.467229070634.issue30121@psf.upfronthosting.co.za> miss-islington added the comment: New changeset ef0bb5c7b76a49a5f3c5b85b5f9112cfefe54328 by Miss Islington (bot) in branch '3.6': bpo-30121: Fix test_subprocess for Windows Debug builds (GH-5758) https://github.com/python/cpython/commit/ef0bb5c7b76a49a5f3c5b85b5f9112cfefe54328 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 15:49:59 2018 From: report at bugs.python.org (Zachary Ware) Date: Mon, 19 Feb 2018 20:49:59 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1519073399.74.0.467229070634.issue32604@psf.upfronthosting.co.za> Zachary Ware added the comment: I'm pretty sure that report is still running on the last changeset on hg.python.org; can you confirm that Antoine? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 15:52:18 2018 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 19 Feb 2018 20:52:18 +0000 Subject: [issue32856] Optimize the `for y in [x]` idiom in comprehensions In-Reply-To: <1518770483.24.0.467229070634.issue32856@psf.upfronthosting.co.za> Message-ID: <1519073538.35.0.467229070634.issue32856@psf.upfronthosting.co.za> Change by Stefan Behnel : ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 16:00:24 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 19 Feb 2018 21:00:24 +0000 Subject: [issue30121] Windows: subprocess debug assertion on failure to execute the process In-Reply-To: <1492728235.69.0.898513798091.issue30121@psf.upfronthosting.co.za> Message-ID: <1519074024.29.0.467229070634.issue30121@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 622a824802771fc5aa133ae92101bc8303360294 by Miss Islington (bot) in branch '3.7': bpo-30121: Fix test_subprocess for Windows Debug builds (GH-5758) https://github.com/python/cpython/commit/622a824802771fc5aa133ae92101bc8303360294 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 16:19:34 2018 From: report at bugs.python.org (pmpp) Date: Mon, 19 Feb 2018 21:19:34 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1519075174.43.0.467229070634.issue32604@psf.upfronthosting.co.za> Change by pmpp : ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 16:20:48 2018 From: report at bugs.python.org (pmpp) Date: Mon, 19 Feb 2018 21:20:48 +0000 Subject: [issue30439] Expose the subinterpreters C-API in the stdlib. In-Reply-To: <1495517065.49.0.193361600538.issue30439@psf.upfronthosting.co.za> Message-ID: <1519075248.51.0.467229070634.issue30439@psf.upfronthosting.co.za> Change by pmpp : ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 16:28:57 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 19 Feb 2018 21:28:57 +0000 Subject: [issue32566] Not able to run Python 3.6 on Windows In-Reply-To: <1516095028.12.0.467229070634.issue32566@psf.upfronthosting.co.za> Message-ID: <1519075737.09.0.467229070634.issue32566@psf.upfronthosting.co.za> Change by Steve Dower : ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 16:41:08 2018 From: report at bugs.python.org (ruffsl) Date: Mon, 19 Feb 2018 21:41:08 +0000 Subject: [issue32877] Login to bugs.python.org with Google account NOT working Message-ID: <1519076468.29.0.467229070634.issue32877@psf.upfronthosting.co.za> New submission from ruffsl : I've been unable to login to bugs.python.org using Google's oauth. After clicking the google oauth logo on the sidebar on bugs.python.org, I am either slowly redirected to a google login page (after about 1 min) to select an account, then after selecting the relevant google account or if I'm only active in it, I'm eventually given a error message after about 2 min of loading time: ``` html An error has occurred

An error has occurred

A problem was encountered processing your request. The tracker maintainers have been notified of the problem.

``` Other outputs from the browser debug console: ``` Failed to load resource: the server responded with a status of 404 (/tracker/favicon.ico) Failed to load resource: the server responded with a status of 500 (Internal Server Error) ``` This has persisted for about a week now, on multiple machines, bowsers, and ISPs. Presently, the only way I've been able to post this issue at all is due to my first and only login session on one workstation is still active. I suspect this might be a larger issue, only that no one else using google oauth to login has been able to login to file and voise the bug? Related? https://bugs.python.org/issue29544 https://bugs.python.org/issue28887 ---------- messages: 312374 nosy: ruffsl priority: normal severity: normal status: open title: Login to bugs.python.org with Google account NOT working _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 16:52:06 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 19 Feb 2018 21:52:06 +0000 Subject: [issue32874] IDLE: Add tests for pyparse In-Reply-To: <1519055766.11.0.467229070634.issue32874@psf.upfronthosting.co.za> Message-ID: <1519077126.95.0.467229070634.issue32874@psf.upfronthosting.co.za> Terry J. Reedy added the comment: My only contact with pyparse has been #21765, which modified hyperparser and pyparse to support unicode identifiers. It also added tests for hyperparser, but not pyparse (msg223150: "it seems to be working as expected"). Thanks for filling in this hole. ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 17:14:15 2018 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 19 Feb 2018 22:14:15 +0000 Subject: [issue32878] Document value of st_ino on Windows Message-ID: <1519078455.66.0.467229070634.issue32878@psf.upfronthosting.co.za> New submission from Guido van Rossum : We received a report from a well-meaning security researcher who was confused by the non-zero and arbitrary value of st_ino in stat() results on Windows (where in Python 2 this was always zero). The researcher was worried that this was due to an uninitialized memory read. The actual cause is the way this field is filled with arbitary data: https://github.com/python/cpython/blob/master/Python/fileutils.c#L758 Let's make sure this is documented properly for all versions where we still update the docs. ---------- assignee: steve.dower components: Documentation messages: 312376 nosy: gvanrossum, steve.dower priority: normal severity: normal status: open title: Document value of st_ino on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 17:39:51 2018 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 19 Feb 2018 22:39:51 +0000 Subject: [issue32873] Pickling of typing types In-Reply-To: <1519059528.69.0.467229070634.issue32873@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: I'm honestly not too concerned about what happens with List[int] (though doing a sensible thing here is not wrong :-), but I feel strongly that a pickle containing a reference to typing.List should be compatible between Python 3.6 and 3.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 17:56:00 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 19 Feb 2018 22:56:00 +0000 Subject: [issue32556] support bytes paths in nt _getdiskusage, _getvolumepathname, and _getfinalpathname In-Reply-To: <1516029730.24.0.467229070634.issue32556@psf.upfronthosting.co.za> Message-ID: <1519080960.78.0.467229070634.issue32556@psf.upfronthosting.co.za> Change by Steve Dower : ---------- keywords: +patch pull_requests: +5539 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 17:56:33 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 19 Feb 2018 22:56:33 +0000 Subject: [issue32556] support bytes paths in nt _getdiskusage, _getvolumepathname, and _getfinalpathname In-Reply-To: <1516029730.24.0.467229070634.issue32556@psf.upfronthosting.co.za> Message-ID: <1519080993.53.0.467229070634.issue32556@psf.upfronthosting.co.za> Change by Steve Dower : ---------- assignee: -> steve.dower stage: patch review -> needs patch versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 18:01:18 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 19 Feb 2018 23:01:18 +0000 Subject: [issue29241] sys._enablelegacywindowsfsencoding() don't apply to os.fsencode and os.fsdecode In-Reply-To: <1484137681.59.0.0301192140292.issue29241@psf.upfronthosting.co.za> Message-ID: <1519081278.62.0.467229070634.issue29241@psf.upfronthosting.co.za> Steve Dower added the comment: I took another look at this and it's still unclear whether it's worth the performance loss. Perhaps moving fsencode and fsdecode (almost) entirely into C would be a better approach? That shouldn't send us backwards at all, and all they really do is a typecheck and then calling a function that's already written in C. ---------- assignee: steve.dower -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 18:02:09 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 19 Feb 2018 23:02:09 +0000 Subject: [issue32876] HTMLParser raises exception on some inputs In-Reply-To: <1519069936.36.0.467229070634.issue32876@psf.upfronthosting.co.za> Message-ID: <1519081329.2.0.467229070634.issue32876@psf.upfronthosting.co.za> Steven D'Aprano added the comment: The stdlib HTML parser requires correct HTML. To parse broken HTML, as you find in the real world, you need a third-party library like BeautifulSoup. BeautifulSoup is much more complex (about 7-8 times as many LOC) but can handle nearly anything a browser can. I doubt the stdlib will ever compete with BeautifulSoup. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 18:05:00 2018 From: report at bugs.python.org (Hanno Boeck) Date: Mon, 19 Feb 2018 23:05:00 +0000 Subject: [issue32876] HTMLParser raises exception on some inputs In-Reply-To: <1519069936.36.0.467229070634.issue32876@psf.upfronthosting.co.za> Message-ID: <1519081500.99.0.467229070634.issue32876@psf.upfronthosting.co.za> Hanno Boeck added the comment: Actually BeautifulSoup also uses the python html parser in the backend, so it has the same problem. (It can use alternative backends, but the python parser is the default and they also describe it as "lenient", which I would interpret as "it can handle that".) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 18:07:21 2018 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 19 Feb 2018 23:07:21 +0000 Subject: [issue32876] HTMLParser raises exception on some inputs In-Reply-To: <1519069936.36.0.467229070634.issue32876@psf.upfronthosting.co.za> Message-ID: <1519081640.99.0.467229070634.issue32876@psf.upfronthosting.co.za> Ezio Melotti added the comment: The HTMLParser has been updated to handle HTML5 and should never fail parsing a document, so if it raises an error it's probably a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 18:09:12 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 19 Feb 2018 23:09:12 +0000 Subject: [issue32840] Must install python 3.6.3 when 3.6.4 already installed In-Reply-To: <1518552638.75.0.467229070634.issue32840@psf.upfronthosting.co.za> Message-ID: <1519081752.12.0.467229070634.issue32840@psf.upfronthosting.co.za> Steve Dower added the comment: We confirmed offline that it's not a bug. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 18:22:26 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 19 Feb 2018 23:22:26 +0000 Subject: [issue32764] Popen doesn't work on Windows when args is a list In-Reply-To: <1517760102.46.0.467229070634.issue32764@psf.upfronthosting.co.za> Message-ID: <1519082546.43.0.467229070634.issue32764@psf.upfronthosting.co.za> Change by Steve Dower : ---------- keywords: +patch pull_requests: +5540 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 18:23:15 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 19 Feb 2018 23:23:15 +0000 Subject: [issue32764] Popen doesn't work on Windows when args is a list In-Reply-To: <1517760102.46.0.467229070634.issue32764@psf.upfronthosting.co.za> Message-ID: <1519082595.23.0.467229070634.issue32764@psf.upfronthosting.co.za> Steve Dower added the comment: Turns out this is a trivial typo in the test, so I stole the issue from Greg and pushed a PR. ---------- assignee: gregory.p.smith -> steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 18:31:29 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 19 Feb 2018 23:31:29 +0000 Subject: [issue32870] Documentation typo (2.x only) for deque.remove In-Reply-To: <1518976776.93.0.467229070634.issue32870@psf.upfronthosting.co.za> Message-ID: <1519083089.95.0.467229070634.issue32870@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +5541 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 18:42:59 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 19 Feb 2018 23:42:59 +0000 Subject: [issue32870] Documentation typo (2.x only) for deque.remove In-Reply-To: <1518976776.93.0.467229070634.issue32870@psf.upfronthosting.co.za> Message-ID: <1519083779.22.0.467229070634.issue32870@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 Feb 19 18:50:35 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 19 Feb 2018 23:50:35 +0000 Subject: [issue32857] tkinter after_cancel does not behave correctly when called with id=None In-Reply-To: <1518787214.25.0.467229070634.issue32857@psf.upfronthosting.co.za> Message-ID: <1519084235.01.0.467229070634.issue32857@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I had also noticed that the `after` commands didn't have tests. Did you want me to add tests in a separate issue before this one is merged or did you want me to add tests under this PR? Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 18:59:08 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 19 Feb 2018 23:59:08 +0000 Subject: [issue32878] Document value of st_ino on Windows In-Reply-To: <1519078455.66.0.467229070634.issue32878@psf.upfronthosting.co.za> Message-ID: <1519084748.08.0.467229070634.issue32878@psf.upfronthosting.co.za> Change by Steve Dower : ---------- keywords: +patch pull_requests: +5542 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 19:22:39 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 20 Feb 2018 00:22:39 +0000 Subject: [issue32556] support bytes paths in nt _getdiskusage, _getvolumepathname, and _getfinalpathname In-Reply-To: <1516029730.24.0.467229070634.issue32556@psf.upfronthosting.co.za> Message-ID: <1519086159.54.0.467229070634.issue32556@psf.upfronthosting.co.za> Change by Steve Dower : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 19:31:53 2018 From: report at bugs.python.org (Zachary Ware) Date: Tue, 20 Feb 2018 00:31:53 +0000 Subject: [issue32764] Popen doesn't work on Windows when args is a list In-Reply-To: <1517760102.46.0.467229070634.issue32764@psf.upfronthosting.co.za> Message-ID: <1519086713.23.0.467229070634.issue32764@psf.upfronthosting.co.za> Zachary Ware added the comment: I fixed this independently earlier today, tied to bpo-30121 (the issue that introduced the test bug) because I didn't find this one. See PR5758, PR5759 (3.7), and PR5760 (3.6). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 19:34:13 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 20 Feb 2018 00:34:13 +0000 Subject: [issue32764] Popen doesn't work on Windows when args is a list In-Reply-To: <1517760102.46.0.467229070634.issue32764@psf.upfronthosting.co.za> Message-ID: <1519086853.36.0.467229070634.issue32764@psf.upfronthosting.co.za> Steve Dower added the comment: Sounds good to me ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Windows: subprocess debug assertion on failure to execute the process _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 19:48:16 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Tue, 20 Feb 2018 00:48:16 +0000 Subject: [issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams In-Reply-To: <1518686430.4.0.467229070634.issue32849@psf.upfronthosting.co.za> Message-ID: <1519087696.92.0.467229070634.issue32849@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: > I think that we can even drop dup-based validation from is_valid_fd() For POSIX, that is. There is no fstat on Windows, and dup is probably OK there (or, even better, dup2(fd, fd) -- no need to close). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 19:43:03 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Tue, 20 Feb 2018 00:43:03 +0000 Subject: [issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams In-Reply-To: <1518686430.4.0.467229070634.issue32849@psf.upfronthosting.co.za> Message-ID: <1519087383.46.0.467229070634.issue32849@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: OK, never mind with the test. I've finally got to a FreeBSD box and reproduced the problem. It has to do with 'revoke' feature of *BSD. When revoke is called on a terminal device (as part of logout process, for example), all descriptors associated with it are invalidated. They can be dup'ed, but any I/O (including fstat) will fail with EBADF. The attached 'repro.c' demonstrates the same behavior as Python in your ktrace log. # sleep 5; ./repro >&err.txt & # exit (login again) # cat err.txt isatty: Inappropriate ioctl for device dup ok: 3 fstat: Bad file descriptor So it seems that in your case the parent of your Python processes passed a descriptor referring to the terminal as fd 0, and then terminal got revoked at some point. People have stumbled on that, for example, https://bitbucket.org/tildeslash/monit/issues/649/init_env-fails-if-open-2-returns-an As for Python, it seems OK to fix it as in #30225 since the fd is unusable for I/O anyway. I think that we can even drop dup-based validation from is_valid_fd() since there is a corner case for Linux too: if a descriptor opened with O_PATH inherited as a standard one, dup() will succeed but fstat() will fail in kernels before 3.6. And we do fstat() almost immediately after is_valid_fd() to get blksize, so the dup-based optimization doesn't seem worth the trouble. Victor, do you have an opinion on that? ---------- components: +FreeBSD, IO nosy: +koobs versions: +Python 3.7 Added file: https://bugs.python.org/file47452/repro.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 20:25:29 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 20 Feb 2018 01:25:29 +0000 Subject: [issue32409] venv activate.bat is UTF-8 encoded but uses current console codepage In-Reply-To: <1513938975.69.0.213398074469.issue32409@psf.upfronthosting.co.za> Message-ID: <1519089929.56.0.467229070634.issue32409@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 6240917b773b52f8883387b9e3a5f327a4372068 by Steve Dower in branch 'master': bpo-32409: Ensures activate.bat can handle Unicode contents (GH-5757) https://github.com/python/cpython/commit/6240917b773b52f8883387b9e3a5f327a4372068 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 20:25:40 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 20 Feb 2018 01:25:40 +0000 Subject: [issue32409] venv activate.bat is UTF-8 encoded but uses current console codepage In-Reply-To: <1513938975.69.0.213398074469.issue32409@psf.upfronthosting.co.za> Message-ID: <1519089940.29.0.467229070634.issue32409@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5543 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 20:25:42 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 20 Feb 2018 01:25:42 +0000 Subject: [issue32409] venv activate.bat is UTF-8 encoded but uses current console codepage In-Reply-To: <1513938975.69.0.213398074469.issue32409@psf.upfronthosting.co.za> Message-ID: <1519089942.77.0.467229070634.issue32409@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5543, 5544 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 20:26:32 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 20 Feb 2018 01:26:32 +0000 Subject: [issue32409] venv activate.bat is UTF-8 encoded but uses current console codepage In-Reply-To: <1513938975.69.0.213398074469.issue32409@psf.upfronthosting.co.za> Message-ID: <1519089992.75.0.467229070634.issue32409@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5545 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 20:45:06 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 20 Feb 2018 01:45:06 +0000 Subject: [issue32409] venv activate.bat is UTF-8 encoded but uses current console codepage In-Reply-To: <1513938975.69.0.213398074469.issue32409@psf.upfronthosting.co.za> Message-ID: <1519091106.19.0.467229070634.issue32409@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset a3d6c1b23b8a49b5003fdbd115d3598fe3d4c4bf by Steve Dower (Miss Islington (bot)) in branch '3.7': bpo-32409: Ensures activate.bat can handle Unicode contents (GH-5765) https://github.com/python/cpython/commit/a3d6c1b23b8a49b5003fdbd115d3598fe3d4c4bf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 20:45:58 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 20 Feb 2018 01:45:58 +0000 Subject: [issue32409] venv activate.bat is UTF-8 encoded but uses current console codepage In-Reply-To: <1513938975.69.0.213398074469.issue32409@psf.upfronthosting.co.za> Message-ID: <1519091158.94.0.467229070634.issue32409@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 Feb 19 20:55:02 2018 From: report at bugs.python.org (Simon Bouchard) Date: Tue, 20 Feb 2018 01:55:02 +0000 Subject: [issue32879] Race condition in multiprocessing Queue Message-ID: <1519091702.0.0.467229070634.issue32879@psf.upfronthosting.co.za> New submission from Simon Bouchard : The clear list function call in made after the put(data) on the queue. But the data is sometime clear in the queue (randomly). Since both function are call within the same process, a race condition is not expected. ---------- files: code.py messages: 312391 nosy: TwistedSim priority: normal severity: normal status: open title: Race condition in multiprocessing Queue type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file47453/code.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 21:15:10 2018 From: report at bugs.python.org (Tim Peters) Date: Tue, 20 Feb 2018 02:15:10 +0000 Subject: [issue32879] Race condition in multiprocessing Queue In-Reply-To: <1519091702.0.0.467229070634.issue32879@psf.upfronthosting.co.za> Message-ID: <1519092910.1.0.467229070634.issue32879@psf.upfronthosting.co.za> Tim Peters added the comment: The docs could be clearer about this: the argument to .put() is _not_ pickled at the time .put() is called. The object is remembered (by reference, not by value), and a feeder thread pickles the value and puts the pickle on the queue when the feeder thread gets around to that. So if the object is mutated in any way in between, it's not defined whether the pre- or post-mutation state is put on the queue (or, in some cases, even some partially mutated value). To make it wholly deterministic you could, e.g., change the .put() to this: queue.put(data[:]) Or you could use a Manager().Queue() instead, which doesn't use a feeder thread. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 21:18:45 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 20 Feb 2018 02:18:45 +0000 Subject: [issue32409] venv activate.bat is UTF-8 encoded but uses current console codepage In-Reply-To: <1513938975.69.0.213398074469.issue32409@psf.upfronthosting.co.za> Message-ID: <1519093125.44.0.467229070634.issue32409@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 8e149ff481acbb3889c825b8bf7b10aa191f09a7 by Steve Dower (Miss Islington (bot)) in branch '3.6': bpo-32409: Ensures activate.bat can handle Unicode contents (GH-5766) https://github.com/python/cpython/commit/8e149ff481acbb3889c825b8bf7b10aa191f09a7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 21:19:14 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 20 Feb 2018 02:19:14 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse Message-ID: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> New submission from Terry J. Reedy : Pyparse was mostly written in the early 2000s, with the only one code change since 2007 in 2014. #32874 will add tests for pyparse 'as is' (though with some docstring and comment changes). This issue will change pyparse code, and change or add test as needed. Here are two items to fix. More will be added. Some fixes might be separate PRs or spun off into separate issues. def dump: dump this; print does the same, without hardcoding sys.__stdout__, which might be None. _synchre: Only used in find_good_parse_start. Missing 'if' (mentioned in function docstring as 'popular' and 'for' and new things like 'with'. 'async' and 'await' are not generally popular, but is not any statement beginning a good parse start? ---------- assignee: terry.reedy components: IDLE messages: 312394 nosy: csabella, terry.reedy priority: normal severity: normal stage: test needed status: open title: IDLE: Fix and update and cleanup pyparse type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 21:50:52 2018 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 20 Feb 2018 02:50:52 +0000 Subject: [issue32500] PySequence_Length() raises TypeError on dict type In-Reply-To: <1515199107.36.0.467229070634.issue32500@psf.upfronthosting.co.za> Message-ID: <1519095052.52.0.467229070634.issue32500@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +5546 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 21:54:21 2018 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 20 Feb 2018 02:54:21 +0000 Subject: [issue32500] PySequence_Length() raises TypeError on dict type In-Reply-To: <1515199107.36.0.467229070634.issue32500@psf.upfronthosting.co.za> Message-ID: <1519095261.06.0.467229070634.issue32500@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 21:55:39 2018 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 20 Feb 2018 02:55:39 +0000 Subject: [issue31848] "aifc" module does not always initialize "Aifc_read._ssnd_chunk" In-Reply-To: <1508765581.06.0.213398074469.issue31848@psf.upfronthosting.co.za> Message-ID: <1519095339.36.0.467229070634.issue31848@psf.upfronthosting.co.za> Change by Zackery Spytz : ---------- components: -Tests nosy: +ZackerySpytz type: crash -> behavior versions: +Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 22:29:31 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 20 Feb 2018 03:29:31 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse In-Reply-To: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> Message-ID: <1519097371.8.0.467229070634.issue32880@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Let's consider the todo questions at the end of the class Parser code. --- # XXX - is this used? lastopenbracketpos = None def get_last_open_bracket_pos(self): "Return index of last open bracket or None." self._study2() return self.lastopenbracketpos # XXX - is this used? stmt_bracketing = None def get_last_stmt_bracketing(self): """Return a tuple of the structure of the bracketing of the last interesting statement. Tuple is in the format defined in _study2(). """ self._study2() return self.stmt_bracketing --- get_last_open_bracket_pos is not called anywhere. TODO remove it. get_last_stmt_bracketing is called once in hyperparser and could be replaced there by 'parser._study2(); parser.stmt_bracketing'. TODO? Integer lastopenbracketpos is only conditionally set as an instance attribute, which masks the class attribute, in _study2 with if stack: # of opener indices self.lastopenbracketpos = stack[-1] However, self.lastopenbracketpos in only accessed (as 'j') in compute_bracket_indent, which is only called when a statement is continued to the next line because of an open bracket. Indeed, the call is guarded by assert self.continuation == C_BRACKET # TODO: move up So the class binding is never used because it is always masked bebore being accessed. Its value None would raise if it were. (That may have been intentional.) TODO remove it. Stopping here would break the current tests. We could make _study2 return the index and change test according. Or we can make _study2 always set the attribute with (TODO this) self.lastopenbracketpos = stack[-1] if stack else None and remove the workaround test lines: p.lastopenbracketpos = None Since _study2 unconditionally sets stmt_bracketing as an instance attribute with self.stmt_bracketing = tuple(bracketing) and self.stmt_bracketing is only accessed, in the get function above (or possibly directly in the future), after such a call, its class setting is also useless. TODO remove it. No test change needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 22:52:23 2018 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 20 Feb 2018 03:52:23 +0000 Subject: [issue32820] Add bits method to ipaddress In-Reply-To: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: <1519098743.41.0.467229070634.issue32820@psf.upfronthosting.co.za> Nick Coghlan added the comment: The python-ideas discussion didn't turn up any major concerns we hadn't already considered, so you're in "wait for PR review" mode now. If you wanted to do a self-review in the meantime, then https://devguide.python.org/committing/#accepting-pull-requests covers the kinds of additional things a reviewer will be looking for. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 22:57:42 2018 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 20 Feb 2018 03:57:42 +0000 Subject: [issue32872] backport of #32305 causes regressions in various packages In-Reply-To: <1519031028.52.0.467229070634.issue32872@psf.upfronthosting.co.za> Message-ID: <1519099062.7.0.467229070634.issue32872@psf.upfronthosting.co.za> Nick Coghlan added the comment: +1 from me for making the change 3.7.0+ only - 3.6 isn't doing the right thing, but given folks are relying on it doing the wrong thing, then let's leave it alone given where it is in its lifecycle. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 23:16:22 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 20 Feb 2018 04:16:22 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse In-Reply-To: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> Message-ID: <1519100182.71.0.467229070634.issue32880@psf.upfronthosting.co.za> Terry J. Reedy added the comment: set_str sets self.str and self.study_level. After the first call, attempts to access unset instance parse attributes from other modules will raise AttributeError. Removing the unneeded class setting will just add 2 more names to the list of things that should not be called directly. The get_xyz functions (get_continuation_type is another) avoid AttributeError (unless self.str is not set) and ensure validity. If set_str is called more than once, instance parse attributes will initially be set but invalid. So it seems they should be either deleted or set to None. In the latter case, they should also be set to None initially. I will look more at how the module is used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 19 23:48:12 2018 From: report at bugs.python.org (zhaoya) Date: Tue, 20 Feb 2018 04:48:12 +0000 Subject: [issue32881] pycapsule:PyObject * is NULL pointer Message-ID: <1519102092.04.0.467229070634.issue32881@psf.upfronthosting.co.za> New submission from zhaoya : i have question:call,c-->python-->c. 1.the c pointer void* abc="123" by pycapsule in the c code. ...... void* lpContext = "abc"; PyObject * lpPyContext = PyCapsule_New(lpContext, "Context",NULL); ...... PyTuple_SetItem(pArgs, 1, lpPyContext); PyObject* pyResult = PyObject_CallObject(pFunc, pArgs); 2.c call python: in the python code: import ctypes pycapsule = ctypes.windll.LoadLibrary("C:\Users\zhaoya16975\Documents\Visual Studio 2017\Projects\cpython\Release\pycapsule.dll") def test( lpContext,lpRequest,lpAnswer): print lpContext pycapsule.hello() pycapsule.GetContext(lpContext) ......... the lpContest is "" but,i can't lpContext in the pycapsule.GetContest: the capsule is null poniter,the GetContext no execute!! void* FUNCTION_CALL_MODE GetContext(PyObject *capsule) { printf(" GetContext......\n"); //if (!PyCapsule_IsValid((PyObject *)capsule, "Context")) { // printf(" the Capsule Context is no Valid\n"); // return NULL; //} //return PyCapsule_GetPointer((PyObject *)capsule, "Context"); return NULL; } i hope c call python pass void* ,and python call c pass void* ,but the capsule call no success. ---------- components: Windows messages: 312399 nosy: paul.moore, steve.dower, tim.golden, zach.ware, zhaoya priority: normal severity: normal status: open title: pycapsule:PyObject * is NULL pointer type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 02:25:54 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 20 Feb 2018 07:25:54 +0000 Subject: [issue32859] os.dup2() tests dup3() availability on each call In-Reply-To: <1518822617.35.0.467229070634.issue32859@psf.upfronthosting.co.za> Message-ID: <1519111554.42.0.467229070634.issue32859@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset b3caf388a0418f6c031e4dbdcc0c1ce7e5cc36bd by Benjamin Peterson (Alexey Izbyshev) in branch 'master': closes bpo-32859: Don't retry dup3() if it is not available at runtime (GH-5708) https://github.com/python/cpython/commit/b3caf388a0418f6c031e4dbdcc0c1ce7e5cc36bd ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 02:26:09 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 20 Feb 2018 07:26:09 +0000 Subject: [issue32859] os.dup2() tests dup3() availability on each call In-Reply-To: <1518822617.35.0.467229070634.issue32859@psf.upfronthosting.co.za> Message-ID: <1519111569.46.0.467229070634.issue32859@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5547 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 02:26:55 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 20 Feb 2018 07:26:55 +0000 Subject: [issue32859] os.dup2() tests dup3() availability on each call In-Reply-To: <1518822617.35.0.467229070634.issue32859@psf.upfronthosting.co.za> Message-ID: <1519111615.85.0.467229070634.issue32859@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5548 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 02:46:49 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 20 Feb 2018 07:46:49 +0000 Subject: [issue32859] os.dup2() tests dup3() availability on each call In-Reply-To: <1518822617.35.0.467229070634.issue32859@psf.upfronthosting.co.za> Message-ID: <1519112809.31.0.467229070634.issue32859@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset bab4fe320ad2e24c1084fd57d2059ef342688aa9 by Benjamin Peterson (Miss Islington (bot)) in branch '3.7': closes bpo-32859: Don't retry dup3() if it is not available at runtime (GH-5708) https://github.com/python/cpython/commit/bab4fe320ad2e24c1084fd57d2059ef342688aa9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 03:31:15 2018 From: report at bugs.python.org (Rudolph Froger) Date: Tue, 20 Feb 2018 08:31:15 +0000 Subject: [issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams In-Reply-To: <1518686430.4.0.467229070634.issue32849@psf.upfronthosting.co.za> Message-ID: <1519115475.63.0.467229070634.issue32849@psf.upfronthosting.co.za> Rudolph Froger added the comment: Thanks for all the research! My crashing Python process is started by a shell process which is launched by the Freebsd daemon tool, this might explain why stdin in no longer valid. But I'm not sure why it can be solved, sometimes, by restarting the the daemon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 03:35:56 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 20 Feb 2018 08:35:56 +0000 Subject: [issue32820] Add bits method to ipaddress In-Reply-To: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: <1519115756.97.0.467229070634.issue32820@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I the bits() method is a dead end. The conclusion was to add __format__(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 03:57:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 20 Feb 2018 08:57:18 +0000 Subject: [issue32857] tkinter after_cancel does not behave correctly when called with id=None In-Reply-To: <1518787214.25.0.467229070634.issue32857@psf.upfronthosting.co.za> Message-ID: <1519117038.44.0.467229070634.issue32857@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It's up to you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 04:49:54 2018 From: report at bugs.python.org (sruester) Date: Tue, 20 Feb 2018 09:49:54 +0000 Subject: [issue32882] SSLContext.set_ecdh_curve() not accepting x25519 Message-ID: <1519120194.11.0.467229070634.issue32882@psf.upfronthosting.co.za> New submission from sruester : Using SSLContext.set_ecdh_curve() it is neither possible to choose X25519, nor to choose a list of curves to be used for key agreement. ---------- assignee: christian.heimes components: SSL messages: 312405 nosy: christian.heimes, sruester priority: normal severity: normal status: open title: SSLContext.set_ecdh_curve() not accepting x25519 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 04:58:42 2018 From: report at bugs.python.org (sruester) Date: Tue, 20 Feb 2018 09:58:42 +0000 Subject: [issue32883] Key agreement parameters not accessible Message-ID: <1519120722.76.0.467229070634.issue32883@psf.upfronthosting.co.za> New submission from sruester : Using python it is not possible to retrieve information about the key exchange/agreement method that was used during session setup. A method should be added to a suitable SSL* object that allows to retrieve information such as whether ECDH with which curves, or DH, or neither was used. ---------- assignee: christian.heimes components: SSL messages: 312406 nosy: christian.heimes, sruester priority: normal severity: normal status: open title: Key agreement parameters not accessible type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 05:01:19 2018 From: report at bugs.python.org (sruester) Date: Tue, 20 Feb 2018 10:01:19 +0000 Subject: [issue32858] Improve OpenSSL ECDH support In-Reply-To: <1518796997.98.0.467229070634.issue32858@psf.upfronthosting.co.za> Message-ID: <1519120879.97.0.467229070634.issue32858@psf.upfronthosting.co.za> sruester added the comment: I agree, we shouldn't support that confusion. I opened two separate issues https://bugs.python.org/issue32882 and https://bugs.python.org/issue32883 and will close this one now. ---------- resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 05:09:45 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 20 Feb 2018 10:09:45 +0000 Subject: [issue32882] SSLContext.set_ecdh_curve() not accepting x25519 In-Reply-To: <1519120194.11.0.467229070634.issue32882@psf.upfronthosting.co.za> Message-ID: <1519121385.62.0.467229070634.issue32882@psf.upfronthosting.co.za> Christian Heimes added the comment: This bug was originally the more generic issue #32858. SSLContext.set_ecdh_curve() uses EC_KEY_new_by_curve_name() and SSL_CTX_set_tmp_ecdh() to configure the ECDH curve parameters. The current approach has multiple downsides. It doesn't work with X25519 and can only set one curve. OpenSSL 1.0.2+ has SSL_CTX_set1_curves_list(), which supports a list of curve names. Proposal: SSLContext.set_ecdh_curve() is changed from taking one curve name to an *arg of curve names. With OpenSSL 1.0.2+, 1..n curves are supported. For OpenSSL < 1.0.2 on 2.7-3.6, one curve is supported. Perhaps it makes sense to map an empty *arg to auto-configuration? I like to cover the issue in PEP 543, too. Cory, what do you think about another enum of IANA groups of EC groups, https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-parameters-8 ? ---------- stage: -> needs patch superseder: -> Improve OpenSSL ECDH support type: -> behavior versions: +Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 05:16:07 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 20 Feb 2018 10:16:07 +0000 Subject: [issue32883] Key agreement parameters not accessible In-Reply-To: <1519120722.76.0.467229070634.issue32883@psf.upfronthosting.co.za> Message-ID: <1519121767.3.0.467229070634.issue32883@psf.upfronthosting.co.za> Christian Heimes added the comment: I'd prefer to have a generic handshake info method that returns a structured object like a named tuple with handshake information. We could start with key exchange / key agreement, TLS version, cipher suite, etc. Later the method could be extended and include information such as signature algorithms, offered suites and versions (server-side), and more. ---------- superseder: -> Improve OpenSSL ECDH support _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 05:18:27 2018 From: report at bugs.python.org (sruester) Date: Tue, 20 Feb 2018 10:18:27 +0000 Subject: [issue32882] SSLContext.set_ecdh_curve() not accepting x25519 In-Reply-To: <1519120194.11.0.467229070634.issue32882@psf.upfronthosting.co.za> Message-ID: <1519121907.62.0.467229070634.issue32882@psf.upfronthosting.co.za> Change by sruester : ---------- keywords: +patch pull_requests: +5549 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 05:28:53 2018 From: report at bugs.python.org (Matanya Stroh) Date: Tue, 20 Feb 2018 10:28:53 +0000 Subject: [issue32884] Adding the ability for getpass to print asterisks when passowrd is typed Message-ID: <1519122533.37.0.467229070634.issue32884@psf.upfronthosting.co.za> New submission from Matanya Stroh : I saw some questions about it in stackoverflow (links below), and also find it very useful to have the ability to print asterisks. Some users, find it disturbing when they don't have any indication that password is typed, and it will be helpful to have it. I know that it's have some risks exposing the number of chars to the password, but I think it's worth it. When using Jupyter (notebook server is 4.3.1) the password does echoed as "*", but not in Python IDE in linux and Windows 1) https://stackoverflow.com/questions/10990998/how-to-have-password-echoed-as-asterisks 2) https://stackoverflow.com/questions/7838564/how-to-read-password-with-echo-in-python-console-program ---------- components: Library (Lib) messages: 312410 nosy: matanya.stroh priority: normal severity: normal status: open title: Adding the ability for getpass to print asterisks when passowrd is typed type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 05:34:42 2018 From: report at bugs.python.org (sruester) Date: Tue, 20 Feb 2018 10:34:42 +0000 Subject: [issue32882] SSLContext.set_ecdh_curve() not accepting x25519 In-Reply-To: <1519120194.11.0.467229070634.issue32882@psf.upfronthosting.co.za> Message-ID: <1519122882.58.0.467229070634.issue32882@psf.upfronthosting.co.za> Change by sruester : ---------- pull_requests: +5550 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 06:06:48 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Tue, 20 Feb 2018 11:06:48 +0000 Subject: [issue32885] Tools/scripts/pathfix.py leaves bunch of ~ suffixed files around with no opt-out Message-ID: <1519124808.65.0.467229070634.issue32885@psf.upfronthosting.co.za> New submission from Miro Hron?ok : We (Fedora's Python SIG) would like to promote usage of Tools/scripts/pathfix.py (we've even moved it to $PATH) in Fedora RPM build (a.k.a spec files) instead of various error prone finds + greps + seds. However when running pathfix.py, it creates backup files (with ~ suffix). This is mostly unfortunate in RPM build environment, because one needs to clean those up, otherwise one gets warnings and errors like this: error: Installed (but unpackaged) file(s) found: /usr/bin/spam~ Or the file with ~ might even get installed if a more relaxed patter is used in a %files section that lists what is part of the RPM package. %{_bindir}/spam-* We even have shebangs checks/mangling in place and the ~ suffixed file still has the wrong shebang, resulting in warnings like this: *** WARNING: mangling shebang in /usr/bin/spam~ from #!/usr/bin/python -Es to #!/usr/bin/python2 -Es. This will become an ERROR, fix it manually! Steps to Reproduce: 1. $ echo '#!python' > omg 2. $ Tools/scripts/pathfix.py -i "/usr/bin/python3" -p omg # possibly with extra flag, see bellow omg: updating 3. $ ls Actual results: omg omg~ Expected results: omg Since the backup feature was here for ages, instead of changing the behavior, I suggest a flag is added that disables this. 2to3 has exactly the proposed flag as: "-n, --nobackups Don't write backups for modified files". This doesn't necessarily need to go into all versions, but I've selected all that has this problem. Getting it to 3.6+ would be great, however if it goes to anything later, we'll backport it in the Fedora package. I have a patch ready, sill send PR. ---------- messages: 312411 nosy: hroncok priority: normal severity: normal status: open title: Tools/scripts/pathfix.py leaves bunch of ~ suffixed files around with no opt-out 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 Feb 20 06:09:24 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Tue, 20 Feb 2018 11:09:24 +0000 Subject: [issue32885] Tools/scripts/pathfix.py leaves bunch of ~ suffixed files around with no opt-out In-Reply-To: <1519124808.65.0.467229070634.issue32885@psf.upfronthosting.co.za> Message-ID: <1519124964.79.0.467229070634.issue32885@psf.upfronthosting.co.za> Change by Miro Hron?ok : ---------- components: +Demos and Tools _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 06:09:42 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Tue, 20 Feb 2018 11:09:42 +0000 Subject: [issue32885] Tools/scripts/pathfix.py leaves bunch of ~ suffixed files around with no opt-out In-Reply-To: <1519124808.65.0.467229070634.issue32885@psf.upfronthosting.co.za> Message-ID: <1519124982.07.0.467229070634.issue32885@psf.upfronthosting.co.za> Change by Miro Hron?ok : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 06:13:28 2018 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Tue, 20 Feb 2018 11:13:28 +0000 Subject: [issue32885] Tools/scripts/pathfix.py leaves bunch of ~ suffixed files around with no opt-out In-Reply-To: <1519124808.65.0.467229070634.issue32885@psf.upfronthosting.co.za> Message-ID: <1519125208.95.0.467229070634.issue32885@psf.upfronthosting.co.za> Change by Miro Hron?ok : ---------- keywords: +patch pull_requests: +5551 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 06:25:39 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 20 Feb 2018 11:25:39 +0000 Subject: [issue32885] Tools/scripts/pathfix.py leaves bunch of ~ suffixed files around with no opt-out In-Reply-To: <1519124808.65.0.467229070634.issue32885@psf.upfronthosting.co.za> Message-ID: <1519125939.53.0.467229070634.issue32885@psf.upfronthosting.co.za> Christian Heimes added the comment: It's technically a new feature. But since it's just in Tools/, we could make an exception. I've removed the security branches from versions. ---------- nosy: +christian.heimes versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 07:01:34 2018 From: report at bugs.python.org (Eric Osborne) Date: Tue, 20 Feb 2018 12:01:34 +0000 Subject: [issue32820] Add bits method to ipaddress In-Reply-To: <1519115756.97.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: Eric Osborne added the comment: Yeah, bits() is dead. The thread has the same title, but I changed the PR a while ago. The diffs in the PR are for format(). I'll go over the code and clean it up. The docstring in particular is probably lousy. Thanks! eric On Tue, Feb 20, 2018 at 3:35 AM Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > I the bits() method is a dead end. The conclusion was to add __format__(). > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 07:16:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 20 Feb 2018 12:16:24 +0000 Subject: [issue32820] Add bits method to ipaddress In-Reply-To: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: <1519128984.79.0.467229070634.issue32820@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: And Eric, please avoid including the quote of previous message in your messages. This makes hard to read your messages and the whole discussion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 07:54:22 2018 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 20 Feb 2018 12:54:22 +0000 Subject: [issue32820] Add __format__ method to ipaddress In-Reply-To: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: <1519131262.02.0.467229070634.issue32820@psf.upfronthosting.co.za> Nick Coghlan added the comment: I've updated the issue title to reflect the revised proposal (i.e. using __format__ rather than a new IP address specific method). ---------- title: Add bits method to ipaddress -> Add __format__ method to ipaddress _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 08:32:01 2018 From: report at bugs.python.org (Sylvain Marie) Date: Tue, 20 Feb 2018 13:32:01 +0000 Subject: [issue32886] new Boolean ABC in numbers module + Integral>Integer renaming Message-ID: <1519133521.3.0.467229070634.issue32886@psf.upfronthosting.co.za> New submission from Sylvain Marie : This issue is created following the discussion [Python-ideas] Boolean ABC similar to what's provided in the 'numbers' module. The following items are suggested: - adding a 'Boolean' ABC class to the 'numbers' module - register python 'bool' as a virtual subclass of both 'Boolean' and 'Integral' - register numpy bool ('np.bool_') as a virtual subclass of 'Boolean' only - rename 'Integral' 'Integer' and leave 'Integral' as an alias for backwards compatibility Below is a proposal Boolean class: --------------------- class Boolean(metaclass=ABCMeta): """ An abstract base class for booleans. """ __slots__ = () @abstractmethod def __bool__(self): """Return a builtin bool instance. Called for bool(self).""" @abstractmethod def __and__(self, other): """self & other""" @abstractmethod def __rand__(self, other): """other & self""" @abstractmethod def __xor__(self, other): """self ^ other""" @abstractmethod def __rxor__(self, other): """other ^ self""" @abstractmethod def __or__(self, other): """self | other""" @abstractmethod def __ror__(self, other): """other | self""" @abstractmethod def __invert__(self): """~self""" # register bool and numpy bool_ as virtual subclasses # so that issubclass(bool, Boolean) = issubclass(np.bool_, Boolean) = True Boolean.register(bool) try: import numpy as np Boolean.register(np.bool_) except ImportError: # silently escape pass # bool is also a virtual subclass of Integral. np.bool_ is not. Integral.register(bool) ---------- components: Library (Lib) messages: 312416 nosy: smarie priority: normal severity: normal status: open title: new Boolean ABC in numbers module + Integral>Integer renaming type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 08:47:47 2018 From: report at bugs.python.org (sruester) Date: Tue, 20 Feb 2018 13:47:47 +0000 Subject: [issue32883] Key agreement parameters not accessible In-Reply-To: <1519120722.76.0.467229070634.issue32883@psf.upfronthosting.co.za> Message-ID: <1519134467.67.0.467229070634.issue32883@psf.upfronthosting.co.za> sruester added the comment: How about a new method crypto_information() and making cipher() a wrapper around that one? The former could return a named tupple with handshake information together with all other relevant crypto information about the current session. This would eliminate the need to define several new methods while keeping backwards compatibility of cipher(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 09:29:23 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Tue, 20 Feb 2018 14:29:23 +0000 Subject: [issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams In-Reply-To: <1518686430.4.0.467229070634.issue32849@psf.upfronthosting.co.za> Message-ID: <1519136963.01.0.467229070634.issue32849@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: > But I'm not sure why it can be solved, sometimes, by restarting the the daemon. Could it be simply because daemon is respawned from a process that does have a valid stdin at the time of respawn? Note that daemon has an option to redirect std streams to /dev/null. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 09:32:15 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Tue, 20 Feb 2018 14:32:15 +0000 Subject: [issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams In-Reply-To: <1518686430.4.0.467229070634.issue32849@psf.upfronthosting.co.za> Message-ID: <1519137135.77.0.467229070634.issue32849@psf.upfronthosting.co.za> Change by Alexey Izbyshev : ---------- keywords: +patch pull_requests: +5552 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 09:36:50 2018 From: report at bugs.python.org (Rudolph Froger) Date: Tue, 20 Feb 2018 14:36:50 +0000 Subject: [issue32849] Fatal Python error: Py_Initialize: can't initialize sys standard streams In-Reply-To: <1518686430.4.0.467229070634.issue32849@psf.upfronthosting.co.za> Message-ID: <1519137410.15.0.467229070634.issue32849@psf.upfronthosting.co.za> Rudolph Froger added the comment: > Could it be simply because daemon is respawned from a process that does have a valid stdin at the time of respawn? Yes, that could certainly be the case. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 11:19:30 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 20 Feb 2018 16:19:30 +0000 Subject: [issue32843] More revisions to test.support docs In-Reply-To: <1518607086.66.0.467229070634.issue32843@psf.upfronthosting.co.za> Message-ID: <1519143570.4.0.467229070634.issue32843@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +5553 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 11:22:12 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 20 Feb 2018 16:22:12 +0000 Subject: [issue32843] More revisions to test.support docs In-Reply-To: <1518607086.66.0.467229070634.issue32843@psf.upfronthosting.co.za> Message-ID: <1519143732.41.0.467229070634.issue32843@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I've made the changes requested. I wasn't sure about: TESTFN_NONASCII - How different from TESTFN_UNICODE? Should I move these out of test.support?: missing_compiler_executable(cmd_names=[]) - It is used only in distutils tests and should be in distutils.tests.support. Matcher() - This class is used only in test_logging, and only with TestHandler. These classes should be documented together and with references to logging. I'm not sure they should be in test.support. TestHandler(logging.handlers.BufferingHandler) - I'm not sure it should be in test.support rather of test_logging. Thanks! ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 11:22:30 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 20 Feb 2018 16:22:30 +0000 Subject: [issue32843] More revisions to test.support docs In-Reply-To: <1518607086.66.0.467229070634.issue32843@psf.upfronthosting.co.za> Message-ID: <1519143750.37.0.467229070634.issue32843@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 11:24:10 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Tue, 20 Feb 2018 16:24:10 +0000 Subject: [issue32887] os: Users of path_converter don't handle fd == -1 properly Message-ID: <1519143850.49.0.467229070634.issue32887@psf.upfronthosting.co.za> New submission from Alexey Izbyshev : Demo: >>> import os >>> os.chdir(-1) Traceback (most recent call last): File "", line 1, in OSError: [Errno 14] Bad address: -1 >>> os.chdir(-2) Traceback (most recent call last): File "", line 1, in OSError: [Errno 9] Bad file descriptor: -2 Functions in os supporting either path or file descriptor argument (os.supports_fd) usually use the following code pattern to distinguish between those cases: if (path->fd != -1) result = fchdir(path->fd); else result = chdir(path->narrow); However, _fd_converter used by path_converter internally doesn't give any special meaning to -1 and allows any negative file descriptors. Therefore, if a user passes -1 to such function, path->narrow, which is NULL, will be used. I see two ways to fix this. 1) Make some flag in path_t indicating that it should be treated as fd and make all users check that flag. 2) Make _fd_converter raise an exception for negative descriptors. Also, I have to mention an inconsistency in reporting of bad descriptors. A handful of os functions uses fildes_converter for descriptors, which uses PyObject_AsFileDescriptor, which in turn is used in other places in Python as well (e.g. in fcntl module). PyObject_AsFileDescriptor raises a ValueError for negative descriptors instead of OSError raised by most os functions in this case. >>> os.fchdir(-1) Traceback (most recent call last): File "", line 1, in ValueError: file descriptor cannot be a negative integer (-1) ---------- messages: 312421 nosy: izbyshev priority: normal severity: normal status: open title: os: Users of path_converter don't handle fd == -1 properly type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 11:28:20 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Tue, 20 Feb 2018 16:28:20 +0000 Subject: [issue32887] os: Users of path_converter don't handle fd == -1 properly In-Reply-To: <1519143850.49.0.467229070634.issue32887@psf.upfronthosting.co.za> Message-ID: <1519144100.4.0.467229070634.issue32887@psf.upfronthosting.co.za> Change by Alexey Izbyshev : ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 12:24:32 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 20 Feb 2018 17:24:32 +0000 Subject: [issue32500] PySequence_Length() raises TypeError on dict type In-Reply-To: <1515199107.36.0.467229070634.issue32500@psf.upfronthosting.co.za> Message-ID: <1519147472.82.0.467229070634.issue32500@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 7a1e1786f98ad49caa157dcdf14ada9d0b07d0fd by Mariatta (Zackery Spytz) in branch 'master': bpo-32500: Correct the documentation for PySequence_Size() and PySequence_Length() (GH-5767) https://github.com/python/cpython/commit/7a1e1786f98ad49caa157dcdf14ada9d0b07d0fd ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 12:25:47 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 20 Feb 2018 17:25:47 +0000 Subject: [issue32500] PySequence_Length() raises TypeError on dict type In-Reply-To: <1515199107.36.0.467229070634.issue32500@psf.upfronthosting.co.za> Message-ID: <1519147547.39.0.467229070634.issue32500@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5554 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 12:26:21 2018 From: report at bugs.python.org (Chris Angelico) Date: Tue, 20 Feb 2018 17:26:21 +0000 Subject: [issue32888] Improve exception message in ast.literal_eval Message-ID: <1519147581.54.0.467229070634.issue32888@psf.upfronthosting.co.za> New submission from Chris Angelico : When a non-literal is given to literal_eval, attempt to be more helpful with the message, rather than calling it 'malformed'. ---------- components: Library (Lib) messages: 312423 nosy: Rosuav priority: normal pull_requests: 5555 severity: normal status: open title: Improve exception message in ast.literal_eval versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 12:26:40 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 20 Feb 2018 17:26:40 +0000 Subject: [issue32500] PySequence_Length() raises TypeError on dict type In-Reply-To: <1515199107.36.0.467229070634.issue32500@psf.upfronthosting.co.za> Message-ID: <1519147600.25.0.467229070634.issue32500@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5556 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 12:27:38 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 20 Feb 2018 17:27:38 +0000 Subject: [issue32500] PySequence_Length() raises TypeError on dict type In-Reply-To: <1515199107.36.0.467229070634.issue32500@psf.upfronthosting.co.za> Message-ID: <1519147658.63.0.467229070634.issue32500@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5557 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 12:37:12 2018 From: report at bugs.python.org (Chris Angelico) Date: Tue, 20 Feb 2018 17:37:12 +0000 Subject: [issue32888] Improve exception message in ast.literal_eval In-Reply-To: <1519147581.54.0.467229070634.issue32888@psf.upfronthosting.co.za> Message-ID: <1519148232.76.0.467229070634.issue32888@psf.upfronthosting.co.za> Change by Chris Angelico : ---------- keywords: +patch pull_requests: +5558 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 12:46:06 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 20 Feb 2018 17:46:06 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1519148766.75.0.467229070634.issue32604@psf.upfronthosting.co.za> Change by Eric Snow : ---------- pull_requests: +5559 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 13:00:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 20 Feb 2018 18:00:42 +0000 Subject: [issue32888] Improve exception message in ast.literal_eval In-Reply-To: <1519147581.54.0.467229070634.issue32888@psf.upfronthosting.co.za> Message-ID: <1519149642.53.0.467229070634.issue32888@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I afraid this makes an error message more confusing and misleading. >>> ast.literal_eval('~2') Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython/Lib/ast.py", line 93, in literal_eval return _convert(node_or_string) File "/home/serhiy/py/cpython/Lib/ast.py", line 92, in _convert return _convert_signed_num(node) File "/home/serhiy/py/cpython/Lib/ast.py", line 65, in _convert_signed_num return _convert_num(node) File "/home/serhiy/py/cpython/Lib/ast.py", line 56, in _convert_num raise ValueError('%s not allowed in literal' % type(node).__name__) ValueError: UnaryOp not allowed in literal This is not true since + and - are allowed: >>> ast.literal_eval('-2') -2 >>> ast.literal_eval('2+3') Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython/Lib/ast.py", line 93, in literal_eval return _convert(node_or_string) File "/home/serhiy/py/cpython/Lib/ast.py", line 92, in _convert return _convert_signed_num(node) File "/home/serhiy/py/cpython/Lib/ast.py", line 65, in _convert_signed_num return _convert_num(node) File "/home/serhiy/py/cpython/Lib/ast.py", line 56, in _convert_num raise ValueError('%s not allowed in literal' % type(node).__name__) ValueError: BinOp not allowed in literal But: >>> ast.literal_eval('2+3j') (2+3j) >>> ast.literal_eval('"a"+"b"') Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython/Lib/ast.py", line 93, in literal_eval return _convert(node_or_string) File "/home/serhiy/py/cpython/Lib/ast.py", line 85, in _convert left = _convert_signed_num(node.left) File "/home/serhiy/py/cpython/Lib/ast.py", line 65, in _convert_signed_num return _convert_num(node) File "/home/serhiy/py/cpython/Lib/ast.py", line 56, in _convert_num raise ValueError('%s not allowed in literal' % type(node).__name__) ValueError: Str not allowed in literal But Str is allowed: >>> ast.literal_eval('"ab"') 'ab' ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 13:02:35 2018 From: report at bugs.python.org (Steve Dower) Date: Tue, 20 Feb 2018 18:02:35 +0000 Subject: [issue32881] pycapsule:PyObject * is NULL pointer In-Reply-To: <1519102092.04.0.467229070634.issue32881@psf.upfronthosting.co.za> Message-ID: <1519149755.45.0.467229070634.issue32881@psf.upfronthosting.co.za> Steve Dower added the comment: What is the definition of FUNCTION_CALL_MODE? And if it is anything other than "stdcall", change "ctypes.windll" to "ctypes.cdll" and try again. You should also consider posting this to python-list, as it is almost certainly a problem in your DLL and not in Python itself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 13:03:29 2018 From: report at bugs.python.org (Sanyam Khurana) Date: Tue, 20 Feb 2018 18:03:29 +0000 Subject: [issue24255] Replace debuglevel-related logic with logging In-Reply-To: <1432189554.94.0.727112934658.issue24255@psf.upfronthosting.co.za> Message-ID: <1519149809.32.0.467229070634.issue24255@psf.upfronthosting.co.za> Sanyam Khurana added the comment: Hey Erin, Can you please convert your patch to a PR on Github? ---------- nosy: +CuriousLearner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 13:05:12 2018 From: report at bugs.python.org (Chris Angelico) Date: Tue, 20 Feb 2018 18:05:12 +0000 Subject: [issue32888] Improve exception message in ast.literal_eval In-Reply-To: <1519147581.54.0.467229070634.issue32888@psf.upfronthosting.co.za> Message-ID: <1519149912.8.0.467229070634.issue32888@psf.upfronthosting.co.za> Chris Angelico added the comment: Hmm, I think I see what I broke there. It was part of the merge conflict resolution - I moved the check into the function, which is actually incorrect. It wasn't misleading like that in the original patch. Will fix that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 13:06:31 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 20 Feb 2018 18:06:31 +0000 Subject: [issue32874] IDLE: Add tests for pyparse In-Reply-To: <1519055766.11.0.467229070634.issue32874@psf.upfronthosting.co.za> Message-ID: <1519149991.0.0.467229070634.issue32874@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Thanks for pointing out #21765 - very interesting reading. :-) Would the new str.isascii() be helpful or would it be too early to use something only available in 3.7? It would seem that and combinations of `if isascii() and isidentifier()` might be interesting to benchmark against some of the current code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 13:11:23 2018 From: report at bugs.python.org (Chris Angelico) Date: Tue, 20 Feb 2018 18:11:23 +0000 Subject: [issue32888] Improve exception message in ast.literal_eval In-Reply-To: <1519147581.54.0.467229070634.issue32888@psf.upfronthosting.co.za> Message-ID: <1519150283.36.0.467229070634.issue32888@psf.upfronthosting.co.za> Chris Angelico added the comment: Actually, it's a bit more complicated than I thought. Current proposed solution: Track the context of each conversion, thus allowing different errors to be distinguished. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 14:46:17 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 20 Feb 2018 19:46:17 +0000 Subject: [issue32500] PySequence_Length() raises TypeError on dict type In-Reply-To: <1515199107.36.0.467229070634.issue32500@psf.upfronthosting.co.za> Message-ID: <1519155977.34.0.467229070634.issue32500@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 6ae87cae091f4835090c10c1e65eb057a13fca2c by Miss Islington (bot) in branch '3.6': bpo-32500: Correct the documentation for PySequence_Size() and PySequence_Length() (GH-5767) https://github.com/python/cpython/commit/6ae87cae091f4835090c10c1e65eb057a13fca2c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 15:07:36 2018 From: report at bugs.python.org (=?utf-8?q?Nico_Schl=C3=B6mer?=) Date: Tue, 20 Feb 2018 20:07:36 +0000 Subject: [issue29282] Fused multiply-add: proposal to add math.fma() In-Reply-To: <1484560897.19.0.0955404368118.issue29282@psf.upfronthosting.co.za> Message-ID: <1519157256.74.0.467229070634.issue29282@psf.upfronthosting.co.za> Nico Schl?mer added the comment: Do I read this thread correctly assuming that this hasn't been implemented yet? If not, I would probably make my own little library for this -- I really need the feature for the precision. ---------- nosy: +nschloe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 15:10:17 2018 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 20 Feb 2018 20:10:17 +0000 Subject: [issue29282] Fused multiply-add: proposal to add math.fma() In-Reply-To: <1484560897.19.0.0955404368118.issue29282@psf.upfronthosting.co.za> Message-ID: <1519157417.42.0.467229070634.issue29282@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Do I read this thread correctly assuming that this hasn't been implemented yet? Yes. Existing libm implementations don't work, so simply wrapping the libm function isn't enough. And writing an implementation from scratch is non-trivial. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 15:18:02 2018 From: report at bugs.python.org (=?utf-8?q?Nico_Schl=C3=B6mer?=) Date: Tue, 20 Feb 2018 20:18:02 +0000 Subject: [issue29282] Fused multiply-add: proposal to add math.fma() In-Reply-To: <1484560897.19.0.0955404368118.issue29282@psf.upfronthosting.co.za> Message-ID: <1519157882.29.0.467229070634.issue29282@psf.upfronthosting.co.za> Nico Schl?mer added the comment: > Existing libm implementations don't work, Okay. Is this because of the inf/NaN discrimination hiccups mentioned above or are there any other pitfalls? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 16:06:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 20 Feb 2018 21:06:13 +0000 Subject: [issue31848] "aifc" module does not always initialize "Aifc_read._ssnd_chunk" In-Reply-To: <1508765581.06.0.213398074469.issue31848@psf.upfronthosting.co.za> Message-ID: <1519160773.79.0.467229070634.issue31848@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 80d20b918bd8a882043c493a7f958333ecb41727 by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-31848: Fix broken error handling in Aifc_read.initfp() when the SSND chunk is not found (#5240) https://github.com/python/cpython/commit/80d20b918bd8a882043c493a7f958333ecb41727 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 16:06:56 2018 From: report at bugs.python.org (Josh Rosenberg) Date: Tue, 20 Feb 2018 21:06:56 +0000 Subject: [issue32886] new Boolean ABC in numbers module + Integral>Integer renaming In-Reply-To: <1519133521.3.0.467229070634.issue32886@psf.upfronthosting.co.za> Message-ID: <1519160816.66.0.467229070634.issue32886@psf.upfronthosting.co.za> Josh Rosenberg added the comment: First off, link to discussion: https://groups.google.com/d/topic/python-ideas/-3QW3cxj3ko/discussion 1. bool is already a virtual subclass of Integral since it's an actual subclass of int (which is a virtual subclass of Integral); no need to explicitly register it 2. Don't try to register numpy's types for them; doing so would mean simply having numpy installed forces it to be imported if you import numbers, even if your script never uses numpy. Let numpy add registration for the type itself. 3. If Boolean is not a subclass of Integer/Integral, why is it in the numbers module at all? The discussion seemed to suggest putting it in numbers when the idea was that Boolean would subclass Integer/Integral; if it's not numeric at all, then the numbers module doesn't make sense. 4. Obviously, it's impossible to overload the not behavior (__bool__ is called directly to get a true bool, then the result is inverted, there is no special method for handling the not keyword), so it looks like the proposal is to make __invert__ part of the interface. Except bool itself doesn't behave in a way that would make __invert__ make sense as a drop in substitution for not; ~True produces -2, ~False produces -1, in neither case does it produce a bool result, and the result is always truthy. Changing this is impractical, since it would violate the int-like behavior of bool (which has been a historical guarantee). ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 16:07:23 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 20 Feb 2018 21:07:23 +0000 Subject: [issue31848] "aifc" module does not always initialize "Aifc_read._ssnd_chunk" In-Reply-To: <1508765581.06.0.213398074469.issue31848@psf.upfronthosting.co.za> Message-ID: <1519160843.62.0.467229070634.issue31848@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5560 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 16:08:21 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 20 Feb 2018 21:08:21 +0000 Subject: [issue31848] "aifc" module does not always initialize "Aifc_read._ssnd_chunk" In-Reply-To: <1508765581.06.0.213398074469.issue31848@psf.upfronthosting.co.za> Message-ID: <1519160901.09.0.467229070634.issue31848@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5561 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 16:09:19 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 20 Feb 2018 21:09:19 +0000 Subject: [issue31848] "aifc" module does not always initialize "Aifc_read._ssnd_chunk" In-Reply-To: <1508765581.06.0.213398074469.issue31848@psf.upfronthosting.co.za> Message-ID: <1519160959.91.0.467229070634.issue31848@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5562 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 16:13:07 2018 From: report at bugs.python.org (Paul Price) Date: Tue, 20 Feb 2018 21:13:07 +0000 Subject: [issue32889] Valgrind suppressions need updating Message-ID: <1519161187.46.0.467229070634.issue32889@psf.upfronthosting.co.za> New submission from Paul Price : Using the current valgrind suppressions (Misc/valgrind-python.supp) results in a lot of noise, e.g.: ==2662549== Conditional jump or move depends on uninitialised value(s) ==2662549== at 0x4EFD734: address_in_range (obmalloc.c:1200) ==2662549== by 0x4EFD734: _PyObject_Free (obmalloc.c:1467) ==2662549== by 0x4FAA6A3: block_free (pyarena.c:95) ==2662549== by 0x4FAA6A3: PyArena_Free (pyarena.c:169) The suppressions are blocking Py_ADDRESS_IN_RANGE, but this function was renamed in 3.6. ---------- messages: 312436 nosy: Paul Price priority: normal pull_requests: 5563 severity: normal status: open title: Valgrind suppressions need updating versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 16:24:28 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 20 Feb 2018 21:24:28 +0000 Subject: [issue32863] Missing support for Emojis in tkinter In-Reply-To: <1518874950.43.0.467229070634.issue32863@psf.upfronthosting.co.za> Message-ID: <1519161868.4.0.467229070634.issue32863@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The 3.7b1 64-bit installer includes a local copy of Tcl/Tk (see Mac/BuildScript/build-installer.py), which could be changed as needed. That said, I'm not advocating changing default Tcl/Tk configuration options because I don't know how well full unicode builds are supported (and if that would fix anything). seems to indicate that at least one emoji related issue has been fixed very recently in Tk (later than the latest Tcl/Tk release). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 16:46:41 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 20 Feb 2018 21:46:41 +0000 Subject: [issue32874] IDLE: Add tests for pyparse In-Reply-To: <1519055766.11.0.467229070634.issue32874@psf.upfronthosting.co.za> Message-ID: <1519163201.56.0.467229070634.issue32874@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Respone to msg312353: Yes, let us restrict this to testing pyparse code as is. I opened issue #32880 for changing the code. My followup post discusses parse variable initialization. Putting instance variable defaults in class attributes is a known practice. But this is usually done when the 'default' is the most common value, not when the class attribute is always masked, before access, by an instance attribute of the same name. One could claim that it is buggy to not create a new Parser instance for each subtest. But the class appears to be designed for instance reuse, by having a separate set string method and by never looking at string-specific attributes until set from the string. We could instead say that the bug is the test checking an undefined value. I rejected the option of not looking when test.lastopenbracketpos is None and instead suggest on the new issue that this instance attribute always be freshly set, like all the others. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 17:07:08 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 20 Feb 2018 22:07:08 +0000 Subject: [issue31848] "aifc" module does not always initialize "Aifc_read._ssnd_chunk" In-Reply-To: <1508765581.06.0.213398074469.issue31848@psf.upfronthosting.co.za> Message-ID: <1519164428.87.0.467229070634.issue31848@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 1d927d4feba856cacc026a9167ba38c73a4e7657 by Miss Islington (bot) in branch '3.7': bpo-31848: Fix broken error handling in Aifc_read.initfp() when the SSND chunk is not found (GH-5240) https://github.com/python/cpython/commit/1d927d4feba856cacc026a9167ba38c73a4e7657 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 17:11:59 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 20 Feb 2018 22:11:59 +0000 Subject: [issue32874] IDLE: Add tests for pyparse In-Reply-To: <1519055766.11.0.467229070634.issue32874@psf.upfronthosting.co.za> Message-ID: <1519164719.25.0.467229070634.issue32874@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Response to msg312428: I would generally prefer to put off using 3.x feature in module m until after we think we are done patching m for 3.(x-1), but do so before 3.x.0 release. When 3.x-1 went to security status a week after the 3.x release, this was not much an issue. In this case, we could use 'isascii' freely after 3.7+: isascii = str.isascii 3.6: def isascii(s): return all(ord(c) < 128 for c in s) Concrete code change proposals, including in hyperparser, should go on #32880. In #21765, I mentioned looking at ColorDelegator and UndoDelegator. I never did that, but added this to my list of possible issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 17:17:32 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 20 Feb 2018 22:17:32 +0000 Subject: [issue31848] "aifc" module does not always initialize "Aifc_read._ssnd_chunk" In-Reply-To: <1508765581.06.0.213398074469.issue31848@psf.upfronthosting.co.za> Message-ID: <1519165052.86.0.467229070634.issue31848@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 2b9726eb647e856d83eafdc30cdbbc31a5920ab6 by Miss Islington (bot) in branch '3.6': bpo-31848: Fix broken error handling in Aifc_read.initfp() when the SSND chunk is not found (GH-5240) https://github.com/python/cpython/commit/2b9726eb647e856d83eafdc30cdbbc31a5920ab6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 17:48:48 2018 From: report at bugs.python.org (Chris Angelico) Date: Tue, 20 Feb 2018 22:48:48 +0000 Subject: [issue32888] Improve exception message in ast.literal_eval In-Reply-To: <1519147581.54.0.467229070634.issue32888@psf.upfronthosting.co.za> Message-ID: <1519166928.23.0.467229070634.issue32888@psf.upfronthosting.co.za> Chris Angelico added the comment: (BTW, by "proposed" I mean that the change that I describe is in the PR.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 18:30:25 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 20 Feb 2018 23:30:25 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1519169425.92.0.467229070634.issue32604@psf.upfronthosting.co.za> Eric Snow added the comment: New changeset f53d9f2778a87bdd48eb9030f782a4ebf9e7622f by Eric Snow in branch 'master': bpo-32604: Swap threads only if the interpreter is different. (gh-5778) https://github.com/python/cpython/commit/f53d9f2778a87bdd48eb9030f782a4ebf9e7622f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 18:31:27 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 20 Feb 2018 23:31:27 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1519169487.02.0.467229070634.issue32604@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5564 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 18:33:06 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 20 Feb 2018 23:33:06 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse In-Reply-To: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> Message-ID: <1519169586.6.0.467229070634.issue32880@psf.upfronthosting.co.za> Terry J. Reedy added the comment: StringTranslatePseudoMapping (Mapping) is an awkward and not very descriptive name. It is similar to collections.defaultdict except that it uses a default value rather than a default factory. The latter is so defaults can be mutables. Would a subclass of similar to defaultdict be faster? Unlike, defaultdict, the initialized default is used in get as well as __getitem__. This means that STPM.get ignores a passed-in default, contrary to the definition of Mapping.get. The method override is not needed. The internal self._get is only needed because it is called in both __getitem__ and get. Without the get override, it's body (with 'self.' added, can become the body of __getitem__. I suspect that this would make __getitem__ faster. Test this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 18:35:43 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 20 Feb 2018 23:35:43 +0000 Subject: [issue32540] venv docs - doesn't match behavior In-Reply-To: <1515780433.02.0.467229070634.issue32540@psf.upfronthosting.co.za> Message-ID: <1519169743.1.0.467229070634.issue32540@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Does this need to be backported to 3.7 and 3.6? Or can it be closed as resolved? ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 18:54:16 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Tue, 20 Feb 2018 23:54:16 +0000 Subject: [issue32890] os: Some functions may report bogus errors on Windows Message-ID: <1519170856.46.0.467229070634.issue32890@psf.upfronthosting.co.za> New submission from Alexey Izbyshev : Demo: >>> os.execve('', ['a'], {}) Traceback (most recent call last): File "", line 1, in OSError: [WinError 0] The operation completed successfully: '' The reason is that path_error() used throughout os module always uses GetLastError() on Windows, but some functions are implemented via CRT calls which report errors via errno. It seems that commit 292c83554 caused this issue. ---------- messages: 312446 nosy: izbyshev, vstinner priority: normal severity: normal status: open title: os: Some functions may report bogus errors on Windows type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 19:05:36 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Wed, 21 Feb 2018 00:05:36 +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: <1519171536.03.0.467229070634.issue32890@psf.upfronthosting.co.za> Change by Alexey Izbyshev : ---------- keywords: +patch pull_requests: +5565 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 19:09:44 2018 From: report at bugs.python.org (Eric Snow) Date: Wed, 21 Feb 2018 00:09:44 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1519171784.67.0.467229070634.issue32604@psf.upfronthosting.co.za> Eric Snow added the comment: New changeset eed3c7af4ec520d324a55e0357f41589a66906f7 by Eric Snow (Miss Islington (bot)) in branch '3.7': bpo-32604: Swap threads only if the interpreter is different. (gh-5783) https://github.com/python/cpython/commit/eed3c7af4ec520d324a55e0357f41589a66906f7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 19:46:27 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 21 Feb 2018 00:46:27 +0000 Subject: [issue32017] profile.Profile() has no method enable() In-Reply-To: <1510607839.08.0.213398074469.issue32017@psf.upfronthosting.co.za> Message-ID: <1519173987.04.0.467229070634.issue32017@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I started taking a look at this and discovered a few things. There are four methods in the C module `_lsprof` that are within the Profiler class - `enable`, `disable`, `getstats`, and `clear` and which are all available through cProfile.Profile. These aren't available in profile.py. Also, `getstats` and `clear` aren't in the documentation and `enable` takes two optional parameters that aren't mentioned in the documentation. There are also many methods in profile.py that aren't documented. What would be the preferred approach to fixing the documentation? It seems that the documentation currently focuses on trying to make profile and cProfile as similar as possible. Should they have separate sections that define the differences? Or should `enable` and `disable` be removed since they aren't in profile? The example under https://docs.python.org/3.8/library/profile.html#profile.Profile uses `enable` and `disable` and seems to be a helpful example. ---------- nosy: +csabella stage: -> needs patch versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 19:49:07 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 21 Feb 2018 00:49:07 +0000 Subject: [issue32008] Example suggest to use a TLSv1 socket In-Reply-To: <1510428965.62.0.213398074469.issue32008@psf.upfronthosting.co.za> Message-ID: <1519174147.91.0.467229070634.issue32008@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Christian, Would you have any feedback on this? Thanks! ---------- nosy: +christian.heimes, csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 20:22:34 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 21 Feb 2018 01:22:34 +0000 Subject: [issue32843] More revisions to test.support docs In-Reply-To: <1518607086.66.0.467229070634.issue32843@psf.upfronthosting.co.za> Message-ID: <1519176154.7.0.467229070634.issue32843@psf.upfronthosting.co.za> Nick Coghlan added the comment: For TESTFN_NONASCII vs TESTFN_UNICODE (inferred from reading the current code & https://github.com/python/cpython/commit/8b219b2936d767bf6c6c17618db3a7b22fc2e865): * TESTFN_NONASCII guarantees that it can be encoded and decoded with the default filesystem encoding, but may be None if it can't find a suitable non-ASCII character that meets that constraint. This allows affected tests to be easily skipped on platforms where they can't work. * TESTFN_UNICODE is always set, but may *not* be encodable with os.fsencode() (The two could potentially be consolidated by converting the tests that use TESTFN_UNICODE over to TESTFN_NONASCII, but for now it makes sense to just document the above differences) For the logging helpers, I'd check how they're used in test_logging: if they're used in logging configuration tests, they may be in test.support to avoid reimporting the module that defines the logging tests. If so, then they can be filed away in their own subsection at the end of the test.support documentation. If not, then yeah, moving them into test_logging would make sense. Similarly, moving the distutils helper makes sense to me, *unless* there's a specific reason that importing it from "distutils.tests.support" instead would be problematic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 20:46:46 2018 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 21 Feb 2018 01:46:46 +0000 Subject: [issue32540] venv docs - doesn't match behavior In-Reply-To: <1515780433.02.0.467229070634.issue32540@psf.upfronthosting.co.za> Message-ID: <1519177606.74.0.467229070634.issue32540@psf.upfronthosting.co.za> Jason R. Coombs added the comment: I thought I saw the PR to the 3.6 branch. If that's not the case - a backport to 3.7 would be much appreciated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 20:59:50 2018 From: report at bugs.python.org (zhaoya) Date: Wed, 21 Feb 2018 01:59:50 +0000 Subject: [issue32881] pycapsule:PyObject * is NULL pointer In-Reply-To: <1519102092.04.0.467229070634.issue32881@psf.upfronthosting.co.za> Message-ID: <1519178390.06.0.467229070634.issue32881@psf.upfronthosting.co.za> zhaoya added the comment: FUNCTION_CALL_MODE is __stdcall i think no problem.because, if GetContext(PyObject *capsule) -->GetContext() is ok. PyObject *capsule from python to c unknown error occurred. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 21:04:43 2018 From: report at bugs.python.org (Kubilay Kocak) Date: Wed, 21 Feb 2018 02:04:43 +0000 Subject: [issue32493] UUID Module - FreeBSD build failure In-Reply-To: <1515092270.67.0.467229070634.issue32493@psf.upfronthosting.co.za> Message-ID: <1519178683.17.0.467229070634.issue32493@psf.upfronthosting.co.za> Change by Kubilay Kocak : ---------- stage: resolved -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 22:05:20 2018 From: report at bugs.python.org (Kubilay Kocak) Date: Wed, 21 Feb 2018 03:05:20 +0000 Subject: [issue31106] os.posix_fallocate() generate exception with errno 0 In-Reply-To: <1501686186.83.0.555586832167.issue31106@psf.upfronthosting.co.za> Message-ID: <1519182320.24.0.467229070634.issue31106@psf.upfronthosting.co.za> Kubilay Kocak added the comment: I believe changeset d4b93e21c2664d6a78e0656e7a7be0807be1c352 may be the cause of buildbot failures on FreeBSD (at least koobs-freebsd-current, log attached), due to only the EBADF error being handled (not EINVAL, et al). Unfortunately the worker was been offline for a longer than anticipated period of time and only recently was restored which delayed picking it up. The issue (in this workers case) is related to the buildbot home/data directory being on a ZFS filesystem, who's host was recently updated (from current late last year to yesterday). Initial investigation/isolation/references: Disable posix_fallocate(2) for ZFS https://lists.freebsd.org/pipermail/svn-src-head/2017-November/105709.html Note: Above change will be relevant (merged) for at least FreeBSD 12 and 11, but perhaps even 10. 0000684: posix_fallocate() should be allowed to return ENOTSUP (Interp Status: Approved) http://austingroupbugs.net/view.php?id=684 [HEADS UP] posix_fallocate support removed from ZFS, lld affected https://lists.freebsd.org/pipermail/freebsd-current/2017-November/067463.html Snip: "illumos and ZoL seem to do the same." Gold fails when output file is lying on ZFS https://sourceware.org/bugzilla/show_bug.cgi?id=22540 Given the wide scope of use of zfs and both syscalls across multiple OS's, and possible changes to POSIX documentation/standards, changes to the underlying fallocate/fadvise functions may also be indicated here. ---------- nosy: +koobs versions: +Python 3.8 Added file: https://bugs.python.org/file47454/koobs-freebsd-current.non-debug.3.x.build.16.stdio.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 22:15:40 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 21 Feb 2018 03:15:40 +0000 Subject: [issue32540] venv docs - doesn't match behavior In-Reply-To: <1515780433.02.0.467229070634.issue32540@psf.upfronthosting.co.za> Message-ID: <1519182940.47.0.467229070634.issue32540@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: The PR was against master branch. So if backports are needed, you can add "needs backport to" labels on GH-5736 and the bot will take care of it. ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 22:53:03 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 21 Feb 2018 03:53:03 +0000 Subject: [issue32540] venv docs - doesn't match behavior In-Reply-To: <1515780433.02.0.467229070634.issue32540@psf.upfronthosting.co.za> Message-ID: <1519185183.2.0.467229070634.issue32540@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: I've went ahead to initiate the backports. ---------- stage: patch review -> backport needed versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 23:21:10 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 21 Feb 2018 04:21:10 +0000 Subject: [issue32540] venv docs - doesn't match behavior In-Reply-To: <1515780433.02.0.467229070634.issue32540@psf.upfronthosting.co.za> Message-ID: <1519186870.63.0.467229070634.issue32540@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5566 stage: backport needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 23:21:56 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 21 Feb 2018 04:21:56 +0000 Subject: [issue32540] venv docs - doesn't match behavior In-Reply-To: <1515780433.02.0.467229070634.issue32540@psf.upfronthosting.co.za> Message-ID: <1519186916.84.0.467229070634.issue32540@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5567 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 23:25:39 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 21 Feb 2018 04:25:39 +0000 Subject: [issue32540] venv docs - doesn't match behavior In-Reply-To: <1515780433.02.0.467229070634.issue32540@psf.upfronthosting.co.za> Message-ID: <1519187139.31.0.467229070634.issue32540@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 98a86cbb9bed94a232263698041acd2775da3dad by Mariatta (Miss Islington (bot)) in branch '3.7': bpo-32540: Update venv documentation (GH-5736) https://github.com/python/cpython/commit/98a86cbb9bed94a232263698041acd2775da3dad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 23:26:23 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 21 Feb 2018 04:26:23 +0000 Subject: [issue32540] venv docs - doesn't match behavior In-Reply-To: <1515780433.02.0.467229070634.issue32540@psf.upfronthosting.co.za> Message-ID: <1519187183.79.0.467229070634.issue32540@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 76c3f5eeb07aeb037da1ed6761dd9bd95e2c1d8d by Mariatta (Miss Islington (bot)) in branch '3.6': bpo-32540: Update venv documentation (GH-5736) https://github.com/python/cpython/commit/76c3f5eeb07aeb037da1ed6761dd9bd95e2c1d8d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 23:27:50 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 21 Feb 2018 04:27:50 +0000 Subject: [issue32540] venv docs - doesn't match behavior In-Reply-To: <1515780433.02.0.467229070634.issue32540@psf.upfronthosting.co.za> Message-ID: <1519187270.54.0.467229070634.issue32540@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: This should be good now. Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 23:30:04 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 21 Feb 2018 04:30:04 +0000 Subject: [issue28886] Move deprecated abc module decorators to separate section in docs In-Reply-To: <1481031817.69.0.735601842725.issue28886@psf.upfronthosting.co.za> Message-ID: <1519187404.01.0.467229070634.issue28886@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 52c6b89796a7ec391db20281e05b256f57e97b35 by INADA Naoki (Harshul jain) in branch 'master': bpo-28886: doc: Move deprecated abc decorators to separate section (GH-176) https://github.com/python/cpython/commit/52c6b89796a7ec391db20281e05b256f57e97b35 ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 23:31:10 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 21 Feb 2018 04:31:10 +0000 Subject: [issue28886] Move deprecated abc module decorators to separate section in docs In-Reply-To: <1481031817.69.0.735601842725.issue28886@psf.upfronthosting.co.za> Message-ID: <1519187470.28.0.467229070634.issue28886@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5568 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 20 23:32:09 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 21 Feb 2018 04:32:09 +0000 Subject: [issue28886] Move deprecated abc module decorators to separate section in docs In-Reply-To: <1481031817.69.0.735601842725.issue28886@psf.upfronthosting.co.za> Message-ID: <1519187529.83.0.467229070634.issue28886@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5569 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 00:21:14 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 21 Feb 2018 05:21:14 +0000 Subject: [issue32859] os.dup2() tests dup3() availability on each call In-Reply-To: <1518822617.35.0.467229070634.issue32859@psf.upfronthosting.co.za> Message-ID: <1519190474.56.0.467229070634.issue32859@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset 16de2a9b8697cf90840eb217fb079f9c4c73e588 by Benjamin Peterson (Miss Islington (bot)) in branch '3.6': closes bpo-32859: Don't retry dup3() if it is not available at runtime (GH-5708) https://github.com/python/cpython/commit/16de2a9b8697cf90840eb217fb079f9c4c73e588 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 00:24:24 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 21 Feb 2018 05:24:24 +0000 Subject: [issue28886] Move deprecated abc module decorators to separate section in docs In-Reply-To: <1481031817.69.0.735601842725.issue28886@psf.upfronthosting.co.za> Message-ID: <1519190664.85.0.467229070634.issue28886@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 7452f6d8fa3ffe5dab20f7e4244851a6eca397be by INADA Naoki (Miss Islington (bot)) in branch '3.7': bpo-28886: doc: Move deprecated abc decorators to separate section (GH-176) https://github.com/python/cpython/commit/7452f6d8fa3ffe5dab20f7e4244851a6eca397be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 00:24:39 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 21 Feb 2018 05:24:39 +0000 Subject: [issue28886] Move deprecated abc module decorators to separate section in docs In-Reply-To: <1481031817.69.0.735601842725.issue28886@psf.upfronthosting.co.za> Message-ID: <1519190679.47.0.467229070634.issue28886@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 0150dc589439a9a78c80c2aa8d7d6c5d3bba1d6d by INADA Naoki (Miss Islington (bot)) in branch '3.6': bpo-28886: doc: Move deprecated abc decorators to separate section (GH-176) https://github.com/python/cpython/commit/0150dc589439a9a78c80c2aa8d7d6c5d3bba1d6d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 00:34:52 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 21 Feb 2018 05:34:52 +0000 Subject: [issue32891] Add 'Integer' as synonym for 'Integral' in numbers module. Message-ID: <1519191292.27.0.467229070634.issue32891@psf.upfronthosting.co.za> New submission from Terry J. Reedy : Actually, 'replace' 'Integral' with 'Integer' but keep 'Integral' for back compatibility. >From python-ideas, where Guido said "Looking at https://en.wikipedia.org/wiki/Number it seems that Integer is "special" -- every other number type is listed as " numbers" (e.g. rational numbers, complex numbers) but integers are listed as "Integers". So let's just switch it to that, and keep Integral as an alias for backwards compatibility. I don't think it's a huge problem to fix this in 3.7b2, if someone wants to do the work." PR needs What's New entry. Ned, if you disagree as RM, please say so. ---------- messages: 312463 nosy: ned.deily, terry.reedy priority: high severity: normal stage: test needed status: open title: Add 'Integer' as synonym for 'Integral' in numbers module. type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 00:42:18 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 21 Feb 2018 05:42:18 +0000 Subject: [issue32008] Example suggest to use a TLSv1 socket In-Reply-To: <1510428965.62.0.213398074469.issue32008@psf.upfronthosting.co.za> Message-ID: <1519191738.8.0.467229070634.issue32008@psf.upfronthosting.co.za> Change by Benjamin Peterson : ---------- keywords: +patch pull_requests: +5570 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 00:52:02 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 21 Feb 2018 05:52:02 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse In-Reply-To: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> Message-ID: <1519192322.89.0.467229070634.issue32880@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In def find_good_parse_start: str, pos = self.str, None Using str as an attribute is ok, but using the bare built-in class name for an instance thereof is annoying. 's' would be better, or even 'sample' (to be analyzed). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 00:55:03 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 21 Feb 2018 05:55:03 +0000 Subject: [issue32008] Example suggest to use a TLSv1 socket In-Reply-To: <1510428965.62.0.213398074469.issue32008@psf.upfronthosting.co.za> Message-ID: <1519192503.87.0.467229070634.issue32008@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset e9edee0b65650c4f9db90cefc2e9a8125bad762c by Benjamin Peterson in branch 'master': bpo-32008: don't use PROTOCOL_TLSv1 in example (GH-5789) https://github.com/python/cpython/commit/e9edee0b65650c4f9db90cefc2e9a8125bad762c ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 00:55:13 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 21 Feb 2018 05:55:13 +0000 Subject: [issue32008] Example suggest to use a TLSv1 socket In-Reply-To: <1510428965.62.0.213398074469.issue32008@psf.upfronthosting.co.za> Message-ID: <1519192513.01.0.467229070634.issue32008@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5571 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 00:56:11 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 21 Feb 2018 05:56:11 +0000 Subject: [issue32008] Example suggest to use a TLSv1 socket In-Reply-To: <1510428965.62.0.213398074469.issue32008@psf.upfronthosting.co.za> Message-ID: <1519192571.51.0.467229070634.issue32008@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5572 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 00:59:28 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 21 Feb 2018 05:59:28 +0000 Subject: [issue32008] Example suggest to use a TLSv1 socket In-Reply-To: <1510428965.62.0.213398074469.issue32008@psf.upfronthosting.co.za> Message-ID: <1519192768.59.0.467229070634.issue32008@psf.upfronthosting.co.za> Change by Benjamin Peterson : ---------- pull_requests: +5573 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 01:00:04 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 21 Feb 2018 06:00:04 +0000 Subject: [issue32889] Valgrind suppressions need updating In-Reply-To: <1519161187.46.0.467229070634.issue32889@psf.upfronthosting.co.za> Message-ID: <1519192804.1.0.467229070634.issue32889@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset ba518804bf4c1ea01df5e622b333d3116cbaa3bd by Benjamin Peterson (Paul Price) in branch 'master': bpo-32889: update valgrind suppressions (GH-5779) https://github.com/python/cpython/commit/ba518804bf4c1ea01df5e622b333d3116cbaa3bd ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 01:01:12 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 21 Feb 2018 06:01:12 +0000 Subject: [issue32889] Valgrind suppressions need updating In-Reply-To: <1519161187.46.0.467229070634.issue32889@psf.upfronthosting.co.za> Message-ID: <1519192872.21.0.467229070634.issue32889@psf.upfronthosting.co.za> Change by miss-islington : ---------- keywords: +patch pull_requests: +5574 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 01:02:11 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 21 Feb 2018 06:02:11 +0000 Subject: [issue32889] Valgrind suppressions need updating In-Reply-To: <1519161187.46.0.467229070634.issue32889@psf.upfronthosting.co.za> Message-ID: <1519192931.87.0.467229070634.issue32889@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5575 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 01:02:21 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 21 Feb 2018 06:02:21 +0000 Subject: [issue32008] Example suggest to use a TLSv1 socket In-Reply-To: <1510428965.62.0.213398074469.issue32008@psf.upfronthosting.co.za> Message-ID: <1519192941.11.0.467229070634.issue32008@psf.upfronthosting.co.za> miss-islington added the comment: New changeset e5d38deb045d0907e6fcf82af8d2d8f0556a8591 by Miss Islington (bot) in branch '3.7': bpo-32008: don't use PROTOCOL_TLSv1 in example (GH-5789) https://github.com/python/cpython/commit/e5d38deb045d0907e6fcf82af8d2d8f0556a8591 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 01:06:34 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 21 Feb 2018 06:06:34 +0000 Subject: [issue32889] Valgrind suppressions need updating In-Reply-To: <1519161187.46.0.467229070634.issue32889@psf.upfronthosting.co.za> Message-ID: <1519193194.95.0.467229070634.issue32889@psf.upfronthosting.co.za> Change by Benjamin Peterson : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 01:07:19 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 21 Feb 2018 06:07:19 +0000 Subject: [issue32008] Example suggest to use a TLSv1 socket In-Reply-To: <1510428965.62.0.213398074469.issue32008@psf.upfronthosting.co.za> Message-ID: <1519193239.6.0.467229070634.issue32008@psf.upfronthosting.co.za> miss-islington added the comment: New changeset f8a794c04c8d375da279fc830770a5e6b4f363fb by Miss Islington (bot) in branch '3.6': bpo-32008: don't use PROTOCOL_TLSv1 in example (GH-5789) https://github.com/python/cpython/commit/f8a794c04c8d375da279fc830770a5e6b4f363fb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 01:17:12 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 21 Feb 2018 06:17:12 +0000 Subject: [issue32008] Example suggest to use a TLSv1 socket In-Reply-To: <1510428965.62.0.213398074469.issue32008@psf.upfronthosting.co.za> Message-ID: <1519193832.51.0.467229070634.issue32008@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset 6c7edba1665ea676328c6b50f92e8423c8f0d164 by Benjamin Peterson in branch '2.7': [2.7] closes bpo-32008: don't use PROTOCOL_TLSv1 in example (GH-5789) (#5792) https://github.com/python/cpython/commit/6c7edba1665ea676328c6b50f92e8423c8f0d164 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 01:27:40 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 21 Feb 2018 06:27:40 +0000 Subject: [issue32889] Valgrind suppressions need updating In-Reply-To: <1519161187.46.0.467229070634.issue32889@psf.upfronthosting.co.za> Message-ID: <1519194460.54.0.467229070634.issue32889@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 69607b4ecf917aea59632ff72695a97a6689ed8c by Miss Islington (bot) in branch '3.7': bpo-32889: update valgrind suppressions (GH-5779) https://github.com/python/cpython/commit/69607b4ecf917aea59632ff72695a97a6689ed8c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 01:37:20 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 21 Feb 2018 06:37:20 +0000 Subject: [issue31848] "aifc" module does not always initialize "Aifc_read._ssnd_chunk" In-Reply-To: <1508765581.06.0.213398074469.issue31848@psf.upfronthosting.co.za> Message-ID: <1519195040.62.0.467229070634.issue31848@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset b852d8c1f0b12e84549d83cd9b1ec0992b9d9703 by Serhiy Storchaka (Miss Islington (bot)) in branch '2.7': [2.7] bpo-31848: Fix broken error handling in Aifc_read.initfp() when the SSND chunk is not found (GH-5240) (GH-5781) https://github.com/python/cpython/commit/b852d8c1f0b12e84549d83cd9b1ec0992b9d9703 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 01:31:56 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 21 Feb 2018 06:31:56 +0000 Subject: [issue32889] Valgrind suppressions need updating In-Reply-To: <1519161187.46.0.467229070634.issue32889@psf.upfronthosting.co.za> Message-ID: <1519194716.82.0.467229070634.issue32889@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 1e8bc25594db3f36a3f228531bce0ed1b99c2d8d by Miss Islington (bot) in branch '3.6': bpo-32889: update valgrind suppressions (GH-5779) https://github.com/python/cpython/commit/1e8bc25594db3f36a3f228531bce0ed1b99c2d8d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 01:40:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 21 Feb 2018 06:40:02 +0000 Subject: [issue31848] "aifc" module does not always initialize "Aifc_read._ssnd_chunk" In-Reply-To: <1508765581.06.0.213398074469.issue31848@psf.upfronthosting.co.za> Message-ID: <1519195202.72.0.467229070634.issue31848@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 Feb 21 01:51:11 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 21 Feb 2018 06:51:11 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse In-Reply-To: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> Message-ID: <1519195871.84.0.467229070634.issue32880@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Is str = str.replace('xxxxxxxx', 'x') str = str.replace('xxxx', 'x') str = str.replace('xx', 'x') str = str.replace('xx', 'x') really faster than _squashex = re.compile('x+').sub # top of file _squashex('x', str) And are the name bindings faster that regex.func(...)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 01:45:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 21 Feb 2018 06:45:10 +0000 Subject: [issue32891] Add 'Integer' as synonym for 'Integral' in numbers module. In-Reply-To: <1519191292.27.0.467229070634.issue32891@psf.upfronthosting.co.za> Message-ID: <1519195510.9.0.467229070634.issue32891@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Pickles containing a reference to Integer and created in new versions will be not compatible with older versions. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 02:05:42 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Wed, 21 Feb 2018 07:05:42 +0000 Subject: [issue31106] os.posix_fallocate() generate exception with errno 0 In-Reply-To: <1501686186.83.0.555586832167.issue31106@psf.upfronthosting.co.za> Message-ID: <1519196742.1.0.467229070634.issue31106@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: The failed test is test_posix_fallocate, not test_posix_fallocate_errno. The former special-cases Solaris for EINVAL already, and the latter merely passes an invalid descriptor. It seems that this particular issue is still open only because there is no NEWS entry in the merged commits. ---------- nosy: +izbyshev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 02:15:52 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Wed, 21 Feb 2018 07:15:52 +0000 Subject: [issue28414] SSL match_hostname fails for internationalized domain names In-Reply-To: <1476172956.13.0.85556243538.issue28414@psf.upfronthosting.co.za> Message-ID: <1519197352.59.0.467229070634.issue28414@psf.upfronthosting.co.za> Nathaniel Smith added the comment: Christian: we're less than a week out from b2. Do you need any help here? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 03:23:17 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 21 Feb 2018 08:23:17 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse In-Reply-To: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> Message-ID: <1519201397.88.0.467229070634.issue32880@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In _study2, let q instead of p be end of last good line and then set p back to beginning. Setting p to end, q to p, and p to start is confusing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 03:51:45 2018 From: report at bugs.python.org (Sylvain Marie) Date: Wed, 21 Feb 2018 08:51:45 +0000 Subject: [issue32886] new Boolean ABC in numbers module + Integral>Integer renaming In-Reply-To: <1519133521.3.0.467229070634.issue32886@psf.upfronthosting.co.za> Message-ID: <1519203105.84.0.467229070634.issue32886@psf.upfronthosting.co.za> Sylvain Marie added the comment: Thanks ! 1. > ok 2. > ok 3. > That's simply 'the latest state' in the discussion. I guess that having Boolean in numbers is better than it being in its own module, since it is consistent with the other ABCs (and bool is a subclass of both Boolean and Integral-er). To quote Guido's answer in the discussion thread GVR> A thought just occurred to me. Maybe we should just add a Boolean class to numbers? (several positive answers) SMA > I would rather suggest to keep that Boolean ABC class independent of Integral (see proposal in first post) to let it remain 'pure', i.e. represent logical booleans only. However nothing prevents us to register python bool as a virtual subclass of *both* Integral and Boolean - while np.bool would be registered as a virtual subclass of Boolean only. This would reflect quite well the reality - the fact that python bool is both a Boolean and an Integer, while numpy bool is only a Boolean. GVR> OK, that could work. At this point I think you should just file an issue on bugs.python.org (but since Python 3.7 is in feature freeze, expect this to be put on the 3.8 track). 4. > Very good point. I do not know how do handle this at this point. As long as bool is a subclass of int (changing this is another discussion), the only way to go for now is probably to remove the 'invert' method from this ABC - if I am interpreting your answer correctly? Finally let's note that the Integral > Integer renaming is now handled in a separate thread https://bugs.python.org/issue32891 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 04:07:49 2018 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 21 Feb 2018 09:07:49 +0000 Subject: [issue32886] new Boolean ABC in numbers module + Integral>Integer renaming In-Reply-To: <1519133521.3.0.467229070634.issue32886@psf.upfronthosting.co.za> Message-ID: <1519204069.41.0.467229070634.issue32886@psf.upfronthosting.co.za> Mark Dickinson added the comment: > - register numpy bool ('np.bool_') as a virtual subclass of 'Boolean' only Be aware that np.bool_ behaves differently from Python's bool type in a number of ways. It may not make sense to have something that tries to abstract over both bool and np.bool_. >>> import numpy as np >>> np.bool_(True) + np.bool_(True) True >>> ~np.bool_(True) False >>> True + True 2 >>> ~True -2 ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 04:12:24 2018 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 21 Feb 2018 09:12:24 +0000 Subject: [issue29282] Fused multiply-add: proposal to add math.fma() In-Reply-To: <1484560897.19.0.0955404368118.issue29282@psf.upfronthosting.co.za> Message-ID: <1519204344.06.0.467229070634.issue29282@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Is this because of the inf/NaN discrimination hiccups [...] No, more than that. If it were just that, we could work around it by adding the appropriate special case handling before calling the libm fma (as has been done, reluctantly, with some of the other math module functions; see the source for math.pow, for example). But the fma implementation on Windows is fundamentally broken. For finite numbers, it simply doesn't give what it's supposed to (a * b + c, computed with a _single_ rounding). Since that single rounding is most of the point of fma, that makes the libm fma not fit for purpose on Windows. It _is_ possible, with care, to code up a not-too-inefficient fma emulation using clever tricks like Veltkamp splitting and Dekker multiplication. I have half such an implementation sitting on my home computer, but so far have not had the cycles to finish it (and it's not high on the priority list right now). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 04:14:48 2018 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 21 Feb 2018 09:14:48 +0000 Subject: [issue32891] Add 'Integer' as synonym for 'Integral' in numbers module. In-Reply-To: <1519191292.27.0.467229070634.issue32891@psf.upfronthosting.co.za> Message-ID: <1519204488.43.0.467229070634.issue32891@psf.upfronthosting.co.za> Mark Dickinson added the comment: +1 for the Integer alias, if it can be made to work. The "Integral" name has always felt clunky and non-obvious to me. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 04:16:37 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 21 Feb 2018 09:16:37 +0000 Subject: [issue32892] Remove specific constant AST types in favor of ast.Constant Message-ID: <1519204597.27.0.467229070634.issue32892@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : Currently different literals are represented by different types in AST: Num -- for int, float and complex Str -- for str Bytes -- for bytes Ellipsis -- for Ellipsis NameConstant -- for True, False and None And Constant (added in 3.6, issue26146) can represent any immutable value, including tuples and frozensets of constants. Instances of Constant are not created by the AST parser, they are created by the builtin AST optimizer and can be created manually. These AST types don't have one-to-one correspondence with Python types, since Num represents three numeric types, NameConstant represents bool and NoneType, and any constant type can be represented as Constant. I propose to get rid of Num, Str, Bytes, Ellipsis and NameConstant and always use Constant. This will simplify the code which currently needs to repeat virtually identical code for all types. I have almost ready patch, the only question is whether it is worth to keep deprecated aliases Num, Str, Bytes, Ellipsis and NameConstant. ---------- components: Interpreter Core messages: 312482 nosy: benjamin.peterson, brett.cannon, gvanrossum, ncoghlan, serhiy.storchaka, vstinner, yselivanov priority: normal severity: normal status: open title: Remove specific constant AST types in favor of ast.Constant type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 04:45:15 2018 From: report at bugs.python.org (Christian Heimes) Date: Wed, 21 Feb 2018 09:45:15 +0000 Subject: [issue32008] Example suggest to use a TLSv1 socket In-Reply-To: <1510428965.62.0.213398074469.issue32008@psf.upfronthosting.co.za> Message-ID: <1519206315.55.0.467229070634.issue32008@psf.upfronthosting.co.za> Christian Heimes added the comment: For 3.6 to 3.8 I'd prefer TLS_PROTOCOL_CLIENT. It also sets check_hostname and verify_mode to sane, safe values, too. ---------- resolution: fixed -> stage: resolved -> needs patch status: closed -> open versions: +Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 04:45:56 2018 From: report at bugs.python.org (Christian Heimes) Date: Wed, 21 Feb 2018 09:45:56 +0000 Subject: [issue32008] Example suggest to use a TLSv1 socket In-Reply-To: <1510428965.62.0.213398074469.issue32008@psf.upfronthosting.co.za> Message-ID: <1519206356.09.0.467229070634.issue32008@psf.upfronthosting.co.za> Christian Heimes added the comment: Err, I meant PROTOCOL_TLS_CLIENT: >>> import ssl >>> context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) >>> context.check_hostname True >>> context.verify_mode ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 04:56:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 21 Feb 2018 09:56:21 +0000 Subject: [issue32893] ast.literal_eval() shouldn't accept booleans as numbers in AST Message-ID: <1519206981.62.0.467229070634.issue32893@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : Currently ast.literal_eval() accepts AST representing expressions like "+True" or "True+2j" if constants are represented as Constant. This is because the type of the value is tested with `isinstance(left, (int, float))` and since bool is a subclass of int it passes this test. The proposed PR makes ast.literal_eval() using tests for exact type. I don't think it is worth backporting since it affects only passing AST to ast.literal_eval(). Usually ast.literal_eval() is used for evaluating strings. ---------- components: Library (Lib) messages: 312485 nosy: serhiy.storchaka priority: normal severity: normal status: open title: ast.literal_eval() shouldn't accept booleans as numbers in AST type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 04:56:40 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 21 Feb 2018 09:56:40 +0000 Subject: [issue32893] ast.literal_eval() shouldn't accept booleans as numbers in AST In-Reply-To: <1519206981.62.0.467229070634.issue32893@psf.upfronthosting.co.za> Message-ID: <1519207000.0.0.467229070634.issue32893@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 05:01:55 2018 From: report at bugs.python.org (Christian Heimes) Date: Wed, 21 Feb 2018 10:01:55 +0000 Subject: [issue32008] Example suggest to use a TLSv1 socket In-Reply-To: <1510428965.62.0.213398074469.issue32008@psf.upfronthosting.co.za> Message-ID: <1519207315.04.0.467229070634.issue32008@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- pull_requests: +5576 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 05:02:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 21 Feb 2018 10:02:21 +0000 Subject: [issue32893] ast.literal_eval() shouldn't accept booleans as numbers in AST In-Reply-To: <1519206981.62.0.467229070634.issue32893@psf.upfronthosting.co.za> Message-ID: <1519207341.74.0.467229070634.issue32893@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +5577 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 05:17:24 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 21 Feb 2018 10:17:24 +0000 Subject: [issue32017] profile.Profile() has no method enable() In-Reply-To: <1510607839.08.0.213398074469.issue32017@psf.upfronthosting.co.za> Message-ID: <1519208244.94.0.467229070634.issue32017@psf.upfronthosting.co.za> Antoine Pitrou added the comment: We can't remove public-looking methods (i.e. they don't start with an underscore) like that because some people may be using them. Rather than document the differences, I think it would be more useful to try to bridge the gap by augmenting the profile API with whatever supplementary APIs cProfile has. If some API is difficult to implement for profile, then we can revisit that goal and make an exception. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 05:32:55 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 21 Feb 2018 10:32:55 +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: <1519209175.86.0.467229070634.issue32892@psf.upfronthosting.co.za> Nick Coghlan added the comment: As pure aliases, those wouldn't necessarily be that useful, as aside from NameConstant, the field names are different (Num.n, Str.s, Bytes.s). I do wonder whether it might be worth keeping "NameConstant", though, and use that for Ellipsis as well, so the singletons all use NameConstant, while regular constants use Constant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 05:50:37 2018 From: report at bugs.python.org (=?utf-8?q?Nico_Schl=C3=B6mer?=) Date: Wed, 21 Feb 2018 10:50:37 +0000 Subject: [issue29282] Fused multiply-add: proposal to add math.fma() In-Reply-To: <1484560897.19.0.0955404368118.issue29282@psf.upfronthosting.co.za> Message-ID: <1519210237.22.0.467229070634.issue29282@psf.upfronthosting.co.za> Nico Schl?mer added the comment: Okay, thanks for the info. As a stop-gap measure, I've created pyfma [1, 2]. Install with ``` pip install pyfma ``` and use with ``` pyfma.fma(3.0, 2.0, 1.0) ``` Only works on Unix reliable then, but that's all I care about. :) Cheers, Nico [1] https://github.com/nschloe/pyfma [2] https://pypi.python.org/pypi/pyfma ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 05:58:39 2018 From: report at bugs.python.org (Dmitry Zotikov) Date: Wed, 21 Feb 2018 10:58:39 +0000 Subject: [issue18777] Cannot compile _ssl.c using openssl > 1.0 In-Reply-To: <1376890287.78.0.562230025847.issue18777@psf.upfronthosting.co.za> Message-ID: <1519210719.64.0.467229070634.issue18777@psf.upfronthosting.co.za> Dmitry Zotikov added the comment: James, double check you specify the right path to the local system libraries. If the system is multilib, libssl resides in /usr/local/lib/hpux32 (64) and not in /usr/local/lib directly. ---------- nosy: +dmitry.zotikov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 06:08:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 21 Feb 2018 11:08:43 +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: <1519211323.09.0.467229070634.issue32892@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Right, they shouldn't be just aliases, but Constant subclasses with __new__ which return Constant and __instancecheck__ which checks the type of the value. And the Constant class should have writable properties n and s. All these operations should emit a deprecation warning at runtime. Even this doesn't preserve perfect compatibility. issubclass(type(node), Num) will not work, and compile(Num('123')) will raise en exception in the Num constructor instead of compile(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 06:31:41 2018 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 21 Feb 2018 11:31: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: <1519212701.33.0.467229070634.issue32892@psf.upfronthosting.co.za> Nick Coghlan added the comment: Ah, right - in that case, I think the subclasses would be worthwhile, as they shouldn't be too much hassle to maintain for a release, and will provide a more graceful migration for folks doing their own AST processing and generation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 07:20:59 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 21 Feb 2018 12:20:59 +0000 Subject: [issue32894] AST unparsing of infinity numbers Message-ID: <1519215659.19.0.467229070634.issue32894@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : AST unparsing of infinity numbers produces a string which can't be evaluated because inf and infj are not builtins. >>> from __future__ import annotations >>> def f(x: A[1e1000, 1e1000j]): pass ... >>> f.__annotations__ {'x': 'A[(inf, infj)]'} See how this problem is handled in Tools/parser/unparse.py. There is similar problem with NaN. NaN can't be a result of parsing Python sources, but it can be injected manually in AST, and it can be a result of third-party AST optimizer. ---------- components: Interpreter Core messages: 312492 nosy: gvanrossum, lukasz.langa, serhiy.storchaka priority: normal severity: normal status: open title: AST unparsing of infinity numbers type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 07:44:26 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 21 Feb 2018 12:44:26 +0000 Subject: [issue32886] new Boolean ABC in numbers module + Integral>Integer renaming In-Reply-To: <1519133521.3.0.467229070634.issue32886@psf.upfronthosting.co.za> Message-ID: <1519217066.14.0.467229070634.issue32886@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If a Boolean ABC includes __and__, __or__ and __xor__ which implement conjunction, disjunction and exclusive disjunction, shouldn't it include __le__, __gt__, __ge__ and __lt__? They implement other logical operations: material implication, material nonimplication, converse implication and converse nonimplication. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 08:19:59 2018 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 21 Feb 2018 13:19:59 +0000 Subject: [issue32891] Add 'Integer' as synonym for 'Integral' in numbers module. In-Reply-To: <1519191292.27.0.467229070634.issue32891@psf.upfronthosting.co.za> Message-ID: <1519219199.58.0.467229070634.issue32891@psf.upfronthosting.co.za> Mark Dickinson added the comment: And it's Ned's call, of course, but this smells like a new feature rather than a fix to me, and I'm not sure why it would be considered special enough to break the usual release-process rules. Serhiy's point about pickles shows that there's at least a little bit of care and thought needed here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 09:05:22 2018 From: report at bugs.python.org (INADA Naoki) Date: Wed, 21 Feb 2018 14:05:22 +0000 Subject: [issue28886] Move deprecated abc module decorators to separate section in docs In-Reply-To: <1481031817.69.0.735601842725.issue28886@psf.upfronthosting.co.za> Message-ID: <1519221922.77.0.467229070634.issue28886@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 09:06:26 2018 From: report at bugs.python.org (Uri Elias) Date: Wed, 21 Feb 2018 14:06:26 +0000 Subject: [issue32895] Make general function sum() use Numpy's sum when obviously possible Message-ID: <1519221986.73.0.467229070634.issue32895@psf.upfronthosting.co.za> New submission from Uri Elias : True at least to PY2.7 and 3.5 - given x is a numpy array, say np.random.rand(int(1e6)), then sum(x) is much slower (for 1e6 elements - 2 orders of magnitude) than x.sum(). Now, while this is understandable behaviour, I wander how hard it is to add a condition that if argument is a Numpy object then use its own sum. I think many programmers aren't aware of that, so all in all it can improve the performance of a lot of existing code. ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 312495 nosy: urielias priority: normal severity: normal status: open title: Make general function sum() use Numpy's sum when obviously possible type: enhancement versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 11:21:46 2018 From: report at bugs.python.org (John Didion) Date: Wed, 21 Feb 2018 16:21:46 +0000 Subject: [issue32896] Error when subclassing a dataclass with a field that uses a defaultfactory Message-ID: <1519230106.01.0.467229070634.issue32896@psf.upfronthosting.co.za> New submission from John Didion : > @dataclass > class Foo: > x: dict = field(default_factory=dict) > @dataclass > class Bar(Foo): > y: int = 1 > @dataclass > class Baz(Foo): > def blorf(self): > print('hello') > Foo().x {} > Bar().x {} > Baz().x Traceback (most recent call last): File "", line 1, in TypeError: __init__() missing 1 required positional argument: 'x' --- I understand that this is desired behavior when the subclass contains non-default attributes. But subclasses that define no additional attributes should work just the same as those that define only additional default attributes. A similar issue was raised and dismissed when dataclasses was in development on GitHub: https://github.com/ericvsmith/dataclasses/issues/112, but that only concerned the case of subclasses defining non-default attributes. ---------- messages: 312496 nosy: John Didion priority: normal severity: normal status: open title: Error when subclassing a dataclass with a field that uses a defaultfactory type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 11:36:54 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 21 Feb 2018 16:36:54 +0000 Subject: [issue32896] Error when subclassing a dataclass with a field that uses a defaultfactory In-Reply-To: <1519230106.01.0.467229070634.issue32896@psf.upfronthosting.co.za> Message-ID: <1519231014.58.0.467229070634.issue32896@psf.upfronthosting.co.za> Change by Ned Deily : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 12:48:42 2018 From: report at bugs.python.org (ppperry) Date: Wed, 21 Feb 2018 17:48:42 +0000 Subject: [issue32895] Make general function sum() use Numpy's sum when obviously possible In-Reply-To: <1519221986.73.0.467229070634.issue32895@psf.upfronthosting.co.za> Message-ID: <1519235322.2.0.467229070634.issue32895@psf.upfronthosting.co.za> Change by ppperry : ---------- components: +Library (Lib) -2to3 (2.x to 3.x conversion tool) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 12:49:29 2018 From: report at bugs.python.org (ppperry) Date: Wed, 21 Feb 2018 17:49:29 +0000 Subject: [issue32895] Make general function sum() use Numpy's sum when obviously possible In-Reply-To: <1519221986.73.0.467229070634.issue32895@psf.upfronthosting.co.za> Message-ID: <1519235369.61.0.467229070634.issue32895@psf.upfronthosting.co.za> Change by ppperry : ---------- type: enhancement -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 12:49:45 2018 From: report at bugs.python.org (ppperry) Date: Wed, 21 Feb 2018 17:49:45 +0000 Subject: [issue32895] Make general function sum() use Numpy's sum when obviously possible In-Reply-To: <1519221986.73.0.467229070634.issue32895@psf.upfronthosting.co.za> Message-ID: <1519235385.85.0.467229070634.issue32895@psf.upfronthosting.co.za> Change by ppperry : ---------- type: performance -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 12:54:40 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 21 Feb 2018 17:54:40 +0000 Subject: [issue32895] Make general function sum() use Numpy's sum when obviously possible In-Reply-To: <1519221986.73.0.467229070634.issue32895@psf.upfronthosting.co.za> Message-ID: <1519235680.36.0.467229070634.issue32895@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I think many programmers aren't aware of that, so all in all > it can improve the performance of a lot of existing code. We could create a __sum__ dunder method to allow classes to override the normal behavior of sum, but that isn't worth it because the speed issue has almost nothing to do with summation. For example, the timings would also be slow for min(a), max(a), list(a), set(a), etc where a=np.random.rand(int(1e6)). In general, if anything outside of numpy loops over a numpy array, then every datum has to be converted to a typed, reference-counted python object before the function can begin to do its work. These are the facts-of-life when dealing with numpy. The usual advice is to manipulate numpy arrays only with numpy tools because they all know how to operate on the data natively without allocating Python objects for every datum. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 13:04:03 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 21 Feb 2018 18:04:03 +0000 Subject: [issue32893] ast.literal_eval() shouldn't accept booleans as numbers in AST In-Reply-To: <1519206981.62.0.467229070634.issue32893@psf.upfronthosting.co.za> Message-ID: <1519236243.41.0.467229070634.issue32893@psf.upfronthosting.co.za> Raymond Hettinger added the comment: What harm comes from accepting expressions like "+True" or "True+2j"? While weird looking, those are valid Python expressions, so this doesn't seem like a bug. A key feature of booleans is that they are interoperable with integers. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 13:05:47 2018 From: report at bugs.python.org (Sylvain Marie) Date: Wed, 21 Feb 2018 18:05:47 +0000 Subject: [issue32886] new Boolean ABC in numbers module + Integral>Integer renaming In-Reply-To: <1519133521.3.0.467229070634.issue32886@psf.upfronthosting.co.za> Message-ID: <1519236347.59.0.467229070634.issue32886@psf.upfronthosting.co.za> Sylvain Marie added the comment: @Mark: you are right. That's why the proposed ABC does NOT inherit from Integral/Integer and focuses on boolean logic in its simplest form (not, and, or, xor). This one is common to both python bool and np.bool_. @Serhiy: thanks for this interesting suggestion ! However having been in the software development world for 12 years, I never met these concepts in practice yet. I suspect that therefore I will not be the only one - I'm afraid that might make this ABC hard to understand. Besides, I am not sure that numpy bool and python bool implement this correctly: >>> True > False True >>> np.bool_(True) > np.bool_(False) True This does not seem to comply with the description I found in https://en.wikipedia.org/wiki/Material_conditional For these reasons I would suggest these operations to be part of a separate class. -Sylvain ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 13:30:09 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 21 Feb 2018 18:30:09 +0000 Subject: [issue32893] ast.literal_eval() shouldn't accept booleans as numbers in AST In-Reply-To: <1519206981.62.0.467229070634.issue32893@psf.upfronthosting.co.za> Message-ID: <1519237809.37.0.467229070634.issue32893@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This doesn't look like Python literal. And if the function accepts a one particular non-literal the user can except that it accepts other looking similarly non-literal, that is false. Actually ast.literal_eval("+True") is error. But ast.literal_eval(ast.UnaryOp(ast.UAdd(), ast.Constant(True))) is successful by oversight. And look at this from other side. What is the benefit of accepting "+True"? This doesn't make the code simpler. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 13:35:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 21 Feb 2018 18:35:02 +0000 Subject: [issue32886] new Boolean ABC in numbers module + Integral>Integer renaming In-Reply-To: <1519133521.3.0.467229070634.issue32886@psf.upfronthosting.co.za> Message-ID: <1519238102.39.0.467229070634.issue32886@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Use <= for this operation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 13:43:45 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 21 Feb 2018 18:43:45 +0000 Subject: [issue32896] Error when subclassing a dataclass with a field that uses a defaultfactory In-Reply-To: <1519230106.01.0.467229070634.issue32896@psf.upfronthosting.co.za> Message-ID: <1519238625.82.0.467229070634.issue32896@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- assignee: -> eric.smith components: +Library (Lib) type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 13:44:40 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 21 Feb 2018 18:44:40 +0000 Subject: [issue32895] Make general function sum() use Numpy's sum when obviously possible In-Reply-To: <1519221986.73.0.467229070634.issue32895@psf.upfronthosting.co.za> Message-ID: <1519238680.61.0.467229070634.issue32895@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I concur with Raymond. NumPy is a third-party library, Python builtins can't depend on it. This could be solved by introducing a special protocol, but this isn't free. It adds a burden on writing and maintaining code and tests, and adds a runtime overhead of checking if the protocol is supported. This will slowdown sum() for every other collection. It can even slowdown it for short NumPy arrays. And, as Raymond has noted, if introduce the __sum__ protocol, why not introduce protocols for min(), max(), sort(), all(), and for any other builtin? This has the same drawbacks as for sum(), but multiplied by many times. If you use NumPy arrays just use NumPy array methods. Otherwise what is the reason of using NumPy? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 14:33:22 2018 From: report at bugs.python.org (Amit Ghadge) Date: Wed, 21 Feb 2018 19:33:22 +0000 Subject: [issue32897] test_gdb failed on Fedora 27 Message-ID: <1519241602.1.0.467229070634.issue32897@psf.upfronthosting.co.za> New submission from Amit Ghadge : Hi, I get latest changes, $ git log -1 Author: Paul Price Date: Wed Feb 21 01:00:01 2018 -0500 compilation done successfully but gdb test is failing, I attached output of test_gdb ---------- components: Tests files: error.txt messages: 312503 nosy: amitg-b14 priority: normal severity: normal status: open title: test_gdb failed on Fedora 27 versions: Python 3.8 Added file: https://bugs.python.org/file47455/error.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 14:35:25 2018 From: report at bugs.python.org (Eddie Elizondo) Date: Wed, 21 Feb 2018 19:35:25 +0000 Subject: [issue32898] [BUILD] Using COUNT_ALLOCS breaks build Message-ID: <1519241725.31.0.467229070634.issue32898@psf.upfronthosting.co.za> New submission from Eddie Elizondo : The following build crashed: mkdir debug && cd debug ../configure --with-pydebug make EXTRA_CFLAGS="-DCOUNT_ALLOCS" The bug was introduced here: https://github.com/python/cpython/commit/25420fe290b98171e6d30edf9350292c21ef700e Fix: 1) s/inter/interp/ 2) Declare PyTypeObject ---------- components: Build messages: 312504 nosy: elizondo93 priority: normal pull_requests: 5578 severity: normal status: open title: [BUILD] Using COUNT_ALLOCS breaks build type: compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 14:38:28 2018 From: report at bugs.python.org (Amit Ghadge) Date: Wed, 21 Feb 2018 19:38:28 +0000 Subject: [issue32897] test_gdb failed on Fedora 27 In-Reply-To: <1519241602.1.0.467229070634.issue32897@psf.upfronthosting.co.za> Message-ID: <1519241908.8.0.467229070634.issue32897@psf.upfronthosting.co.za> Amit Ghadge added the comment: gdb version is, GNU gdb (GDB) Fedora 8.0.1-30.fc27 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 15:01:23 2018 From: report at bugs.python.org (xitop) Date: Wed, 21 Feb 2018 20:01:23 +0000 Subject: [issue32899] Not documented: key in dict test may raise TypeError Message-ID: <1519243283.39.0.467229070634.issue32899@psf.upfronthosting.co.za> New submission from xitop : I'd like to suggest an addition to the documentation of the "key in dict" operation. Current version found at https://docs.python.org/3/library/stdtypes.html#dict says only: --- key in d Return True if d has a key key, else False. --- This is not precise. TypeError is also a possible outcome. It happens when the key is unhashable. Unsure whether the description is incomplete or the membership test has a bug I submitted the issue 32675 in January. The issue was closed with resolution of "not a bug". If it is indded the intended behaviour, I think it needs to be documented in order to prevent further misunderstandings. Before the issue 32675 I believed a membership test is failsafe, because the definition of __contains__ clearly defines the return value as either True or False. ---------- assignee: docs at python components: Documentation messages: 312506 nosy: docs at python, xitop priority: normal severity: normal status: open title: Not documented: key in dict test may raise TypeError type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 15:06:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 21 Feb 2018 20:06:54 +0000 Subject: [issue32898] [BUILD] Using COUNT_ALLOCS breaks build In-Reply-To: <1519241725.31.0.467229070634.issue32898@psf.upfronthosting.co.za> Message-ID: <1519243614.96.0.467229070634.issue32898@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- stage: -> patch review versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 15:08:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 21 Feb 2018 20:08:54 +0000 Subject: [issue32899] Not documented: key in dict test may raise TypeError In-Reply-To: <1519243283.39.0.467229070634.issue32899@psf.upfronthosting.co.za> Message-ID: <1519243734.74.0.467229070634.issue32899@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +inada.naoki, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 15:26:15 2018 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 21 Feb 2018 20:26:15 +0000 Subject: [issue32886] new Boolean ABC in numbers module + Integral>Integer renaming In-Reply-To: <1519133521.3.0.467229070634.issue32886@psf.upfronthosting.co.za> Message-ID: <1519244775.9.0.467229070634.issue32886@psf.upfronthosting.co.za> Mark Dickinson added the comment: > This one is common to both python bool and np.bool_. It's not, though. One of my examples was using `~` (`__invert__`) from the proposed ABC). And the behaviour of that function differs between NumPy and Python I think one of the rules about this sort of abstraction should be that there should be multiple concrete examples available that you intend the abstraction to apply to, *before* you abstract. Otherwise there's a risk of making an abstraction that doesn't turn out to fit actual use-cases. Right now, we only have Python's bool as a concrete example; NumPy's bool_ is IMO not close enough in its behaviour. Are you aware of other bool-like types around that the proposed ABC would be helpful for? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 16:05:46 2018 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 21 Feb 2018 21:05:46 +0000 Subject: [issue32886] new Boolean ABC in numbers module In-Reply-To: <1519133521.3.0.467229070634.issue32886@psf.upfronthosting.co.za> Message-ID: <1519247145.99.0.467229070634.issue32886@psf.upfronthosting.co.za> Mark Dickinson added the comment: Adjusted title (since the Integer <-> Integral rename is the subject of a separate issue) and versions (since as a new feature, this can't go into Python 3.7, which is already in feature freeze). ---------- title: new Boolean ABC in numbers module + Integral>Integer renaming -> new Boolean ABC in numbers module versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 16:21:20 2018 From: report at bugs.python.org (Matthias Urlichs) Date: Wed, 21 Feb 2018 21:21:20 +0000 Subject: [issue32900] Teach pdb to step through asyncio et al. Message-ID: <1519248080.49.0.467229070634.issue32900@psf.upfronthosting.co.za> New submission from Matthias Urlichs : The attached patch is a proof-of-concept implementation of a way to teach pdb to "single-step" through non-interesting code that you can't skip with "n". The prime example for this is asyncio, trio et al., though decorators like @contextlib.contextmanager also benefit. A "real" implementation should allow the user to specify ranges to ignore, on the pdb command line (probably by filename and optional range of line numbers, instead of pattern matching). A visual indication of how much code has been skipped-ahead that way might also be beneficial. ---------- components: asyncio messages: 312509 nosy: asvetlov, giampaolo.rodola, njs, smurfix, yselivanov priority: normal severity: normal status: open title: Teach pdb to step through asyncio et al. type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 16:21:59 2018 From: report at bugs.python.org (Matthias Urlichs) Date: Wed, 21 Feb 2018 21:21:59 +0000 Subject: [issue32900] Teach pdb to step through asyncio et al. In-Reply-To: <1519248080.49.0.467229070634.issue32900@psf.upfronthosting.co.za> Message-ID: <1519248119.83.0.467229070634.issue32900@psf.upfronthosting.co.za> Matthias Urlichs added the comment: File attachment failed, retrying ? ---------- keywords: +patch Added file: https://bugs.python.org/file47456/pdb.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 16:26:37 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 21 Feb 2018 21:26:37 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.6 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <1519248397.19.0.467229070634.issue15663@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Is there anything left to do for this? The new 64 bit MacOS 3.7.0b1 links with 8.6.7. Perhaps that should be updated to 8.6.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 16:26:55 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 21 Feb 2018 21:26:55 +0000 Subject: [issue32901] Update Windows 3.7/8 builds to tcl/tk 8.6.8 Message-ID: <1519248415.02.0.467229070634.issue32901@psf.upfronthosting.co.za> New submission from Terry J. Reedy : This should be done ASAP for most testing. MacOS 64bit 3.7.0b1 links to 8.6.7. Whether that should be upgraded to 8.6.8 is up to Ned. I raised question on #15663. ---------- messages: 312512 nosy: serhiy.storchaka, terry.reedy, zach.ware priority: normal severity: normal status: open title: Update Windows 3.7/8 builds to tcl/tk 8.6.8 versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 16:44:26 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Wed, 21 Feb 2018 21:44:26 +0000 Subject: [issue32900] Teach pdb to step through asyncio et al. In-Reply-To: <1519248080.49.0.467229070634.issue32900@psf.upfronthosting.co.za> Message-ID: <1519249466.72.0.467229070634.issue32900@psf.upfronthosting.co.za> Nathaniel Smith added the comment: Can you back up a bit and give an example of the problem you're running into? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 16:58:56 2018 From: report at bugs.python.org (Zachary Ware) Date: Wed, 21 Feb 2018 21:58:56 +0000 Subject: [issue32901] Update Windows 3.7/8 builds to tcl/tk 8.6.8 In-Reply-To: <1519248415.02.0.467229070634.issue32901@psf.upfronthosting.co.za> Message-ID: <1519250336.6.0.467229070634.issue32901@psf.upfronthosting.co.za> Zachary Ware added the comment: This is on Steve these days due to the binary signing. ---------- assignee: -> steve.dower components: +Tkinter, Windows nosy: +paul.moore, steve.dower, tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 18:40:20 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 21 Feb 2018 23:40:20 +0000 Subject: [issue32899] Not documented: key in dict test may raise TypeError In-Reply-To: <1519243283.39.0.467229070634.issue32899@psf.upfronthosting.co.za> Message-ID: <1519256420.86.0.467229070634.issue32899@psf.upfronthosting.co.za> Raymond Hettinger added the comment: In general, Python functions don't document all possible exceptions. One reason is that it would lead to substantial redundancy in the docs. Another reason is that functions generally don't know all the possible exceptions that can be raised because that can be controlled determined by the data itself. Also, the docs try to focus on core functionality and not drown out the message with side details. For comparison, look at str.startswith() or math.cos() which can raise a TypeError if the input type is incorrect. There is no reason to discuss that in the docs because most functions raise a TypeError when the type is incorrect. This is more of a general FAQ than a function by function documentation issue. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 18:41:12 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 21 Feb 2018 23:41:12 +0000 Subject: [issue32895] Make general function sum() use Numpy's sum when obviously possible In-Reply-To: <1519221986.73.0.467229070634.issue32895@psf.upfronthosting.co.za> Message-ID: <1519256472.17.0.467229070634.issue32895@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 19:01:28 2018 From: report at bugs.python.org (mj4int) Date: Thu, 22 Feb 2018 00:01:28 +0000 Subject: [issue32902] FileInput "inplace" redirects output of other threads Message-ID: <1519257688.59.0.467229070634.issue32902@psf.upfronthosting.co.za> New submission from mj4int : A pool of threads exists, all of which have started executing. Thread A has a fileinput object and is currently iterating over the files in "edit in place mode". For each file, stdout is redirected to the file. Thread A can call print and write to the file. Thread B just wants to log some things in the console. Thread B calls print and... writes to the file thread A is processing. stdout is hijacked by thread A's fileinput loop. Whether or not every thread should have an independent evaluation of stdout, certainly a fileinput object shouldn't silently redirect the prints of an innocent bystander thread? May exist in other python versions, but not checked. ---------- components: IO, Library (Lib) messages: 312516 nosy: mj4int priority: normal severity: normal status: open title: FileInput "inplace" redirects output of other threads type: behavior versions: Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 19:07:23 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 22 Feb 2018 00:07:23 +0000 Subject: [issue27923] PEP 467 -- Minor API improvements for binary sequences In-Reply-To: <1472691379.75.0.669592694643.issue27923@psf.upfronthosting.co.za> Message-ID: <1519258043.23.0.467229070634.issue27923@psf.upfronthosting.co.za> Change by Ned Deily : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 19:16:04 2018 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 22 Feb 2018 00:16:04 +0000 Subject: [issue32896] Error when subclassing a dataclass with a field that uses a defaultfactory In-Reply-To: <1519230106.01.0.467229070634.issue32896@psf.upfronthosting.co.za> Message-ID: <1519258564.69.0.467229070634.issue32896@psf.upfronthosting.co.za> Eric V. Smith added the comment: That's a great bug report. Thanks for the tiny code to replicate it. It turns out the code isn't quite doing what I thought. I'll have to give some thought to exactly how I'm going to handle this without breaking other cases, but I should have it fixed soon. Thanks again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 19:17:05 2018 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 22 Feb 2018 00:17:05 +0000 Subject: [issue32896] Error when subclassing a dataclass with a field that uses a defaultfactory In-Reply-To: <1519230106.01.0.467229070634.issue32896@psf.upfronthosting.co.za> Message-ID: <1519258625.57.0.467229070634.issue32896@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- nosy: +ned.deily priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 19:18:37 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 22 Feb 2018 00:18:37 +0000 Subject: [issue32016] Python 3.6.3 venv FAILURE In-Reply-To: <1510600726.31.0.213398074469.issue32016@psf.upfronthosting.co.za> Message-ID: <1519258717.01.0.467229070634.issue32016@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Without any additional information, should this be closed as 'Works for Me'? ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 19:20:01 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 22 Feb 2018 00:20:01 +0000 Subject: [issue32016] Python 3.6.3 venv FAILURE In-Reply-To: <1510600726.31.0.213398074469.issue32016@psf.upfronthosting.co.za> Message-ID: <1519258801.57.0.467229070634.issue32016@psf.upfronthosting.co.za> Ned Deily added the comment: > Without any additional information, should this be closed as 'Works for Me'? Yes, please. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 19:22:45 2018 From: report at bugs.python.org (Matanya Stroh) Date: Thu, 22 Feb 2018 00:22:45 +0000 Subject: [issue32884] Adding the ability for getpass to print asterisks when passowrd is typed In-Reply-To: <1519122533.37.0.467229070634.issue32884@psf.upfronthosting.co.za> Message-ID: <1519258965.74.0.467229070634.issue32884@psf.upfronthosting.co.za> Matanya Stroh added the comment: for getpass.win_getpass() it can simply be done by adding this line msvcrt.putch("*"). So the code will look like: def win_getpass(prompt='Password: ', stream=None): """Prompt for password with echo off, using Windows getch().""" if sys.stdin is not sys.__stdin__: return fallback_getpass(prompt, stream) for c in prompt: msvcrt.putwch(c) pw = "" while 1: c = msvcrt.getwch() if c == '\r' or c == '\n': break if c == '\003': raise KeyboardInterrupt if c == '\b': pw = pw[:-1] else: pw = pw + c msvcrt.putch("*") #Line that was added msvcrt.putwch('\r') msvcrt.putwch('\n') return pw ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 19:23:58 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 22 Feb 2018 00:23:58 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1519259038.64.0.467229070634.issue28498@psf.upfronthosting.co.za> Cheryl Sabella added the comment: There was a lot of work put into this patch, but I don't think it's been committed yet. Are any of the original authors interested in converting this to a Github pull request on the master branch? Thanks! ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 19:37:42 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Thu, 22 Feb 2018 00:37:42 +0000 Subject: [issue32903] os.chdir() may leak memory on Windows Message-ID: <1519259862.55.0.467229070634.issue32903@psf.upfronthosting.co.za> New submission from Alexey Izbyshev : 'new_path' is not freed if the new directory is a UNC path longer than MAX_PATH. ---------- components: Extension Modules, Windows messages: 312522 nosy: izbyshev, paul.moore, steve.dower, tim.golden, vstinner, zach.ware priority: normal severity: normal status: open title: os.chdir() may leak memory on Windows type: resource usage versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 19:40:38 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Thu, 22 Feb 2018 00:40:38 +0000 Subject: [issue32903] os.chdir() may leak memory on Windows In-Reply-To: <1519259862.55.0.467229070634.issue32903@psf.upfronthosting.co.za> Message-ID: <1519260038.51.0.467229070634.issue32903@psf.upfronthosting.co.za> Change by Alexey Izbyshev : ---------- keywords: +patch pull_requests: +5579 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 19:40:55 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 22 Feb 2018 00:40:55 +0000 Subject: [issue23077] PEP 1: Allow Provisional status for PEPs In-Reply-To: <1418861338.72.0.949069550217.issue23077@psf.upfronthosting.co.za> Message-ID: <1519260055.09.0.467229070634.issue23077@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Pull request: https://github.com/python/peps/pull/577 ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 20:00:15 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Thu, 22 Feb 2018 01:00:15 +0000 Subject: [issue32904] os.chdir() may crash on Windows in presence of races Message-ID: <1519261215.82.0.467229070634.issue32904@psf.upfronthosting.co.za> New submission from Alexey Izbyshev : win32_wchdir() retries GetCurrentDirectory() with a larger buffer if necessary, but doesn't check whether the new buffer is large enough. Another thread could change the current directory in meanwhile, so the buffer could turn out to be still not large enough, left in an uninitialized state and passed to SetEnvironmentVariable() afterwards. ---------- components: Extension Modules, Windows messages: 312524 nosy: izbyshev, paul.moore, steve.dower, tim.golden, vstinner, zach.ware priority: normal severity: normal status: open title: os.chdir() may crash on Windows in presence of races type: crash versions: Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 20:04:01 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Thu, 22 Feb 2018 01:04:01 +0000 Subject: [issue32904] os.chdir() may crash on Windows in presence of races In-Reply-To: <1519261215.82.0.467229070634.issue32904@psf.upfronthosting.co.za> Message-ID: <1519261441.57.0.467229070634.issue32904@psf.upfronthosting.co.za> Change by Alexey Izbyshev : ---------- keywords: +patch pull_requests: +5580 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 20:06:41 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Thu, 22 Feb 2018 01:06:41 +0000 Subject: [issue32903] os.chdir() may leak memory on Windows In-Reply-To: <1519259862.55.0.467229070634.issue32903@psf.upfronthosting.co.za> Message-ID: <1519261601.42.0.467229070634.issue32903@psf.upfronthosting.co.za> Change by Alexey Izbyshev : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 20:06:47 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 22 Feb 2018 01:06:47 +0000 Subject: [issue28498] tk busy command In-Reply-To: <1477069423.12.0.229038359578.issue28498@psf.upfronthosting.co.za> Message-ID: <1519261607.25.0.467229070634.issue28498@psf.upfronthosting.co.za> Change by Ned Deily : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 20:31:08 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 22 Feb 2018 01:31:08 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse In-Reply-To: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> Message-ID: <1519263068.47.0.467229070634.issue32880@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As noted in the test for find_good_parse_start and PR5755 discussion, a single line header on a line by itself in a multiline comment before a multiline header can prevent recognition of the latter. >>> P.set_str("'somethn=ig'\ndef g(a,\nb\n") >>> P.find_good_parse_start(lambda i: False) 13 >>> P.set_str("'''\ndef f():\n pass'''\ndef g(a,\nb\n") >>> P.find_good_parse_start(lambda i:i < 15) >>> One alternative to the current algorithm would be to search the beginning of every line for a compound statement keyword, not just lines ending with ':'. I believe the concern is that this would require uselessly checking more lines within strings. I believe that the same concern is why 'if' and 'for' are missing from the keyword list. When the window is an editor rather than shell, find_good_parse_start is called in EditorWindow.newline_and_indent_event and Hyperparser.__init__. The call-specific in-string function is returned by EW._build_char_in_string_func. It calls EW.is_char_in_string, which returns False only if the char in the text widget has been examined by the colorizer and not tagged with STRING. The call to find_good_parse_start is always followed by a call to set_lo and and then _study1 (via a call to another function). _study1 replaces runs of non-essential chars with 'x', which means that string literals within the code string are mostly reduced to a single x per line. (It would be fine if they were emptied except for newlines.) This suggests starting find_good_parse_start with a partial reduction, of just string literals, saved for further reduction by _study, so that keywords would never occur within the reduced literal. The problem is that one cannot tell for sure whether ''' or """ is the beginning or end of a multiline literal without parsing from the beginning of the code (which colorizer does). An alternate way to reuse the colorizer work might be to use splitlines on the code and then get all string tag ranges. The code-context option picks out compound-statement header lines. When enabled, I believe that its last line may be the desired good parse start line. Any proposed speedup should be tested by parsing multiple chunks of multiple stdlib modules. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 20:42:03 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 22 Feb 2018 01:42:03 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse In-Reply-To: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> Message-ID: <1519263723.07.0.467229070634.issue32880@psf.upfronthosting.co.za> Terry J. Reedy added the comment: One sub-issue is to expand the current short doc section (2.1. Automatic indentation) the intended smart indenting. There is nothing about open parameter lists, not about multiline tuple/list/dict displays. It should say (IN CAPS?) that an indent that seems wrong likely indicates a syntax error that has mislead the indenter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 21:23:26 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Thu, 22 Feb 2018 02:23:26 +0000 Subject: [issue32904] os.chdir(), os.getcwd() may crash on Windows in presence of races In-Reply-To: <1519261215.82.0.467229070634.issue32904@psf.upfronthosting.co.za> Message-ID: <1519266206.53.0.467229070634.issue32904@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: The same issue applies to os.getcwd(). ---------- title: os.chdir() may crash on Windows in presence of races -> os.chdir(), os.getcwd() may crash on Windows in presence of races _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 21:43:01 2018 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 22 Feb 2018 02:43:01 +0000 Subject: [issue23077] PEP 1: Allow Provisional status for PEPs In-Reply-To: <1418861338.72.0.949069550217.issue23077@psf.upfronthosting.co.za> Message-ID: <1519267381.03.0.467229070634.issue23077@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'll also note that I made my comments above about writing a new PEP prior to the migration to GitHub and the availability of a PR-based workflow for reviewing PEP changes. So consider the PR Cheryl linked and the post at https://mail.python.org/pipermail/python-dev/2018-February/152205.html the replacement for that PEP suggestion :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 22:48:44 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 22 Feb 2018 03:48:44 +0000 Subject: [issue32874] IDLE: Add tests for pyparse In-Reply-To: <1519055766.11.0.467229070634.issue32874@psf.upfronthosting.co.za> Message-ID: <1519271324.83.0.467229070634.issue32874@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset c84cf6c03fce1fb73bfaf91d7909f1c2708f14a2 by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-32874: IDLE: add tests for pyparse (GH-5755) https://github.com/python/cpython/commit/c84cf6c03fce1fb73bfaf91d7909f1c2708f14a2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 22:48:49 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 22 Feb 2018 03:48:49 +0000 Subject: [issue32874] IDLE: Add tests for pyparse In-Reply-To: <1519055766.11.0.467229070634.issue32874@psf.upfronthosting.co.za> Message-ID: <1519271329.65.0.467229070634.issue32874@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5581 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 22:49:47 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 22 Feb 2018 03:49:47 +0000 Subject: [issue32874] IDLE: Add tests for pyparse In-Reply-To: <1519055766.11.0.467229070634.issue32874@psf.upfronthosting.co.za> Message-ID: <1519271387.49.0.467229070634.issue32874@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5582 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 22:54:49 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 22 Feb 2018 03:54:49 +0000 Subject: [issue32891] Add 'Integer' as synonym for 'Integral' in numbers module. In-Reply-To: <1519191292.27.0.467229070634.issue32891@psf.upfronthosting.co.za> Message-ID: <1519271689.0.0.467229070634.issue32891@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As things stand, given Serhiy comment, I agree. Like others, I don't like 'Integral', but also I don't like clunky special case code. ---------- priority: high -> normal versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 23:09:42 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 22 Feb 2018 04:09:42 +0000 Subject: [issue32874] IDLE: Add tests for pyparse In-Reply-To: <1519055766.11.0.467229070634.issue32874@psf.upfronthosting.co.za> Message-ID: <1519272582.11.0.467229070634.issue32874@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c59bc98fb26ff1a2361f168a97da4a5f6c1e5b43 by Miss Islington (bot) in branch '3.7': bpo-32874: IDLE: add tests for pyparse (GH-5755) https://github.com/python/cpython/commit/c59bc98fb26ff1a2361f168a97da4a5f6c1e5b43 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 23:34:45 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 22 Feb 2018 04:34:45 +0000 Subject: [issue32874] IDLE: Add tests for pyparse In-Reply-To: <1519055766.11.0.467229070634.issue32874@psf.upfronthosting.co.za> Message-ID: <1519274085.29.0.467229070634.issue32874@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 52064c3d8a62c8c14967ec1e004927e9297bb62c by Miss Islington (bot) in branch '3.6': bpo-32874: IDLE: add tests for pyparse (GH-5755) https://github.com/python/cpython/commit/52064c3d8a62c8c14967ec1e004927e9297bb62c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 23:55:21 2018 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 22 Feb 2018 04:55:21 +0000 Subject: [issue32898] [BUILD] Using COUNT_ALLOCS breaks build In-Reply-To: <1519241725.31.0.467229070634.issue32898@psf.upfronthosting.co.za> Message-ID: <1519275321.13.0.467229070634.issue32898@psf.upfronthosting.co.za> Benjamin Peterson added the comment: New changeset 745dc65b17b3936e3f9f4099f735f174d30c4e0c by Benjamin Peterson (Eddie Elizondo) in branch 'master': closes bpo-32898: Fix debug build crash with COUNT_ALLOCS (GH-5800) https://github.com/python/cpython/commit/745dc65b17b3936e3f9f4099f735f174d30c4e0c ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 21 23:56:29 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 22 Feb 2018 04:56:29 +0000 Subject: [issue32898] [BUILD] Using COUNT_ALLOCS breaks build In-Reply-To: <1519241725.31.0.467229070634.issue32898@psf.upfronthosting.co.za> Message-ID: <1519275389.02.0.467229070634.issue32898@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5583 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 00:06:20 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 22 Feb 2018 05:06:20 +0000 Subject: [issue32905] IDLE pyparse: fix initialization and remove unused code Message-ID: <1519275980.67.0.467229070634.issue32905@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- assignee: terry.reedy components: IDLE nosy: terry.reedy priority: normal severity: normal stage: test needed status: open title: IDLE pyparse: fix initialization and remove unused code type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 00:06:47 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 22 Feb 2018 05:06:47 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse In-Reply-To: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> Message-ID: <1519276007.31.0.467229070634.issue32880@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- dependencies: +IDLE pyparse: fix initialization and remove unused code _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 00:12:53 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 22 Feb 2018 05:12:53 +0000 Subject: [issue32905] IDLE pyparse: fix initialization and remove unused code Message-ID: <1519276373.55.0.467229070634.issue32905@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +5584 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 00:27:45 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 22 Feb 2018 05:27:45 +0000 Subject: [issue32905] IDLE pyparse: fix initialization and remove unused code Message-ID: <1519277265.87.0.467229070634.issue32905@psf.upfronthosting.co.za> New submission from Terry J. Reedy : Spinoff from #32880. msg312394: dump duplicates print, except that sys.__stdout__ may be None. msg312395: lastopenbracketpos is now always initialized in _study2, as was stmt_bracketing. get_last_open_bracket_pos is never called. Test are adjusted for removals. ---------- stage: patch review -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 00:44:13 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 22 Feb 2018 05:44:13 +0000 Subject: [issue32898] [BUILD] Using COUNT_ALLOCS breaks build In-Reply-To: <1519241725.31.0.467229070634.issue32898@psf.upfronthosting.co.za> Message-ID: <1519278253.29.0.467229070634.issue32898@psf.upfronthosting.co.za> miss-islington added the comment: New changeset bc2e1104693fd471b96ecac5b2ab4cffa09830ab by Miss Islington (bot) in branch '3.7': closes bpo-32898: Fix debug build crash with COUNT_ALLOCS (GH-5800) https://github.com/python/cpython/commit/bc2e1104693fd471b96ecac5b2ab4cffa09830ab ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 00:54:22 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 22 Feb 2018 05:54:22 +0000 Subject: [issue32905] IDLE: remove unused code in pyparse module In-Reply-To: <1519277265.87.0.467229070634.issue32905@psf.upfronthosting.co.za> Message-ID: <1519278862.52.0.467229070634.issue32905@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- title: IDLE pyparse: fix initialization and remove unused code -> IDLE: remove unused code in pyparse module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 01:19:04 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 22 Feb 2018 06:19:04 +0000 Subject: [issue32905] IDLE: remove unused code in pyparse module In-Reply-To: <1519277265.87.0.467229070634.issue32905@psf.upfronthosting.co.za> Message-ID: <1519280344.57.0.467229070634.issue32905@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 451d1edaf4d27c4e632d81246d308e8dd6ea945f by Terry Jan Reedy in branch 'master': bpo-32905: IDLE - remove unused code in pyparse module (GH-5807) https://github.com/python/cpython/commit/451d1edaf4d27c4e632d81246d308e8dd6ea945f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 01:20:15 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 22 Feb 2018 06:20:15 +0000 Subject: [issue32905] IDLE: remove unused code in pyparse module In-Reply-To: <1519277265.87.0.467229070634.issue32905@psf.upfronthosting.co.za> Message-ID: <1519280415.38.0.467229070634.issue32905@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5585 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 01:21:11 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 22 Feb 2018 06:21:11 +0000 Subject: [issue32905] IDLE: remove unused code in pyparse module In-Reply-To: <1519277265.87.0.467229070634.issue32905@psf.upfronthosting.co.za> Message-ID: <1519280471.98.0.467229070634.issue32905@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5586 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 01:26:34 2018 From: report at bugs.python.org (Varalakshmi) Date: Thu, 22 Feb 2018 06:26:34 +0000 Subject: [issue32906] AttributeError: 'NoneType' object has no attribute 'sendall' Message-ID: <1519280794.48.0.467229070634.issue32906@psf.upfronthosting.co.za> New submission from Varalakshmi : Hi , I have requirement to simulate http server on particular port we have an application which sends req to that simulated server for that port I need to get that request read the request body Validate the request body and send response back to the appln from the simulated server based on the validation I want to do all this in robot framework I'm using BaseHTTPServer module to simulate the server my code is as follows #!/usr/bin/python import sys simulator_server_ip=sys.argv[1] simulator_server_port=sys.argv[2] from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler from SocketServer import ThreadingMixIn import threading class Handler(BaseHTTPRequestHandler): def do_POST(self): print "getting data section" content_len = int(self.headers.getheader('content-length', 0)) self.req_body = self.rfile.read(content_len) return self.req_body def sendresponse_code(self,code): print "response section" self.send_response(code) self.end_headers() message = threading.currentThread().getName() self.wfile.write(message) self.wfile.write('\n') return class ThreadedHTTPServer(ThreadingMixIn, HTTPServer): """Handle requests in a separate thread.""" if __name__ == '__main__': server = ThreadedHTTPServer((simulator_server_ip,int(simulator_server_port)), Handler) req,c_a=server.get_request() hlr=Handler(req,c_a,server.server_address) print hlr.req_body # this is the request body which needs to be validated outside the code resp_code=input("send the code:") # based on the validation I need to send the response which is handled from outside hlr.sendresponse_code(resp_code) when I run the above code , in send_response section it is failing and I'm getting the following error getting data section {"push-message":"json_data_too_many_parameters_so_not_pasting_the_Data"} send the code:200 response section 10.10.30.50 - - [22/Feb/2018 19:14:44] "POST /pushnotification/v1.0/message HTTP/1.1" 200 - Traceback (most recent call last): File "PNS_200Resp.py", line 38, in hlr.sendresponse_code(resp_code) File "PNS_200Resp.py", line 22, in sendresponse_code self.send_response(code) File "/usr/lib64/python2.6/BaseHTTPServer.py", line 383, in send_response (self.protocol_version, code, message)) File "/usr/lib64/python2.6/socket.py", line 324, in write self.flush() File "/usr/lib64/python2.6/socket.py", line 303, in flush self._sock.sendall(buffer(data, write_offset, buffer_size)) AttributeError: 'NoneType' object has no attribute 'sendall' can some one Please check and let me know what is wrong with the code ---------- components: Library (Lib) messages: 312537 nosy: blvaralakshmi at gmail.com priority: normal severity: normal status: open title: AttributeError: 'NoneType' object has no attribute 'sendall' type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 01:41:43 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 22 Feb 2018 06:41:43 +0000 Subject: [issue32905] IDLE: remove unused code in pyparse module In-Reply-To: <1519277265.87.0.467229070634.issue32905@psf.upfronthosting.co.za> Message-ID: <1519281703.22.0.467229070634.issue32905@psf.upfronthosting.co.za> miss-islington added the comment: New changeset dfa1144582e19e5fee2c07e6b7e281da1bef7782 by Miss Islington (bot) in branch '3.7': bpo-32905: IDLE - remove unused code in pyparse module (GH-5807) https://github.com/python/cpython/commit/dfa1144582e19e5fee2c07e6b7e281da1bef7782 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 01:56:24 2018 From: report at bugs.python.org (xitop) Date: Thu, 22 Feb 2018 06:56:24 +0000 Subject: [issue32899] Not documented: key in dict test may raise TypeError In-Reply-To: <1519243283.39.0.467229070634.issue32899@psf.upfronthosting.co.za> Message-ID: <1519282584.9.0.467229070634.issue32899@psf.upfronthosting.co.za> xitop added the comment: While I do fully agree with not documenting all exceptions, I'd like to point out a major difference in the case of "unhashable in dict". It differs from the general case where an exception means the function is unable to return a meaningful result, beacuse it easily COULD return False as its documentation states. The exception is raised by a design decision, not by necessity. That makes it special. A single sentence like "A hashable key is precondition of all dict operations." would explain the behaviour well. That's all I wanted to say. Thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 02:04:07 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 22 Feb 2018 07:04:07 +0000 Subject: [issue32905] IDLE: remove unused code in pyparse module In-Reply-To: <1519277265.87.0.467229070634.issue32905@psf.upfronthosting.co.za> Message-ID: <1519283047.52.0.467229070634.issue32905@psf.upfronthosting.co.za> miss-islington added the comment: New changeset d8e7b98b17cd2cc15b307f54a768c9ca31072b5f by Miss Islington (bot) in branch '3.6': bpo-32905: IDLE - remove unused code in pyparse module (GH-5807) https://github.com/python/cpython/commit/d8e7b98b17cd2cc15b307f54a768c9ca31072b5f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 02:10:11 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 22 Feb 2018 07:10:11 +0000 Subject: [issue32906] AttributeError: 'NoneType' object has no attribute 'sendall' In-Reply-To: <1519280794.48.0.467229070634.issue32906@psf.upfronthosting.co.za> Message-ID: <1519283411.5.0.467229070634.issue32906@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Hi, this is for tracking bugs in the Python interpreter and standard library, not asking for help debugging your own code. There's no reason (yet) to believe this error is a bug in Python, you need to debug it first to ensure it is not a bug in your own code before posting it as a bug here. If you need help debugging your code, try the python-list at python.org mailing list. If you find that it is not a bug in your code, please re-open this issue. ---------- nosy: +steven.daprano resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 02:10:44 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 22 Feb 2018 07:10:44 +0000 Subject: [issue32899] Not documented: key in dict test may raise TypeError In-Reply-To: <1519243283.39.0.467229070634.issue32899@psf.upfronthosting.co.za> Message-ID: <1519283444.5.0.467229070634.issue32899@psf.upfronthosting.co.za> INADA Naoki added the comment: We have it already: https://docs.python.org/3/library/stdtypes.html#mapping-types-dict > A dictionary?s keys are almost arbitrary values. Values that are not hashable, that is, values containing lists, dictionaries or other mutable types (that are compared by value rather than by object identity) may not be used as keys. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 02:31:39 2018 From: report at bugs.python.org (xitop) Date: Thu, 22 Feb 2018 07:31:39 +0000 Subject: [issue32899] Not documented: key in dict test may raise TypeError In-Reply-To: <1519243283.39.0.467229070634.issue32899@psf.upfronthosting.co.za> Message-ID: <1519284699.31.0.467229070634.issue32899@psf.upfronthosting.co.za> xitop added the comment: You are right. It is 'key in d', not 'object in d'. (Thanks for you patience. I'm sorry I did not get it right earlier.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 03:11:12 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 22 Feb 2018 08:11:12 +0000 Subject: [issue32905] IDLE: remove unused code in pyparse module In-Reply-To: <1519277265.87.0.467229070634.issue32905@psf.upfronthosting.co.za> Message-ID: <1519287072.08.0.467229070634.issue32905@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 03:56:56 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 22 Feb 2018 08:56:56 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse In-Reply-To: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> Message-ID: <1519289816.8.0.467229070634.issue32880@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could this code be used in IDLE? For example highlighting the closed/open brace when cursor stay on open/closed brace or shortcuts for "go to open/closed brace"? Many editors have such functionality. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 04:40:02 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Thu, 22 Feb 2018 09:40:02 +0000 Subject: [issue32907] pathlib: test_resolve_common fails on Windows Message-ID: <1519292402.67.0.467229070634.issue32907@psf.upfronthosting.co.za> New submission from Alexey Izbyshev : ====================================================================== FAIL: test_resolve_common (test.test_pathlib.PathTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\workspace\cpython-3.8a\lib\test\test_pathlib.py", line 1538, in test_resolve_common self._check_resolve_relative(p, P(d, 'foo', 'in', 'spam'), False) File "C:\workspace\cpython-3.8a\lib\test\test_pathlib.py", line 1477, in _check_resolve self.assertEqual(q, expected) AssertionError: WindowsPath('C:/Users/longusername/AppData/Local/Temp/tmpbenaiqaa-[ 13 chars]pam') != WindowsPath('C:/Users/LONGUS~1/AppData/Local/Temp/tmpbenaiqaa- dirD/foo/in/spam') ====================================================================== The problem is that the temporary directory path returned by tempfile.mkdtemp() contains the username in "short" (8.3) format, but Path.resolve() converts short names to long ones (thanks to ntpath._getfinalpathname()). Since os.path.realpath() still doesn't resolve symlinks on Windows (#9949, #14094), and users of ntpath._getfinalpathname() have to deal with '\\?\' prefix, I think I'll just use Path.resolve() for the tmp dir path as a workaround. ---------- components: Tests, Windows messages: 312545 nosy: izbyshev, paul.moore, pitrou, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: pathlib: test_resolve_common fails on Windows type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 04:58:20 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Thu, 22 Feb 2018 09:58:20 +0000 Subject: [issue32907] pathlib: test_resolve_common fails on Windows In-Reply-To: <1519292402.67.0.467229070634.issue32907@psf.upfronthosting.co.za> Message-ID: <1519293500.37.0.467229070634.issue32907@psf.upfronthosting.co.za> Change by Alexey Izbyshev : ---------- keywords: +patch pull_requests: +5587 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 05:02:31 2018 From: report at bugs.python.org (felix.engelmann) Date: Thu, 22 Feb 2018 10:02:31 +0000 Subject: [issue32908] decimal ROUND_HALF_UP not according to spec for 9.95 to 10.0 Message-ID: <1519293751.66.0.467229070634.issue32908@psf.upfronthosting.co.za> New submission from felix.engelmann : As described in https://www.python.org/dev/peps/pep-0327/#rounding-algorithms round-half-up: If the discarded digits represent greater than or equal to half (0.5) then the result should be incremented by 1; otherwise the discarded digits are ignored. Rounding 9.95 to 1 decimal with ROUND_HALD_UP results in 9.9 instead of 10.0: Decimal(9.95).quantize(Decimal('1.1'),ROUND_HALF_UP) Out[49]: Decimal('9.9') It does not matter at wich position this rounding with influence on another digit happens: Decimal(9.995).quantize(Decimal('1.11'),ROUND_HALF_UP) Out[50]: Decimal('9.99') It is a specific problem with the 5, because 9.96 works as expected Decimal(9.96).quantize(Decimal('1.1'),ROUND_HALF_UP) Out[40]: Decimal('10.0') System: Python 3.6.4 import decimal decimal.__version__ : '1.70' ---------- components: Library (Lib) messages: 312546 nosy: felix.engelmann priority: normal severity: normal status: open title: decimal ROUND_HALF_UP not according to spec for 9.95 to 10.0 type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 05:12:18 2018 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 22 Feb 2018 10:12:18 +0000 Subject: [issue32908] decimal ROUND_HALF_UP not according to spec for 9.95 to 10.0 In-Reply-To: <1519293751.66.0.467229070634.issue32908@psf.upfronthosting.co.za> Message-ID: <1519294338.56.0.467229070634.issue32908@psf.upfronthosting.co.za> Mark Dickinson added the comment: This isn't a bug. When you do `Decimal(9.95)`, you're converting the binary floating-point number `9.95` to a `Decimal` instance. The conversion is performed exactly, with no change in the value. But the *input* to the conversion, the float `9.95` can't be stored exactly in IEEE 754 binary64 format, so what you end up with is something very slightly smaller. >>> from decimal import Decimal >>> Decimal(9.95) Decimal('9.949999999999999289457264239899814128875732421875') That's the reason that it rounds down. Good practice is to create your Decimal instances from strings rather than floats. >>> Decimal(9.95).quantize(Decimal('1.1'),ROUND_HALF_UP) Decimal('9.9') >>> Decimal('9.95').quantize(Decimal('1.1'),ROUND_HALF_UP) Decimal('10.0') ---------- nosy: +mark.dickinson resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 05:20:54 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 22 Feb 2018 10:20:54 +0000 Subject: [issue29636] Specifying indent in the json.tool command In-Reply-To: <1487880356.98.0.87296874253.issue29636@psf.upfronthosting.co.za> Message-ID: <1519294854.2.0.467229070634.issue29636@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- components: +Library (Lib) -IO versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 05:25:30 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 22 Feb 2018 10:25:30 +0000 Subject: [issue29636] Specifying indent in the json.tool command In-Reply-To: <1487880356.98.0.87296874253.issue29636@psf.upfronthosting.co.za> Message-ID: <1519295130.85.0.467229070634.issue29636@psf.upfronthosting.co.za> INADA Naoki added the comment: I'm OK to options in current pull request. And I think this bike-shedding discussion is not so important to pay our time and energy. Does anyone have strong opinion? If no, I'll merge the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 05:29:10 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 22 Feb 2018 10:29:10 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse In-Reply-To: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> Message-ID: <1519295350.62.0.467229070634.issue32880@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The ()[]{} match manager is in parenmatch.py. It imports Hyperparser, which uses pyparse.Parser. When one types a closer, the corresponding opener is also highlighted and, depending on the configured style, everything in between. Very handy for showing when enough closers have been typed. Edit => Show surrounding parens, ^0 on Windows, which is essentially ^) on US keyboards, highlights out to the nearest pair. One can select one end of a pair by putting the cursor just inside a fence char. (A tk Text cursor is between characters, not on.) I don't think I would like automatic flashes when merely moving the cursor, or maybe I don't understand what you propose. On the hand, moving to the nearest opener to the left or closer to the right could be useful. ^] is already used for indent region, but ^{ and ^} (control-shift-bracket) are available and mnemonic. What shortcuts do you know of? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 05:55:16 2018 From: report at bugs.python.org (cbrnr) Date: Thu, 22 Feb 2018 10:55:16 +0000 Subject: [issue32909] ApplePersistenceIgnoreState warning on macOS Message-ID: <1519296916.2.0.467229070634.issue32909@psf.upfronthosting.co.za> New submission from cbrnr : There seems to be a problem with using certain Python packages and the application resume feature of recent macOS versions. Specifically, whenever I "import matplotlib.plyplot" or run the magic command "%matplotlib" in IPython, I get the following warning message: 2018-02-22 10:35:38.287 Python[4145:281298] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to (null) There's an issue in the matplotlib repo (https://github.com/matplotlib/matplotlib/issues/6242), but I don't think this problem can be fixed by matplotlib. Instead, according to this SO post (https://stackoverflow.com/a/21567601/1112283), the following command fixes the behavior: defaults write org.python.python ApplePersistenceIgnoreState NO Since this problem also comes up with Homebrew, I created an issue (https://github.com/Homebrew/homebrew-core/issues/24424), but the maintainers indicated that (1) this might be a Python issue and should be addressed upstream, and (2) the solution above is not a real fix and the correct behavior should be implemented programmatically by Python itself. ---------- components: macOS messages: 312550 nosy: cbrnr, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: ApplePersistenceIgnoreState warning on macOS type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 06:38:08 2018 From: report at bugs.python.org (Kirill Balunov) Date: Thu, 22 Feb 2018 11:38:08 +0000 Subject: [issue32910] venv: Deactivate.ps1 is not created when Activate.ps1 was used Message-ID: <1519299488.62.0.467229070634.issue32910@psf.upfronthosting.co.za> New submission from Kirill Balunov : There was a related issue, which was closed https://bugs.python.org/issue26715. If virtual environment was activated using Powershell script - Activate.ps1, the Deactivate.ps1 was not created, while the documentation says that it should. "You can deactivate a virtual environment by typing ?deactivate? in your shell. The exact mechanism is platform-specific: for example, the Bash activation script defines a ?deactivate? function, whereas on Windows there are separate scripts called deactivate.bat and Deactivate.ps1 which are installed when the virtual environment is created." Way to reproduce under Windows 10, Python 3.6.4 1. Open elevated Powershell (Administrator access). 2. Activate virtual environment using Activate.ps1. 3. There is no Deactivate.ps1 Also, when the environment was activated with Activate.ps1, `deactivate` will not work. On the other hand, if the environment was activated simply with `activate` (it works) in Powershell, `deactivate` will also work. ---------- components: Windows messages: 312551 nosy: godaygo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: venv: Deactivate.ps1 is not created when Activate.ps1 was used type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 06:49:06 2018 From: report at bugs.python.org (Kirill Balunov) Date: Thu, 22 Feb 2018 11:49:06 +0000 Subject: [issue32910] venv: Deactivate.ps1 is not created when Activate.ps1 was used In-Reply-To: <1519299488.62.0.467229070634.issue32910@psf.upfronthosting.co.za> Message-ID: <1519300146.95.0.467229070634.issue32910@psf.upfronthosting.co.za> Kirill Balunov added the comment: Sorry, `deactivate` works in both cases `Scripts/Activate.ps1` and `Scripts/activate`. Only `Deactivate.ps1` is not created for the former, but the docs says that it should. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 06:49:15 2018 From: report at bugs.python.org (Paul Moore) Date: Thu, 22 Feb 2018 11:49:15 +0000 Subject: [issue32910] venv: Deactivate.ps1 is not created when Activate.ps1 was used In-Reply-To: <1519299488.62.0.467229070634.issue32910@psf.upfronthosting.co.za> Message-ID: <1519300155.68.0.467229070634.issue32910@psf.upfronthosting.co.za> Paul Moore added the comment: As noted in the related issue that you link to, there is not meant to be a deactivate.ps1 script - the deactivate command is provided via a global deactivate function created when you run activate.ps1 (although this is an implementation detail, all that matters is that a "deactivate" command exists, not how it is implemented). The documentation of the implementation-specific behaviour is incorrect, but as it's describing internal implementation details, it shouldn't be relied on anyway. Suggested documentation fix: """ You can deactivate a virtual environment by typing ?deactivate? in your shell. The exact mechanism is platform-specific and is an internal implementation detail (typically a script of shell function will be used). """ ---------- assignee: docs at python -> nosy: -docs at python status: -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 06:49:38 2018 From: report at bugs.python.org (Matthias Urlichs) Date: Thu, 22 Feb 2018 11:49:38 +0000 Subject: [issue32900] Teach pdb to step through asyncio et al. In-Reply-To: <1519248080.49.0.467229070634.issue32900@psf.upfronthosting.co.za> Message-ID: <1519300178.41.0.467229070634.issue32900@psf.upfronthosting.co.za> Matthias Urlichs added the comment: "Example of a problem"? Well, just single-step into, and then back out of, an @asynccontextmanager-decorated function. @asynccontextmanager async def gen(): yield 1234 async def foo(): import pdb;pdb.set_trace() async with gen() as x: assert x == 1234 print("done") trio.run(foo) # asyncio.get_event_loop().run_until_complete(foo()) Let's assume that you want to single step through that context manager. Now count how often you need to press "s" until you arrive at the print statement. With my patch it's 7. Without the patch there are 30 additional steps within the asynccontextmanager. If you need Python 3.6 compatibility and also use @async_generator you need to hit Return ~130 times. That's way too much. Or: let's say you want to step across an await statement that actually goes through a context switch. You hit "n" and see a . With something like my patch, and assuming there's no other context to switch to, hitting "s" gets you back to the current context. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 07:12:45 2018 From: report at bugs.python.org (Kirill Balunov) Date: Thu, 22 Feb 2018 12:12:45 +0000 Subject: [issue32910] venv: Deactivate.ps1 is not created when Activate.ps1 was used In-Reply-To: <1519299488.62.0.467229070634.issue32910@psf.upfronthosting.co.za> Message-ID: <1519301565.12.0.467229070634.issue32910@psf.upfronthosting.co.za> Kirill Balunov added the comment: Yes, I agree, I did not understand the documentation correctly. It seems to me that the problem in the perception arose because of the fact that "deactivate" is not formatted as shell command, while `Deactivate.ps1` and others are. So I think simple formatting will be enough. Also, it is not mentioned in the documentation that it is possible to activate environment in Powershell with "Drive:\> \Scripts\activate", but maybe it's not always true and I have nowhere to check. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 07:20:07 2018 From: report at bugs.python.org (Mark Shannon) Date: Thu, 22 Feb 2018 12:20:07 +0000 Subject: [issue32911] Doc strings omitted from AST Message-ID: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> New submission from Mark Shannon : Python 3.7.0b1+ (heads/3.7:dfa1144, Feb 22 2018, 12:10:59) >>> m = ast.parse("def foo():\n 'help'") >>> m.body[0].body [] Correct behaviour (3.6 or earlier) >>> m = ast.parse("def foo():\n 'help'") >>> m.body[0].body [<_ast.Expr object at 0x7fb9eeb1d4e0>] ---------- components: Library (Lib) keywords: 3.7regression messages: 312557 nosy: Mark.Shannon priority: normal severity: normal status: open title: Doc strings omitted from AST type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 07:28:52 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 22 Feb 2018 12:28:52 +0000 Subject: [issue32911] Doc strings omitted from AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1519302532.37.0.467229070634.issue32911@psf.upfronthosting.co.za> INADA Naoki added the comment: AST is changed slightly from Python 3.7. ast.get_docstring() works for both of 3.6 and 3.7. $ ./python Python 3.8.0a0 (heads/master-dirty:451d1edaf4, Feb 22 2018, 21:11:54) [GCC 7.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import ast >>> m = ast.parse("def foo():\n 'help'") >>> ast.get_docstring(m.body[0]) 'help' ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 07:34:51 2018 From: report at bugs.python.org (Mark Shannon) Date: Thu, 22 Feb 2018 12:34:51 +0000 Subject: [issue32911] Doc strings omitted from AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1519302891.65.0.467229070634.issue32911@psf.upfronthosting.co.za> Mark Shannon added the comment: This is an unnecessary and breaking change. Changes like this should not be made unless necessary to fix a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 07:36:00 2018 From: report at bugs.python.org (Matthias Urlichs) Date: Thu, 22 Feb 2018 12:36:00 +0000 Subject: [issue32900] Teach pdb to step through asyncio et al. In-Reply-To: <1519248080.49.0.467229070634.issue32900@psf.upfronthosting.co.za> Message-ID: <1519302960.56.0.467229070634.issue32900@psf.upfronthosting.co.za> Matthias Urlichs added the comment: *Sigh*. ... if you need Python 3.5 compatibility ... obviously. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 07:39:49 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 22 Feb 2018 12:39:49 +0000 Subject: [issue32911] Doc strings omitted from AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1519303189.03.0.467229070634.issue32911@psf.upfronthosting.co.za> INADA Naoki added the comment: ref: https://bugs.python.org/issue29463 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 07:43:10 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 22 Feb 2018 12:43:10 +0000 Subject: [issue32016] Python 3.6.3 venv FAILURE In-Reply-To: <1510600726.31.0.213398074469.issue32016@psf.upfronthosting.co.za> Message-ID: <1519303390.1.0.467229070634.issue32016@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 07:47:02 2018 From: report at bugs.python.org (Mark Shannon) Date: Thu, 22 Feb 2018 12:47:02 +0000 Subject: [issue32911] Doc strings omitted from AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1519303622.75.0.467229070634.issue32911@psf.upfronthosting.co.za> Mark Shannon added the comment: That issue has to do with bytecode generation, not the AST. The AST should be an accurate representation of the Python source code. Making a better representation of the source would be fine, but this makes it worse. Doc-strings may be semantically distinct from other expressions, but they are syntactically the same. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 07:59:47 2018 From: report at bugs.python.org (Sylvain Marie) Date: Thu, 22 Feb 2018 12:59:47 +0000 Subject: [issue32886] new Boolean ABC in numbers module In-Reply-To: <1519133521.3.0.467229070634.issue32886@psf.upfronthosting.co.za> Message-ID: <1519304387.92.0.467229070634.issue32886@psf.upfronthosting.co.za> Sylvain Marie added the comment: @Mark : the '__invert__' method is out of the game since Josh comment (and my reply https://bugs.python.org/issue32886#msg312478 ) So the remaining operations *are* an abstraction of both python bool and numpy bool_ behaviour (and a minimal representation of boolean logic operations that will seem natural to anyone, don't you think ?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 08:11:07 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 22 Feb 2018 13:11:07 +0000 Subject: [issue32911] Doc strings omitted from AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1519305067.12.0.467229070634.issue32911@psf.upfronthosting.co.za> INADA Naoki added the comment: We implemented AST-level constant folding (#29469) based on the AST change (#29463). I feel it's possible to revert AST change without reverting AST constant folding: * Docstring is exposed from AST before calling AST optimizer. * AST optimizer removes unused constant. But I don't remember how difficult it is because since this change is made one year ago (GH-46)... ---------- nosy: +benjamin.peterson, georg.brandl, rhettinger, serhiy.storchaka, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 08:11:21 2018 From: report at bugs.python.org (INADA Naoki) Date: Thu, 22 Feb 2018 13:11:21 +0000 Subject: [issue32911] Doc strings omitted from AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1519305081.11.0.467229070634.issue32911@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- components: +Interpreter Core -Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 08:15:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 22 Feb 2018 13:15:32 +0000 Subject: [issue32911] Doc strings omitted from AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1519305332.09.0.467229070634.issue32911@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This isn't a bug, but a feature. You no longer need to check and skip the first statement if it is a literal string. The body attribute now always represents a sequence of statements, and the docstring attribute represents a docstring. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 09:13:54 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 22 Feb 2018 14:13:54 +0000 Subject: [issue32857] tkinter after_cancel does not behave correctly when called with id=None In-Reply-To: <1518787214.25.0.467229070634.issue32857@psf.upfronthosting.co.za> Message-ID: <1519308834.67.0.467229070634.issue32857@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I've added the tests for `after` and `after_idle`. I used `update` and `update_idletasks` to make sure they processed. Even scheduling an after event for 0 ms didn't guarantee it would process, but I wasn't sure if there was a better way besides `update` to get it to process? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 09:14:24 2018 From: report at bugs.python.org (Mark Shannon) Date: Thu, 22 Feb 2018 14:14:24 +0000 Subject: [issue32911] Doc strings omitted from AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1519308864.25.0.467229070634.issue32911@psf.upfronthosting.co.za> Mark Shannon added the comment: Stating that "this is a feature not a bug" does not make it so. This breaks existing code and reduces the capabilities of the `ast` module. For example, how does one get the location of the docstring now? >From a syntactic point of view. def foo(): "help" and def foo(): b'"help" barely differ. The S in AST stands for Syntax not Semantics. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 09:30:59 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 22 Feb 2018 14:30:59 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse In-Reply-To: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> Message-ID: <1519309859.95.0.467229070634.issue32880@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Terry, In order to not duplicate effort, are you going to be working on these or is it ok if I look at them? Should all the changes happen in one PR or do you want to break them down? Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 09:42:22 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 22 Feb 2018 14:42:22 +0000 Subject: [issue30449] Improve __slots__ datamodel documentation In-Reply-To: <1495587707.13.0.0998591622446.issue30449@psf.upfronthosting.co.za> Message-ID: <1519310542.2.0.467229070634.issue30449@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Mariatta, Do you think this one needs to be backported? You had originally added the labels on the pull request, then removed them. I wasn't sure if that was needed before being able to close this. Thanks! ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 09:50:13 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 22 Feb 2018 14:50:13 +0000 Subject: [issue26792] docstrings of runpy.run_{module,path} are rather sparse In-Reply-To: <1460944502.67.0.955110104065.issue26792@psf.upfronthosting.co.za> Message-ID: <1519311013.75.0.467229070634.issue26792@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +easy stage: -> needs patch type: -> enhancement versions: +Python 3.7, Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 10:40:08 2018 From: report at bugs.python.org (Sylvain Marie) Date: Thu, 22 Feb 2018 15:40:08 +0000 Subject: [issue32886] new Boolean ABC in numbers module In-Reply-To: <1519133521.3.0.467229070634.issue32886@psf.upfronthosting.co.za> Message-ID: <1519314008.14.0.467229070634.issue32886@psf.upfronthosting.co.za> Change by Sylvain Marie : Added file: https://bugs.python.org/file47457/proposal.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 11:33:18 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 22 Feb 2018 16:33:18 +0000 Subject: [issue32403] date, time and datetime alternate constructors should take fast construction path In-Reply-To: <1513893074.5.0.213398074469.issue32403@psf.upfronthosting.co.za> Message-ID: <1519317198.11.0.574204596225.issue32403@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- pull_requests: +5589 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 11:33:18 2018 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 22 Feb 2018 16:33:18 +0000 Subject: [issue10381] Add timezone support to datetime C API In-Reply-To: <1289415057.12.0.111170767809.issue10381@psf.upfronthosting.co.za> Message-ID: <1519317198.04.0.467229070634.issue10381@psf.upfronthosting.co.za> Change by Paul Ganssle : ---------- pull_requests: +5588 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 12:15:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 22 Feb 2018 17:15:44 +0000 Subject: [issue29636] Specifying indent in the json.tool command In-Reply-To: <1487880356.98.0.87296874253.issue29636@psf.upfronthosting.co.za> Message-ID: <1519319744.08.0.467229070634.issue29636@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't think this PR should be merged. It adds too much options. I think that if one needs more control than the current json.tools command line interface gives, he should use the Python interface. Don't forget, that Python is a programming language. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 12:25:36 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 22 Feb 2018 17:25:36 +0000 Subject: [issue30449] Improve __slots__ datamodel documentation In-Reply-To: <1495587707.13.0.0998591622446.issue30449@psf.upfronthosting.co.za> Message-ID: <1519320336.0.0.467229070634.issue30449@psf.upfronthosting.co.za> Change by Mariatta Wijaya : ---------- stage: patch review -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 12:32:08 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 22 Feb 2018 17:32:08 +0000 Subject: [issue30449] Improve __slots__ datamodel documentation In-Reply-To: <1495587707.13.0.0998591622446.issue30449@psf.upfronthosting.co.za> Message-ID: <1519320728.38.0.467229070634.issue30449@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: We can't auto backport to 2.7 because of conflict. Aaron can you prepare the backport PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 12:28:00 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 22 Feb 2018 17:28:00 +0000 Subject: [issue30449] Improve __slots__ datamodel documentation In-Reply-To: <1495587707.13.0.0998591622446.issue30449@psf.upfronthosting.co.za> Message-ID: <1519320480.81.0.467229070634.issue30449@psf.upfronthosting.co.za> Change by miss-islington : ---------- keywords: +patch pull_requests: +5590 stage: backport needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 12:25:29 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 22 Feb 2018 17:25:29 +0000 Subject: [issue30449] Improve __slots__ datamodel documentation In-Reply-To: <1495587707.13.0.0998591622446.issue30449@psf.upfronthosting.co.za> Message-ID: <1519320329.0.0.467229070634.issue30449@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Yes I think we can backport this to 3.6 and 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 12:34:58 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 22 Feb 2018 17:34:58 +0000 Subject: [issue25427] Remove the pyvenv script in Python 3.8 In-Reply-To: <1445033746.77.0.533143282748.issue25427@psf.upfronthosting.co.za> Message-ID: <1519320898.22.0.467229070634.issue25427@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Ping since we're now on 3.8. :-) ---------- nosy: +csabella stage: -> needs patch type: -> enhancement versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 12:37:43 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 22 Feb 2018 17:37:43 +0000 Subject: [issue30449] Improve __slots__ datamodel documentation In-Reply-To: <1495587707.13.0.0998591622446.issue30449@psf.upfronthosting.co.za> Message-ID: <1519321063.06.0.467229070634.issue30449@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 6eab93cfe5ee08a6168e5bb69474e461cc7ac535 by Mariatta (Miss Islington (bot)) in branch '3.6': bpo-30449: Improve __slots__ documentation (GH-1819) https://github.com/python/cpython/commit/6eab93cfe5ee08a6168e5bb69474e461cc7ac535 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 13:34:57 2018 From: report at bugs.python.org (Emanuel Barry) Date: Thu, 22 Feb 2018 18:34:57 +0000 Subject: [issue32912] Raise non-silent warning for invalid escape sequences Message-ID: <1519324497.82.0.467229070634.issue32912@psf.upfronthosting.co.za> New submission from Emanuel Barry : This is a follow-up to Issue27364. Back in Python 3.6, a silent warning was added for all invalid escape sequences in str and bytes. It was suggested that it would remain a silent warning (which still impacts tests, while not visually annoying the average user) for two releases (3.6 and 3.7), then would be upgraded to a non-silent warning for two subsequent releases (3.8 and 3.9) before becoming a full-on syntax error. With the 3.7 feature freeze on and going, I think it's time to evaluate the approach we take for 3.8 :) I suggest upgrading the DeprecationWarning to a SyntaxWarning, which is visible by default, for 3.8 and 3.9. I have cross-linked #27364 to this issue as well. -Em ---------- components: Interpreter Core messages: 312575 nosy: ebarry priority: normal severity: normal stage: needs patch status: open title: Raise non-silent warning for invalid escape sequences type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 13:36:32 2018 From: report at bugs.python.org (Emanuel Barry) Date: Thu, 22 Feb 2018 18:36:32 +0000 Subject: [issue27364] Deprecate invalid escape sequences in str/bytes In-Reply-To: <1466541260.02.0.320668077341.issue27364@psf.upfronthosting.co.za> Message-ID: <1519324592.16.0.467229070634.issue27364@psf.upfronthosting.co.za> Emanuel Barry added the comment: I have created Issue32912 as a follow-up to this issue for 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 13:39:19 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 22 Feb 2018 18:39:19 +0000 Subject: [issue32556] support bytes paths in nt _getdiskusage, _getvolumepathname, and _getfinalpathname In-Reply-To: <1516029730.24.0.467229070634.issue32556@psf.upfronthosting.co.za> Message-ID: <1519324759.67.0.467229070634.issue32556@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 23ad6d0d1a7a6145a01494f4f3913a63d1f0250c by Steve Dower in branch 'master': bpo-32556: nt._getfinalpathname, nt._getvolumepathname and nt._getdiskusage now correctly convert from bytes. (GH-5761) https://github.com/python/cpython/commit/23ad6d0d1a7a6145a01494f4f3913a63d1f0250c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 13:39:28 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 22 Feb 2018 18:39:28 +0000 Subject: [issue32457] Windows Python cannot handle an early PATH entry containing ".." and python.exe In-Reply-To: <1514660312.79.0.213398074469.issue32457@psf.upfronthosting.co.za> Message-ID: <1519324768.49.0.467229070634.issue32457@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 48e8c82fc63d2ddcddce8aa637a892839b551619 by Steve Dower in branch 'master': bpo-32457: Improves handling of denormalized executable path when launching Python (GH-5756) https://github.com/python/cpython/commit/48e8c82fc63d2ddcddce8aa637a892839b551619 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 13:39:35 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 22 Feb 2018 18:39:35 +0000 Subject: [issue32556] support bytes paths in nt _getdiskusage, _getvolumepathname, and _getfinalpathname In-Reply-To: <1516029730.24.0.467229070634.issue32556@psf.upfronthosting.co.za> Message-ID: <1519324775.68.0.467229070634.issue32556@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5591 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 13:40:22 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 22 Feb 2018 18:40:22 +0000 Subject: [issue32457] Windows Python cannot handle an early PATH entry containing ".." and python.exe In-Reply-To: <1514660312.79.0.213398074469.issue32457@psf.upfronthosting.co.za> Message-ID: <1519324822.9.0.467229070634.issue32457@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5592 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 13:42:44 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 22 Feb 2018 18:42:44 +0000 Subject: [issue32911] Doc strings omitted from AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1519324964.71.0.467229070634.issue32911@psf.upfronthosting.co.za> Ned Deily added the comment: It seems we have a difference of opinion here. Serhiy closed this issue so, Mark, if you feel strongly enough to pursue it, you should reopen it and solicit other opinions. The clock has just about run out to change the now current behavior for 3.7.0. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 13:37:24 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 22 Feb 2018 18:37:24 +0000 Subject: [issue32901] Update Windows 3.7/8 builds to tcl/tk 8.6.8 In-Reply-To: <1519248415.02.0.467229070634.issue32901@psf.upfronthosting.co.za> Message-ID: <1519324644.72.0.467229070634.issue32901@psf.upfronthosting.co.za> Steve Dower added the comment: Yay, more work... (btw Zach, nothing stopping you from putting the sources up for me :) I just need to hit the buttons to make the build.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 13:47:40 2018 From: report at bugs.python.org (ppperry) Date: Thu, 22 Feb 2018 18:47:40 +0000 Subject: [issue32900] Teach pdb to step through asyncio et al. In-Reply-To: <1519248080.49.0.467229070634.issue32900@psf.upfronthosting.co.za> Message-ID: <1519325260.41.0.467229070634.issue32900@psf.upfronthosting.co.za> ppperry added the comment: This feature already exists and doesn't need to be reimplemented; use `pdb.Pdb(skip={"trio", "contextlib", ...}).run(...)`, and in any case should be disableable. I don't use asyncio, but happen to have a habit of running pdb through the standard library for no reason and don't want to have that option taken away. ---------- nosy: +ppperry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 13:49:26 2018 From: report at bugs.python.org (ppperry) Date: Thu, 22 Feb 2018 18:49:26 +0000 Subject: [issue32900] Teach pdb to step through asyncio et al. In-Reply-To: <1519248080.49.0.467229070634.issue32900@psf.upfronthosting.co.za> Message-ID: <1519325366.23.0.467229070634.issue32900@psf.upfronthosting.co.za> ppperry added the comment: Just to be clear, I'm not opposing having the default value for `skip` be something other than the empty set, but it should be overridable, and the default should include some other things this patch omits, like `importlib._bootstrap(_external)?` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 13:50:17 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 22 Feb 2018 18:50:17 +0000 Subject: [issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8 In-Reply-To: <1519248415.02.0.467229070634.issue32901@psf.upfronthosting.co.za> Message-ID: <1519325417.66.0.467229070634.issue32901@psf.upfronthosting.co.za> Ned Deily added the comment: Yeah, we should do that for the macOS installers as well. ---------- components: +macOS nosy: +ned.deily, ronaldoussoren priority: normal -> release blocker title: Update Windows 3.7/8 builds to tcl/tk 8.6.8 -> Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 13:53:14 2018 From: report at bugs.python.org (Daniel Himmelstein) Date: Thu, 22 Feb 2018 18:53:14 +0000 Subject: [issue18943] argparse: default args in mutually exclusive groups In-Reply-To: <1378458002.17.0.371205806782.issue18943@psf.upfronthosting.co.za> Message-ID: <1519325594.27.0.467229070634.issue18943@psf.upfronthosting.co.za> Change by Daniel Himmelstein : ---------- pull_requests: +5593 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 13:53:59 2018 From: report at bugs.python.org (Zachary Ware) Date: Thu, 22 Feb 2018 18:53:59 +0000 Subject: [issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8 In-Reply-To: <1519248415.02.0.467229070634.issue32901@psf.upfronthosting.co.za> Message-ID: <1519325639.57.0.467229070634.issue32901@psf.upfronthosting.co.za> Zachary Ware added the comment: True :). I'll get the sources up if I get a chance to do it before you do. (Anyone else can feel free to take a crack at it as well, see https://github.com/python/cpython-source-deps/blob/master/README.rst for instructions that should hopefully work :)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 14:02:14 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 22 Feb 2018 19:02:14 +0000 Subject: [issue32556] support bytes paths in nt _getdiskusage, _getvolumepathname, and _getfinalpathname In-Reply-To: <1516029730.24.0.467229070634.issue32556@psf.upfronthosting.co.za> Message-ID: <1519326134.34.0.467229070634.issue32556@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 01dd52fb29566893dde59dea7bca582625c04762 by Miss Islington (bot) in branch '3.7': bpo-32556: nt._getfinalpathname, nt._getvolumepathname and nt._getdiskusage now correctly convert from bytes. (GH-5761) https://github.com/python/cpython/commit/01dd52fb29566893dde59dea7bca582625c04762 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 14:12:26 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 22 Feb 2018 19:12:26 +0000 Subject: [issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8 In-Reply-To: <1519248415.02.0.467229070634.issue32901@psf.upfronthosting.co.za> Message-ID: <1519326746.69.0.467229070634.issue32901@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I'll give it a shot. :-) ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 14:15:19 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 22 Feb 2018 19:15:19 +0000 Subject: [issue32457] Windows Python cannot handle an early PATH entry containing ".." and python.exe In-Reply-To: <1514660312.79.0.213398074469.issue32457@psf.upfronthosting.co.za> Message-ID: <1519326919.14.0.467229070634.issue32457@psf.upfronthosting.co.za> miss-islington added the comment: New changeset e5a9b3574c89a070fbc43caf541759f504e3d492 by Miss Islington (bot) in branch '3.7': bpo-32457: Improves handling of denormalized executable path when launching Python (GH-5756) https://github.com/python/cpython/commit/e5a9b3574c89a070fbc43caf541759f504e3d492 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 14:20:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 22 Feb 2018 19:20:53 +0000 Subject: [issue32912] Raise non-silent warning for invalid escape sequences In-Reply-To: <1519324497.82.0.467229070634.issue32912@psf.upfronthosting.co.za> Message-ID: <1519327253.91.0.467229070634.issue32912@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +ncoghlan, r.david.murray, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 14:24:41 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 22 Feb 2018 19:24:41 +0000 Subject: [issue32911] Doc strings omitted from AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1519327481.16.0.467229070634.issue32911@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It may be worth to include docstrings explicitly in the grammar. ---------- resolution: fixed -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 14:26:08 2018 From: report at bugs.python.org (Matthias Urlichs) Date: Thu, 22 Feb 2018 19:26:08 +0000 Subject: [issue32900] Teach pdb to step through asyncio et al. In-Reply-To: <1519248080.49.0.467229070634.issue32900@psf.upfronthosting.co.za> Message-ID: <1519327568.78.0.467229070634.issue32900@psf.upfronthosting.co.za> Matthias Urlichs added the comment: Ah. Thank you for pointing me to that feature, I completely missed it. The proposed enhancement thus boils down to "implement a couple of pdb commands to display and modify this skip list". I'm +1 on keeping the default empty. When you're already in the debugger, mired in the guts of an intractable bug, restarting it all just to set up a skip list isn't sufficient. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 14:27:45 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 22 Feb 2018 19:27:45 +0000 Subject: [issue32457] Windows Python cannot handle an early PATH entry containing ".." and python.exe In-Reply-To: <1514660312.79.0.213398074469.issue32457@psf.upfronthosting.co.za> Message-ID: <1519327665.03.0.467229070634.issue32457@psf.upfronthosting.co.za> Change by Steve Dower : ---------- pull_requests: +5594 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 14:29:48 2018 From: report at bugs.python.org (ppperry) Date: Thu, 22 Feb 2018 19:29:48 +0000 Subject: [issue32900] Teach pdb to step through asyncio et al. In-Reply-To: <1519248080.49.0.467229070634.issue32900@psf.upfronthosting.co.za> Message-ID: <1519327788.32.0.467229070634.issue32900@psf.upfronthosting.co.za> Change by ppperry : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 14:32:40 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 22 Feb 2018 19:32:40 +0000 Subject: [issue32909] ApplePersistenceIgnoreState warning on macOS In-Reply-To: <1519296916.2.0.467229070634.issue32909@psf.upfronthosting.co.za> Message-ID: <1519327960.14.0.467229070634.issue32909@psf.upfronthosting.co.za> Ned Deily added the comment: I don't know much about this but it seems to be due to the application Resume feature added in OS X 10.7 and has to do with the persistence of application windows. Python itself does not create any such windows; they are created by the GUI toolkits used in Python applications, like Tk (used by the standard library tkinter) or other third-party modules that interface to other toolkits (PyQT, PyObjC, etc). I took a quick look and didn't see any application bundle keys that could be added to the Python.app Info.plist to disable persistence globally in a Python framework build and, even if there were one, I'm not sure that is desirable. Perhaps the best way is for each tool kit to do it. Ronald, anyone else: have any suggestions? https://developer.apple.com/library/content/documentation/DataManagement/Conceptual/DocBasedAppProgrammingGuideForOSX/StandardBehaviors/StandardBehaviors.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 14:39:47 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 22 Feb 2018 19:39:47 +0000 Subject: [issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8 In-Reply-To: <1519248415.02.0.467229070634.issue32901@psf.upfronthosting.co.za> Message-ID: <1519328387.93.0.467229070634.issue32901@psf.upfronthosting.co.za> Steve Dower added the comment: I'm already most of the way through doing the sources this time - just running into ssh/GitHub troubles getting them online. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 15:10:00 2018 From: report at bugs.python.org (Joshua Li) Date: Thu, 22 Feb 2018 20:10:00 +0000 Subject: [issue32913] Improve regular expression HOWTO Message-ID: <1519330200.78.0.467229070634.issue32913@psf.upfronthosting.co.za> New submission from Joshua Li : "Python HOWTOs are documents that cover a single, specific topic, and attempt to cover it fairly completely." It would be quite helpful if the section "non-capturing-and-named-groups" in the regex HOWTO contained at least a mention and short usage example of the re.match.groupdict method, something I have found to be pythonic and useful, yet it does not appear frequently in the docs. I will be submitting a PR for this. ---------- assignee: docs at python components: Documentation messages: 312592 nosy: JoshuaRLi, docs at python priority: normal severity: normal status: open title: Improve regular expression HOWTO type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 15:26:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 22 Feb 2018 20:26:25 +0000 Subject: [issue32838] Fix Python versions in the table of magic numbers In-Reply-To: <1518520184.53.0.467229070634.issue32838@psf.upfronthosting.co.za> Message-ID: <1519331185.57.0.467229070634.issue32838@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 4af8fd561433826ac897c55e41a087a5c5dbacf3 by Serhiy Storchaka in branch 'master': bpo-32838: Fix Python versions in the table of magic numbers. (#5658) https://github.com/python/cpython/commit/4af8fd561433826ac897c55e41a087a5c5dbacf3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 15:27:35 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 22 Feb 2018 20:27:35 +0000 Subject: [issue32838] Fix Python versions in the table of magic numbers In-Reply-To: <1518520184.53.0.467229070634.issue32838@psf.upfronthosting.co.za> Message-ID: <1519331255.41.0.467229070634.issue32838@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5595 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 15:28:20 2018 From: report at bugs.python.org (miss-islington) Date: Thu, 22 Feb 2018 20:28:20 +0000 Subject: [issue10381] Add timezone support to datetime C API In-Reply-To: <1289415057.12.0.111170767809.issue10381@psf.upfronthosting.co.za> Message-ID: <1519331300.82.0.467229070634.issue10381@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5596 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 15:32:56 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 22 Feb 2018 20:32:56 +0000 Subject: [issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8 In-Reply-To: <1519248415.02.0.467229070634.issue32901@psf.upfronthosting.co.za> Message-ID: <1519331576.64.0.467229070634.issue32901@psf.upfronthosting.co.za> Steve Dower added the comment: Still working on this - X11 and the WinSDK aren't playing nicely together. I might need a special build configuration to build this, or to submit fixes (and apply patches) to Tk. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 15:33:18 2018 From: report at bugs.python.org (Steve Dower) Date: Thu, 22 Feb 2018 20:33:18 +0000 Subject: [issue32457] Windows Python cannot handle an early PATH entry containing ".." and python.exe In-Reply-To: <1514660312.79.0.213398074469.issue32457@psf.upfronthosting.co.za> Message-ID: <1519331598.34.0.467229070634.issue32457@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 1d3c518c5ecbd78478738f068f4f035f81f035f9 by Steve Dower in branch '3.6': bpo-32457: Improves handling of denormalized executable path when launching Python (GH-5756) (#5818) https://github.com/python/cpython/commit/1d3c518c5ecbd78478738f068f4f035f81f035f9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 15:41:49 2018 From: report at bugs.python.org (Joshua Li) Date: Thu, 22 Feb 2018 20:41:49 +0000 Subject: [issue32913] Improve regular expression HOWTO In-Reply-To: <1519330200.78.0.467229070634.issue32913@psf.upfronthosting.co.za> Message-ID: <1519332109.46.0.467229070634.issue32913@psf.upfronthosting.co.za> Change by Joshua Li : ---------- keywords: +patch pull_requests: +5597 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 16:33:32 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 22 Feb 2018 21:33:32 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1519335212.92.0.467229070634.issue17611@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 520b7ae27e39d1c77ea74ccd1b184d7cb43f9dcb by Serhiy Storchaka in branch 'master': bpo-17611. Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. (GH-5006) https://github.com/python/cpython/commit/520b7ae27e39d1c77ea74ccd1b184d7cb43f9dcb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 16:44:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 22 Feb 2018 21:44:24 +0000 Subject: [issue32489] Allow 'continue' in 'finally' clause In-Reply-To: <1515013867.94.0.467229070634.issue32489@psf.upfronthosting.co.za> Message-ID: <1519335864.06.0.467229070634.issue32489@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +5599 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 17:09:32 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 22 Feb 2018 22:09:32 +0000 Subject: [issue17232] Improve -O docs In-Reply-To: <1361255101.21.0.948205073894.issue17232@psf.upfronthosting.co.za> Message-ID: <1519337372.0.0.467229070634.issue17232@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Should I make a pull request for Terry's last patch? ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 17:22:04 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 22 Feb 2018 22:22:04 +0000 Subject: [issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8 In-Reply-To: <1519248415.02.0.467229070634.issue32901@psf.upfronthosting.co.za> Message-ID: <1519338124.96.0.467229070634.issue32901@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Is "this will only be useful on Windows," in the source-deps readme still true? It appears that the tcl/tk tar.gz source is meant for Mac also. (IE, has Xcode project files.) https://tcl.tk/software/tcltk/download.html Looking ahead, there is an 8.7a1 release. I am hoping that 8.7 will be available for our 3.8, as it should include a rewritten Text widget that, among other things, will fix the slow long lines problem. Do we wait for 8.7 final or do we start testing and, if necessary, adapting _tkinter and tkinter with, say, their .b1? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 17:32:40 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 22 Feb 2018 22:32:40 +0000 Subject: [issue18356] help(numpy) causes segfault on exit In-Reply-To: <1372924520.77.0.111539946992.issue18356@psf.upfronthosting.co.za> Message-ID: <1519338760.61.0.467229070634.issue18356@psf.upfronthosting.co.za> Cheryl Sabella added the comment: It appears that the suggested change from SO was implemented under issue23374 and issue23792. I cannot recreate this on Ubuntu 16.04, so closing as resolved. ---------- assignee: docs at python -> nosy: +csabella resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 17:45:01 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 22 Feb 2018 22:45:01 +0000 Subject: [issue17232] Improve -O docs In-Reply-To: <1361255101.21.0.948205073894.issue17232@psf.upfronthosting.co.za> Message-ID: <1519339501.38.0.467229070634.issue17232@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Cheryl: yes, with changes in responses to Ezio's review. Nick or Antoine: has there been any change to meaning of -O or -OO that I am not remembering? ---------- versions: +Python 3.6, Python 3.7, Python 3.8 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 18:06:32 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 22 Feb 2018 23:06:32 +0000 Subject: [issue19412] Add docs for test.support.requires_docstrings decorator In-Reply-To: <1382809267.31.0.380635405032.issue19412@psf.upfronthosting.co.za> Message-ID: <1519340791.99.0.467229070634.issue19412@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I added `HAVE_DOCSTRINGS`,`MISSING_C_DOCSTRINGS`, `requires_docstring` to the test.support documentation under issue11015. Additional changes to those three have been made under issue32843, so I am closing this issue in favor of issue32843. Please comment on that PR if the wording still needs to be adjusted. Thanks! ---------- nosy: +csabella resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> More revisions to test.support docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 18:11:18 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 22 Feb 2018 23:11:18 +0000 Subject: [issue26018] documentation of ZipFile file name encoding In-Reply-To: <1452038801.7.0.594053315947.issue26018@psf.upfronthosting.co.za> Message-ID: <1519341078.24.0.467229070634.issue26018@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +easy versions: +Python 3.7, Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 18:21:44 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 22 Feb 2018 23:21:44 +0000 Subject: [issue30935] document the new behavior of get_event_loop() in Python 3.6 In-Reply-To: <1500084221.73.0.556830879215.issue30935@psf.upfronthosting.co.za> Message-ID: <1519341704.86.0.467229070634.issue30935@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- stage: needs patch -> patch review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 18:21:15 2018 From: report at bugs.python.org (=?utf-8?q?Stig-=C3=98rjan_Smelror?=) Date: Thu, 22 Feb 2018 23:21:15 +0000 Subject: [issue32914] python3-config --ldflags gives a CMP0004 error due to a whitespace Message-ID: <1519341675.65.0.467229070634.issue32914@psf.upfronthosting.co.za> New submission from Stig-?rjan Smelror : Hi. I bumped into an interesting compilation issue when I was compiling ecFlow with Python 3 support. It turns out that python3-config --ldflags gave me this: " -L/usr/lib64 -lpython3.6m -lpthread -ldl -lutil -lm -Xlinker -export-dynamic" This caused a CMP0004 error due to the space before -L. With this patch applied, the command gives me: "-L/usr/lib64 -lpython3.6m -lpthread -ldl -lutil -lm -Xlinker -export-dynamic" Attached is the patch I made to fix this issue. It's as simple as moving $LIBPLUSED one place so that -L$libdir is first. ---------- components: Library (Lib) files: python3-3.6.2-python3-config-LIBPLUSED-cmp0004-error.patch keywords: patch messages: 312602 nosy: kekePower priority: normal severity: normal status: open title: python3-config --ldflags gives a CMP0004 error due to a whitespace type: compile error versions: Python 3.6 Added file: https://bugs.python.org/file47458/python3-3.6.2-python3-config-LIBPLUSED-cmp0004-error.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 18:34:05 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 22 Feb 2018 23:34:05 +0000 Subject: [issue25170] 3.4.4, 3.4.5, 3.5.0, 3.5.1, 3.5.2 documentation archives missing In-Reply-To: <1442601694.39.0.291720811899.issue25170@psf.upfronthosting.co.za> Message-ID: <1519342445.04.0.467229070634.issue25170@psf.upfronthosting.co.za> Cheryl Sabella added the comment: It appears that all the docs from the issue title (and the subsequent releases) exist on https://www.python.org/ftp/python/doc/ now, except that the 3.5.0 ones are for alpha releases instead of the final. Larry mentioned that in msg271236. Not sure if fixing that is something that can still be done or if this issue can be closed as resolved? Thanks! ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 18:41:55 2018 From: report at bugs.python.org (Trey Hunner) Date: Thu, 22 Feb 2018 23:41:55 +0000 Subject: [issue32915] Running Python 2 with -3 flag doesn't complain about cmp/__cmp__ Message-ID: <1519342915.53.0.467229070634.issue32915@psf.upfronthosting.co.za> New submission from Trey Hunner : I might be misunderstanding the use of the -3 flag, but it seems like cmp() and __cmp__ should result in warnings being displayed. ---------- components: 2to3 (2.x to 3.x conversion tool) files: caseless.py messages: 312604 nosy: trey priority: normal severity: normal status: open title: Running Python 2 with -3 flag doesn't complain about cmp/__cmp__ versions: Python 2.7 Added file: https://bugs.python.org/file47459/caseless.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 19:16:09 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 23 Feb 2018 00:16:09 +0000 Subject: [issue9635] Add Py_BREAKPOINT and sys._breakpoint hooks In-Reply-To: <1282175005.37.0.905894818052.issue9635@psf.upfronthosting.co.za> Message-ID: <1519344969.67.0.467229070634.issue9635@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Did PEP553 make this issue obsolete? ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 19:51:13 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 23 Feb 2018 00:51:13 +0000 Subject: [issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8 In-Reply-To: <1519248415.02.0.467229070634.issue32901@psf.upfronthosting.co.za> Message-ID: <1519347073.65.0.467229070634.issue32901@psf.upfronthosting.co.za> Change by Steve Dower : ---------- keywords: +patch pull_requests: +5600 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 19:56:01 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 23 Feb 2018 00:56:01 +0000 Subject: [issue32916] IDLE: change 'str' to 'code' in idlelib.pyparse.PyParse and users Message-ID: <1519347361.47.0.467229070634.issue32916@psf.upfronthosting.co.za> New submission from Terry J. Reedy : Change 'str' to 'code' in pyparse and code that uses it. 'str' conflicts with the built-in name and it too general for 'the block of python code being processed'. 'code' is what the string is. The change applies to local 'str', 'self.str' references, and the 'set_str' method. The latter requires renames in other modules. From grep: F:\dev\3x\lib\idlelib\editor.py: 1305: y.set_str(rawtext) F:\dev\3x\lib\idlelib\editor.py: 1319: y.set_str(rawtext) F:\dev\3x\lib\idlelib\hyperparser.py: 47: parser.set_str(text.get(startatindex, stopatindex)+' \n') F:\dev\3x\lib\idlelib\hyperparser.py: 63: parser.set_str(text.get(startatindex, stopatindex)+' \n') editor imports pyparse and calls Parser once in y = pyparse.Parser... and never references y.str hyperparser imports pyparse and calls Parser once in parser = pyparse.Parser... and does reference the modifies parser.str once in line 67 self.rawtext = parser.str[:-2] set_str is not called within pyparse itself The existing pyparse tests are sufficient for pyparse since they execute every line containig 'str'. The hyperparser test covers the above lines in Hyperparser.__init__, but test_editor covers almost nothing and would miss the editor lines. The two files access various methods and the editor code, the C_ constants, so I am not inclined to change names that are not so actively obnoxious. Since this will impact other pyparse changes, I think it should be next. Cheryl, respond here if you want to do the PR. ---------- assignee: terry.reedy components: IDLE messages: 312606 nosy: csabella, terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: change 'str' to 'code' in idlelib.pyparse.PyParse and users versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 19:59:58 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 23 Feb 2018 00:59:58 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse In-Reply-To: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> Message-ID: <1519347598.63.0.467229070634.issue32880@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Please go ahead, but coordinate. This issue contains miscellaneous pyparse issues that I thought of while reviewing the tests, plus Serhiy's idea. There should be multiple PRs on dependency issues (which might have more than one closely related PR). #32905 and now #32916 are examples. If you open a spinoff, I will assume that you are working on a PR. ---------- dependencies: +IDLE: change 'str' to 'code' in idlelib.pyparse.PyParse and users _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 20:29:50 2018 From: report at bugs.python.org (TitanSnow) Date: Fri, 23 Feb 2018 01:29:50 +0000 Subject: [issue32917] ConfigParser writes a superfluous final blank line Message-ID: <1519349390.35.0.467229070634.issue32917@psf.upfronthosting.co.za> New submission from TitanSnow : ``ConfigParser.write()`` writes a superfluous final blank line. Example:: import configparser cp = configparser.ConfigParser() cp['section1'] = {'key': 'value'} cp['section2'] = {'key': 'value'} with open('configparser.ini', 'w') as f: cp.write(f) The output file 'configparser.ini' will be:: (I added line number) 1 [section1] 2 key = value 3 4 [section2] 5 key = value 6 with a superfluous final blank line. Compare to ``GLib.KeyFile``:: import gi gi.require_version('GLib', '2.0') from gi.repository import GLib kf = GLib.KeyFile() kf.set_string('section1', 'key', 'value') kf.set_string('section2', 'key', 'value') kf.save_to_file('glib.ini') The output file 'glib.ini' will be:: (I added line number) 1 [section1] 2 key=value 3 4 [section2] 5 key=value without a superfluous final blank line. ---------- components: Library (Lib) files: final_blank_line.patch keywords: patch messages: 312608 nosy: tttnns priority: normal severity: normal status: open title: ConfigParser writes a superfluous final blank line type: behavior Added file: https://bugs.python.org/file47460/final_blank_line.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 20:37:44 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 23 Feb 2018 01:37:44 +0000 Subject: [issue30028] make test.support.temp_cwd() fork-safe In-Reply-To: <1491768025.09.0.83114690073.issue30028@psf.upfronthosting.co.za> Message-ID: <1519349864.81.0.467229070634.issue30028@psf.upfronthosting.co.za> Gregory P. Smith added the comment: New changeset 33dddac00ba8d9b72cf21b8698504077eb3c23ad by Gregory P. Smith (Anselm Kruis) in branch 'master': bpo-30028: make test.support.temp_cwd() fork-safe (GH-1066) https://github.com/python/cpython/commit/33dddac00ba8d9b72cf21b8698504077eb3c23ad ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 20:38:51 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 23 Feb 2018 01:38:51 +0000 Subject: [issue30028] make test.support.temp_cwd() fork-safe In-Reply-To: <1491768025.09.0.83114690073.issue30028@psf.upfronthosting.co.za> Message-ID: <1519349931.07.0.467229070634.issue30028@psf.upfronthosting.co.za> Change by miss-islington : ---------- keywords: +patch pull_requests: +5601 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 20:54:10 2018 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 23 Feb 2018 01:54:10 +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: <1519350850.65.0.467229070634.issue32912@psf.upfronthosting.co.za> Nick Coghlan added the comment: +1 for the DeprecationWarning->SyntaxWarning->SyntaxError approach from me (especially as 3.7 will make the existing deprecation warning visible in interactive shells and __main__ modules by default). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 21:00:01 2018 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 23 Feb 2018 02:00:01 +0000 Subject: [issue17232] Improve -O docs In-Reply-To: <1361255101.21.0.948205073894.issue17232@psf.upfronthosting.co.za> Message-ID: <1519351201.29.0.467229070634.issue17232@psf.upfronthosting.co.za> Nick Coghlan added the comment: We don't change the extension on optimised pyc files any more, we add an optimisation marker to the name without changing the file extension: https://www.python.org/dev/peps/pep-0488/ (This means `-O` and `-OO` don't tread on each other any more) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 21:10:53 2018 From: report at bugs.python.org (ruffsl) Date: Fri, 23 Feb 2018 02:10:53 +0000 Subject: [issue20928] xml.etree.ElementInclude does not include nested xincludes In-Reply-To: <1394829606.55.0.5394943571.issue20928@psf.upfronthosting.co.za> Message-ID: <1519351853.7.0.467229070634.issue20928@psf.upfronthosting.co.za> ruffsl added the comment: > Included file paths should be collected only along an inclusion path and not across independent subtrees. Yes, well put. > Maybe we should add a "max_depth" parameter to limit the maximum recursion depth, defaulting to e.g. 5, that users would have to pass in order to say "I know what I'm doing". Could that be set to false by the user, just in case we don't know beforehand how deep the rabbit hole goes, but we're feeling overly committed to see it through? Not to detract from the ticket, but I'd just like to share to a question related to this topic about the expected behavior of Xinclude [1]. You could also see it as a use case example for the recursive import feature we are currently deciding, of which would help avoid one more non system library to workaround [2]. [1] https://stackoverflow.com/q/48857647/2577586 [2] https://github.com/ComArmor/comarmor/blob/856dd339b090c28e86206d4d6af0fac050618e74/comarmor/__init__.py#L116 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 22:41:55 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 23 Feb 2018 03:41:55 +0000 Subject: [issue32918] IDLE: make smart indent after comment line consistent Message-ID: <1519357315.65.0.467229070634.issue32918@psf.upfronthosting.co.za> New submission from Terry J. Reedy : https://docs.python.org/3/reference/lexical_analysis.html#blank-lines says "A logical line that contains only spaces, tabs, formfeeds and possibly a comment, is ignored" but notes that REPLs might not ignore them during interactive input. The same is true of editors as lines are typed. In particular, even a no-code comment line can suggest where a smart indenter should indent. In any case, Python does not care what follows '#', and IDLE should not either (except when uncommenting-out lines). Suppose one types the following: if 1: if 2: print(3) # #x # x Currently, IDLE indents 4 columns after '#' and '# x' and 8 columns after '#x'. If one moves the comments to the margin, the indents are 0 and 8 columns. This is because pyparse.Parser._study2 ignores lines that match _junkre and _junkre only matches comments with '#' followed by a non-space (/B) character. I think that IDLE should generally assume that the comment starts on a legal column and that the comment will apply to the next line typed, which will have the same indent, and that the lack of space after '#' (there have been many such in idlelib) is preference, indifference, or error. The only exception relevant to IDLE is '##' inserted at the beginning of code lines to (temporarily) make them ignored. If one places the cursor at the end of such a line and hits return to insert new lines, some indent is likely wanted if the line above is indented. Matching '##.*\n' is easy enough. Note that smart indent always uses the line above, if there is one, because there typically is not one below, and if there is, either choice is arbitrary and being smarter would cost time. (This should be in revised doc.) ---------- messages: 312613 nosy: csabella, terry.reedy priority: normal severity: normal stage: test needed status: open title: IDLE: make smart indent after comment line consistent type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 22:43:25 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 23 Feb 2018 03:43:25 +0000 Subject: [issue32918] IDLE: make smart indent after comment line consistent In-Reply-To: <1519357315.65.0.467229070634.issue32918@psf.upfronthosting.co.za> Message-ID: <1519357405.56.0.467229070634.issue32918@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +5602 stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 22:54:11 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 23 Feb 2018 03:54:11 +0000 Subject: [issue32918] IDLE: make smart indent after comment line consistent In-Reply-To: <1519357315.65.0.467229070634.issue32918@psf.upfronthosting.co.za> Message-ID: <1519358051.61.0.467229070634.issue32918@psf.upfronthosting.co.za> Terry J. Reedy added the comment: So I am proposing _junkre = re.compile(r"(?:[ \t]*|##.*)\n").match with test change to match. ---------- assignee: -> terry.reedy components: +IDLE stage: patch review -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 23:50:38 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 23 Feb 2018 04:50:38 +0000 Subject: [issue32917] ConfigParser writes a superfluous final blank line In-Reply-To: <1519349390.35.0.467229070634.issue32917@psf.upfronthosting.co.za> Message-ID: <1519361438.0.0.467229070634.issue32917@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Its not a superfluous blank line. It is standard convention for Unix tools to end text files (of which ini files are a kind of text file) with a final newline \n. There are various reasons for this, but it doesn't matter what those reasons are, the important thing is that it is (or at least, ought to be) intentional for the ini file to end with a \n. It is not an error for the file to end with one (or more) blank lines, regardless of the platform; it is more convenient for all lines to a \n delimiter, rather than making the last line special. I do not believe there is any good reason to complicate the code and the API with an unnecessary "trim_final_blankline" parameter, but even if there is a good reason, the default would have to be False to remain backwards compatible. Unless you have a good reason why it should be considered an error for the INI file to end in a blank, this patch should be rejected, and instead we should have an explicit test to ensure that the INI file is always written with a final blank. (Of course, when *reading* INI files, it should accept them either with or without final blank.) ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 23:54:21 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 23 Feb 2018 04:54:21 +0000 Subject: [issue32917] ConfigParser writes a superfluous final blank line In-Reply-To: <1519349390.35.0.467229070634.issue32917@psf.upfronthosting.co.za> Message-ID: <1519361661.79.0.467229070634.issue32917@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Oh, I forgot... even if it is decided that this trim_final_blankline parameter was desirable, the patch isn't sufficient to be accepted. You would need to also supply documentation and tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 22 23:55:23 2018 From: report at bugs.python.org (Pavel Shpilev) Date: Fri, 23 Feb 2018 04:55:23 +0000 Subject: [issue32919] csv.reader() to support QUOTE_ALL Message-ID: <1519361723.9.0.467229070634.issue32919@psf.upfronthosting.co.za> New submission from Pavel Shpilev : It appears that in current implementation csv.QUOTE_ALL has no effect on csv. reader(), it only affects csv.writer(). I know that csv is a poorly defined format and all, but I think this might be useful to distinguish None and '' values for the sources that use such quoting. Example: "1","Noneval",,"9" "2","Emptystr","","10" "3","somethingelse","","8" Reader converts all values in the third column to empty strings. The suggestion is to adjust reader's behaviour so when quoting=csv.QUOTE_ALL that would instruct reader to convert empty values (like the one in the first row) to None instead. ---------- components: Extension Modules messages: 312617 nosy: Pavel Shpilev priority: normal severity: normal status: open title: csv.reader() to support QUOTE_ALL type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 00:39:10 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 23 Feb 2018 05:39:10 +0000 Subject: [issue30028] make test.support.temp_cwd() fork-safe In-Reply-To: <1491768025.09.0.83114690073.issue30028@psf.upfronthosting.co.za> Message-ID: <1519364350.27.0.467229070634.issue30028@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 694c5e0e1f7f23595fab314f26b89e241477ff18 by Miss Islington (bot) in branch '3.7': bpo-30028: make test.support.temp_cwd() fork-safe (GH-1066) https://github.com/python/cpython/commit/694c5e0e1f7f23595fab314f26b89e241477ff18 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 01:34:18 2018 From: report at bugs.python.org (TitanSnow) Date: Fri, 23 Feb 2018 06:34:18 +0000 Subject: [issue32917] ConfigParser writes a superfluous final blank line In-Reply-To: <1519349390.35.0.467229070634.issue32917@psf.upfronthosting.co.za> Message-ID: <1519367657.99.0.467229070634.issue32917@psf.upfronthosting.co.za> TitanSnow added the comment: **It's not final newline \n !** Maybe what I said confused. The "final blank line" does not mean the "final newline char". It means an extra blank line after last line. It might be clearer to represent it in a string:: '[section1]\nkey = value\n\n[section2]\nkey = value\n\n' It has *two* \n at end. I think it should be only one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 01:44:28 2018 From: report at bugs.python.org (Eryk Sun) Date: Fri, 23 Feb 2018 06:44:28 +0000 Subject: [issue32920] Implement PEP 529 for os.getcwdb on Windows Message-ID: <1519368268.76.0.467229070634.issue32920@psf.upfronthosting.co.za> New submission from Eryk Sun : When reviewing issue 32904 I noticed that os.getcwdb still calls the CRT _getcwd function. Apparently this was overlooked when implementing PEP 529. For example: >>> os.getcwd() 'C:\\Temp\\Lang\\????' >>> os.getcwdb() b'C:\\Temp\\Lang\\a\xdf?d' Not only is the encoding wrong, but because the CRT uses GetFullPathNameA (the CRT's implementation of _getcwd is convoluted, IMO), the call fails if the current directory exceeds MAX_PATH. Python 3.6+ on Windows 10 otherwise supports long paths. ---------- components: Library (Lib), Unicode, Windows messages: 312620 nosy: eryksun, ezio.melotti, paul.moore, steve.dower, tim.golden, vstinner, zach.ware priority: normal severity: normal stage: needs patch status: open title: Implement PEP 529 for os.getcwdb on Windows type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 03:23:45 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 23 Feb 2018 08:23:45 +0000 Subject: [issue32909] ApplePersistenceIgnoreState warning on macOS In-Reply-To: <1519296916.2.0.467229070634.issue32909@psf.upfronthosting.co.za> Message-ID: <1519374225.65.0.467229070634.issue32909@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The ApplePersistenceIgnoreState setting (either in user defaults or an info.plist file) is IMHO not the right solution, as this is a setting intended to be used for testing (see ) I don't have time to research this fully at this time, but expect that this is something that should be fixed in GUI libraries (or possibly matplotlib). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 04:22:13 2018 From: report at bugs.python.org (TitanSnow) Date: Fri, 23 Feb 2018 09:22:13 +0000 Subject: [issue32917] ConfigParser writes a superfluous final blank line In-Reply-To: <1519349390.35.0.467229070634.issue32917@psf.upfronthosting.co.za> Message-ID: <1519377733.51.0.467229070634.issue32917@psf.upfronthosting.co.za> TitanSnow added the comment: Patch updated, included documentation and tests. ---------- Added file: https://bugs.python.org/file47461/bpo-32917.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 04:24:39 2018 From: report at bugs.python.org (TitanSnow) Date: Fri, 23 Feb 2018 09:24:39 +0000 Subject: [issue32917] ConfigParser writes a superfluous final blank line In-Reply-To: <1519349390.35.0.467229070634.issue32917@psf.upfronthosting.co.za> Message-ID: <1519377879.21.0.467229070634.issue32917@psf.upfronthosting.co.za> Change by TitanSnow : Removed file: https://bugs.python.org/file47460/final_blank_line.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 04:44:01 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 23 Feb 2018 09:44:01 +0000 Subject: [issue32916] IDLE: change 'str' to 'code' in idlelib.pyparse.PyParse and users In-Reply-To: <1519347361.47.0.467229070634.issue32916@psf.upfronthosting.co.za> Message-ID: <1519379041.07.0.467229070634.issue32916@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Yes, I agree. I'll start working on this one first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 04:57:53 2018 From: report at bugs.python.org (Louis Lecaroz) Date: Fri, 23 Feb 2018 09:57:53 +0000 Subject: [issue32304] Upload failed (400): Digests do not match on .tar.gz ending with x0d binary code In-Reply-To: <1513180109.43.0.213398074469.issue32304@psf.upfronthosting.co.za> Message-ID: <1519379873.04.0.467229070634.issue32304@psf.upfronthosting.co.za> Louis Lecaroz added the comment: Hi, First of all, thank you so much for having fixed this bug, I checked in 3.5 & it seems that this fix needs to be also backport in 3.5 branch & certainly others branches (like 3.4) ? Thx in advance for your coming feedback Best regards Louis ---------- nosy: +llecaroz versions: +Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 05:16:55 2018 From: report at bugs.python.org (Mark Shannon) Date: Fri, 23 Feb 2018 10:16:55 +0000 Subject: [issue32911] Doc strings omitted from AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1519381015.03.0.467229070634.issue32911@psf.upfronthosting.co.za> Mark Shannon added the comment: Serhiy, thanks for reopening this issue. It seems to be that there are three reasonable choices: 1. Revert to 3.6 behaviour, with the addition of `docstring` attribute. 2. Change the docstring attribute to an AST node, possibly by modifying the grammar. 3. Do nothing. I would prefer 1, as it requires no changes to 3rd party code and doesn't present an additional obstacle when porting from Python 2. 2 would be acceptable, as it allows tools to easily convert the body back to its 3.6 form (or vice-versa) 3 is a pain as it involves re-tokenizing the file to get the location of the doc-string. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 05:34:02 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Fri, 23 Feb 2018 10:34:02 +0000 Subject: [issue32920] Implement PEP 529 for os.getcwdb on Windows In-Reply-To: <1519368268.76.0.467229070634.issue32920@psf.upfronthosting.co.za> Message-ID: <1519382042.06.0.467229070634.issue32920@psf.upfronthosting.co.za> Change by Alexey Izbyshev : ---------- nosy: +izbyshev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 05:56:04 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 23 Feb 2018 10:56:04 +0000 Subject: [issue32759] multiprocessing.Array do not release shared memory In-Reply-To: <1517692462.01.0.467229070634.issue32759@psf.upfronthosting.co.za> Message-ID: <1519383364.28.0.467229070634.issue32759@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, this is because the multiprocessing Heap object never releases any unused arena objects, so the shared memory you allocate will probably stay allocated until the process tree ends. It is possible to change the strategy to delete unused arenas, though it's unsure whether doing so has adverse consequences (such as making later allocations costlier). It may make sense to only reclaim the larger arenas (larger than 1MB perhaps?). ---------- versions: +Python 3.8 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 05:57:25 2018 From: report at bugs.python.org (Anselm Kruis) Date: Fri, 23 Feb 2018 10:57:25 +0000 Subject: [issue30028] make test.support.temp_cwd() fork-safe In-Reply-To: <1491768025.09.0.83114690073.issue30028@psf.upfronthosting.co.za> Message-ID: <1519383445.78.0.467229070634.issue30028@psf.upfronthosting.co.za> Change by Anselm Kruis : ---------- pull_requests: +5603 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 05:59:56 2018 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 23 Feb 2018 10:59:56 +0000 Subject: [issue32886] new Boolean ABC in numbers module In-Reply-To: <1519133521.3.0.467229070634.issue32886@psf.upfronthosting.co.za> Message-ID: <1519383596.69.0.467229070634.issue32886@psf.upfronthosting.co.za> Mark Dickinson added the comment: > and a minimal representation of boolean logic operations that will seem natural to anyone, don't you think ? I'm afraid I don't. :-( Issue 1: this ABC doesn't seem a good match for Python bools. If I have a bool-like object in a piece of code, my main expectations of that object would be that (a) it can be interpreted in a boolean context (e.g., the condition of an if statement, a while statement, an if-else expression, a std. lib. call that expects a bool, etc.), and (b) it can be combined with other bool-likes via `and`, `or` and `not`. All I need for (a) and (b) to work is that `__bool__` is defined. The *bitwise* operations provided by `__and__`, `__or__` and friends are irrelevant for these purposes, and for Python's bool they exist mainly because bool is a subclass of int, and not to provide logical boolean operations. (NumPy's take on this is a bit different, because of the issues involved with interpreting an array of booleans in boolean context.) Issue 2: an interface that includes `|`, `&` and `^` but not `~` seems incomplete. If I *am* aiming to do bitwise operations with an object (as opposed to logical operations) then I'd probably expect `~` to be present. (Admittedly, there are cases that support `|`, `^` and `&` but not `~`, like sets.) Perhaps there's a place for an interface that declares that an object supports the *bitwise* operators: `|`, `&`, `^` and `~`. We *do* have more than one concrete class here that would implement such an interface: Python's integer types, NumPy's integer types, NumPy's `bool_` type, potentially other things that resemble fixed-length bit-strings (like IP addresses or collections of flags). But I wouldn't call such an interface "Boolean", and wouldn't expect Python's built-in bool type to be registered as supporting that interface. So overall, call me -1 on this proposal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 06:01:59 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 23 Feb 2018 11:01:59 +0000 Subject: [issue32759] multiprocessing.Array do not release shared memory In-Reply-To: <1517692462.01.0.467229070634.issue32759@psf.upfronthosting.co.za> Message-ID: <1519383719.42.0.467229070634.issue32759@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It is also possible to uncommit the memory without deallocating it, making reuse potentially faster, but that requires low-level platform-specific code (e.g. madvise(MADV_DONTNEED) on Linux or DiscardVirtualMemory() on Windows). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 06:09:18 2018 From: report at bugs.python.org (Anselm Kruis) Date: Fri, 23 Feb 2018 11:09:18 +0000 Subject: [issue30028] make test.support.temp_cwd() fork-safe In-Reply-To: <1491768025.09.0.83114690073.issue30028@psf.upfronthosting.co.za> Message-ID: <1519384158.22.0.467229070634.issue30028@psf.upfronthosting.co.za> Change by Anselm Kruis : ---------- pull_requests: +5604 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 06:19:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 23 Feb 2018 11:19:43 +0000 Subject: [issue32911] Doc strings omitted from AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1519384783.9.0.467229070634.issue32911@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I prefer 2 or 3. There are benefits from representing a docstring as a separate attribute. This simplifies the code for walking the AST tree (no longer special cases for skipping docstring in modules, classes and functions) and the code for retrieving a docstring. It solves the problem that an expression resulting to a constant string (like "a"+"b" or f"a") shouldn't be interpreted as docstrings. The position of a docstring can be useful for determining the position of fragments inside a docstring (for example for doctests). Several active developed third-party libraries (like pyflakes, see https://github.com/PyCQA/pyflakes/pull/273) already updated their code for supporting 3.7. The position of nodes preceding or following a docstring could be used. This is not perfect, it doesn't work with empty lines before or after docstring, but it never was perfect due to escaped newlines in string literals and line continuations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 06:22:49 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 23 Feb 2018 11:22:49 +0000 Subject: [issue32759] multiprocessing.Array do not release shared memory In-Reply-To: <1517692462.01.0.467229070634.issue32759@psf.upfronthosting.co.za> Message-ID: <1519384969.88.0.467229070634.issue32759@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- keywords: +patch pull_requests: +5605 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 06:29:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 23 Feb 2018 11:29:44 +0000 Subject: [issue32911] Doc strings omitted from AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1519385384.55.0.467229070634.issue32911@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Note, that getting the location of the dostring already was a pain since in case of multiline string literals CPython saves the location of the last line, and PyPy saves the location of the first line. Getting the location of the specific fragment of the docstring is even larger pain as shown in following examples: def f() """ >>> f() """ def f() """\ >>> f() """ def f() ""\ ""\ ">>> f()"\ ""\ "" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 06:35:44 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 23 Feb 2018 11:35:44 +0000 Subject: [issue31355] Remove Travis CI macOS job: rely on buildbots In-Reply-To: <1504653881.76.0.488933881504.issue31355@psf.upfronthosting.co.za> Message-ID: <1519385744.86.0.467229070634.issue31355@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The situation with macOS builds on Travis-CI is now much better (no more long waiting queues) so we might revisit this decision. ---------- status: closed -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 06:47:21 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 23 Feb 2018 11:47:21 +0000 Subject: [issue32087] deprecated-removed directive generates overlapping msgids in .pot files In-Reply-To: <1511187880.98.0.213398074469.issue32087@psf.upfronthosting.co.za> Message-ID: <1519386441.39.0.467229070634.issue32087@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 0febc053736112d7bb9081742b3ac0ece7b973e7 by INADA Naoki (cocoatomo) in branch 'master': bpo-32087: Doc: Make "deprecated-removed" directive translatable (GH-4473) https://github.com/python/cpython/commit/0febc053736112d7bb9081742b3ac0ece7b973e7 ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 06:48:28 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 23 Feb 2018 11:48:28 +0000 Subject: [issue32087] deprecated-removed directive generates overlapping msgids in .pot files In-Reply-To: <1511187880.98.0.213398074469.issue32087@psf.upfronthosting.co.za> Message-ID: <1519386508.29.0.467229070634.issue32087@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5606 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 06:50:27 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 23 Feb 2018 11:50:27 +0000 Subject: [issue32087] deprecated-removed directive generates overlapping msgids in .pot files In-Reply-To: <1511187880.98.0.213398074469.issue32087@psf.upfronthosting.co.za> Message-ID: <1519386627.65.0.467229070634.issue32087@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5607 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 07:08:47 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 23 Feb 2018 12:08:47 +0000 Subject: [issue32087] deprecated-removed directive generates overlapping msgids in .pot files In-Reply-To: <1511187880.98.0.213398074469.issue32087@psf.upfronthosting.co.za> Message-ID: <1519387727.83.0.467229070634.issue32087@psf.upfronthosting.co.za> miss-islington added the comment: New changeset c673a62d5f3c650130bf40f2161a2eac64419bce by Miss Islington (bot) in branch '3.7': bpo-32087: Doc: Make "deprecated-removed" directive translatable (GH-4473) https://github.com/python/cpython/commit/c673a62d5f3c650130bf40f2161a2eac64419bce ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 07:13:17 2018 From: report at bugs.python.org (INADA Naoki) Date: Fri, 23 Feb 2018 12:13:17 +0000 Subject: [issue32087] deprecated-removed directive generates overlapping msgids in .pot files In-Reply-To: <1511187880.98.0.213398074469.issue32087@psf.upfronthosting.co.za> Message-ID: <1519387997.15.0.467229070634.issue32087@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 07:14:06 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 23 Feb 2018 12:14:06 +0000 Subject: [issue32087] deprecated-removed directive generates overlapping msgids in .pot files In-Reply-To: <1511187880.98.0.213398074469.issue32087@psf.upfronthosting.co.za> Message-ID: <1519388046.44.0.467229070634.issue32087@psf.upfronthosting.co.za> miss-islington added the comment: New changeset dd52d5c868fb1eb33bcf22e777317de0391bfaf6 by Miss Islington (bot) in branch '3.6': bpo-32087: Doc: Make "deprecated-removed" directive translatable (GH-4473) https://github.com/python/cpython/commit/dd52d5c868fb1eb33bcf22e777317de0391bfaf6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 07:36:55 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 23 Feb 2018 12:36:55 +0000 Subject: [issue32916] IDLE: change 'str' to 'code' in idlelib.pyparse.PyParse and users In-Reply-To: <1519347361.47.0.467229070634.issue32916@psf.upfronthosting.co.za> Message-ID: <1519389415.52.0.467229070634.issue32916@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +5608 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 08:03:18 2018 From: report at bugs.python.org (Einar Fredriksen) Date: Fri, 23 Feb 2018 13:03:18 +0000 Subject: [issue32921] .pth files cannot contain folders with utf-8 names Message-ID: <1519390998.11.0.467229070634.issue32921@psf.upfronthosting.co.za> New submission from Einar Fredriksen : Add "G:\??????? ????" to a pth file and start python. it fails with -------------- Failed to import the site module Traceback (most recent call last): File "C:\Program Files\ROXAR\RMS dev_release\windows-amd64-vc_14_0-release\bin\lib\site.py", line 546, in main() File "C:\Program Files\ROXAR\RMS dev_release\windows-amd64-vc_14_0-release\bin\lib\site.py", line 532, in main known_paths = addusersitepackages(known_paths) File "C:\Program Files\ROXAR\RMS dev_release\windows-amd64-vc_14_0-release\bin\lib\site.py", line 287, in addusersitepackages addsitedir(user_site, known_paths) File "C:\Program Files\ROXAR\RMS dev_release\windows-amd64-vc_14_0-release\bin\lib\site.py", line 209, in addsitedir addpackage(sitedir, name, known_paths) File "C:\Program Files\ROXAR\RMS dev_release\windows-amd64-vc_14_0-release\bin\lib\site.py", line 165, in addpackage for n, line in enumerate(f): File "C:\Program Files\ROXAR\RMS dev_release\windows-amd64-vc_14_0-release\bin\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 8: character maps to ---------------- This might very well have sideeffects, but adding "encoding='utf-8'" to the open() call in site.py def addpackage seems to fix the issue for me ---------- components: Unicode messages: 312635 nosy: einaren, ezio.melotti, vstinner priority: normal severity: normal status: open title: .pth files cannot contain folders with utf-8 names type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 10:11:08 2018 From: report at bugs.python.org (Josh Friend) Date: Fri, 23 Feb 2018 15:11:08 +0000 Subject: [issue32922] dbm.open() encodes filename with default encoding rather than the filesystem encoding Message-ID: <1519398668.71.0.467229070634.issue32922@psf.upfronthosting.co.za> New submission from Josh Friend : Armin Rigo from the PyPy project pointed this out to me: https://bitbucket.org/pypy/pypy/issues/2755/dbmopen-expects-a-str-for-filename-throws This could probably lead to some weird behavior given the right filename ---------- components: Library (Lib) messages: 312636 nosy: Josh Friend priority: normal severity: normal status: open title: dbm.open() encodes filename with default encoding rather than the filesystem encoding type: behavior versions: Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 10:20:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 23 Feb 2018 15:20:47 +0000 Subject: [issue32922] dbm.open() encodes filename with default encoding rather than the filesystem encoding In-Reply-To: <1519398668.71.0.467229070634.issue32922@psf.upfronthosting.co.za> Message-ID: <1519399247.74.0.467229070634.issue32922@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 10:30:13 2018 From: report at bugs.python.org (=?utf-8?b?0KLQuNC80L7RhNC10Lkg0KXQuNGA0YzRj9C90L7Qsg==?=) Date: Fri, 23 Feb 2018 15:30:13 +0000 Subject: [issue32923] Typo in documentation of unittest: whilst instead of while Message-ID: <1519399813.0.0.467229070634.issue32923@psf.upfronthosting.co.za> New submission from ??????? ???????? : Typo is on the https://docs.python.org/3/library/unittest.html page. At bottom of the page you can see text: "unittest.removeHandler(function=None) When called without arguments this function removes the control-c handler if it has been installed. This function can also be used as a test decorator to temporarily remove the handler whilst the test is being executed:" Typo is: ST instead of E in the word "whilst". ---------- assignee: docs at python components: Documentation messages: 312637 nosy: docs at python, ??????? ???????? priority: normal severity: normal status: open title: Typo in documentation of unittest: whilst instead of while versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 10:35:19 2018 From: report at bugs.python.org (ppperry) Date: Fri, 23 Feb 2018 15:35:19 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1519400119.04.0.467229070634.issue32911@psf.upfronthosting.co.za> Change by ppperry : ---------- title: Doc strings omitted from AST -> Doc strings no longer stored in body of AST _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 11:20:50 2018 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 23 Feb 2018 16:20:50 +0000 Subject: [issue32923] Typo in documentation of unittest: whilst instead of while In-Reply-To: <1519399813.0.0.467229070634.issue32923@psf.upfronthosting.co.za> Message-ID: <1519402850.53.0.467229070634.issue32923@psf.upfronthosting.co.za> Mark Dickinson added the comment: Not a typo: it's a valid English word. http://dictionary.cambridge.org/grammar/british-grammar/linking-words-and-expressions/while-and-whilst ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 11:23:25 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 23 Feb 2018 16:23:25 +0000 Subject: [issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8 In-Reply-To: <1519248415.02.0.467229070634.issue32901@psf.upfronthosting.co.za> Message-ID: <1519403005.66.0.467229070634.issue32901@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5609 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 11:25:19 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 23 Feb 2018 16:25:19 +0000 Subject: [issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8 In-Reply-To: <1519248415.02.0.467229070634.issue32901@psf.upfronthosting.co.za> Message-ID: <1519403119.44.0.467229070634.issue32901@psf.upfronthosting.co.za> Steve Dower added the comment: The sources are just the original sources, so they could be useful on other platforms too. The build on cpython-bin-deps is obviously only useful on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 11:27:30 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 23 Feb 2018 16:27:30 +0000 Subject: [issue30028] make test.support.temp_cwd() fork-safe In-Reply-To: <1491768025.09.0.83114690073.issue30028@psf.upfronthosting.co.za> Message-ID: <1519403250.26.0.467229070634.issue30028@psf.upfronthosting.co.za> Gregory P. Smith added the comment: New changeset 61bd4d2e6319a3c5c3b9ce5f807b44a45cc1d4a1 by Gregory P. Smith (Anselm Kruis) in branch '2.7': [2.7] bpo-30028: make test.support.temp_cwd() fork-safe (GH-1066) (GH-5825) https://github.com/python/cpython/commit/61bd4d2e6319a3c5c3b9ce5f807b44a45cc1d4a1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 11:27:56 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 23 Feb 2018 16:27:56 +0000 Subject: [issue30028] make test.support.temp_cwd() fork-safe In-Reply-To: <1491768025.09.0.83114690073.issue30028@psf.upfronthosting.co.za> Message-ID: <1519403276.58.0.467229070634.issue30028@psf.upfronthosting.co.za> Gregory P. Smith added the comment: New changeset 9c819a6a7d34594779fea3a25fd69ec5745e185e by Gregory P. Smith (Anselm Kruis) in branch '3.6': [3.6] bpo-30028: make test.support.temp_cwd() fork-safe (GH-1066) (GH-5826) https://github.com/python/cpython/commit/9c819a6a7d34594779fea3a25fd69ec5745e185e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 11:28:33 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 23 Feb 2018 16:28:33 +0000 Subject: [issue30028] make test.support.temp_cwd() fork-safe In-Reply-To: <1491768025.09.0.83114690073.issue30028@psf.upfronthosting.co.za> Message-ID: <1519403313.48.0.467229070634.issue30028@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- resolution: -> fixed stage: patch review -> commit review status: open -> closed versions: +Python 2.7, Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 11:22:12 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 23 Feb 2018 16:22:12 +0000 Subject: [issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8 In-Reply-To: <1519248415.02.0.467229070634.issue32901@psf.upfronthosting.co.za> Message-ID: <1519402932.42.0.467229070634.issue32901@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset efa6c762268d68985f3012234f62ea9e5ced8b7c by Steve Dower in branch 'master': bpo-32901: Update Tcl and Tk versions to 8.6.8 (GH-5823) https://github.com/python/cpython/commit/efa6c762268d68985f3012234f62ea9e5ced8b7c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 11:44:29 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 23 Feb 2018 16:44:29 +0000 Subject: [issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8 In-Reply-To: <1519248415.02.0.467229070634.issue32901@psf.upfronthosting.co.za> Message-ID: <1519404269.63.0.467229070634.issue32901@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 74b73642596caa287ee59bf7901ca009606c24cc by Miss Islington (bot) in branch '3.7': bpo-32901: Update Tcl and Tk versions to 8.6.8 (GH-5823) https://github.com/python/cpython/commit/74b73642596caa287ee59bf7901ca009606c24cc ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 11:49:41 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 23 Feb 2018 16:49:41 +0000 Subject: [issue32923] Typo in documentation of unittest: whilst instead of while In-Reply-To: <1519399813.0.0.467229070634.issue32923@psf.upfronthosting.co.za> Message-ID: <1519404581.75.0.467229070634.issue32923@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: `while` and `whilst` are both valid english words, however I can understand if readers who don't primarily speak english can get confused. I'll be open to change that to `while` just to make it friendlier to international readers. ---------- nosy: +Mariatta versions: +Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 11:57:38 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 23 Feb 2018 16:57:38 +0000 Subject: [issue32924] Python 3.7 docs in docs.p.o points to GitHub's master branch Message-ID: <1519405058.43.0.467229070634.issue32924@psf.upfronthosting.co.za> New submission from Mariatta Wijaya : When viewing Python 3.7 docs in docs.python.org, the show source link is pointing to the master branch on GitHub. It should point to the 3.7 branch. I'm working on a fix, however this is something to we should remember doing when we go to 3.9+. Adding Python 3.8 and 3.9's release manager :) ---------- assignee: Mariatta components: Documentation messages: 312645 nosy: Mariatta, lukasz.langa priority: normal severity: normal status: open title: Python 3.7 docs in docs.p.o points to GitHub's master branch versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 12:06:20 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 23 Feb 2018 17:06:20 +0000 Subject: [issue25427] Remove the pyvenv script in Python 3.8 In-Reply-To: <1445033746.77.0.533143282748.issue25427@psf.upfronthosting.co.za> Message-ID: <1519405580.45.0.467229070634.issue25427@psf.upfronthosting.co.za> Brett Cannon added the comment: Oh, I haven't forgotten. :) This issue is the only one I have assigned to myself and been looking forward to ripping it out for over 2 years (might not get to it until the sprints at PyCon US, but I will definitely be ripping it out). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 12:07:10 2018 From: report at bugs.python.org (Brett Cannon) Date: Fri, 23 Feb 2018 17:07:10 +0000 Subject: [issue31355] Remove Travis CI macOS job: rely on buildbots In-Reply-To: <1504653881.76.0.488933881504.issue31355@psf.upfronthosting.co.za> Message-ID: <1519405630.32.0.467229070634.issue31355@psf.upfronthosting.co.za> Brett Cannon added the comment: I'm willing to give it another go. Do you want to open a PR to turn it back on and see how the timing looks, Antoine? ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 12:09:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 23 Feb 2018 17:09:49 +0000 Subject: [issue32922] dbm.open() encodes filename with default encoding rather than the filesystem encoding In-Reply-To: <1519398668.71.0.467229070634.issue32922@psf.upfronthosting.co.za> Message-ID: <1519405789.35.0.467229070634.issue32922@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 12:11:41 2018 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 23 Feb 2018 17:11:41 +0000 Subject: [issue32923] Typo in documentation of unittest: whilst instead of while In-Reply-To: <1519399813.0.0.467229070634.issue32923@psf.upfronthosting.co.za> Message-ID: <1519405901.16.0.467229070634.issue32923@psf.upfronthosting.co.za> Eric V. Smith added the comment: Agree with Marietta: it's valid, but lets change it to make it more approachable to non-native speakers. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 12:14:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 23 Feb 2018 17:14:01 +0000 Subject: [issue32922] dbm.open() encodes filename with default encoding rather than the filesystem encoding In-Reply-To: <1519398668.71.0.467229070634.issue32922@psf.upfronthosting.co.za> Message-ID: <1519406041.3.0.467229070634.issue32922@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +5610 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 12:18:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 23 Feb 2018 17:18:05 +0000 Subject: [issue32922] dbm.open() encodes filename with default encoding rather than the filesystem encoding In-Reply-To: <1519398668.71.0.467229070634.issue32922@psf.upfronthosting.co.za> Message-ID: <1519406285.28.0.467229070634.issue32922@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 5832 fixes dbm.ndbm.open() and dbm.gdbm.open(). dbm.dumb.open() already used the filesystem encoding. I don't think anything should be fixed in 2.7. Supporting Unicode filenames looks like a new feature. ---------- versions: +Python 3.7, Python 3.8 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 12:21:45 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 23 Feb 2018 17:21:45 +0000 Subject: [issue32923] Typo in documentation of unittest: whilst instead of while In-Reply-To: <1519399813.0.0.467229070634.issue32923@psf.upfronthosting.co.za> Message-ID: <1519406505.08.0.467229070634.issue32923@psf.upfronthosting.co.za> Change by Mariatta Wijaya : ---------- keywords: +patch pull_requests: +5611 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 12:23:43 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 23 Feb 2018 17:23:43 +0000 Subject: [issue32924] Python 3.7 docs in docs.p.o points to GitHub's master branch In-Reply-To: <1519405058.43.0.467229070634.issue32924@psf.upfronthosting.co.za> Message-ID: <1519406623.63.0.467229070634.issue32924@psf.upfronthosting.co.za> Change by Mariatta Wijaya : ---------- keywords: +patch pull_requests: +5612 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 12:24:46 2018 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 23 Feb 2018 17:24:46 +0000 Subject: [issue32923] Typo in documentation of unittest: whilst instead of while In-Reply-To: <1519399813.0.0.467229070634.issue32923@psf.upfronthosting.co.za> Message-ID: <1519406686.67.0.467229070634.issue32923@psf.upfronthosting.co.za> Mark Dickinson added the comment: > lets change it to make it more approachable to non-native speakers. Sounds good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 12:43:39 2018 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 23 Feb 2018 17:43:39 +0000 Subject: [issue20928] xml.etree.ElementInclude does not include nested xincludes In-Reply-To: <1394829606.55.0.5394943571.issue20928@psf.upfronthosting.co.za> Message-ID: <1519407819.52.0.467229070634.issue20928@psf.upfronthosting.co.za> Stefan Behnel added the comment: I've added a 'max_depth' argument to limit the maximum recursive include depth to 6 by default (which is a small, arbitrarily chosen value). Users can set it to None to disable the limit. >From my side, I don't see any more features that I would add. @ruffsl: feel free to open a new ticket if you feel like anything is missing that is not covered by the scope of this one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 12:43:47 2018 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 23 Feb 2018 17:43:47 +0000 Subject: [issue32820] Add __format__ method to ipaddress In-Reply-To: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: <1519407827.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Eric V. Smith added the comment: I'd like 's' to be supported, and just be passed to format(str(self), fmt) (or some alternate spelling for the same thing). My use case is to format tables including addresses: print(f'{addr:20s} {hostname}') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 12:51:15 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 23 Feb 2018 17:51:15 +0000 Subject: [issue32923] Typo in documentation of unittest: whilst instead of while In-Reply-To: <1519399813.0.0.467229070634.issue32923@psf.upfronthosting.co.za> Message-ID: <1519408275.83.0.467229070634.issue32923@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 98f42aac23f3863973cb6e9964c5212cfd3a1d98 by Mariatta in branch 'master': bpo-32923: Unittest doc: replace `whilst` with `while` (GH-5833) https://github.com/python/cpython/commit/98f42aac23f3863973cb6e9964c5212cfd3a1d98 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 12:52:00 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 23 Feb 2018 17:52:00 +0000 Subject: [issue32820] Add __format__ method to ipaddress In-Reply-To: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: <1519408320.54.0.467229070634.issue32820@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: You always can use f'{addr!s:20}'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 12:52:28 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 23 Feb 2018 17:52:28 +0000 Subject: [issue32923] Typo in documentation of unittest: whilst instead of while In-Reply-To: <1519399813.0.0.467229070634.issue32923@psf.upfronthosting.co.za> Message-ID: <1519408348.5.0.467229070634.issue32923@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5613 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 12:53:22 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 23 Feb 2018 17:53:22 +0000 Subject: [issue32923] Typo in documentation of unittest: whilst instead of while In-Reply-To: <1519399813.0.0.467229070634.issue32923@psf.upfronthosting.co.za> Message-ID: <1519408402.56.0.467229070634.issue32923@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5614 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 12:54:23 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 23 Feb 2018 17:54:23 +0000 Subject: [issue32923] Typo in documentation of unittest: whilst instead of while In-Reply-To: <1519399813.0.0.467229070634.issue32923@psf.upfronthosting.co.za> Message-ID: <1519408463.66.0.467229070634.issue32923@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5615 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 13:02:26 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 23 Feb 2018 18:02:26 +0000 Subject: [issue17232] Improve -O docs In-Reply-To: <1361255101.21.0.948205073894.issue17232@psf.upfronthosting.co.za> Message-ID: <1519408946.58.0.467229070634.issue17232@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- pull_requests: +5616 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 13:02:32 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 23 Feb 2018 18:02:32 +0000 Subject: [issue32924] Python 3.7 docs in docs.p.o points to GitHub's master branch In-Reply-To: <1519405058.43.0.467229070634.issue32924@psf.upfronthosting.co.za> Message-ID: <1519408952.58.0.467229070634.issue32924@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 079d75d099f228a4261f63a94217571e05e8fa8e by Mariatta in branch '3.7': bpo-32924: Fix the Show Source url in the docs. (GH-5835) https://github.com/python/cpython/commit/079d75d099f228a4261f63a94217571e05e8fa8e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 13:03:26 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 23 Feb 2018 18:03:26 +0000 Subject: [issue32924] Python 3.7 docs in docs.p.o points to GitHub's master branch In-Reply-To: <1519405058.43.0.467229070634.issue32924@psf.upfronthosting.co.za> Message-ID: <1519409006.17.0.467229070634.issue32924@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: The link has been fixed, it affects 3.7 branch only. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 13:04:45 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 23 Feb 2018 18:04:45 +0000 Subject: [issue32923] Typo in documentation of unittest: whilst instead of while In-Reply-To: <1519399813.0.0.467229070634.issue32923@psf.upfronthosting.co.za> Message-ID: <1519409085.9.0.467229070634.issue32923@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks! I've fixed it on master, the backports have been initiated and will finish automatically. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 13:05:03 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 23 Feb 2018 18:05:03 +0000 Subject: [issue17232] Improve -O docs In-Reply-To: <1361255101.21.0.948205073894.issue17232@psf.upfronthosting.co.za> Message-ID: <1519409103.44.0.467229070634.issue17232@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I've made a PR and tried to integrate the changes from PEP 488. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 13:14:25 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 23 Feb 2018 18:14:25 +0000 Subject: [issue32923] Typo in documentation of unittest: whilst instead of while In-Reply-To: <1519399813.0.0.467229070634.issue32923@psf.upfronthosting.co.za> Message-ID: <1519409665.4.0.467229070634.issue32923@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 1ad6ca5eb95ebb7351e0f5d9ce607dec54de6407 by Miss Islington (bot) in branch '3.7': bpo-32923: Unittest doc: replace `whilst` with `while` (GH-5833) https://github.com/python/cpython/commit/1ad6ca5eb95ebb7351e0f5d9ce607dec54de6407 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 13:16:58 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 23 Feb 2018 18:16:58 +0000 Subject: [issue32923] Typo in documentation of unittest: whilst instead of while In-Reply-To: <1519399813.0.0.467229070634.issue32923@psf.upfronthosting.co.za> Message-ID: <1519409818.5.0.467229070634.issue32923@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 8a7f1f4b0ffddf230864ebf16b481546970dd9c2 by Miss Islington (bot) in branch '2.7': bpo-32923: Unittest doc: replace `whilst` with `while` (GH-5833) https://github.com/python/cpython/commit/8a7f1f4b0ffddf230864ebf16b481546970dd9c2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 13:22:29 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 23 Feb 2018 18:22:29 +0000 Subject: [issue32923] Typo in documentation of unittest: whilst instead of while In-Reply-To: <1519399813.0.0.467229070634.issue32923@psf.upfronthosting.co.za> Message-ID: <1519410149.68.0.467229070634.issue32923@psf.upfronthosting.co.za> miss-islington added the comment: New changeset cffe0467ab7b164739693598826bd3860f01b11f by Miss Islington (bot) in branch '3.6': bpo-32923: Unittest doc: replace `whilst` with `while` (GH-5833) https://github.com/python/cpython/commit/cffe0467ab7b164739693598826bd3860f01b11f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 13:22:39 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 23 Feb 2018 18:22:39 +0000 Subject: [issue32304] Upload failed (400): Digests do not match on .tar.gz ending with x0d binary code In-Reply-To: <1513180109.43.0.213398074469.issue32304@psf.upfronthosting.co.za> Message-ID: <1519410159.51.0.467229070634.issue32304@psf.upfronthosting.co.za> ?ric Araujo added the comment: 3.5 only accepts security fixes: https://devguide.python.org/#status-of-python-branches ---------- versions: +Python 3.8 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 13:23:31 2018 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 23 Feb 2018 18:23:31 +0000 Subject: [issue32304] Upload failed (400): Digests do not match on .tar.gz ending with x0d binary code In-Reply-To: <1513180109.43.0.213398074469.issue32304@psf.upfronthosting.co.za> Message-ID: <1519410211.9.0.467229070634.issue32304@psf.upfronthosting.co.za> Change by ?ric Araujo : ---------- stage: backport needed -> resolved status: open -> closed versions: -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 13:23:57 2018 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 23 Feb 2018 18:23:57 +0000 Subject: [issue32820] Add __format__ method to ipaddress In-Reply-To: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: <1519410237.21.0.467229070634.issue32820@psf.upfronthosting.co.za> Eric V. Smith added the comment: True enough. You'd think that I (of all people!) would know that. Nevermind. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 13:43:22 2018 From: report at bugs.python.org (Armin Rigo) Date: Fri, 23 Feb 2018 18:43:22 +0000 Subject: [issue32922] dbm.open() encodes filename with default encoding rather than the filesystem encoding In-Reply-To: <1519398668.71.0.467229070634.issue32922@psf.upfronthosting.co.za> Message-ID: <1519411402.96.0.467229070634.issue32922@psf.upfronthosting.co.za> Armin Rigo added the comment: It's not a new feature. See for example all functions from posixmodule.c: it should at least be PyArg_ParseTuple(args, "et", Py_FileSystemDefaultEncoding, &char_star_variable). ---------- nosy: +arigo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 14:02:00 2018 From: report at bugs.python.org (miss-islington) Date: Fri, 23 Feb 2018 19:02:00 +0000 Subject: [issue32838] Fix Python versions in the table of magic numbers In-Reply-To: <1518520184.53.0.467229070634.issue32838@psf.upfronthosting.co.za> Message-ID: <1519412520.26.0.467229070634.issue32838@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 8d9d4b57ae57baee4401cab6067ef22c0172661d by Miss Islington (bot) in branch '3.7': bpo-32838: Fix Python versions in the table of magic numbers. (GH-5658) https://github.com/python/cpython/commit/8d9d4b57ae57baee4401cab6067ef22c0172661d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 14:33:36 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 23 Feb 2018 19:33:36 +0000 Subject: [issue32915] Running Python 2 with -3 flag doesn't complain about cmp/__cmp__ In-Reply-To: <1519342915.53.0.467229070634.issue32915@psf.upfronthosting.co.za> Message-ID: <1519414416.63.0.467229070634.issue32915@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The stated goal of -3 is "warn about Python 3.x incompatibilities that 2to3 cannot trivially fix", so this use case seems like a good match. On the other hand, adding this to -3 would be somewhat noisy since __cmp__ is pervasive in 2.7. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 15:38:35 2018 From: report at bugs.python.org (Eric Osborne) Date: Fri, 23 Feb 2018 20:38:35 +0000 Subject: [issue32820] Add __format__ method to ipaddress In-Reply-To: <1519410237.21.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: Eric Osborne added the comment: I dunno, I think this might be useful. A binary representation is itself a string, and takes formatting as such (ditto for hex, as hex(int()) returns a string: In [20]: a Out[20]: IPv4Address('1.2.3.4') In [92]: f'{a}' Out[92]: '1.2.3.4' In [21]: int(a) Out[21]: 16909060 In [22]: f'{bin(int(a)):42s}' Out[22]: '0b1000000100000001100000100 ' In [24]: f'{a:b}' Out[24]: '00000001000000100000001100000100' In [25]: f'{a:b42s}' Out[25]: '1.2.3.4' That last one should return '1000000100000001100000100 '. I was worried about going down a really deep rabbit hole trying to support a lot of string format stuff with no use case, but there's not much more which could be done which makes any sense. 's' seems reasonable. My current code supports [b, x, n] integer presentation types. I need to add [X], that's just an oversight. Supporting [b, x, X, n] means that an IP address is considered an integer, and should get the subset of integer presentations which make sense. Not the full set - neither octal nor character are good fits. But support for some sort of alignment padding seems reasonable. Consider: In [61]: f'{42:30}' Out[61]: ' 42' In [62]: f'{int(a):30}' Out[62]: ' 16909060' In [63]: f'{a:30}' Out[63]: '1.2.3.4' In [66]: f'{a:42b}' Out[66]: '00000001000000100000001100000100' Those last two seem odd. I think f'{a:30}' should return the same thing as this: In [69]: f'{str(a):30}' Out[69]: '1.2.3.4 ' and f'{a:42b'} should return the same thing as this: In [77]: f'{bin(int(a)):42}' Out[77]: '0b1000000100000001100000100 ' This also means supporting [>,<,^] alignment. And, of course, ignoring any length spec too short, as is done with regular integer formatting: In [86]: b Out[86]: 16909060 In [87]: f'{b:6}' Out[87]: '16909060' Thoughts? eric ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 15:58:42 2018 From: report at bugs.python.org (Steve Dower) Date: Fri, 23 Feb 2018 20:58:42 +0000 Subject: [issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8 In-Reply-To: <1519248415.02.0.467229070634.issue32901@psf.upfronthosting.co.za> Message-ID: <1519419522.7.0.467229070634.issue32901@psf.upfronthosting.co.za> Steve Dower added the comment: Windows is complete - leaving this open for Ned to resolve when the Mac installers are done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 16:11:51 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 23 Feb 2018 21:11:51 +0000 Subject: [issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8 In-Reply-To: <1519248415.02.0.467229070634.issue32901@psf.upfronthosting.co.za> Message-ID: <1519420311.9.0.467229070634.issue32901@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New build with 8.6.8 seems to work fine on my machine. Thanks. I noticed that 'fetching tcl/tk 8.6.8' downloaded a pre-built binary instead of sources to build on my machine. Nice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 16:20:20 2018 From: report at bugs.python.org (Ned Deily) Date: Fri, 23 Feb 2018 21:20:20 +0000 Subject: [issue32915] Running Python 2 with -3 flag doesn't complain about cmp/__cmp__ In-Reply-To: <1519342915.53.0.467229070634.issue32915@psf.upfronthosting.co.za> Message-ID: <1519420820.14.0.467229070634.issue32915@psf.upfronthosting.co.za> Change by Ned Deily : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 16:44:18 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 23 Feb 2018 21:44:18 +0000 Subject: [issue32925] AST optimizer: Change a list into tuple in iterations and containment tests Message-ID: <1519422258.29.0.467229070634.issue32925@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : Currently a list of constants is replaced with constant tuple in `x in [1, 2]` and `for x in [1, 2]`. The resulted AST is the same as for `x in (1, 2)` and `for x in (1, 2)`. The proposed simple PR extends this optimization to lists containing non-constants. `x in [a, b]` will be changed into `x in (a, b)` and `for x in [a, b]` will be changed into `for x in (a, b)`. Since creating a tuple is faster than creating a list the latter form is a tiny bit faster. $ ./python -m timeit -s 'a, b = 1, 2' -- 'for x in [a, b]: pass' 5000000 loops, best of 5: 93.6 nsec per loop $ ./python -m timeit -s 'a, b = 1, 2' -- 'for x in (a, b): pass' 5000000 loops, best of 5: 74.3 nsec per loop ./python -m timeit -s 'a, b = 1, 2' -- '1 in [a, b]' 5000000 loops, best of 5: 58.9 nsec per loop $ ./python -m timeit -s 'a, b = 1, 2' -- '1 in (a, b)' 10000000 loops, best of 5: 39.3 nsec per loop ---------- components: Interpreter Core messages: 312670 nosy: benjamin.peterson, brett.cannon, ncoghlan, serhiy.storchaka, yselivanov priority: normal severity: normal status: open title: AST optimizer: Change a list into tuple in iterations and containment tests type: performance versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 17:08:37 2018 From: report at bugs.python.org (Victor Engmark) Date: Fri, 23 Feb 2018 22:08:37 +0000 Subject: [issue32926] Add public TestCase method/property to get result of current test Message-ID: <1519423717.02.0.467229070634.issue32926@psf.upfronthosting.co.za> New submission from Victor Engmark : The community has come up with multiple hacks [1] to be able to inspect the current test result in tearDown (to collect more expensive diagnostics only when the test fails). It would be great to have a documented and simple way to check whether the test currently in play was successful. To be clear, TestCase.wasSuccessful() is not useful in this case, since it only reports whether all tests run so far were successful. [1] https://stackoverflow.com/q/4414234/96588 ---------- messages: 312671 nosy: Victor Engmark priority: normal severity: normal status: open title: Add public TestCase method/property to get result of current test type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 17:18:22 2018 From: report at bugs.python.org (Victor Engmark) Date: Fri, 23 Feb 2018 22:18:22 +0000 Subject: [issue32927] Add typeshed documentation for unittest.TestCase._feedErrorsToResult and ._outcome Message-ID: <1519424302.16.0.467229070634.issue32927@psf.upfronthosting.co.za> New submission from Victor Engmark : Until and unless #32926 is fixed it would be good to be able to type inspect code which uses the currently least hacky way to inspect the result of the current test [1]. This requires the use of TestCase._feedErrorsToResult and TestCase._outcome. [1]: https://stackoverflow.com/a/39606065/96588 ---------- messages: 312672 nosy: Victor Engmark priority: normal severity: normal status: open title: Add typeshed documentation for unittest.TestCase._feedErrorsToResult and ._outcome type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 17:23:08 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 23 Feb 2018 22:23:08 +0000 Subject: [issue32925] AST optimizer: Change a list into tuple in iterations and containment tests In-Reply-To: <1519422258.29.0.467229070634.issue32925@psf.upfronthosting.co.za> Message-ID: <1519424588.07.0.467229070634.issue32925@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +5617 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 18:10:15 2018 From: report at bugs.python.org (William Pickard) Date: Fri, 23 Feb 2018 23:10:15 +0000 Subject: [issue32928] _findvs failing on Windows 10 (Release build only) Message-ID: <1519427415.69.0.467229070634.issue32928@psf.upfronthosting.co.za> New submission from William Pickard : The distutils module _findvs is failing on my Windows 10 PRO machine with the following error: OSError: Error 80070002 Note: Building Python 3.6 in debug for some reason doesn't cause the error. ---------- components: Distutils, Extension Modules, Library (Lib), Windows messages: 312673 nosy: WildCard65, dstufft, eric.araujo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: _findvs failing on Windows 10 (Release build only) type: crash versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 18:44:13 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 23 Feb 2018 23:44:13 +0000 Subject: [issue32861] urllib.robotparser: incomplete __str__ methods In-Reply-To: <1518828766.79.0.467229070634.issue32861@psf.upfronthosting.co.za> Message-ID: <1519429453.86.0.467229070634.issue32861@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 18:52:52 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 23 Feb 2018 23:52:52 +0000 Subject: [issue32867] argparse assertion failure with multiline metavars In-Reply-To: <1518930403.05.0.467229070634.issue32867@psf.upfronthosting.co.za> Message-ID: <1519429972.61.0.467229070634.issue32867@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I don't understand the -h (display help part) but pasting code into repository 3.8 IDLE editor and running, I get same traceback. Never having used argparse, I don't know if a multiline metavar is expected to work. Assuming so, can you suggest a fix? ---------- nosy: +bethard, terry.reedy stage: -> test needed versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 19:12:55 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 24 Feb 2018 00:12:55 +0000 Subject: [issue32875] Add __exit__() method to event loops In-Reply-To: <1519065811.74.0.467229070634.issue32875@psf.upfronthosting.co.za> Message-ID: <1519431175.08.0.467229070634.issue32875@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Enhancements only go in future releases not yet in beta. Do loops already have an __enter__ method, also required for with? What would you have the close method do? Preemptorially cancel all tasks and close the loop? With statement are usually for ensuring deterministic cleanup after the last substatement, such as closing a file. Can you give a short usage example? ---------- nosy: +terry.reedy versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 19:22:20 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 24 Feb 2018 00:22:20 +0000 Subject: [issue32877] Login to bugs.python.org with Google account NOT working In-Reply-To: <1519076468.29.0.467229070634.issue32877@psf.upfronthosting.co.za> Message-ID: <1519431740.63.0.467229070634.issue32877@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This is similar to #29544. As the reply there indicates, this tracker (for issues with the cpython repository) is the wrong place for issues about the tracker. Click Report Tracker Problem on the left sidebar. ---------- nosy: +terry.reedy resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 19:27:18 2018 From: report at bugs.python.org (Martin Panter) Date: Sat, 24 Feb 2018 00:27:18 +0000 Subject: [issue32875] Add __exit__() method to event loops In-Reply-To: <1519065811.74.0.467229070634.issue32875@psf.upfronthosting.co.za> Message-ID: <1519432038.15.0.467229070634.issue32875@psf.upfronthosting.co.za> Martin Panter added the comment: Maybe already discussed in Issue 24795? ---------- nosy: +martin.panter superseder: -> Make event loops with statement context managers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 19:29:23 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 24 Feb 2018 00:29:23 +0000 Subject: [issue32928] _findvs failing on Windows 10 (Release build only) In-Reply-To: <1519427415.69.0.467229070634.issue32928@psf.upfronthosting.co.za> Message-ID: <1519432163.2.0.467229070634.issue32928@psf.upfronthosting.co.za> Steve Dower added the comment: You mean build? Or use? Can you share build logs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 19:30:27 2018 From: report at bugs.python.org (William Pickard) Date: Sat, 24 Feb 2018 00:30:27 +0000 Subject: [issue32928] _findvs failing on Windows 10 (Release build only) In-Reply-To: <1519427415.69.0.467229070634.issue32928@psf.upfronthosting.co.za> Message-ID: <1519432227.11.0.467229070634.issue32928@psf.upfronthosting.co.za> William Pickard added the comment: Use, when distutils calls findall in the module, it results in the OSError being thrown. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 19:42:48 2018 From: report at bugs.python.org (Martin Panter) Date: Sat, 24 Feb 2018 00:42:48 +0000 Subject: [issue32867] argparse assertion failure with multiline metavars In-Reply-To: <1518930403.05.0.467229070634.issue32867@psf.upfronthosting.co.za> Message-ID: <1519432968.08.0.467229070634.issue32867@psf.upfronthosting.co.za> Martin Panter added the comment: This looks like the same assertion failure as described in Issue 16360. Paul pointed to a patch in Issue 11874, so that may also be relevant. However I agree that embedding newlines in a metavar doesn?t make much sense. What?s the use case? ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 19:53:39 2018 From: report at bugs.python.org (YoSTEALTH) Date: Sat, 24 Feb 2018 00:53:39 +0000 Subject: [issue28134] socket.socket(fileno=fd) does not work as documented In-Reply-To: <1473794011.65.0.923929152137.issue28134@psf.upfronthosting.co.za> Message-ID: <1519433619.89.0.467229070634.issue28134@psf.upfronthosting.co.za> YoSTEALTH added the comment: I am using 3.7.0b1 i don't think this issue is fixed! # simple mockup: # -------------- def accept(sock): client, addr = sock.accept() inside = socket(fileno=client.fileno()) print(inside) # <__main__.Socket fd=5, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('127.0.0.1', 8000), raddr=('127.0.0.1', 42532)> return inside outside = accept(sock) print(outside) # <__main__.Socket fd=5, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6> So the "laddr" and "raddr" goes missing the second its out of the function??? This has wasted days of my time, to even get to this point of figuring out whats going on wasn't easy! extremely frustrating. ---------- nosy: +YoSTEALTH _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 20:06:34 2018 From: report at bugs.python.org (ppperry) Date: Sat, 24 Feb 2018 01:06:34 +0000 Subject: [issue32926] Add public TestCase method/property to get result of current test In-Reply-To: <1519423717.02.0.467229070634.issue32926@psf.upfronthosting.co.za> Message-ID: <1519434394.79.0.467229070634.issue32926@psf.upfronthosting.co.za> Change by ppperry : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 20:06:46 2018 From: report at bugs.python.org (ppperry) Date: Sat, 24 Feb 2018 01:06:46 +0000 Subject: [issue32926] Add public TestCase method/property to get result of current test In-Reply-To: <1519423717.02.0.467229070634.issue32926@psf.upfronthosting.co.za> Message-ID: <1519434406.03.0.467229070634.issue32926@psf.upfronthosting.co.za> Change by ppperry : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 20:10:24 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 24 Feb 2018 01:10:24 +0000 Subject: [issue32893] ast.literal_eval() shouldn't accept booleans as numbers in AST In-Reply-To: <1519206981.62.0.467229070634.issue32893@psf.upfronthosting.co.za> Message-ID: <1519434624.41.0.467229070634.issue32893@psf.upfronthosting.co.za> Terry J. Reedy added the comment: It is true that 'True' and 'False' are not literally literals. But as pre- and fixedly bound names, they function for Bool the same as 0 and 1 do for int. Besides this, ast.literal_eval is not now limited to literal evaluation, but does compile-time computation of some constant expressions, in particular even nested tuples like '(1, (2, (3, (4,5))))' or '(False, (True, False))' and even some expressions yielding mutable objects, like '[1,2]' (see below). 'safe_eval' might be a better name now. The benefit of compressing 'True+True' to 2 at compile time is the same as compressing '1+1' to 2. Given what literal_eval actually is now, it is surprising and to me confusing that this is rejected, while a tuple with booleans is accepted (as it should be!). It is also a bug relative to the doc: "The string or node provided may only consist of the following Python literal structures: strings, bytes, numbers, tuples, lists, dicts, sets, *booleans*, and None." [*s added] So I think this issue should be flipped to "ast.literal_eval should consistently accept False and True" and marked as a bugfix. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 20:15:06 2018 From: report at bugs.python.org (MaT1g3R) Date: Sat, 24 Feb 2018 01:15:06 +0000 Subject: [issue32867] argparse assertion failure with multiline metavars In-Reply-To: <1518930403.05.0.467229070634.issue32867@psf.upfronthosting.co.za> Message-ID: <1519434906.09.0.467229070634.issue32867@psf.upfronthosting.co.za> MaT1g3R added the comment: I tried to include line breaks for listing options for a positional argument. The default metavar for that is something like {opt1, opt2, op3}, however I wanted it to display the options on separate lines. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 20:17:14 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 24 Feb 2018 01:17:14 +0000 Subject: [issue32893] ast.literal_eval() shouldn't accept booleans as numbers in AST In-Reply-To: <1519206981.62.0.467229070634.issue32893@psf.upfronthosting.co.za> Message-ID: <1519435034.7.0.467229070634.issue32893@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- Removed message: https://bugs.python.org/msg312682 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 20:31:12 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 24 Feb 2018 01:31:12 +0000 Subject: [issue28134] socket.socket(fileno=fd) does not work as documented In-Reply-To: <1473794011.65.0.923929152137.issue28134@psf.upfronthosting.co.za> Message-ID: <1519435872.16.0.467229070634.issue28134@psf.upfronthosting.co.za> Christian Heimes added the comment: The problem is fixed and your example behaves as expected. The laddr string is the result of inside.getsockname() and raddr string is the result of inside.getpeername(). In your example, inside and client share the same file descriptor. When the function exits client goes out of scope, the reference count of client drops to 0, the object gets deallocated and Python closes the shared file descriptor. In outside, the shared fd is gone and outside.getsockname() and outside.getpeername() fail. Basically the outside socket is dead because its fd has been closed. You have to duplicate the fd or detach the socket to keep the fd open. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 20:35:17 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Sat, 24 Feb 2018 01:35:17 +0000 Subject: [issue28414] SSL match_hostname fails for internationalized domain names In-Reply-To: <1476172956.13.0.85556243538.issue28414@psf.upfronthosting.co.za> Message-ID: <1519436117.74.0.467229070634.issue28414@psf.upfronthosting.co.za> Nathaniel Smith added the comment: New changeset 11a1493bc4198f1def5e572049485779cf54dc57 by Nathaniel J. Smith (Christian Heimes) in branch 'master': [bpo-28414] Make all hostnames in SSL module IDN A-labels (GH-5128) https://github.com/python/cpython/commit/11a1493bc4198f1def5e572049485779cf54dc57 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 20:35:27 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 24 Feb 2018 01:35:27 +0000 Subject: [issue28414] SSL match_hostname fails for internationalized domain names In-Reply-To: <1476172956.13.0.85556243538.issue28414@psf.upfronthosting.co.za> Message-ID: <1519436127.1.0.467229070634.issue28414@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5618 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 20:44:53 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 24 Feb 2018 01:44:53 +0000 Subject: [issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False) Message-ID: <1519436693.93.0.467229070634.issue32929@psf.upfronthosting.co.za> New submission from Eric V. Smith : See https://mail.python.org/pipermail/python-dev/2018-February/152150.html for a discussion. This will remove the @dataclass hash= tri-state parameter, and replace it with an unsafe_hash= boolean-only parameter. >From that thread: """ I propose that with @dataclass(unsafe_hash=False) (the default), a __hash__ method is added when the following conditions are true: - frozen=True (not the default) - compare=True (the default) - no __hash__ method is defined in the class If we instead use @dataclass(unsafe_hash=True), a __hash__ will be added regardless of the other flags, but if a __hash__ method is present, an exception is raised. Other values (e.g. unsafe_hash=None) are illegal for this flag. """ ---------- assignee: eric.smith components: Library (Lib) messages: 312686 nosy: eric.smith, ned.deily priority: release blocker severity: normal status: open title: Change dataclasses hashing to use unsafe_hash boolean (default to False) type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 21:04:23 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 24 Feb 2018 02:04:23 +0000 Subject: [issue32893] ast.literal_eval() shouldn't accept booleans as numbers in AST In-Reply-To: <1519206981.62.0.467229070634.issue32893@psf.upfronthosting.co.za> Message-ID: <1519437863.35.0.467229070634.issue32893@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Whoops, my previous response was wrong as written because I wrongly thought that if literal_eval accepts number_literal + imaginary_literal, it would also accept number_literal + number_literal. I am replacing it with the following. The ast.literal_eval doc says "The string or node provided may only consist of the following Python literal structures: strings, bytes, numbers, tuples, lists, dicts, sets, booleans, and None." Since 'True', '(True,)', '[True]', '{True:True}', '+1', '-1' and '1+1j' are accepted as 'literal structures', it seems arbitrary that at least '+True' and 'True+1j' are not. ('+1', '1+1j' and especially '-1' seem to violate the limitations to 'literal', 'container', and 'no operator', but that is a different issue.) I strongly agree that the acceptable string inputs and acceptable AST inputs should match. The question is which version of the domain should be changed. I would at least mildly prefer that the issue be "ast.literal_eval should consistly treat False and True the same as 0 and 1.", which means expanding the string version. As Raymond said, this is the general rule in Python. What is the benefit of having a different rule for this one function? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 21:10:55 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 24 Feb 2018 02:10:55 +0000 Subject: [issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False) In-Reply-To: <1519436693.93.0.467229070634.issue32929@psf.upfronthosting.co.za> Message-ID: <20180224021049.GJ10142@ando.pearwood.info> Steven D'Aprano added the comment: This is a truly awful name, there's nothing unsafe about the hash parameter. We rightly hesitate to label *actual* unsafe functions, like eval and exec, with that name. Are we committed to this name? ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 21:17:13 2018 From: report at bugs.python.org (Tommy) Date: Sat, 24 Feb 2018 02:17:13 +0000 Subject: [issue32930] [help][webbrowser always opens new tab. I want to open in the same tab] Message-ID: <1519438633.35.0.467229070634.issue32930@psf.upfronthosting.co.za> New submission from Tommy : Dear manager, I'm just starting python and trying to make simple web application. As above title, I just want to open webbrowser at first and then just change web-address in the same tab, but whenever I try webbrowser.open, it always open new tab or new window. When I checked webbrowser-control options on python help page, it says webbrowser.open's 2nd argument can control window opening. but it did not work well in my tries. following is my test code. #1st try import webbrowser url = 'www.google.com' webbrowser.open(url, new=0) # this open new explorer window. #....wait #2nd try webbrowser.open(url, new=0) # this open new explorer window again. In my test, I test 2nd argument from 0 to 2, but there seems no change. always opens new tab. Is there any way to change address and open in the current opened browser window? best Regards, Tommy ---------- components: Windows messages: 312689 nosy: paul.moore, steve.dower, tim.golden, tommylim1018 at naver.com, zach.ware priority: normal severity: normal status: open title: [help][webbrowser always opens new tab. I want to open in the same tab] versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 21:18:40 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 24 Feb 2018 02:18:40 +0000 Subject: [issue32907] pathlib: test_resolve_common fails on Windows w/ longusername In-Reply-To: <1519292402.67.0.467229070634.issue32907@psf.upfronthosting.co.za> Message-ID: <1519438720.32.0.467229070634.issue32907@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- title: pathlib: test_resolve_common fails on Windows -> pathlib: test_resolve_common fails on Windows w/ longusername _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 21:20:13 2018 From: report at bugs.python.org (Tommy) Date: Sat, 24 Feb 2018 02:20:13 +0000 Subject: [issue32930] [help][webbrowser always opens new tab. I want to open in the same tab] In-Reply-To: <1519438633.35.0.467229070634.issue32930@psf.upfronthosting.co.za> Message-ID: <1519438813.84.0.467229070634.issue32930@psf.upfronthosting.co.za> Change by Tommy : ---------- components: +Library (Lib), macOS nosy: +ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 21:22:17 2018 From: report at bugs.python.org (YoSTEALTH) Date: Sat, 24 Feb 2018 02:22:17 +0000 Subject: [issue28134] socket.socket(fileno=fd) does not work as documented In-Reply-To: <1473794011.65.0.923929152137.issue28134@psf.upfronthosting.co.za> Message-ID: <1519438936.99.0.467229070634.issue28134@psf.upfronthosting.co.za> YoSTEALTH added the comment: Christian thank you for your reply, i really appreciate it. Lets analyze this a bit: - Technically speaking i can "return client" directly and it would NOT close the socket. - Shouldn't "inside" having reference to same fd mean +1 to reference count. Considering its a new object? id(client): 140340037397192 id(inside): 140340010863560 I could understand making a duplicate of the fd if it were being passed across thread/process but in its original thread making a duplicate! This behavior is extremely odd. I fell like everyone that uses socket(fileno) will run into days wasted and frustration just to figure out these solutions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 21:35:29 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 24 Feb 2018 02:35:29 +0000 Subject: [issue32916] IDLE: change 'str' to 'code' in idlelib.pyparse.PyParse and users In-Reply-To: <1519347361.47.0.467229070634.issue32916@psf.upfronthosting.co.za> Message-ID: <1519439729.95.0.467229070634.issue32916@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset c29c03a34a9f3c82704b66f323ce5ea9dc89c8af by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-32916: IDLE: Change `str` to `code` in pyparse (GH-5830) https://github.com/python/cpython/commit/c29c03a34a9f3c82704b66f323ce5ea9dc89c8af ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 21:35:49 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 24 Feb 2018 02:35:49 +0000 Subject: [issue32916] IDLE: change 'str' to 'code' in idlelib.pyparse.PyParse and users In-Reply-To: <1519347361.47.0.467229070634.issue32916@psf.upfronthosting.co.za> Message-ID: <1519439749.71.0.467229070634.issue32916@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5619 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 21:36:48 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 24 Feb 2018 02:36:48 +0000 Subject: [issue32916] IDLE: change 'str' to 'code' in idlelib.pyparse.PyParse and users In-Reply-To: <1519347361.47.0.467229070634.issue32916@psf.upfronthosting.co.za> Message-ID: <1519439808.2.0.467229070634.issue32916@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5620 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 21:39:47 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 24 Feb 2018 02:39:47 +0000 Subject: [issue32875] Add __exit__() method to event loops In-Reply-To: <1519065811.74.0.467229070634.issue32875@psf.upfronthosting.co.za> Message-ID: <1519439987.87.0.467229070634.issue32875@psf.upfronthosting.co.za> Terry J. Reedy added the comment: A. Svetlov, closing #24795: "Superseded by `asyncio.run()` function." ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 21:42:59 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 24 Feb 2018 02:42:59 +0000 Subject: [issue32867] argparse assertion failure with multiline metavars In-Reply-To: <1518930403.05.0.467229070634.issue32867@psf.upfronthosting.co.za> Message-ID: <1519440179.17.0.467229070634.issue32867@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If newlines are not permitted in metavars, the user should see ValueError: newline not permitted in metavar ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 21:59:56 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 24 Feb 2018 02:59:56 +0000 Subject: [issue32916] IDLE: change 'str' to 'code' in idlelib.pyparse.PyParse and users In-Reply-To: <1519347361.47.0.467229070634.issue32916@psf.upfronthosting.co.za> Message-ID: <1519441196.02.0.467229070634.issue32916@psf.upfronthosting.co.za> miss-islington added the comment: New changeset f409c9988e72eff7c0378ab5578f5edecb8b1855 by Miss Islington (bot) in branch '3.7': bpo-32916: IDLE: Change `str` to `code` in pyparse (GH-5830) https://github.com/python/cpython/commit/f409c9988e72eff7c0378ab5578f5edecb8b1855 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 22:16:03 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 24 Feb 2018 03:16:03 +0000 Subject: [issue32916] IDLE: change 'str' to 'code' in idlelib.pyparse.PyParse and users In-Reply-To: <1519347361.47.0.467229070634.issue32916@psf.upfronthosting.co.za> Message-ID: <1519442163.0.0.467229070634.issue32916@psf.upfronthosting.co.za> miss-islington added the comment: New changeset cd2112f0b9ce3d1a8cff61c16a9208115fb1dbf4 by Miss Islington (bot) in branch '3.6': bpo-32916: IDLE: Change `str` to `code` in pyparse (GH-5830) https://github.com/python/cpython/commit/cd2112f0b9ce3d1a8cff61c16a9208115fb1dbf4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 22:18:30 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Sat, 24 Feb 2018 03:18:30 +0000 Subject: [issue28414] SSL match_hostname fails for internationalized domain names In-Reply-To: <1476172956.13.0.85556243538.issue28414@psf.upfronthosting.co.za> Message-ID: <1519442310.8.0.467229070634.issue28414@psf.upfronthosting.co.za> Nathaniel Smith added the comment: New changeset 1c37e277190565f0e30fc9281caae4c899ac3b50 by Nathaniel J. Smith (Miss Islington (bot)) in branch '3.7': [bpo-28414] Make all hostnames in SSL module IDN A-labels (GH-5128) (GH-5843) https://github.com/python/cpython/commit/1c37e277190565f0e30fc9281caae4c899ac3b50 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 23:03:24 2018 From: report at bugs.python.org (Marc Culler) Date: Sat, 24 Feb 2018 04:03:24 +0000 Subject: [issue32931] Python 3.70b1 specifies non-existent compiler gcc++ Message-ID: <1519445004.46.0.467229070634.issue32931@psf.upfronthosting.co.za> New submission from Marc Culler : Compiling an external module in the 3.7.0b1 prerelease on macOS High Sierra failed for me because a compiler named "gcc++" was not found. As far as I can tell there is no such compiler in the current XCode release. I don't know if there ever was one. The culprit file is: /Library/Frameworks/Python.framework//Versions/3.7/lib/python3.7/_sysconfigdata_m_darwin_darwin.py The following patch fixed the problem for me: 38c38 < 'CXX': 'gcc++', --- > 'CXX': 'g++', 484c484 < 'LDCXXSHARED': 'gcc++ -bundle -undefined dynamic_lookup', --- > 'LDCXXSHARED': 'g++ -bundle -undefined dynamic_lookup', ---------- components: macOS messages: 312697 nosy: culler, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Python 3.70b1 specifies non-existent compiler gcc++ versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 23 23:35:51 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 24 Feb 2018 04:35:51 +0000 Subject: [issue32820] Add __format__ method to ipaddress In-Reply-To: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: <1519446951.22.0.467229070634.issue32820@psf.upfronthosting.co.za> Nick Coghlan added the comment: I think supporting "s" makes sense, as we're going to need to treat the empty format string as implying "s" for backwards compatibility reasons: >>> f"{v4}" '1.2.3.4' Right now, attempting to format that field without `!s` will give you a TypeError, but as Eric O notes, once IP addresses support __format__, we're going to have to choose between: - raise an exception if formatting directions are given without a numeric typecode - ignore the formatting in that case (which is what the current PR does) - handle it the same way "!s" would (and also allow "s" as an explicit type code) The last option sounds the most desirable to me, as that way we can just say "'s' is the default IP addressing formatting typecode" (similar to the way 'd' is the default for integers, and 'g' is the default for floating point numbers). I *don't* think we should allow combining the numeric typecode with the string type code, though. The numeric types don't allow that, and f-strings already support nesting if you want to combine string formatting with numeric formatting: >>> f"{f'{42**100:g}':>20s}" ' 2.11314e+162' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 00:21:23 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 24 Feb 2018 05:21:23 +0000 Subject: [issue32916] IDLE: change 'str' to 'code' in idlelib.pyparse.PyParse and users In-Reply-To: <1519347361.47.0.467229070634.issue32916@psf.upfronthosting.co.za> Message-ID: <1519449683.64.0.467229070634.issue32916@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thanks. It is nice splitting the work this way. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 01:08:31 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Sat, 24 Feb 2018 06:08:31 +0000 Subject: [issue28414] SSL match_hostname fails for internationalized domain names In-Reply-To: <1476172956.13.0.85556243538.issue28414@psf.upfronthosting.co.za> Message-ID: <1519452511.84.0.467229070634.issue28414@psf.upfronthosting.co.za> Change by Nathaniel Smith : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 01:55:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 24 Feb 2018 06:55:07 +0000 Subject: [issue32893] ast.literal_eval() shouldn't accept booleans as numbers in AST In-Reply-To: <1519206981.62.0.467229070634.issue32893@psf.upfronthosting.co.za> Message-ID: <1519455307.51.0.467229070634.issue32893@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The definition of "Python literal structures" is not specified, but it is implied that ast.literal_eval() should accept signed numbers and tuple/list/set/dict displays consisting of "Python literal structures". ast.literal_eval() accepts unary minus for supporting negative numbers. In Python 2 "-42" was parsed as a single AST node Num(42), but in Python 3 it is parsed as UnaryOp(USub(), Num(42)). ast.literal_eval() accepts binary plus and minus for supporting complex numbers (there are oddities in this). The support of unary plus was added somewhere for unknown reason (see 884c71cd8dc6, no issue number), but it doesn't harm. Below in the documentation: "It is not capable of evaluating arbitrarily complex expressions, for example involving operators or indexing." Arbitrarily complex expressions involving addition and subtraction (like "2017-10-10") was supported in Python 3 (but not in Python 2), but it was fixed in 3.7 (see issue31778). It doesn't support other operations or operations with non-numeric literals. It is oversight that UnaryOp(USub(), Constant(True)) is still accepted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 02:04:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 24 Feb 2018 07:04:15 +0000 Subject: [issue32758] Stack overflow when parse long expression to AST In-Reply-To: <1517682171.17.0.467229070634.issue32758@psf.upfronthosting.co.za> Message-ID: <1519455855.91.0.467229070634.issue32758@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: A consequence of this is that ast.literal_eval() can crash. >>> import ast >>> ast.literal_eval("+0"*200000) Segmentation fault (core dumped) It should be documented that ast.literal_eval() is not safe. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 02:27:29 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 24 Feb 2018 07:27:29 +0000 Subject: [issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False) In-Reply-To: <1519436693.93.0.467229070634.issue32929@psf.upfronthosting.co.za> Message-ID: <1519457249.5.0.467229070634.issue32929@psf.upfronthosting.co.za> Eric V. Smith added the comment: That's a quote from Guido. There weren't any better ideas on the python-dev thread. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 02:52:46 2018 From: report at bugs.python.org (TitanSnow) Date: Sat, 24 Feb 2018 07:52:46 +0000 Subject: [issue32917] ConfigParser writes a superfluous final blank line In-Reply-To: <1519349390.35.0.467229070634.issue32917@psf.upfronthosting.co.za> Message-ID: <1519458766.93.0.467229070634.issue32917@psf.upfronthosting.co.za> Change by TitanSnow : ---------- pull_requests: +5621 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 02:52:47 2018 From: report at bugs.python.org (TitanSnow) Date: Sat, 24 Feb 2018 07:52:47 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1519458767.04.0.574204596225.issue12345@psf.upfronthosting.co.za> Change by TitanSnow : ---------- pull_requests: +5622 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 02:55:02 2018 From: report at bugs.python.org (TitanSnow) Date: Sat, 24 Feb 2018 07:55:02 +0000 Subject: [issue32917] ConfigParser writes a superfluous final blank line In-Reply-To: <1519349390.35.0.467229070634.issue32917@psf.upfronthosting.co.za> Message-ID: <1519458902.56.0.467229070634.issue32917@psf.upfronthosting.co.za> Change by TitanSnow : Removed file: https://bugs.python.org/file47461/bpo-32917.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 02:56:58 2018 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Sat, 24 Feb 2018 07:56:58 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1519459018.41.0.467229070634.issue12345@psf.upfronthosting.co.za> Change by Chih-Hsuan Yen : ---------- nosy: -yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 03:02:33 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 24 Feb 2018 08:02:33 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1519459353.22.0.467229070634.issue12345@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: -5622 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 03:22:46 2018 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 24 Feb 2018 08:22:46 +0000 Subject: [issue32925] AST optimizer: Change a list into tuple in iterations and containment tests In-Reply-To: <1519422258.29.0.467229070634.issue32925@psf.upfronthosting.co.za> Message-ID: <1519460566.08.0.467229070634.issue32925@psf.upfronthosting.co.za> Stefan Behnel added the comment: An obvious optimisation, if you ask me. PR looks good to me superficially, but I don't know the AST code well. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 03:51:48 2018 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 24 Feb 2018 08:51:48 +0000 Subject: [issue32932] better error message when __all__ contains non-str objects Message-ID: <1519462308.25.0.467229070634.issue32932@psf.upfronthosting.co.za> New submission from Xiang Zhang : I see people wrongly write non-str objects in __all__ and the error message for this case is simply a AttributeError which doesn't reveal the cause directly. >>> from test import * Traceback (most recent call last): File "", line 1, in TypeError: attribute name must be string, not 'C' It would be better to make the cause more obvious, like importlib._bootstrap._handle_fromlist does: Traceback (most recent call last): File "/root/cpython/Lib/test/test_importlib/import_/test_fromlist.py", line 166, in test_invalid_type_in_all self.__import__('pkg', fromlist=['*']) File "/root/cpython/Lib/importlib/_bootstrap.py", line 1094, in __import__ return _handle_fromlist(module, fromlist, _gcd_import) File "/root/cpython/Lib/importlib/_bootstrap.py", line 1019, in _handle_fromlist recursive=True) File "/root/cpython/Lib/importlib/_bootstrap.py", line 1014, in _handle_fromlist raise TypeError(f"Item in {where} must be str, " TypeError: Item in pkg.__all__ must be str, not bytes ---------- components: Interpreter Core messages: 312704 nosy: xiang.zhang priority: normal severity: normal status: open title: better error message when __all__ contains non-str objects type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 03:53:11 2018 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 24 Feb 2018 08:53:11 +0000 Subject: [issue32932] better error message when __all__ contains non-str objects In-Reply-To: <1519462308.25.0.467229070634.issue32932@psf.upfronthosting.co.za> Message-ID: <1519462391.97.0.467229070634.issue32932@psf.upfronthosting.co.za> Xiang Zhang added the comment: s/AttributeError/TypeError ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 03:58:38 2018 From: report at bugs.python.org (Anthony Flury) Date: Sat, 24 Feb 2018 08:58:38 +0000 Subject: [issue32933] mock_open does not support iteration around text files. Message-ID: <1519462718.87.0.467229070634.issue32933@psf.upfronthosting.co.za> New submission from Anthony Flury : Using the unittest.mock helper mock_open with multi-line read data, although readlines method will work on the mocked open data, the commonly used iterator idiom on an open file returns the equivalent of an empty file. from unittest.mock import mock_open read_data = 'line 1\nline 2\nline 3\nline 4\n' with patch('builtins.open', mock_open) as mocked: with open('a.txt', 'r') as fp: assert [l for l in StringIO(read_data)] == [l for l in fp] will fail although it will work on a normal file with the same data, and using [l for l in fp.readlines()] will also work. There is a relatively simple fix which I have a working local version - but I don't know how to provide that back to the library - or even if i should. ---------- components: Library (Lib) messages: 312706 nosy: anthony-flury priority: normal severity: normal status: open title: mock_open does not support iteration around text files. versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 04:36:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 24 Feb 2018 09:36:05 +0000 Subject: [issue32932] better error message when __all__ contains non-str objects In-Reply-To: <1519462308.25.0.467229070634.issue32932@psf.upfronthosting.co.za> Message-ID: <1519464965.67.0.467229070634.issue32932@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Agreed. Seems this was an oversight. Do you want to write a patch yourself or left it on to me? ---------- nosy: +serhiy.storchaka stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 04:50:34 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 24 Feb 2018 09:50:34 +0000 Subject: [issue28134] socket.socket(fileno=fd) does not work as documented In-Reply-To: <1473794011.65.0.923929152137.issue28134@psf.upfronthosting.co.za> Message-ID: <1519465834.85.0.467229070634.issue28134@psf.upfronthosting.co.za> Christian Heimes added the comment: File descriptors are a advanced features and expose low level operating system resources. You really have to understand how the OS works. They cannot be reference counted. In fact they *are* the reference to entries in the Kernel's global open file table. I gave a talked about FDs at PyCon US two years ago, maybe https://speakerdeck.com/tiran/pycon-2016-file-descriptors-unix-sockets-and-other-posix-magic will help you understand fds better. You can make your example work with https://docs.python.org/3/library/socket.html#socket.socket.detach def accept(sock): client, addr = sock.accept() inside = socket(fileno=client.fileno()) client.detach() print(inside) return inside # after return, the client socket is closed by due to detach the fd isn't no longer close The feature works as intended. It's designed to turn an inherited file descriptor (e.g. systemd socket activation) or transfered fds (e.g. through AF_UNIX SCM_RIGHTS). In both cases the fd is already a duplicated fd. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 05:24:49 2018 From: report at bugs.python.org (Enrico Zini) Date: Sat, 24 Feb 2018 10:24:49 +0000 Subject: [issue32934] logging.handlers.BufferingHandler capacity is unclearly specified Message-ID: <1519467889.68.0.467229070634.issue32934@psf.upfronthosting.co.za> New submission from Enrico Zini : BufferingHandler's documentatio says "Initializes the handler with a buffer of the specified capacity." but it does not specify what capacity means. One would assume the intention is to give a bound to memory usage, and that capacity is bytes. Looking at the source instead, the check is: return (len(self.buffer) >= self.capacity) and self.buffer is initialised with an empty list, so capacity is a number of lines, which cannot be used to constrain memory usage, and for which I struggle to see a use case. I believe that the current behaviour is counterintuitive enough to deserve, if not changing, at least documenting ---------- components: Library (Lib) messages: 312709 nosy: enrico priority: normal severity: normal status: open title: logging.handlers.BufferingHandler capacity is unclearly specified versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 05:31:19 2018 From: report at bugs.python.org (Enrico Zini) Date: Sat, 24 Feb 2018 10:31:19 +0000 Subject: [issue32935] Documentation falsely leads to believe that MemoryHandler can be used to wrap SMTPHandler to send multiple messages per email Message-ID: <1519468279.94.0.467229070634.issue32935@psf.upfronthosting.co.za> New submission from Enrico Zini : In the handlers documentation, MemoryHandler directly follows SMTPHandler. SMTPHandler does not document that it is sending an email per every logging invocation, but one can sort of guess it. Right afterwards, there is the documentation of MemoryHandler, which seems to hint that one can use it to buffer up log lines and send all of them with SMTPHandler at flush time, by using it as a target. What really happens when trying to do that, is that at flush time an email per buffered log line is sent instead. It would have saved me significant time and frustration if I had found in SMTPHandler a note saynig that in order to buffer up all log messages and send them as a single email, one needs to reimplement BufferingHandler and all the email composition/sending logic, and the existing handlers provide no build-in facility for doing that. ---------- components: Library (Lib) messages: 312710 nosy: enrico priority: normal severity: normal status: open title: Documentation falsely leads to believe that MemoryHandler can be used to wrap SMTPHandler to send multiple messages per email versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 05:53:13 2018 From: report at bugs.python.org (Oudin) Date: Sat, 24 Feb 2018 10:53:13 +0000 Subject: [issue32936] RobotFileParser.parse() should raise an exception when the robots.txt file is invalid Message-ID: <1519469593.78.0.467229070634.issue32936@psf.upfronthosting.co.za> New submission from Oudin : When processing an ill-formed robots.txt file (like https://tiny.tobast.fr/robots-file ), the RobotFileParser.parse method does not instantiate the entries or the default_entry attributes. In my opinion, the method should raise an exception when no valid User-agent entry (or if there exists an invalid User-agent entry) is found in the robots.txt file. Otherwise, the only method available is to check the None-liness of default_entry, which is not documented in the documentation (https://docs.python.org/dev/library/urllib.robotparser.html). According to your opinion on this, I can implement what is necessary and create a PR on Github. ---------- components: Library (Lib) messages: 312711 nosy: Guinness priority: normal severity: normal status: open title: RobotFileParser.parse() should raise an exception when the robots.txt file is invalid type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 07:55:27 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 24 Feb 2018 12:55:27 +0000 Subject: [issue28124] Rework SSL module documentation In-Reply-To: <1473762840.76.0.666078412099.issue28124@psf.upfronthosting.co.za> Message-ID: <1519476927.11.0.467229070634.issue28124@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 08:36:00 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 24 Feb 2018 13:36:00 +0000 Subject: [issue32819] match_hostname() error reporting bug In-Reply-To: <1518354981.31.0.467229070634.issue32819@psf.upfronthosting.co.za> Message-ID: <1519479360.12.0.467229070634.issue32819@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset aef1283ba428e33397d87cee3c54a5110861552d by Christian Heimes in branch 'master': bpo-32819: Simplify and improve ssl.match_hostname (#5620) https://github.com/python/cpython/commit/aef1283ba428e33397d87cee3c54a5110861552d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 08:37:08 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 24 Feb 2018 13:37:08 +0000 Subject: [issue32819] match_hostname() error reporting bug In-Reply-To: <1518354981.31.0.467229070634.issue32819@psf.upfronthosting.co.za> Message-ID: <1519479428.11.0.467229070634.issue32819@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5623 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 08:46:35 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 24 Feb 2018 13:46:35 +0000 Subject: [issue32930] [help][webbrowser always opens new tab. I want to open in the same tab] In-Reply-To: <1519438633.35.0.467229070634.issue32930@psf.upfronthosting.co.za> Message-ID: <1519479995.27.0.467229070634.issue32930@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Hi Tommy, The documentation states "If new is 0, the url is opened in the same browser window if possible." It seems to be browser dependent, hence the 'if possible' caveat. What operating system and browser are you using? ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 08:49:45 2018 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 24 Feb 2018 13:49:45 +0000 Subject: [issue32932] better error message when __all__ contains non-str objects In-Reply-To: <1519462308.25.0.467229070634.issue32932@psf.upfronthosting.co.za> Message-ID: <1519480185.64.0.467229070634.issue32932@psf.upfronthosting.co.za> Change by Xiang Zhang : ---------- keywords: +patch pull_requests: +5624 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 08:54:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 24 Feb 2018 13:54:05 +0000 Subject: [issue32888] Improve exception message in ast.literal_eval In-Reply-To: <1519147581.54.0.467229070634.issue32888@psf.upfronthosting.co.za> Message-ID: <1519480445.46.0.467229070634.issue32888@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: -5555 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 09:06:48 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 24 Feb 2018 14:06:48 +0000 Subject: [issue32819] match_hostname() error reporting bug In-Reply-To: <1518354981.31.0.467229070634.issue32819@psf.upfronthosting.co.za> Message-ID: <1519481208.78.0.467229070634.issue32819@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 46632f4d3c1f3aef875d2ada750a298ab0510992 by Christian Heimes (Miss Islington (bot)) in branch '3.7': [3.7] bpo-32819: Simplify and improve ssl.match_hostname (GH-5620) (#5847) https://github.com/python/cpython/commit/46632f4d3c1f3aef875d2ada750a298ab0510992 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 09:06:54 2018 From: report at bugs.python.org (TitanSnow) Date: Sat, 24 Feb 2018 14:06:54 +0000 Subject: [issue32930] [help][webbrowser always opens new tab. I want to open in the same tab] In-Reply-To: <1519438633.35.0.467229070634.issue32930@psf.upfronthosting.co.za> Message-ID: <1519481214.78.0.467229070634.issue32930@psf.upfronthosting.co.za> TitanSnow added the comment: Hi Cheryl, I think you may misunderstand. What it means is to open URL in the *same tab*, not *same window*, which is not described in documentation. Hi Tommy, It?s hard to say what is ?the same tab?. Is it the current tab or the tab opened by last webbrowser.open call? If the user open a new tab in the opened browser, then which tab is ?the same tab?? ---------- nosy: +tttnns _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 09:09:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 24 Feb 2018 14:09:54 +0000 Subject: [issue32932] better error message when __all__ contains non-str objects In-Reply-To: <1519462308.25.0.467229070634.issue32932@psf.upfronthosting.co.za> Message-ID: <1519481394.41.0.467229070634.issue32932@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Added import experts since this issue can be not so trivial as looked at first glance. ---------- nosy: +brett.cannon, eric.snow, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 09:10:24 2018 From: report at bugs.python.org (Emanuel Barry) Date: Sat, 24 Feb 2018 14:10:24 +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: <1519481424.95.0.467229070634.issue32912@psf.upfronthosting.co.za> Change by Emanuel Barry : ---------- keywords: +patch pull_requests: +5625 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 09:15:13 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 24 Feb 2018 14:15:13 +0000 Subject: [issue32930] [help][webbrowser always opens new tab. I want to open in the same tab] In-Reply-To: <1519438633.35.0.467229070634.issue32930@psf.upfronthosting.co.za> Message-ID: <1519481713.23.0.467229070634.issue32930@psf.upfronthosting.co.za> Cheryl Sabella added the comment: TitanSnow, You're right, sorry about the confusion. But, nevertheless, this does seem to be something that the browsers don't have available as an option. Here's the Mozilla command line option page: https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options Under the Browser section, there is a note stating: Note: When opening multiple URLs, Firefox always opens them as tabs in a new window. I believe the other browsers behave the same. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 09:17:03 2018 From: report at bugs.python.org (Eric Gorr) Date: Sat, 24 Feb 2018 14:17:03 +0000 Subject: [issue32937] Multiprocessing worker functions not terminating with a large number of processes and a manager Message-ID: <1519481823.24.0.467229070634.issue32937@psf.upfronthosting.co.za> New submission from Eric Gorr : I have the following code: import multiprocessing from multiprocessing import Pool, Manager import time import random def worker_function( index, messages ): print( "%d: Entered" % index ) time.sleep( random.randint( 3, 15 ) ) messages.put( "From: %d" % index ) print( "%d: Exited" % index ) manager = Manager() messages = manager.Queue() with Pool( processes = None ) as pool: for x in range( 30 ): pool.apply_async( worker_function, [ x, messages ] ) pool.close() pool.join() It does not terminate -- all entered messages are printed, but not all exited messages are printed. If I remove all the code related to the Manager and Queue, it will terminate properly with all messages printed. If I assign processes explicitly, I can continue to increase the number assigned to processes and have it continue to work until I reach a value of 20 or 21. > 20, it fails all of the time. With a value == 20 it fails some of the time. With a value of < 20, it always succeeds. multiprocessing.cpu_count() returns 24 for my MacPro. ---------- components: Library (Lib), macOS messages: 312718 nosy: Eric Gorr, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Multiprocessing worker functions not terminating with a large number of processes and a manager versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 09:21:03 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 24 Feb 2018 14:21:03 +0000 Subject: [issue32938] webbrowser: Add options for private mode Message-ID: <1519482063.67.0.467229070634.issue32938@psf.upfronthosting.co.za> New submission from Cheryl Sabella : When looking at the command line option page for Mozilla (https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options), I noticed options for opening a private mode window (-private-window or -private-window URL). Chrome also has an --incognito switch. (https://peter.sh/experiments/chromium-command-line-switches/) Maybe it would be nice to add a flag to allow for options? ---------- components: Library (Lib) messages: 312719 nosy: csabella priority: normal severity: normal status: open title: webbrowser: Add options for private mode type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 09:25:35 2018 From: report at bugs.python.org (TitanSnow) Date: Sat, 24 Feb 2018 14:25:35 +0000 Subject: [issue32930] [help][webbrowser always opens new tab. I want to open in the same tab] In-Reply-To: <1519438633.35.0.467229070634.issue32930@psf.upfronthosting.co.za> Message-ID: <1519482335.54.0.467229070634.issue32930@psf.upfronthosting.co.za> TitanSnow added the comment: Yes, I think so. Maybe, in a web application, to achieve this, the way is to use a GUI library then use its web view widget. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 09:34:43 2018 From: report at bugs.python.org (bbayles) Date: Sat, 24 Feb 2018 14:34:43 +0000 Subject: [issue32146] multiprocessing freeze_support needed outside win32 In-Reply-To: <1511778835.66.0.213398074469.issue32146@psf.upfronthosting.co.za> Message-ID: <1519482883.41.0.467229070634.issue32146@psf.upfronthosting.co.za> Change by bbayles : ---------- pull_requests: +5626 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 10:09:14 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 24 Feb 2018 15:09:14 +0000 Subject: [issue32819] match_hostname() error reporting bug In-Reply-To: <1518354981.31.0.467229070634.issue32819@psf.upfronthosting.co.za> Message-ID: <1519484954.17.0.467229070634.issue32819@psf.upfronthosting.co.za> Christian Heimes added the comment: master and 3.7 are fixed. Should I backport the issue to 2.7 and 3.6, too? It changes behavior slightly because it drops support for partial wildcards. RFC 6125 consider it an optional feature. AFAIK browsers don't match them either. ---------- nosy: +alex, dstufft, janssen resolution: -> fixed stage: patch review -> resolved status: open -> pending versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 10:10:18 2018 From: report at bugs.python.org (Alex Gaynor) Date: Sat, 24 Feb 2018 15:10:18 +0000 Subject: [issue32819] match_hostname() error reporting bug In-Reply-To: <1518354981.31.0.467229070634.issue32819@psf.upfronthosting.co.za> Message-ID: <1519485018.09.0.467229070634.issue32819@psf.upfronthosting.co.za> Alex Gaynor added the comment: Can confirm, no browsers do partial (or multiple) wildcards and the CABF rules don't allow public CAs to issue them. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 10:10:46 2018 From: report at bugs.python.org (Alex Gaynor) Date: Sat, 24 Feb 2018 15:10:46 +0000 Subject: [issue32819] match_hostname() error reporting bug In-Reply-To: <1518354981.31.0.467229070634.issue32819@psf.upfronthosting.co.za> Message-ID: <1519485046.23.0.467229070634.issue32819@psf.upfronthosting.co.za> Alex Gaynor added the comment: (Didn't mean to update status) ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 10:16:36 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 24 Feb 2018 15:16:36 +0000 Subject: [issue32819] match_hostname() error reporting bug In-Reply-To: <1518354981.31.0.467229070634.issue32819@psf.upfronthosting.co.za> Message-ID: <1519485396.19.0.467229070634.issue32819@psf.upfronthosting.co.za> Christian Heimes added the comment: I also fixed an issue for Brandon's backport, https://bitbucket.org/brandon/backports.ssl_match_hostname/issues/12/update-to-implementation-from-37 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 10:13:55 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 24 Feb 2018 15:13:55 +0000 Subject: [issue32819] match_hostname() error reporting bug In-Reply-To: <1518354981.31.0.467229070634.issue32819@psf.upfronthosting.co.za> Message-ID: <1519485235.76.0.467229070634.issue32819@psf.upfronthosting.co.za> Christian Heimes added the comment: Don't worry, it happens automatically when somebody replies to a pending ticket w/o closing it explicitly. I need to backport the patch manually. ---------- resolution: fixed -> stage: resolved -> needs patch status: pending -> open versions: +Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 10:38:34 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 24 Feb 2018 15:38:34 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse In-Reply-To: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> Message-ID: <1519486714.15.0.467229070634.issue32880@psf.upfronthosting.co.za> Cheryl Sabella added the comment: New issue: find_good_parse_start() call in editor.py has the wrong signature. There's actually a few things going on here. Here's the section in editor: ``` if not self.context_use_ps1: for context in self.num_context_lines: startat = max(lno - context, 1) startatindex = repr(startat) + ".0" rawtext = text.get(startatindex, "insert") y.set_code(rawtext) bod = y.find_good_parse_start( self.context_use_ps1, self._build_char_in_string_func(startatindex)) if bod is not None or startat == 1: break y.set_lo(bod or 0) else: r = text.tag_prevrange("console", "insert") if r: startatindex = r[1] else: startatindex = "1.0" rawtext = text.get(startatindex, "insert") y.set_code(rawtext) y.set_lo(0) ``` 1. self.context_use_ps1 is always False. There's no where in IDLE that it can be set to True. I'll open an another issue for this since it's really not pyparse. 2. The call to find_good_parse_start: ``` bod = y.find_good_parse_start( self.context_use_ps1, self._build_char_in_string_func(startatindex)) ``` sends 3 parameters. And in pyparse, the signature allows 3. However, the signature is: ``` def find_good_parse_start(self, is_char_in_string=None, _synchre=_synchre): ``` This means that the False self.use_context_ps1 is the first value instead of the function, so pyparse is always executing: ``` if not is_char_in_string: # no clue -- make the caller pass everything return None ``` In the test, I had assumed this was for the default of None. Bad assumption. :-( Here's the commit that changed the signature: https://github.com/python/cpython/commit/b17544551fc8dfd1304d5679c6e444cad4d34d97 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 10:52:53 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 24 Feb 2018 15:52:53 +0000 Subject: [issue32939] IDLE: self.use_context_ps1 defined in editor, but always False Message-ID: <1519487573.87.0.467229070634.issue32939@psf.upfronthosting.co.za> New submission from Cheryl Sabella : In the EditorWindow in editor.py, there is an attribute called `self.context_use_ps1` that is only set to False. Changed to an instance variable in: https://github.com/python/cpython/commit/6af44986029c84c4c5df62a64c60a6ed978a3693 Removed from pyshell in: https://github.com/python/cpython/commit/e86172d63af5827a3c2b55b80351cb38a26190eb ---------- assignee: terry.reedy components: IDLE messages: 312727 nosy: csabella, terry.reedy priority: normal severity: normal status: open title: IDLE: self.use_context_ps1 defined in editor, but always False type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 10:56:40 2018 From: report at bugs.python.org (William Pickard) Date: Sat, 24 Feb 2018 15:56:40 +0000 Subject: [issue32928] _findvs failing on Windows 10 (Release build only) In-Reply-To: <1519427415.69.0.467229070634.issue32928@psf.upfronthosting.co.za> Message-ID: <1519487800.24.0.467229070634.issue32928@psf.upfronthosting.co.za> William Pickard added the comment: Looks like something wierd about my computer as the powershell module that interacts with the API also has the issue with Windows reporting "File not found" for a 2nd instance (maybe Community edition of VS) ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 11:04:09 2018 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 24 Feb 2018 16:04:09 +0000 Subject: [issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False) In-Reply-To: <1519436693.93.0.467229070634.issue32929@psf.upfronthosting.co.za> Message-ID: <1519488249.54.0.467229070634.issue32929@psf.upfronthosting.co.za> Guido van Rossum added the comment: It is important to convey the idea that if you are thinking of using this you are probably doing something fishy. An alternative could be `_hash`, which at least indicates it is not for general use, like `sys._getframe()`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 11:55:53 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 24 Feb 2018 16:55:53 +0000 Subject: [issue31966] [EASY C][Windows] print('hello\n', end='', flush=True) raises OSError when ran with py -u In-Reply-To: <1510047605.77.0.213398074469.issue31966@psf.upfronthosting.co.za> Message-ID: <1519491353.51.0.467229070634.issue31966@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 42c35d9c0c8175332f50fbe034a001fe52f057b9 by Serhiy Storchaka in branch 'master': bpo-31966: Fixed WindowsConsoleIO.write() for writing empty data. (GH-5754) https://github.com/python/cpython/commit/42c35d9c0c8175332f50fbe034a001fe52f057b9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 11:55:54 2018 From: report at bugs.python.org (Steve Dower) Date: Sat, 24 Feb 2018 16:55:54 +0000 Subject: [issue32928] _findvs failing on Windows 10 (Release build only) In-Reply-To: <1519427415.69.0.467229070634.issue32928@psf.upfronthosting.co.za> Message-ID: <1519491354.78.0.467229070634.issue32928@psf.upfronthosting.co.za> Steve Dower added the comment: If you think it should be working, go ahead and use the Report a Problem tool in VS to let the team know about the PowerShell module. There might be a case that isn't handled properly in their code that they can fix (obviously they don't know/care about the Python module, but we are using the same API). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 11:57:03 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 24 Feb 2018 16:57:03 +0000 Subject: [issue31966] [EASY C][Windows] print('hello\n', end='', flush=True) raises OSError when ran with py -u In-Reply-To: <1510047605.77.0.213398074469.issue31966@psf.upfronthosting.co.za> Message-ID: <1519491423.57.0.467229070634.issue31966@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5627 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 11:58:02 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 24 Feb 2018 16:58:02 +0000 Subject: [issue31966] [EASY C][Windows] print('hello\n', end='', flush=True) raises OSError when ran with py -u In-Reply-To: <1510047605.77.0.213398074469.issue31966@psf.upfronthosting.co.za> Message-ID: <1519491482.39.0.467229070634.issue31966@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5628 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 11:58:10 2018 From: report at bugs.python.org (William Pickard) Date: Sat, 24 Feb 2018 16:58:10 +0000 Subject: [issue32928] _findvs failing on Windows 10 (Release build only) In-Reply-To: <1519427415.69.0.467229070634.issue32928@psf.upfronthosting.co.za> Message-ID: <1519491490.6.0.467229070634.issue32928@psf.upfronthosting.co.za> William Pickard added the comment: The powershell module that interacts with the API works if I don't supply "-All", supplying said option produces the same issue that is plagues me when _findvs.findall() is used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 12:30:55 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 24 Feb 2018 17:30:55 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse In-Reply-To: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> Message-ID: <1519493455.63.0.467229070634.issue32880@psf.upfronthosting.co.za> Cheryl Sabella added the comment: For msg312444 on StringTranslatePseudoMapping: I ran a comparison of the current class vs defaultdict. This was my test: ``` with open('/home/cheryl/cpython/Lib/idlelib/pyparse.py') as fd: code = fd.read() copies = 20000 code *= copies for i in range(10): start = time.time() trans_code = code.translate(_tran) end = time.time() print(f'copies: {copies} translate time: {end - start}') ``` I ran the current `_tran` first and saved the results. ``` _tran = {} _tran.update((ord(c), ord('(')) for c in "({[") _tran.update((ord(c), ord(')')) for c in ")}]") _tran.update((ord(c), ord(c)) for c in "\"'\\\n#") _tran = StringTranslatePseudoMapping(_tran, default_value=ord('x')) ``` I know time.time isn't perfect, but thought it might be good enough. The results: copies: 20000 translate time: 0.8162932395935059 copies: 20000 translate time: 0.610985517501831 copies: 20000 translate time: 0.8164870738983154 copies: 20000 translate time: 0.6125986576080322 copies: 20000 translate time: 0.8143167495727539 copies: 20000 translate time: 0.612929105758667 copies: 20000 translate time: 0.8299245834350586 copies: 20000 translate time: 0.6127865314483643 copies: 20000 translate time: 0.812185525894165 copies: 20000 translate time: 0.6151354312896729 Then I changed it to a defaultdict: ``` _tran = defaultdict(lambda: 'x') # _tran = {} _tran.update((ord(c), ord('(')) for c in "({[") _tran.update((ord(c), ord(')')) for c in ")}]") _tran.update((ord(c), ord(c)) for c in "\"'\\\n#") # _tran = StringTranslatePseudoMapping(_tran, default_value=ord('x')) ``` I compared the results to make sure the defaultdict produced the same output as the mapping, which it did. The results: copies: 20000 translate time: 0.8172969818115234 copies: 20000 translate time: 0.6214878559112549 copies: 20000 translate time: 0.8143007755279541 copies: 20000 translate time: 0.6127951145172119 copies: 20000 translate time: 0.8154017925262451 copies: 20000 translate time: 0.6144123077392578 copies: 20000 translate time: 0.8128812313079834 copies: 20000 translate time: 0.6167266368865967 copies: 20000 translate time: 0.8143749237060547 copies: 20000 translate time: 0.6116495132446289 So, the results are simliar, down to the alternating of .61ish and .81ish times. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 12:38:40 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 24 Feb 2018 17:38:40 +0000 Subject: [issue32940] IDLE: pyparse - replace StringTranslatePseudoMappingTest with defaultdict Message-ID: <1519493920.19.0.467229070634.issue32940@psf.upfronthosting.co.za> New submission from Cheryl Sabella : Based on timing test on msg312733, StringTranslatePseudoMappingTest and a defaultdict have about the same performance, so this replaces the custom class with the stdlib functionality. ---------- assignee: terry.reedy components: IDLE messages: 312734 nosy: csabella, terry.reedy priority: normal severity: normal status: open title: IDLE: pyparse - replace StringTranslatePseudoMappingTest with defaultdict type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 12:39:20 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 24 Feb 2018 17:39:20 +0000 Subject: [issue31966] [EASY C][Windows] print('hello\n', end='', flush=True) raises OSError when ran with py -u In-Reply-To: <1510047605.77.0.213398074469.issue31966@psf.upfronthosting.co.za> Message-ID: <1519493960.72.0.467229070634.issue31966@psf.upfronthosting.co.za> miss-islington added the comment: New changeset e49bf0f353a968cddc4d8e6ea668b9d2d116e2ac by Miss Islington (bot) in branch '3.7': bpo-31966: Fixed WindowsConsoleIO.write() for writing empty data. (GH-5754) https://github.com/python/cpython/commit/e49bf0f353a968cddc4d8e6ea668b9d2d116e2ac ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 12:43:07 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 24 Feb 2018 17:43:07 +0000 Subject: [issue31966] [EASY C][Windows] print('hello\n', end='', flush=True) raises OSError when ran with py -u In-Reply-To: <1510047605.77.0.213398074469.issue31966@psf.upfronthosting.co.za> Message-ID: <1519494187.64.0.467229070634.issue31966@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 980790eee0c804061a49b8ad7373e4669b48f2ec by Miss Islington (bot) in branch '3.6': bpo-31966: Fixed WindowsConsoleIO.write() for writing empty data. (GH-5754) https://github.com/python/cpython/commit/980790eee0c804061a49b8ad7373e4669b48f2ec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 12:44:26 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 24 Feb 2018 17:44:26 +0000 Subject: [issue32940] IDLE: pyparse - replace StringTranslatePseudoMappingTest with defaultdict In-Reply-To: <1519493920.19.0.467229070634.issue32940@psf.upfronthosting.co.za> Message-ID: <1519494266.25.0.467229070634.issue32940@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +5629 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 12:45:13 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 24 Feb 2018 17:45:13 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse In-Reply-To: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> Message-ID: <1519494313.56.0.467229070634.issue32880@psf.upfronthosting.co.za> Cheryl Sabella added the comment: For msg312444 on StringTranslatePseudoMapping: I ran a comparison of the current class vs defaultdict. This was my test: ``` with open('/home/cheryl/cpython/Lib/idlelib/pyparse.py') as fd: code = fd.read() copies = 20000 code *= copies for i in range(10): start = time.time() trans_code = code.translate(_tran) end = time.time() print(f'copies: {copies} translate time: {end - start}') ``` I ran the current `_tran` first and saved the results. ``` _tran = {} _tran.update((ord(c), ord('(')) for c in "({[") _tran.update((ord(c), ord(')')) for c in ")}]") _tran.update((ord(c), ord(c)) for c in "\"'\\\n#") _tran = StringTranslatePseudoMapping(_tran, default_value=ord('x')) ``` I know time.time isn't perfect, but thought it might be good enough. The results: copies: 20000 translate time: 0.8162932395935059 copies: 20000 translate time: 0.610985517501831 copies: 20000 translate time: 0.8164870738983154 copies: 20000 translate time: 0.6125986576080322 copies: 20000 translate time: 0.8143167495727539 copies: 20000 translate time: 0.612929105758667 copies: 20000 translate time: 0.8299245834350586 copies: 20000 translate time: 0.6127865314483643 copies: 20000 translate time: 0.812185525894165 copies: 20000 translate time: 0.6151354312896729 Then I changed it to a defaultdict: ``` _tran = defaultdict(lambda: 'x') # _tran = {} _tran.update((ord(c), ord('(')) for c in "({[") _tran.update((ord(c), ord(')')) for c in ")}]") _tran.update((ord(c), ord(c)) for c in "\"'\\\n#") # _tran = StringTranslatePseudoMapping(_tran, default_value=ord('x')) ``` I compared the results to make sure the defaultdict produced the same output as the mapping, which it did. The results: copies: 20000 translate time: 0.8172969818115234 copies: 20000 translate time: 0.6214878559112549 copies: 20000 translate time: 0.8143007755279541 copies: 20000 translate time: 0.6127951145172119 copies: 20000 translate time: 0.8154017925262451 copies: 20000 translate time: 0.6144123077392578 copies: 20000 translate time: 0.8128812313079834 copies: 20000 translate time: 0.6167266368865967 copies: 20000 translate time: 0.8143749237060547 copies: 20000 translate time: 0.6116495132446289 So, the results are simliar, down to the alternating of .61ish and .81ish times. ---------- dependencies: +IDLE: pyparse - replace StringTranslatePseudoMappingTest with defaultdict _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 12:54:31 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 24 Feb 2018 17:54:31 +0000 Subject: [issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False) In-Reply-To: <1519436693.93.0.467229070634.issue32929@psf.upfronthosting.co.za> Message-ID: <1519494871.05.0.467229070634.issue32929@psf.upfronthosting.co.za> Eric V. Smith added the comment: Note that this class (from the test suite) will now raise an exception: @dataclass(unsafe_hash=True) class C: i: int def __eq__(self, other): return self.i == other.i That's because it has a __hash__, added when __eq__ is defined. I think we're better off with the rule being: If unsafe_hash=True, raise an exception if __hash__ exists and is not None. Otherwise add __hash__. That's how it used to be with hash=True (in 3.70b1). Or is that what you meant by "but if a __hash__ method is present, an exception is raised"? Notice the word "method", instead of attribute. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 13:23:23 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 24 Feb 2018 18:23:23 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse In-Reply-To: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> Message-ID: <1519496603.03.0.467229070634.issue32880@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I also timed this for a `_tran` optimization (instead of looping and doing the `ord`), but it didn't really make a difference. ``` _tran = defaultdict(lambda: 'x') _tran.update({40: 40, # ord('(') 91: 40, # ord('[') 123: 40, # ord('{') 41: 41, # ord(')') 93: 41, # ord(']') 125: 41, # ord('}') 34: 34, # ord('"') 39: 39, # ord("'") 92: 92, # ord("\\") 10: 10, # ord("\n") 35: 35, # ord("#") }) ``` I think both the loop and the above mapping are equally difficult to understand without stopping to think about it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 13:27:14 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 24 Feb 2018 18:27:14 +0000 Subject: [issue32930] [help][webbrowser always opens new tab. I want to open in the same tab] In-Reply-To: <1519438633.35.0.467229070634.issue32930@psf.upfronthosting.co.za> Message-ID: <1519496834.8.0.467229070634.issue32930@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I'm going to close this as third party since it's browser and not Python related. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 13:29:08 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 24 Feb 2018 18:29:08 +0000 Subject: [issue32940] IDLE: pyparse - replace StringTranslatePseudoMapping with defaultdict In-Reply-To: <1519493920.19.0.467229070634.issue32940@psf.upfronthosting.co.za> Message-ID: <1519496948.98.0.467229070634.issue32940@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- title: IDLE: pyparse - replace StringTranslatePseudoMappingTest with defaultdict -> IDLE: pyparse - replace StringTranslatePseudoMapping with defaultdict _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 13:56:45 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 24 Feb 2018 18:56:45 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse In-Reply-To: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> Message-ID: <1519498605.58.0.467229070634.issue32880@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I wish I could delete my last message (and duplicate posting of the one before. On the last one, I didn't move my timings. I feel like an idiot. Anyway, there is a difference. ``` start = time.time() for i in range(1000000): _tran = defaultdict(lambda: 'x') _tran.update((ord(c), ord('(')) for c in "({[") _tran.update((ord(c), ord(')')) for c in ")}]") _tran.update((ord(c), ord(c)) for c in "\"'\\\n#") end = time.time() print(f'translate time: {end - start}') ``` translate time: 7.443669319152832 ``` start = time.time() for i in range(1000000): _tran = defaultdict(lambda: 'x') _tran.update({40: 40, # ord('(') 91: 40, # ord('[') 123: 40, # ord('{') 41: 41, # ord(')') 93: 41, # ord(']') 125: 41, # ord('}') 34: 34, # ord('"') 39: 39, # ord("'") 92: 92, # ord("\\") 10: 10, # ord("\n") 35: 35, # ord("#") }) end = time.time() print(f'translate time: {end - start}') ``` translate time: 1.7251780033111572 It's still probably negligible since it's only done once and not a million times. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 14:00:21 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 24 Feb 2018 19:00:21 +0000 Subject: [issue32924] Python 3.7 docs in docs.p.o points to GitHub's master branch In-Reply-To: <1519405058.43.0.467229070634.issue32924@psf.upfronthosting.co.za> Message-ID: <1519498821.64.0.467229070634.issue32924@psf.upfronthosting.co.za> Ned Deily added the comment: It would be great if the URL in the template were constructed from the value of SOURCE_URI in Doc/tools/extensions/pyspecific.py. I was unaware that there was this additional URL reference in the template. ---------- nosy: +ned.deily resolution: fixed -> stage: resolved -> needs patch status: closed -> open versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 14:03:00 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 24 Feb 2018 19:03:00 +0000 Subject: [issue32937] Multiprocessing worker functions not terminating with a large number of processes and a manager In-Reply-To: <1519481823.24.0.467229070634.issue32937@psf.upfronthosting.co.za> Message-ID: <1519498980.81.0.467229070634.issue32937@psf.upfronthosting.co.za> Change by Ned Deily : ---------- nosy: +davin, pitrou -ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 14:05:19 2018 From: report at bugs.python.org (Brett Cannon) Date: Sat, 24 Feb 2018 19:05:19 +0000 Subject: [issue32932] better error message when __all__ contains non-str objects In-Reply-To: <1519462308.25.0.467229070634.issue32932@psf.upfronthosting.co.za> Message-ID: <1519499119.72.0.467229070634.issue32932@psf.upfronthosting.co.za> Brett Cannon added the comment: Fixing the message makes sense. I assume this is happening in ceval.c or import.c since https://github.com/python/cpython/blob/42c35d9c0c8175332f50fbe034a001fe52f057b9/Lib/importlib/_bootstrap.py#L1021 has the appropriate message? ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 14:06:56 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 24 Feb 2018 19:06:56 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse In-Reply-To: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> Message-ID: <1519499216.54.0.467229070634.issue32880@psf.upfronthosting.co.za> Cheryl Sabella added the comment: For msg312474 regarding replace vs re. Running the 20,000 copy version of the translated text (only translating once gives the following timings: copies: 20000 translate time: 5.591020822525024 copies: 20000 translate time: 5.5614333152771 copies: 20000 translate time: 5.561311483383179 copies: 20000 translate time: 5.558183670043945 copies: 20000 translate time: 5.580726385116577 copies: 20000 translate time: 5.588990688323975 copies: 20000 translate time: 5.570690155029297 copies: 20000 translate time: 5.601408004760742 copies: 20000 translate time: 5.76714825630188 copies: 20000 translate time: 5.697475910186768 And the re version gives: copies: 20000 translate time: 5.935032844543457 copies: 20000 translate time: 5.939348220825195 copies: 20000 translate time: 5.933218240737915 copies: 20000 translate time: 6.070481538772583 copies: 20000 translate time: 6.319685935974121 copies: 20000 translate time: 6.4209065437316895 copies: 20000 translate time: 6.476579666137695 copies: 20000 translate time: 6.520790100097656 copies: 20000 translate time: 6.541554927825928 copies: 20000 translate time: 6.620612859725952 So, it's a little slower on a big string. It also gives slightly different results because of the last replace: code.replace('\nx', '\n') isn't in the re. On a more practical size document, they are about the same: replace: copies: 20 translate time: 0.0058782100677490234 copies: 20 translate time: 0.006024599075317383 copies: 20 translate time: 0.0056345462799072266 copies: 20 translate time: 0.005848884582519531 copies: 20 translate time: 0.005696296691894531 copies: 20 translate time: 0.00574946403503418 copies: 20 translate time: 0.005642890930175781 copies: 20 translate time: 0.005755901336669922 copies: 20 translate time: 0.0058023929595947266 copies: 20 translate time: 0.005713939666748047 re: copies: 20 translate time: 0.005833148956298828 copies: 20 translate time: 0.005682229995727539 copies: 20 translate time: 0.00565028190612793 copies: 20 translate time: 0.005823850631713867 copies: 20 translate time: 0.0057680606842041016 copies: 20 translate time: 0.0058100223541259766 copies: 20 translate time: 0.005717277526855469 copies: 20 translate time: 0.005885601043701172 copies: 20 translate time: 0.005852460861206055 copies: 20 translate time: 0.005867958068847656 It appears the time for the replace is linear and the re is just a little more than linear. Maybe it's just my computer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 14:13:51 2018 From: report at bugs.python.org (R. David Murray) Date: Sat, 24 Feb 2018 19:13:51 +0000 Subject: [issue32884] Adding the ability for getpass to print asterisks when passowrd is typed In-Reply-To: <1519122533.37.0.467229070634.issue32884@psf.upfronthosting.co.za> Message-ID: <1519499631.3.0.467229070634.issue32884@psf.upfronthosting.co.za> R. David Murray added the comment: getpass is emulating the unix password prompt behavior. I'm not sure if the complication is worth it, especially since not echoing asterisks is, as you observe, fractionally more secure. So I guess I'm about -.5 on this feature. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 14:16:46 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 24 Feb 2018 19:16:46 +0000 Subject: [issue32931] Python 3.70b1 specifies non-existent compiler gcc++ In-Reply-To: <1519445004.46.0.467229070634.issue32931@psf.upfronthosting.co.za> Message-ID: <1519499806.74.0.467229070634.issue32931@psf.upfronthosting.co.za> Change by Ned Deily : ---------- keywords: +patch pull_requests: +5630 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 14:20:21 2018 From: report at bugs.python.org (R. David Murray) Date: Sat, 24 Feb 2018 19:20:21 +0000 Subject: [issue32886] new Boolean ABC in numbers module In-Reply-To: <1519133521.3.0.467229070634.issue32886@psf.upfronthosting.co.za> Message-ID: <1519500021.58.0.467229070634.issue32886@psf.upfronthosting.co.za> Change by R. David Murray : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 14:30:46 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 24 Feb 2018 19:30:46 +0000 Subject: [issue32931] Python 3.70b1 specifies non-existent compiler gcc++ In-Reply-To: <1519445004.46.0.467229070634.issue32931@psf.upfronthosting.co.za> Message-ID: <1519500646.57.0.467229070634.issue32931@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset acd7163c0a0674b2fb6cc0178d52cf90c953fbae by Ned Deily in branch 'master': bpo-32931: fix macOS 10.9+ installer c++ compiler name (#5855) https://github.com/python/cpython/commit/acd7163c0a0674b2fb6cc0178d52cf90c953fbae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 14:30:55 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 24 Feb 2018 19:30:55 +0000 Subject: [issue32931] Python 3.70b1 specifies non-existent compiler gcc++ In-Reply-To: <1519445004.46.0.467229070634.issue32931@psf.upfronthosting.co.za> Message-ID: <1519500655.1.0.467229070634.issue32931@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5631 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 14:46:01 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 24 Feb 2018 19:46:01 +0000 Subject: [issue32937] Multiprocessing worker functions not terminating with a large number of processes and a manager In-Reply-To: <1519481823.24.0.467229070634.issue32937@psf.upfronthosting.co.za> Message-ID: <1519501561.62.0.467229070634.issue32937@psf.upfronthosting.co.za> Antoine Pitrou added the comment: What happens if you add another process that calls get() on the queue? You should not try to put data on a queue if you don't ever plan to consume it, as the queue's background thread will eventually block until something gets consumed. For example, this blocks here on Linux: $ ./python -c "import multiprocessing as mp; q = mp.Queue(); [q.put(None) for i in range(50000)]" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 14:52:16 2018 From: report at bugs.python.org (EricG) Date: Sat, 24 Feb 2018 19:52:16 +0000 Subject: [issue32937] Multiprocessing worker functions not terminating with a large number of processes and a manager In-Reply-To: <1519481823.24.0.467229070634.issue32937@psf.upfronthosting.co.za> Message-ID: <1519501936.73.0.467229070634.issue32937@psf.upfronthosting.co.za> EricG added the comment: I do plan to consume the messages on the queue, but only after all worker functions are complete...after pool.join() returns. Is this not ok? I can certainly spawn a thread on the main process which will consume the queue entries and insert them into a list or queue which can then be accessed after join returns. Is that the correct way this code should be written? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 14:59:27 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 24 Feb 2018 19:59:27 +0000 Subject: [issue32931] Python 3.70b1 specifies non-existent compiler gcc++ In-Reply-To: <1519445004.46.0.467229070634.issue32931@psf.upfronthosting.co.za> Message-ID: <1519502367.49.0.467229070634.issue32931@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset d24c5a068c1831a8579a5915f44ae3b4344aba43 by Ned Deily (Miss Islington (bot)) in branch '3.7': [3.7] bpo-32931: fix macOS 10.9+ installer c++ compiler name (GH-5856) https://github.com/python/cpython/commit/d24c5a068c1831a8579a5915f44ae3b4344aba43 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 15:02:00 2018 From: report at bugs.python.org (Ned Deily) Date: Sat, 24 Feb 2018 20:02:00 +0000 Subject: [issue32931] Python 3.70b1 specifies non-existent compiler gcc++ In-Reply-To: <1519445004.46.0.467229070634.issue32931@psf.upfronthosting.co.za> Message-ID: <1519502520.58.0.467229070634.issue32931@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for noticing! Fixed for 3.7.0b2. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 15:04:22 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 24 Feb 2018 20:04:22 +0000 Subject: [issue32937] Multiprocessing worker functions not terminating with a large number of processes and a manager In-Reply-To: <1519481823.24.0.467229070634.issue32937@psf.upfronthosting.co.za> Message-ID: <1519502662.02.0.467229070634.issue32937@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm not sure... I cannot reproduce your problem on Linux, even with 50 processes and 10000 iterations, on Python 3.6.4. Which exact version are you using? What happens if you replace the manager Queue with a non-manager Queue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 15:07:12 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 24 Feb 2018 20:07:12 +0000 Subject: [issue32940] IDLE: pyparse - replace StringTranslatePseudoMapping with defaultdict In-Reply-To: <1519493920.19.0.467229070634.issue32940@psf.upfronthosting.co.za> Message-ID: <1519502832.17.0.467229070634.issue32940@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Tal had written this on the original issue21765: ---- Finally, since the defaultdict is kept around as long as IDLE is running, I decided to avoid having it grow continually and consume memory unnecessarily. So I wrote a simple Mapping class, which wraps a normal dict and uses a custom default value instead of None, ord('x') in this case. Works like a charm :) ----- So maybe I misunderstood and this shouldn't be a defaultdict? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 15:10:59 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 24 Feb 2018 20:10:59 +0000 Subject: [issue24334] SSLSocket extra level of indirection In-Reply-To: <1433018248.44.0.756605302302.issue24334@psf.upfronthosting.co.za> Message-ID: <1519503059.32.0.467229070634.issue24334@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 141c5e8c2437a9fed95a04c81e400ef725592a17 by Christian Heimes in branch 'master': bpo-24334: Cleanup SSLSocket (#5252) https://github.com/python/cpython/commit/141c5e8c2437a9fed95a04c81e400ef725592a17 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 15:11:08 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 24 Feb 2018 20:11:08 +0000 Subject: [issue24334] SSLSocket extra level of indirection In-Reply-To: <1433018248.44.0.756605302302.issue24334@psf.upfronthosting.co.za> Message-ID: <1519503068.05.0.467229070634.issue24334@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5632 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 15:28:43 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 24 Feb 2018 20:28:43 +0000 Subject: [issue31355] Remove Travis CI macOS job: rely on buildbots In-Reply-To: <1504653881.76.0.488933881504.issue31355@psf.upfronthosting.co.za> Message-ID: <1519504123.53.0.467229070634.issue31355@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- keywords: +patch pull_requests: +5633 stage: resolved -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 15:44:15 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 24 Feb 2018 20:44:15 +0000 Subject: [issue30622] Fix NPN guard for OpenSSL 1.1 In-Reply-To: <1497107294.71.0.653300932954.issue30622@psf.upfronthosting.co.za> Message-ID: <1519505055.31.0.467229070634.issue30622@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- pull_requests: +5634 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 15:51:59 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 24 Feb 2018 20:51:59 +0000 Subject: [issue24334] SSLSocket extra level of indirection In-Reply-To: <1433018248.44.0.756605302302.issue24334@psf.upfronthosting.co.za> Message-ID: <1519505519.0.0.467229070634.issue24334@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 8fa8478ddeba0870da1152f0a2985c8a7eeb9fd1 by Christian Heimes (Miss Islington (bot)) in branch '3.7': [3.7] bpo-24334: Cleanup SSLSocket (GH-5252) (#5857) https://github.com/python/cpython/commit/8fa8478ddeba0870da1152f0a2985c8a7eeb9fd1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 15:52:43 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 24 Feb 2018 20:52:43 +0000 Subject: [issue24334] SSLSocket extra level of indirection In-Reply-To: <1433018248.44.0.756605302302.issue24334@psf.upfronthosting.co.za> Message-ID: <1519505563.14.0.467229070634.issue24334@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks for your review, Antoine! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 16:12:19 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 24 Feb 2018 21:12:19 +0000 Subject: [issue32932] better error message when __all__ contains non-str objects In-Reply-To: <1519462308.25.0.467229070634.issue32932@psf.upfronthosting.co.za> Message-ID: <1519506739.05.0.467229070634.issue32932@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I was wondering why the error is not raised by the IMPORT_NAME opcode which predates IMPORT_FROM. It calls _handle_fromlist() from _bootstrap. But in this case the module doesn't have the __path__ attribute and the sanity check was skipped. I'm wondering if it is enough to add the sanity check in _handle_fromlist() for the case when the module doesn't have the __path__ attribute. The Python code could be simpler than the C code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 16:12:43 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 24 Feb 2018 21:12:43 +0000 Subject: [issue30622] Fix NPN guard for OpenSSL 1.1 In-Reply-To: <1497107294.71.0.653300932954.issue30622@psf.upfronthosting.co.za> Message-ID: <1519506763.58.0.467229070634.issue30622@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 6cdb7954b0a578d899e4b78b868ea59eef08480a by Christian Heimes in branch 'master': bpo-30622: Improve NPN support detection (#5859) https://github.com/python/cpython/commit/6cdb7954b0a578d899e4b78b868ea59eef08480a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 16:12:49 2018 From: report at bugs.python.org (miss-islington) Date: Sat, 24 Feb 2018 21:12:49 +0000 Subject: [issue30622] Fix NPN guard for OpenSSL 1.1 In-Reply-To: <1497107294.71.0.653300932954.issue30622@psf.upfronthosting.co.za> Message-ID: <1519506769.3.0.467229070634.issue30622@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5635 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 16:15:23 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 24 Feb 2018 21:15:23 +0000 Subject: [issue32941] mmap should expose madvise() Message-ID: <1519506923.52.0.467229070634.issue32941@psf.upfronthosting.co.za> New submission from Antoine Pitrou : On POSIX, mmap objects could expose a method wrapping the madvise() library call. I suggest the following API mmap_object.madvise(option[, start[, length]]) If omitted, *start* and *length* would span the whole memory area described by the mmap object. *option* must be a recognized OS option for the madvise() library call. The mmap module would expose the various MADV_* options available on the current platform. Open question: should we expose madvise() or posix_madvise()? (these are two different calls, at least on Linux) posix_madvise() is arguably more portable, but madvise() is much more powerful, so I'd lean towards madvise(). ---------- components: Library (Lib) messages: 312758 nosy: larry, ned.deily, neologix, pitrou, ronaldoussoren priority: normal severity: normal status: open title: mmap should expose madvise() type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 16:15:56 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 24 Feb 2018 21:15:56 +0000 Subject: [issue32941] mmap should expose madvise() In-Reply-To: <1519506923.52.0.467229070634.issue32941@psf.upfronthosting.co.za> Message-ID: <1519506956.0.0.467229070634.issue32941@psf.upfronthosting.co.za> Antoine Pitrou added the comment: For information: - macOS manpage for madvise(): http://www.manpages.info/macosx/madvise.2.html - FreeBSD manpage for madvise(): https://www.freebsd.org/cgi/man.cgi?query=madvise&sektion=2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 16:21:33 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 24 Feb 2018 21:21:33 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse In-Reply-To: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> Message-ID: <1519507293.8.0.467229070634.issue32880@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- Removed message: https://bugs.python.org/msg312733 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 16:22:09 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 24 Feb 2018 21:22:09 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse In-Reply-To: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> Message-ID: <1519507329.28.0.467229070634.issue32880@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- Removed message: https://bugs.python.org/msg312739 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 16:32:40 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 24 Feb 2018 21:32:40 +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: <1519507960.41.0.467229070634.issue32912@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 5849 changes not only the Python parser, but codecs. It shouldn't. The Python parser and codecs will go different ways. The warning in the Python parser will finally be upgraded to SyntaxError (it is already replaced with SyntaxError if the warning is raised as error). The warning in codecs will become UnicodeDecodeError or ValueError. This is why the code for emitting the warning is not shared between the parser and codecs at first place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 16:47:01 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 24 Feb 2018 21:47:01 +0000 Subject: [issue31355] Remove Travis CI macOS job: rely on buildbots In-Reply-To: <1504653881.76.0.488933881504.issue31355@psf.upfronthosting.co.za> Message-ID: <1519508821.91.0.467229070634.issue31355@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Last macOS job took 13 minutes and there was almost no wait. That looks ok. I'm not sure it's required to backport to 3.6 and 2.7 since those branches typically have less churn. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 17:04:29 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 24 Feb 2018 22:04:29 +0000 Subject: [issue30622] Fix NPN guard for OpenSSL 1.1 In-Reply-To: <1497107294.71.0.653300932954.issue30622@psf.upfronthosting.co.za> Message-ID: <1519509869.23.0.467229070634.issue30622@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 01d9c23e470d708b922a1085347404000e985c0f by Christian Heimes (Miss Islington (bot)) in branch '3.7': [3.7] bpo-30622: Improve NPN support detection (GH-5859) (#5860) https://github.com/python/cpython/commit/01d9c23e470d708b922a1085347404000e985c0f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 17:26:57 2018 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 24 Feb 2018 22:26:57 +0000 Subject: [issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False) In-Reply-To: <1519494871.05.0.467229070634.issue32929@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Sorry, I used imprecise language. What you propose is fine. On Feb 24, 2018 09:54, "Eric V. Smith" wrote: > > Eric V. Smith added the comment: > > Note that this class (from the test suite) will now raise an exception: > > @dataclass(unsafe_hash=True) > class C: > i: int > def __eq__(self, other): > return self.i == other.i > > That's because it has a __hash__, added when __eq__ is defined. I think > we're better off with the rule being: > > If unsafe_hash=True, raise an exception if __hash__ exists and is not > None. Otherwise add __hash__. > > That's how it used to be with hash=True (in 3.70b1). > > Or is that what you meant by "but if a __hash__ method is present, an > exception is raised"? Notice the word "method", instead of attribute. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 17:53:33 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 24 Feb 2018 22:53:33 +0000 Subject: [issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping In-Reply-To: <1519493920.19.0.467229070634.issue32940@psf.upfronthosting.co.za> Message-ID: <1519512813.2.0.467229070634.issue32940@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I forget about this defaultdict behavior: "this value is inserted in the dictionary for the key, and returned." Reason: when default_factory returns a mutable, d[key] must return the same possibly mutated object with each call. I agree that defaultdict is not the right replacement. We need to pass to str.translate a dict that can be used by subscripting, newchar = d[char]. So partial(non-defaults.get, default_value) will not work. Instead, we need a __getitem__ that returns the same. In msg312444 I suggested simplifying STPM (including the name) because it has unneeded complexity. Remove the buggy .get override. Combine the _get stuff in __init__ (also removed) with current __getitem__ and simplify and we get what we actually need (untested, at yet). def __getitem__ return self._non_defaults.get(self._default_value) Actually, we could hard-code the default value as 'X' as we never need anything else. How about ParseMap for the name? ---------- stage: patch review -> needs patch title: IDLE: pyparse - replace StringTranslatePseudoMapping with defaultdict -> IDLE: pyparse - simplify StringTranslatePseudoMapping _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 18:07:36 2018 From: report at bugs.python.org (Andrew Brezovsky) Date: Sat, 24 Feb 2018 23:07:36 +0000 Subject: [issue32942] Regression: test_script_helper fails Message-ID: <1519513656.28.0.467229070634.issue32942@psf.upfronthosting.co.za> New submission from Andrew Brezovsky : Test test_script_helper fails, details: Running Debug|Win32 interpreter... == CPython 3.8.0a0 (heads/master:6cdb7954b0, Feb 24 2018, 17:25:46) [MSC v.1912 32 bit (Intel)] == Windows-10-10.0.16299-SP0 little-endian == cwd: \cpython\build\test_python_7920 == CPU count: 4 == encodings: locale=cp1252, FS=utf-8 Run tests sequentially 0:00:00 [1/1] test_script_helper test_assert_python_failure (test.test_script_helper.TestScriptHelper) ... ok test_assert_python_failure_raises (test.test_script_helper.TestScriptHelper) ... ok test_assert_python_isolated_when_env_not_required (test.test_script_helper.TestScriptHelper) ... ok test_assert_python_not_isolated_when_env_is_required (test.test_script_helper.TestScriptHelper) Ensure that -I is not passed when the environment is required. ... ok test_assert_python_ok (test.test_script_helper.TestScriptHelper) ... ok test_assert_python_ok_raises (test.test_script_helper.TestScriptHelper) ... ok test_interpreter_requires_environment_details (test.test_script_helper.TestScriptHelperEnvironment) ... FAIL test_interpreter_requires_environment_false (test.test_script_helper.TestScriptHelperEnvironment) ... FAIL test_interpreter_requires_environment_true (test.test_script_helper.TestScriptHelperEnvironment) ... FAIL ====================================================================== FAIL: test_interpreter_requires_environment_details (test.test_script_helper.TestScriptHelperEnvironment) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Users\andor\Documents\Projects\cpython\lib\unittest\mock.py", line 1191, in patched return func(*args, **keywargs) File "C:\Users\andor\Documents\Projects\cpython\lib\test\test_script_helper.py", line 101, in test_interpreter_requires_environment_details self.assertFalse(script_helper.interpreter_requires_environment()) AssertionError: True is not false ====================================================================== FAIL: test_interpreter_requires_environment_false (test.test_script_helper.TestScriptHelperEnvironment) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Users\andor\Documents\Projects\cpython\lib\unittest\mock.py", line 1191, in patched return func(*args, **keywargs) File "C:\Users\andor\Documents\Projects\cpython\lib\test\test_script_helper.py", line 95, in test_interpreter_requires_environment_false self.assertFalse(script_helper.interpreter_requires_environment()) AssertionError: True is not false ====================================================================== FAIL: test_interpreter_requires_environment_true (test.test_script_helper.TestScriptHelperEnvironment) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Users\andor\Documents\Projects\cpython\lib\unittest\mock.py", line 1191, in patched return func(*args, **keywargs) File "C:\Users\andor\Documents\Projects\cpython\lib\test\test_script_helper.py", line 89, in test_interpreter_requires_environment_true self.assertEqual(1, mock_check_call.call_count) AssertionError: 1 != 0 ---------------------------------------------------------------------- Ran 9 tests in 0.240s FAILED (failures=3) test test_script_helper failed test_script_helper failed 1 test failed: test_script_helper Total duration: 281 ms Tests result: FAILURE ---------- components: Tests messages: 312765 nosy: abrezovsky priority: normal severity: normal status: open title: Regression: test_script_helper fails versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 18:21:44 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 24 Feb 2018 23:21:44 +0000 Subject: [issue30622] Fix NPN guard for OpenSSL 1.1 In-Reply-To: <1497107294.71.0.653300932954.issue30622@psf.upfronthosting.co.za> Message-ID: <1519514504.19.0.467229070634.issue30622@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- pull_requests: +5636 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 18:26:59 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 24 Feb 2018 23:26:59 +0000 Subject: [issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping In-Reply-To: <1519493920.19.0.467229070634.issue32940@psf.upfronthosting.co.za> Message-ID: <1519514819.82.0.467229070634.issue32940@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- pull_requests: +5637 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 18:27:29 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 24 Feb 2018 23:27:29 +0000 Subject: [issue30622] Fix NPN guard for OpenSSL 1.1 In-Reply-To: <1497107294.71.0.653300932954.issue30622@psf.upfronthosting.co.za> Message-ID: <1519514849.0.0.467229070634.issue30622@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- pull_requests: +5638 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 18:45:26 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 24 Feb 2018 23:45:26 +0000 Subject: [issue31518] ftplib, urllib2, poplib, httplib, urllib2_localnet use ssl.PROTOCOL_TLSv1 unconditionally In-Reply-To: <1505828127.49.0.46910181941.issue31518@psf.upfronthosting.co.za> Message-ID: <1519515926.92.0.467229070634.issue31518@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset aab225840360719516eca55a7a69cfee45aee2af by Christian Heimes in branch '3.6': bpo-31518: Change TLS protocol for Debian (#3660) https://github.com/python/cpython/commit/aab225840360719516eca55a7a69cfee45aee2af ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 18:45:56 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 24 Feb 2018 23:45:56 +0000 Subject: [issue31518] ftplib, urllib2, poplib, httplib, urllib2_localnet use ssl.PROTOCOL_TLSv1 unconditionally In-Reply-To: <1505828127.49.0.46910181941.issue31518@psf.upfronthosting.co.za> Message-ID: <1519515956.25.0.467229070634.issue31518@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 8d4d17399fb82801eaaca5beeb97a19908b40222 by Christian Heimes in branch '2.7': bpo-31518: Change TLS protocol for Debian (#3661) https://github.com/python/cpython/commit/8d4d17399fb82801eaaca5beeb97a19908b40222 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 18:46:23 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 24 Feb 2018 23:46:23 +0000 Subject: [issue31518] ftplib, urllib2, poplib, httplib, urllib2_localnet use ssl.PROTOCOL_TLSv1 unconditionally In-Reply-To: <1505828127.49.0.46910181941.issue31518@psf.upfronthosting.co.za> Message-ID: <1519515983.11.0.467229070634.issue31518@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 18:53:30 2018 From: report at bugs.python.org (Christian Heimes) Date: Sat, 24 Feb 2018 23:53:30 +0000 Subject: [issue32185] SSLContext.wrap_socket sends SNI Extension when server_hostname is IP In-Reply-To: <1512065109.64.0.213398074469.issue32185@psf.upfronthosting.co.za> Message-ID: <1519516410.02.0.467229070634.issue32185@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- pull_requests: +5639 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 19:00:02 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 25 Feb 2018 00:00:02 +0000 Subject: [issue4260] Document that ctypes.xFUNCTYPE are decorators. In-Reply-To: <1225864263.85.0.365773038706.issue4260@psf.upfronthosting.co.za> Message-ID: <1519516802.09.0.467229070634.issue4260@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- versions: +Python 3.7, Python 3.8 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 19:01:24 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 25 Feb 2018 00:01:24 +0000 Subject: [issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping In-Reply-To: <1519493920.19.0.467229070634.issue32940@psf.upfronthosting.co.za> Message-ID: <1519516884.21.0.467229070634.issue32940@psf.upfronthosting.co.za> Cheryl Sabella added the comment: New PR submitted. Really glad I worked on this today. I learned a lot of things that were new to me. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 19:53:16 2018 From: report at bugs.python.org (Roundup Robot) Date: Sun, 25 Feb 2018 00:53:16 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1519519996.23.0.467229070634.issue12345@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +5640 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 20:34:03 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 25 Feb 2018 01:34:03 +0000 Subject: [issue32932] better error message when __all__ contains non-str objects In-Reply-To: <1519462308.25.0.467229070634.issue32932@psf.upfronthosting.co.za> Message-ID: <1519522443.04.0.467229070634.issue32932@psf.upfronthosting.co.za> Nick Coghlan added the comment: I believe the original rationale for the `__path__` check was to restrict that branch to the case where we may need to import a not-yet-imported submodule in order to get the attribute set appropriately. However, giving a better error message for __all__ in ordinary modules also seems like a good reason to follow that branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 20:35:51 2018 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 25 Feb 2018 01:35:51 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1519522551.6.0.467229070634.issue12345@psf.upfronthosting.co.za> Change by Nick Coghlan : ---------- pull_requests: -5640 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 21:56:09 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 25 Feb 2018 02:56:09 +0000 Subject: [issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping In-Reply-To: <1519493920.19.0.467229070634.issue32940@psf.upfronthosting.co.za> Message-ID: <1519527369.59.0.467229070634.issue32940@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I simplified ParseMap to a dict subclass with one override -- __getitem__ and then the tests. They run faster. I suspect translate is faster. ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 22:04:43 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 25 Feb 2018 03:04:43 +0000 Subject: [issue17232] Improve -O docs In-Reply-To: <1361255101.21.0.948205073894.issue17232@psf.upfronthosting.co.za> Message-ID: <1519527883.38.0.467229070634.issue17232@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 186b606d8a2ea4fd51b7286813302c8e8c7006cc by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-17232: Clarify docs for -O and -OO command line options (#5839) https://github.com/python/cpython/commit/186b606d8a2ea4fd51b7286813302c8e8c7006cc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 22:05:51 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 25 Feb 2018 03:05:51 +0000 Subject: [issue17232] Improve -O docs In-Reply-To: <1361255101.21.0.948205073894.issue17232@psf.upfronthosting.co.za> Message-ID: <1519527951.52.0.467229070634.issue17232@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5641 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 22:06:50 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 25 Feb 2018 03:06:50 +0000 Subject: [issue17232] Improve -O docs In-Reply-To: <1361255101.21.0.948205073894.issue17232@psf.upfronthosting.co.za> Message-ID: <1519528010.67.0.467229070634.issue17232@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5642 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 22:24:10 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 25 Feb 2018 03:24:10 +0000 Subject: [issue17232] Improve -O docs In-Reply-To: <1361255101.21.0.948205073894.issue17232@psf.upfronthosting.co.za> Message-ID: <1519529050.54.0.467229070634.issue17232@psf.upfronthosting.co.za> miss-islington added the comment: New changeset b5655f3d187084579ff389dbd8734742a8b66cbc by Miss Islington (bot) in branch '3.7': bpo-17232: Clarify docs for -O and -OO command line options (GH-5839) https://github.com/python/cpython/commit/b5655f3d187084579ff389dbd8734742a8b66cbc ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 22:46:18 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 25 Feb 2018 03:46:18 +0000 Subject: [issue17232] Improve -O docs In-Reply-To: <1361255101.21.0.948205073894.issue17232@psf.upfronthosting.co.za> Message-ID: <1519530378.57.0.467229070634.issue17232@psf.upfronthosting.co.za> miss-islington added the comment: New changeset fc9471a888f373aedff3c118ae9a6cbf2037bd7c by Miss Islington (bot) in branch '3.6': bpo-17232: Clarify docs for -O and -OO command line options (GH-5839) https://github.com/python/cpython/commit/fc9471a888f373aedff3c118ae9a6cbf2037bd7c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 24 23:08:45 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 25 Feb 2018 04:08:45 +0000 Subject: [issue17232] Improve -O docs In-Reply-To: <1361255101.21.0.948205073894.issue17232@psf.upfronthosting.co.za> Message-ID: <1519531725.87.0.467229070634.issue17232@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 Feb 24 23:11:11 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 25 Feb 2018 04:11:11 +0000 Subject: [issue32939] IDLE: self.use_context_ps1 defined in editor, but always False In-Reply-To: <1519487573.87.0.467229070634.issue32939@psf.upfronthosting.co.za> Message-ID: <1519531871.87.0.467229070634.issue32939@psf.upfronthosting.co.za> Terry J. Reedy added the comment: #31858 (second link) replaced one (?) use of "if use_context_ps1" ('in Shell') with "if self.last_prompt_line != ''" ("prompt before code on same line"). This can only happen in Shell, and only if the prompt ends with something other than '\n'. I cannot remember whether intentionally removing use_context_ps1 = True, but I may have found that it improved behavior in some case and may have intended to followup but have not yet. Part of the problem is that smart indents do not work right in the shell, and if they did, they would be wrong as soon as one copied code from shell to editor. Before merging "I tested the patch manually in both shell and editor with both the default prompt and with sys.ps1 set before importing idlelib.idle." But I did not write out what I did and what the results were. The immediate issue is to decide whether to do nothing, revert the removal, or change the editor code, and document why. Fresh knowledge of pyparse should help. ---------- type: enhancement -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 00:22:05 2018 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 25 Feb 2018 05:22:05 +0000 Subject: [issue32943] confusing error message for rot13 codec Message-ID: <1519536125.53.0.467229070634.issue32943@psf.upfronthosting.co.za> New submission from Xiang Zhang : rot13 codec does a str translate operation. But it doesn't check the input type and then the error message would be quite confusing, especially for bytes: >>> codecs.encode(b'abc', 'rot13') Traceback (most recent call last): File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/encodings/rot_13.py", line 15, in encode return (input.translate(rot13_map), len(input)) TypeError: a bytes-like object is required, not 'dict' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "", line 1, in TypeError: encoding with 'rot13' codec failed (TypeError: a bytes-like object is required, not 'dict') ---------- messages: 312775 nosy: serhiy.storchaka, xiang.zhang priority: normal severity: normal status: open title: confusing error message for rot13 codec type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 00:41:15 2018 From: report at bugs.python.org (LBC2525) Date: Sun, 25 Feb 2018 05:41:15 +0000 Subject: [issue32944] Need Guidance on Solving the Tcl problem Message-ID: <1519537275.89.0.467229070634.issue32944@psf.upfronthosting.co.za> New submission from LBC2525 : Python 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "copyright", "credits" or "license()" for more information. >>> WARNING: The version of Tcl/Tk (8.5.9) in use may be unstable. Visit http://www.python.org/download/mac/tcltk/ for current information. I have downloaded the Tcl and Tk files from http://www.python.org/download/mac/tcltk/ and I am still getting the error. Suggestions are appreciated. ---------- assignee: terry.reedy components: IDLE messages: 312776 nosy: LBC2525, terry.reedy priority: normal severity: normal status: open title: Need Guidance on Solving the Tcl problem versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 00:43:20 2018 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 25 Feb 2018 05:43:20 +0000 Subject: [issue32943] confusing error message for rot13 codec In-Reply-To: <1519536125.53.0.467229070634.issue32943@psf.upfronthosting.co.za> Message-ID: <1519537400.94.0.467229070634.issue32943@psf.upfronthosting.co.za> Change by Xiang Zhang : ---------- keywords: +patch pull_requests: +5643 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 00:45:22 2018 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 25 Feb 2018 05:45:22 +0000 Subject: [issue32943] confusing error message for rot13 codec In-Reply-To: <1519536125.53.0.467229070634.issue32943@psf.upfronthosting.co.za> Message-ID: <1519537522.3.0.467229070634.issue32943@psf.upfronthosting.co.za> Change by Xiang Zhang : ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 01:32:27 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 25 Feb 2018 06:32:27 +0000 Subject: [issue32944] Need Guidance on Solving the Tcl problem In-Reply-To: <1519537275.89.0.467229070634.issue32944@psf.upfronthosting.co.za> Message-ID: <1519540347.11.0.467229070634.issue32944@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Download and install 8.5.18 as the link says. If you have further questions, try python list or search stackoverflow. This tracker is for patching python, not for user questions. ---------- assignee: terry.reedy -> components: +Installation -IDLE resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 02:35:04 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Feb 2018 07:35:04 +0000 Subject: [issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping In-Reply-To: <1519493920.19.0.467229070634.issue32940@psf.upfronthosting.co.za> Message-ID: <1519544104.24.0.467229070634.issue32940@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: For efficiency I suggest to initialize the mapping with dict.fromkeys(range(128), 'x') rather of an empty dict. It is also possible to use regular expressions: _trans = re.compile(r'''[^(){}\[]"'\\\n#]+''') code = _trans.sub('x', code) code = code.replace('{', '(') code = code.replace('}', ')') code = code.replace('[', '(') code = code.replace(']', '(') code = code.replace('\nx', '\n') I didn't check what way is more efficient. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 02:56:04 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Sun, 25 Feb 2018 07:56:04 +0000 Subject: [issue32900] Teach pdb to step through asyncio et al. In-Reply-To: <1519248080.49.0.467229070634.issue32900@psf.upfronthosting.co.za> Message-ID: <1519545364.45.0.467229070634.issue32900@psf.upfronthosting.co.za> Nathaniel Smith added the comment: The help for 'n' says: (Pdb) help n n(ext) Continue execution until the next line in the current function is reached or it returns. (And the docs [1] say essentially the same.) It sounds like if that were true, then you wouldn't have a problem, right? But what it's actually doing is continuing until the next line in the current function is reached, or it returns, *or it yields*. It would be super helpful if pdb had a way to step past yields, running at full speed until the current frame is resumed. And it's not just 'next' where this would be useful, it's useful for 'step' and 'until' as well. Furthermore, I think we should distinguish between the "user visible" yields in generators and async generators, and the "implementation detail" yields to the coroutine runner that are async functions do. In both cases you might want stepping to follow the yield or not, so it'd be nice to have the option, but the *default* for user-visible yields should be to treat the yield like a return, and the *default* for implementation-detail yields should be to continue until the frame is resumed again. [1] https://docs.python.org/3.7/library/pdb.html#pdbcommand-next ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 03:22:50 2018 From: report at bugs.python.org (Antony Lee) Date: Sun, 25 Feb 2018 08:22:50 +0000 Subject: [issue32945] sorted(generator) is slower than sorted(list-comprehension) Message-ID: <1519546970.72.0.467229070634.issue32945@psf.upfronthosting.co.za> New submission from Antony Lee : Consider e.g. In [2]: %timeit sorted([i for i in range(100)]) 4.74 ?s ? 24.3 ns per loop (mean ? std. dev. of 7 runs, 100000 loops each) In [3]: %timeit sorted(i for i in range(100)) 7.05 ?s ? 25.7 ns per loop (mean ? std. dev. of 7 runs, 100000 loops each) In [4]: %timeit sorted([i for i in range(1000)]) 47.2 ?s ? 1.2 ?s per loop (mean ? std. dev. of 7 runs, 10000 loops each) In [5]: %timeit sorted(i for i in range(1000)) 78.7 ?s ? 288 ns per loop (mean ? std. dev. of 7 runs, 10000 loops each) In [6]: %timeit sorted([i for i in range(10000)]) 582 ?s ? 8.29 ?s per loop (mean ? std. dev. of 7 runs, 1000 loops each) In [7]: %timeit sorted(i for i in range(10000)) 807 ?s ? 5.92 ?s per loop (mean ? std. dev. of 7 runs, 1000 loops each) It appears that sorting a generator is slower than sorting the corresponding list comprehension, by a ~constant factor. Given that the former can trivially be converted into the latter (i.e. `sorted` could just check whether its argument is a generator, and, if so, convert it to a list first), it would seem that sorting the generator should *not* be slower than sorting a list (except perhaps by a small constant). ---------- messages: 312780 nosy: Antony.Lee priority: normal severity: normal status: open title: sorted(generator) is slower than sorted(list-comprehension) versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 03:46:54 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Feb 2018 08:46:54 +0000 Subject: [issue32946] Speed up import from non-packages Message-ID: <1519548414.92.0.467229070634.issue32946@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The proposed PR optimizes "from ... import ..." from non-package modules. $ ./python -m perf timeit 'from locale import getlocale' Unpatched: Mean +- std dev: 811 ns +- 27 ns Patched: Mean +- std dev: 624 ns +- 17 ns Currently _bootstrap._handle_fromlist() is called which does nothing if the module is not a package, but adds an overhead of calling a Python function. The PR moves this check out of _handle_fromlist and avoid calling it if not needed. ---------- components: Interpreter Core messages: 312781 nosy: brett.cannon, eric.snow, ncoghlan, serhiy.storchaka priority: normal severity: normal status: open title: Speed up import from non-packages type: performance versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 03:47:04 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 08:47:04 +0000 Subject: [issue32185] SSLContext.wrap_socket sends SNI Extension when server_hostname is IP In-Reply-To: <1512065109.64.0.213398074469.issue32185@psf.upfronthosting.co.za> Message-ID: <1519548424.64.0.467229070634.issue32185@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset e9370a47389903bb72badc95032ec84a0ebbf8cc by Christian Heimes in branch '3.6': bpo-32185: Don't send IP in SNI TLS extension (#5865) https://github.com/python/cpython/commit/e9370a47389903bb72badc95032ec84a0ebbf8cc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 03:47:15 2018 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 25 Feb 2018 08:47:15 +0000 Subject: [issue32945] sorted(generator) is slower than sorted(list-comprehension) In-Reply-To: <1519546970.72.0.467229070634.issue32945@psf.upfronthosting.co.za> Message-ID: <1519548435.74.0.467229070634.issue32945@psf.upfronthosting.co.za> Stefan Behnel added the comment: sorted() *does* convert its input to a list first, and only then sorts it. It calls PySequence_List() for that, which in turn uses list_extend(), which then applies the obvious optimisation of copying input lists (and tuples) directly. What you are seeing here is probably mostly this difference: $ python3.7 -m timeit 'list(i for i in range(100))' 50000 loops, best of 5: 5.95 usec per loop $ python3.7 -m timeit '[i for i in range(100)]' 100000 loops, best of 5: 3.26 usec per loop ---------- components: +Interpreter Core nosy: +scoder type: -> performance versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 03:47:16 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 25 Feb 2018 08:47:16 +0000 Subject: [issue32185] SSLContext.wrap_socket sends SNI Extension when server_hostname is IP In-Reply-To: <1512065109.64.0.213398074469.issue32185@psf.upfronthosting.co.za> Message-ID: <1519548436.23.0.467229070634.issue32185@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5644 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 03:48:04 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 08:48:04 +0000 Subject: [issue25404] ssl.SSLcontext.load_dh_params() does not handle unicode filenames properly In-Reply-To: <1444826187.38.0.734586543163.issue25404@psf.upfronthosting.co.za> Message-ID: <1519548484.37.0.467229070634.issue25404@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 6e8f395001b026daea047cf225dcca5a973ae824 by Christian Heimes in branch '2.7': bpo-25404: SSLContext.load_dh_params() non-ASCII path (GH-3459) https://github.com/python/cpython/commit/6e8f395001b026daea047cf225dcca5a973ae824 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 03:48:17 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 08:48:17 +0000 Subject: [issue25404] ssl.SSLcontext.load_dh_params() does not handle unicode filenames properly In-Reply-To: <1444826187.38.0.734586543163.issue25404@psf.upfronthosting.co.za> Message-ID: <1519548497.26.0.467229070634.issue25404@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 03:49:34 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 08:49:34 +0000 Subject: [issue31809] ssl module unnecessarily pins the client curve when using ECDH In-Reply-To: <1508332540.28.0.213398074469.issue31809@psf.upfronthosting.co.za> Message-ID: <1519548574.14.0.467229070634.issue31809@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset b7b9225831a729bff84eb7c43bad138416b994fe by Christian Heimes in branch 'master': bpo-31809: test secp ECDH curves (#4036) https://github.com/python/cpython/commit/b7b9225831a729bff84eb7c43bad138416b994fe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 03:49:40 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 25 Feb 2018 08:49:40 +0000 Subject: [issue31809] ssl module unnecessarily pins the client curve when using ECDH In-Reply-To: <1508332540.28.0.213398074469.issue31809@psf.upfronthosting.co.za> Message-ID: <1519548580.62.0.467229070634.issue31809@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5645 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 04:05:43 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Feb 2018 09:05:43 +0000 Subject: [issue32946] Speed up import from non-packages In-Reply-To: <1519548414.92.0.467229070634.issue32946@psf.upfronthosting.co.za> Message-ID: <1519549543.88.0.467229070634.issue32946@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +5646 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 04:16:39 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 09:16:39 +0000 Subject: [issue32185] SSLContext.wrap_socket sends SNI Extension when server_hostname is IP In-Reply-To: <1512065109.64.0.213398074469.issue32185@psf.upfronthosting.co.za> Message-ID: <1519550199.48.0.467229070634.issue32185@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset a5c9112300ecd492ed6cc9759dc8028766401f61 by Christian Heimes (Miss Islington (bot)) in branch '2.7': [2.7] bpo-32185: Don't send IP in SNI TLS extension (GH-5865) (#5871) https://github.com/python/cpython/commit/a5c9112300ecd492ed6cc9759dc8028766401f61 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 04:19:20 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 09:19:20 +0000 Subject: [issue32185] SSLContext.wrap_socket sends SNI Extension when server_hostname is IP In-Reply-To: <1512065109.64.0.213398074469.issue32185@psf.upfronthosting.co.za> Message-ID: <1519550360.8.0.467229070634.issue32185@psf.upfronthosting.co.za> Christian Heimes added the comment: The issue has been fixed in 2.7, 3.6-3.8 for OpenSSL >= 1.0.2 or platforms with inet_pton. I didn't bother to fix platforms without inet_pton since OpenSSL 1.0.1 and earlier are no longer support any way. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 04:20:49 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 09:20:49 +0000 Subject: [issue30622] Fix NPN guard for OpenSSL 1.1 In-Reply-To: <1497107294.71.0.653300932954.issue30622@psf.upfronthosting.co.za> Message-ID: <1519550449.91.0.467229070634.issue30622@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 48707a1baf4fd553fbc4516d9080cb3968af21aa by Christian Heimes in branch '3.6': [3.6] bpo-30622: Improve NPN support detection (GH-5859) (#5861) https://github.com/python/cpython/commit/48707a1baf4fd553fbc4516d9080cb3968af21aa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 04:21:06 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 09:21:06 +0000 Subject: [issue30622] Fix NPN guard for OpenSSL 1.1 In-Reply-To: <1497107294.71.0.653300932954.issue30622@psf.upfronthosting.co.za> Message-ID: <1519550466.25.0.467229070634.issue30622@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 3d87f4cf9c19da9fe8ae8f91f5bb86e642b74a50 by Christian Heimes in branch '2.7': [2.7] bpo-30622: Improve NPN support detection (GH-5859) (#5863) https://github.com/python/cpython/commit/3d87f4cf9c19da9fe8ae8f91f5bb86e642b74a50 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 04:22:16 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 09:22:16 +0000 Subject: [issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28) In-Reply-To: <1516789649.91.0.467229070634.issue32647@psf.upfronthosting.co.za> Message-ID: <1519550536.56.0.467229070634.issue32647@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 5bb9692575f10f4a7c7f1c2c0c70956baf6d5c23 by Christian Heimes in branch 'master': bpo-32647: Link ctypes extension with libdl. (#5550) https://github.com/python/cpython/commit/5bb9692575f10f4a7c7f1c2c0c70956baf6d5c23 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 04:22:22 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 25 Feb 2018 09:22:22 +0000 Subject: [issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28) In-Reply-To: <1516789649.91.0.467229070634.issue32647@psf.upfronthosting.co.za> Message-ID: <1519550542.65.0.467229070634.issue32647@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5647 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 04:23:23 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 25 Feb 2018 09:23:23 +0000 Subject: [issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28) In-Reply-To: <1516789649.91.0.467229070634.issue32647@psf.upfronthosting.co.za> Message-ID: <1519550603.34.0.467229070634.issue32647@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5648 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 04:30:03 2018 From: report at bugs.python.org (Antony Lee) Date: Sun, 25 Feb 2018 09:30:03 +0000 Subject: [issue32945] sorted(generator) is slower than sorted(list-comprehension) In-Reply-To: <1519546970.72.0.467229070634.issue32945@psf.upfronthosting.co.za> Message-ID: <1519551003.19.0.467229070634.issue32945@psf.upfronthosting.co.za> Antony Lee added the comment: Feel free to close the issue if that's not the forum for this discussion, but I'm still baffled by what's happening. In the example that you give, the first case needs to look up the `list` global and that callable (which happens to be the `list` type) needs to figure out what to do with generator passed in. Indeed, we can compare In [22]: dis.dis(compile("[i for i in [1, 2]]", "", "single")) 1 0 LOAD_CONST 0 ( at 0x7f2d3237ec00, file "", line 1>) 2 LOAD_CONST 1 ('') 4 MAKE_FUNCTION 0 6 LOAD_CONST 5 ((1, 2)) 8 GET_ITER 10 CALL_FUNCTION 1 12 PRINT_EXPR 14 LOAD_CONST 4 (None) 16 RETURN_VALUE In [23]: dis.dis(compile("list(i for i in [1, 2])", "", "single")) 1 0 LOAD_NAME 0 (list) 2 LOAD_CONST 0 ( at 0x7f2d32392150, file "", line 1>) 4 LOAD_CONST 1 ('') 6 MAKE_FUNCTION 0 8 LOAD_CONST 5 ((1, 2)) 10 GET_ITER 12 CALL_FUNCTION 1 14 CALL_FUNCTION 1 16 PRINT_EXPR 18 LOAD_CONST 4 (None) 20 RETURN_VALUE Note how the latter has an extra function call (to `list`). In the example I gave, however: In [24]: dis.dis(compile("sorted([i for i in [1, 2]])", "", "single")) 1 0 LOAD_NAME 0 (sorted) 2 LOAD_CONST 0 ( at 0x7f2d3231eb70, file "", line 1>) 4 LOAD_CONST 1 ('') 6 MAKE_FUNCTION 0 8 LOAD_CONST 5 ((1, 2)) 10 GET_ITER 12 CALL_FUNCTION 1 14 CALL_FUNCTION 1 16 PRINT_EXPR 18 LOAD_CONST 4 (None) 20 RETURN_VALUE In [25]: dis.dis(compile("sorted(i for i in [1, 2])", "", "single")) 1 0 LOAD_NAME 0 (sorted) 2 LOAD_CONST 0 ( at 0x7f2d32328930, file "", line 1>) 4 LOAD_CONST 1 ('') 6 MAKE_FUNCTION 0 8 LOAD_CONST 5 ((1, 2)) 10 GET_ITER 12 CALL_FUNCTION 1 14 CALL_FUNCTION 1 16 PRINT_EXPR 18 LOAD_CONST 4 (None) 20 RETURN_VALUE so both cases are much more similar -- superficially, at least. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 04:53:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Feb 2018 09:53:21 +0000 Subject: [issue32932] better error message when __all__ contains non-str objects In-Reply-To: <1519462308.25.0.467229070634.issue32932@psf.upfronthosting.co.za> Message-ID: <1519552401.23.0.467229070634.issue32932@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: On other hand, adding checks in Python code will add a slowdown. See issue32946 which moves in contrary direction. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 04:54:32 2018 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 25 Feb 2018 09:54:32 +0000 Subject: [issue32945] sorted(generator) is slower than sorted(list-comprehension) In-Reply-To: <1519546970.72.0.467229070634.issue32945@psf.upfronthosting.co.za> Message-ID: <1519552472.31.0.467229070634.issue32945@psf.upfronthosting.co.za> Stefan Behnel added the comment: The constant function call overhead doesn't make a big difference: $ /opt/python3.7-opt/bin/python3 -m timeit 'list(i for i in range(1000))' 5000 loops, best of 5: 55 usec per loop $ /opt/python3.7-opt/bin/python3 -m timeit '[i for i in range(1000)]' 10000 loops, best of 5: 30.7 usec per loop The difference is that comprehensions are generally more efficient than generators, simply because they are more specialised. When a generator is created, it does not know whether it will be passed into list() to quickly unpack it into a list, or into some complex machinery that just requests one value per year, or only one value at all and then throws it away. I searched a bit, but couldn't find a ticket about the performance difference above, although I'm sure there must be one. So I'll leave this open for now, assuming that there might still be something to improve here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 04:56:13 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 09:56:13 +0000 Subject: [issue31809] ssl module unnecessarily pins the client curve when using ECDH In-Reply-To: <1508332540.28.0.213398074469.issue31809@psf.upfronthosting.co.za> Message-ID: <1519552573.96.0.467229070634.issue31809@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset ff7528f089b60f8372c658f3bc3b14b059114da9 by Christian Heimes (Miss Islington (bot)) in branch '3.7': [3.7] bpo-31809: test secp ECDH curves (GH-4036) (#5872) https://github.com/python/cpython/commit/ff7528f089b60f8372c658f3bc3b14b059114da9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 04:58:02 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 09:58:02 +0000 Subject: [issue30622] Fix NPN guard for OpenSSL 1.1 In-Reply-To: <1497107294.71.0.653300932954.issue30622@psf.upfronthosting.co.za> Message-ID: <1519552682.42.0.467229070634.issue30622@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- pull_requests: +5649 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 05:02:49 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 10:02:49 +0000 Subject: [issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28) In-Reply-To: <1516789649.91.0.467229070634.issue32647@psf.upfronthosting.co.za> Message-ID: <1519552969.03.0.467229070634.issue32647@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- pull_requests: +5650 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 05:02:49 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 10:02:49 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1519552969.15.0.574204596225.issue12345@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- pull_requests: +5651 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 05:07:04 2018 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 25 Feb 2018 10:07:04 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1519553224.57.0.467229070634.issue12345@psf.upfronthosting.co.za> Change by Mark Dickinson : ---------- pull_requests: -5651 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 05:09:25 2018 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 25 Feb 2018 10:09:25 +0000 Subject: [issue32945] sorted(generator) is slower than sorted(list-comprehension) In-Reply-To: <1519546970.72.0.467229070634.issue32945@psf.upfronthosting.co.za> Message-ID: <1519553365.51.0.467229070634.issue32945@psf.upfronthosting.co.za> Steven D'Aprano added the comment: I think the difficulty here is that your perspective is backwards. It isn't that sorting a generator is *slower*, it is that sorting a list is *faster*, because there is more information available with a list and so the interpreter can take a short-cut. With a generator or iterator, the interpreter doesn't know how many items will be in the finished collection, and so it has to build the list in stages as needed, growing it when it runs out of room, and possibly shrinking it if it grows too big. This takes time. But with a list or other sequence with a known length, the interpreter can allocate the right number of items up front, and avoid growing or shrinking the new list. I believe that this is the time saving you are seeing. So I don't think this is a bug, and I don't think there's any room to optimize the generator comprehension case. Unless somebody who knows more about the interpreter internals than I do speaks up to say there is a way to optimize this case, I think there's nothing that can be done. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 05:18:39 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 25 Feb 2018 10:18:39 +0000 Subject: [issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping In-Reply-To: <1519493920.19.0.467229070634.issue32940@psf.upfronthosting.co.za> Message-ID: <1519553919.52.0.467229070634.issue32940@psf.upfronthosting.co.za> Terry J. Reedy added the comment: To me, it is plausible but not slam-dunk obvious that preloading ascii to 'x' mappings will make ascii lookup faster. On #21765, where the pyparse special translation was a side-issue, Tal Einat claimed that the unpublished regex he tried was 100x slower. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 05:28:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Feb 2018 10:28:57 +0000 Subject: [issue17288] cannot jump from a return after setting f_lineno In-Reply-To: <1361726813.15.0.719765769531.issue17288@psf.upfronthosting.co.za> Message-ID: <1519554537.07.0.467229070634.issue17288@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Do you mind to create a PR from your patch Xavier? The code of the f_lineno setter was changed in the master branch, so that it is better to create a PR for the 3.7 branch and later port it to master. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 05:30:27 2018 From: report at bugs.python.org (Antony Lee) Date: Sun, 25 Feb 2018 10:30:27 +0000 Subject: [issue32945] sorted(generator) is slower than sorted(list-comprehension) In-Reply-To: <1519546970.72.0.467229070634.issue32945@psf.upfronthosting.co.za> Message-ID: <1519554627.58.0.467229070634.issue32945@psf.upfronthosting.co.za> Antony Lee added the comment: > But with a list or other sequence with a known length, the interpreter can allocate the right number of items up front, and avoid growing or shrinking the new list. I believe that this is the time saving you are seeing. But certainly when the list comprehension is executed the interpreter also needs to pay that cost? (It cannot know a priori that `[x for x in range(100)]` will have 100 elements, as `range` may have been shadowed at that point.) Yes, the price is not paid when running `sorted` itself, but it should be paid when creating the list from the comprehension? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 05:33:20 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 25 Feb 2018 10:33:20 +0000 Subject: [issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping In-Reply-To: <1519493920.19.0.467229070634.issue32940@psf.upfronthosting.co.za> Message-ID: <1519554800.45.0.467229070634.issue32940@psf.upfronthosting.co.za> Cheryl Sabella added the comment: A similar regular expression version was mentioned on issue21765 and I had run some tests on it yesterday to verify. On my system, it ran at a factor of 10x slower, so if the translate finished in 0.003, the regex took 0.03. This was consistent for me, regardless of how big I made the document. The reason for not using a defauldict was to keep the 'x' mappings out of the dictionary so that it wouldn't grow and take up space. Although, I did realize yesterday that it wasn't really boundless because most values in source code would be ASCII. Running both the version the doesn't add the 'x' mappings and the `fromkeys`, there doesn't seem to be much of a difference in time when processing the doc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 05:55:32 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 25 Feb 2018 10:55:32 +0000 Subject: [issue25059] Mistake in input-output tutorial regarding print() seperator In-Reply-To: <1441903521.59.0.166588959306.issue25059@psf.upfronthosting.co.za> Message-ID: <1519556132.63.0.467229070634.issue25059@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +5652 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 05:56:14 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 25 Feb 2018 10:56:14 +0000 Subject: [issue25059] Mistake in input-output tutorial regarding print() seperator In-Reply-To: <1441903521.59.0.166588959306.issue25059@psf.upfronthosting.co.za> Message-ID: <1519556174.7.0.467229070634.issue25059@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Created a PR based on the discussion and not the original patch. ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 06:18:32 2018 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 25 Feb 2018 11:18:32 +0000 Subject: [issue32945] sorted(generator) is slower than sorted(list-comprehension) In-Reply-To: <1519546970.72.0.467229070634.issue32945@psf.upfronthosting.co.za> Message-ID: <1519557512.33.0.467229070634.issue32945@psf.upfronthosting.co.za> Stefan Behnel added the comment: > as `range` may have been shadowed at that point No, range() has in fact already been executed at that point. And it returned an iterable that knows its length (search for "LengthHint" in the CPython sources). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 06:31:19 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 11:31:19 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1519558279.64.0.467229070634.issue12345@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- pull_requests: +5653 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 06:31:20 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 11:31:20 +0000 Subject: [issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28) In-Reply-To: <1516789649.91.0.467229070634.issue32647@psf.upfronthosting.co.za> Message-ID: <1519558280.53.0.467229070634.issue32647@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 4bb9b9aea04b1a96632da1b30a58fb31cbe6ec92 by Christian Heimes in branch '2.7': [2.7] bpo-32647: Link ctypes extension with libdl. (GH-5550) (#5877) https://github.com/python/cpython/commit/4bb9b9aea04b1a96632da1b30a58fb31cbe6ec92 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 06:31:35 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 11:31:35 +0000 Subject: [issue30622] Fix NPN guard for OpenSSL 1.1 In-Reply-To: <1497107294.71.0.653300932954.issue30622@psf.upfronthosting.co.za> Message-ID: <1519558295.79.0.467229070634.issue30622@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 29eab55309b9f78b79074d26db16a44e7841c639 by Christian Heimes in branch 'master': bpo-30622: Fix NPN for OpenSSL 1.1.1-pre1 (#5876) https://github.com/python/cpython/commit/29eab55309b9f78b79074d26db16a44e7841c639 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 06:32:42 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 25 Feb 2018 11:32:42 +0000 Subject: [issue30622] Fix NPN guard for OpenSSL 1.1 In-Reply-To: <1497107294.71.0.653300932954.issue30622@psf.upfronthosting.co.za> Message-ID: <1519558362.8.0.467229070634.issue30622@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5654 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 06:35:11 2018 From: report at bugs.python.org (Anthony Flury) Date: Sun, 25 Feb 2018 11:35:11 +0000 Subject: [issue32933] mock_open does not support iteration around text files. In-Reply-To: <1519462718.87.0.467229070634.issue32933@psf.upfronthosting.co.za> Message-ID: <1519558511.47.0.467229070634.issue32933@psf.upfronthosting.co.za> Change by Anthony Flury : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 06:54:40 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 11:54:40 +0000 Subject: [issue32947] Support OpenSSL 1.1.1 Message-ID: <1519559680.67.0.467229070634.issue32947@psf.upfronthosting.co.za> New submission from Christian Heimes : I'm using this ticket as an epos to track commits and required changes for OpenSSL 1.1.1 and TLS 1.3. Fixes need to be backported to 2.7 and 3.6 to 3.8. We might have to consider backports to 3.4 and 3.5, too. If all goes to plan, OpenSSL 1.1.1 final is scheduled for 8th May 2018, https://www.openssl.org/policies/releasestrat.html . It will contain support for TLS 1.3. Python should either support TLS 1.3 by then or disable TLS 1.3 by default. Fixes: * #20995 added TLS 1.3 cipher suite support * #29136 added OP_NO_TLSv1_3 * #30622 fixes NPN guard for OpenSSL 1.1.1 Issues: * A new option OP_ENABLE_MIDDLEBOX_COMPAT is enabled by default. We need to expose the flag to make test pass. * TLS 1.3 has changed session handling. The current session code cannot handle TLS 1.3 session resumption. * Threaded echo server and asynchat based tests are failing with TLS 1.3. I haven't analyzed the issue properly. It looks like the server thread dies when a handshake error occurs. ---------- assignee: christian.heimes components: SSL messages: 312804 nosy: christian.heimes priority: normal severity: normal status: open title: Support OpenSSL 1.1.1 type: enhancement versions: Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 07:06:34 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 12:06:34 +0000 Subject: [issue32947] Support OpenSSL 1.1.1 In-Reply-To: <1519559680.67.0.467229070634.issue32947@psf.upfronthosting.co.za> Message-ID: <1519560394.74.0.467229070634.issue32947@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +5655 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 07:07:26 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 12:07:26 +0000 Subject: [issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28) In-Reply-To: <1516789649.91.0.467229070634.issue32647@psf.upfronthosting.co.za> Message-ID: <1519560446.77.0.467229070634.issue32647@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 4cb373359d5ff29b222b10207516d294f3a54ad8 by Christian Heimes (Miss Islington (bot)) in branch '3.7': [3.7] bpo-32647: Link ctypes extension with libdl. (GH-5550) (#5874) https://github.com/python/cpython/commit/4cb373359d5ff29b222b10207516d294f3a54ad8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 07:07:38 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 12:07:38 +0000 Subject: [issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28) In-Reply-To: <1516789649.91.0.467229070634.issue32647@psf.upfronthosting.co.za> Message-ID: <1519560458.69.0.467229070634.issue32647@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 192bff4e2d196b8933829923ca1db77d8dee67e2 by Christian Heimes (Miss Islington (bot)) in branch '3.6': [3.6] bpo-32647: Link ctypes extension with libdl. (GH-5550) (#5875) https://github.com/python/cpython/commit/192bff4e2d196b8933829923ca1db77d8dee67e2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 07:12:24 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 12:12:24 +0000 Subject: [issue30622] Fix NPN guard for OpenSSL 1.1 In-Reply-To: <1497107294.71.0.653300932954.issue30622@psf.upfronthosting.co.za> Message-ID: <1519560744.9.0.467229070634.issue30622@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- pull_requests: +5656 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 07:17:46 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 12:17:46 +0000 Subject: [issue30622] Fix NPN guard for OpenSSL 1.1 In-Reply-To: <1497107294.71.0.653300932954.issue30622@psf.upfronthosting.co.za> Message-ID: <1519561066.69.0.467229070634.issue30622@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- pull_requests: +5657 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 07:18:46 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 12:18:46 +0000 Subject: [issue30622] Fix NPN guard for OpenSSL 1.1 In-Reply-To: <1497107294.71.0.653300932954.issue30622@psf.upfronthosting.co.za> Message-ID: <1519561126.03.0.467229070634.issue30622@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 961774184eb950e2547ab0d42653439adc735924 by Christian Heimes (Miss Islington (bot)) in branch '3.7': [3.7] bpo-30622: Fix NPN for OpenSSL 1.1.1-pre1 (GH-5876) (#5880) https://github.com/python/cpython/commit/961774184eb950e2547ab0d42653439adc735924 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 07:49:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Feb 2018 12:49:05 +0000 Subject: [issue17288] cannot jump from a return after setting f_lineno In-Reply-To: <1361726813.15.0.719765769531.issue17288@psf.upfronthosting.co.za> Message-ID: <1519562945.81.0.467229070634.issue17288@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Example in msg183254 doesn't crash Python 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 07:58:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Feb 2018 12:58:11 +0000 Subject: [issue28883] Python 3.5.2 crashers (from PyPy) In-Reply-To: <1481024987.78.0.673131645253.issue28883@psf.upfronthosting.co.za> Message-ID: <1519563491.82.0.467229070634.issue28883@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: C5 is fixed in 3.8 by issue17611. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 08:28:39 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 13:28:39 +0000 Subject: [issue32948] clang compiler warnings on Travis Message-ID: <1519565319.33.0.467229070634.issue32948@psf.upfronthosting.co.za> New submission from Christian Heimes : I'm seeing a bunch of compile errors on 2.7 branch, https://travis-ci.org/python/cpython/jobs/345906584 /home/travis/build/python/cpython/Modules/_heapqmodule.c:600:21: warning: illegal character encoding in string literal [-Winvalid-source-encoding] [explanation by Franois Pinard]\n\ ^~~~ Include/Python.h:174:60: note: expanded from macro 'PyDoc_STRVAR' #define PyDoc_STRVAR(name,str) PyDoc_VAR(name) = PyDoc_STR(str) ^ Include/Python.h:176:24: note: expanded from macro 'PyDoc_STR' #define PyDoc_STR(str) str ^ 1 warning generated. clang -pthread -fno-strict-aliasing -OPT:Olimit=0 -g -O2 -g -O0 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -c ./Modules/pwdmodule.c -o Modules/pwdmodule.o ./Modules/posixmodule.c:363:13: warning: comparison of constant 9223372036854775807 with expression of type 'uid_t' (aka 'unsigned int') is always true [-Wtautological-constant-out-of-range-compare] if (uid <= LONG_MAX) ~~~ ^ ~~~~~~~~ ./Modules/posixmodule.c:371:13: warning: comparison of constant 9223372036854775807 with expression of type 'gid_t' (aka 'unsigned int') is always true [-Wtautological-constant-out-of-range-compare] if (gid <= LONG_MAX) ~~~ ^ ~~~~~~~~ clang -pthread -fno-strict-aliasing -OPT:Olimit=0 -g -O2 -g -O0 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -c ./Modules/_sre.c -o Modules/_sre.o clang -pthread -fno-strict-aliasing -OPT:Olimit=0 -g -O2 -g -O0 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -c ./Modules/_codecsmodule.c -o Modules/_codecsmodule.o ./Modules/pwdmodule.c:115:17: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] if (uid < 0) ~~~ ^ ~ 1 warning generated. /home/travis/build/python/cpython/Modules/grpmodule.c:102:17: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare] if (gid < 0) ~~~ ^ ~ 1 warning generated. /cpython/Modules/nismodule.c -o build/temp.linux-x86_64-2.7-pydebug/home/travis/build/python/cpython/Modules/nismodule.o /home/travis/build/python/cpython/Modules/nismodule.c:404:15: warning: explicitly assigning value of variable of type 'nismaplist *' (aka 'struct nismaplist *') to itself [-Wself-assign] for (maps = maps; maps; maps = maps->next) { ~~~~ ^ ~~~~ 1 warning generated. /cpython/Modules/_cursesmodule.c -o build/temp.linux-x86_64-2.7-pydebug/home/travis/build/python/cpython/Modules/_cursesmodule.o /home/travis/build/python/cpython/Modules/_cursesmodule.c:1082:15: warning: implicit conversion from 'chtype' (aka 'unsigned long') to 'int' changes value from 18446744073709551615 to -1 [-Wconstant-conversion] rtn = mvwinch(self->win,y,x); ~ ^~~~~~~~~~~~~~~~~~~~~~ /usr/include/curses.h:1247:58: note: expanded from macro 'mvwinch' ...(wmove((win),(y),(x)) == ERR ? NCURSES_CAST(chtype, ERR) : winch(win)) ^~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/curses.h:222:34: note: expanded from macro 'NCURSES_CAST' #define NCURSES_CAST(type,value) (type)(value) ^~~~~~~~~~~~~ 1 warning generated. ---------- components: Extension Modules messages: 312810 nosy: christian.heimes priority: low severity: normal stage: needs patch status: open title: clang compiler warnings on Travis type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 08:28:57 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 13:28:57 +0000 Subject: [issue30622] Fix NPN guard for OpenSSL 1.1 In-Reply-To: <1497107294.71.0.653300932954.issue30622@psf.upfronthosting.co.za> Message-ID: <1519565337.75.0.467229070634.issue30622@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset df1732a4734190fefc8814687895fc1168716c37 by Christian Heimes in branch '2.7': [2.7] bpo-30622: Fix NPN for OpenSSL 1.1.1-pre1 (GH-5876) (#5882) https://github.com/python/cpython/commit/df1732a4734190fefc8814687895fc1168716c37 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 08:29:02 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 13:29:02 +0000 Subject: [issue30622] Fix NPN guard for OpenSSL 1.1 In-Reply-To: <1497107294.71.0.653300932954.issue30622@psf.upfronthosting.co.za> Message-ID: <1519565342.4.0.467229070634.issue30622@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset a79591cfb81dde65bb2f891d62de0161c23a4ff4 by Christian Heimes in branch '3.6': [3.6] bpo-30622: Fix NPN for OpenSSL 1.1.1-pre1 (GH-5876) (#5881) https://github.com/python/cpython/commit/a79591cfb81dde65bb2f891d62de0161c23a4ff4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 08:43:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Feb 2018 13:43:14 +0000 Subject: [issue32949] Simplify "with"-related opcodes Message-ID: <1519566194.29.0.467229070634.issue32949@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : There are some issues with "with"-related opcodes. All other opcodes has constant stack effect for particular control flow. For example FOR_ITER always has the stack effect 1 if not jump (pushes the next item) and -1 if jumps (pops the iterator). The only exceptions are WITH_CLEANUP_START which pushes 1 or 2 values depending on TOS, and WITH_CLEANUP_FINISH which pops 2 or 3 values depending on values pushed by preceding WITH_CLEANUP_START. This breaks consistency and may make debugging harder. WITH_CLEANUP_START duplicates a one of values on the stack without good reasons. Even the comment in the initial commit exposed uncertainty in this. The proposed PR simplifies WITH_CLEANUP_START and WITH_CLEANUP_FINISH. They will be now executed only when the exception is raised. In normal case they will be replaced with calling a function `__exit__(None, None, None)`. LOAD_CONST 0 ((None, None, None)) CALL_FUNCTION_EX 0 POP_TOP WITH_CLEANUP_FINISH will be merged with the following END_FINALLY. This PR is inspired by PR 5112 by Mark Shannon, but Mark goes further. In addition to simplifying the implementation and the mental model, the PR adds a tiny bit of performance gain. $ ./python -m perf timeit -s 'class CM:' -s ' def __enter__(s): pass' -s ' def __exit__(*args): pass' -s 'cm = CM()' -- 'with cm: pass' Unpatched: Mean +- std dev: 227 ns +- 6 ns Patched: Mean +- std dev: 205 ns +- 10 ns ---------- components: Interpreter Core messages: 312813 nosy: Mark.Shannon, benjamin.peterson, pitrou, serhiy.storchaka priority: normal severity: normal status: open title: Simplify "with"-related opcodes type: performance versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 08:48:21 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Feb 2018 13:48:21 +0000 Subject: [issue32949] Simplify "with"-related opcodes In-Reply-To: <1519566194.29.0.467229070634.issue32949@psf.upfronthosting.co.za> Message-ID: <1519566501.43.0.467229070634.issue32949@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +5658 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 08:50:58 2018 From: report at bugs.python.org (bbayles) Date: Sun, 25 Feb 2018 13:50:58 +0000 Subject: [issue32017] profile.Profile() has no method enable() In-Reply-To: <1510607839.08.0.213398074469.issue32017@psf.upfronthosting.co.za> Message-ID: <1519566657.99.0.467229070634.issue32017@psf.upfronthosting.co.za> bbayles added the comment: I'm afraid that profile.Profile and cProfile.Profile behave pretty differently, and there's not a good way to bring the methods from the C version to the Python version. The example at [1] shows a cProfile.Profile object being instantiated and enabled. At this point the profiler is tracing execution - until the disable() method is called, any activity is recorded. profile.Profile doesn't work this way. Creating a profile.Profile object doesn't cause activity to be recorded. It doesn't do anything until you call one of its run* methods. This is because the C version uses PyEval_SetProfile ([2]) to take advantage of CPython's "low-level support for attaching profiling and execution tracing facilities" ([3]). I don't think we can do that from the Python version. There is already a precedent for showing differences between cProfile.Profile and profile.Profile in the existing docs - see [4]. [1] https://docs.python.org/3/library/profile.html#profile.Profile [2] https://github.com/python/cpython/blob/6f0eb93183519024cb360162bdd81b9faec97ba6/Modules/_lsprof.c#L693 [3] https://docs.python.org/3/c-api/init.html#profiling-and-tracing [4] https://docs.python.org/3/library/profile.html#using-a-custom-timer ---------- nosy: +bbayles _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 09:02:36 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Feb 2018 14:02:36 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1519567356.24.0.467229070634.issue17611@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Finally it is merged, and seems successfully. Thank you all involved, and first at all Mark, the original author. This unblocked further changes, issue32489 and issue32949. And we can try implement other ideas. Changes in the f_lineno setter fixed crashes in issue17288 and issue28883. But while writing tests for it I found other crashers, will open new issues soon. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 09:36:47 2018 From: report at bugs.python.org (=?utf-8?b?6rCV7ISx7J28IChMdWF2aXMp?=) Date: Sun, 25 Feb 2018 14:36:47 +0000 Subject: [issue32950] profiling python gc Message-ID: <1519569407.24.0.467229070634.issue32950@psf.upfronthosting.co.za> New submission from ??? (Luavis) : There is way to logging python garbage collection event. but no way to profiling it. ---------- messages: 312816 nosy: ??? (Luavis) priority: normal severity: normal status: open title: profiling python gc type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 10:08:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Feb 2018 15:08:13 +0000 Subject: [issue13607] Move generator specific sections out of ceval. In-Reply-To: <1323993774.57.0.570625937446.issue13607@psf.upfronthosting.co.za> Message-ID: <1519571293.51.0.467229070634.issue13607@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The WHY_* codes are gone in 3.8 (see issue17611). Exception state was moved from frame to generator in 3.7 (see issue25612). Can some parts of the patch be applied to the current code? Or it is completely outdated? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 10:08:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Feb 2018 15:08:25 +0000 Subject: [issue13607] Move generator specific sections out of ceval. In-Reply-To: <1323993774.57.0.570625937446.issue13607@psf.upfronthosting.co.za> Message-ID: <1519571305.04.0.467229070634.issue13607@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 10:23:31 2018 From: report at bugs.python.org (bbayles) Date: Sun, 25 Feb 2018 15:23:31 +0000 Subject: [issue32017] profile.Profile() has no method enable() In-Reply-To: <1510607839.08.0.213398074469.issue32017@psf.upfronthosting.co.za> Message-ID: <1519572211.37.0.467229070634.issue32017@psf.upfronthosting.co.za> Change by bbayles : ---------- keywords: +patch pull_requests: +5659 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 10:27:59 2018 From: report at bugs.python.org (bbayles) Date: Sun, 25 Feb 2018 15:27:59 +0000 Subject: [issue32017] profile.Profile() has no method enable() In-Reply-To: <1510607839.08.0.213398074469.issue32017@psf.upfronthosting.co.za> Message-ID: <1519572479.5.0.467229070634.issue32017@psf.upfronthosting.co.za> bbayles added the comment: I've made a pull request that clarifies things in the docs. As csabella notes, there are some more differences that could be pointed out. The 'subcalls' and 'builtins' arguments could be explained as well. Nonetheless, I think the PR does fix some definitely incorrect aspects of the existing documentation and is at least an improvement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 10:33:57 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Feb 2018 15:33:57 +0000 Subject: [issue13897] Move fields relevant to sys.exc_info out of frame into generator/threadstate In-Reply-To: <1327767887.13.0.0676848614688.issue13897@psf.upfronthosting.co.za> Message-ID: <1519572837.09.0.467229070634.issue13897@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Aren't they were moved in issue25612? Is there something that should be done in this issue? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 10:34:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Feb 2018 15:34:05 +0000 Subject: [issue13897] Move fields relevant to sys.exc_info out of frame into generator/threadstate In-Reply-To: <1327767887.13.0.0676848614688.issue13897@psf.upfronthosting.co.za> Message-ID: <1519572845.21.0.467229070634.issue13897@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 10:36:22 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 15:36:22 +0000 Subject: [issue28124] Rework SSL module documentation In-Reply-To: <1473762840.76.0.666078412099.issue28124@psf.upfronthosting.co.za> Message-ID: <1519572982.22.0.467229070634.issue28124@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +5660 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 11:02:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Feb 2018 16:02:13 +0000 Subject: [issue32759] multiprocessing.Array do not release shared memory In-Reply-To: <1517692462.01.0.467229070634.issue32759@psf.upfronthosting.co.za> Message-ID: <1519574533.5.0.467229070634.issue32759@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 11:32:16 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 25 Feb 2018 16:32:16 +0000 Subject: [issue32622] Implement loop.sendfile In-Reply-To: <1517080969.81.0.467229070634.issue32622@psf.upfronthosting.co.za> Message-ID: <1519576336.68.0.467229070634.issue32622@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New changeset a19fb3c6aaa7632410d1d9dcb395d7101d124da4 by Andrew Svetlov in branch 'master': bpo-32622: Native sendfile on windows (#5565) https://github.com/python/cpython/commit/a19fb3c6aaa7632410d1d9dcb395d7101d124da4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 11:33:23 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 25 Feb 2018 16:33:23 +0000 Subject: [issue32622] Implement loop.sendfile In-Reply-To: <1517080969.81.0.467229070634.issue32622@psf.upfronthosting.co.za> Message-ID: <1519576403.86.0.467229070634.issue32622@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5661 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 12:05:08 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 25 Feb 2018 17:05:08 +0000 Subject: [issue13790] In str.format an incorrect error message for list, tuple, dict, set In-Reply-To: <1326605478.95.0.601079964751.issue13790@psf.upfronthosting.co.za> Message-ID: <1519578308.53.0.467229070634.issue13790@psf.upfronthosting.co.za> Cheryl Sabella added the comment: >From the examples in msg220401, issue28385 changed it to print the object type in the message. >>> format([], 'd') Traceback (most recent call last): File "", line 1, in TypeError: unsupported format string passed to list.__format__ >>> format((), 'd') Traceback (most recent call last): File "", line 1, in TypeError: unsupported format string passed to tuple.__format__ Would the change left on this issue be to create a PR for Terry's documetation patch? Thanks! ---------- nosy: +csabella 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 Feb 25 12:11:00 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 25 Feb 2018 17:11:00 +0000 Subject: [issue32622] Implement loop.sendfile In-Reply-To: <1517080969.81.0.467229070634.issue32622@psf.upfronthosting.co.za> Message-ID: <1519578660.5.0.467229070634.issue32622@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 632c1cb57176d268d65a9fd7b00582f32e0884ee by Miss Islington (bot) in branch '3.7': bpo-32622: Native sendfile on windows (GH-5565) https://github.com/python/cpython/commit/632c1cb57176d268d65a9fd7b00582f32e0884ee ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 12:14:13 2018 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 25 Feb 2018 17:14:13 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1519578853.5.0.467229070634.issue12345@psf.upfronthosting.co.za> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 12:18:04 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 17:18:04 +0000 Subject: [issue32951] Prohibit direct instantiation of SSLSocket and SSLObject Message-ID: <1519579084.45.0.467229070634.issue32951@psf.upfronthosting.co.za> New submission from Christian Heimes : The constructors of SSLObject and SSLSocket were never documented, tested, or meant to be used directly. Instead users were suppose to use ssl.wrap_socket or an SSLContext object. The ssl.wrap_socket() function and direct instantiation of SSLSocket has multiple issues. From my mail "No hostname matching with ssl.wrap_socket() and SSLSocket() constructor" to PSRT: The ssl module has three ways to create a SSLSocket object: 1) ssl.wrap_socket() [1] 2) ssl.SSLSocket() can be instantiated directly without a context [2] 3) SSLContext.wrap_socket() [3] Variant (1) and (2) are old APIs with insecure default settings. Variant (3) is the new and preferred way. With ssl.create_default_context() or ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT) the socket is configured securely with hostname matching and cert validation enabled. While Martin Panter was reviewing my documentation improvements for the ssl module, he pointed out an issue, https://github.com/python/cpython/pull/3530#discussion_r170407478 . ssl.wrap_socket() and ssl.SSLSocket() default to CERT_NONE but PROTOCOL_TLS_CLIENT is documented to set CERT_REQUIRED. After a closer look, it turned out that the code is robust and refuses to accept PROTOCOL_TLS_CLIENT + default values with "Cannot set verify_mode to CERT_NONE when check_hostname is enabled.". I consider the behavior a feature. However ssl.SSLSocket() constructor and ssl.wrap_socket() have more fundamental security issues. I haven't looked at the old legacy APIs in a while and only concentrated on SSLContext. To my surprise both APIs do NOT perform or allow hostname matching. The wrap_socket() function does not even take a server_hostname argument, so it doesn't send a SNI TLS extension either. These bad default settings can lead to suprising security bugs in 3rd party code. This example doesn't fail although the hostname doesn't match the certificate: --- import socket import ssl cafile = ssl.get_default_verify_paths().cafile with socket.socket() as sock: ssock = ssl.SSLSocket( sock, cert_reqs=ssl.CERT_REQUIRED, ca_certs=cafile, server_hostname='www.python.org' ) ssock.connect(('www.evil.com', 443)) --- I don't see a way to fix the issue in a secure way while keeping backwards compatibility. We could either modify the default behavior of ssl.wrap_socket() and SSLSocket() constructor, or drop both features completely. Either way it's going to break software that uses them. Since I like to get rid of variants (1) and (2), I would favor to remove them in favor of SSLContext.wrap_socket(). At least we should implement my documentation bug 28124 [4] and make ssl.wrap_socket() less prominent. I'd appreciate any assistance. By the way, SSLObject is sane because it always goes through SSLContext.wrap_bio(). Thanks Benjamin! Regards, Christian [1] https://docs.python.org/3/library/ssl.html#ssl.wrap_socket [2] https://docs.python.org/3/library/ssl.html#ssl.SSLSocket [3] https://docs.python.org/3/library/ssl.html#ssl.SSLContext.wrap_socket [4] https://bugs.python.org/issue28124 ---------- assignee: christian.heimes components: SSL messages: 312823 nosy: alex, christian.heimes, dstufft, janssen, pitrou priority: normal severity: normal stage: needs patch status: open title: Prohibit direct instantiation of SSLSocket and SSLObject type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 12:20:31 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 17:20:31 +0000 Subject: [issue32951] Prohibit direct instantiation of SSLSocket and SSLObject In-Reply-To: <1519579084.45.0.467229070634.issue32951@psf.upfronthosting.co.za> Message-ID: <1519579231.24.0.467229070634.issue32951@psf.upfronthosting.co.za> Christian Heimes added the comment: Antoine Pitrou replied: The ssl.SSLSocket constructor was never meant to be called by user code directly (and I don't think we document it as such). Anyone doing this is asking for trouble (including compatibility breakage as we change the constructor signature). ssl.wrap_socket() is essentially a legacy API. I would suggest the following measures : - Deprecate ssl.wrap_socket() and slate it to be removed around 3.8 or 3.9. SSLContext is now is any recent 2.7 or 3.x version, so the compatibility argument doesn't hold anymore. - Severely de-emphasize ssl.wrap_socket() in the documentation (relegate it in a "legacy API" section at the end), and put a warning that it's insecure. --- Alex Gaynor replied: If SSLSocket.__init__ is meant to be private and not called by users, perhaps we could clean up the API and remove all the legacy arguments it takes, bring it down to just taking a context? It'd break anyone who was relying on it, but they weren't supposed to be relying on it in the first place... (Is it documented even?) --- I have implemented Antoine's second proposal in #28124. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 12:23:55 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 17:23:55 +0000 Subject: [issue32951] Prohibit direct instantiation of SSLSocket and SSLObject In-Reply-To: <1519579084.45.0.467229070634.issue32951@psf.upfronthosting.co.za> Message-ID: <1519579435.18.0.467229070634.issue32951@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +5662 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 12:25:57 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 25 Feb 2018 17:25:57 +0000 Subject: [issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False) In-Reply-To: <1519436693.93.0.467229070634.issue32929@psf.upfronthosting.co.za> Message-ID: <1519579557.73.0.467229070634.issue32929@psf.upfronthosting.co.za> Eric V. Smith added the comment: Here's the simplest way I can describe this, and it's also the table used inside the code. The column "has-explicit-hash?" is trying to answer the question "is there a __hash__ function defined in this class?". It is set to False if either __hash__ is missing, or if __hash__ is None and there's an __eq__ function. I'm assuming that the __hash__ is implicit in the latter case. # Decide if/how we're going to create a hash function. Key is # (unsafe_hash, eq, frozen, does-hash-exist). Value is the action to # take. # Actions: # '': Do nothing. # 'none': Set __hash__ to None. # 'add': Always add a generated __hash__function. # 'exception': Raise an exception. # # +-------------------------------------- unsafe_hash? # | +------------------------------- eq? # | | +------------------------ frozen? # | | | +---------------- has-explicit-hash? # | | | | # | | | | +------- action # | | | | | # v v v v v _hash_action = {(False, False, False, False): (''), (False, False, False, True ): (''), (False, False, True, False): (''), (False, False, True, True ): (''), (False, True, False, False): ('none'), (False, True, False, True ): (''), (False, True, True, False): ('add'), (False, True, True, True ): (''), (True, False, False, False): ('add'), (True, False, False, True ): ('exception'), (True, False, True, False): ('add'), (True, False, True, True ): ('exception'), (True, True, False, False): ('add'), (True, True, False, True ): ('exception'), (True, True, True, False): ('add'), (True, True, True, True ): ('exception'), } PR will be ready as soon as I clean a few things up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 12:30:35 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 25 Feb 2018 17:30:35 +0000 Subject: [issue32945] sorted(generator) is slower than sorted(list-comprehension) In-Reply-To: <1519546970.72.0.467229070634.issue32945@psf.upfronthosting.co.za> Message-ID: <1519579835.73.0.467229070634.issue32945@psf.upfronthosting.co.za> Raymond Hettinger added the comment: [Antony Lee] > so both cases are much more similar -- superficially, at least. Try disassembling the inner code object as well -- that is where the work gets done and the list comprehension can take advantage of the LIST_APPEND opcode (rather than passing data to list_extend through an iterator which has more overhead). [Stefan Behnel] > The difference is that comprehensions are generally more efficient than generators, simply because they are more specialised. Yes, that is most succinct description of why would expect a difference. [Steven D'Aprano] > So I don't think this is a bug, and I don't think there's any room to optimize the generator comprehension case. I concur. [Antony Lee] > Feel free to close the issue if that's not the forum for this discussion, but I'm still baffled by what's happening. Yes, this discussion is more suited to a StackOverflow entry where people commonly ask about why Python behaves as it does. The bug tracker is more suited to known regressions or provable optimizations. (One forum is for "I'm baffled" and the other is for "I have an improvement"). Marking this a closed. If some demonstrable optimization is found, feel free to reopen. ---------- nosy: +rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 12:31:01 2018 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 25 Feb 2018 17:31:01 +0000 Subject: [issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False) In-Reply-To: <1519579557.73.0.467229070634.issue32929@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: I don't know if I'm unique, but I find such a table with 4 Boolean keys hard to understand. I'd rather see it written up as a series of nested 'if' statements. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 12:40:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Feb 2018 17:40:42 +0000 Subject: [issue32856] Optimize the `for y in [x]` idiom in comprehensions In-Reply-To: <1518770483.24.0.467229070634.issue32856@psf.upfronthosting.co.za> Message-ID: <1519580442.49.0.467229070634.issue32856@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 12:52:02 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 25 Feb 2018 17:52:02 +0000 Subject: [issue32925] AST optimizer: Change a list into tuple in iterations and containment tests In-Reply-To: <1519422258.29.0.467229070634.issue32925@psf.upfronthosting.co.za> Message-ID: <1519581122.73.0.467229070634.issue32925@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The direct inspiration of this optimization was your note that similar optimization was implemented in Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 13:01:09 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 25 Feb 2018 18:01:09 +0000 Subject: [issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False) In-Reply-To: <1519436693.93.0.467229070634.issue32929@psf.upfronthosting.co.za> Message-ID: <1519581669.21.0.467229070634.issue32929@psf.upfronthosting.co.za> Eric V. Smith added the comment: if unsafe_hash: # If there's already a __hash__, raise TypeError, otherwise add __hash__. if has_explicit_hash: hash_action = 'exception' else: hash_action = 'add' else: # unsafe_hash is False (the default). if has_explicit_hash: # There's already a __hash__, don't overwrite it. hash_action = '' else: if eq and frozen: # It's frozen and we added __eq__, generate __hash__. hash_action = 'add' elif eq and not frozen: # It's not frozen but has __eq__, make it unhashable. # This is the default if no params to @dataclass. hash_action = 'none' else: # There's no __eq__, use the base class __hash__. hash_action = '' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 13:30:16 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 25 Feb 2018 18:30:16 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse In-Reply-To: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> Message-ID: <1519583416.86.0.467229070634.issue32880@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Looking at the creation of the instances of pyparse.PyParse() and hyperparser.HyperParser(), I was a little surprised that they (the instances) are local variables to the methods and aren't instance variables. Since they are called fairly often, wouldn't it be more efficient to use an instance variable (for example self.hp in calltips instead of hp) and update the attributes when something like open_calltips() is executed? Maybe the overhead of creating a class is neglible compared to the storage of not destroying it every time? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 13:36:52 2018 From: report at bugs.python.org (Brett Cannon) Date: Sun, 25 Feb 2018 18:36:52 +0000 Subject: [issue31355] Remove Travis CI macOS job: rely on buildbots In-Reply-To: <1504653881.76.0.488933881504.issue31355@psf.upfronthosting.co.za> Message-ID: <1519583812.39.0.467229070634.issue31355@psf.upfronthosting.co.za> Brett Cannon added the comment: Awesome, thanks for taking the time to verify all of that! And I agree with your logic to not bother backporting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 13:38:20 2018 From: report at bugs.python.org (Brett Cannon) Date: Sun, 25 Feb 2018 18:38:20 +0000 Subject: [issue32932] better error message when __all__ contains non-str objects In-Reply-To: <1519462308.25.0.467229070634.issue32932@psf.upfronthosting.co.za> Message-ID: <1519583900.91.0.467229070634.issue32932@psf.upfronthosting.co.za> Brett Cannon added the comment: This is only for `import *`, though, right? So I would argue you're already tossing import perf out the window if you're willing to pollute your namespace like that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 13:51:02 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 25 Feb 2018 18:51:02 +0000 Subject: [issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False) In-Reply-To: <1519436693.93.0.467229070634.issue32929@psf.upfronthosting.co.za> Message-ID: <1519584662.29.0.467229070634.issue32929@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- keywords: +patch pull_requests: +5663 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 13:55:56 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 25 Feb 2018 18:55:56 +0000 Subject: [issue31454] Include "import as" in tutorial In-Reply-To: <1505317940.24.0.986048971751.issue31454@psf.upfronthosting.co.za> Message-ID: <1519584956.65.0.467229070634.issue31454@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: > PR 4041 looks good to me. Mariatta, do you have time to look at Mario's patch? Sorry I just saw this now, months later. Looks good to me. I can merge and backport once the CI passed. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 13:57:52 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 25 Feb 2018 18:57:52 +0000 Subject: [issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False) In-Reply-To: <1519436693.93.0.467229070634.issue32929@psf.upfronthosting.co.za> Message-ID: <1519585072.82.0.467229070634.issue32929@psf.upfronthosting.co.za> Eric V. Smith added the comment: I've been focused on getting the code fix in for the next beta release on 2018-02-26, and leaving the possible parameter name change for later. I don't feel strongly about the parameter name. Right now it's unsafe_hash, per Guido's original proposal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 14:06:03 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 25 Feb 2018 19:06:03 +0000 Subject: [issue25059] Mistake in input-output tutorial regarding print() seperator In-Reply-To: <1441903521.59.0.166588959306.issue25059@psf.upfronthosting.co.za> Message-ID: <1519585563.94.0.467229070634.issue25059@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 84c4b0cc67ceb4b70842b78c718b6e8214874d6a by Mariatta (Cheryl Sabella) in branch 'master': bpo-25059: Clarify the print separator usage in tutorial (GH-5879) https://github.com/python/cpython/commit/84c4b0cc67ceb4b70842b78c718b6e8214874d6a ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 14:07:11 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 25 Feb 2018 19:07:11 +0000 Subject: [issue25059] Mistake in input-output tutorial regarding print() seperator In-Reply-To: <1441903521.59.0.166588959306.issue25059@psf.upfronthosting.co.za> Message-ID: <1519585631.93.0.467229070634.issue25059@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5664 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 14:08:49 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 25 Feb 2018 19:08:49 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1519585729.13.0.467229070634.issue32394@psf.upfronthosting.co.za> Ned Deily added the comment: What's the status of this issue? 3.7.0b2 is tagging in 48 hours or so and 3.6.5rc1 is in less than 2 weeks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 14:09:12 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 25 Feb 2018 19:09:12 +0000 Subject: [issue25059] Mistake in input-output tutorial regarding print() seperator In-Reply-To: <1441903521.59.0.166588959306.issue25059@psf.upfronthosting.co.za> Message-ID: <1519585752.48.0.467229070634.issue25059@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5665 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 14:09:42 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 25 Feb 2018 19:09:42 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1519585782.64.0.467229070634.issue32604@psf.upfronthosting.co.za> Ned Deily added the comment: What's the status of this issue? 3.7.0b2 is tagging in 48 hours or so. ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 14:11:14 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 25 Feb 2018 19:11:14 +0000 Subject: [issue31454] Include "import as" in tutorial In-Reply-To: <1505317940.24.0.986048971751.issue31454@psf.upfronthosting.co.za> Message-ID: <1519585874.22.0.467229070634.issue31454@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset fbee88244e8921afdb29fde51a9a010a8ae18277 by Mariatta (Mario Corchero) in branch 'master': bpo-31454: Include information about "import X as Y" in Modules tutorial (GH-4041) https://github.com/python/cpython/commit/fbee88244e8921afdb29fde51a9a010a8ae18277 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 14:11:52 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 25 Feb 2018 19:11:52 +0000 Subject: [issue32872] backport of #32305 causes regressions in various packages In-Reply-To: <1519031028.52.0.467229070634.issue32872@psf.upfronthosting.co.za> Message-ID: <1519585912.13.0.467229070634.issue32872@psf.upfronthosting.co.za> Ned Deily added the comment: OK, I agree with Brett and Nick. Barry, are you OK with reverting this change for 3.6? If so, can you do the honors? ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 14:12:21 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 25 Feb 2018 19:12:21 +0000 Subject: [issue31454] Include "import as" in tutorial In-Reply-To: <1505317940.24.0.986048971751.issue31454@psf.upfronthosting.co.za> Message-ID: <1519585941.05.0.467229070634.issue31454@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5666 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 14:13:20 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 25 Feb 2018 19:13:20 +0000 Subject: [issue31454] Include "import as" in tutorial In-Reply-To: <1505317940.24.0.986048971751.issue31454@psf.upfronthosting.co.za> Message-ID: <1519586000.68.0.467229070634.issue31454@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5667 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 14:13:35 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 25 Feb 2018 19:13:35 +0000 Subject: [issue25059] Mistake in input-output tutorial regarding print() seperator In-Reply-To: <1441903521.59.0.166588959306.issue25059@psf.upfronthosting.co.za> Message-ID: <1519586015.81.0.467229070634.issue25059@psf.upfronthosting.co.za> miss-islington added the comment: New changeset ddf2485103c1e56ba4f290641247dfa07fcbe7f3 by Miss Islington (bot) in branch '3.7': bpo-25059: Clarify the print separator usage in tutorial (GH-5879) https://github.com/python/cpython/commit/ddf2485103c1e56ba4f290641247dfa07fcbe7f3 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 14:14:22 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 25 Feb 2018 19:14:22 +0000 Subject: [issue31454] Include "import as" in tutorial In-Reply-To: <1505317940.24.0.986048971751.issue31454@psf.upfronthosting.co.za> Message-ID: <1519586062.45.0.467229070634.issue31454@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5668 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 14:14:53 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 25 Feb 2018 19:14:53 +0000 Subject: [issue13790] In str.format an incorrect error message for list, tuple, dict, set In-Reply-To: <1326605478.95.0.601079964751.issue13790@psf.upfronthosting.co.za> Message-ID: <1519586093.16.0.467229070634.issue13790@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In msg151730, R. David Murry said "Terry's [first] patch with the ("{}") removed should be committed, though." In msg151738, Eric V. Smith said "I agree with your comment about Terry's patch." My second patch removed "{}" but also made more text changes, explained in msg151757. Someone should re-review ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 14:16:37 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 25 Feb 2018 19:16:37 +0000 Subject: [issue31454] Include "import as" in tutorial In-Reply-To: <1505317940.24.0.986048971751.issue31454@psf.upfronthosting.co.za> Message-ID: <1519586197.02.0.467229070634.issue31454@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks everyone. I've merged Marios's PR. The backport PRs have started and will automerge. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 14:21:17 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 25 Feb 2018 19:21:17 +0000 Subject: [issue25059] Mistake in input-output tutorial regarding print() seperator In-Reply-To: <1441903521.59.0.166588959306.issue25059@psf.upfronthosting.co.za> Message-ID: <1519586477.93.0.467229070634.issue25059@psf.upfronthosting.co.za> miss-islington added the comment: New changeset b9678d3aa156996947655ed66b554f6307b29546 by Miss Islington (bot) in branch '3.6': bpo-25059: Clarify the print separator usage in tutorial (GH-5879) https://github.com/python/cpython/commit/b9678d3aa156996947655ed66b554f6307b29546 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 14:21:44 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 25 Feb 2018 19:21:44 +0000 Subject: [issue32872] backport of #32305 causes regressions in various packages In-Reply-To: <1519031028.52.0.467229070634.issue32872@psf.upfronthosting.co.za> Message-ID: <1519586504.54.0.467229070634.issue32872@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I'd personally prefer to keep the fix (I ran into some problems w/3.6), but I'll defer to the RM. I'll revert the change for 3.6, but I want to test it with importlib_resources first, since I'll probably have to spin a new release of that package too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 14:29:41 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 25 Feb 2018 19:29:41 +0000 Subject: [issue32872] backport of #32305 causes regressions in various packages In-Reply-To: <1519031028.52.0.467229070634.issue32872@psf.upfronthosting.co.za> Message-ID: <1519586981.46.0.467229070634.issue32872@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks, Barry! I don't see that either action is ideal but I am concerned about breaking third-party packages and 2 (already known) breakages is worrisome. And thanks, @doko, for bringing the matter up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 14:33:16 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 25 Feb 2018 19:33:16 +0000 Subject: [issue31454] Include "import as" in tutorial In-Reply-To: <1505317940.24.0.986048971751.issue31454@psf.upfronthosting.co.za> Message-ID: <1519587196.32.0.467229070634.issue31454@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 5a07608d0855e4104e4070328155b52010dec4e7 by Miss Islington (bot) in branch '3.6': bpo-31454: Include information about "import X as Y" in Modules tutorial (GH-4041) https://github.com/python/cpython/commit/5a07608d0855e4104e4070328155b52010dec4e7 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 14:35:54 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 25 Feb 2018 19:35:54 +0000 Subject: [issue31454] Include "import as" in tutorial In-Reply-To: <1505317940.24.0.986048971751.issue31454@psf.upfronthosting.co.za> Message-ID: <1519587354.59.0.467229070634.issue31454@psf.upfronthosting.co.za> miss-islington added the comment: New changeset e48e6499bbad56f7cc665efa25ae4847f51dbc38 by Miss Islington (bot) in branch '3.7': bpo-31454: Include information about "import X as Y" in Modules tutorial (GH-4041) https://github.com/python/cpython/commit/e48e6499bbad56f7cc665efa25ae4847f51dbc38 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 14:38:26 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 25 Feb 2018 19:38:26 +0000 Subject: [issue31454] Include "import as" in tutorial In-Reply-To: <1505317940.24.0.986048971751.issue31454@psf.upfronthosting.co.za> Message-ID: <1519587506.88.0.467229070634.issue31454@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 76349471adfa4366a92438c88fd05a0e1e94c59b by Miss Islington (bot) in branch '2.7': bpo-31454: Include information about "import X as Y" in Modules tutorial (GH-4041) https://github.com/python/cpython/commit/76349471adfa4366a92438c88fd05a0e1e94c59b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 14:52:11 2018 From: report at bugs.python.org (Sergey Kostyuk) Date: Sun, 25 Feb 2018 19:52:11 +0000 Subject: [issue32952] Add __qualname__ for attributes of Mock instances Message-ID: <1519588331.93.0.467229070634.issue32952@psf.upfronthosting.co.za> New submission from Sergey Kostyuk : Good day. I have a question (or proposal, if you like) For now Mocks from unittest.mock module allows to mimic an interface of a some class or object instance. They pass isinstance checks, they allows to wrap callables with respect to their arguments. But there is a thing they don't mimic: a value of the __qualname__ attribute for a mock itself and its mocked attributes. So, here is the proposal: copy the value of __qualname__ attribute from the wrapped (mocked) instance for all of the attributes of a Mock. I don't know if it's reasonable enough to be implemented at all but it can be handy in some situations. An example of the current and desired behaviour is provided in the attached file. And sorry for my English ---------- components: Tests files: qualname_for_mocks.py messages: 312849 nosy: s_kostyuk priority: normal severity: normal status: open title: Add __qualname__ for attributes of Mock instances type: enhancement versions: Python 3.8 Added file: https://bugs.python.org/file47462/qualname_for_mocks.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 15:12:09 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 20:12:09 +0000 Subject: [issue32819] match_hostname() error reporting bug In-Reply-To: <1518354981.31.0.467229070634.issue32819@psf.upfronthosting.co.za> Message-ID: <1519589529.57.0.467229070634.issue32819@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 15:14:01 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 20:14:01 +0000 Subject: [issue18369] X509 cert class for ssl module In-Reply-To: <1373055037.38.0.259814019718.issue18369@psf.upfronthosting.co.za> Message-ID: <1519589641.32.0.467229070634.issue18369@psf.upfronthosting.co.za> Christian Heimes added the comment: I won't be able to land this in time for b2. It's most done but not production ready. I have only a limited amount of time and will use it to fix TLS 1.3 bits and pieces. Rescheduling for 3.8 ---------- priority: deferred blocker -> normal versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 15:18:40 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 20:18:40 +0000 Subject: [issue21541] Provide configure option --with-ssl for compilation with custom openssl In-Reply-To: <1400593614.19.0.224440922912.issue21541@psf.upfronthosting.co.za> Message-ID: <1519589920.57.0.467229070634.issue21541@psf.upfronthosting.co.za> Christian Heimes added the comment: Python 3.7+ uses https://www.gnu.org/software/autoconf-archive/ax_check_openssl.html to detect OpenSSL. It provides --with-openssl=DIR or can utilize pkg-config. I'm closing this feature issue as duplicate of #32598. ---------- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> Use autoconf to detect OpenSSL and libssl features _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 15:20:09 2018 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 25 Feb 2018 20:20:09 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1519590009.4.0.467229070634.issue12345@psf.upfronthosting.co.za> Change by Mark Dickinson : ---------- pull_requests: -5653 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 15:20:40 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 25 Feb 2018 20:20:40 +0000 Subject: [issue25059] Mistake in input-output tutorial regarding print() seperator In-Reply-To: <1441903521.59.0.166588959306.issue25059@psf.upfronthosting.co.za> Message-ID: <1519590040.27.0.467229070634.issue25059@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- pull_requests: +5669 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 15:24:29 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 20:24:29 +0000 Subject: [issue18293] ssl.wrap_socket (cert_reqs=...), getpeercert, and unvalidated certificates In-Reply-To: <1372100693.76.0.99629035685.issue18293@psf.upfronthosting.co.za> Message-ID: <1519590269.94.0.467229070634.issue18293@psf.upfronthosting.co.za> Christian Heimes added the comment: BPO #31372 and #18369 provide the necessary bits and pieces for your request. I didn't have enough time to finish both in time for 3.7 feature freeze. Hostname verification improvements and TLS 1.3 were more important. I'm closing this issue because ssl.wrap_socket() is deprecated and will be removed in the future. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 15:24:46 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 20:24:46 +0000 Subject: [issue26471] load_verify_locations(cadata) should load AUX ASN.1 to supported trusted certs In-Reply-To: <1456921480.82.0.773236455463.issue26471@psf.upfronthosting.co.za> Message-ID: <1519590286.19.0.467229070634.issue26471@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- priority: high -> normal versions: +Python 3.8 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 15:25:37 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 20:25:37 +0000 Subject: [issue27876] Add SSLContext.set_version_range(minver, maxver=None) In-Reply-To: <1472293835.86.0.296775745483.issue27876@psf.upfronthosting.co.za> Message-ID: <1519590337.37.0.467229070634.issue27876@psf.upfronthosting.co.za> Christian Heimes added the comment: My issue #32609 provides a better implementation. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Add setter and getter for min/max protocol ersion _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 15:28:07 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 20:28:07 +0000 Subject: [issue25115] SSL_set_verify_depth not exposed by the ssl module In-Reply-To: <1442280676.76.0.937947035148.issue25115@psf.upfronthosting.co.za> Message-ID: <1519590487.37.0.467229070634.issue25115@psf.upfronthosting.co.za> Christian Heimes added the comment: Both Alex and I agree that verify depth is not the right solution to solve your problem. I'd rather not add more APIs unless they are useful for general audience. OpenSSL has a good default for verify depth. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 15:28:13 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 20:28:13 +0000 Subject: [issue17123] Add OCSP support to ssl module In-Reply-To: <1359994472.8.0.804183286731.issue17123@psf.upfronthosting.co.za> Message-ID: <1519590493.21.0.467229070634.issue17123@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 15:29:17 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 20:29:17 +0000 Subject: [issue29413] ssl.SSLSocket.unwrap() is not flexible enough In-Reply-To: <1485975931.82.0.260230728322.issue29413@psf.upfronthosting.co.za> Message-ID: <1519590557.38.0.467229070634.issue29413@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- assignee: -> christian.heimes versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 15:32:28 2018 From: report at bugs.python.org (Christian Heimes) Date: Sun, 25 Feb 2018 20:32:28 +0000 Subject: [issue32378] test_npn_protocols broken with LibreSSL 2.6.1+ In-Reply-To: <1513709944.02.0.213398074469.issue32378@psf.upfronthosting.co.za> Message-ID: <1519590748.94.0.467229070634.issue32378@psf.upfronthosting.co.za> Christian Heimes added the comment: NPN issue has been fixed in BPO #30622. Thanks for your help! ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Fix NPN guard for OpenSSL 1.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 15:41:55 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 25 Feb 2018 20:41:55 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1519591315.91.0.467229070634.issue32911@psf.upfronthosting.co.za> Ned Deily added the comment: Is this going to get resolved in time for 3.7.0b2? If we need to change this behavior, I really do not want to delay this for b3 which is when the 3.7.0 ABI freezes; otherwise such a major behavior change would likely need to wait until 3.8. ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 15:50:29 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 25 Feb 2018 20:50:29 +0000 Subject: [issue25059] Mistake in input-output tutorial regarding print() seperator In-Reply-To: <1441903521.59.0.166588959306.issue25059@psf.upfronthosting.co.za> Message-ID: <1519591829.0.0.467229070634.issue25059@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset b7c1a94f94305d82fc77f833fd68cc8616991bd4 by Mariatta (Cheryl Sabella) in branch '2.7': [2.7] bpo-25059: Clarify the print separator usage in tutorial (GH-5879) https://github.com/python/cpython/commit/b7c1a94f94305d82fc77f833fd68cc8616991bd4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 15:50:49 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 25 Feb 2018 20:50:49 +0000 Subject: [issue25059] Mistake in input-output tutorial regarding print() seperator In-Reply-To: <1441903521.59.0.166588959306.issue25059@psf.upfronthosting.co.za> Message-ID: <1519591849.22.0.467229070634.issue25059@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7, Python 3.7, Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 15:55:06 2018 From: report at bugs.python.org (Ned Deily) Date: Sun, 25 Feb 2018 20:55:06 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1519592106.54.0.467229070634.issue31961@psf.upfronthosting.co.za> Ned Deily added the comment: What's the status of this issue? We need to make a decision soon about what to do for 3.7.0. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 16:03:37 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 25 Feb 2018 21:03:37 +0000 Subject: [issue13474] Mention of "-m" Flag Missing From Doc on Execution Model In-Reply-To: <1322165458.97.0.989343856998.issue13474@psf.upfronthosting.co.za> Message-ID: <1519592617.45.0.467229070634.issue13474@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +easy type: -> enhancement versions: +Python 3.7, Python 3.8 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 16:13:00 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 25 Feb 2018 21:13:00 +0000 Subject: [issue32500] PySequence_Length() raises TypeError on dict type In-Reply-To: <1515199107.36.0.467229070634.issue32500@psf.upfronthosting.co.za> Message-ID: <1519593180.4.0.467229070634.issue32500@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5670 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 16:14:07 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 25 Feb 2018 21:14:07 +0000 Subject: [issue32500] PySequence_Length() raises TypeError on dict type In-Reply-To: <1515199107.36.0.467229070634.issue32500@psf.upfronthosting.co.za> Message-ID: <1519593247.38.0.467229070634.issue32500@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5671 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 16:19:57 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 25 Feb 2018 21:19:57 +0000 Subject: [issue32500] PySequence_Length() raises TypeError on dict type In-Reply-To: <1515199107.36.0.467229070634.issue32500@psf.upfronthosting.co.za> Message-ID: <1519593597.35.0.467229070634.issue32500@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 139e64694f546982a8cc801dda30670abadb8d06 by Miss Islington (bot) in branch '3.7': bpo-32500: Correct the documentation for PySequence_Size() and PySequence_Length() (GH-5767) https://github.com/python/cpython/commit/139e64694f546982a8cc801dda30670abadb8d06 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 16:22:46 2018 From: report at bugs.python.org (miss-islington) Date: Sun, 25 Feb 2018 21:22:46 +0000 Subject: [issue32500] PySequence_Length() raises TypeError on dict type In-Reply-To: <1515199107.36.0.467229070634.issue32500@psf.upfronthosting.co.za> Message-ID: <1519593766.17.0.467229070634.issue32500@psf.upfronthosting.co.za> miss-islington added the comment: New changeset ecaa372f74eeb6c032791c520af6b23e527d335f by Miss Islington (bot) in branch '2.7': bpo-32500: Correct the documentation for PySequence_Size() and PySequence_Length() (GH-5767) https://github.com/python/cpython/commit/ecaa372f74eeb6c032791c520af6b23e527d335f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 16:24:18 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 25 Feb 2018 21:24:18 +0000 Subject: [issue5840] "Thread State and the Global Interpreter Lock" section of the docs doesn't cover TLS APIs In-Reply-To: <1240664318.91.0.855784600353.issue5840@psf.upfronthosting.co.za> Message-ID: <1519593858.52.0.467229070634.issue5840@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I believe this issue is superseded by PEP539 and issue25658? ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 16:28:09 2018 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 25 Feb 2018 21:28:09 +0000 Subject: [issue32945] sorted(generator) is slower than sorted(list-comprehension) In-Reply-To: <1519546970.72.0.467229070634.issue32945@psf.upfronthosting.co.za> Message-ID: <1519594089.84.0.467229070634.issue32945@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FYI, here is the disassembly of the inner code objects. It shows where the difference in speed arises: >>> from dis import dis >>> def f(): lc = [i for i in [1, 2]] ge = (i for i in [1, 2]) return lc, ge >>> for obj in f.__code__.co_consts: if type(obj) == type(f.__code__): print(obj) dis(obj) at 0x113d881e0, file "", line 2> 2 0 BUILD_LIST 0 2 LOAD_FAST 0 (.0) >> 4 FOR_ITER 8 (to 14) 6 STORE_FAST 1 (i) 8 LOAD_FAST 1 (i) 10 LIST_APPEND 2 <-- Append directly 12 JUMP_ABSOLUTE 4 >> 14 RETURN_VALUE at 0x1035afe40, file "", line 3> 3 0 LOAD_FAST 0 (.0) >> 2 FOR_ITER 10 (to 14) 4 STORE_FAST 1 (i) 6 LOAD_FAST 1 (i) 8 YIELD_VALUE <-- Pass data through iterator 10 POP_TOP <-- Dispose of None from send() 12 JUMP_ABSOLUTE 2 >> 14 LOAD_CONST 0 (None) 16 RETURN_VALUE The list comprehension builds the list directly with the high-speed specialized, LIST_APPEND opcode. The generator runs YIELD_VALUE and POP_TOP but the work isn't done. There needs to be a context switch to list_extend() which then extract the value from the iterator and finally appends it to the list. Executive summary: there is overhead when passing data through the iterator protocol. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 16:29:04 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 25 Feb 2018 21:29:04 +0000 Subject: [issue32500] PySequence_Length() raises TypeError on dict type In-Reply-To: <1515199107.36.0.467229070634.issue32500@psf.upfronthosting.co.za> Message-ID: <1519594144.33.0.467229070634.issue32500@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 16:31:25 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 25 Feb 2018 21:31:25 +0000 Subject: [issue29237] Create enum for pstats sorting options In-Reply-To: <1484098294.24.0.117553666266.issue29237@psf.upfronthosting.co.za> Message-ID: <1519594285.65.0.467229070634.issue29237@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Can this one be closed since it was an enhancement and doesn't need to be backported? ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 17:23:51 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 25 Feb 2018 22:23:51 +0000 Subject: [issue32953] Dataclasses: frozen should not be inherited Message-ID: <1519597431.47.0.467229070634.issue32953@psf.upfronthosting.co.za> New submission from Eric V. Smith : Reported by Raymond Hettinger: When working on the docs for dataclasses, something unexpected came up. If a dataclass is specified to be frozen, that characteristic is inherited by subclasses which prevents them from assigning additional attributes: >>> @dataclass(frozen=True) class D: x: int = 10 >>> class S(D): pass >>> s = S() >>> s.cached = True Traceback (most recent call last): File "", line 1, in s.cached = True File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/dataclasses.py", line 448, in _frozen_setattr raise FrozenInstanceError(f'cannot assign to field {name!r}') dataclasses.FrozenInstanceError: cannot assign to field 'cached' Other immutable classes in Python don't behave the same way: >>> class T(tuple): pass >>> t = T([10, 20, 30]) >>> t.cached = True >>> class F(frozenset): pass >>> f = F([10, 20, 30]) >>> f.cached = True >>> class B(bytes): pass >>> b = B() >>> b.cached = True Raymond ---------- assignee: eric.smith components: Library (Lib) messages: 312866 nosy: eric.smith, rhettinger priority: normal severity: normal status: open title: Dataclasses: frozen should not be inherited type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 17:29:23 2018 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 25 Feb 2018 22:29:23 +0000 Subject: [issue32953] Dataclasses: frozen should not be inherited In-Reply-To: <1519597431.47.0.467229070634.issue32953@psf.upfronthosting.co.za> Message-ID: <1519597763.79.0.467229070634.issue32953@psf.upfronthosting.co.za> Eric V. Smith added the comment: A related issue is that dataclasses derived from frozen dataclasses are automatically "promoted" to being frozen. >>> @dataclass(frozen=True) ... class A: ... i: int ... >>> @dataclass ... class B(A): ... j: int ... >>> b = B(1, 2) >>> b.j = 3 Traceback (most recent call last): File "", line 1, in File "C:\home\eric\local\python\cpython\lib\dataclasses.py", line 452, in _frozen_setattr raise FrozenInstanceError(f'cannot assign to field {name!r}') dataclasses.FrozenInstanceError: cannot assign to field 'j' If this can't be addressed before 3.7, maybe it should be an error to declare B as non-frozen and then we can properly fix it in a future release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 18:19:08 2018 From: report at bugs.python.org (bbayles) Date: Sun, 25 Feb 2018 23:19:08 +0000 Subject: [issue17286] Make subprocess handling text output with universal_newlines more obious In-Reply-To: <1361708455.88.0.426093416103.issue17286@psf.upfronthosting.co.za> Message-ID: <1519600748.05.0.467229070634.issue17286@psf.upfronthosting.co.za> bbayles added the comment: This is fixed in 3.7 with the `text` parameter. See GitHub PR 4049: https://github.com/python/cpython/pull/4049 ---------- nosy: +bbayles _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 18:28:20 2018 From: report at bugs.python.org (bbayles) Date: Sun, 25 Feb 2018 23:28:20 +0000 Subject: [issue19894] zipfile ignores deflate level settings in zipinfo object In-Reply-To: <1386235609.47.0.431866049959.issue19894@psf.upfronthosting.co.za> Message-ID: <1519601300.29.0.467229070634.issue19894@psf.upfronthosting.co.za> bbayles added the comment: This was fixed in issue 21417, in Github PR 5385: https://github.com/python/cpython/pull/5385 ---------- nosy: +bbayles _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 20:23:43 2018 From: report at bugs.python.org (Ethan Furman) Date: Mon, 26 Feb 2018 01:23:43 +0000 Subject: [issue29237] Create enum for pstats sorting options In-Reply-To: <1484098294.24.0.117553666266.issue29237@psf.upfronthosting.co.za> Message-ID: <1519608223.7.0.467229070634.issue29237@psf.upfronthosting.co.za> Ethan Furman added the comment: Thanks for catching that! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 20:29:43 2018 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 26 Feb 2018 01:29:43 +0000 Subject: [issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False) In-Reply-To: <1519436693.93.0.467229070634.issue32929@psf.upfronthosting.co.za> Message-ID: <1519608583.56.0.467229070634.issue32929@psf.upfronthosting.co.za> Guido van Rossum added the comment: @steven.daprano the name was +1'ed by many people in the python-dev discussion as sending the right message. So I'm reluctant to change it. If you can cause a landslide of support for `_hash` there we can change it in b3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 21:30:20 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 26 Feb 2018 02:30:20 +0000 Subject: [issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False) In-Reply-To: <1519436693.93.0.467229070634.issue32929@psf.upfronthosting.co.za> Message-ID: <1519612220.01.0.467229070634.issue32929@psf.upfronthosting.co.za> Eric V. Smith added the comment: New changeset dbf9cff48a4ad0fd58e1c623ce1f36c3dd3d5f38 by Eric V. Smith in branch 'master': bpo-32929: Dataclasses: Change the tri-state hash parameter to the boolean unsafe_hash. (#5891) https://github.com/python/cpython/commit/dbf9cff48a4ad0fd58e1c623ce1f36c3dd3d5f38 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 21:31:35 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 26 Feb 2018 02:31:35 +0000 Subject: [issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False) In-Reply-To: <1519436693.93.0.467229070634.issue32929@psf.upfronthosting.co.za> Message-ID: <1519612295.36.0.467229070634.issue32929@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5672 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 21:33:23 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 26 Feb 2018 02:33:23 +0000 Subject: [issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False) In-Reply-To: <1519436693.93.0.467229070634.issue32929@psf.upfronthosting.co.za> Message-ID: <1519612403.3.0.467229070634.issue32929@psf.upfronthosting.co.za> Eric V. Smith added the comment: I'm going to close this. Steven: if you gain support for a parameter name change, please open another issue. ---------- priority: release blocker -> normal resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 21:41:46 2018 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 26 Feb 2018 02:41:46 +0000 Subject: [issue29988] with statements are not ensuring that __exit__ is called if __enter__ succeeds In-Reply-To: <1491349378.03.0.0671954460373.issue29988@psf.upfronthosting.co.za> Message-ID: <1519612906.89.0.467229070634.issue29988@psf.upfronthosting.co.za> Nick Coghlan added the comment: With issue 17611 merged (which moves stack unwinding to the compiler), I expect the exact details of this problem to have changed, but the general problem still exists: Ctrl-C may lead to __exit__ (or __aexit__) not being called even after __enter__ (or __aenter__) returns successfully, and this may happen even for context managers implemented with uninterruptible methods (e.g. in C in CPython without calling back into any Python code). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 23:07:52 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 26 Feb 2018 04:07:52 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse In-Reply-To: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> Message-ID: <1519618072.33.0.467229070634.issue32880@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If you [view] a message, there is an unlink button at the bottom for the author (and believe) and tracker gardeners. I did this for the duplicate and incomplete messages. In the future, lets put timing data for an idea on a separate issue for the idea. This puts everything about the idea in a one place. It is OK if we close the separate issue as rejected because the data show the idea not worthwhile. Unfortunately, there is no way to just move a message to another issue. But it can be copied to another and unlinked from the first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 23:10:09 2018 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 26 Feb 2018 04:10:09 +0000 Subject: [issue32876] HTMLParser raises exception on some inputs In-Reply-To: <1519069936.36.0.467229070634.issue32876@psf.upfronthosting.co.za> Message-ID: <1519618209.34.0.467229070634.issue32876@psf.upfronthosting.co.za> Change by Ezio Melotti : ---------- assignee: -> ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 25 23:16:29 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 26 Feb 2018 04:16:29 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse In-Reply-To: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> Message-ID: <1519618589.19.0.467229070634.issue32880@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As I mentioned before, Parser.set_code strongly suggests that Parser instances were intended to be reused. But you discovered the bug that prevented this, at least for one code result. With that fixed, it should be possible to have one Parser instance per editor. Since hyperparser is used to match each ), ], and } we could look at that too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 00:44:51 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 26 Feb 2018 05:44:51 +0000 Subject: [issue32880] IDLE: Fix and update and cleanup pyparse In-Reply-To: <1519093154.93.0.467229070634.issue32880@psf.upfronthosting.co.za> Message-ID: <1519623891.4.0.467229070634.issue32880@psf.upfronthosting.co.za> Terry J. Reedy added the comment: from idlelib.pyparse import Parser import timeit code='def f():\n' print(timeit.timeit("statement", # for example "p=Parser(4,4)", globals = globals())) statement microseconds Parser .1 # test timeit code Parser() 2.2 p.set_code('') 1.4 p.set_code(code) 1.8 '('.translate(map1) 1.5 or 2.2 depending on ParseMap Translate time is longer for real code and Parser() instance creation time must be well less than 1/10, maybe 1/100 of any answer time. If we don't reuse instances, though, set_code should be part of __init__ (and tests changed). Either change is low priority. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 01:18:42 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Feb 2018 06:18:42 +0000 Subject: [issue32949] Simplify "with"-related opcodes In-Reply-To: <1519566194.29.0.467229070634.issue32949@psf.upfronthosting.co.za> Message-ID: <1519625922.33.0.467229070634.issue32949@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This will not solve issue29988 but will open a way for solving it at least for synchronous "with" (swap POP_BLOCK and the following LOAD_CONST and disable interrupting after POP_BLOCK). ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 02:58:58 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 07:58:58 +0000 Subject: [issue31870] add timeout parameter for get_server_certificate in ssl.py In-Reply-To: <1508991085.56.0.213398074469.issue31870@psf.upfronthosting.co.za> Message-ID: <1519631938.46.0.467229070634.issue31870@psf.upfronthosting.co.za> Christian Heimes added the comment: It's too late to land a new feature in 3.7. ---------- stage: patch review -> needs patch versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:03:10 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Feb 2018 08:03:10 +0000 Subject: [issue32949] Simplify "with"-related opcodes In-Reply-To: <1519566194.29.0.467229070634.issue32949@psf.upfronthosting.co.za> Message-ID: <1519632190.49.0.467229070634.issue32949@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated PR seems fixes issue29988 for synchronous "with". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:11:28 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:11:28 +0000 Subject: [issue32257] Support Disabling Renegotiation for SSLContext In-Reply-To: <1512801503.1.0.213398074469.issue32257@psf.upfronthosting.co.za> Message-ID: <1519632688.66.0.467229070634.issue32257@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- pull_requests: +5673 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:17:59 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:17:59 +0000 Subject: [issue32257] Support Disabling Renegotiation for SSLContext In-Reply-To: <1512801503.1.0.213398074469.issue32257@psf.upfronthosting.co.za> Message-ID: <1519633079.16.0.467229070634.issue32257@psf.upfronthosting.co.za> Christian Heimes added the comment: The OP_NO_RENEGOTIATION option prevents renegotiation in TLS 1.2 and lower. Renegotiation is a problematic TLS feature that has led to security issues like CVE-2009-3555. TLS 1.3 has removed renegotiation completely in favor of much more reliable and simpler rekeying. PR5904 just adds the constant to the list of options and documents it. I didn't add it earlier because it wasn't available in the OpenSSL 1.1.0 branch until now. The next upcoming release of 1.1.0 will have it. ---------- nosy: +ned.deily priority: high -> deferred blocker versions: +Python 3.8 -Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:19:05 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:19:05 +0000 Subject: [issue31997] SSL lib does not handle trailing dot (period) in hostname or certificate In-Reply-To: <1510278854.68.0.213398074469.issue31997@psf.upfronthosting.co.za> Message-ID: <1519633145.4.0.467229070634.issue31997@psf.upfronthosting.co.za> Christian Heimes added the comment: I'm closing this bug as "not a bug" because it works as intended. The trailing dot has to be handled in the application layer. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:21:15 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Feb 2018 08:21:15 +0000 Subject: [issue21417] Compression level for zipfile In-Reply-To: <1399053616.42.0.124840881006.issue21417@psf.upfronthosting.co.za> Message-ID: <1519633275.85.0.467229070634.issue21417@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have a concern about the _compresslevel attribute of ZipInfo. Why is it underscored and not documented? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:22:40 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:22:40 +0000 Subject: [issue30141] If you forget to call do_handshake, then everything seems to work but hostname checking is disabled In-Reply-To: <1492943449.26.0.474412408504.issue30141@psf.upfronthosting.co.za> Message-ID: <1519633360.35.0.467229070634.issue30141@psf.upfronthosting.co.za> Christian Heimes added the comment: The bug has been fixed in #31399. Since 3.7, Python uses OpenSSL's X509_VERIFY_PARAM_set1_host() to verify the host name during the handshake. Unfortunately the fix is in OpenSSL 1.0.2 only. Backport would break compatibility with OpenSSL 1.0.1 and all currently released LibreSSL versions. Are you ok with closing the bug? ---------- resolution: -> fixed stage: -> resolved status: open -> pending superseder: -> Let OpenSSL verify hostname and IP address type: -> behavior versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:24:16 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:24:16 +0000 Subject: [issue19500] ftplib: Add client-side SSL session resumption In-Reply-To: <1383624130.64.0.185541289049.issue19500@psf.upfronthosting.co.za> Message-ID: <1519633456.98.0.467229070634.issue19500@psf.upfronthosting.co.za> Christian Heimes added the comment: It's now an ftplib issue. It's too late to land a new feature in 3.7 because we have reached feature freeze. ---------- assignee: christian.heimes -> components: -Documentation, SSL priority: high -> low title: Add client-side SSL session resumption -> ftplib: Add client-side SSL session resumption versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:25:04 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:25:04 +0000 Subject: [issue18617] AIA chasing for missing intermediate certificates on TLS connections In-Reply-To: <1375376317.99.0.429350247521.issue18617@psf.upfronthosting.co.za> Message-ID: <1519633504.55.0.467229070634.issue18617@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- assignee: docs at python -> christian.heimes stage: -> needs patch versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:25:15 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:25:15 +0000 Subject: [issue31242] Add SSLContext.set_verify_callback() In-Reply-To: <1503265756.53.0.967490588927.issue31242@psf.upfronthosting.co.za> Message-ID: <1519633515.7.0.467229070634.issue31242@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- stage: -> needs patch versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:27:45 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:27:45 +0000 Subject: [issue29334] ssl.SSLObject method getpeercert() is buggy, do_handshake() is strange In-Reply-To: <1484914427.68.0.380715465195.issue29334@psf.upfronthosting.co.za> Message-ID: <1519633665.01.0.467229070634.issue29334@psf.upfronthosting.co.za> Christian Heimes added the comment: The fix hasn't been ported to 2.7 yet. ---------- assignee: christian.heimes -> status: -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:27:52 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:27:52 +0000 Subject: [issue30525] Expose SCTs on TLS connections In-Reply-To: <1496233312.72.0.638169189351.issue30525@psf.upfronthosting.co.za> Message-ID: <1519633672.36.0.467229070634.issue30525@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:28:49 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:28:49 +0000 Subject: [issue22365] SSLContext.load_verify_locations(cadata) does not accept CRLs In-Reply-To: <1410188086.75.0.333692035483.issue22365@psf.upfronthosting.co.za> Message-ID: <1519633729.16.0.467229070634.issue22365@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- assignee: christian.heimes -> components: -Extension Modules priority: normal -> low versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:29:08 2018 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 26 Feb 2018 08:29:08 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1519633748.54.0.467229070634.issue32604@psf.upfronthosting.co.za> Nick Coghlan added the comment: _xxsubinterpreters has been added, and we'll use PEP 554 as the interim documentation while it's only exposed for testing purposes. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:29:11 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:29:11 +0000 Subject: [issue31372] Add SSLSocket.get_verify_result() In-Reply-To: <1504734544.0.0.0583935394089.issue31372@psf.upfronthosting.co.za> Message-ID: <1519633751.16.0.467229070634.issue31372@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:29:59 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:29:59 +0000 Subject: [issue31892] ssl.get_server_certificate should allow specifying certificate / key type In-Reply-To: <1509271146.03.0.213398074469.issue31892@psf.upfronthosting.co.za> Message-ID: <1519633799.57.0.467229070634.issue31892@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- assignee: christian.heimes -> stage: -> needs patch versions: +Python 3.8 -Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:31:47 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:31:47 +0000 Subject: [issue31727] FTP_TLS errors when use certain subcommands In-Reply-To: <1507482521.5.0.213398074469.issue31727@psf.upfronthosting.co.za> Message-ID: <1519633907.29.0.467229070634.issue31727@psf.upfronthosting.co.za> Christian Heimes added the comment: Jonathan, are you able to provide a reproducer for this bug? I fear we cannot move forward without a way to test and reproduce the issue. ---------- assignee: christian.heimes -> status: open -> pending versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:31:55 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:31:55 +0000 Subject: [issue18233] SSLSocket.getpeercertchain() In-Reply-To: <1371415195.44.0.636993698614.issue18233@psf.upfronthosting.co.za> Message-ID: <1519633915.13.0.467229070634.issue18233@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:33:36 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:33:36 +0000 Subject: [issue32359] Add getters for all SSLContext internal configuration In-Reply-To: <1513590105.76.0.213398074469.issue32359@psf.upfronthosting.co.za> Message-ID: <1519634016.5.0.467229070634.issue32359@psf.upfronthosting.co.za> Christian Heimes added the comment: Let's see how much we can fix in 3.8. Maybe I'll find enough free time to implement PEP 543 for Python 3.8. ---------- assignee: christian.heimes -> stage: -> needs patch type: -> enhancement versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:35:01 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:35:01 +0000 Subject: [issue17128] OS X system openssl deprecated - installer should build local libssl In-Reply-To: <1360002680.77.0.851671416179.issue17128@psf.upfronthosting.co.za> Message-ID: <1519634101.11.0.467229070634.issue17128@psf.upfronthosting.co.za> Christian Heimes added the comment: Ned, is this issue still relevant? It targets 3.5 and hasn't seen much activity since 2016. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:36:41 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:36:41 +0000 Subject: [issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers In-Reply-To: <1485909545.04.0.650924943503.issue29406@psf.upfronthosting.co.za> Message-ID: <1519634201.7.0.467229070634.issue29406@psf.upfronthosting.co.za> Christian Heimes added the comment: Andrew, Yury, PR 4402 is still open. Should the fix land in 3.7? I have removed the SSL component because it's not a bug in the ssl module. ---------- components: -SSL nosy: +christian.heimes versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:41:39 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:41:39 +0000 Subject: [issue31399] Let OpenSSL verify hostname and IP address In-Reply-To: <1504904686.16.0.498803825814.issue31399@psf.upfronthosting.co.za> Message-ID: <1519634499.5.0.467229070634.issue31399@psf.upfronthosting.co.za> Christian Heimes added the comment: The feature has been implemented. I'll take care of the failing tests in #32706. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:43:36 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Mon, 26 Feb 2018 08:43:36 +0000 Subject: [issue30141] If you forget to call do_handshake, then everything seems to work but hostname checking is disabled In-Reply-To: <1492943449.26.0.474412408504.issue30141@psf.upfronthosting.co.za> Message-ID: <1519634616.45.0.467229070634.issue30141@psf.upfronthosting.co.za> Nathaniel Smith added the comment: Do you mean, the fix is in 3.7 only? ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:44:37 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:44:37 +0000 Subject: [issue32706] test_check_hostname() of test_ftplib started to fail randomly In-Reply-To: <1517225256.94.0.467229070634.issue32706@psf.upfronthosting.co.za> Message-ID: <1519634677.9.0.467229070634.issue32706@psf.upfronthosting.co.za> Christian Heimes added the comment: Ned, I'm going to rewrite part of the test infrastructure during beta phase. The ssl module now works according to specifications. When the client doesn't recognize a hostname, it aborts the TLS connection with a TLS ALERT message. The old asynchat test system cannot handle TLS connection abort correctly. It's really just testing. No public APIs will be affected. ---------- nosy: +ned.deily priority: high -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:44:47 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Mon, 26 Feb 2018 08:44:47 +0000 Subject: [issue30141] If you forget to call do_handshake, then everything seems to work but hostname checking is disabled In-Reply-To: <1492943449.26.0.474412408504.issue30141@psf.upfronthosting.co.za> Message-ID: <1519634687.46.0.467229070634.issue30141@psf.upfronthosting.co.za> Nathaniel Smith added the comment: ...huh, not sure why that shows me changing the status. I just typed something in the text box, didn't touch any of the dropdowns... ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:45:35 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:45:35 +0000 Subject: [issue32883] Key agreement parameters not accessible In-Reply-To: <1519120722.76.0.467229070634.issue32883@psf.upfronthosting.co.za> Message-ID: <1519634735.03.0.467229070634.issue32883@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- stage: -> needs patch versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:52:09 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:52:09 +0000 Subject: [issue32947] Support OpenSSL 1.1.1 In-Reply-To: <1519559680.67.0.467229070634.issue32947@psf.upfronthosting.co.za> Message-ID: <1519635129.15.0.467229070634.issue32947@psf.upfronthosting.co.za> Christian Heimes added the comment: Ned, Benjamin OpenSSL 1.1.1 is scheduled to be released just before 3.7.0rc1 will come out. I'd rather address as many issues now instead of adding last minute patches to the release candidate. Once OpenSSL 1.1.1 is out and Python 3.7 supports it, we can discuss backports. 3.6 and 2.7 are going to need fixing, too. ---------- nosy: +alex, benjamin.peterson, dstufft, janssen, ned.deily priority: normal -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:52:37 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:52:37 +0000 Subject: [issue28695] Add SSL_CTX_set_client_cert_engine In-Reply-To: <1479207688.81.0.066994858547.issue28695@psf.upfronthosting.co.za> Message-ID: <1519635157.01.0.467229070634.issue28695@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:52:41 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:52:41 +0000 Subject: [issue30226] Modernize make_ssl_certs In-Reply-To: <1493715171.18.0.434787469545.issue30226@psf.upfronthosting.co.za> Message-ID: <1519635161.61.0.467229070634.issue30226@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:53:13 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:53:13 +0000 Subject: [issue28453] SSLObject.selected_alpn_protocol() not documented In-Reply-To: <1476589791.51.0.926571047111.issue28453@psf.upfronthosting.co.za> Message-ID: <1519635193.9.0.467229070634.issue28453@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- stage: -> needs patch versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:53:58 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:53:58 +0000 Subject: [issue15670] PEP 3121, 384 Refactoring applied to ssl module In-Reply-To: <1345041029.57.0.223670432026.issue15670@psf.upfronthosting.co.za> Message-ID: <1519635238.56.0.467229070634.issue15670@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 03:54:46 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 08:54:46 +0000 Subject: [issue32533] SSLSocket read/write thread-unsafety In-Reply-To: <1515678068.63.0.467229070634.issue32533@psf.upfronthosting.co.za> Message-ID: <1519635286.2.0.467229070634.issue32533@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- assignee: christian.heimes -> steve.dower stage: -> needs patch versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 04:06:41 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 09:06:41 +0000 Subject: [issue31711] ssl.SSLSocket.send(b"") fails In-Reply-To: <1507282980.19.0.213398074469.issue31711@psf.upfronthosting.co.za> Message-ID: <1519636001.87.0.467229070634.issue31711@psf.upfronthosting.co.za> Christian Heimes added the comment: It's a bit too late to change the behavior of send(). Let's document the issue instead. ---------- assignee: christian.heimes -> docs at python components: +Documentation nosy: +alex, docs at python, dstufft, janssen, njs stage: -> needs patch versions: +Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 04:10:28 2018 From: report at bugs.python.org (Joachim Trouverie) Date: Mon, 26 Feb 2018 09:10:28 +0000 Subject: [issue29612] TarFile.extract() suffers from hard links inside tarball In-Reply-To: <1487671846.82.0.103027933595.issue29612@psf.upfronthosting.co.za> Message-ID: <1519636228.92.0.467229070634.issue29612@psf.upfronthosting.co.za> Joachim Trouverie added the comment: I created a PR for this issue for Python 2.7 (https://github.com/python/cpython/pull/5753/files). I just skip the link creation if the target path is equals to the link target. I don't see any corner case where this would be an unwanted behavior. I am not sure either I should also create an unit test for this behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 04:11:50 2018 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 26 Feb 2018 09:11:50 +0000 Subject: [issue32932] better error message when __all__ contains non-str objects In-Reply-To: <1519462308.25.0.467229070634.issue32932@psf.upfronthosting.co.za> Message-ID: <1519636310.61.0.467229070634.issue32932@psf.upfronthosting.co.za> Nick Coghlan added the comment: I +1'ed Serhiy's patch for issue 32946, so we'll have to take that micro-optimisation into account if we decide to rely on the Python level `_handle_fromlist` to cover the "*" import case. Given that optimisation, it's probably simpler to just enhance the C error path to use the same error message as the Python version, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 04:36:44 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 09:36:44 +0000 Subject: [issue30141] If you forget to call do_handshake, then everything seems to work but hostname checking is disabled In-Reply-To: <1492943449.26.0.474412408504.issue30141@psf.upfronthosting.co.za> Message-ID: <1519637804.84.0.467229070634.issue30141@psf.upfronthosting.co.za> Christian Heimes added the comment: Correct, the fix is in 3.7 and 3.8 only. I don't see a realistic way to address the problem in 3.6 and 2.7 without breaking people on old LTS releases and BSD. (The bug tracker changes status automatically when you reply to a pending ticket.) ---------- resolution: fixed -> status: pending -> open versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 04:42:33 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Mon, 26 Feb 2018 09:42:33 +0000 Subject: [issue31711] ssl.SSLSocket.send(b"") fails In-Reply-To: <1507282980.19.0.213398074469.issue31711@psf.upfronthosting.co.za> Message-ID: <1519638153.45.0.467229070634.issue31711@psf.upfronthosting.co.za> Nathaniel Smith added the comment: If openssl says the behavior is undefined, then don't we have to first make it defined before we can document it? And if we're going to detect this case and guarantee some behavior, making it a no-op like it is on regular sockets seems the way to go... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 04:43:20 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Mon, 26 Feb 2018 09:43:20 +0000 Subject: [issue30141] If you forget to call do_handshake, then everything seems to work but hostname checking is disabled In-Reply-To: <1492943449.26.0.474412408504.issue30141@psf.upfronthosting.co.za> Message-ID: <1519638200.62.0.467229070634.issue30141@psf.upfronthosting.co.za> Nathaniel Smith added the comment: I agree that backporting X509_VERIFY_PARAM_set1_host is unreasonable, at least until the openssl ecosystem has moved forward a bit. But in earlier versions, would it be easy to detect that do_handshake() hasn't been called and raise an error? The docs say you have to call do_handshake(), so if you don't that's already a bug and breaking that case should be OK, especially since it's never worked correctly. I'm not very stressed about this myself because my code doesn't trigger the error -- only buggy code does :-). But it would be nice if the buggy code could fail closed. ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 04:43:44 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 26 Feb 2018 09:43:44 +0000 Subject: [issue32929] Change dataclasses hashing to use unsafe_hash boolean (default to False) In-Reply-To: <1519436693.93.0.467229070634.issue32929@psf.upfronthosting.co.za> Message-ID: <1519638224.34.0.467229070634.issue32929@psf.upfronthosting.co.za> Eric V. Smith added the comment: New changeset 4cffe2f66b581fa7538f6de884d54a5c7364d8e0 by Eric V. Smith (Miss Islington (bot)) in branch '3.7': bpo-32929: Dataclasses: Change the tri-state hash parameter to the boolean unsafe_hash. (GH-5891) (GH-5902) https://github.com/python/cpython/commit/4cffe2f66b581fa7538f6de884d54a5c7364d8e0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 04:44:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Feb 2018 09:44:07 +0000 Subject: [issue32932] better error message when __all__ contains non-str objects In-Reply-To: <1519462308.25.0.467229070634.issue32932@psf.upfronthosting.co.za> Message-ID: <1519638247.44.0.467229070634.issue32932@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I was fooled by similarity of Python and C code, but actually Python and C code are not different implementations of the same algorithm, they have different purposes. The purpose of _bootstrap._handle_fromlist() is importing requested submodules first than `from pkg import submod1, submod2` change the outer locals/globals namespace. In the case of the star import it imports submodules enumerated in the package's __all__. The purpose of the IMPORT_STAR opcode is updating the globals namespace by the content of already imported module/package. Both codes iterate __all__ and use its items. The additional check in Python code was needed to prevent a BytesWarning. The additional check in IMPORT_STAR proposed in this issue is not strongly required. The exception of the correct type is already raised, and its message is not incorrect. But it can be improved to help fixing an obscure user error. I'm not very happy that we adds so much C code in ceval.c for handling a subtle error, but seems there is no other way (except keeping all as it is). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 04:47:19 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 26 Feb 2018 09:47:19 +0000 Subject: [issue32610] asyncio.all_tasks() should return only non-finished tasks. In-Reply-To: <1516553125.63.0.467229070634.issue32610@psf.upfronthosting.co.za> Message-ID: <1519638439.52.0.467229070634.issue32610@psf.upfronthosting.co.za> Andrew Svetlov added the comment: After re-thinking I come to another idea: let's keep `all_tasks()` behavior as is but add an `active_tasks()` function for returning all non-finished tasks. It should be done in Python 3.8 ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 04:57:24 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 09:57:24 +0000 Subject: [issue31711] ssl.SSLSocket.send(b"") fails In-Reply-To: <1507282980.19.0.213398074469.issue31711@psf.upfronthosting.co.za> Message-ID: <1519639044.92.0.467229070634.issue31711@psf.upfronthosting.co.za> Christian Heimes added the comment: The message "EOF occurred in violation of protocol" is set by Python. Python maps SSL_ERROR_SYSCALL with SSL error code == 0 and len == 0 to that error message. https://github.com/python/cpython/blob/master/Modules/_ssl.c#L682-L689 https://github.com/python/cpython/blob/master/Modules/_ssl.c#L2263 I don't know why the code was implemented that way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 05:19:19 2018 From: report at bugs.python.org (Arcadiy Ivanov) Date: Mon, 26 Feb 2018 10:19:19 +0000 Subject: [issue32954] Lazy Literal String Interpolation (PEP-498-based fl-strings) Message-ID: <1519640359.67.0.467229070634.issue32954@psf.upfronthosting.co.za> New submission from Arcadiy Ivanov : I'd like to start a discussion on/gauge interest for introducing an enhancement to PEP-498 in a form of delayed/lazy/lambda f-string. The proposed change is, conceptually, minor and would not differ from PEP-498 syntactically at all except for string prefix. E.g. extra = f'{extra},waiters:{len(self._waiters)}' becomes extra = fl'{extra},waiters:{len(self._waiters)}' The proposal would produce a lambda-like object x('format'), where x.__str__() == f'format'. This should come extremely useful in all cases where delayed or conditional string formatting and concatenation are desired, such as in cases of logging. As an example, currently, the logger.debug("Format %s string", value) cannot be used with an f-string as follows logger.debug(f"Format {value} string") without an unconditional evaluation of all parameters due to current compilation prior to logging checking whether it's even enabled for debug: >>> b = 1 >>> def a(x): ... return f"Foo {x} bar {b}" ... >>> dis.dis(a) 2 0 LOAD_CONST 1 ('Foo ') 2 LOAD_FAST 0 (x) 4 FORMAT_VALUE 0 6 LOAD_CONST 2 (' bar ') 8 LOAD_GLOBAL 0 (b) 10 FORMAT_VALUE 0 12 BUILD_STRING 4 14 RETURN_VALUE Additional great optimizations may be rendered by introducing an a fl-string is a case where foo = "foo" s1 = fl"S1 value ${foo}" s2 = fl"S2 value of ${s1}" print(s2) may produce only one BUILD_STRING instruction, potentially dramatically increasing performance in heavy string-concat based applications. Even when a compiler will not be able to statically prove that a particular value is in fact an fl-string, an interpreter-level check or a JIT-based Python implementation may be able to optimize such concats ad-nauseam (with trap-based deopt), allowing to collapse an extremely long chains of formats into a single BUILD_STRING op without any intermediary string allocation/concatenation (very useful in cases such as web servers, templating engines etc). I'll be happy to produce patches against 3.7/3.8 for this if a general concept is found useful/desirable by the community. ---------- components: Library (Lib) messages: 312909 nosy: arcivanov priority: normal severity: normal status: open title: Lazy Literal String Interpolation (PEP-498-based fl-strings) type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 05:27:49 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Feb 2018 10:27:49 +0000 Subject: [issue32954] Lazy Literal String Interpolation (PEP-498-based fl-strings) In-Reply-To: <1519640359.67.0.467229070634.issue32954@psf.upfronthosting.co.za> Message-ID: <1519640869.5.0.467229070634.issue32954@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: class FL: def __init__(self, func): self.func = func def __str__(self): return self.func() extra = FL(lambda: f'{extra},waiters:{len(self._waiters)}') ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 05:42:53 2018 From: report at bugs.python.org (Arcadiy Ivanov) Date: Mon, 26 Feb 2018 10:42:53 +0000 Subject: [issue32954] Lazy Literal String Interpolation (PEP-498-based fl-strings) In-Reply-To: <1519640359.67.0.467229070634.issue32954@psf.upfronthosting.co.za> Message-ID: <1519641773.0.0.467229070634.issue32954@psf.upfronthosting.co.za> Arcadiy Ivanov added the comment: As an example this is the current state of affairs: >>> def x(): ... foo = "foo" ... s1 = f"S1 value {foo}" ... s2 = f"S2 value {s1}" ... print(s2) ... >>> dis.dis(x) 2 0 LOAD_CONST 1 ('foo') 2 STORE_FAST 0 (foo) 3 4 LOAD_CONST 2 ('S1 value ') 6 LOAD_FAST 0 (foo) 8 FORMAT_VALUE 0 10 BUILD_STRING 2 12 STORE_FAST 1 (s1) 4 14 LOAD_CONST 3 ('S2 value ') 16 LOAD_FAST 1 (s1) 18 FORMAT_VALUE 0 20 BUILD_STRING 2 22 STORE_FAST 2 (s2) 5 24 LOAD_GLOBAL 0 (print) 26 LOAD_FAST 2 (s2) 28 CALL_FUNCTION 1 30 POP_TOP 32 LOAD_CONST 0 (None) 34 RETURN_VALUE whereas an fl-string representation of: >>> def x(): ... foo = "foo" ... s1 = fl"S1 value {foo}" ... s2 = fl"S2 value {s1}" ... print(s2) ... would behave close to: >>> def x(): ... foo = "foo" ... s1 = lambda: f"S1 value {foo}" ... s2 = lambda: f"S2 value {s1()}" ... print(s2()) ... >>> dis.dis(x) 2 0 LOAD_CONST 1 ('foo') 2 STORE_DEREF 0 (foo) 3 4 LOAD_CLOSURE 0 (foo) 6 BUILD_TUPLE 1 8 LOAD_CONST 2 ( at 0x7ff2ef1abd20, file "", line 3>) 10 LOAD_CONST 3 ('x..') 12 MAKE_FUNCTION 8 14 STORE_DEREF 1 (s1) 4 16 LOAD_CLOSURE 1 (s1) 18 BUILD_TUPLE 1 20 LOAD_CONST 4 ( at 0x7ff2ef1abae0, file "", line 4>) 22 LOAD_CONST 3 ('x..') 24 MAKE_FUNCTION 8 26 STORE_FAST 0 (s2) 5 28 LOAD_GLOBAL 0 (print) 30 LOAD_FAST 0 (s2) 32 CALL_FUNCTION 0 34 CALL_FUNCTION 1 36 POP_TOP 38 LOAD_CONST 0 (None) 40 RETURN_VALUE Where LOAD_CONST, LOAD_CONST, MAKE_FUNCTION sequences are replaced with BUILD_LAZY_STRING (name's provisional) producing the same lambda-like formatter function that cooperates with FORMAT_VALUE and BUILD_STRING/BUILD_LAZY_STRING ops. ---------- components: +Interpreter Core -Library (Lib) nosy: -serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 05:51:24 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 26 Feb 2018 10:51:24 +0000 Subject: [issue32954] Lazy Literal String Interpolation (PEP-498-based fl-strings) In-Reply-To: <1519640359.67.0.467229070634.issue32954@psf.upfronthosting.co.za> Message-ID: <1519642284.81.0.467229070634.issue32954@psf.upfronthosting.co.za> Eric V. Smith added the comment: See also PEP 501. ---------- nosy: +eric.smith, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 05:54:18 2018 From: report at bugs.python.org (Arcadiy Ivanov) Date: Mon, 26 Feb 2018 10:54:18 +0000 Subject: [issue32954] Lazy Literal String Interpolation (PEP-498-based fl-strings) In-Reply-To: <1519640359.67.0.467229070634.issue32954@psf.upfronthosting.co.za> Message-ID: <1519642458.5.0.467229070634.issue32954@psf.upfronthosting.co.za> Arcadiy Ivanov added the comment: @serhiy.storchaka Of course a similar pattern can be implemented via a class (or even without one as I've shown below). But you can clearly notice that in your example: 1) There are tons of boilerplate (as in mine with lambdas). 2) It's going to be slower than a core implementation with specialized objects. 3) It can't be made to cooperate with a FORMAT_VALUE/BUILD_STRING - intermediate strings will still be produced. ---------- nosy: -eric.smith, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 05:59:46 2018 From: report at bugs.python.org (Arcadiy Ivanov) Date: Mon, 26 Feb 2018 10:59:46 +0000 Subject: [issue32954] Lazy Literal String Interpolation (PEP-498-based fl-strings) In-Reply-To: <1519640359.67.0.467229070634.issue32954@psf.upfronthosting.co.za> Message-ID: <1519642786.05.0.467229070634.issue32954@psf.upfronthosting.co.za> Arcadiy Ivanov added the comment: @eric.smith Thanks! I was looking for such a general-purpose proposal but could not find it. Although general-purpose mechanism that would allow pluggable constructs like `sh`, `html`, `sql` and the like is awesome and very desirable (especially sh in preference of Popen madness), string formatting/concatenation is IMO a fundamental concept (hence PEP-498 is in core with specialized opcodes instead of being deferred to be a general purpose pluggable PEP-501 implementation). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 06:10:32 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 26 Feb 2018 11:10:32 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1519643432.72.0.467229070634.issue32394@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I think PRs could be merged ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 06:13:25 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 26 Feb 2018 11:13:25 +0000 Subject: [issue29406] asyncio SSL contexts leak sockets after calling close with certain Apache servers In-Reply-To: <1485909545.04.0.650924943503.issue29406@psf.upfronthosting.co.za> Message-ID: <1519643605.44.0.467229070634.issue29406@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I'll take a look on the evening ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 06:14:26 2018 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 26 Feb 2018 11:14:26 +0000 Subject: [issue32875] Add __exit__() method to event loops In-Reply-To: <1519065811.74.0.467229070634.issue32875@psf.upfronthosting.co.za> Message-ID: <1519643666.88.0.467229070634.issue32875@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Agree ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 06:24:30 2018 From: report at bugs.python.org (Arcadiy Ivanov) Date: Mon, 26 Feb 2018 11:24:30 +0000 Subject: [issue32954] Lazy Literal String Interpolation (PEP-498-based fl-strings) In-Reply-To: <1519640359.67.0.467229070634.issue32954@psf.upfronthosting.co.za> Message-ID: <1519644270.38.0.467229070634.issue32954@psf.upfronthosting.co.za> Arcadiy Ivanov added the comment: > Although general-purpose mechanism that would allow pluggable constructs like `sh`, `html`, `sql` Strike that one, I didn't read into PEP-0501 deep enough before replying. Yes, `i"format"` is what I'm talking about. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 06:40:52 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 11:40:52 +0000 Subject: [issue31453] Debian Sid/Buster: Cannot enable TLS 1.0/1.1 with PROTOCOL_TLS In-Reply-To: <1505317705.14.0.640405907228.issue31453@psf.upfronthosting.co.za> Message-ID: <1519645252.76.0.467229070634.issue31453@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- pull_requests: +5675 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 06:43:04 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 11:43:04 +0000 Subject: [issue32609] Add setter and getter for min/max protocol version In-Reply-To: <1516543224.12.0.467229070634.issue32609@psf.upfronthosting.co.za> Message-ID: <1519645384.79.0.467229070634.issue32609@psf.upfronthosting.co.za> Christian Heimes added the comment: bpo-31453 is the Debian issue that made me start to implement the setter and getter for min/max protocol version. ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Debian Sid/Buster: Cannot enable TLS 1.0/1.1 with PROTOCOL_TLS title: Add setter and getter for min/max protocol ersion -> Add setter and getter for min/max protocol version versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 06:48:19 2018 From: report at bugs.python.org (Christian Heimes) Date: Mon, 26 Feb 2018 11:48:19 +0000 Subject: [issue31453] Debian Sid/Buster: Cannot enable TLS 1.0/1.1 with PROTOCOL_TLS In-Reply-To: <1505317705.14.0.640405907228.issue31453@psf.upfronthosting.co.za> Message-ID: <1519645699.24.0.467229070634.issue31453@psf.upfronthosting.co.za> Christian Heimes added the comment: I have closed the feature newer BPO-32609 in favor of this bug because Ned gave this bug a deferred blocker priority. OpenSSL 1.1 has introduced a new API to set the minimum and maximum supported protocol version. The API is easier to use than the old OP_NO_TLSv1 option flags, too https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_set_min_proto_version.html Debian used the new setters to disable TLS 1.0 and 1.1 in testing, #31453. The old TLS versions have been enabled again for now. Python must expose the new API in case Debian decides to disable them again. Another $DIST has considered to implement a virtually the same policy as Debian. I also like to deprecate the old OP_NO_TLSv1 et al. flags in favor of the new API. The option flags are awkward to use and easy to get wrong. For example applications must not leave holes in the OP_NO range (e.g. allow TLS 1.0 and 1.2 but disable 1.1). ---------- nosy: +njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 07:06:37 2018 From: report at bugs.python.org (bbayles) Date: Mon, 26 Feb 2018 12:06:37 +0000 Subject: [issue21417] Compression level for zipfile In-Reply-To: <1399053616.42.0.124840881006.issue21417@psf.upfronthosting.co.za> Message-ID: <1519646797.52.0.467229070634.issue21417@psf.upfronthosting.co.za> bbayles added the comment: I made a comment about that in the pull request that went unchallenged ([1]), but I'm happy to change it. [1] https://github.com/python/cpython/pull/5385#pullrequestreview-92055354 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 07:20:52 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 26 Feb 2018 12:20:52 +0000 Subject: [issue32954] Lazy Literal String Interpolation (PEP-498-based fl-strings) In-Reply-To: <1519640359.67.0.467229070634.issue32954@psf.upfronthosting.co.za> Message-ID: <1519647652.4.0.467229070634.issue32954@psf.upfronthosting.co.za> Eric V. Smith added the comment: Arcadiy: Somehow you're dropping Serhiy and me from the nosy list. I've re-added us. ---------- nosy: +eric.smith, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 07:46:52 2018 From: report at bugs.python.org (Arcadiy Ivanov) Date: Mon, 26 Feb 2018 12:46:52 +0000 Subject: [issue32954] Lazy Literal String Interpolation (PEP-498-based fl-strings) In-Reply-To: <1519640359.67.0.467229070634.issue32954@psf.upfronthosting.co.za> Message-ID: <1519649212.44.0.467229070634.issue32954@psf.upfronthosting.co.za> Arcadiy Ivanov added the comment: Sorry about that! I'll be sure to refresh next time before posting a reply. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 08:19:20 2018 From: report at bugs.python.org (EricG) Date: Mon, 26 Feb 2018 13:19:20 +0000 Subject: [issue32937] Multiprocessing worker functions not terminating with a large number of processes and a manager In-Reply-To: <1519481823.24.0.467229070634.issue32937@psf.upfronthosting.co.za> Message-ID: <1519651160.21.0.467229070634.issue32937@psf.upfronthosting.co.za> EricG added the comment: If I do: from queue import Queue messages = Queue() No messages are printed. I believe this is expected as a regular Queue cannot be shared between processes. It was a problem that the manager was designed to solve. I am using a MacPro running 10.3.2 Python 3.6.4 It would not surprise me if this were an OS specific issue. To reproduce it may requiring using a Mac with a high number of cores. It is trivially reproducible for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 09:02:30 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Feb 2018 14:02:30 +0000 Subject: [issue32922] dbm.open() encodes filename with default encoding rather than the filesystem encoding In-Reply-To: <1519398668.71.0.467229070634.issue32922@psf.upfronthosting.co.za> Message-ID: <1519653750.44.0.467229070634.issue32922@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 6f600ff1734ca2fdcdd37a809adf8130f0d8cc4e by Serhiy Storchaka in branch 'master': bpo-32922: dbm.open() now encodes filename with the filesystem encoding. (GH-5832) https://github.com/python/cpython/commit/6f600ff1734ca2fdcdd37a809adf8130f0d8cc4e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 09:02:47 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 26 Feb 2018 14:02:47 +0000 Subject: [issue32922] dbm.open() encodes filename with default encoding rather than the filesystem encoding In-Reply-To: <1519398668.71.0.467229070634.issue32922@psf.upfronthosting.co.za> Message-ID: <1519653767.28.0.467229070634.issue32922@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5676 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 09:03:04 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 26 Feb 2018 14:03:04 +0000 Subject: [issue32896] Error when subclassing a dataclass with a field that uses a defaultfactory In-Reply-To: <1519230106.01.0.467229070634.issue32896@psf.upfronthosting.co.za> Message-ID: <1519653784.1.0.467229070634.issue32896@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 09:18:31 2018 From: report at bugs.python.org (zaphod424) Date: Mon, 26 Feb 2018 14:18:31 +0000 Subject: [issue32955] IDLE crashes when trying to save a file Message-ID: <1519654711.02.0.467229070634.issue32955@psf.upfronthosting.co.za> New submission from zaphod424 : when I click the save as button or use the keyboard shortcut, the save window appears but if I click the drop down to choose the save location, it crashes, using a Mac ---------- assignee: terry.reedy components: IDLE messages: 312926 nosy: terry.reedy, zaphod424 priority: normal severity: normal status: open title: IDLE crashes when trying to save a file type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 09:25:42 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 26 Feb 2018 14:25:42 +0000 Subject: [issue32922] dbm.open() encodes filename with default encoding rather than the filesystem encoding In-Reply-To: <1519398668.71.0.467229070634.issue32922@psf.upfronthosting.co.za> Message-ID: <1519655142.44.0.467229070634.issue32922@psf.upfronthosting.co.za> miss-islington added the comment: New changeset a9e0b070b3e36701d0139361c769d374c4aacf1a by Miss Islington (bot) in branch '3.7': bpo-32922: dbm.open() now encodes filename with the filesystem encoding. (GH-5832) https://github.com/python/cpython/commit/a9e0b070b3e36701d0139361c769d374c4aacf1a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 09:30:48 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Feb 2018 14:30:48 +0000 Subject: [issue32922] dbm.open() encodes filename with default encoding rather than the filesystem encoding In-Reply-To: <1519398668.71.0.467229070634.issue32922@psf.upfronthosting.co.za> Message-ID: <1519655448.5.0.467229070634.issue32922@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +5677 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 09:42:02 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 26 Feb 2018 14:42:02 +0000 Subject: [issue18533] Avoid error from repr() of recursive dictview In-Reply-To: <1374531750.42.0.70756948567.issue18533@psf.upfronthosting.co.za> Message-ID: <1519656122.53.0.467229070634.issue18533@psf.upfronthosting.co.za> miss-islington added the comment: New changeset fbf7aac36bd1017bc87964b5d17dce0e101ff2d6 by Miss Islington (bot) in branch '3.6': bpo-18533: Avoid RecursionError from repr() of recursive dictview (GH-4823) https://github.com/python/cpython/commit/fbf7aac36bd1017bc87964b5d17dce0e101ff2d6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 09:50:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Feb 2018 14:50:13 +0000 Subject: [issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib In-Reply-To: <1494162484.35.0.941296488498.issue30296@psf.upfronthosting.co.za> Message-ID: <1519656613.51.0.467229070634.issue30296@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 3f2e6f15d64d81633b1fc0b308afc0d6e9026b61 by Serhiy Storchaka in branch 'master': Revert unneccessary changes made in bpo-30296 and apply other improvements. (GH-2624) https://github.com/python/cpython/commit/3f2e6f15d64d81633b1fc0b308afc0d6e9026b61 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 09:51:49 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 26 Feb 2018 14:51:49 +0000 Subject: [issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib In-Reply-To: <1494162484.35.0.941296488498.issue30296@psf.upfronthosting.co.za> Message-ID: <1519656709.37.0.467229070634.issue30296@psf.upfronthosting.co.za> Change by miss-islington : ---------- keywords: +patch pull_requests: +5678 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 10:14:24 2018 From: report at bugs.python.org (Christoph Groth) Date: Mon, 26 Feb 2018 15:14:24 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1519658064.19.0.467229070634.issue15767@psf.upfronthosting.co.za> Christoph Groth added the comment: I'm trying to understand why ModuleNotFoundError was added to 3.6. The "what's new" entry links to this page. Looking at the discussion, Guido said in 2013: "Right. Outside importlib there shouldn't be a need to distinguish between the cases (especially given that the exception works differently than its name suggests).". Then, three years later, he supports the inclusion of the patch, without that any new arguments had been given. Could someone explain (or link to) what happened inbetween? ---------- nosy: +cwg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 10:23:55 2018 From: report at bugs.python.org (M Hsia) Date: Mon, 26 Feb 2018 15:23:55 +0000 Subject: [issue32956] python 3 round bug Message-ID: <1519658635.56.0.467229070634.issue32956@psf.upfronthosting.co.za> New submission from M Hsia : import sys print(sys.version) for i in range(10): test=i+0.5 print (test,round(test,0)) ---------------------------- 3.6.3 |Anaconda custom (64-bit)| (default, Nov 8 2017, 15:10:56) [MSC v.1900 64 bit (AMD64)] 0.5 0.0 1.5 2.0 2.5 2.0 3.5 4.0 4.5 4.0 5.5 6.0 6.5 6.0 7.5 8.0 8.5 8.0 9.5 10.0 ------------------------- 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] (0.5, 1.0) (1.5, 2.0) (2.5, 3.0) (3.5, 4.0) (4.5, 5.0) (5.5, 6.0) (6.5, 7.0) (7.5, 8.0) (8.5, 9.0) (9.5, 10.0) ---------- messages: 312931 nosy: MJH priority: normal severity: normal status: open title: python 3 round bug type: behavior versions: Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 10:24:42 2018 From: report at bugs.python.org (Korijn Van Golen) Date: Mon, 26 Feb 2018 15:24:42 +0000 Subject: [issue32957] distutils.command.install checks truthiness of .ext_modules instead of calling .has_ext_modules() Message-ID: <1519658682.25.0.467229070634.issue32957@psf.upfronthosting.co.za> New submission from Korijn Van Golen : distutils' Distribution class has a method has_ext_modules() that is used to determine if any extension modules are included in a distribution. There remains a call site in distutils.command.install where self.distribution.ext_modules is directly tested for truthiness, rather than calling has_ext_modules. This causes inconsistent behavior, e.g. when overriding has_ext_modules in a Distribution subclass. ---------- components: Distutils messages: 312932 nosy: Korijn Van Golen, dstufft, eric.araujo priority: normal severity: normal status: open title: distutils.command.install checks truthiness of .ext_modules instead of calling .has_ext_modules() 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 Feb 26 10:27:19 2018 From: report at bugs.python.org (Korijn Van Golen) Date: Mon, 26 Feb 2018 15:27:19 +0000 Subject: [issue32957] distutils.command.install checks truthiness of .ext_modules instead of calling .has_ext_modules() In-Reply-To: <1519658682.25.0.467229070634.issue32957@psf.upfronthosting.co.za> Message-ID: <1519658839.82.0.467229070634.issue32957@psf.upfronthosting.co.za> Change by Korijn Van Golen : ---------- keywords: +patch pull_requests: +5679 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 10:34:13 2018 From: report at bugs.python.org (M Hsia) Date: Mon, 26 Feb 2018 15:34:13 +0000 Subject: [issue32956] python 3 round bug In-Reply-To: <1519658635.56.0.467229070634.issue32956@psf.upfronthosting.co.za> Message-ID: <1519659253.33.0.467229070634.issue32956@psf.upfronthosting.co.za> M Hsia added the comment: import sys print(sys.version) for i in range(10): test=i+0.5 print (test,round(test,0)) -------------------- 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit (Intel)] 0.5 0.0 1.5 2.0 2.5 2.0 3.5 4.0 4.5 4.0 5.5 6.0 6.5 6.0 7.5 8.0 8.5 8.0 9.5 10.0 3.6.3 |Anaconda custom (64-bit)| (default, Nov 8 2017, 15:10:56) [MSC v.1900 64 bit (AMD64)] 0.5 0.0 1.5 2.0 2.5 2.0 3.5 4.0 4.5 4.0 5.5 6.0 6.5 6.0 7.5 8.0 8.5 8.0 9.5 10.0 ------------------------- 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] (0.5, 1.0) (1.5, 2.0) (2.5, 3.0) (3.5, 4.0) (4.5, 5.0) (5.5, 6.0) (6.5, 7.0) (7.5, 8.0) (8.5, 9.0) (9.5, 10.0) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 10:37:03 2018 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 26 Feb 2018 15:37:03 +0000 Subject: [issue13790] In str.format an incorrect error message for list, tuple, dict, set In-Reply-To: <1326605478.95.0.601079964751.issue13790@psf.upfronthosting.co.za> Message-ID: <1519659423.35.0.467229070634.issue13790@psf.upfronthosting.co.za> Change by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 10:37:23 2018 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 26 Feb 2018 15:37:23 +0000 Subject: [issue17286] Make subprocess handling text output with universal_newlines more obious In-Reply-To: <1361708455.88.0.426093416103.issue17286@psf.upfronthosting.co.za> Message-ID: <1519659443.44.0.467229070634.issue17286@psf.upfronthosting.co.za> Change by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 10:42:32 2018 From: report at bugs.python.org (Mark Shannon) Date: Mon, 26 Feb 2018 15:42:32 +0000 Subject: [issue13897] Move fields relevant to sys.exc_info out of frame into generator/threadstate In-Reply-To: <1327767887.13.0.0676848614688.issue13897@psf.upfronthosting.co.za> Message-ID: <1519659752.47.0.467229070634.issue13897@psf.upfronthosting.co.za> Mark Shannon added the comment: Nothing left to do. This is now obsolete. ---------- resolution: -> out of date stage: patch review -> resolved status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 11:07:11 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Feb 2018 16:07:11 +0000 Subject: [issue13897] Move fields relevant to sys.exc_info out of frame into generator/threadstate In-Reply-To: <1327767887.13.0.0676848614688.issue13897@psf.upfronthosting.co.za> Message-ID: <1519661231.86.0.467229070634.issue13897@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 11:10:28 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 26 Feb 2018 16:10:28 +0000 Subject: [issue32954] Lazy Literal String Interpolation (PEP-498-based fl-strings) In-Reply-To: <1519640359.67.0.467229070634.issue32954@psf.upfronthosting.co.za> Message-ID: <1519661428.44.0.467229070634.issue32954@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 11:12:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Feb 2018 16:12:24 +0000 Subject: [issue32956] python 3 round bug In-Reply-To: <1519658635.56.0.467229070634.issue32956@psf.upfronthosting.co.za> Message-ID: <1519661544.47.0.467229070634.issue32956@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It works as documented. """ For the built-in types supporting round(), values are rounded to the closest multiple of 10 to the power minus ndigits; if two multiples are equally close, rounding is done toward the even choice (so, for example, both round(0.5) and round(-0.5) are 0, and round(1.5) is 2). """ https://docs.python.org/3/library/functions.html#round ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 11:22:26 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 26 Feb 2018 16:22:26 +0000 Subject: [issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib In-Reply-To: <1494162484.35.0.941296488498.issue30296@psf.upfronthosting.co.za> Message-ID: <1519662146.74.0.467229070634.issue30296@psf.upfronthosting.co.za> miss-islington added the comment: New changeset f8a3485dcd41a00c5e99c5be6adc67cb2638b366 by Miss Islington (bot) in branch '3.7': Revert unneccessary changes made in bpo-30296 and apply other improvements. (GH-2624) https://github.com/python/cpython/commit/f8a3485dcd41a00c5e99c5be6adc67cb2638b366 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 11:25:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Feb 2018 16:25:24 +0000 Subject: [issue30296] Remove unnecessary tuples, lists, sets, and dicts from Lib In-Reply-To: <1494162484.35.0.941296488498.issue30296@psf.upfronthosting.co.za> Message-ID: <1519662324.83.0.467229070634.issue30296@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 Feb 26 11:30:14 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 26 Feb 2018 16:30:14 +0000 Subject: [issue32955] IDLE crashes when trying to save a file In-Reply-To: <1519654711.02.0.467229070634.issue32955@psf.upfronthosting.co.za> Message-ID: <1519662614.05.0.467229070634.issue32955@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Open IDLE, click Help => About IDLE, look at the tcl/tk version, and report it here. If it is not 8.5.18, follow instructions on https://www.python.org/download/mac/tcltk/ to update. Ask on python-list if you need help doing so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 12:17:49 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 26 Feb 2018 17:17:49 +0000 Subject: [issue32647] Undefined references when compiling ctypes on binutils 2.29.1 with gcc -Wl, -z, undefs (Fedora 28) In-Reply-To: <1516789649.91.0.467229070634.issue32647@psf.upfronthosting.co.za> Message-ID: <1519665469.32.0.467229070634.issue32647@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Tested the fix and ctypes is linked successfully with libdl when utilizing the strict symbol check. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 12:29:59 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Mon, 26 Feb 2018 17:29:59 +0000 Subject: [issue17288] cannot jump from a 'return' or 'exception' trace event In-Reply-To: <1361726813.15.0.719765769531.issue17288@psf.upfronthosting.co.za> Message-ID: <1519666199.3.0.467229070634.issue17288@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Those are the changes with the current behavior from the behavior in 3.5 observed at the time of the initial bug report: python 3.7: return.py Unchanged. exception.py After a jump from the 'exception' event into the previous statement, the ensuing 'step' command triggers a trace 'return' event. jump.py The sequence of trace events is unchanged and Python aborts now at the last 'step' command with: python: Python/ceval.c:1083: _PyEval_EvalFrameDefault: Assertion `STACK_LEVEL() <= co->co_stacksize' failed. python 3.8: return.py Unchanged. exception.py Unchanged from 3.7. jump.py The sequence of trace events is unchanged and the last 'step' command prints now the cryptic error msg: TypeError: 'NoneType' object is not callable > /path/to/jump.py(2)gen()->0 -> for i in range(1): Applying the last patch fixes both 3.7 and 3.8. I can build a PR from this patch. An explanation should be given for the behavior of 3.7 and 3.8 in the jump.py case. ---------- title: cannot jump from a return after setting f_lineno -> cannot jump from a 'return' or 'exception' trace event versions: +Python 3.7, Python 3.8 -Python 3.5 Added file: https://bugs.python.org/file47463/exception.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 12:34:07 2018 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 26 Feb 2018 17:34:07 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1519666447.57.0.467229070634.issue15767@psf.upfronthosting.co.za> Guido van Rossum added the comment: Read Eric's message before mine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 13:10:39 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 26 Feb 2018 18:10:39 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1519668639.21.0.467229070634.issue32394@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 19e7d48ce89422091f9af93038b9fee075d46e9e by Steve Dower (animalize) in branch 'master': bpo-32394: Remove some TCP options on old version Windows. (GH-5523) https://github.com/python/cpython/commit/19e7d48ce89422091f9af93038b9fee075d46e9e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 13:11:19 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 26 Feb 2018 18:11:19 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1519668679.32.0.467229070634.issue32394@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5680 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 13:13:53 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 26 Feb 2018 18:13:53 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1519668833.87.0.467229070634.issue32394@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset 1278c21f5234477aab21531773d65ca7ebd1b81f by Steve Dower (animalize) in branch '3.6': [3.6] bpo-32394: Remove some TCP options on older version Windows. (GH-5585) https://github.com/python/cpython/commit/1278c21f5234477aab21531773d65ca7ebd1b81f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 13:14:31 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 26 Feb 2018 18:14:31 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1519668871.67.0.467229070634.issue32394@psf.upfronthosting.co.za> Steve Dower added the comment: Agreed. I've merged these (and Miss Islington should get the 3.7 backport when CI completes) ---------- resolution: -> fixed stage: patch review -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 13:22:20 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 26 Feb 2018 18:22:20 +0000 Subject: [issue32303] Namespace packages have inconsistent __loader__ and __spec__.loader In-Reply-To: <1513179703.14.0.213398074469.issue32303@psf.upfronthosting.co.za> Message-ID: <1519669340.95.0.467229070634.issue32303@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- pull_requests: +5681 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 13:24:35 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 26 Feb 2018 18:24:35 +0000 Subject: [issue32872] backport of #32305 causes regressions in various packages In-Reply-To: <1519031028.52.0.467229070634.issue32872@psf.upfronthosting.co.za> Message-ID: <1519669475.07.0.467229070634.issue32872@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- keywords: +patch pull_requests: +5682 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 13:36:25 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 26 Feb 2018 18:36:25 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1519670185.69.0.467229070634.issue32394@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 53d3f8a89971bac3d2f454ff9f923066ecc3a6d9 by Miss Islington (bot) in branch '3.7': bpo-32394: Remove some TCP options on old version Windows. (GH-5523) https://github.com/python/cpython/commit/53d3f8a89971bac3d2f454ff9f923066ecc3a6d9 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 14:00:09 2018 From: report at bugs.python.org (Steve Dower) Date: Mon, 26 Feb 2018 19:00:09 +0000 Subject: [issue32394] socket lib beahavior change in 3.6.4 In-Reply-To: <1513815164.25.0.213398074469.issue32394@psf.upfronthosting.co.za> Message-ID: <1519671609.17.0.467229070634.issue32394@psf.upfronthosting.co.za> Change by Steve Dower : ---------- assignee: -> steve.dower stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 14:23:32 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 26 Feb 2018 19:23:32 +0000 Subject: [issue32303] Namespace packages have inconsistent __loader__ and __spec__.loader In-Reply-To: <1513179703.14.0.213398074469.issue32303@psf.upfronthosting.co.za> Message-ID: <1519673012.48.0.467229070634.issue32303@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: New changeset 86ea85134645c75783936ca4b5c6269cb8ac4634 by Barry Warsaw in branch '3.6': Revert "[3.6] bpo-32303 - Consistency fixes for namespace loaders (GH-5481) (#5504)" (#5911) https://github.com/python/cpython/commit/86ea85134645c75783936ca4b5c6269cb8ac4634 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 14:25:05 2018 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 26 Feb 2018 19:25:05 +0000 Subject: [issue32872] backport of #32305 causes regressions in various packages In-Reply-To: <1519031028.52.0.467229070634.issue32872@psf.upfronthosting.co.za> Message-ID: <1519673105.13.0.467229070634.issue32872@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 14:34:41 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 26 Feb 2018 19:34:41 +0000 Subject: [issue32305] Namespace packages have inconsistent __file__ and __spec__.origin In-Reply-To: <1513180121.5.0.213398074469.issue32305@psf.upfronthosting.co.za> Message-ID: <1519673681.63.0.467229070634.issue32305@psf.upfronthosting.co.za> Ned Deily added the comment: Note that this change was originally also backported to 3.6 in PR 5504 but, due to third-party package regressions discovered in pre-release testing, the 3.6 change was reverted in PR 5591 prior to release of 3.6.5rc1. ---------- nosy: +ned.deily versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 14:52:35 2018 From: report at bugs.python.org (Aaron Black) Date: Mon, 26 Feb 2018 19:52:35 +0000 Subject: [issue32958] Urllib proxy_bypass crashes for urls containing long basic auth strings Message-ID: <1519674755.43.0.467229070634.issue32958@psf.upfronthosting.co.za> New submission from Aaron Black : While working on a custom conda channel with authentication, I ran into the following UnicodeError: Traceback (most recent call last): File "/Users/ablack/miniconda3/lib/python3.6/site-packages/conda/core/repodata.py", line 402, in fetch_repodata_remote_request timeout=timeout) File "/Users/ablack/miniconda3/lib/python3.6/site-packages/requests/sessions.py", line 521, in get return self.request('GET', url, **kwargs) File "/Users/ablack/miniconda3/lib/python3.6/site-packages/requests/sessions.py", line 499, in request prep.url, proxies, stream, verify, cert File "/Users/ablack/miniconda3/lib/python3.6/site-packages/requests/sessions.py", line 672, in merge_environment_settings env_proxies = get_environ_proxies(url, no_proxy=no_proxy) File "/Users/ablack/miniconda3/lib/python3.6/site-packages/requests/utils.py", line 692, in get_environ_proxies if should_bypass_proxies(url, no_proxy=no_proxy): File "/Users/ablack/miniconda3/lib/python3.6/site-packages/requests/utils.py", line 676, in should_bypass_proxies bypass = proxy_bypass(netloc) File "/Users/ablack/miniconda3/lib/python3.6/urllib/request.py", line 2612, in proxy_bypass return proxy_bypass_macosx_sysconf(host) File "/Users/ablack/miniconda3/lib/python3.6/urllib/request.py", line 2589, in proxy_bypass_macosx_sysconf return _proxy_bypass_macosx_sysconf(host, proxy_settings) File "/Users/ablack/miniconda3/lib/python3.6/urllib/request.py", line 2562, in _proxy_bypass_macosx_sysconf hostIP = socket.gethostbyname(hostonly) UnicodeError: encoding with 'idna' codec failed (UnicodeError: label empty or too long) The error can be consistently reproduced when the first substring of the url hostname is greater than 64 characters long, as in "0123456789012345678901234567890123456789012345678901234567890123.example.com". This wouldn't be a problem, except that it doesn't seem to separate out credentials from the first substring of the hostname so the entire "[user]:[secret]@XXX" section must be less than 65 characters long. This is problematic for services that use longer API keys and expect their submission over basic auth. ---------- components: Library (Lib) messages: 312947 nosy: ablack priority: normal severity: normal status: open title: Urllib proxy_bypass crashes for urls containing long basic auth strings type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 15:19:06 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 26 Feb 2018 20:19:06 +0000 Subject: [issue32147] improve performance of binascii.unhexlify() by using conversion table In-Reply-To: <1511784869.56.0.213398074469.issue32147@psf.upfronthosting.co.za> Message-ID: <1519676346.19.0.467229070634.issue32147@psf.upfronthosting.co.za> Change by Ned Deily : ---------- versions: +Python 3.8 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 15:20:15 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Mon, 26 Feb 2018 20:20:15 +0000 Subject: [issue23808] Symlink to directory on Windows 8 In-Reply-To: <1427654710.52.0.171827508348.issue23808@psf.upfronthosting.co.za> Message-ID: <1519676415.93.0.467229070634.issue23808@psf.upfronthosting.co.za> Alexey Izbyshev added the comment: This behavior is not specific to just Windows 8. Symlinks to directories are treated as directories on Windows, in particular, they should be removed with RemoveDirectory, not DeleteFile. Is there any reason this issue is still open? ---------- nosy: +izbyshev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 15:22:20 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 26 Feb 2018 20:22:20 +0000 Subject: [issue29334] ssl.SSLObject method getpeercert() is buggy, do_handshake() is strange In-Reply-To: <1484914427.68.0.380715465195.issue29334@psf.upfronthosting.co.za> Message-ID: <1519676540.66.0.467229070634.issue29334@psf.upfronthosting.co.za> Change by Ned Deily : ---------- nosy: +benjamin.peterson -ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 15:28:34 2018 From: report at bugs.python.org (Christoph Groth) Date: Mon, 26 Feb 2018 20:28:34 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1519676914.87.0.467229070634.issue15767@psf.upfronthosting.co.za> Christoph Groth added the comment: > Read Eric's message before mine. Of course I read it, I wouldn't have asked otherwise. Eric mentions an older message ("see msg182332") that *predates* your judgment that "outside importlib there shouldn't be a need to distinguish between the cases". Otherwise Eric says that he finds "the exception to be very useful", but frankly, I don't see why (outside of importlib or backports of it). What changed since msg192263? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 15:31:10 2018 From: report at bugs.python.org (EricG) Date: Mon, 26 Feb 2018 20:31:10 +0000 Subject: [issue32937] Multiprocessing worker functions not terminating with a large number of processes and a manager In-Reply-To: <1519481823.24.0.467229070634.issue32937@psf.upfronthosting.co.za> Message-ID: <1519677070.11.0.467229070634.issue32937@psf.upfronthosting.co.za> EricG added the comment: Making some further observations, when I set processes = 12, for example, I can see 12 separate python processes + 4 additional processes also created which I assume are setup for the manager and, perhaps, other purposes. Now, what makes these 4 additional processes interesting is that for me, multiprocessing.cpu_count() returns 24. And, it is when I set processes = 20 that the python code will sometimes terminate successfully. 20 + 4 = 24...so I am using every single cpu in that situation. However, as noted, when I set processes = 19, it will always terminate successfully. 19 + 4 < 24...there is at least one cpu not assigned any work. Perhaps there some some kind of race condition or swapping around of data structures or something that only happens on macOS when every cpu is in use by python for this purpose. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 15:35:47 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Feb 2018 20:35:47 +0000 Subject: [issue32147] improve performance of binascii.unhexlify() by using conversion table In-Reply-To: <1511784869.56.0.213398074469.issue32147@psf.upfronthosting.co.za> Message-ID: <1519677347.54.0.467229070634.issue32147@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 6b5df906afe113dbe421d044322254cfd4747c9c by Serhiy Storchaka (Sergey Fedoseev) in branch 'master': bpo-32147: Improved perfomance of binascii.unhexlify(). (GH-4586) https://github.com/python/cpython/commit/6b5df906afe113dbe421d044322254cfd4747c9c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 15:47:14 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 26 Feb 2018 20:47:14 +0000 Subject: [issue32873] Pickling of typing types In-Reply-To: <1519037205.03.0.467229070634.issue32873@psf.upfronthosting.co.za> Message-ID: <1519678034.75.0.467229070634.issue32873@psf.upfronthosting.co.za> Ned Deily added the comment: So we need a decision on this about what, if anything, to do for 3.7. The 3.7.0 ABI freeze is in 3.7.0b3; it would be better to get it resolved for 3.7.0b2. ---------- nosy: +ned.deily priority: normal -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 15:49:50 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 26 Feb 2018 20:49:50 +0000 Subject: [issue32873] Pickling of typing types In-Reply-To: <1519037205.03.0.467229070634.issue32873@psf.upfronthosting.co.za> Message-ID: <1519678190.49.0.467229070634.issue32873@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: I am sick now, so can't work on this. There is a small chance I will be able to work on this issue this week. Is it possible to fix this in 3.7b3? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 15:52:04 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 26 Feb 2018 20:52:04 +0000 Subject: [issue32873] Pickling of typing types In-Reply-To: <1519037205.03.0.467229070634.issue32873@psf.upfronthosting.co.za> Message-ID: <1519678324.6.0.467229070634.issue32873@psf.upfronthosting.co.za> Ned Deily added the comment: > Is it possible to fix this in 3.7b3? Yes. Get well first! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 15:52:47 2018 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 26 Feb 2018 20:52:47 +0000 Subject: [issue32873] Pickling of typing types In-Reply-To: <1519037205.03.0.467229070634.issue32873@psf.upfronthosting.co.za> Message-ID: <1519678367.36.0.467229070634.issue32873@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Thank you, Ned! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 15:54:16 2018 From: report at bugs.python.org (Nathaniel Smith) Date: Mon, 26 Feb 2018 20:54:16 +0000 Subject: [issue31711] ssl.SSLSocket.send(b"") fails In-Reply-To: <1507282980.19.0.213398074469.issue31711@psf.upfronthosting.co.za> Message-ID: <1519678456.56.0.467229070634.issue31711@psf.upfronthosting.co.za> Nathaniel Smith added the comment: My point is that SSL_write(3ssl) says "WARNING: When calling SSL_write() with num=0 bytes to be sent the behaviour is undefined." Apparently on the particular openssl you're looking at, it gives SSL_ERROR_SYSCALL with error code == 0 and len == 0, but the openssl devs claim this is some arbitrary thing that shouldn't be depended on. Just as a general principle it would be nice if performing ordinary operations on an SSLSocket from Python did not invoke undefined behavior :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 16:08:51 2018 From: report at bugs.python.org (Mariano M. Chouza) Date: Mon, 26 Feb 2018 21:08:51 +0000 Subject: [issue32959] zipimport fails when the ZIP archive contains more than 65535 files Message-ID: <1519679331.45.0.467229070634.issue32959@psf.upfronthosting.co.za> New submission from Mariano M. Chouza : When trying to import a module from a ZIP archive containing more than 65535 files, the import process fails: $ python3 -VV Python 3.6.4 (default, Jan 6 2018, 11:49:38) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] $ cat create_zips.py from zipfile import ZipFile with ZipFile('below.zip', 'w') as zfp: for i in range(65535): zfp.writestr('m%d.py' % i, '') with ZipFile('over.zip', 'w') as zfp: for i in range(65536): zfp.writestr('m%d.py' % i, '') $ python3 create_zips.py $ python -m zipfile -l below.zip | (head -2 && tail -2) File Name Modified Size m0.py 2018-02-26 20:57:32 0 m65533.py 2018-02-26 20:57:36 0 m65534.py 2018-02-26 20:57:36 0 $ python -m zipfile -l over.zip | (head -2 && tail -2) File Name Modified Size m0.py 2018-02-26 20:57:36 0 m65534.py 2018-02-26 20:57:40 0 m65535.py 2018-02-26 20:57:40 0 $ PYTHONPATH=below.zip python3 -c 'import m0' $ PYTHONPATH=over.zip python3 -c 'import m0' Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'm0' I think the problem is related to the zipimport module not handling the 'zip64 end of central directory record'. ---------- components: Library (Lib) messages: 312957 nosy: mchouza priority: normal severity: normal status: open title: zipimport fails when the ZIP archive contains more than 65535 files type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 16:26:31 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 26 Feb 2018 21:26:31 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1519680391.24.0.467229070634.issue31961@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I'm fine with undoing this for 3.7 in light of the many things we don't do "right" all over the place with path like objects. subprocess still presents as a mix of high and low level APIs so if we accept a path like object in a subset of places it seems like that'll add complexity to the APIs rather than being consistent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 16:27:33 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Feb 2018 21:27:33 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1519680453.26.0.467229070634.issue31961@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +5683 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 16:31:27 2018 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 26 Feb 2018 21:31:27 +0000 Subject: [issue32836] Symbol table for comprehensions (list, dict, set) still includes temporary _[1] variable In-Reply-To: <1518471231.56.0.467229070634.issue32836@psf.upfronthosting.co.za> Message-ID: <1519680687.51.0.467229070634.issue32836@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset 3a087beddd9f0955eb9080a6fd1499ff89ca74bf by Nick Coghlan (Nitish Chandra) in branch 'master': bpo-32836: Remove obsolete code from symtable pass (GH-5680) https://github.com/python/cpython/commit/3a087beddd9f0955eb9080a6fd1499ff89ca74bf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 16:31:43 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 26 Feb 2018 21:31:43 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1519680703.31.0.467229070634.issue31961@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Ned: when removing a feature added in beta1, should we remove the original NEWS entry created for it? Or add a new NEWS entry that states that the previous feature has been reverted? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 16:32:48 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 26 Feb 2018 21:32:48 +0000 Subject: [issue32836] Symbol table for comprehensions (list, dict, set) still includes temporary _[1] variable In-Reply-To: <1518471231.56.0.467229070634.issue32836@psf.upfronthosting.co.za> Message-ID: <1519680768.31.0.467229070634.issue32836@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5684 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 16:36:06 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 26 Feb 2018 21:36:06 +0000 Subject: [issue21417] Compression level for zipfile In-Reply-To: <1399053616.42.0.124840881006.issue21417@psf.upfronthosting.co.za> Message-ID: <1519680966.45.0.467229070634.issue21417@psf.upfronthosting.co.za> Gregory P. Smith added the comment: keeping the conversation in one place, the code review comment was: "I've prefixed this with an underscore because it's not exposed when reading back. ZipInfo has another "private" attribute, _raw_time" compresslevel is documented on the public APIs where it appears, I do not believe it needs to be a public attribute within ZipInfo given the above as that is an implementation detail. If we ever find a good reason to make it public in the future we can add a property. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 16:44:16 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 26 Feb 2018 21:44:16 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1519681456.42.0.467229070634.issue31961@psf.upfronthosting.co.za> Ned Deily added the comment: We should either remove the entry in Misc/NEWS/3.7.0b1.rst or, perhaps better, add a line to it noting that it was removed in 3.7.0b2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 16:53:40 2018 From: report at bugs.python.org (Ned Deily) Date: Mon, 26 Feb 2018 21:53:40 +0000 Subject: [issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture In-Reply-To: <1489413054.1.0.4012026352.issue29804@psf.upfronthosting.co.za> Message-ID: <1519682020.19.0.467229070634.issue29804@psf.upfronthosting.co.za> Ned Deily added the comment: Vinay, should this backported to 3.6? Otherwise, can the issue be closed? ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 17:02:22 2018 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 26 Feb 2018 22:02:22 +0000 Subject: [issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture In-Reply-To: <1489413054.1.0.4012026352.issue29804@psf.upfronthosting.co.za> Message-ID: <1519682542.05.0.467229070634.issue29804@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: The bug is still present on the 3.6 branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 17:14:40 2018 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 26 Feb 2018 22:14:40 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1519676914.87.0.467229070634.issue15767@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: I don't like the way you're asking questions here. If you're interested just as a historian of the language, it will have to wait. If you're questioning the decision, please come out and say so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 17:24:14 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Feb 2018 22:24:14 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1519683854.01.0.467229070634.issue31961@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There are two alternate PRs. PR 5912 removes this feature. PR 5914 fixes it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 17:42:24 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Feb 2018 22:42:24 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1519684944.33.0.467229070634.issue31961@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +5685 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 17:48:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Feb 2018 22:48:16 +0000 Subject: [issue32222] pygettext doesn't extract docstrings for functions with type annotated params In-Reply-To: <1512470175.69.0.213398074469.issue32222@psf.upfronthosting.co.za> Message-ID: <1519685296.42.0.467229070634.issue32222@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset eee72d4778a5513038edd5236cdd87ccce2bc60a by Serhiy Storchaka (Tobotimus) in branch 'master': bpo-32222: Fix pygettext skipping docstrings for funcs with arg typehints (GH-4745) https://github.com/python/cpython/commit/eee72d4778a5513038edd5236cdd87ccce2bc60a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 17:49:27 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 26 Feb 2018 22:49:27 +0000 Subject: [issue32222] pygettext doesn't extract docstrings for functions with type annotated params In-Reply-To: <1512470175.69.0.213398074469.issue32222@psf.upfronthosting.co.za> Message-ID: <1519685367.05.0.467229070634.issue32222@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5686 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 17:50:25 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 26 Feb 2018 22:50:25 +0000 Subject: [issue32222] pygettext doesn't extract docstrings for functions with type annotated params In-Reply-To: <1512470175.69.0.213398074469.issue32222@psf.upfronthosting.co.za> Message-ID: <1519685425.95.0.467229070634.issue32222@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5687 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 17:50:36 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 26 Feb 2018 22:50:36 +0000 Subject: [issue21417] Compression level for zipfile In-Reply-To: <1399053616.42.0.124840881006.issue21417@psf.upfronthosting.co.za> Message-ID: <1519685436.57.0.467229070634.issue21417@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This makes sense to me. Thank you for explanation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 18:19:25 2018 From: report at bugs.python.org (Christoph Groth) Date: Mon, 26 Feb 2018 23:19:25 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1519687165.44.0.467229070634.issue15767@psf.upfronthosting.co.za> Christoph Groth added the comment: My curiosity was piqued when I saw ModuleNotFoundError, so I decided to look it up. This led me to this page and I read the complete discussion. I still did not understand the decision, so I allowed myself to ask, also because I believe that when new features are introduced it should be clear what they are good for. That's all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 18:23:30 2018 From: report at bugs.python.org (miss-islington) Date: Mon, 26 Feb 2018 23:23:30 +0000 Subject: [issue32222] pygettext doesn't extract docstrings for functions with type annotated params In-Reply-To: <1512470175.69.0.213398074469.issue32222@psf.upfronthosting.co.za> Message-ID: <1519687410.21.0.467229070634.issue32222@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 51d95ffc2fb3337dc87277c9af25ecc9a01f991b by Miss Islington (bot) in branch '3.7': bpo-32222: Fix pygettext skipping docstrings for funcs with arg typehints (GH-4745) https://github.com/python/cpython/commit/51d95ffc2fb3337dc87277c9af25ecc9a01f991b ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 18:39:03 2018 From: report at bugs.python.org (Christoph Groth) Date: Mon, 26 Feb 2018 23:39:03 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1519688343.32.0.467229070634.issue15767@psf.upfronthosting.co.za> Christoph Groth added the comment: In the above, please replace "understand the decision" by "understand the usefulness of it". In the above discussion, as an alternative to a new exception, it was proposed to add an attribute to ImportError ('reason'), but then people seemed to agree that this is quite useless outside of importlib (msg192261). But then I don't understand why the original idea of the exception was revived. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 18:41:26 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 26 Feb 2018 23:41:26 +0000 Subject: [issue32960] dataclasses: disallow inheritance between frozen and non-frozen classes Message-ID: <1519688486.17.0.467229070634.issue32960@psf.upfronthosting.co.za> New submission from Eric V. Smith : This is a temporary measure until we can better define how frozen inheritance should work. In the meantime, disallow: - frozen inherited from non-frozen - non-frozen inherited from frozen ---------- assignee: eric.smith components: Library (Lib) messages: 312972 nosy: eric.smith priority: normal severity: normal status: open title: dataclasses: disallow inheritance between frozen and non-frozen classes versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 18:42:49 2018 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 26 Feb 2018 23:42:49 +0000 Subject: [issue32960] dataclasses: disallow inheritance between frozen and non-frozen classes In-Reply-To: <1519688486.17.0.467229070634.issue32960@psf.upfronthosting.co.za> Message-ID: <1519688569.34.0.467229070634.issue32960@psf.upfronthosting.co.za> Eric V. Smith added the comment: See issue 32953 for a larger discussion and the ultimate resolution of this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 19:03:33 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 27 Feb 2018 00:03:33 +0000 Subject: [issue32713] tarfile.itn breaks if n is a negative float In-Reply-To: <1517260556.9.0.467229070634.issue32713@psf.upfronthosting.co.za> Message-ID: <1519689813.94.0.467229070634.issue32713@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5688 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 19:05:33 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 27 Feb 2018 00:05:33 +0000 Subject: [issue32713] tarfile.itn breaks if n is a negative float In-Reply-To: <1517260556.9.0.467229070634.issue32713@psf.upfronthosting.co.za> Message-ID: <1519689933.72.0.467229070634.issue32713@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5689 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 19:50:18 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 27 Feb 2018 00:50:18 +0000 Subject: [issue32713] tarfile.itn breaks if n is a negative float In-Reply-To: <1517260556.9.0.467229070634.issue32713@psf.upfronthosting.co.za> Message-ID: <1519692618.48.0.467229070634.issue32713@psf.upfronthosting.co.za> miss-islington added the comment: New changeset a9a8a9814a52b3c92b3680f0b3a356116510ee18 by Miss Islington (bot) in branch '3.7': bpo-32713: Fix tarfile.itn for large/negative float values. (GH-5434) https://github.com/python/cpython/commit/a9a8a9814a52b3c92b3680f0b3a356116510ee18 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 20:06:49 2018 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 27 Feb 2018 01:06:49 +0000 Subject: [issue32960] dataclasses: disallow inheritance between frozen and non-frozen classes In-Reply-To: <1519688486.17.0.467229070634.issue32960@psf.upfronthosting.co.za> Message-ID: <1519693609.25.0.467229070634.issue32960@psf.upfronthosting.co.za> Change by Eric V. Smith : ---------- keywords: +patch pull_requests: +5690 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 20:28:37 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 27 Feb 2018 01:28:37 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1519694917.06.0.467229070634.issue32604@psf.upfronthosting.co.za> Eric Snow added the comment: As far as I know, everything related to this issue is in a stable state. I have not been able to determine any way in which the reported memory leak (in test_multiprocessing_fork) could be related. Sorry, I didn't notice the release blocker priority. I do not plan on landing any further changes here for beta2. However, I do plan on a few more additions under Lib/test before we go final. ---------- priority: release blocker -> normal resolution: fixed -> stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 20:36:40 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 27 Feb 2018 01:36:40 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1519695400.89.0.467229070634.issue32604@psf.upfronthosting.co.za> Eric Snow added the comment: Still planned for 3.7: 1. add more tests in Lib/test/test__xxsubinterpreters.py 2. add test.support.interpreters (high-level module) 3. add more tests in Lib/test/test_interpreters.py At that point I'll start using the high-level module in tests for subinterpreter functionality and for other open issues (e.g. #10915, #15751), aiming to improve stability of the feature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 20:39:44 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 27 Feb 2018 01:39:44 +0000 Subject: [issue32960] dataclasses: disallow inheritance between frozen and non-frozen classes In-Reply-To: <1519688486.17.0.467229070634.issue32960@psf.upfronthosting.co.za> Message-ID: <1519695584.23.0.467229070634.issue32960@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5691 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 20:39:55 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 27 Feb 2018 01:39:55 +0000 Subject: [issue32922] dbm.open() encodes filename with default encoding rather than the filesystem encoding In-Reply-To: <1519398668.71.0.467229070634.issue32922@psf.upfronthosting.co.za> Message-ID: <1519695595.9.0.467229070634.issue32922@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 5bf74859fe253f0e8ff73ba699cd1a7e2dfbcea3 by Serhiy Storchaka in branch '3.6': [3.6] bpo-32922: dbm.open() now encodes filename with the filesystem encoding. (GH-5832). (GH-5906) https://github.com/python/cpython/commit/5bf74859fe253f0e8ff73ba699cd1a7e2dfbcea3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 20:59:58 2018 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 27 Feb 2018 01:59:58 +0000 Subject: [issue32960] dataclasses: disallow inheritance between frozen and non-frozen classes In-Reply-To: <1519688486.17.0.467229070634.issue32960@psf.upfronthosting.co.za> Message-ID: <1519696798.88.0.467229070634.issue32960@psf.upfronthosting.co.za> Eric V. Smith added the comment: New changeset a93e3dc236279692eaf50b91d358da5983983b14 by Eric V. Smith (Miss Islington (bot)) in branch '3.7': bpo-32960: For dataclasses, disallow inheriting frozen from non-frozen classes and vice-versa, (GH-5919) (GH-5920) https://github.com/python/cpython/commit/a93e3dc236279692eaf50b91d358da5983983b14 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 21:10:54 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 27 Feb 2018 02:10:54 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1519697454.07.0.467229070634.issue32604@psf.upfronthosting.co.za> Ned Deily added the comment: > Still planned for 3.7: [...] Eric, please try to get everything you want done and into master as soon as possible, then produce a PR for 3.7, and then we can review it and make a decision if it is appropriate for 3.7. As I've mentioned in msg310448 and stated elsewhere, the expectation is that the few post-b1 feature freeze extensions granted were only for b2. Even changes limited to Lib/test can break buildbots and downstream users' testing and take multiple releases to stabilize. Thanks for your work on this! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 21:14:02 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 27 Feb 2018 02:14:02 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1519697642.21.0.467229070634.issue32604@psf.upfronthosting.co.za> Change by Ned Deily : ---------- priority: normal -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 21:26:07 2018 From: report at bugs.python.org (Andrew Brezovsky) Date: Tue, 27 Feb 2018 02:26:07 +0000 Subject: [issue26792] docstrings of runpy.run_{module,path} are rather sparse In-Reply-To: <1460944502.67.0.955110104065.issue26792@psf.upfronthosting.co.za> Message-ID: <1519698367.21.0.467229070634.issue26792@psf.upfronthosting.co.za> Andrew Brezovsky added the comment: I'll update these based on the information in the HTML docs. ---------- nosy: +abrezovsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 26 23:24:25 2018 From: report at bugs.python.org (Andrew Brezovsky) Date: Tue, 27 Feb 2018 04:24:25 +0000 Subject: [issue26792] docstrings of runpy.run_{module,path} are rather sparse In-Reply-To: <1460944502.67.0.955110104065.issue26792@psf.upfronthosting.co.za> Message-ID: <1519705465.63.0.467229070634.issue26792@psf.upfronthosting.co.za> Change by Andrew Brezovsky : ---------- keywords: +patch pull_requests: +5692 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 00:37:52 2018 From: report at bugs.python.org (Roundup Robot) Date: Tue, 27 Feb 2018 05:37:52 +0000 Subject: [issue26707] plistlib fails to parse bplist with 0x80 UID values In-Reply-To: <1459992841.57.0.391610307965.issue26707@psf.upfronthosting.co.za> Message-ID: <1519709872.31.0.467229070634.issue26707@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +5693 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 02:56:49 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 27 Feb 2018 07:56:49 +0000 Subject: [issue32947] Support OpenSSL 1.1.1 In-Reply-To: <1519559680.67.0.467229070634.issue32947@psf.upfronthosting.co.za> Message-ID: <1519718209.56.0.467229070634.issue32947@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5694 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 03:21:36 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 27 Feb 2018 08:21:36 +0000 Subject: [issue28124] Rework SSL module documentation In-Reply-To: <1473762840.76.0.666078412099.issue28124@psf.upfronthosting.co.za> Message-ID: <1519719696.93.0.467229070634.issue28124@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 90f05a527c7d439f1d0cba80f2eb32e60ee20fc3 by Christian Heimes in branch 'master': bpo-28124: deprecate ssl.wrap_socket() (#5888) https://github.com/python/cpython/commit/90f05a527c7d439f1d0cba80f2eb32e60ee20fc3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 03:22:47 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 27 Feb 2018 08:22:47 +0000 Subject: [issue28124] Rework SSL module documentation In-Reply-To: <1473762840.76.0.666078412099.issue28124@psf.upfronthosting.co.za> Message-ID: <1519719767.62.0.467229070634.issue28124@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5695 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 03:48:58 2018 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 27 Feb 2018 08:48:58 +0000 Subject: [issue29804] test_ctypes test_pass_by_value fails on arm64 (aarch64) architecture In-Reply-To: <1489413054.1.0.4012026352.issue29804@psf.upfronthosting.co.za> Message-ID: <1519721338.04.0.467229070634.issue29804@psf.upfronthosting.co.za> Vinay Sajip added the comment: > Vinay, should this back-ported to 3.6? Yes, I think it should be. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 03:51:54 2018 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 27 Feb 2018 08:51:54 +0000 Subject: [issue32932] better error message when __all__ contains non-str objects In-Reply-To: <1519462308.25.0.467229070634.issue32932@psf.upfronthosting.co.za> Message-ID: <1519721514.76.0.467229070634.issue32932@psf.upfronthosting.co.za> Xiang Zhang added the comment: I would like the error message improved. The Python message is obviously much better than the C message. It sends the cause to your eyes. Different messages issued from similar statements are confusing. And due to the non-ideal message is generated by C, the traceback is more limited. tmpdir/ - __init__.py . __all__ = [1] - a.py . __all__ = [1] >>> from tmpdir import * Traceback (most recent call last): File "", line 1, in File "", line 1031, in _handle_fromlist File "", line 1026, in _handle_fromlist TypeError: Item in tmpdir.__all__ must be str, not int >>> from tmpdir.a import * Traceback (most recent call last): File "", line 1, in TypeError: attribute name must be string, not 'float' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 03:55:10 2018 From: report at bugs.python.org (poornaprudhvi) Date: Tue, 27 Feb 2018 08:55:10 +0000 Subject: [issue32961] namedtuple displaying the internal code Message-ID: <1519721710.54.0.467229070634.issue32961@psf.upfronthosting.co.za> New submission from poornaprudhvi : >>> from collections import namedtuple >>> sample = namedtuple('Name','a','b','c') This is returning the following code as output: class Name(tuple): 'Name(a,)' __slots__ = () _fields = ('a',) def __new__(_cls, a,): 'Create new instance of Name(a,)' return _tuple.__new__(_cls, (a,)) @classmethod def _make(cls, iterable, new=tuple.__new__, len=len): 'Make a new Name object from a sequence or iterable' result = new(cls, iterable) if len(result) != 1: raise TypeError('Expected 1 arguments, got %d' % len(result)) return result def __repr__(self): 'Return a nicely formatted representation string' return 'Name(a=%r)' % self def _asdict(self): 'Return a new OrderedDict which maps field names to their values' return OrderedDict(zip(self._fields, self)) def _replace(_self, **kwds): 'Return a new Name object replacing specified fields with new values' result = _self._make(map(kwds.pop, ('a',), _self)) if kwds: raise ValueError('Got unexpected field names: %r' % kwds.keys()) return result def __getnewargs__(self): 'Return self as a plain tuple. Used by copy and pickle.' return tuple(self) __dict__ = _property(_asdict) def __getstate__(self): 'Exclude the OrderedDict from pickling' pass a = _property(_itemgetter(0), doc='Alias for field number 0') ---------- assignee: terry.reedy components: IDLE messages: 312984 nosy: poornaprudhvi, terry.reedy priority: normal severity: normal status: open title: namedtuple displaying the internal code type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 04:04:23 2018 From: report at bugs.python.org (Martijn Pieters) Date: Tue, 27 Feb 2018 09:04:23 +0000 Subject: [issue32963] Python 2.7 tutorial claims source code is UTF-8 encoded Message-ID: <1519722263.23.0.467229070634.issue32963@psf.upfronthosting.co.za> New submission from Martijn Pieters : Issue #29381 updated the tutorial to clarify #! use, but the 2.7 patch re-used Python 3 material that doesn't apply. See r40ba60f6 at https://github.com/python/cpython/commit/40ba60f6bf2f7192f86da395c71348d0fa24da09 It now reads: "By default, Python source files are treated as encoded in UTF-8." and " To display all these characters properly, your editor must recognize that the file is UTF-8, and it must use a font that supports all the characters in the file." This is a huge deviation from the previous text, and confusing and wrong to people new to Python 2. ---------- assignee: docs at python components: Documentation messages: 312986 nosy: docs at python, mjpieters priority: normal severity: normal status: open title: Python 2.7 tutorial claims source code is UTF-8 encoded versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 04:05:04 2018 From: report at bugs.python.org (Martijn Pieters) Date: Tue, 27 Feb 2018 09:05:04 +0000 Subject: [issue32963] Python 2.7 tutorial claims source code is UTF-8 encoded In-Reply-To: <1519722263.23.0.467229070634.issue32963@psf.upfronthosting.co.za> Message-ID: <1519722304.52.0.467229070634.issue32963@psf.upfronthosting.co.za> Change by Martijn Pieters : ---------- nosy: +Mariatta, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 04:25:45 2018 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 27 Feb 2018 09:25:45 +0000 Subject: [issue26707] plistlib fails to parse bplist with 0x80 UID values In-Reply-To: <1459992841.57.0.391610307965.issue26707@psf.upfronthosting.co.za> Message-ID: <1519723545.15.0.467229070634.issue26707@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Note that I'm still -1 on merging this patch because it is unclear how to create such plist files using public Apple APIs. P.S. The low-level code for creating and reading binary plist files appears to be used for more than juist plist archives. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 04:34:12 2018 From: report at bugs.python.org (Jonathan) Date: Tue, 27 Feb 2018 09:34:12 +0000 Subject: [issue31727] FTP_TLS errors when use certain subcommands In-Reply-To: <1507482521.5.0.213398074469.issue31727@psf.upfronthosting.co.za> Message-ID: <1519724052.09.0.467229070634.issue31727@psf.upfronthosting.co.za> Jonathan added the comment: Hi Christian - Can you not reproduce it from the code included in my original report? I think that's pretty much all that should be needed, as it's all I was using when I discovered the issue. I figure the hard part will be finding a FTP_TLS server to test with. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 04:38:04 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 27 Feb 2018 09:38:04 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1519724284.49.0.467229070634.issue32911@psf.upfronthosting.co.za> INADA Naoki added the comment: I tried this patch: diff --git a/Python/ast.c b/Python/ast.c index e2092f0f85..93be2bc839 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -3537,9 +3537,9 @@ docstring_from_stmts(asdl_seq *stmts) if (s->kind == Expr_kind && s->v.Expr.value->kind == Str_kind) { string doc = s->v.Expr.value->v.Str.s; /* not very efficient, but simple */ - memmove(&asdl_seq_GET(stmts, 0), &asdl_seq_GET(stmts, 1), - (stmts->size - 1) * sizeof(void*)); - stmts->size--; + //memmove(&asdl_seq_GET(stmts, 0), &asdl_seq_GET(stmts, 1), + // (stmts->size - 1) * sizeof(void*)); + //stmts->size--; return doc; } } But I got "SyntaxError: from __future__ imports must occur at the beginning of the file". docstring is very special while it looks like just a single string literal statement... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 04:45:33 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 27 Feb 2018 09:45:33 +0000 Subject: [issue28124] Rework SSL module documentation In-Reply-To: <1473762840.76.0.666078412099.issue28124@psf.upfronthosting.co.za> Message-ID: <1519724733.35.0.467229070634.issue28124@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 102d5204add249248d1a0fa1dd3f673e884b06b4 by Miss Islington (bot) in branch '3.7': bpo-28124: deprecate ssl.wrap_socket() (GH-5888) https://github.com/python/cpython/commit/102d5204add249248d1a0fa1dd3f673e884b06b4 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 04:46:44 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 27 Feb 2018 09:46:44 +0000 Subject: [issue32951] Prohibit direct instantiation of SSLSocket and SSLObject In-Reply-To: <1519579084.45.0.467229070634.issue32951@psf.upfronthosting.co.za> Message-ID: <1519724804.44.0.467229070634.issue32951@psf.upfronthosting.co.za> Change by Christian Heimes : ---------- pull_requests: +5696 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 05:01:00 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 27 Feb 2018 10:01:00 +0000 Subject: [issue31453] Debian Sid/Buster: Cannot enable TLS 1.0/1.1 with PROTOCOL_TLS In-Reply-To: <1505317705.14.0.640405907228.issue31453@psf.upfronthosting.co.za> Message-ID: <1519725660.82.0.467229070634.issue31453@psf.upfronthosting.co.za> Christian Heimes added the comment: I have another good reason to land PR 5259 in 3.7. OpenSSL 1.1.0 has deprecated the old way to disable/enable protocol versions with set option. The OP_NO_TLSv1* constants will likely get removed in OpenSSL 1.2.0. I'm expecting to see a 1.2.0 release within the next two years. Therefore we should include SSLContext.maximum_version and SSLContext.minimum_version now. We may even have to backport them to 3.6 and 2.7. https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_set_options.html > SSL_OP_NO_SSLv3, SSL_OP_NO_TLSv1, SSL_OP_NO_TLSv1_1, SSL_OP_NO_TLSv1_2, SSL_OP_NO_DTLSv1, SSL_OP_NO_DTLSv1_2 > These options turn off the SSLv3, TLSv1, TLSv1.1 or TLSv1.2 protocol versions with TLS or the DTLSv1, DTLSv1.2 versions with DTLS, respectively. As of OpenSSL 1.1.0, these options are deprecated, use SSL_CTX_set_min_proto_version and SSL_CTX_set_max_proto_version instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 05:17:35 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 27 Feb 2018 10:17:35 +0000 Subject: [issue32951] Prohibit direct instantiation of SSLSocket and SSLObject In-Reply-To: <1519579084.45.0.467229070634.issue32951@psf.upfronthosting.co.za> Message-ID: <1519726655.12.0.467229070634.issue32951@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 89c2051a554d2053ac87b0adbf11ed0f1bb65db3 by Christian Heimes in branch '3.7': [3.7] bpo-32951: Disable SSLSocket/SSLObject constructor (GH-5864) (#5925) https://github.com/python/cpython/commit/89c2051a554d2053ac87b0adbf11ed0f1bb65db3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 05:23:46 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 27 Feb 2018 10:23:46 +0000 Subject: [issue32961] namedtuple displaying the internal code In-Reply-To: <1519721710.54.0.467229070634.issue32961@psf.upfronthosting.co.za> Message-ID: <1519727026.94.0.467229070634.issue32961@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The behavior of collections.namedtuple has nothing to do with IDLE. I verified the behavior in 2.7. In 3.7, one must group the field names, as in a tuple, and the corrected statement has no output. I had nothing to do with namedtuple development. I presume that the people who are are aware of the 2.7 behavior. My guess is that they regaurd the behavior change was either a new version feature change or as too disruptive a fix to backport to 2.7. Hence, I expect this to be closed. ---------- assignee: terry.reedy -> components: +Library (Lib) -IDLE nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 05:37:05 2018 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 27 Feb 2018 10:37:05 +0000 Subject: [issue32961] namedtuple displaying the internal code In-Reply-To: <1519721710.54.0.467229070634.issue32961@psf.upfronthosting.co.za> Message-ID: <1519727825.07.0.467229070634.issue32961@psf.upfronthosting.co.za> Eric V. Smith added the comment: See https://docs.python.org/2/library/collections.html#collections.namedtuple namedtuple is called as: collections.namedtuple(typename, field_names[, verbose=False][, rename=False]) So you are passing in typename = 'Name' field_names = 'a' verbose = 'b' rename = 'c' 'b' is a True value, so that's why it's showing the output. You want to be using: sample = namedtuple('Name', ['a', 'b', 'c']) ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 05:39:27 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 27 Feb 2018 10:39:27 +0000 Subject: [issue32961] namedtuple displaying the internal code In-Reply-To: <1519721710.54.0.467229070634.issue32961@psf.upfronthosting.co.za> Message-ID: <1519727967.02.0.467229070634.issue32961@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In 2.7 namedtuple() takes four arguments. namedtuple(typename, field_names, verbose=False, rename=False) A sequence of field names should be passed as the second argument. In you case you pass four argumens: 'a' as field names, 'b' as the verbose flag, and 'c' as the rename flag. Since 'b' has true boolean value, namedtuple() outputs the source used for generating a named tuple with a single field 'a'. In Python 3.6+ verbose and rename are keyword-only parameters (see issue25628) and this error can be caught earlier: >>> sample = namedtuple('Name','a','b','c') Traceback (most recent call last): File "", line 1, in TypeError: namedtuple() takes 2 positional arguments but 4 were given This change can't be backported to 2.7 for two reasons: 1) There is no syntax support for keyword-only parameters in 2.7. 2) This can break a correct code which passes flags as positional arguments. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 05:55:52 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 27 Feb 2018 10:55:52 +0000 Subject: [issue31453] Debian Sid/Buster: Cannot enable TLS 1.0/1.1 with PROTOCOL_TLS In-Reply-To: <1505317705.14.0.640405907228.issue31453@psf.upfronthosting.co.za> Message-ID: <1519728952.36.0.467229070634.issue31453@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5697 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 06:27:27 2018 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 27 Feb 2018 11:27:27 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1519730847.09.0.467229070634.issue15767@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Eric touched on the use when he said the following above: > It's nice to be able to distinguish between the failure to *find* the module during import from other uses of ImportError. To make up one example, you might want to use a fallback module if a package isn't installed: try: from fancy_parser import NewParser as HTMLParser except ModuleNotFoundError: from html.parser import HTMLParser But you might still want an error if the package is installed, though incorrectly (e.g. fancy_parser is installed, but an old version that doesn't have NewParser). Catching ImportError would swallow this error, whereas ModuleNotFoundError would let it bubble up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 06:41:07 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 27 Feb 2018 11:41:07 +0000 Subject: [issue31453] Debian Sid/Buster: Cannot enable TLS 1.0/1.1 with PROTOCOL_TLS In-Reply-To: <1505317705.14.0.640405907228.issue31453@psf.upfronthosting.co.za> Message-ID: <1519731667.34.0.467229070634.issue31453@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 4c842b09209ccf1b4f853106b1f58bb888da02ef by Miss Islington (bot) in branch '3.7': bpo-31453: Add setter for min/max protocol version (GH-5259) https://github.com/python/cpython/commit/4c842b09209ccf1b4f853106b1f58bb888da02ef ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 06:47:10 2018 From: report at bugs.python.org (Christian Heimes) Date: Tue, 27 Feb 2018 11:47:10 +0000 Subject: [issue31453] Debian Sid/Buster: Cannot enable TLS 1.0/1.1 with PROTOCOL_TLS In-Reply-To: <1505317705.14.0.640405907228.issue31453@psf.upfronthosting.co.za> Message-ID: <1519732030.27.0.467229070634.issue31453@psf.upfronthosting.co.za> Christian Heimes added the comment: Ned, I have pushed the enhancement now. I feel a bit guilty about the last minute push, but I honestly believe it's in our best interesting. There is a high chance that the new APIs will be required for Debian and other distros in the near future. OpenSSL has deprecated the old API, too. It is likely that OpenSSL 1.2.0 will remove both the options (OP_NO_TLSv1, OP_NO_TLSv1_2, ...) options and version specific protocols (PROTOCOL_TLSv1, PROTOCOL_TLSv1_2, ...). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 06:58:32 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 27 Feb 2018 11:58:32 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1519732712.29.0.467229070634.issue32911@psf.upfronthosting.co.za> Change by INADA Naoki : ---------- keywords: +patch pull_requests: +5698 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 07:01:35 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 27 Feb 2018 12:01:35 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1519732895.85.0.467229070634.issue32911@psf.upfronthosting.co.za> INADA Naoki added the comment: I'm implementing (2). Please check GH-5927. ---------- keywords: -patch stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 07:17:45 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 27 Feb 2018 12:17:45 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1519733865.84.0.467229070634.issue32911@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Would be nice to discuss this design question on Python-list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 07:45:51 2018 From: report at bugs.python.org (INADA Naoki) Date: Tue, 27 Feb 2018 12:45:51 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1519735551.53.0.467229070634.issue32911@psf.upfronthosting.co.za> INADA Naoki added the comment: Python-list? -dev? -ideas? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 07:51:25 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 27 Feb 2018 12:51:25 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1519735885.83.0.467229070634.issue32911@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry, Python-Dev, of course. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 08:07:15 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Tue, 27 Feb 2018 13:07:15 +0000 Subject: [issue17288] cannot jump from a 'return' or 'exception' trace event In-Reply-To: <1361726813.15.0.719765769531.issue17288@psf.upfronthosting.co.za> Message-ID: <1519736835.25.0.467229070634.issue17288@psf.upfronthosting.co.za> Change by Xavier de Gaye : ---------- pull_requests: +5699 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 08:10:04 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Tue, 27 Feb 2018 13:10:04 +0000 Subject: [issue17288] cannot jump from a 'return' or 'exception' trace event In-Reply-To: <1361726813.15.0.719765769531.issue17288@psf.upfronthosting.co.za> Message-ID: <1519737004.36.0.467229070634.issue17288@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Added PR 5928 for the 3.7 branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 08:13:41 2018 From: report at bugs.python.org (Christoph Groth) Date: Tue, 27 Feb 2018 13:13:41 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1519737221.33.0.467229070634.issue15767@psf.upfronthosting.co.za> Christoph Groth added the comment: Thank you, Chris, for your reply. If this is indeed the main use case of ModuleNotFoundError, I respectfully suggest to document it better. The way things are now, Python users who switch to 3.6 encounter this new exception during their work with the interpreter and invariably wonder "Should I change anything in my code because of this? If not, why was it introduced?". In my opinion the current documentation does not answer these questions well. Note that this is not about some deeply buried detail. Every Python programmer is bound to encounter this. That said, I cannot imagine many cases where user code would like to fall back to html.parser only if fancy_parser is not installed but not if an older version of fancy_parser is installed (or maybe it's an entirely *different* fancy_parser?). And in the rare cases where that is desired, it was already perfectly idiomatic to do so: try: import fancy_parser except ImportError: from html.parser import HTMLParser else: from fancy_parser import NewParser as HTMLParser ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 08:17:55 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 27 Feb 2018 13:17:55 +0000 Subject: [issue32911] Doc strings no longer stored in body of AST In-Reply-To: <1519302007.93.0.467229070634.issue32911@psf.upfronthosting.co.za> Message-ID: <1519737475.82.0.467229070634.issue32911@psf.upfronthosting.co.za> Ned Deily added the comment: Since we are already past the 3.7.0b2 cutoff time and there does not seen to be a consensus that the current 3.7 behavior needs to change and the proposed change is quite large, I think we should not change anything now for b2. You can have a discussion on python-dev and, if there is a consensus for change, we can look at it for b3. ---------- priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 08:24:29 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 27 Feb 2018 13:24:29 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1519737869.39.0.467229070634.issue15767@psf.upfronthosting.co.za> Ned Deily added the comment: Christoph, thanks for your suggestion. If you think the documentation needs improving, please open a new issue with any suggested wording (or, even better, a doc PR). This issue (issue15767) has long been closed and any discussion here is likely to not be acted on. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 08:25:35 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 27 Feb 2018 13:25:35 +0000 Subject: [issue17288] cannot jump from a 'return' or 'exception' trace event In-Reply-To: <1361726813.15.0.719765769531.issue17288@psf.upfronthosting.co.za> Message-ID: <1519737935.68.0.467229070634.issue17288@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Are there any problems with rebasing it to master? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 08:48:13 2018 From: report at bugs.python.org (Christoph Groth) Date: Tue, 27 Feb 2018 13:48:13 +0000 Subject: [issue15767] add ModuleNotFoundError In-Reply-To: <1345664718.23.0.712313947558.issue15767@psf.upfronthosting.co.za> Message-ID: <1519739293.04.0.467229070634.issue15767@psf.upfronthosting.co.za> Christoph Groth added the comment: Unfortunately I do not feel competent enough to submit a documentation patch because I still do not understand why ModuleNotFoundError was added. I don't want to bother you further with this. Thank you all for your prompt replies. If you agree with me that there is indeed an issue, please open it yourself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 09:09:12 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Tue, 27 Feb 2018 14:09:12 +0000 Subject: [issue17288] cannot jump from a 'return' or 'exception' trace event In-Reply-To: <1361726813.15.0.719765769531.issue17288@psf.upfronthosting.co.za> Message-ID: <1519740552.64.0.467229070634.issue17288@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Yes, rebase fails merging two changes in Objects/frameobject.c. I can write another PR for master if you want. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 09:21:03 2018 From: report at bugs.python.org (Eric Snow) Date: Tue, 27 Feb 2018 14:21:03 +0000 Subject: [issue32604] Expose the subinterpreters C-API in Python for testing use. In-Reply-To: <1516413482.13.0.467229070634.issue32604@psf.upfronthosting.co.za> Message-ID: <1519741263.95.0.467229070634.issue32604@psf.upfronthosting.co.za> Eric Snow added the comment: Sounds good, Ned. Sorry for my confusion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 09:27:31 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 27 Feb 2018 14:27:31 +0000 Subject: [issue32493] UUID Module - FreeBSD build failure In-Reply-To: <1515092270.67.0.467229070634.issue32493@psf.upfronthosting.co.za> Message-ID: <1519741651.35.0.467229070634.issue32493@psf.upfronthosting.co.za> Ned Deily added the comment: We are still seeing the 3.7 and 3.8 FreeBSD buildbot failures Victor identified in msg310147. Can someone please take this on and produce a PR? ---------- nosy: +ned.deily priority: normal -> deferred blocker versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 09:54:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 27 Feb 2018 14:54:31 +0000 Subject: [issue17288] cannot jump from a 'return' or 'exception' trace event In-Reply-To: <1361726813.15.0.719765769531.issue17288@psf.upfronthosting.co.za> Message-ID: <1519743271.38.0.467229070634.issue17288@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Usually we create a PR for master (unless the issue is gone here) and backport it to other branches. In this case it may be better to start from 3.7, but it is worth to look at the patch against master for the case if the change can written in the form that minimizes difference between 3.7 and master. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 09:58:26 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 27 Feb 2018 14:58:26 +0000 Subject: [issue31106] os.posix_fallocate() generate exception with errno 0 In-Reply-To: <1501686186.83.0.555586832167.issue31106@psf.upfronthosting.co.za> Message-ID: <1519743506.41.0.467229070634.issue31106@psf.upfronthosting.co.za> Ned Deily added the comment: I agree with Alexey's analysis. Koobs, could you please open a new issue about the failing test? Unless someone knows of a foolproof way to determine on all platforms that a file is resident on ZFS, the fix is to skip the test on FreeBSD as well if ZFS is likely to be used there. Also, can someone add a NEWS entry and close this issue? ---------- nosy: +ned.deily priority: normal -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 10:10:36 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 27 Feb 2018 15:10:36 +0000 Subject: [issue32517] test_read_pty_output() of test_asyncio hangs on macOS 10.13.2 (darwin 17.3.0) In-Reply-To: <1515366218.51.0.467229070634.issue32517@psf.upfronthosting.co.za> Message-ID: <1519744236.03.0.467229070634.issue32517@psf.upfronthosting.co.za> Ned Deily added the comment: Since this is still happening on current macOS 10.13.3, we should get a fix for this in before 3.6.5rc1. PR's welcome! ---------- priority: normal -> release blocker stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 11:46:08 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Tue, 27 Feb 2018 16:46:08 +0000 Subject: [issue17288] cannot jump from a 'return' or 'exception' trace event In-Reply-To: <1361726813.15.0.719765769531.issue17288@psf.upfronthosting.co.za> Message-ID: <1519749968.91.0.467229070634.issue17288@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Actually $ git rebase --onto master 3.7 bpo-17288 fails with one single change in Objects/frameobject.c and one simply needs to (as I have tested it) remove all the three confict markers in this file and remove the following two lines that were enclosed by these markers: min_addr = Py_MIN(new_lasti, f->f_lasti); max_addr = Py_MAX(new_lasti, f->f_lasti); then run: $ git add Objects/frameobject.c $ git rebase --continue $ git co master; git merge bpo-17288 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 04:02:47 2018 From: report at bugs.python.org (Iryna Shcherbina) Date: Tue, 27 Feb 2018 09:02:47 +0000 Subject: [issue32962] test_gdb fails in debug build with `-mcet -fcf-protection -O0` Message-ID: <1519722167.1.0.467229070634.issue32962@psf.upfronthosting.co.za> New submission from Iryna Shcherbina : test_gdb fails on Fedora 28. This happens only in debug build, and only if built with control flow protection flags: `-mcet -fcf-protection` AND optimization `-O0`. Reproduction steps on Fedora 28 (x86_64): ./configure --with-pydebug make 'EXTRA_CFLAGS=-mcet -fcf-protection -O0' make test TESTOPTS='-v test_gdb' Actual result: Re-running test 'test_gdb' in verbose mode GDB version 8.1: GNU gdb (GDB) Fedora 8.1-8.fc28 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-redhat-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". test_NULL_ob_type (test.test_gdb.PrettyPrintTests) Ensure that a PyObject* with NULL ob_type is handled gracefully ... ok test_NULL_ptr (test.test_gdb.PrettyPrintTests) Ensure that a NULL PyObject* is handled gracefully ... ok test_builtin_method (test.test_gdb.PrettyPrintTests) ... FAIL test_builtins_help (test.test_gdb.PrettyPrintTests) Ensure that the new-style class _Helper in site.py can be handled ... FAIL test_bytes (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of bytes ... FAIL test_corrupt_ob_type (test.test_gdb.PrettyPrintTests) Ensure that a PyObject* with a corrupt ob_type is handled gracefully ... ok test_corrupt_tp_flags (test.test_gdb.PrettyPrintTests) Ensure that a PyObject* with a type with corrupt tp_flags is handled ... ok test_corrupt_tp_name (test.test_gdb.PrettyPrintTests) Ensure that a PyObject* with a type with corrupt tp_name is handled ... ok test_dicts (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of dictionaries ... FAIL test_exceptions (test.test_gdb.PrettyPrintTests) ... FAIL test_frames (test.test_gdb.PrettyPrintTests) ... FAIL test_frozensets (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of frozensets ... FAIL test_getting_backtrace (test.test_gdb.PrettyPrintTests) ... ok test_int (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of various int values ... FAIL test_lists (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of lists ... FAIL test_modern_class (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of new-style class instances ... FAIL test_selfreferential_dict (test.test_gdb.PrettyPrintTests) Ensure that a reference loop involving a dict doesn't lead proxyval ... FAIL test_selfreferential_list (test.test_gdb.PrettyPrintTests) Ensure that a reference loop involving a list doesn't lead proxyval ... FAIL test_selfreferential_new_style_instance (test.test_gdb.PrettyPrintTests) ... FAIL test_selfreferential_old_style_instance (test.test_gdb.PrettyPrintTests) ... FAIL test_sets (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of sets ... FAIL test_singletons (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of True, False and None ... FAIL test_strings (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of unicode strings ... FAIL test_subclassing_list (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of an instance of a list subclass ... FAIL test_subclassing_tuple (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of an instance of a tuple subclass ... FAIL test_truncation (test.test_gdb.PrettyPrintTests) Verify that very long output is truncated ... FAIL test_tuples (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of tuples ... FAIL test_basic_command (test.test_gdb.PyListTests) Verify that the "py-list" command works ... FAIL test_one_abs_arg (test.test_gdb.PyListTests) Verify the "py-list" command with one absolute argument ... FAIL test_two_abs_args (test.test_gdb.PyListTests) Verify the "py-list" command with two absolute arguments ... FAIL test_down_at_bottom (test.test_gdb.StackNavigationTests) Verify handling of "py-down" at the bottom of the stack ... FAIL test_pyup_command (test.test_gdb.StackNavigationTests) Verify that the "py-up" command works ... FAIL test_up_at_top (test.test_gdb.StackNavigationTests) Verify handling of "py-up" at the top of the stack ... FAIL test_up_then_down (test.test_gdb.StackNavigationTests) Verify "py-up" followed by "py-down" ... FAIL test_bt (test.test_gdb.PyBtTests) Verify that the "py-bt" command works ... FAIL test_bt_full (test.test_gdb.PyBtTests) Verify that the "py-bt-full" command works ... FAIL test_gc (test.test_gdb.PyBtTests) Verify that "py-bt" indicates if a thread is garbage-collecting ... ok test_pycfunction (test.test_gdb.PyBtTests) Verify that "py-bt" displays invocations of PyCFunction instances ... ok test_threads (test.test_gdb.PyBtTests) Verify that "py-bt" indicates threads that are waiting for the GIL ... ok test_wrapper_call (test.test_gdb.PyBtTests) ... FAIL test_basic_command (test.test_gdb.PyPrintTests) Verify that the "py-print" command works ... FAIL test_print_after_up (test.test_gdb.PyPrintTests) ... FAIL test_printing_builtin (test.test_gdb.PyPrintTests) ... FAIL test_printing_global (test.test_gdb.PyPrintTests) ... FAIL test_basic_command (test.test_gdb.PyLocalsTests) ... FAIL test_locals_after_up (test.test_gdb.PyLocalsTests) ... FAIL ====================================================================== FAIL: test_builtin_method (test.test_gdb.PrettyPrintTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 617, in test_builtin_method (gdb_repr, gdb_output)) AssertionError: None is not true : Unexpected gdb representation: '' Breakpoint 1 (builtin_id) pending. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Breakpoint 1, builtin_id (self=, v=) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 1120 { #0 builtin_id (self=, v=) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 ====================================================================== FAIL: test_builtins_help (test.test_gdb.PrettyPrintTests) Ensure that the new-style class _Helper in site.py can be handled ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 523, in test_builtins_help msg='Unexpected rendering %r' % gdb_repr) AssertionError: None is not true : Unexpected rendering '' ====================================================================== FAIL: test_bytes (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of bytes ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 307, in test_bytes self.assertGdbRepr(b'') File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 277, in assertGdbRepr % (gdb_repr, exp_repr, gdb_output))) AssertionError: "" != "b''" - , decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8> + b'' : ", decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8>" did not equal expected "b''"; full output was: Breakpoint 1 (builtin_id) pending. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Breakpoint 1, builtin_id (self=, v=, decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 1120 { #0 builtin_id (self=, v=, decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 ====================================================================== FAIL: test_dicts (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of dictionaries ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 295, in test_dicts self.assertGdbRepr({}) File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 277, in assertGdbRepr % (gdb_repr, exp_repr, gdb_output))) AssertionError: "" != '{}' - , decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8> + {} : ", decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8>" did not equal expected '{}'; full output was: Breakpoint 1 (builtin_id) pending. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Breakpoint 1, builtin_id (self=, v=, decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 1120 { #0 builtin_id (self=, v=, decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 ====================================================================== FAIL: test_exceptions (test.test_gdb.PrettyPrintTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 393, in test_exceptions ''') File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 241, in get_gdb_repr import_site=import_site) File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ["Python Exception 'utf-8' codec can't decode byte 0xb0 in position 0: invalid start byte: " + [] - ["Python Exception 'utf-8' codec can't decode " - 'byte 0xb0 in position 0: invalid start byte: ', - "Python Exception 'utf-8' codec can't decode " - 'byte 0xb0 in position 0: invalid start byte: '] ====================================================================== FAIL: test_frames (test.test_gdb.PrettyPrintTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 627, in test_frames cmds_after_breakpoint=['print (PyFrameObject*)(((PyCodeObject*)v)->co_zombieframe)'] File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ['Cannot access memory at address 0x90'] != [] First list contains 1 additional elements. First extra element 0: 'Cannot access memory at address 0x90' - ['Cannot access memory at address 0x90'] + [] ====================================================================== FAIL: test_frozensets (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of frozensets ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 379, in test_frozensets self.assertGdbRepr(frozenset(), "frozenset()") File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 277, in assertGdbRepr % (gdb_repr, exp_repr, gdb_output))) AssertionError: '()' != 'frozenset()' - () + frozenset() : '()' did not equal expected 'frozenset()'; full output was: Breakpoint 1 (builtin_id) pending. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Breakpoint 1, builtin_id (self=, v=()) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 1120 { #0 builtin_id (self=, v=()) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 ====================================================================== FAIL: test_int (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of various int values ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 281, in test_int self.assertGdbRepr(42) File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 277, in assertGdbRepr % (gdb_repr, exp_repr, gdb_output))) AssertionError: "" != '42' - , decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8> + 42 : ", decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8>" did not equal expected '42'; full output was: Breakpoint 1 (builtin_id) pending. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Breakpoint 1, builtin_id (self=, v=, decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 1120 { #0 builtin_id (self=, v=, decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 ====================================================================== FAIL: test_lists (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of lists ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 302, in test_lists self.assertGdbRepr([]) File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 277, in assertGdbRepr % (gdb_repr, exp_repr, gdb_output))) AssertionError: "" != '[]' - , decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8> + [] : ", decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8>" did not equal expected '[]'; full output was: Breakpoint 1 (builtin_id) pending. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Breakpoint 1, builtin_id (self=, v=, decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 1120 { #0 builtin_id (self=, v=, decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 ====================================================================== FAIL: test_modern_class (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of new-style class instances ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 418, in test_modern_class msg='Unexpected new-style class rendering %r' % gdb_repr) AssertionError: None is not true : Unexpected new-style class rendering '' ====================================================================== FAIL: test_selfreferential_dict (test.test_gdb.PrettyPrintTests) Ensure that a reference loop involving a dict doesn't lead proxyval ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 542, in test_selfreferential_dict self.assertEqual(gdb_repr, "{'foo': {'bar': {...}}}") AssertionError: "" != "{'foo': {'bar': {...}}}" - , decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8> + {'foo': {'bar': {...}}} ====================================================================== FAIL: test_selfreferential_list (test.test_gdb.PrettyPrintTests) Ensure that a reference loop involving a list doesn't lead proxyval ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 530, in test_selfreferential_list self.assertEqual(gdb_repr, '[3, 4, 5, [...]]') AssertionError: '' != '[3, 4, 5, [...]]' - + [3, 4, 5, [...]] ====================================================================== FAIL: test_selfreferential_new_style_instance (test.test_gdb.PrettyPrintTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 568, in test_selfreferential_new_style_instance (gdb_repr, gdb_output)) AssertionError: None is not true : Unexpected gdb representation: '' Breakpoint 1 (builtin_id) pending. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Breakpoint 1, builtin_id (self=, v=) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 1120 { #0 builtin_id (self=, v=) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 ====================================================================== FAIL: test_selfreferential_old_style_instance (test.test_gdb.PrettyPrintTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 555, in test_selfreferential_old_style_instance (gdb_repr, gdb_output)) AssertionError: None is not true : Unexpected gdb representation: '' Breakpoint 1 (builtin_id) pending. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Breakpoint 1, builtin_id (self=, v=) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 1120 { #0 builtin_id (self=, v=) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 ====================================================================== FAIL: test_sets (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of sets ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 361, in test_sets self.assertGdbRepr(set(), "set()") File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 277, in assertGdbRepr % (gdb_repr, exp_repr, gdb_output))) AssertionError: '()' != 'set()' - () + set() : '()' did not equal expected 'set()'; full output was: Breakpoint 1 (builtin_id) pending. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Breakpoint 1, builtin_id (self=, v=()) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 1120 { #0 builtin_id (self=, v=()) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 ====================================================================== FAIL: test_singletons (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of True, False and None ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 289, in test_singletons self.assertGdbRepr(True) File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 277, in assertGdbRepr % (gdb_repr, exp_repr, gdb_output))) AssertionError: "" != 'True' - , decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8> + True : ", decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8>" did not equal expected 'True'; full output was: Breakpoint 1 (builtin_id) pending. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Breakpoint 1, builtin_id (self=, v=, decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 1120 { #0 builtin_id (self=, v=, decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 ====================================================================== FAIL: test_strings (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of unicode strings ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 331, in test_strings self.assertGdbRepr('') File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 277, in assertGdbRepr % (gdb_repr, exp_repr, gdb_output))) AssertionError: "" != "''" - , decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8> + '' : ", decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8>" did not equal expected "''"; full output was: Breakpoint 1 (builtin_id) pending. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Breakpoint 1, builtin_id (self=, v=, decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 1120 { #0 builtin_id (self=, v=, decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 ====================================================================== FAIL: test_subclassing_list (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of an instance of a list subclass ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 432, in test_subclassing_list msg='Unexpected new-style class rendering %r' % gdb_repr) AssertionError: None is not true : Unexpected new-style class rendering '' ====================================================================== FAIL: test_subclassing_tuple (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of an instance of a tuple subclass ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 447, in test_subclassing_tuple msg='Unexpected new-style class rendering %r' % gdb_repr) AssertionError: None is not true : Unexpected new-style class rendering '' ====================================================================== FAIL: test_truncation (test.test_gdb.PrettyPrintTests) Verify that very long output is truncated ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 588, in test_truncation "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, " AssertionError: '' != '[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12[993 chars]ted)' Diff is 1079 characters long. Set self.maxDiff to None to see it. ====================================================================== FAIL: test_tuples (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of tuples ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 353, in test_tuples self.assertGdbRepr(tuple(), '()') File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 277, in assertGdbRepr % (gdb_repr, exp_repr, gdb_output))) AssertionError: "" != '()' - , decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8> + () : ", decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8>" did not equal expected '()'; full output was: Breakpoint 1 (builtin_id) pending. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Breakpoint 1, builtin_id (self=, v=, decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 1120 { #0 builtin_id (self=, v=, decode=, incrementalencoder=, incrementaldecoder=, streamwriter=, streamreader=) at remote 0x7ffff7e7e3b8>) at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120 ====================================================================== FAIL: test_basic_command (test.test_gdb.PyListTests) Verify that the "py-list" command works ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 643, in test_basic_command cmds_after_breakpoint=['py-list']) File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ["Python Exception 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: " + [] - ["Python Exception 'utf-8' codec can't decode " - 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== FAIL: test_one_abs_arg (test.test_gdb.PyListTests) Verify the "py-list" command with one absolute argument ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 658, in test_one_abs_arg cmds_after_breakpoint=['py-list 9']) File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ["Python Exception 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: " + [] - ["Python Exception 'utf-8' codec can't decode " - 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== FAIL: test_two_abs_args (test.test_gdb.PyListTests) Verify the "py-list" command with two absolute arguments ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 669, in test_two_abs_args cmds_after_breakpoint=['py-list 1,3']) File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ["Python Exception 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: " + [] - ["Python Exception 'utf-8' codec can't decode " - 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== FAIL: test_down_at_bottom (test.test_gdb.StackNavigationTests) Verify handling of "py-down" at the bottom of the stack ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 694, in test_down_at_bottom cmds_after_breakpoint=['py-down']) File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ["Python Exception 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: " + [] - ["Python Exception 'utf-8' codec can't decode " - 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== FAIL: test_pyup_command (test.test_gdb.StackNavigationTests) Verify that the "py-up" command works ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 683, in test_pyup_command cmds_after_breakpoint=['py-up', 'py-up']) File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ["Python Exception 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: " + [] - ["Python Exception 'utf-8' codec can't decode " - 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== FAIL: test_up_at_top (test.test_gdb.StackNavigationTests) Verify handling of "py-up" at the top of the stack ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 702, in test_up_at_top cmds_after_breakpoint=['py-up'] * 5) File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ["Python Exception 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: " + [] - ["Python Exception 'utf-8' codec can't decode " - 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== FAIL: test_up_then_down (test.test_gdb.StackNavigationTests) Verify "py-up" followed by "py-down" ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 712, in test_up_then_down cmds_after_breakpoint=['py-up', 'py-up', 'py-down']) File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ["Python Exception 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: " + [] - ["Python Exception 'utf-8' codec can't decode " - 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== FAIL: test_bt (test.test_gdb.PyBtTests) Verify that the "py-bt" command works ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 727, in test_bt cmds_after_breakpoint=['py-bt']) File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ["Python Exception 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: " + [] - ["Python Exception 'utf-8' codec can't decode " - 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== FAIL: test_bt_full (test.test_gdb.PyBtTests) Verify that the "py-bt-full" command works ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 747, in test_bt_full cmds_after_breakpoint=['py-bt-full']) File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ["Python Exception 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: " + [] - ["Python Exception 'utf-8' codec can't decode " - 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== FAIL: test_wrapper_call (test.test_gdb.PyBtTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 866, in test_wrapper_call r") at /builddir/build/BUILD/Python-3.6.4/Python/bltinmodule.c:1120\n1120\t{\nBreakpoint 2: file /builddir/build/BUILD/Python-3.6.4/Objects/descrobject.c, line 1166.\n\nBreakpoint 2, wrapper_call (wp=, args=0x0, kwds=) at /builddir/build/BUILD/Python-3.6.4/Objects/descrobject.c:1166\n1166\t{\nTraceback (most recent call first):\n \n File "", line 4, in __init__\n File "", line 7, in \n' ====================================================================== FAIL: test_basic_command (test.test_gdb.PyPrintTests) Verify that the "py-print" command works ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 875, in test_basic_command cmds_after_breakpoint=['py-up', 'py-print args']) File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ["Python Exception 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: " + [] - ["Python Exception 'utf-8' codec can't decode " - 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== FAIL: test_print_after_up (test.test_gdb.PyPrintTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 884, in test_print_after_up cmds_after_breakpoint=['py-up', 'py-up', 'py-print c', 'py-print b', 'py-print a']) File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ["Python Exception 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: " + [] - ["Python Exception 'utf-8' codec can't decode " - 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== FAIL: test_printing_builtin (test.test_gdb.PyPrintTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 900, in test_printing_builtin cmds_after_breakpoint=['py-up', 'py-print len']) File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ["Python Exception 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: " + [] - ["Python Exception 'utf-8' codec can't decode " - 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== FAIL: test_printing_global (test.test_gdb.PyPrintTests)test test_gdb failed ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 892, in test_printing_global cmds_after_breakpoint=['py-up', 'py-print __name__']) File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ["Python Exception 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: " + [] - ["Python Exception 'utf-8' codec can't decode " - 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== FAIL: test_basic_command (test.test_gdb.PyLocalsTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 909, in test_basic_command cmds_after_breakpoint=['py-up', 'py-locals']) File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ["Python Exception 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: " + [] - ["Python Exception 'utf-8' codec can't decode " - 'byte 0xf3 in position 0: invalid continuation byte: '] ====================================================================== FAIL: test_locals_after_up (test.test_gdb.PyLocalsTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 918, in test_locals_after_up cmds_after_breakpoint=['py-up', 'py-up', 'py-locals']) File "/builddir/build/BUILD/Python-3.6.4/Lib/test/test_gdb.py", line 219, in get_stack_trace self.assertEqual(unexpected_errlines, []) AssertionError: Lists differ: ["Python Exception 'utf-8' codec can't decode byte 0xf3 in position 0: invalid continuation byte: " + [] - ["Python Exception 'utf-8' codec can't decode " - 'byte 0xf3 in position 0: invalid continuation byte: '] ---------------------------------------------------------------------- Ran 46 tests in 20.175s FAILED (failures=37) 1 test failed again: test_gdb Total duration: 29 min 42 sec Tests result: FAILURE Expected result: no failures Original bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1541967 ---------- components: Tests messages: 312985 nosy: cstratak, ishcherb priority: normal severity: normal status: open title: test_gdb fails in debug build with `-mcet -fcf-protection -O0` versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 13:56:35 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 27 Feb 2018 18:56:35 +0000 Subject: [issue27313] test case failures in test_widgets.ComboboxTest.of test_ttk_guionly on OS X with Cocoa Tk 8.5.18 In-Reply-To: <1465866380.0.0.570463827001.issue27313@psf.upfronthosting.co.za> Message-ID: <1519757795.07.0.467229070634.issue27313@psf.upfronthosting.co.za> Ned Deily added the comment: With a current Tk 8.6.8, test_virtual_event no longer fails (still does with 8.5.18) but test_identify still fails as it does with 8.5. ---------- versions: +Python 3.7, Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 14:34:03 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 27 Feb 2018 19:34:03 +0000 Subject: [issue29915] Drop Mac OS X Tiger support in Python 3.7? In-Reply-To: <1490606944.79.0.982783891513.issue29915@psf.upfronthosting.co.za> Message-ID: <1519760043.16.0.467229070634.issue29915@psf.upfronthosting.co.za> Ned Deily added the comment: Update: due to recent changes at github.com to no longer support older implementations of SSL/TLS, the git client on the macOS 10.4 Tiger buildbot server has stopped working. We had a brief discussion with David Bolen, the buildbot's owner, and decided it was no longer worth trying to upgrade git there just to keep those 10.4 buildbots running. That doesn't necessarily mean we are intentionally breaking 10.4 support in 3.7 (or other supported Python versions) but we will no longer be doing any CI testing via our buildbot farm and can't guarantee that it will continue to work. I will add a note somewhere about that in the 3.7 documentation prior to final release. https://mail.python.org/mm3/archives/list/buildbot-status at python.org/thread/5DXFBUROSMEDB3QTAZDATD64R3IRV2UG/ ---------- resolution: postponed -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 14:40:07 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 27 Feb 2018 19:40:07 +0000 Subject: [issue32964] Reuse a testing implementation of the path protocol in tests Message-ID: <1519760407.45.0.467229070634.issue32964@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : In a number of tests there are simple implementations of the path protocol. Unlike to pathlib.Path they implement only necessary minimum of methods. The proposed PR moves this implementation into test.support. It also fixes some misuses of it. I have named it SimplePath. Are there better ideas? PathLike was rejected due to possible confusion with os.PathLike. ---------- components: Tests messages: 313018 nosy: brett.cannon, ezio.melotti, serhiy.storchaka priority: normal severity: normal status: open title: Reuse a testing implementation of the path protocol in tests type: enhancement versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 14:41:33 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Feb 2018 19:41:33 +0000 Subject: [issue32403] date, time and datetime alternate constructors should take fast construction path In-Reply-To: <1513893074.5.0.213398074469.issue32403@psf.upfronthosting.co.za> Message-ID: <1519760493.19.0.467229070634.issue32403@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: New changeset 5bd04f964b4f1bcdbd0fa36de04f087c2db07cfe by Alexander Belopolsky (Paul Ganssle) in branch 'master': bpo-10381, bpo-32403: What's new entries for changes to datetime (gh-5814) https://github.com/python/cpython/commit/5bd04f964b4f1bcdbd0fa36de04f087c2db07cfe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 14:41:33 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Feb 2018 19:41:33 +0000 Subject: [issue10381] Add timezone support to datetime C API In-Reply-To: <1289415057.12.0.111170767809.issue10381@psf.upfronthosting.co.za> Message-ID: <1519760493.36.0.714561066657.issue10381@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: New changeset 5bd04f964b4f1bcdbd0fa36de04f087c2db07cfe by Alexander Belopolsky (Paul Ganssle) in branch 'master': bpo-10381, bpo-32403: What's new entries for changes to datetime (gh-5814) https://github.com/python/cpython/commit/5bd04f964b4f1bcdbd0fa36de04f087c2db07cfe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 14:41:42 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 27 Feb 2018 19:41:42 +0000 Subject: [issue10381] Add timezone support to datetime C API In-Reply-To: <1289415057.12.0.111170767809.issue10381@psf.upfronthosting.co.za> Message-ID: <1519760502.93.0.467229070634.issue10381@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5700 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 14:41:43 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 27 Feb 2018 19:41:43 +0000 Subject: [issue32403] date, time and datetime alternate constructors should take fast construction path In-Reply-To: <1513893074.5.0.213398074469.issue32403@psf.upfronthosting.co.za> Message-ID: <1519760503.07.0.574204596225.issue32403@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5701 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 14:42:16 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 27 Feb 2018 19:42:16 +0000 Subject: [issue32964] Reuse a testing implementation of the path protocol in tests In-Reply-To: <1519760407.45.0.467229070634.issue32964@psf.upfronthosting.co.za> Message-ID: <1519760536.09.0.467229070634.issue32964@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +5702 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 14:58:30 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Feb 2018 19:58:30 +0000 Subject: [issue32403] date, time and datetime alternate constructors should take fast construction path In-Reply-To: <1513893074.5.0.213398074469.issue32403@psf.upfronthosting.co.za> Message-ID: <1519761510.66.0.467229070634.issue32403@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: New changeset fff596f792a0752b0e571fa57809e5752aba6353 by Alexander Belopolsky (Miss Islington (bot)) in branch '3.7': bpo-10381, bpo-32403: What's new entries for changes to datetime (gh-5814) (gh-5929) https://github.com/python/cpython/commit/fff596f792a0752b0e571fa57809e5752aba6353 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 14:58:30 2018 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Feb 2018 19:58:30 +0000 Subject: [issue10381] Add timezone support to datetime C API In-Reply-To: <1289415057.12.0.111170767809.issue10381@psf.upfronthosting.co.za> Message-ID: <1519761510.74.0.714561066657.issue10381@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: New changeset fff596f792a0752b0e571fa57809e5752aba6353 by Alexander Belopolsky (Miss Islington (bot)) in branch '3.7': bpo-10381, bpo-32403: What's new entries for changes to datetime (gh-5814) (gh-5929) https://github.com/python/cpython/commit/fff596f792a0752b0e571fa57809e5752aba6353 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 15:40:39 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 27 Feb 2018 20:40:39 +0000 Subject: [issue31355] Remove Travis CI macOS job: rely on buildbots In-Reply-To: <1504653881.76.0.488933881504.issue31355@psf.upfronthosting.co.za> Message-ID: <1519764039.49.0.467229070634.issue31355@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset d7687eb4b66c9f675b112eff1169326a1766c111 by Antoine Pitrou in branch 'master': bpo-31355: Travis-CI: re-enable macOS job (#5858) https://github.com/python/cpython/commit/d7687eb4b66c9f675b112eff1169326a1766c111 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 15:40:55 2018 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 27 Feb 2018 20:40:55 +0000 Subject: [issue31355] Remove Travis CI macOS job: rely on buildbots In-Reply-To: <1504653881.76.0.488933881504.issue31355@psf.upfronthosting.co.za> Message-ID: <1519764055.61.0.467229070634.issue31355@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 15:48:25 2018 From: report at bugs.python.org (Dave Malcolm) Date: Tue, 27 Feb 2018 20:48:25 +0000 Subject: [issue9635] Add Py_BREAKPOINT and sys._breakpoint hooks In-Reply-To: <1519344969.67.0.467229070634.issue9635@psf.upfronthosting.co.za> Message-ID: <1519764501.2913.49.camel@redhat.com> Dave Malcolm added the comment: On Fri, 2018-02-23 at 00:16 +0000, Cheryl Sabella wrote: > Cheryl Sabella added the comment: > > Did PEP553 make this issue obsolete? I *think* they have slightly different scope: if I'm reading it right, PEP553 is about injecting a breakpoint into the Python debugger. This proposal was about injecting a lower-level breakpoint for debugging CPython itself (for e.g. gdb to handle). The idea was to make it easier to, say, step through a particular CPython construct at the C level by injecting a breakpoint right before it: def test_something(): # lots of setup sys.c_level_breakpoint() # whatever comes next so that sys.c_level_breakpoint drops you into, say, gdb, and from there you can step through the following Python code at the C level, without having to express stepping through all the setup at the C/gdb level. Hope that makes sense. That said, I'm full-time on gcc these days, and unlikely to pursue this from the CPython side. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 16:25:48 2018 From: report at bugs.python.org (Erik Johnson) Date: Tue, 27 Feb 2018 21:25:48 +0000 Subject: [issue32965] Passing a bool to io.open() should raise a TypeError, not read from stdin Message-ID: <1519766748.3.0.467229070634.issue32965@psf.upfronthosting.co.za> New submission from Erik Johnson : When you open a filehandle using either True or False as the file, the open succeeds. This has been reproduced using op/io.open on Python 3.6.4, 3.5.2, and 3.4.5, as well as with io.open() on Python 2.7.14. This can be easily demonstrated in the REPL: >>> f = open(False) >>> f.read(10) Lorem ipsum dolor sit amet 'Lorem ipsu' >>> f.read(10) 'm dolor si' >>> f.read(10) 't amet\n' >>> f.read(10) '' >>> f.close() >>> % After the first read, I pasted in enough to stdin to exceed 10 bytes, and hit Enter. After the 2nd and third reads I had to hit Ctrl-d to exit back to the REPL. And, as a fun bonus, closing the filehandle quits the REPL. This doesn't look like intended behavior. It doesn't make logical sense (why not just use sys.stdin if you want to read from stdin?), and isn't documented. This should either raise a TypeError, or the behavior should be documented. From the docs: file is a path-like object giving the pathname (absolute or relative to the current working directory) of the file to be opened or an integer file descriptor of the file to be wrapped. (If a file descriptor is given, it is closed when the returned I/O object is closed, unless closefd is set to False.) Moreover, when you pass other values that don't match the above description, a TypeError is raised: >>> open(123.456) Traceback (most recent call last): File "", line 1, in TypeError: integer argument expected, got float >>> open(None) Traceback (most recent call last): File "", line 1, in TypeError: expected str, bytes or os.PathLike object, not NoneType >>> open(['wtf', 'am', 'i', 'doing???']) Traceback (most recent call last): File "", line 1, in TypeError: expected str, bytes or os.PathLike object, not list So, one of str, bytes, and os.PathLike are expected, right? And yet... >>> isinstance(True, (str, bytes, os.PathLike)) False >>> isinstance(False, (str, bytes, os.PathLike)) False It should also be noted that when using the open() builtin on Python 2 instead of io.open(), you get a more logical result: >>> open(False) Traceback (most recent call last): File "", line 1, in TypeError: coercing to Unicode: need string or buffer, bool found ---------- messages: 313025 nosy: terminalmage priority: normal severity: normal status: open title: Passing a bool to io.open() should raise a TypeError, not read from stdin type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 16:27:01 2018 From: report at bugs.python.org (Erik Johnson) Date: Tue, 27 Feb 2018 21:27:01 +0000 Subject: [issue32965] Passing a bool to io.open() should raise a TypeError, not read from stdin In-Reply-To: <1519766748.3.0.467229070634.issue32965@psf.upfronthosting.co.za> Message-ID: <1519766821.67.0.467229070634.issue32965@psf.upfronthosting.co.za> Erik Johnson added the comment: Please excuse the typo on the 2nd line of the OP, it should say "open/io.open", not "op/io.open". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 16:33:46 2018 From: report at bugs.python.org (Scott) Date: Tue, 27 Feb 2018 21:33:46 +0000 Subject: [issue32966] Python 3.6.4 - 0x80070643 - Fatal Error during installation Message-ID: <1519767226.7.0.467229070634.issue32966@psf.upfronthosting.co.za> New submission from Scott : Installing Python 3.6.4, Windows 10 64bit, exits installer and dumps the following error code to log. [18B8:4394][2018-02-27T15:41:06]i399: Apply complete, result: 0x80070643, restart: None, ba requested restart: No 0x80070643 - Fatal Error during installation Attempted Command line installation as Administrator, installation standard methods as Administrator ---------- components: Installation files: Python 3.6.4 (64-bit)_20180227154057.log messages: 313027 nosy: exceltw priority: normal severity: normal status: open title: Python 3.6.4 - 0x80070643 - Fatal Error during installation type: crash versions: Python 3.6 Added file: https://bugs.python.org/file47464/Python 3.6.4 (64-bit)_20180227154057.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 16:34:17 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 27 Feb 2018 21:34:17 +0000 Subject: [issue32966] Python 3.6.4 - 0x80070643 - Fatal Error during installation In-Reply-To: <1519767226.7.0.467229070634.issue32966@psf.upfronthosting.co.za> Message-ID: <1519767257.24.0.467229070634.issue32966@psf.upfronthosting.co.za> Change by Ned Deily : ---------- components: +Windows -Installation nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 16:34:27 2018 From: report at bugs.python.org (Erik Johnson) Date: Tue, 27 Feb 2018 21:34:27 +0000 Subject: [issue32965] Passing a bool to io.open() should raise a TypeError, not read from stdin In-Reply-To: <1519766748.3.0.467229070634.issue32965@psf.upfronthosting.co.za> Message-ID: <1519767267.48.0.467229070634.issue32965@psf.upfronthosting.co.za> Erik Johnson added the comment: Also, it's the 3rd and 4th reads that I had to hit ctrl-d to get back to the REPL, as you can see in the example the first two read just fine from that initial block of text I had pasted in. This is what I get for not properly proofreading before I file an issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 16:42:23 2018 From: report at bugs.python.org (Brett Cannon) Date: Tue, 27 Feb 2018 21:42:23 +0000 Subject: [issue32959] zipimport fails when the ZIP archive contains more than 65535 files In-Reply-To: <1519679331.45.0.467229070634.issue32959@psf.upfronthosting.co.za> Message-ID: <1519767743.84.0.467229070634.issue32959@psf.upfronthosting.co.za> Change by Brett Cannon : ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 17:02:00 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 27 Feb 2018 22:02:00 +0000 Subject: [issue32965] Passing a bool to io.open() should raise a TypeError, not read from stdin In-Reply-To: <1519766748.3.0.467229070634.issue32965@psf.upfronthosting.co.za> Message-ID: <1519768920.2.0.467229070634.issue32965@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for your report. Alas, this is expected behavior. As documented, the Boolean values False and True behave like the integers 0 and 1; this behavior dates back to the earliest days of Python. So when you pass False to open, you are passing the integer 0 and file number 0 is sys.stdin. https://docs.python.org/3/library/stdtypes.html#boolean-values ---------- nosy: +ned.deily resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 17:38:22 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 27 Feb 2018 22:38:22 +0000 Subject: [issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8 In-Reply-To: <1519248415.02.0.467229070634.issue32901@psf.upfronthosting.co.za> Message-ID: <1519771102.01.0.467229070634.issue32901@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 9189e95d9c6691de18783b2e9213ec2dc18fd0c5 by Ned Deily in branch 'master': bpo-32901: update macOS 10.9+ installer to Tcl/Tk 8.6.8 https://github.com/python/cpython/commit/9189e95d9c6691de18783b2e9213ec2dc18fd0c5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 17:45:20 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 27 Feb 2018 22:45:20 +0000 Subject: [issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8 In-Reply-To: <1519248415.02.0.467229070634.issue32901@psf.upfronthosting.co.za> Message-ID: <1519771520.61.0.467229070634.issue32901@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset a7edca7122cb952874e74d64d693c5b938c758cb by Ned Deily in branch '3.7': bpo-32901: update macOS 10.9+ installer to Tcl/Tk 8.6.8 https://github.com/python/cpython/commit/a7edca7122cb952874e74d64d693c5b938c758cb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 17:53:23 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 27 Feb 2018 22:53:23 +0000 Subject: [issue32901] Update 3.7 and 3.8 Windows and macOS installer builds to tcl/tk 8.6.8 In-Reply-To: <1519248415.02.0.467229070634.issue32901@psf.upfronthosting.co.za> Message-ID: <1519772003.14.0.467229070634.issue32901@psf.upfronthosting.co.za> Ned Deily added the comment: Terry: > Is "this will only be useful on Windows," in the source-deps readme still true? It appears that the tcl/tk tar.gz source is meant for Mac also. The macOS installer builds do not use the cpython-source-deps repo. ---------- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 18:03:49 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 27 Feb 2018 23:03:49 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1519772629.93.0.467229070634.issue31961@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset be50a7b627d0aa37e08fa8e2d5568891f19903ce by Ned Deily (Serhiy Storchaka) in branch 'master': Revert "bpo-31961: subprocess now accepts path-like args (GH-4329)" (#5912) https://github.com/python/cpython/commit/be50a7b627d0aa37e08fa8e2d5568891f19903ce ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 18:04:14 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 27 Feb 2018 23:04:14 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1519772654.18.0.467229070634.issue31961@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5703 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 18:08:36 2018 From: report at bugs.python.org (Neeraj Badlani) Date: Tue, 27 Feb 2018 23:08:36 +0000 Subject: [issue32967] make check in devguide failing Message-ID: <1519772916.66.0.467229070634.issue32967@psf.upfronthosting.co.za> Change by Neeraj Badlani : ---------- assignee: docs at python components: Documentation nosy: docs at python, neerajbadlani priority: normal severity: normal status: open title: make check in devguide failing versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 18:19:33 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 27 Feb 2018 23:19:33 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1519773573.9.0.467229070634.issue30928@psf.upfronthosting.co.za> Change by Terry J. Reedy : ---------- pull_requests: +5704 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 18:20:32 2018 From: report at bugs.python.org (Alexey Izbyshev) Date: Tue, 27 Feb 2018 23:20:32 +0000 Subject: [issue31512] Add non-elevated symlink support for dev mode Windows 10 In-Reply-To: <1505762190.77.0.84923243723.issue31512@psf.upfronthosting.co.za> Message-ID: <1519773632.73.0.467229070634.issue31512@psf.upfronthosting.co.za> Change by Alexey Izbyshev : ---------- nosy: +izbyshev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 18:27:27 2018 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 27 Feb 2018 23:27:27 +0000 Subject: [issue32967] make check in devguide failing Message-ID: <1519774047.18.0.467229070634.issue32967@psf.upfronthosting.co.za> New submission from Mariatta Wijaya : Thanks. Can you open the issue in github.com/python/devguide? ---------- nosy: +Mariatta resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 18:30:36 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 27 Feb 2018 23:30:36 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1519774236.41.0.467229070634.issue31961@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset b7dcae358e9d5a3ac9dafec9f6b64e9a66843ad8 by Ned Deily (Miss Islington (bot)) in branch '3.7': Revert "bpo-31961: subprocess now accepts path-like args (GH-4329)" (GH-5912) (GH-5931) https://github.com/python/cpython/commit/b7dcae358e9d5a3ac9dafec9f6b64e9a66843ad8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 18:33:21 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 27 Feb 2018 23:33:21 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0 In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1519774401.42.0.467229070634.issue30928@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I plan to start a new issue for 3.8.0 when 3.7.0rc1 is released and 'What's new in 3.8.0 (since 3.7.0)' is added to master. IDLE PRs after rc1 that are not an emergency fix will go into 3.7.1 ---------- title: Copy modified blurbs to idlelib/NEWS.txt -> Copy modified blurbs to idlelib/NEWS.txt for 3.7.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 18:36:24 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 27 Feb 2018 23:36:24 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0 In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1519774584.09.0.467229070634.issue30928@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 0954c9e9c8fbea452f56120df592f2061d3209c7 by Terry Jan Reedy in branch 'master': bpo-30928: Update idlelib/NEWS.txt, possibly for 3.7.0b2 (GH-5932) https://github.com/python/cpython/commit/0954c9e9c8fbea452f56120df592f2061d3209c7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 18:36:37 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 27 Feb 2018 23:36:37 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0 In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1519774597.08.0.467229070634.issue30928@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5705 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 18:37:32 2018 From: report at bugs.python.org (miss-islington) Date: Tue, 27 Feb 2018 23:37:32 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0 In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1519774652.52.0.467229070634.issue30928@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5706 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 18:38:27 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 27 Feb 2018 23:38:27 +0000 Subject: [issue31961] subprocess._execute_child doesn't accept a single PathLike argument for args In-Reply-To: <1509989245.86.0.213398074469.issue31961@psf.upfronthosting.co.za> Message-ID: <1519774707.48.0.467229070634.issue31961@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for everyone's input and thanks for the PRs! Since there are still outstanding review comments, I decided to revert this from both master and 3.7 for 3.7.0b2. I would suggest getting a polished version stabilized in master for 3.8.0. We could then discuss the possibility of a 3.7 backport. ---------- priority: deferred blocker -> versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 18:46:55 2018 From: report at bugs.python.org (Ned Deily) Date: Tue, 27 Feb 2018 23:46:55 +0000 Subject: [issue32706] test_check_hostname() of test_ftplib started to fail randomly In-Reply-To: <1517225256.94.0.467229070634.issue32706@psf.upfronthosting.co.za> Message-ID: <1519775215.04.0.467229070634.issue32706@psf.upfronthosting.co.za> Ned Deily added the comment: Let's get the changes into master first and stabilized there and then we can discuss the possibility of a 3.7 backport. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 18:58:15 2018 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 27 Feb 2018 23:58:15 +0000 Subject: [issue18387] Add 'symbols' link to pydoc's html menu bar. In-Reply-To: <1373131695.63.0.960870867634.issue18387@psf.upfronthosting.co.za> Message-ID: <1519775895.92.0.467229070634.issue18387@psf.upfronthosting.co.za> Cheryl Sabella added the comment: It looks like this patch was close to being approved. Ron, would you be able to open a Github pull request for your patch? Thanks! ---------- nosy: +csabella versions: +Python 3.8 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 19:07:51 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 28 Feb 2018 00:07:51 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0 In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1519776471.25.0.467229070634.issue30928@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 0ea49fc0bfa10205895f9fb78b4d6659b2946883 by Miss Islington (bot) in branch '3.7': bpo-30928: Update idlelib/NEWS.txt, possibly for 3.7.0b2 (GH-5932) https://github.com/python/cpython/commit/0ea49fc0bfa10205895f9fb78b4d6659b2946883 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 19:31:32 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 28 Feb 2018 00:31:32 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt for 3.7.0 In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1519777892.43.0.467229070634.issue30928@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 8c65360dd0c1ea5b5d2e60a0694daf3f9df8f56b by Miss Islington (bot) in branch '3.6': bpo-30928: Update idlelib/NEWS.txt, possibly for 3.7.0b2 (GH-5932) https://github.com/python/cpython/commit/8c65360dd0c1ea5b5d2e60a0694daf3f9df8f56b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 19:58:33 2018 From: report at bugs.python.org (bbayles) Date: Wed, 28 Feb 2018 00:58:33 +0000 Subject: [issue32959] zipimport fails when the ZIP archive contains more than 65535 files In-Reply-To: <1519679331.45.0.467229070634.issue32959@psf.upfronthosting.co.za> Message-ID: <1519779513.32.0.467229070634.issue32959@psf.upfronthosting.co.za> Change by bbayles : ---------- nosy: +bbayles _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 20:22:47 2018 From: report at bugs.python.org (Steve Dower) Date: Wed, 28 Feb 2018 01:22:47 +0000 Subject: [issue32966] Python 3.6.4 - 0x80070643 - Fatal Error during installation In-Reply-To: <1519767226.7.0.467229070634.issue32966@psf.upfronthosting.co.za> Message-ID: <1519780967.56.0.467229070634.issue32966@psf.upfronthosting.co.za> Steve Dower added the comment: Make sure all your Windows updates are installed, reboot if necessary, and try again. I believe this is the error that occurs when another installation is ongoing, and Windows Update is about the only tool likely to be installing something without telling you or us about it. It's a known and ongoing issue right now, but not something we can resolve from our installer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 20:30:34 2018 From: report at bugs.python.org (Thomas Wouters) Date: Wed, 28 Feb 2018 01:30:34 +0000 Subject: [issue32959] zipimport fails when the ZIP archive contains more than 65535 files In-Reply-To: <1519679331.45.0.467229070634.issue32959@psf.upfronthosting.co.za> Message-ID: <1519781434.9.0.467229070634.issue32959@psf.upfronthosting.co.za> Thomas Wouters added the comment: FWIW, yes, this is because zipimport doesn't support ZIP64, and doesn't even flag it as an error when the ZIP requires it. Instead it skips files; the ZIP64 format works by setting the fields that would overflow to the maximum value as a signal that the real value should be read from the ZIP64 records, which means it's still a valid non-64-bit ZIP file, just a truncated one. Adding ZIP64 support to zipimport is not trivial, and requires breaking some behaviour that's bad (not according to the ZIP spec) but actually covered by zipimport's tests: prepending arbitrary data to the ZIP file by just concatenating them together (rather than rewriting the ZIP archive's offsets). I don't think there's going to be an easy fix here, although I am working on open-sourcing a replacement zipimport that I wrote for work, which does support ZIP64 properly (and also fixes some other fundamental flaws in zipimport). I hope to have that done soon, and we can discuss replacing zipimport with that module in Python 3.8 or later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 22:10:51 2018 From: report at bugs.python.org (Elias Zamaria) Date: Wed, 28 Feb 2018 03:10:51 +0000 Subject: [issue32968] Fraction modulo infinity should behave consistently with other numbers Message-ID: <1519787451.54.0.467229070634.issue32968@psf.upfronthosting.co.za> New submission from Elias Zamaria : Usually, a positive finite number modulo infinity is itself. But modding a positive fraction by infinity produces nan: >>> from fractions import Fraction >>> from math import inf >>> 3 % inf 3.0 >>> 3.5 % inf 3.5 >>> Fraction('1/3') % inf nan Likewise, a positive number modulo negative infinity is usually negative infinity, a negative number modulo infinity is usually infinity, and a negative number modulo negative infinity is usually itself, unless the number doing the modding is a fraction, in which case it produces nan. I think fractions should behave like other numbers in cases like these. I don't think this comes up very often in practical situations, but it is inconsistent behavior that may surprise people. I looked at the fractions module. It seems like this can be fixed by putting the following lines at the top of the __mod__ method of the Fraction class: if b == math.inf: if a >= 0: return a else: return math.inf elif b == -math.inf: if a >= 0: return -math.inf else: return a If that is too verbose, it can also be fixed with these lines, although this is less understandable IMO: if math.isinf(b): return a if (a >= 0) == (b > 0) else math.copysign(math.inf, b) I noticed this in Python 3.6.4 on OS X 10.12.6. If anyone wants, I can come up with a patch with some tests. ---------- components: Interpreter Core messages: 313045 nosy: elias priority: normal severity: normal status: open title: Fraction modulo infinity should behave consistently with other numbers versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 23:24:26 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 28 Feb 2018 04:24:26 +0000 Subject: [issue32968] Fraction modulo infinity should behave consistently with other numbers In-Reply-To: <1519787451.54.0.467229070634.issue32968@psf.upfronthosting.co.za> Message-ID: <1519791866.81.0.467229070634.issue32968@psf.upfronthosting.co.za> Change by Ned Deily : ---------- nosy: +mark.dickinson, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 27 23:57:35 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 28 Feb 2018 04:57:35 +0000 Subject: [issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping In-Reply-To: <1519493920.19.0.467229070634.issue32940@psf.upfronthosting.co.za> Message-ID: <1519793855.55.0.467229070634.issue32940@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I settled on the following to compare ParseMap implementations. from idlelib.pyparse import Parser import timeit class ParseGet(dict): def __getitem__(self, key): return self.get(key, ord('x')) class ParseMis(dict): def __missing__(self, key): return ord('x') for P in (ParseGet, ParseMis): print(P.__name__, 'hit', 'miss') p = p=P({i:i for i in (10, 34, 35, 39, 40, 41, 91, 92, 93, 123, 125)}) print(timeit.timeit( "p[10],p[34],p[35],p[39],p[40],p[41],p[91],p[92],p[93],p[125]", number=100000, globals = globals())) print(timeit.timeit( "p[11],p[33],p[36],p[45],p[50],p[61],p[71],p[82],p[99],p[125]", number=100000, globals = globals())) ParseGet hit miss 1.104342376 1.112531999 ParseMis hit miss 0.3530207070000002 1.2165967760000003 ParseGet hit miss 1.185322191 1.1915449519999999 ParseMis hit miss 0.3477272720000002 1.317010653 Avoiding custom code for all ascii chars will be a win. I am sure that calling __missing__ for non-ascii will be at least as fast as it is presently. I will commit a revision tomorrow. I may then compare to Serhiy's sub/replace suggestion. My experiments with 'code.translate(tran)' indicate that time grows sub-linearly up to 1000 or 10000 chars. This suggests that there are significant constant or log-like terms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 00:43:27 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 28 Feb 2018 05:43:27 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.6 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <1519796607.08.0.467229070634.issue15663@psf.upfronthosting.co.za> Ned Deily added the comment: As of 3.7.0b1, the new macOS 10.9+ installer variant includes a private copy of Tcl/Tk 8.6: 8.6.7 for 3.7.0b1, updated to 8.6.8 for 3.7.0b2. The framework layout is pretty much the same as in the original attempt, that is, everything is installed within /Library/Frameworks/Python.framework. One big thing that has changed since the previous attempt: thanks to work by Matthew Brett et al, major Python packages that had C code referencing Tk (like matplotlib and Pillow) now discover Tcl and Tk symbols dynamically at run time rather than having to compile with a particular Tcl/Tk version's header files. That was the hangup previously because third-party apps had hardcoded paths to the Tcl/Tk header files on macOS. Hopefully, there aren't many of those left and, if so, they can borrow code from matplotlib (https://github.com/matplotlib/matplotlib/pull/6442). The legacy 10.6+ installer variants still link with Tcl/Tk 8.5.x from /Library/Frameworks/Tk.framework (a la ActiveTcl); ActiveState now only provides 8.6.x packages for macOS 10.9+ and Tk 8.6.x gets little exposure on older systems and depends more and more on features in newer macOS releases. ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 00:47:01 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 28 Feb 2018 05:47:01 +0000 Subject: [issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping In-Reply-To: <1519493920.19.0.467229070634.issue32940@psf.upfronthosting.co.za> Message-ID: <1519796821.97.0.467229070634.issue32940@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Don't use ord('x'). Use just 'x' or b'x'[0]. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 01:52:18 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 28 Feb 2018 06:52:18 +0000 Subject: [issue32864] Visual glitches when animating ScrolledText instances using place geometry manager In-Reply-To: <1518876342.16.0.467229070634.issue32864@psf.upfronthosting.co.za> Message-ID: <1519800738.62.0.467229070634.issue32864@psf.upfronthosting.co.za> Ned Deily added the comment: Victor, FYI, 3.7.0b2 has just been released and the macOS 10.9+ installer contains an updated version of Tcl/Tk (8.6.7 -> 8.6.8). According to the Tk change log, there were a number of macOS related fixes that went in to 8.6.8. Perhaps some of the glitches you were seeing have been fixed? If not, as Serhiy points out, it's best to report the issue to the Tk project especially if it can be easily reproduced without using Python with, like with the Tcl wish shell. Good luck! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 02:01:39 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 28 Feb 2018 07:01:39 +0000 Subject: [issue29480] Mac OSX Installer SSL Roots In-Reply-To: <1486553442.34.0.041490536597.issue29480@psf.upfronthosting.co.za> Message-ID: <1519801299.5.0.467229070634.issue29480@psf.upfronthosting.co.za> Ned Deily added the comment: Tommy, you should ask your question elsewhere, like on Stackoverflow or on the Python mailing list. It does not seem related to this issue at all or to indicate a problem with Python itself. (For the record, the Python Developer's Guide has some good tips on how to build Python for macOS and other platforms; see https://devguide.python.org/setup/#build-dependencies) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 02:03:34 2018 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 28 Feb 2018 07:03:34 +0000 Subject: [issue17288] cannot jump from a 'return' or 'exception' trace event In-Reply-To: <1361726813.15.0.719765769531.issue17288@psf.upfronthosting.co.za> Message-ID: <1519801414.32.0.467229070634.issue17288@psf.upfronthosting.co.za> Xavier de Gaye added the comment: xdegaye wrote: > An explanation should be given for the behavior of 3.7 and 3.8 in the jump.py case. In 3.7 when running jump.py as in msg183254, Python aborts with a frame stack overflow. The reason is that when the generator is resumed after the jump, its send() method is called with an argument and pushes the argument on the frame stack (i.e. f->f_stacktop - f->f_valuestack == 1 in gen_send_ex() before the call to PyEval_EvalFrameEx()). This argument is supposed to be popped by the first instruction executed by the generator which is expected to be YIELD_VALUE but, because of the jump, f->f_lasti is now 0 and the send() argument is not popped. Hence the stack overflow. When LLTRACE is undefined in ceval.c, stack oveflow checking is disabled. I have checked with gdb that, in that case, when YIELD_VALUE is about to be executed then STACK_LEVEL() is 3 instead of 1 and therefore YIELD_VALUE does not pop the right value from the stack. The stack is indeed corrupted. So there are two reasons for forbiddig to jump from a yield statement: * the ceval loop has exited and the jump is not allowing the user to jump to another line * after the jump, resuming a generator corrupts the frame stack ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 02:19:10 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 28 Feb 2018 07:19:10 +0000 Subject: [issue29480] Mac OSX Installer SSL Roots In-Reply-To: <1486553442.34.0.041490536597.issue29480@psf.upfronthosting.co.za> Message-ID: <1519802350.8.0.467229070634.issue29480@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for your suggestions. I agree that the Root Certificates and OpenSSL situation on macOS is still less than desirable. For 3.7.0b2, I have tried to make things more obvious in two ways. One, the installer package will now attempt to open a Finder window for the /Application/Python 3.7 folder that contains the "Install Certificates.command". Two, rather than just a generic "installation complete" message at the end of the install, there is now a tailored message that urges the user to click on the "Install Certificates.command" icon. I considered trying to run the command automatically from the installer but that gets a bit messy: 1. it requires a network connection; 2. the installer would need to ensure the installation takes place with the right user and group permission and not just as root; 3. the user might not want to use certifi; and 4. the solution needs to work across all macOS versions supported by the installer variant. Also, it appears the installer doesn't allow command files to be executed by clicking on a link in the installer window, a prudent security measure. While not perfect, I think what's now in 3.7.0b2 should be an improvement, at least it will be much harder to overlook without being too obnoxious about it. ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.8 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 03:59:00 2018 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 28 Feb 2018 08:59:00 +0000 Subject: [issue32969] Add more constants to zlib module Message-ID: <1519808340.69.0.467229070634.issue32969@psf.upfronthosting.co.za> New submission from Xiang Zhang : Inspired by https://github.com/python/cpython/pull/5511, zlib module in Python lacks some constants exposed by C zlib library, and some constants are not documented. ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 313053 nosy: docs at python, xiang.zhang priority: normal severity: normal status: open title: Add more constants to zlib module type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 05:40:07 2018 From: report at bugs.python.org (Victor Domingos) Date: Wed, 28 Feb 2018 10:40:07 +0000 Subject: [issue32864] Visual glitches when animating ScrolledText instances using place geometry manager In-Reply-To: <1518876342.16.0.467229070634.issue32864@psf.upfronthosting.co.za> Message-ID: <1519814407.45.0.467229070634.issue32864@psf.upfronthosting.co.za> Victor Domingos added the comment: The new beta (Python 3.7.0b2 with Tcl/tk 8.6.8) seems to have that issue solved. Nice! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 05:55:59 2018 From: report at bugs.python.org (Ma Lin) Date: Wed, 28 Feb 2018 10:55:59 +0000 Subject: [issue32818] multiprocessing segmentfault under Windows compatibility mode In-Reply-To: <1518323274.11.0.467229070634.issue32818@psf.upfronthosting.co.za> Message-ID: <1519815359.63.0.467229070634.issue32818@psf.upfronthosting.co.za> Ma Lin added the comment: 3.7.0 beta2 still segmentfault. Finer, please have a look. segmentfault conditions: 64bit Windows 10 (1709) + 32bit Python 3.7.0 Beta2 + Compatibility Mode enabled. (64bit Python doesn't segmentfault) ---------- nosy: +Segev Finer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 06:09:52 2018 From: report at bugs.python.org (Ma Lin) Date: Wed, 28 Feb 2018 11:09:52 +0000 Subject: [issue29456] bugs in unicodedata.normalize: u1176, u11a7 and u11c3 In-Reply-To: <1486355272.29.0.0894514518656.issue29456@psf.upfronthosting.co.za> Message-ID: <1519816192.09.0.467229070634.issue29456@psf.upfronthosting.co.za> Ma Lin added the comment: ping, this was forgotten. ---------- nosy: +Ma Lin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 06:32:44 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 28 Feb 2018 11:32:44 +0000 Subject: [issue13830] codecs error handler is called with a UnicodeDecodeError with the same args In-Reply-To: <1327002997.43.0.435824061039.issue13830@psf.upfronthosting.co.za> Message-ID: <1519817564.23.0.467229070634.issue13830@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 06:56:28 2018 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 28 Feb 2018 11:56:28 +0000 Subject: [issue31013] gcc7 throws warning when pymem.h development header is used In-Reply-To: <1500905736.49.0.103266302575.issue31013@psf.upfronthosting.co.za> Message-ID: <1519818988.61.0.467229070634.issue31013@psf.upfronthosting.co.za> Petr Viktorin added the comment: This is a duplicate of https://bugs.python.org/issue31474 which was fixed in https://github.com/python/cpython/pull/3581 It should be included in the next Python 2.7.x release. ---------- nosy: +encukou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 07:08:07 2018 From: report at bugs.python.org (Cyril Martin) Date: Wed, 28 Feb 2018 12:08:07 +0000 Subject: [issue32732] LoggingAdapter ignores extra kwargs of Logger#log() In-Reply-To: <1517423175.51.0.467229070634.issue32732@psf.upfronthosting.co.za> Message-ID: <1519819687.11.0.467229070634.issue32732@psf.upfronthosting.co.za> Cyril Martin added the comment: Hi St?phane, I ask you a question about the change you suggest. The PR has not progress. Do you wait something from me? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 08:24:10 2018 From: report at bugs.python.org (Berker Peksag) Date: Wed, 28 Feb 2018 13:24:10 +0000 Subject: [issue32732] LoggingAdapter ignores extra kwargs of Logger#log() In-Reply-To: <1517423175.51.0.467229070634.issue32732@psf.upfronthosting.co.za> Message-ID: <1519824250.08.0.467229070634.issue32732@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 11:12:20 2018 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 28 Feb 2018 16:12:20 +0000 Subject: [issue32968] Fraction modulo infinity should behave consistently with other numbers In-Reply-To: <1519787451.54.0.467229070634.issue32968@psf.upfronthosting.co.za> Message-ID: <1519834340.67.0.467229070634.issue32968@psf.upfronthosting.co.za> Mark Dickinson added the comment: I'm not quite sure why `Fraction_instance % float_instance` wouldn't simply convert the `Fraction` to a `float` and then use the usual floating-point mod. There's the issue that you want to maintain consistency with the floordiv operation, but if `Fraction_instance // float_instance` _also_ converts its first argument to float, then that consistency should follow automatically. That's the pattern that's followed for most of the other binary arithmetic operators. It looks like the inconsistency is caused by using `_operator_fallbacks` for most of the operations, but doing something more ad-hoc for modulo. I agree that the current behaviour is surprising. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 11:31:31 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 28 Feb 2018 16:31:31 +0000 Subject: [issue32970] Improve disassembly of the MAKE_FUNCTION instruction Message-ID: <1519835491.83.0.467229070634.issue32970@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The proposed PR adds decryption of the MAKE_FUNCTION argument (it is a bits set) in the disassembler output. For example: $ echo 'def f(x, y=1, *, z=2): ...' | ./python -m dis 1 0 LOAD_CONST 6 ((1,)) 2 LOAD_CONST 1 (2) 4 LOAD_CONST 2 (('z',)) 6 BUILD_CONST_KEY_MAP 1 8 LOAD_CONST 3 (", line 1>) 10 LOAD_CONST 4 ('f') 12 MAKE_FUNCTION 3 (defaults, kwdefaults) 14 STORE_NAME 0 (f) 16 LOAD_CONST 5 (None) 18 RETURN_VALUE Disassembly of ", line 1>: 1 0 LOAD_CONST 0 (None) 2 RETURN_VALUE ---------- components: Library (Lib) messages: 313060 nosy: ncoghlan, serhiy.storchaka, yselivanov priority: normal severity: normal status: open title: Improve disassembly of the MAKE_FUNCTION instruction type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 11:41:05 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 28 Feb 2018 16:41:05 +0000 Subject: [issue32970] Improve disassembly of the MAKE_FUNCTION instruction In-Reply-To: <1519835491.83.0.467229070634.issue32970@psf.upfronthosting.co.za> Message-ID: <1519836065.3.0.467229070634.issue32970@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +5707 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 12:55:45 2018 From: report at bugs.python.org (Ned Deily) Date: Wed, 28 Feb 2018 17:55:45 +0000 Subject: [issue31013] gcc7 throws warning when pymem.h development header is used In-Reply-To: <1500905736.49.0.103266302575.issue31013@psf.upfronthosting.co.za> Message-ID: <1519840545.18.0.467229070634.issue31013@psf.upfronthosting.co.za> Change by Ned Deily : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> [2.7] Fix -Wnonnull and -Wint-in-bool-context warnings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 12:58:02 2018 From: report at bugs.python.org (NODA, Kai) Date: Wed, 28 Feb 2018 17:58:02 +0000 Subject: [issue32971] unittest.TestCase.assertRaises Message-ID: <1519840682.18.0.467229070634.issue32971@psf.upfronthosting.co.za> New submission from NODA, Kai : https://docs.python.org/dev/library/unittest.html#unittest.TestCase.assertRaises > If only the exception and possibly the msg arguments are given, return a context manager so that the code under test can be written inline rather than as a function: > > with self.assertRaises(SomeException): do_something() > > When used as a context manager, assertRaises() accepts the additional keyword argument msg. Perhaps we don't need the second sentence on the `msg` argument which isn't adding anything new. Ideally it should be more clear when the method operates in context manager mode. ("If only" and "possibly" don't play nicely together.) Maybe along the lines of "If no callable was passed as an argument ..." ? I haven't looked in to the actual implementation yet... ---------- assignee: docs at python components: Documentation messages: 313061 nosy: docs at python, nodakai priority: normal severity: normal status: open title: unittest.TestCase.assertRaises versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 12:59:16 2018 From: report at bugs.python.org (NODA, Kai) Date: Wed, 28 Feb 2018 17:59:16 +0000 Subject: [issue32971] Docs on unittest.TestCase.assertRaises() should be improved In-Reply-To: <1519840682.18.0.467229070634.issue32971@psf.upfronthosting.co.za> Message-ID: <1519840756.45.0.467229070634.issue32971@psf.upfronthosting.co.za> Change by NODA, Kai : ---------- title: unittest.TestCase.assertRaises -> Docs on unittest.TestCase.assertRaises() should be improved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 13:02:20 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 28 Feb 2018 18:02:20 +0000 Subject: [issue32971] Docs on unittest.TestCase.assertRaises() should be improved In-Reply-To: <1519840682.18.0.467229070634.issue32971@psf.upfronthosting.co.za> Message-ID: <1519840940.59.0.467229070634.issue32971@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 13:24:13 2018 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 28 Feb 2018 18:24:13 +0000 Subject: [issue13830] codecs error handler is called with a UnicodeDecodeError with the same args In-Reply-To: <1327002997.43.0.435824061039.issue13830@psf.upfronthosting.co.za> Message-ID: <1519842253.15.0.467229070634.issue13830@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: For reference, this behavior was from beginning, since implementing PEP 293 in issue432401. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 13:41:57 2018 From: report at bugs.python.org (John Andersen) Date: Wed, 28 Feb 2018 18:41:57 +0000 Subject: [issue32972] unittest.TestCase coroutine support Message-ID: <1519843317.02.0.467229070634.issue32972@psf.upfronthosting.co.za> New submission from John Andersen : This makes unittest TestCase classes run `test_` methods which are async ---------- components: Tests, asyncio messages: 313063 nosy: asvetlov, pdxjohnny, yselivanov priority: normal pull_requests: 5708 severity: normal status: open title: unittest.TestCase coroutine support type: behavior versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 13:51:00 2018 From: report at bugs.python.org (Thomas Wouters) Date: Wed, 28 Feb 2018 18:51:00 +0000 Subject: [issue32973] Importing the same extension module under multiple names breaks non-reinitialisable extension modules Message-ID: <1519843860.12.0.467229070634.issue32973@psf.upfronthosting.co.za> New submission from Thomas Wouters : This is a continuation, of sorts, of issue16421; adding most of that issue's audience to the noisy list. When importing the same extension module under multiple names that share the same basename, Python 3 will call the extension module's init function multiple times. With extension modules that do not support re-initialisation, this causes them to trample all over their own state. In the case of numpy, this corrupts CPython internal data structures, like builtin types. Simple reproducer: % python3.6 -m venv numpy-3.6 % numpy-3.6/bin/python -m pip install numpy % PYTHONPATH=./numpy-3.6/lib/python3.6/site-packages/numpy/core/ ./numpy-3.6/bin/python -c "import numpy.core.multiarray, multiarray; u'' < 1" Traceback (most recent call last): File "", line 1, in Segmentation fault (The corruption happens because PyInit_multiarray initialises subclasses of builtin types, which causes them to share some data (e.g. tp_as_number) with the base class: https://github.com/python/cpython/blob/master/Objects/typeobject.c#L5277. Calling it a second time then copies data from a different class into that shared data, corrupting the base class: https://github.com/python/cpython/blob/master/Objects/typeobject.c#L4950. The Py_TPFLAGS_READY flag is supposed to protect against this, but PyInit_multiarray resets the tp_flags value. I ran into this because we have code that vendors numpy and imports it in two different ways.) The specific case of numpy is somewhat convoluted and exacerbated by dubious design choices in numpy, but it is not hard to show that calling an extension module's PyInit function twice (if the module doesn't support reinitialisation through PEP 3121) is bad: any C globals initialised in the PyInit function will be trampled on. This was not a problem in Python 2 because the extension module cache worked based purely on filename. It was changed in response to issue16421, but the intent there appears to be to call *different* PyInit methods in the same module. However, because PyInit functions are based off of the *basename* of the module, not the full module name, a different module name does not mean a different init function name. I think the right approach is to change the extension module cache to key on filename and init function name, although this is a little tricky: the init function name is calculated much later in the process. Alternatively, key it on filename and module basename, rather than full module name. ---------- messages: 313064 nosy: Arfrever, amaury.forgeotdarc, asvetlov, brett.cannon, eric.snow, eudoxos, ncoghlan, pitrou, r.david.murray, twouters, vstinner priority: normal severity: normal status: open title: Importing the same extension module under multiple names breaks non-reinitialisable extension modules type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 14:16:35 2018 From: report at bugs.python.org (R. David Murray) Date: Wed, 28 Feb 2018 19:16:35 +0000 Subject: [issue32972] unittest.TestCase coroutine support In-Reply-To: <1519843317.02.0.467229070634.issue32972@psf.upfronthosting.co.za> Message-ID: <1519845395.73.0.467229070634.issue32972@psf.upfronthosting.co.za> R. David Murray added the comment: In order for this to be actually useful, I think we also need a mechanism to set up and run async cleanup methods. In my own project I accomplish this by putting the run_until_complete in a try/finally loop and have an asyncAddCleanup method that just appends coroutines to a list that are then run in reversed order in the finally clause. Whatever we come up with needs tests and docs, and before that, I'm sure, more discussion about the API. Probably a topic for python-ideas? Or the testing sig? I really do think we should have async test support in the stdlib, though. Basic support isn't that hard (it's 15 lines in the test suite I'm using currently). ---------- nosy: +r.david.murray type: behavior -> enhancement versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 14:48:04 2018 From: report at bugs.python.org (John Andersen) Date: Wed, 28 Feb 2018 19:48:04 +0000 Subject: [issue32972] unittest.TestCase coroutine support In-Reply-To: <1519843317.02.0.467229070634.issue32972@psf.upfronthosting.co.za> Message-ID: <1519847284.57.0.467229070634.issue32972@psf.upfronthosting.co.za> John Andersen added the comment: More discussion indeed. I figured I was not alone in my desire to see async test support in the stdlib. Let me know what other changes would be good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 14:56:58 2018 From: report at bugs.python.org (Brett Cannon) Date: Wed, 28 Feb 2018 19:56:58 +0000 Subject: [issue32964] Reuse a testing implementation of the path protocol in tests In-Reply-To: <1519760407.45.0.467229070634.issue32964@psf.upfronthosting.co.za> Message-ID: <1519847818.72.0.467229070634.issue32964@psf.upfronthosting.co.za> Brett Cannon added the comment: FakePath? Otherwise SimplePath seems as good a name as any other one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 15:23:43 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 28 Feb 2018 20:23:43 +0000 Subject: [issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping In-Reply-To: <1519493920.19.0.467229070634.issue32940@psf.upfronthosting.co.za> Message-ID: <1519849423.76.0.467229070634.issue32940@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Replacing an expression with a less clear equivalent expression makes no sense to me. Anyway, having __missing__ return 120 reduces the benchmark miss time from 1.2-1.3 to .93, making ParseMis always faster than ParseGet and reducing the penalty for non-ascii chars. re.sub + str.replace is slower than translate import re import timeit class ParseMap(dict): def __missing__(self, key): return 120 # ord('x') trans = ParseMap((i,120) for i in range(128)) trans.update((ord(c), ord('(')) for c in "({[") trans.update((ord(c), ord(')')) for c in ")}]") trans.update((ord(c), ord(c)) for c in "\"'\\\n#") trans_re = re.compile(r'''[^(){}\[]"'\\\n#]+''') code='\t a([{b}])b"c\'d\n'*1000 # n = 1, 10, 100, 1000 print(timeit.timeit( 'code.translate(trans)', number=10000, globals = globals())) print(timeit.timeit( "code1 = trans_re.sub('x', code)\n" "code2 = code1.replace('{', '(')\n" "code3 = code2.replace('}', ')')\n" "code4 = code3.replace('[', '(')\n" "code5 = code4.replace(']', '(')\n" r"code6 = code5.replace('\nx', '\n')", number=10000, globals = globals())) n trans re 1 .06 .09 10 .08 .17 100 .28 1.00 1000 2.2 8.9 Multiply by 100 to get microseconds or seconds for 1000000. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 16:05:09 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 28 Feb 2018 21:05:09 +0000 Subject: [issue15873] datetime: add ability to parse RFC 3339 dates and times In-Reply-To: <1346965730.56.0.810546720554.issue15873@psf.upfronthosting.co.za> Message-ID: <1519851909.9.0.467229070634.issue15873@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5709 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 16:25:10 2018 From: report at bugs.python.org (Alexander Nelson) Date: Wed, 28 Feb 2018 21:25:10 +0000 Subject: [issue32878] Document value of st_ino on Windows In-Reply-To: <1519078455.66.0.467229070634.issue32878@psf.upfronthosting.co.za> Message-ID: <1519853110.75.0.467229070634.issue32878@psf.upfronthosting.co.za> Alexander Nelson added the comment: Thank you for this fix. ---------- nosy: +Alexander Nelson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 16:30:29 2018 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 28 Feb 2018 21:30:29 +0000 Subject: [issue32732] LoggingAdapter ignores extra kwargs of Logger#log() In-Reply-To: <1517423175.51.0.467229070634.issue32732@psf.upfronthosting.co.za> Message-ID: <1519853429.14.0.467229070634.issue32732@psf.upfronthosting.co.za> Vinay Sajip added the comment: This is not a bug, so I have closed the PR and am closing the issue. You might expect extras to be merged, but you can either pass extras in the constructor (as you have observed) or by subclassing LoggerAdapter and overriding the process method to do what you need. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 16:49:18 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 28 Feb 2018 21:49:18 +0000 Subject: [issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping In-Reply-To: <1519493920.19.0.467229070634.issue32940@psf.upfronthosting.co.za> Message-ID: <1519854558.25.0.467229070634.issue32940@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The mapping passed to str.translate must map ints representing codepoints to either either ints or strings. Translate can extract binary codepoints for the new string from either. Ints are slightly faster, so I am inclined not to switch. import timeit class ParseMapN(dict): def __missing__(self, key): return 120 class ParseMapS(dict): def __missing__(self, key): return 'x' trans1 = ParseMapN.fromkeys(range(128), 120) trans1.update((ord(c), ord('(')) for c in "({[") trans1.update((ord(c), ord(')')) for c in ")}]") trans1.update((ord(c), ord(c)) for c in "\"'\\\n#") trans2 = ParseMapN.fromkeys(range(128), 'x') trans2.update((ord(c), '(') for c in "({[") trans2.update((ord(c), ')') for c in ")}]") trans2.update((ord(c), c) for c in "\"'\\\n#") for i in (1, 10, 100, 1000): code = '\t a([{b}])b"c\'d\n' * i print('N ', i) print(timeit.repeat( 'code.translate(trans1)', number=10000, globals = globals())) print('S ', i) print(timeit.repeat( 'code.translate(trans2)', number=10000, globals = globals())) N 1 [0.056562504, 0.056747570, 0.05654651, 0.056460749, 0.056428776] S 1 [0.060795346, 0.062304155, 0.061043432, 0.062349345, 0.061191301] N 10 [0.076474600, 0.076463227, 0.076560984, 0.076581582, 0.076010091] S 10 [0.080739106, 0.080798745, 0.08034192, 0.080987501, 0.080617369] N 100 [0.28529922, 0.28383868, 0.283949046, 0.284461512, 0.284291203] S 100 [0.289629521, 0.288535418, 0.289154560, 0.28811548, 0.28862180] N1000 [2.23882157, 2.2383192, 2.2384120, 2.2377972, 2.23854982] S1000 [2.24242237, 2.2426845, 2.2424623, 2.2420030, 2.24254871] The pattern of all S repeats being greater than all corresponding N repeats was true for 2 other runs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 17:24:00 2018 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 28 Feb 2018 22:24:00 +0000 Subject: [issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping In-Reply-To: <1519493920.19.0.467229070634.issue32940@psf.upfronthosting.co.za> Message-ID: <1519856640.3.0.467229070634.issue32940@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset f0daa880a405c8de6743e44fa46006754aa145c9 by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-32940: IDLE: Simplify StringTranslatePseudoMapping in pyparse (GH-5862) https://github.com/python/cpython/commit/f0daa880a405c8de6743e44fa46006754aa145c9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 17:24:12 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 28 Feb 2018 22:24:12 +0000 Subject: [issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping In-Reply-To: <1519493920.19.0.467229070634.issue32940@psf.upfronthosting.co.za> Message-ID: <1519856652.42.0.467229070634.issue32940@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5710 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 17:25:13 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 28 Feb 2018 22:25:13 +0000 Subject: [issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping In-Reply-To: <1519493920.19.0.467229070634.issue32940@psf.upfronthosting.co.za> Message-ID: <1519856713.38.0.467229070634.issue32940@psf.upfronthosting.co.za> Change by miss-islington : ---------- pull_requests: +5711 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 18:08:24 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 28 Feb 2018 23:08:24 +0000 Subject: [issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping In-Reply-To: <1519493920.19.0.467229070634.issue32940@psf.upfronthosting.co.za> Message-ID: <1519859304.03.0.467229070634.issue32940@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 7e5763469e2fc9d08a3f6b6205f87f20a1bdd465 by Miss Islington (bot) in branch '3.7': bpo-32940: IDLE: Simplify StringTranslatePseudoMapping in pyparse (GH-5862) https://github.com/python/cpython/commit/7e5763469e2fc9d08a3f6b6205f87f20a1bdd465 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 18:12:17 2018 From: report at bugs.python.org (miss-islington) Date: Wed, 28 Feb 2018 23:12:17 +0000 Subject: [issue32940] IDLE: pyparse - simplify StringTranslatePseudoMapping In-Reply-To: <1519493920.19.0.467229070634.issue32940@psf.upfronthosting.co.za> Message-ID: <1519859537.5.0.467229070634.issue32940@psf.upfronthosting.co.za> miss-islington added the comment: New changeset 32f5392f64f004382e26a988b1145d2dc96c4978 by Miss Islington (bot) in branch '3.6': bpo-32940: IDLE: Simplify StringTranslatePseudoMapping in pyparse (GH-5862) https://github.com/python/cpython/commit/32f5392f64f004382e26a988b1145d2dc96c4978 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 18:22:05 2018 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 28 Feb 2018 23:22:05 +0000 Subject: [issue32953] Dataclasses: frozen should not be inherited for non-dataclass derived classes In-Reply-To: <1519597431.47.0.467229070634.issue32953@psf.upfronthosting.co.za> Message-ID: <1519860125.31.0.467229070634.issue32953@psf.upfronthosting.co.za> Eric V. Smith added the comment: See https://mail.python.org/pipermail/python-dev/2018-February/152320.html for a discussion. ---------- title: Dataclasses: frozen should not be inherited -> Dataclasses: frozen should not be inherited for non-dataclass derived classes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 18:58:34 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 28 Feb 2018 23:58:34 +0000 Subject: [issue32973] Importing the same extension module under multiple names breaks non-reinitialisable extension modules In-Reply-To: <1519843860.12.0.467229070634.issue32973@psf.upfronthosting.co.za> Message-ID: <1519862314.78.0.467229070634.issue32973@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 18:59:42 2018 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 28 Feb 2018 23:59:42 +0000 Subject: [issue32973] Importing the same extension module under multiple names breaks non-reinitialisable extension modules In-Reply-To: <1519843860.12.0.467229070634.issue32973@psf.upfronthosting.co.za> Message-ID: <1519862382.45.0.467229070634.issue32973@psf.upfronthosting.co.za> Change by Gregory P. Smith : ---------- versions: +Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 19:11:02 2018 From: report at bugs.python.org (Brett Cannon) Date: Thu, 01 Mar 2018 00:11:02 +0000 Subject: [issue32963] Python 2.7 tutorial claims source code is UTF-8 encoded In-Reply-To: <1519722263.23.0.467229070634.issue32963@psf.upfronthosting.co.za> Message-ID: <1519863062.43.0.467229070634.issue32963@psf.upfronthosting.co.za> Brett Cannon added the comment: https://docs.python.org/2.7/tutorial/interpreter.html#source-code-encoding if people are looking for the doc link. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 20:13:29 2018 From: report at bugs.python.org (Kyle Agronick) Date: Thu, 01 Mar 2018 01:13:29 +0000 Subject: [issue32974] Add bitwise operations and other missing comparison methods to Python's IP address module Message-ID: <1519866809.51.0.467229070634.issue32974@psf.upfronthosting.co.za> New submission from Kyle Agronick : I've recently had the experience of implementing a system for managing DNS records at a Fortune 10 company with ~10,000 stores. There were a number of things that I felt were missing from the IP address module and could be added without introducing any breaking changes. The easiest changes I saw would be to implement bitwise operations without casting all the addresses to ints and then back to IP addresses. Lets say you wanted to take the last octet from one address and put it on another: Right now you need to do: IPv6Address(int(v6('2001:db8:85a3:0:0:8a2e:370:7334')) & int(IPv6Address('0:0:0:0:0:0:0:ffff')) | int(IPv6Address('1323:cf3:23df:0:0:32:44:0'))) # returns IPv6Address('1323:cf3:23df::32:44:7334') You should be able to do: (IPv6Address('2001:db8:85a3:0:0:8a2e:370:7334') & IPv6Address('0:0:0:0:0:0:0:ffff')) | IPv6Address('1323:cf3:23df:0:0:32:44:0') # returns TypeError: unsupported operand type(s) for &: 'IPv6Address' and 'IPv6Address' All that would be required is to do the casting to int automatically. The other thing I saw that I would like would be to override the methods that return generators with iterables that provide more comparison operations. Right now you can check if an IP is in a network with: IPv4Address('192.168.1.12') in IPv4Network('192.168.1.0/24') # returns True You should be able to do this with methods that return multiple networks. ipaddress.summarize_address_range() is a method that returns a generator of IPv(4|6)Networks. To see if an IP address is in one of multiple networks you need to do: any(map(lambda i: IPv4Address('192.168.1.12') in i, ipaddress.summarize_address_range(IPv4Address('192.168.1.0'), IPv4Address('192.168.2.255')))) # returns True You should be able to do: IPv4Address('192.168.1.12') in ipaddress.summarize_address_range(IPv4Address('192.168.1.0'), IPv4Address('192.168.2.255')) # returns False This should be the default for IPv(4|6)Addresses. IPv(4|6)Networks should check membership like they currently do. You should be able to subtract ranges to make ranges that include some IPs but not others: ipaddress.summarize_address_range(IPv4Address('192.168.1.0'), IPv4Address('192.168.2.255')) - ipaddress.summarize_address_range(IPv4Address('192.168.1.20'), IPv4Address('192.168.1.50')) # returns TypeError: unsupported operand type(s) for -: 'generator' and 'generator' This should return a iterable that has networks that include 192.168.1.0 to 192.168.1.20 and 192.168.1.50 to 192.168.2.255. You should be able to do addition as well without casting to a list. Methods like .hosts() should be able to be performed on the iterator instead of doing: sum([list(i.hosts()) for i in ipaddress.summarize_address_range(IPv4Address('192.168.1.0'), IPv4Address('192.168.2.255'))], []) do: ipaddress.summarize_address_range(IPv4Address('192.168.1.0'), IPv4Address('192.168.2.255')).hosts() Another great feature would be to allow division on networks and network generators giving you every xth host: (i for i in IPv4Network('192.168.1.0/24').hosts() if int(i) % x == 0) When x is 32 you get: IPv4Address('192.168.1.32'), IPv4Address('192.168.1.64'), IPv4Address('192.168.1.96'), IPv4Address('192.168.1.128'), IPv4Address('192.168.1.160'), IPv4Address('192.168.1.192'), IPv4Address('192.168.1.224') I would be happy to code this if the consensus was that this would be included. ---------- components: Library (Lib) messages: 313077 nosy: Kyle Agronick priority: normal severity: normal status: open title: Add bitwise operations and other missing comparison methods to Python's IP address module type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 21:19:37 2018 From: report at bugs.python.org (Jay Crotts) Date: Thu, 01 Mar 2018 02:19:37 +0000 Subject: [issue8243] curses writing to window's bottom right position raises: `_curses.error: addstr() returned ERR' In-Reply-To: <1352121880.55.0.191535515397.issue8243@psf.upfronthosting.co.za> Message-ID: <1519870777.28.0.467229070634.issue8243@psf.upfronthosting.co.za> Change by Jay Crotts : ---------- versions: +Python 3.8 -Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 21:20:11 2018 From: report at bugs.python.org (bbayles) Date: Thu, 01 Mar 2018 02:20:11 +0000 Subject: [issue32974] Add bitwise operations and other missing comparison methods to Python's IP address module In-Reply-To: <1519866809.51.0.467229070634.issue32974@psf.upfronthosting.co.za> Message-ID: <1519870811.47.0.467229070634.issue32974@psf.upfronthosting.co.za> Change by bbayles : ---------- nosy: +bbayles _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 21:25:46 2018 From: report at bugs.python.org (BT123) Date: Thu, 01 Mar 2018 02:25:46 +0000 Subject: [issue32056] bug in Lib/wave.py In-Reply-To: <1510911746.81.0.213398074469.issue32056@psf.upfronthosting.co.za> Message-ID: <1519871146.36.0.467229070634.issue32056@psf.upfronthosting.co.za> BT123 added the comment: the bug still in the Python 3.7.0b2 - 2018-02-28 ---------- versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 21:52:52 2018 From: report at bugs.python.org (zhangdeyue) Date: Thu, 01 Mar 2018 02:52:52 +0000 Subject: [issue32056] bug in Lib/wave.py In-Reply-To: <1510911746.81.0.213398074469.issue32056@psf.upfronthosting.co.za> Message-ID: <1519872772.6.0.467229070634.issue32056@psf.upfronthosting.co.za> zhangdeyue added the comment: The CVE email: The CVE ID is below. Please check whether the vulnerability still exists in Python 3.6.4, and please inform the software maintainer that the CVE ID has been assigned: https://bugs.python.org Use CVE-2017-18207 for this vulnerability in Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 21:55:16 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 01 Mar 2018 02:55:16 +0000 Subject: [issue32056] bug in Lib/wave.py In-Reply-To: <1510911746.81.0.213398074469.issue32056@psf.upfronthosting.co.za> Message-ID: <1519872916.04.0.467229070634.issue32056@psf.upfronthosting.co.za> Change by Ned Deily : ---------- keywords: +security_issue -patch nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 28 21:56:35 2018 From: report at bugs.python.org (Ned Deily) Date: Thu, 01 Mar 2018 02:56:35 +0000 Subject: [issue32974] Add bitwise operations and other missing comparison methods to Python's IP address module In-Reply-To: <1519866809.51.0.467229070634.issue32974@psf.upfronthosting.co.za> Message-ID: <1519872995.85.0.467229070634.issue32974@psf.upfronthosting.co.za> Change by Ned Deily : ---------- nosy: +pmoody _______________________________________ Python tracker _______________________________________