From report at bugs.python.org Sun Sep 1 02:32:10 2019 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 01 Sep 2019 06:32:10 +0000 Subject: [issue24416] Return a namedtuple from date.isocalendar() In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567319530.55.0.104940011662.issue24416@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +15301 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15633 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 03:26:25 2019 From: report at bugs.python.org (Tal Einat) Date: Sun, 01 Sep 2019 07:26:25 +0000 Subject: [issue35771] IDLE: Fix tooltip Hovertiptest failure In-Reply-To: <1547794267.4.0.582455332849.issue35771@roundup.psfhosted.org> Message-ID: <1567322785.49.0.323766077491.issue35771@roundup.psfhosted.org> Change by Tal Einat : ---------- pull_requests: +15302 pull_request: https://github.com/python/cpython/pull/15634 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 04:18:43 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Sep 2019 08:18:43 +0000 Subject: [issue36543] Remove old-deprecated ElementTree features (part 2) In-Reply-To: <1554566782.39.0.176680363975.issue36543@roundup.psfhosted.org> Message-ID: <1567325923.89.0.211128557556.issue36543@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset f02ea6225bc3b71bd5fe66224d199a6e3e23b14d by Serhiy Storchaka in branch 'master': bpo-36543: Remove old-deprecated ElementTree features. (GH-12707) https://github.com/python/cpython/commit/f02ea6225bc3b71bd5fe66224d199a6e3e23b14d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 04:19:14 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Sep 2019 08:19:14 +0000 Subject: [issue36543] Remove old-deprecated ElementTree features (part 2) In-Reply-To: <1554566782.39.0.176680363975.issue36543@roundup.psfhosted.org> Message-ID: <1567325954.95.0.579529598613.issue36543@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 05:03:42 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Sep 2019 09:03:42 +0000 Subject: [issue37994] Fix silencing all errors if an attribute lookup fails In-Reply-To: <1567239029.01.0.244778819227.issue37994@roundup.psfhosted.org> Message-ID: <1567328622.39.0.134365406555.issue37994@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 41c57b335330ff48af098d47e379e0f9ba09d233 by Serhiy Storchaka in branch 'master': bpo-37994: Fix silencing all errors if an attribute lookup fails. (GH-15630) https://github.com/python/cpython/commit/41c57b335330ff48af098d47e379e0f9ba09d233 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 05:10:08 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Sep 2019 09:10:08 +0000 Subject: [issue37994] Fix silencing all errors if an attribute lookup fails In-Reply-To: <1567239029.01.0.244778819227.issue37994@roundup.psfhosted.org> Message-ID: <1567329008.28.0.521069879814.issue37994@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +15303 pull_request: https://github.com/python/cpython/pull/15635 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 05:11:46 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Sep 2019 09:11:46 +0000 Subject: [issue15999] Using new 'bool' format character In-Reply-To: <1348242429.94.0.662282558141.issue15999@psf.upfronthosting.co.za> Message-ID: <1567329106.46.0.103795247248.issue15999@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset eb8974616bc58f44b2a3c3e4ca2326894ae42c8f by Serhiy Storchaka in branch 'master': bpo-15999: Always pass bool instead of int to the expat parser. (GH-15622) https://github.com/python/cpython/commit/eb8974616bc58f44b2a3c3e4ca2326894ae42c8f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 05:12:54 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Sep 2019 09:12:54 +0000 Subject: [issue15999] Using new 'bool' format character In-Reply-To: <1348242429.94.0.662282558141.issue15999@psf.upfronthosting.co.za> Message-ID: <1567329174.7.0.25977878014.issue15999@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 5eca7f3f3836cc734dfe8dc5ec669f3b4e9333fe by Serhiy Storchaka in branch 'master': bpo-15999: Always pass bool instead of int to socket.setblocking(). (GH-15621) https://github.com/python/cpython/commit/5eca7f3f3836cc734dfe8dc5ec669f3b4e9333fe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 05:16:53 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Sep 2019 09:16:53 +0000 Subject: [issue15999] Using new 'bool' format character In-Reply-To: <1348242429.94.0.662282558141.issue15999@psf.upfronthosting.co.za> Message-ID: <1567329413.8.0.420623854522.issue15999@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 1f21eaa15e8a0d2b0f78d0e3f2b9e5b458eb0a70 by Serhiy Storchaka in branch 'master': bpo-15999: Clean up of handling boolean arguments. (GH-15610) https://github.com/python/cpython/commit/1f21eaa15e8a0d2b0f78d0e3f2b9e5b458eb0a70 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 06:55:51 2019 From: report at bugs.python.org (Guruprasad Venkataramaiah) Date: Sun, 01 Sep 2019 10:55:51 +0000 Subject: [issue37998] re.sub(r'\\', r'\\\\', s) reporting MemoryError Message-ID: <1567335351.74.0.503338420306.issue37998@roundup.psfhosted.org> New submission from Guruprasad Venkataramaiah : On Python 3.5: s = re.sub(r'\\', r'\\\\', s) File "/pyuniti/venvs/guruv/lib/python3.5/re.py", line 182, in sub return _compile(pattern, flags).sub(repl, string, count) MemoryError On Python 3.7 s = re.sub(r'\\', r'\\\\', s) File "C:\Python\Python37-32\lib\re.py", line 192, in sub return _compile(pattern, flags).sub(repl, string, count) MemoryError ---------- components: Regular Expressions messages: 350943 nosy: Guruprasad Venkataramaiah, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: re.sub(r'\\', r'\\\\', s) reporting MemoryError type: resource usage versions: Python 3.5, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 07:00:11 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Sep 2019 11:00:11 +0000 Subject: [issue37998] re.sub(r'\\', r'\\\\', s) reporting MemoryError In-Reply-To: <1567335351.74.0.503338420306.issue37998@roundup.psfhosted.org> Message-ID: <1567335611.63.0.494534608833.issue37998@roundup.psfhosted.org> Serhiy Storchaka added the comment: What is s? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 07:01:08 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Sep 2019 11:01:08 +0000 Subject: [issue37994] Fix silencing all errors if an attribute lookup fails In-Reply-To: <1567239029.01.0.244778819227.issue37994@roundup.psfhosted.org> Message-ID: <1567335668.66.0.594725554639.issue37994@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 353053d9ad08fea0e205e6c008b8a4350c0188e6 by Serhiy Storchaka in branch '3.8': [3.8] bpo-37994: Fix silencing all errors if an attribute lookup fails. (GH-15630) (GH-15635) https://github.com/python/cpython/commit/353053d9ad08fea0e205e6c008b8a4350c0188e6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 07:01:29 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Sep 2019 11:01:29 +0000 Subject: [issue37994] Fix silencing all errors if an attribute lookup fails In-Reply-To: <1567239029.01.0.244778819227.issue37994@roundup.psfhosted.org> Message-ID: <1567335689.2.0.832793979957.issue37994@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 07:16:18 2019 From: report at bugs.python.org (Eryk Sun) Date: Sun, 01 Sep 2019 11:16:18 +0000 Subject: [issue37993] os.path.realpath on Windows resolves mapped network drives In-Reply-To: <1567238675.05.0.269696747191.issue37993@roundup.psfhosted.org> Message-ID: <1567336578.8.0.0431988305736.issue37993@roundup.psfhosted.org> Eryk Sun added the comment: >> Unix Python resolves the executable path with repeated _Py_wreadlink >> calls. Windows Python should do something similar to ensure the >> consistency of sys.executable with realpath(sys.executable). > > I don't think this necessarily follows. There's nowhere in the > documentation that says that sys.executable is even a valid path, > let alone the final path. The reason is cross-platform parity for users who aren't language lawyers -- as long as it's not expensive and doesn't compromise reliability or safety. That said, resolving the real executable path is more of a practical concern in Unix. In Windows it's not generally useful since the loader does not resolve the real path of an executable. Unix Python also calls _Py_wrealpath on the script path, which I think is more relevant in Windows than the sys.executable case because it's at a higher level that we control. This allows running a script symlink at the command line (e.g. linked in a common bin directory in PATH) even if the script depends on modules in the real directory. >> I think we want relpath(realpath('C:/Temp/foo'), realpath('S:/')) to >> succeed as r"..\foo". I don't think we want it to fail as a cross- >> drive relative path. > > Cross-drive relative paths are fine though - they are just absolute > paths :) relpath() fails if the target and start directories aren't on the same drive. Code that's creating a symlink in Windows has to handle this case by using an absolute symlink instead of a relative symlink, if that's what you mean. That's probably for the better. So I change my mind. Forcing scripts to create absolute symlinks is not an issue, even if it's unnecessary because the target and start directory can be resolved to the same drive. The mount point should take precedence. But that's an argument against using the final path. Mapped drives and subst drives will be resolved in the final path. Reverse mapping to the original drive, if possible, would be extra work. For example, say we start with "\\??\\S:\\". The object manager reparses the r"\??\S:" SymbolicLink as r"\??\C:\Temp\Subst". Next it reparses r"\??\C:" to a device object, with a resolved path such as r"\Device\HarddiskVolume2\Temp\Subst". The Device object type has a parse routine that's implemented by the I/O manager. This sends an IRP_MJ_CREATE request to the mounted file-system device (NTFS in this case) with the remaining path to be parsed, e.g. r"\Temp\Subst". Note that at this stage, information about the original drive "S:" is long gone. If the file system in turn finds a reparse point, such as a file-system symlink or mount point, then it stops there and returns STATUS_REPARSE with the contents of the reparse buffer. The I/O Manager itself handles symlink and mount-point reparsing, for which it implements behavior that's as close as possible to Unix symlinks and mount points. After setting up the new path to open, the I/O manager's parse routine returns STATUS_REPARSE to the object manager. Up to 63 reparse attempts are allowed, including within the object namespace itself. The limit of 63 reparse attempts is a simple way to handle reparse loops. Assuming no file-system reparse points, we have as the final path r"\Device\HarddiskVolume2\Temp\Subst". To map this back to a DOS path, GetFinalPathNameByHandleW queries the mount-point manager for the canonical DOS device name for r"\Device\HarddiskVolume2". The mount-point manager knows about "C:" in this case, but it doesn't have a registry of subst drives. GetFinalPathNameByHandleW also doesn't enumerate DOS devices and map a path back to a matching subst drive. It supports only the canonical path. Reverse mapping a UNC path to a mapped drive would be even more difficult. We would have to doubly resolve, for example, from "M:" -> r"\Device\\;M:\server\share\path\to\directory" -> r"\Device\Mup\;\;M:\server\share\path\to\directory". Once we confirm that "M:" targets the MUP device, we can compare r"\server\share\path\to\directory" to check whether the final path contains this path. If so it can replace it with "M:". That's a lot of work to get a non-canonical path, and that's the simplest case. For example, we could have a subst drive for a mapped drive, and the shortest path would be the subst drive. To avoid resolving drives altogether, realpath() would have to manually walk the path instead of relying on GetFinalPathNameByHandleW. > If we can easily tell the difference between directory junctions and > mapped drives, given that they are both identical types of reparse > points Mapped drives and subst drives are not file-system reparse points. They're "DOS" devices, which are implemented as SymbolicLink objects in the "\\??\\" device-alias directory. A SymbolicLink object can be read via NtQuerySymbolicLinkObject, or via WINAPI QueryDosDeviceW if the SymbolicLink is in "\\??\\". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 07:24:04 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Sep 2019 11:24:04 +0000 Subject: [issue37999] No longer use implicit convertion to int with loss Message-ID: <1567337044.72.0.119982097156.issue37999@roundup.psfhosted.org> New submission from Serhiy Storchaka : Use only the __index__() method for implicit conversion to iteger, and not __int__(). This converts deprecation warnings added in issue36048 into TypeError. ---------- components: Interpreter Core messages: 350947 nosy: serhiy.storchaka priority: normal severity: normal status: open title: No longer use implicit convertion to int with loss type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 07:29:07 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Sep 2019 11:29:07 +0000 Subject: [issue37999] No longer use implicit convertion to int with loss In-Reply-To: <1567337044.72.0.119982097156.issue37999@roundup.psfhosted.org> Message-ID: <1567337347.79.0.627204553338.issue37999@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +15304 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15636 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 08:15:52 2019 From: report at bugs.python.org (Guruprasad Venkataramaiah) Date: Sun, 01 Sep 2019 12:15:52 +0000 Subject: [issue37998] re.sub(r'\\', r'\\\\', s) reporting MemoryError In-Reply-To: <1567335351.74.0.503338420306.issue37998@roundup.psfhosted.org> Message-ID: <1567340152.66.0.359898043384.issue37998@roundup.psfhosted.org> Guruprasad Venkataramaiah added the comment: With more debug, observed the input string ('s') is getting assigned to a big string of '////' resulting in Memory error ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 08:17:04 2019 From: report at bugs.python.org (Guruprasad Venkataramaiah) Date: Sun, 01 Sep 2019 12:17:04 +0000 Subject: [issue37998] re.sub(r'\\', r'\\\\', s) reporting MemoryError In-Reply-To: <1567335351.74.0.503338420306.issue37998@roundup.psfhosted.org> Message-ID: <1567340224.49.0.863574205295.issue37998@roundup.psfhosted.org> Guruprasad Venkataramaiah added the comment: With more debug, observed the input string ('s') is getting assigned to a big string of '////' resulting in Memory error ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 08:27:54 2019 From: report at bugs.python.org (Andrey) Date: Sun, 01 Sep 2019 12:27:54 +0000 Subject: [issue38000] importlib can not handle module file names with periods Message-ID: <1567340874.27.0.741402287818.issue38000@roundup.psfhosted.org> New submission from Andrey : ``` import os, sys def import_module(dir_path, module_name, ref_module_name = None): module_file_path = os.path.join(dir_path, module_name).replace('\\', '/') if sys.version_info[0] > 3 or sys.version_info[0] == 3 and sys.version_info[1] >= 4: import importlib import_spec = importlib.util.spec_from_file_location(os.path.splitext(module_name)[0] if ref_module_name is None else ref_module_name, os.path.join(dir_path, module_name).replace('\\', '/')) import_module = importlib.util.module_from_spec(import_spec) import_spec.loader.exec_module(import_module) #globals()[module_name if ref_module_name is None else ref_module_name] = import_module # still does not accept modules with periods without this else: # back compatability import imp module_file, module_file_name, module_desc = imp.find_module(os.path.splitext(module_name)[0], [os.path.dirname(module_file_path)]) globals()[module_name if ref_module_name is None else ref_module_name] = imp.load_module(module_file_path, module_file, module_file_name, module_desc) ``` I am trying to import my modules targeted by file path: ``` import_module(MYTOOLS_ROOT, 'cmdoplib.std.py', 'cmdoplib') import_module(MYTOOLS_ROOT, 'cmdoplib.yaml.py', 'cmdoplib_yaml') ``` And got error: ``` Traceback (most recent call last): File "c:\python\x64\37\lib\site-packages\xonsh\proc.py", line 1411, in run r = self.f(self.args, sp_stdin, sp_stdout, sp_stderr, spec, spec.stack) File "c:\python\x64\37\lib\site-packages\xonsh\proc.py", line 1204, in proxy_two return f(args, stdin) File "c:\python\x64\37\lib\site-packages\xonsh\aliases.py", line 575, in source_alias builtins.execx(src, "exec", ctx, filename=fpath) File "c:\python\x64\37\lib\site-packages\xonsh\built_ins.py", line 1497, in __call__ return self.obj.__call__(*args, **kwargs) File "c:\python\x64\37\lib\site-packages\xonsh\execer.py", line 190, in exec return exec(code, glbs, locs) File "w:/Work/MyProjects/__scm_solutions/all-in-one/_common/tools/cmdoplib.yaml.xsh", line 11, in g_yaml_env = cmdoplib_yaml.YamlEnv() NameError: name 'cmdoplib_yaml' is not defined ``` If try to uncomment this: ``` globals()[module_name if ref_module_name is None else ref_module_name] = import_module ``` All works fine. Seems the latest version of the python still can not handle modules with the periods in a file name without constructions from the old and well known `imp` module. It seems for me as a bug or at least as an incomplete (re)implementation. ---------- components: Interpreter Core messages: 350950 nosy: andry priority: normal severity: normal status: open title: importlib can not handle module file names with periods type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 08:52:17 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 01 Sep 2019 12:52:17 +0000 Subject: [issue38000] importlib can not handle module file names with periods In-Reply-To: <1567340874.27.0.741402287818.issue38000@roundup.psfhosted.org> Message-ID: <1567342337.91.0.404629738752.issue38000@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 09:26:16 2019 From: report at bugs.python.org (Thrlwiti) Date: Sun, 01 Sep 2019 13:26:16 +0000 Subject: [issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream In-Reply-To: <1557598514.53.0.379470651864.issue36889@roundup.psfhosted.org> Message-ID: <1567344376.57.0.252948073269.issue36889@roundup.psfhosted.org> Change by Thrlwiti : ---------- nosy: +THRlWiTi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 09:33:35 2019 From: report at bugs.python.org (Thrlwiti) Date: Sun, 01 Sep 2019 13:33:35 +0000 Subject: [issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream In-Reply-To: <1557598514.53.0.379470651864.issue36889@roundup.psfhosted.org> Message-ID: <1567344815.31.0.482553152558.issue36889@roundup.psfhosted.org> Change by Thrlwiti : ---------- nosy: -THRlWiTi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 09:51:42 2019 From: report at bugs.python.org (Paul Ganssle) Date: Sun, 01 Sep 2019 13:51:42 +0000 Subject: [issue24416] Return a namedtuple from date.isocalendar() In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567345902.76.0.877978153777.issue24416@roundup.psfhosted.org> Paul Ganssle added the comment: Sorry for the late response after a patch, but I'm actually -1 on this patch. I don't think it buys us very much in terms of the API considering it only has 3 parameters, and it adds some complexity to the code (in addition to the performance issue). Honestly, I think the main reason we didn't go with positional-only parameters in `fromisocalendar` was that the "/" syntax didn't exist yet. ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 10:25:17 2019 From: report at bugs.python.org (Digin Antony) Date: Sun, 01 Sep 2019 14:25:17 +0000 Subject: [issue38001] Unexpected behaviour of 'is' operator Message-ID: <1567347917.93.0.344087123361.issue38001@roundup.psfhosted.org> New submission from Digin Antony : The 'is' operator behave differently on two sets of values please find the attachment below tested environment windows 7 python 3.7.3 Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license()" for more information. >>> a=256 >>> b=256 >>> a is b True >>> a=257 >>> b=257 >>> a is b False ---------- components: Interpreter Core files: bug.png messages: 350952 nosy: Digin Antony priority: normal severity: normal status: open title: Unexpected behaviour of 'is' operator type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48578/bug.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 10:31:49 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 01 Sep 2019 14:31:49 +0000 Subject: [issue38001] Unexpected behaviour of 'is' operator In-Reply-To: <1567347917.93.0.344087123361.issue38001@roundup.psfhosted.org> Message-ID: <1567348309.6.0.473255247281.issue38001@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This will emit a SyntaxWarning in Python 3.8 to use == instead of using is for literals. This is not a bug but an implementation detail over caching a range of integers at https://github.com/python/cpython/blob/1f21eaa15e8a0d2b0f78d0e3f2b9e5b458eb0a70/Objects/longobject.c#L19 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 10:36:27 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Sep 2019 14:36:27 +0000 Subject: [issue38001] Unexpected behaviour of 'is' operator In-Reply-To: <1567347917.93.0.344087123361.issue38001@roundup.psfhosted.org> Message-ID: <1567348587.9.0.694307487702.issue38001@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 10:47:09 2019 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 01 Sep 2019 14:47:09 +0000 Subject: [issue24416] Return a namedtuple from date.isocalendar() In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567349229.69.0.401020140818.issue24416@roundup.psfhosted.org> Dong-hee Na added the comment: @p-ganssle @taleinat I agree that there are penalties of this patch what you said. But I'm wondering how the `fromisocalendar` API relates to this patch. Rather, wouldn't this patch contribute to improving the usability of the `fromisocalendar` API? I would appreciate it if you would generously understand that my background knowledge of this module is less than yours. AS-IS: >>> year, week, weekday = a.isocalendar() >>> datetime.date.fromisocalendar(year, week, weekday) datetime.date(2019, 9, 1) TO-BE: >>> b = a.isocalendar() >>> datetime.date.fromisocalendar(b.year, b.week, b.weekday) datetime.date(2019, 9, 1) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 11:19:11 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Sep 2019 15:19:11 +0000 Subject: [issue24416] Return a namedtuple from date.isocalendar() In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567351151.95.0.104156887675.issue24416@roundup.psfhosted.org> Serhiy Storchaka added the comment: You can use datetime.date.fromisocalendar(*b). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 12:12:33 2019 From: report at bugs.python.org (Paul Ganssle) Date: Sun, 01 Sep 2019 16:12:33 +0000 Subject: [issue24416] Return a namedtuple from date.isocalendar() In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567354353.5.0.372781856788.issue24416@roundup.psfhosted.org> Paul Ganssle added the comment: > But I'm wondering how the `fromisocalendar` API relates to this patch. > Rather, wouldn't this patch contribute to improving the usability of the `fromisocalendar` API? The `fromisocalendar` API relates to this patch only insofar as it is the inverse function of `isocalendar` and in some sense it allows specifying the parameters by keyword rather by position. I was merely bringing up that we didn't choose that API because we thought people would or should want or need to specify the individual components by keyword but because we didn't have an easy way to maintain the same API in the pure Python and C APIs at the time. By contrast, returning a plain tuple from `isocalendar()` is the easier *and* more performant thing to do, and given that any benefits seem marginal I'm against the switch. I think that the usability of `fromisoformat` with the output of `isocalendar` will be largely unchanged if we were to switch to returning a namedtuple. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 12:32:56 2019 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 01 Sep 2019 16:32:56 +0000 Subject: [issue24416] Return a namedtuple from date.isocalendar() In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567355576.29.0.93754104221.issue24416@roundup.psfhosted.org> Dong-hee Na added the comment: @pganssle @serhiy.storchaka Sounds reasonable on the view of maintaining pure Python and C APIs at the time Thank you for the explanation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 12:43:12 2019 From: report at bugs.python.org (Tal Einat) Date: Sun, 01 Sep 2019 16:43:12 +0000 Subject: [issue24416] Return a namedtuple from date.isocalendar() In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567356192.73.0.309794296504.issue24416@roundup.psfhosted.org> Tal Einat added the comment: Paul, I'm also on the fence regarding the advantage of this. It's not clear that the minor possible benefits outweigh the additional complexity and slight backwards-incompatibility (pickling). Thinking about this further, yes, we'd probably avoid making this change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 12:50:36 2019 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 01 Sep 2019 16:50:36 +0000 Subject: [issue24416] Return a namedtuple from date.isocalendar() In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567356636.11.0.351262784719.issue24416@roundup.psfhosted.org> Dong-hee Na added the comment: @taleinat @p-ganssle I am okay with closing this issue without any change. My initial purpose for this issue was also whether or not to close a long left issue. I am +1 to closing this issue without any change. Please leave a vote for this issue. If @taleinat and @p-ganssle agree with closing this issue. I am going to close this issue! Thanks always! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 16:05:01 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Sep 2019 20:05:01 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567368301.75.0.790442868294.issue24416@roundup.psfhosted.org> Raymond Hettinger added the comment: Why close this? Having isocalendar() return a structseq instance would be a nice improvement. It is what structseq was designed for. Dong-hee Na, if you want to make a fresh PR for this and bring it to fruition, I would be happy to review and apply it. I'm changing the title to structseq. It was a distractor to mention collections.namedtuple() at all -- that would have been more appropriate for pure python code. ---------- assignee: belopolsky -> rhettinger title: Return a namedtuple from date.isocalendar() -> Have date.isocalendar() return a structseq instance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 16:08:53 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Sep 2019 20:08:53 +0000 Subject: [issue38002] 'ModifiedInterpreter' object has no attribute 'interp' Message-ID: <1567368533.85.0.101387822612.issue38002@roundup.psfhosted.org> New submission from Raymond Hettinger : Here's a new traceback I haven't seen before. I only see these at the end of a session, so I don't know which steps triggered it. $ python3.8 -m idlelib.idle tmp_pretty_fact_ast.py Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/tkinter/__init__.py", line 1883, in __call__ return self.func(*args) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/runscript.py", line 173, in _run_module_event interp.runcode(code) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/pyshell.py", line 756, in runcode self.interp.restart_subprocess() AttributeError: 'ModifiedInterpreter' object has no attribute 'interp' ---------- assignee: terry.reedy components: IDLE messages: 350961 nosy: rhettinger, terry.reedy priority: normal severity: normal status: open title: 'ModifiedInterpreter' object has no attribute 'interp' versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 16:24:08 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Sep 2019 20:24:08 +0000 Subject: [issue37995] Multiline ast.dump() In-Reply-To: <1567243768.69.0.362429469264.issue37995@roundup.psfhosted.org> Message-ID: <1567369448.27.0.800784649305.issue37995@roundup.psfhosted.org> Raymond Hettinger added the comment: FWIW, I wrote a generic AST pretty printer for a personal compiler project (see attached file). Perhaps it can be adapted to the Python AST. ## Example input ############################### Program(procs=[Procedure(name='FACTORIAL', params=['N'], is_test=False, body=Block(blocknum=0, stmts=[Assign(name=Output(is_bool=False), value=Number(x=1)), Assign(name=Cell(i=0), value=Number(x=1)), Loop(times=Id(name='N'), fixed=False, body=Block(blocknum=1, stmts=[Assign(name=Output(is_bool=False), value=BinOp(value1=Output(is_bool=False), op='x', value2=Cell(i=0))), Assign(name=Cell(i=0), value=BinOp(value1=Cell(i=0), op='+', value2=Number(x=1)))]))]))], calls=[]) ## Example output ############################### Program( procs = [ Procedure( name = 'FACTORIAL', params = [ 'N' ], is_test = False, body = Block( blocknum = 0, stmts = [ Assign( name = Output(is_bool=False), value = Number(x=1) ), Assign( name = Cell(i=0), value = Number(x=1) ), Loop( times = Id(name='N'), fixed = False, body = Block( blocknum = 1, stmts = [ Assign( name = Output(is_bool=False), value = BinOp( value1 = Output(is_bool=False), op = 'x', value2 = Cell(i=0) ) ), Assign( name = Cell(i=0), value = BinOp( value1 = Cell(i=0), op = '+', value2 = Number(x=1) ) ) ] ) ) ] ) ) ], calls = [] ) ---------- Added file: https://bugs.python.org/file48579/ast_bloop.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 16:26:03 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Sep 2019 20:26:03 +0000 Subject: [issue37995] Multiline ast.dump() In-Reply-To: <1567243768.69.0.362429469264.issue37995@roundup.psfhosted.org> Message-ID: <1567369563.9.0.716722908983.issue37995@roundup.psfhosted.org> Raymond Hettinger added the comment: It would be great is the tool wasn't tightly bound to our particular AST and could be used for any hand-rolled AST. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 17:40:09 2019 From: report at bugs.python.org (Bob Kline) Date: Sun, 01 Sep 2019 21:40:09 +0000 Subject: [issue38003] Incorrect "fixing" of isinstance tests for basestring Message-ID: <1567374009.32.0.247747586449.issue38003@roundup.psfhosted.org> New submission from Bob Kline : We are attempting to convert a large Python 2 code base. Following the guidance of the official documentation (https://docs.python.org/2/library/functions.html#basestring) we created tests in many, many places that look like this: if isinstance(value, basestring): if not isinstance(value, unicode): value = value.decode(encoding) else: some other code It seems that the 2to3 tool is unaware that replacing basestring with str in such cases will break the software. Here's an example. $ 2to3 repro.py ... --- repro.py (original) +++ repro.py (refactored) @@ -1,8 +1,8 @@ from frobnitz import transform def foo(value, encoding=None): - if isinstance(value, basestring): - if not isinstance(value, unicode): + if isinstance(value, str): + if not isinstance(value, str): value = value.decode(encoding or "utf-8") return value else: Help me understand how this "fix" results in the correct behavior. ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 350964 nosy: bkline priority: normal severity: normal status: open title: Incorrect "fixing" of isinstance tests for basestring type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 18:51:06 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 01 Sep 2019 22:51:06 +0000 Subject: [issue38003] Incorrect "fixing" of isinstance tests for basestring In-Reply-To: <1567374009.32.0.247747586449.issue38003@roundup.psfhosted.org> Message-ID: <1567378266.3.0.430763800638.issue38003@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: https://docs.python.org/3.0/whatsnew/3.0.html > The builtin basestring abstract type was removed. Use str instead. The str and bytes types don?t have functionality enough in common to warrant a shared base class. The 2to3 tool (see below) replaces every occurrence of basestring with str. For a longer explanation of this and other changes you might find below link useful. In Python 2 str is used to represent both text and bytes. Hence to check the type is str in python 2 you have to check it to be basestring and then check it to be unicode. In python 3 all strings are unicode with str and bytes being two different types. Hence there is no basestring and unicode string since they are both unified to be str itself in Python 3. https://portingguide.readthedocs.io/en/latest/strings.html Hope this helps. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 20:38:23 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 02 Sep 2019 00:38:23 +0000 Subject: [issue38001] Unexpected behaviour of 'is' operator In-Reply-To: <1567347917.93.0.344087123361.issue38001@roundup.psfhosted.org> Message-ID: <1567384703.48.0.593158031129.issue38001@roundup.psfhosted.org> Steven D'Aprano added the comment: Further to Karthikeyan Singaravelan comment, the behaviour you see is absolutely correct. The operator isn't behaving differently, it is reporting precisely the truth. The ``is`` operator tests for object identity, not equality. Python makes no promises about object identity of literals. If you use an immutable literal in two places: a = 1234 b = 1234 the interpreter is free to use the same object for both a and b, or different objects. The only promise made is that ``a == b``. The Python interpreter currently caches some small integers for re-use, but that's not a language guarantee, and is subject to change without warning. It has changed in the past, and could change again in the future. The bottom line is that you shouldn't use ``is`` except to test for object identity, e.g. ``if obj is None``. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 21:47:10 2019 From: report at bugs.python.org (Bob Kline) Date: Mon, 02 Sep 2019 01:47:10 +0000 Subject: [issue38003] Incorrect "fixing" of isinstance tests for basestring In-Reply-To: <1567374009.32.0.247747586449.issue38003@roundup.psfhosted.org> Message-ID: <1567388830.64.0.437230512616.issue38003@roundup.psfhosted.org> Bob Kline added the comment: > Use str instead. Sure. I understand the advantages of the new approach to strings. Which, by the way, weren't available when this project began. I don't disagree with anything you say in the context of writing new code. I was, however, surprised and dismayed to learn of the cavalier approach the upgrade tool has taken to silently breaking existing code which it is claiming to "fix." Here's my favorite so far. --- cdr.py (original) +++ cdr.py (refactored) @@ -36,15 +36,15 @@ # ====================================================================== from six import itervalues try: - basestring + str is_python3 = False base64encode = base64.encodestring base64decode = base64.decodestring except: base64encode = base64.encodebytes base64decode = base64.decodebytes - basestring = (str, bytes) - unicode = str + str = (str, bytes) + str = str is_python3 = True We wrote this following the example of comparable techniques in http://python-future.org/compatible_idioms.html and similar guides to an upgrade path. Seems we're being punished for taking the trouble to make our code work with Python 2 and 3 during the transition period. :-( It's hard to see how this conversion resulted in something better than what we already had. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 22:04:49 2019 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 02 Sep 2019 02:04:49 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567389889.88.0.251982091836.issue24416@roundup.psfhosted.org> Paul Ganssle added the comment: > Dong-hee Na, if you want to make a fresh PR for this and bring it to fruition, I would be happy to review and apply it. It seems premature to say that you will accept a PR for this when there's no consensus for actually adding the feature, and it would be good to probably work out if it's even desirable before asking contributors to do more work on it. It seems like it would be better to argue the point of *why* you think a structseq actually solves the problem here. Is a struct sequence more backwards compatible than a namedtuple? Less? Is it as performant? Will it make it easier or harder to maintain compatibility between the C and pure Python implementations of the datetime module? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 23:55:42 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 02 Sep 2019 03:55:42 +0000 Subject: [issue37995] Multiline ast.dump() In-Reply-To: <1567243768.69.0.362429469264.issue37995@roundup.psfhosted.org> Message-ID: <1567396542.59.0.193995966575.issue37995@roundup.psfhosted.org> Change by Raymond Hettinger : Removed file: https://bugs.python.org/file48579/ast_bloop.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 1 23:56:09 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 02 Sep 2019 03:56:09 +0000 Subject: [issue37995] Multiline ast.dump() In-Reply-To: <1567243768.69.0.362429469264.issue37995@roundup.psfhosted.org> Message-ID: <1567396569.22.0.442879953993.issue37995@roundup.psfhosted.org> Change by Raymond Hettinger : Added file: https://bugs.python.org/file48580/ast_bloop.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 01:27:22 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 02 Sep 2019 05:27:22 +0000 Subject: [issue37934] Docs: Clarify NotImplemented use cases In-Reply-To: <1566596946.3.0.57144717386.issue37934@roundup.psfhosted.org> Message-ID: <1567402042.26.0.923463605899.issue37934@roundup.psfhosted.org> Kyle Stanley added the comment: Thanks for the feedback Vedran and Raymond. > It is not the purpose of the docs to list use cases. Mostly we say what something does or how it is defined. As Vedran says, how people use it is their own business. The underlying issue here seems to be that I misunderstood the existing section to suggest to suggest binary special methods are the only use case, which is probably a good argument in favor of not listing additional use cases. This can be misinterpreted as suggesting that others are not recommended, and lead to further confusion. First sentence of the NotImplemented documentation: > Special value which should be returned by the binary special methods (e.g. __eq__(), __lt__(), __add__(), __rsub__(), etc.) to indicate that the operation is not implemented with respect to the other type; may be returned by the in-place binary special methods (e.g. __imul__(), __iand__(), etc.) for the same purpose. Would it be viable to rephrase the existing section in a manner that explains the functional purpose of NotImplemented without revolving around its use case in binary special methods? > Also, please be careful expanded the docs. They quickly become a promise. Good point, I may not have adequately considered that mentioning a use case turns into a promise for that functionality. This could easily result in a significant long-term maintenance cost. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 01:45:05 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 02 Sep 2019 05:45:05 +0000 Subject: [issue37934] Docs: Clarify NotImplemented use cases In-Reply-To: <1566596946.3.0.57144717386.issue37934@roundup.psfhosted.org> Message-ID: <1567403105.67.0.510346052663.issue37934@roundup.psfhosted.org> Kyle Stanley added the comment: > Would it be viable to rephrase the existing section in a manner that explains the functional purpose of NotImplemented without revolving around its use case in binary special methods? To expand further upon this, here's an initial idea for improving the first sentence: A special value used to indicate that an operation is not supported between specific types. The section regarding it's usage in binary special methods could potentially remain. I'm thinking the main issue here (if there is one) is that the NotImplemented constant is defined _exclusively_ from a specific use case, rather than its general purpose. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 03:57:04 2019 From: report at bugs.python.org (Inada Naoki) Date: Mon, 02 Sep 2019 07:57:04 +0000 Subject: [issue38004] Duplicated sections in changelog Message-ID: <1567411024.45.0.536092660752.issue38004@roundup.psfhosted.org> New submission from Inada Naoki : See TOC in https://docs.python.org/3.7/whatsnew/changelog.html Some releases (*) have multiple "Library" and "Security" sections. (*) e.g. 3.6.0a3, 3.6.0a2, 3.6.0a1, 3.5.3rc1, 3.5.2rc1 ---------- assignee: docs at python components: Documentation messages: 350971 nosy: docs at python, inada.naoki priority: normal severity: normal status: open title: Duplicated sections in changelog versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 04:08:53 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 02 Sep 2019 08:08:53 +0000 Subject: [issue38004] Duplicated sections in changelog In-Reply-To: <1567411024.45.0.536092660752.issue38004@roundup.psfhosted.org> Message-ID: <1567411733.32.0.133924530328.issue38004@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 04:27:13 2019 From: report at bugs.python.org (hongweipeng) Date: Mon, 02 Sep 2019 08:27:13 +0000 Subject: [issue36946] Possible signed integer overflow in slice handling In-Reply-To: <1558072124.41.0.0531416904304.issue36946@roundup.psfhosted.org> Message-ID: <1567412833.67.0.998046194606.issue36946@roundup.psfhosted.org> Change by hongweipeng : ---------- pull_requests: +15305 pull_request: https://github.com/python/cpython/pull/15639 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 05:11:14 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Sep 2019 09:11:14 +0000 Subject: [issue38005] Coercing strings and non-integer numbers to interpreter ID Message-ID: <1567415474.91.0.412541266394.issue38005@roundup.psfhosted.org> New submission from Serhiy Storchaka : Is it correct that strings, bytes objects, bytearrays, floats, fractions, decimals can be coerced to an interpreter ID? >>> import _xxsubinterpreters as interpreters >>> id = interpreters.InterpreterID('10', force=True) >>> id == 10 True >>> id == 10.1 True >>> id == '1_0' True >>> id == bytearray(b'10') True Should not the constructor accept only ints and int-like objects and the comparison return True only for integer numbers? There are other bugs here: raising OverflowError on comparison with large numbers and silencing all errors in some circumstances that can lead to returning a wrong result when errors like KeyboardInterrupt, RecursionError, MemoryError are occurred. ---------- messages: 350972 nosy: eric.snow, serhiy.storchaka priority: normal severity: normal status: open title: Coercing strings and non-integer numbers to interpreter ID _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 05:13:00 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 02 Sep 2019 09:13:00 +0000 Subject: [issue37948] get_type_hints fails if there are un-annotated fields in a dataclass In-Reply-To: <1566800952.19.0.982220665774.issue37948@roundup.psfhosted.org> Message-ID: <1567415580.47.0.778667105911.issue37948@roundup.psfhosted.org> Ivan Levkivskyi added the comment: It looks like https://github.com/python/cpython/pull/9518 will fix also this one. ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 05:48:27 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 02 Sep 2019 09:48:27 +0000 Subject: [issue38006] _PyFunction_Vectorcall() can segfault on process exit Message-ID: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> New submission from Christian Heimes : I have a case of a segfault on Fedora 32 (currently rawhide) with Python 3.8b4 and FreeIPA. The ipactl Python helper crashes with a segfault when the Python process exits. The segfault occurs in _PyFunction_Vectorcall() with a weakref related local scope function that has a NULL func_code pointer. _PyFunction_Vectorcall() does not check the code object for NULL and access the variable without check: Program received signal SIGSEGV, Segmentation fault. 0x00007ffff7be354f in _PyFunction_Vectorcall (func=, stack=0x7fffffffdb50, nargsf=1, kwnames=0x0) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Objects/call.c:395 395 Py_ssize_t nkwargs = (kwnames == NULL) ? 0 : PyTuple_GET_SIZE(kwnames); (gdb) bt #0 0x00007ffff7be354f in _PyFunction_Vectorcall (func=, stack=0x7fffffffdb50, nargsf=1, kwnames=0x0) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Objects/call.c:395 #1 0x00007ffff7bb16b0 in _PyObject_Vectorcall (kwnames=0x0, nargsf=1, args=0x7fffffffdb50, callable=) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Include/cpython/abstract.h:127 #2 _PyObject_FastCall (nargs=1, args=0x7fffffffdb50, func=) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Include/cpython/abstract.h:147 #3 object_vacall (base=, callable=, vargs=) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Objects/call.c:1186 #4 0x00007ffff7bb19e1 in PyObject_CallFunctionObjArgs (callable=callable at entry=) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Objects/call.c:1259 #5 0x00007ffff7c3f7c3 in handle_callback (ref=, callback=) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Objects/weakrefobject.c:877 #6 0x00007ffff7c01bf7 in PyObject_ClearWeakRefs (object=) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Objects/weakrefobject.c:922 #7 0x00007fffe905babc in ctypedescr_dealloc () from /usr/lib64/python3.8/site-packages/_cffi_backend.cpython-38-x86_64-linux-gnu.so #8 0x00007fffe9058825 in cfield_dealloc () from /usr/lib64/python3.8/site-packages/_cffi_backend.cpython-38-x86_64-linux-gnu.so #9 0x00007ffff7ba4c65 in _Py_DECREF (filename=, lineno=541, op=) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Objects/dictobject.c:2000 #10 _Py_XDECREF (op=) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Include/object.h:541 #11 free_keys_object (keys=0x55555609f590) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Objects/dictobject.c:580 #12 dictkeys_decref (dk=0x55555609f590) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Objects/dictobject.c:324 #13 dict_dealloc (mp=0x7fffe6dd5340) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Objects/dictobject.c:1994 #14 0x00007fffe905bb25 in ctypedescr_dealloc () from /usr/lib64/python3.8/site-packages/_cffi_backend.cpython-38-x86_64-linux-gnu.so #15 0x00007ffff7ba5058 in _Py_DECREF (filename=, lineno=541, op=) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Include/object.h:478 #16 _Py_XDECREF (op=) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Include/object.h:541 #17 tupledealloc (op=0x7fffe6e3bbb0) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Objects/tupleobject.c:247 #18 0x00007ffff7ba5058 in _Py_DECREF (filename=, lineno=541, op=) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Include/object.h:478 #19 _Py_XDECREF (op=) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Include/object.h:541 #20 tupledealloc (op=0x7fffe6e55b80) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Objects/tupleobject.c:247 #21 0x00007ffff7c16b76 in _Py_DECREF (filename=0x7ffff7d2e6a8 "/builddir/build/BUILD/Python-3.8.0b4/Objects/typeobject.c", lineno=1110, op=) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Include/object.h:478 #22 clear_slots (self=, type=0x55555559d0d0) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Objects/typeobject.c:1110 #23 subtype_dealloc (self=) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Objects/typeobject.c:1262 #24 0x00007ffff7ba4c65 in _Py_DECREF (filename=, lineno=541, op=) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Objects/dictobject.c:2000 #25 _Py_XDECREF (op=) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Include/object.h:541 #26 free_keys_object (keys=0x555556078d30) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Objects/dictobject.c:580 #27 dictkeys_decref (dk=0x555556078d30) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Objects/dictobject.c:324 #28 dict_dealloc (mp=0x7fffe6eba6c0) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Objects/dictobject.c:1994 #29 0x00007ffff7b98a4b in _Py_DECREF (filename=, lineno=541, op=) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Include/object.h:478 #30 _Py_XDECREF (op=) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Include/object.h:541 #31 cell_dealloc (op=0x7fffe6ebe2e0) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Objects/cellobject.c:84 #32 0x00007ffff7ba5058 in _Py_DECREF (filename=, lineno=541, op=) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Include/object.h:478 #33 _Py_XDECREF (op=) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Include/object.h:541 #34 tupledealloc (op=0x7fffe6ebe310) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Objects/tupleobject.c:247 #35 0x00007ffff7b991c2 in _Py_DECREF (filename=0x7ffff7d2e460 "/builddir/build/BUILD/Python-3.8.0b4/Objects/funcobject.c", lineno=584, op=) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Include/object.h:478 #36 func_clear (op=0x7fffe6ebfd30) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Objects/funcobject.c:584 #37 0x00007ffff7ba5f84 in delete_garbage (state=, state=, old=, collectable=) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Modules/gcmodule.c:929 #38 collect (generation=2, n_collected=0x0, n_uncollectable=0x0, nofail=1, state=0x7ffff7dd9598 <_PyRuntime+344>) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Modules/gcmodule.c:1106 #39 0x00007ffff7cac8c2 in _PyGC_CollectNoFail () at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Modules/gcmodule.c:1848 #40 0x00007ffff7cacb74 in PyImport_Cleanup () at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Python/import.c:541 #41 0x00007ffff7cacf56 in Py_FinalizeEx () at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Python/pylifecycle.c:1226 #42 0x00007ffff7cad088 in Py_Exit (sts=0) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Python/pylifecycle.c:2248 #43 0x00007ffff7cad0cf in handle_system_exit () at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Python/pythonrun.c:658 #44 0x00007ffff7cad219 in _PyErr_PrintEx (set_sys_last_vars=1, tstate=0x55555555bfb0) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Python/pythonrun.c:755 #45 PyErr_PrintEx (set_sys_last_vars=set_sys_last_vars at entry=1) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Python/pythonrun.c:755 #46 0x00007ffff7cad23a in PyErr_Print () at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Python/pythonrun.c:761 #47 0x00007ffff7b91b42 in PyRun_SimpleFileExFlags (fp=, filename=, closeit=, flags=0x7fffffffe178) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Python/pythonrun.c:434 #48 0x00007ffff7cae36f in pymain_run_file (cf=0x7fffffffe178, config=0x55555555b410) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Modules/main.c:383 #49 pymain_run_python (exitcode=0x7fffffffe170) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Modules/main.c:567 #50 Py_RunMain () at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Modules/main.c:646 #51 0x00007ffff7cae559 in Py_BytesMain (argc=, argv=) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Modules/main.c:700 #52 0x00007ffff7e21193 in __libc_start_main () from /lib64/libc.so.6 #53 0x000055555555508e in _start () It looks like the func object is the local remove function of weakref.WeakValueDictionary() implementation, https://github.com/python/cpython/blob/353053d9ad08fea0e205e6c008b8a4350c0188e6/Lib/weakref.py#L90-L112 All function object fields except func_qualname and vectorcall are already NULL. (gdb) print ((PyFunctionObject*)func).func_annotations $19 = 0x0 (gdb) print ((PyFunctionObject*)func).func_closure $20 = 0x0 (gdb) print ((PyFunctionObject*)func).func_code $21 = 0x0 (gdb) print ((PyFunctionObject*)func).func_defaults $22 = 0x0 (gdb) print ((PyFunctionObject*)func).func_dict $23 = 0x0 (gdb) print ((PyFunctionObject*)func).func_doc $24 = 0x0 (gdb) print ((PyFunctionObject*)func).func_globals $25 = 0x0 (gdb) print ((PyFunctionObject*)func).func_kwdefaults $26 = 0x0 (gdb) print ((PyFunctionObject*)func).func_module $27 = 0x0 (gdb) print ((PyFunctionObject*)func).func_name $28 = 0x0 (gdb) print ((PyFunctionObject*)func).func_qualname $29 = 'WeakValueDictionary.__init__..remove' (gdb) print ((PyFunctionObject*)func).func_weakreflist $30 = 0x0 (gdb) print ((PyFunctionObject*)func).vectorcall $31 = (vectorcallfunc) 0x7ffff7be3530 <_PyFunction_Vectorcall> (gdb) print func.ob_refcnt $32 = 135 (gdb) print func.ob_type $33 = (struct _typeobject *) 0x7ffff7dd4e80 The Fedora downstream bug is https://bugzilla.redhat.com/show_bug.cgi?id=1747901 ---------- components: Interpreter Core keywords: 3.8regression messages: 350974 nosy: Mark.Shannon, christian.heimes, lukasz.langa, petr.viktorin, vstinner priority: release blocker severity: normal stage: needs patch status: open title: _PyFunction_Vectorcall() can segfault on process exit type: crash versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 06:06:56 2019 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 02 Sep 2019 10:06:56 +0000 Subject: [issue38006] _PyFunction_Vectorcall() can segfault on process exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567418816.25.0.641662147457.issue38006@roundup.psfhosted.org> Petr Viktorin added the comment: I don't understand how the function ended up with func_code=NULL. That shouldn't be a valid function to call, IMO. Do you have any info on how the function ended up in that state? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 06:11:48 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 02 Sep 2019 10:11:48 +0000 Subject: [issue38006] _PyFunction_Vectorcall() can segfault on process exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567419108.13.0.476727369658.issue38006@roundup.psfhosted.org> Christian Heimes added the comment: Not yet. My current hypothesis is the function code object is already cleaned up *somehow*. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 06:23:47 2019 From: report at bugs.python.org (Leslie) Date: Mon, 02 Sep 2019 10:23:47 +0000 Subject: [issue38007] Regression: name of PyType_Spec::slots conflicts with Qt macro Message-ID: <1567419827.68.0.665093966998.issue38007@roundup.psfhosted.org> New submission from Leslie : In Feb 20, 2006, in commit https://github.com/python/cpython/commit/c255c7bef7621596869f56d887ac3ccd5b536708 the bug https://bugs.python.org/issue1086854 had been fixed. In Dec 3, 2010, in commit https://github.com/python/cpython/commit/4d0d471a8031de90a2b1ce99c4ac4780e60b3bc9 basically the same issue has been introduced again, because it added a "slots" member to the added PyType_Spec struct. The proposed solution is the same like in the earlier commit, which is explained in https://bugs.python.org/msg23759 : protect PyType_Spec struct members with prefix: ts_name, ts_doc, ts_basicsize, ts_itemsize, ts_flags, ts_slots ---------- messages: 350977 nosy: Leslie priority: normal severity: normal status: open title: Regression: name of PyType_Spec::slots conflicts with Qt macro type: compile error versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 06:24:19 2019 From: report at bugs.python.org (Roundup Robot) Date: Mon, 02 Sep 2019 10:24:19 +0000 Subject: [issue36309] Remove tempfile.mktemp() In-Reply-To: <1552697345.02.0.780612142064.issue36309@roundup.psfhosted.org> Message-ID: <1567419859.83.0.57793837664.issue36309@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +15306 pull_request: https://github.com/python/cpython/pull/15640 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 06:24:55 2019 From: report at bugs.python.org (Alexandru Ardelean) Date: Mon, 02 Sep 2019 10:24:55 +0000 Subject: [issue37916] distutils: allow overriding of the RANLIB command on macOS (darwin) In-Reply-To: <1566473837.96.0.294748627211.issue37916@roundup.psfhosted.org> Message-ID: <1567419895.61.0.461887764649.issue37916@roundup.psfhosted.org> Alexandru Ardelean added the comment: ping here :) any thoughts/feedback? the fix looks interesting, and I'm also interested in seeing a resolution for this ---------- nosy: +Alexandru Ardelean _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 06:52:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Sep 2019 10:52:44 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567421564.69.0.149997030505.issue24416@roundup.psfhosted.org> STINNER Victor added the comment: > By contrast, returning a plain tuple from `isocalendar()` is the easier *and* more performant thing to do, and given that any benefits seem marginal I'm against the switch. Does someone have benchmark numbers? If we go with structseq, creating a new instance should be almost as efficient as creating a tuple, no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 06:57:45 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 02 Sep 2019 10:57:45 +0000 Subject: [issue37835] typing.get_type_hints wrong namespace for forward-declaration of inner class In-Reply-To: <1565689003.91.0.0312877377737.issue37835@roundup.psfhosted.org> Message-ID: <1567421865.32.0.822204648722.issue37835@roundup.psfhosted.org> Ivan Levkivskyi added the comment: > Maybe any upcoming python version could store this information in __local__ ? So maybe we could clone this ticket to the python core in order to address this? I would say it is a too big change, and it is unlikely to happen only for the reason like this issue. > Why is the own class not always inside the __globals__ list of the methods? Is there a reason? Or is this just a missing feature of the python-core? Because this is a reference to the actual module global namespace. If the class defined inside another function, it is not the module namespace. You can probably use the metaclass workaround, but note that it will actually modify the module globals (since __globals__ is not a copy). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 06:57:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Sep 2019 10:57:55 +0000 Subject: [issue38006] _PyFunction_Vectorcall() can segfault on process exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567421875.09.0.150862416859.issue38006@roundup.psfhosted.org> STINNER Victor added the comment: > I don't understand how the function ended up with func_code=NULL. That shouldn't be a valid function to call, IMO. Do you have any info on how the function ended up in that state? It doesn't seem possible to create a function with func_code=NULL, nor to set func_code to NULL. func_code can be be set to NULL by func_clear() which is called by func_dealloc(). I bet that func_clear() has been called since most func fields are set to NULL, which is consistent with: static int func_clear(PyFunctionObject *op) { Py_CLEAR(op->func_code); Py_CLEAR(op->func_globals); Py_CLEAR(op->func_module); Py_CLEAR(op->func_name); Py_CLEAR(op->func_defaults); Py_CLEAR(op->func_kwdefaults); Py_CLEAR(op->func_doc); Py_CLEAR(op->func_dict); Py_CLEAR(op->func_closure); Py_CLEAR(op->func_annotations); Py_CLEAR(op->func_qualname); return 0; } The question is how is it possible that a deallocated function is still accessed? It smells like a borrowed reference somewhere in the call chain. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 06:58:44 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 02 Sep 2019 10:58:44 +0000 Subject: [issue37835] typing.get_type_hints wrong namespace for forward-declaration of inner class In-Reply-To: <1565689003.91.0.0312877377737.issue37835@roundup.psfhosted.org> Message-ID: <1567421924.49.0.469307411942.issue37835@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- Removed message: https://bugs.python.org/msg350980 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 06:59:50 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 02 Sep 2019 10:59:50 +0000 Subject: [issue37835] typing.get_type_hints wrong namespace for forward-declaration of inner class In-Reply-To: <1565689003.91.0.0312877377737.issue37835@roundup.psfhosted.org> Message-ID: <1567421990.36.0.149233357364.issue37835@roundup.psfhosted.org> Ivan Levkivskyi added the comment: (Sorry for typos, fixed now.) > Maybe any upcoming python version could store this information in __local__ ? So maybe we could clone this ticket to the python core in order to address this? I would say it is a too big change, and it is unlikely to happen only for the reason like this issue. > Why is the own class not always inside the __globals__ list of the methods? Is there a reason? Or is this just a missing feature of the python-core? Because this is a reference to the actual module global namespace. If the class is defined inside another function, it is not in the module namespace. You can probably use the metaclass workaround, but note that it will actually modify the module globals (since __globals__ is not a copy). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 07:00:31 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 02 Sep 2019 11:00:31 +0000 Subject: [issue38006] _PyFunction_Vectorcall() can segfault on process exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567422031.76.0.99325151133.issue38006@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +jdemeyer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 07:08:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Sep 2019 11:08:05 +0000 Subject: [issue38006] _PyFunction_Vectorcall() can segfault on process exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567422485.41.0.517368179475.issue38006@roundup.psfhosted.org> STINNER Victor added the comment: Using gdb, I checked if func_clear() can be cleared outside func_dealloc(): yes, delete_garbage() (gcmodule.c) calls type->clear(). But I'm surprised that the function would be seen as "unreachable" if it's reference counter was equal to 135: (gdb) print func.ob_refcnt $32 = 135 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 07:10:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Sep 2019 11:10:03 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567422603.4.0.177038495777.issue38006@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: _PyFunction_Vectorcall() can segfault on process exit -> Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 07:10:15 2019 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 02 Sep 2019 11:10:15 +0000 Subject: [issue38005] Coercing strings and non-integer numbers to interpreter ID In-Reply-To: <1567415474.91.0.412541266394.issue38005@roundup.psfhosted.org> Message-ID: <1567422615.13.0.736434718.issue38005@roundup.psfhosted.org> Mark Dickinson added the comment: Urk! Having `10 == id == 10.1` should imply `10 == 10.1`, by transitivity. Are interpreter.InterpreterID objects hashable? If so, we've got a violation of the rule that `x == y` implies `hash(x) == hash(y)`. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 07:13:52 2019 From: report at bugs.python.org (Orivej Desh) Date: Mon, 02 Sep 2019 11:13:52 +0000 Subject: [issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse) In-Reply-To: <1279836939.11.0.811316280273.issue9334@psf.upfronthosting.co.za> Message-ID: <1567422832.25.0.977488486456.issue9334@roundup.psfhosted.org> Change by Orivej Desh : ---------- nosy: +orivej _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 07:27:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Sep 2019 11:27:53 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567423673.85.0.0203058352468.issue38006@roundup.psfhosted.org> STINNER Victor added the comment: (gdb) print ((PyFunctionObject*)func).func_qualname $29 = 'WeakValueDictionary.__init__..remove' This is a temporary remove() function declared in weakref.WeakValueDictionary constructor: class WeakKeyDictionary(_collections_abc.MutableMapping): def __init__(self, dict=None): def remove(k, selfref=ref(self)): ... self._remove = remove ... def __setitem__(self, key, value): self.data[ref(key, self._remove)] = value ... Simplified gdb traceback: Py_FinalizeEx() -> PyImport_Cleanup() -> _PyGC_CollectNoFail() -> delete_garbage() -> func_clear(op=0x7fffe6ebfd30) at /usr/src/debug/python3-3.8.0~b4-1.fc32.x86_64/Objects/funcobject.c:584 Py_CLEAR(op->func_closure); -> tupledealloc() -> cell_dealloc() -> dict_dealloc() -> dictkeys_decref() -> cfield_dealloc () from _cffi_backend -> PyObject_ClearWeakRefs() -> _PyFunction_Vectorcall (func=, ...) PyImport_Cleanup() calls delete_garbage() which calls func_clear(op=0x7fffe6ebfd30). But while the function closure is destroyed, a cffi object stored in a dict (namespace?) (stored in the function closure) is cleared, and there was a weak reference to this cffi object with a callback... which is the cleared function (Python object 0x7fffe6ebfd30)... -- I don't understand why/how remove() gets a closure. I modified weakref.py to ensure that remove.__closure__ is None: test_weakref still pass. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 07:31:52 2019 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 02 Sep 2019 11:31:52 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567423912.11.0.980898256725.issue24416@roundup.psfhosted.org> Dong-hee Na added the comment: @vstinner == baseline == ./python.exe -m timeit -r11 -s 'import datetime' -s 'a = datetime.datetime.now().isocalendar()' 50000000 loops, best of 11: 8.73 nsec per loop == proposed == ./python.exe -m timeit -r11 -s 'import datetime' -s 'a = datetime.datetime.now().isocalendar()' 50000000 loops, best of 11: 8.72 nsec per loop Let me know if the benchmark code is not appropriate ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 07:37:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Sep 2019 11:37:57 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567424277.05.0.722907901748.issue38006@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +15307 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15641 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 07:40:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Sep 2019 11:40:33 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567424433.19.0.0727228754566.issue38006@roundup.psfhosted.org> STINNER Victor added the comment: > I don't understand why/how remove() gets a closure. Ok, I found the reason and I wrote PR 15641 to fix it. Previous fix of WeakValueDictionary remove() function: commit 9cd7e17640a49635d1c1f8c2989578a8fc2c1de6 Author: ?ukasz Langa Date: Fri Feb 10 00:14:55 2017 -0800 Fix #29519: weakref spewing exceptions during interp finalization ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 07:44:10 2019 From: report at bugs.python.org (Divij Rajkumar) Date: Mon, 02 Sep 2019 11:44:10 +0000 Subject: [issue38008] ContextManager and AsyncContextManager protocols can't be subclassed Message-ID: <1567424650.87.0.55127247234.issue38008@roundup.psfhosted.org> Change by Divij Rajkumar : ---------- nosy: divijrajkumar priority: normal severity: normal status: open title: ContextManager and AsyncContextManager protocols can't be subclassed type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 07:47:29 2019 From: report at bugs.python.org (Divij Rajkumar) Date: Mon, 02 Sep 2019 11:47:29 +0000 Subject: [issue38008] ContextManager and AsyncContextManager protocols can't be subclassed Message-ID: <1567424849.42.0.765242467495.issue38008@roundup.psfhosted.org> New submission from Divij Rajkumar : Reported this initially on github - https://github.com/python/typing/pull/650 The problem is in the typing code that checks if any of the parent classes for a Protocol are builtin protocols. The code today maintains a whitelist of builtin protocols that are okay to be subclassed, but expects them all to live within the 'collections.abc' module. This means 'typing.ContextManager' and 'typing.AsyncContextManager' cannot be subclassed, even though those protocols are listing in the whitelist. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 07:57:37 2019 From: report at bugs.python.org (Divij Rajkumar) Date: Mon, 02 Sep 2019 11:57:37 +0000 Subject: [issue38008] ContextManager and AsyncContextManager protocols can't be subclassed In-Reply-To: <1567424849.42.0.765242467495.issue38008@roundup.psfhosted.org> Message-ID: <1567425457.22.0.830462511918.issue38008@roundup.psfhosted.org> Divij Rajkumar added the comment: I'd like to take a stab at putting up a patch for this but I've never contributed anything to Python before, so I'll have a read through the contribution docs and put up a PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 08:09:12 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 02 Sep 2019 12:09:12 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567426152.62.0.109186833377.issue38006@roundup.psfhosted.org> Christian Heimes added the comment: Your workaround solves the segfault issue for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 08:15:07 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Mon, 02 Sep 2019 12:15:07 +0000 Subject: [issue37969] urllib.parse functions reporting false equivalent URIs In-Reply-To: <1567004091.58.0.0475239472757.issue37969@roundup.psfhosted.org> Message-ID: <1567426507.99.0.404586155777.issue37969@roundup.psfhosted.org> Change by G?ry : ---------- keywords: +patch pull_requests: +15308 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15642 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 08:29:24 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Sep 2019 12:29:24 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567427364.75.0.171779291684.issue38006@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +pablogsal, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 08:34:51 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Sep 2019 12:34:51 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567427691.78.0.937566676122.issue38006@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I think the real problem is in vectorcall. tp_clear will make sure all internal pointers are either NULL or valid (by using Py_CLEAR, which also protects against re-entrancy) and it the responsibility of the object or its users to check that the fields that are needed are valid. From the docs on tp_clear: > The Py_CLEAR() macro should be used, because clearing references is delicate: the reference to the contained object must not be decremented until after the pointer to the contained object is set to NULL. This is because decrementing the reference count may cause the contained object to become trash, triggering a chain of reclamation activity that may include invoking arbitrary Python code (due to finalizers, or weakref callbacks, associated with the contained object). If it?s possible for such code to reference self again, it?s important that the pointer to the contained object be NULL at that time, so that self knows the contained object can no longer be used. Notice the "so that self knows the contained object can no longer be used". I think _PyFunction_Vectorcall is missing the check "to see of the contained object can or cannot be used". Here the contained object being everything that has being cleaned before: Py_CLEAR(op->func_code); Py_CLEAR(op->func_globals); Py_CLEAR(op->func_module); Py_CLEAR(op->func_name); Py_CLEAR(op->func_defaults); Py_CLEAR(op->func_kwdefaults); Py_CLEAR(op->func_doc); Py_CLEAR(op->func_dict); Py_CLEAR(op->func_closure); <----- Everything before this Py_CLEAR(op->func_annotations); Py_CLEAR(op->func_qualname); I think it will be enough to make a check for func_code being NULL in _PyFunction_Vectorcall or before. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 08:41:34 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Sep 2019 12:41:34 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567428094.25.0.215582960172.issue38006@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: In particular, this was not happening before because the function type did not implement tp_clear: https://github.com/python/cpython/blob/3.7/Objects/funcobject.c#L615 The new implementation of tp_clear without checks is allowing this to happen. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 08:44:15 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Sep 2019 12:44:15 +0000 Subject: [issue33418] Memory leaks in functions In-Reply-To: <1525370063.61.0.682650639539.issue33418@psf.upfronthosting.co.za> Message-ID: <1567428255.9.0.888187844321.issue33418@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: This change introduced the possibility to have function objects in an inconsistent state. For example, when calling tp_clear on the function some code must be invoked that tries to ca the function but some fields are NULL causing a crash. I think we should revert this and think better how to protect against this situation. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 08:44:28 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Sep 2019 12:44:28 +0000 Subject: [issue33418] Memory leaks in functions In-Reply-To: <1525370063.61.0.682650639539.issue33418@psf.upfronthosting.co.za> Message-ID: <1567428268.53.0.740516780709.issue33418@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 08:45:38 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Sep 2019 12:45:38 +0000 Subject: [issue33418] Memory leaks in functions In-Reply-To: <1525370063.61.0.682650639539.issue33418@psf.upfronthosting.co.za> Message-ID: <1567428338.54.0.228416662189.issue33418@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: See also https://bugs.python.org/issue38006 ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 08:46:24 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Sep 2019 12:46:24 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567428384.13.0.54247966109.issue38006@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: See also https://bugs.python.org/issue33418 as the potential source of the problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 08:55:34 2019 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 02 Sep 2019 12:55:34 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567428934.03.0.355357208086.issue38006@roundup.psfhosted.org> Petr Viktorin added the comment: I'm not sure adding a check would solve this. What should be done when a function with func_code=NULL is called? "Silently do nothing" is not really an option; raising an exception wouldn't help much in this case. I wonder if a function's tp_clear we should clear the mutable parts (like func_closure) before the immutable ones (func_code). Any access to the immutable ones should have checks (and probably raise exceptions if those are NULL). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 09:07:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Sep 2019 13:07:54 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567429674.85.0.233037442686.issue38006@roundup.psfhosted.org> STINNER Victor added the comment: I'm now able to reproduce the FreeIPA crash. In short: * Get a Fedora Rawhide VM (to get Python 3.8 as "python3", it's more convenient) * Install FreeIPA (dnf install freeipa-server) * Run: ipa-server-install --help * Python does crash at exit > In particular, this was not happening before because the function type did not implement tp_clear: > https://github.com/python/cpython/blob/3.7/Objects/funcobject.c#L615 I confirm that the patch below does fix the FreeIPA crash: diff --git a/Objects/funcobject.c b/Objects/funcobject.c index df5cc2d3f5..357372c565 100644 --- a/Objects/funcobject.c +++ b/Objects/funcobject.c @@ -669,7 +669,7 @@ PyTypeObject PyFunction_Type = { Py_TPFLAGS_METHOD_DESCRIPTOR, /* tp_flags */ func_new__doc__, /* tp_doc */ (traverseproc)func_traverse, /* tp_traverse */ - (inquiry)func_clear, /* tp_clear */ + (inquiry)0, /* tp_clear */ 0, /* tp_richcompare */ offsetof(PyFunctionObject, func_weakreflist), /* tp_weaklistoffset */ 0, /* tp_iter */ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 09:08:30 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Sep 2019 13:08:30 +0000 Subject: [issue33418] Memory leaks in functions In-Reply-To: <1525370063.61.0.682650639539.issue33418@psf.upfronthosting.co.za> Message-ID: <1567429710.68.0.738655677715.issue33418@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: fixed -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 09:09:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Sep 2019 13:09:25 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567429765.16.0.695078746544.issue38006@roundup.psfhosted.org> STINNER Victor added the comment: PyFunction_Type.tp_clear changed in bpo-33418 (previously, it was equal to 0: no clear method): commit 3c452404ae178b742967589a0bb4a5ec768d76e0 Author: INADA Naoki Date: Wed Jul 4 11:15:50 2018 +0900 bpo-33418: Add tp_clear for function object (GH-8058) Without tp_clear, GC can't break cyclic reference. It will cause memory leak when cyclic reference is created intentionally. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 09:15:12 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Sep 2019 13:15:12 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567430112.71.0.49399379208.issue38006@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: In https://bugs.python.org/issue33418 I proposed reverting tp_clear on function objects. >What should be done when a function with func_code=NULL is called? We can set the error indicator at least. Although I agree that it seems suboptimal. At least I think we should add an assertion to check that the function called is valid so we can identify this situation easier. What downsides do we see raising an exception? Notice that this can happen without involving weak references. For example: You have object A and B. A is a function. The destructor of B calls A. A and B are in a cycle. When calling tp_clear on A the refs of B reaches 0, trying to call A and .... Boom! Either we remove tp_clear or somehow we have to protect all callers of the function. Technically, any field cleared from tp_cleared leaves the function in an inconsistent state ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 09:39:28 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 02 Sep 2019 13:39:28 +0000 Subject: [issue38008] ContextManager and AsyncContextManager protocols can't be subclassed In-Reply-To: <1567424849.42.0.765242467495.issue38008@roundup.psfhosted.org> Message-ID: <1567431568.4.0.243166304972.issue38008@roundup.psfhosted.org> Ivan Levkivskyi added the comment: > I'd like to take a stab at putting up a patch for this Great, thanks! Go ahead and try it. ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 09:45:09 2019 From: report at bugs.python.org (Leslie) Date: Mon, 02 Sep 2019 13:45:09 +0000 Subject: [issue38007] Regression: name of PyType_Spec::slots conflicts with Qt macro In-Reply-To: <1567419827.68.0.665093966998.issue38007@roundup.psfhosted.org> Message-ID: <1567431909.41.0.397374354595.issue38007@roundup.psfhosted.org> Change by Leslie : ---------- keywords: +patch pull_requests: +15309 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15644 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 09:56:33 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Sep 2019 13:56:33 +0000 Subject: [issue38009] Handle weakreference callbacks invoked indirectly in the middle of a gc collection Message-ID: <1567432593.55.0.481148483159.issue38009@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : A weak reference may try to invoke a callback object that is being cleaned (tp_clear) by the garbage collector and it may be in an inconsistent state. As the garbage collector explicitly does not invoke callbacks that are part of the same cycle isolate as the weak reference (pretending that the weak reference was destroyed first), we should act in the same way when invoking callbacks using Objects/weakrefobject.c:handle_callback. For example, consider the following scenario: - F is a function. - An object O is in a cycle with F. - O has a weak reference with F as a callback. When running the garbage collector, is possible to end in Objects/weakrefobject.c:handle_callback if the tp_clear of F decrements the references of O, invoking the weak reference callback that will try to call F, which is in an incosistent state as is in the middle of its tp_clear and some internal fields may be NULL. ---------- components: Interpreter Core messages: 351001 nosy: pablogsal, pitrou, vstinner priority: normal severity: normal status: open title: Handle weakreference callbacks invoked indirectly in the middle of a gc collection versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 09:57:43 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Sep 2019 13:57:43 +0000 Subject: [issue38009] Handle weakreference callbacks invoked indirectly in the middle of a gc collection In-Reply-To: <1567432593.55.0.481148483159.issue38009@roundup.psfhosted.org> Message-ID: <1567432663.05.0.706409545097.issue38009@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Antoine, could you check that I am not missing something in this logic? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 09:58:09 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Sep 2019 13:58:09 +0000 Subject: [issue38009] Handle weakreference callbacks invoked indirectly in the middle of a gc collection In-Reply-To: <1567432593.55.0.481148483159.issue38009@roundup.psfhosted.org> Message-ID: <1567432689.58.0.0875062502027.issue38009@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +15310 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15645 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 10:01:01 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Sep 2019 14:01:01 +0000 Subject: [issue38009] Handle weakreference callbacks invoked indirectly in the middle of a gc collection In-Reply-To: <1567432593.55.0.481148483159.issue38009@roundup.psfhosted.org> Message-ID: <1567432861.96.0.263019182671.issue38009@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Check https://bugs.python.org/issue38006 for reference on this situation. I have the suspicion that something in this argument is wrong and the problem of arriving in this situation may be elsewhere, but I wanted to create this issue and show the proposed PR so we can discuss this better with more clarity. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 10:19:46 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 02 Sep 2019 14:19:46 +0000 Subject: [issue38010] Synchronize importlib.metadata with importlib_metadata 0.20 Message-ID: <1567433986.41.0.642198993364.issue38010@roundup.psfhosted.org> New submission from Jason R. Coombs : Importlib_metadata 0.20 addresses two issues (https://importlib-metadata.readthedocs.io/en/latest/changelog%20(links).html#id1). Sync those changes here. ---------- components: Library (Lib) messages: 351004 nosy: jaraco priority: normal severity: normal status: open title: Synchronize importlib.metadata with importlib_metadata 0.20 versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 10:24:34 2019 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Mon, 02 Sep 2019 14:24:34 +0000 Subject: [issue37934] Docs: Clarify NotImplemented use cases In-Reply-To: <1566596946.3.0.57144717386.issue37934@roundup.psfhosted.org> Message-ID: <1567434274.73.0.196274883372.issue37934@roundup.psfhosted.org> Vedran ?a?i? added the comment: Sorry, I think you still don't understand. The emulation of double dispatch by single dispatch, with all complications it brings, is the only reason NotImplemented exists. If Python didn't have binary operators (or inheritance), I'm quite sure it wouldn't have NotImplemented. The idea was never "oh, this method isn't supported", but much more precise "this half of protocol, with given ordering of operands according to a class hierarchy, isn't implemented - try the other half". Of course, you might argue that _once Python has NotImplemented_, it can be used elsewhere - but as I said, I don't think it should be encouraged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 10:27:55 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 02 Sep 2019 14:27:55 +0000 Subject: [issue38010] Synchronize importlib.metadata with importlib_metadata 0.20 In-Reply-To: <1567433986.41.0.642198993364.issue38010@roundup.psfhosted.org> Message-ID: <1567434475.44.0.692455761101.issue38010@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- keywords: +patch pull_requests: +15312 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15646 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 10:46:17 2019 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 02 Sep 2019 14:46:17 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567435577.39.0.906641061693.issue38006@roundup.psfhosted.org> Petr Viktorin added the comment: > What downsides do we see raising an exception? Yeah, on second thought, that would probably be best. We still want PR #15641 as well, so the exception doesn't actually happen in practice. Note that _PyEval_EvalCodeWithName (the main use of func_globals) already fails with an exception if globals is NULL. > Either we remove tp_clear or somehow we have to protect all callers of the function. Technically, any field cleared from tp_cleared leaves the function in an inconsistent state tp_clear has a purpose; it prevents memory leaks. That leaves protecting access to the cleared fields. (But we don't need to clear func_name and func_qualname as these must be strings.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 10:57:45 2019 From: report at bugs.python.org (Divij Rajkumar) Date: Mon, 02 Sep 2019 14:57:45 +0000 Subject: [issue38008] ContextManager and AsyncContextManager protocols can't be subclassed In-Reply-To: <1567424849.42.0.765242467495.issue38008@roundup.psfhosted.org> Message-ID: <1567436265.05.0.0860217224881.issue38008@roundup.psfhosted.org> Change by Divij Rajkumar : ---------- keywords: +patch pull_requests: +15313 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15647 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 11:06:40 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Sep 2019 15:06:40 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567436800.6.0.798488964711.issue38006@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: The more I think about this the more I think there is something else at play. If the GC is able to follow the dependency chain, all weakrefs should have been already managed correctly and PyObject_ClearWeakRefs should have never be invoked. I think *something* is not informing the gc about the dependency chain ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 11:08:06 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 02 Sep 2019 15:08:06 +0000 Subject: [issue38010] Synchronize importlib.metadata with importlib_metadata 0.20 In-Reply-To: <1567433986.41.0.642198993364.issue38010@roundup.psfhosted.org> Message-ID: <1567436886.64.0.917975118344.issue38010@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset 102e9b40ff6ee45086a5f0d34d9c60c581a1e5e5 by Jason R. Coombs in branch 'master': bpo-38010 Sync importlib.metadata with importlib_metadata 0.20. (GH-15646) https://github.com/python/cpython/commit/102e9b40ff6ee45086a5f0d34d9c60c581a1e5e5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 11:08:23 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 02 Sep 2019 15:08:23 +0000 Subject: [issue38010] Synchronize importlib.metadata with importlib_metadata 0.20 In-Reply-To: <1567433986.41.0.642198993364.issue38010@roundup.psfhosted.org> Message-ID: <1567436903.38.0.771432542335.issue38010@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15315 pull_request: https://github.com/python/cpython/pull/15648 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 11:11:22 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 02 Sep 2019 15:11:22 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567437082.57.0.845765990283.issue38006@roundup.psfhosted.org> Christian Heimes added the comment: It's going to be hard to figure that out. FreeIPA uses a ton of C extensions. Some are hand-written, some uses Cython, ctypes, and cffi. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 11:13:37 2019 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 02 Sep 2019 15:13:37 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567437217.7.0.598063506338.issue38006@roundup.psfhosted.org> Petr Viktorin added the comment: The traceback does have some ctypedescr_dealloc and cfield_dealloc from _cffi. Could you check what those are? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 11:13:44 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Sep 2019 15:13:44 +0000 Subject: [issue38009] Handle weakreference callbacks invoked indirectly in the middle of a gc collection In-Reply-To: <1567432593.55.0.481148483159.issue38009@roundup.psfhosted.org> Message-ID: <1567437224.05.0.163932195739.issue38009@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I think I am going to close this until we understand https://bugs.python.org/issue38006 better ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 11:13:50 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Sep 2019 15:13:50 +0000 Subject: [issue38009] Handle weakreference callbacks invoked indirectly in the middle of a gc collection In-Reply-To: <1567432593.55.0.481148483159.issue38009@roundup.psfhosted.org> Message-ID: <1567437230.02.0.751325749245.issue38009@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 11:15:57 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Sep 2019 15:15:57 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567437357.54.0.680256782899.issue38006@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I think the problem is that whatever is weak-referenced by the weak ref (CField_Type or similar) is not on the gc list. Because is not on the gc list, handle_weakrefs (https://github.com/python/cpython/blob/master/Modules/gcmodule.c#L1090) is not acting correctly on the weakreferences, clearing them before the tp_clear calls and therefore producing the crash. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 11:19:27 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Sep 2019 15:19:27 +0000 Subject: [issue33418] Memory leaks in functions In-Reply-To: <1525370063.61.0.682650639539.issue33418@psf.upfronthosting.co.za> Message-ID: <1567437567.42.0.971722240156.issue33418@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I am going to re-close this until we understand exactly how this is interacting with https://bugs.python.org/issue38006 as this seems more complicated than our first hypothesis. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 11:26:10 2019 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 02 Sep 2019 15:26:10 +0000 Subject: [issue34410] itertools.tee not thread-safe; can segfault interpreter when wrapped iterator releases GIL In-Reply-To: <1534298908.58.0.56676864532.issue34410@psf.upfronthosting.co.za> Message-ID: <1567437970.36.0.407949204229.issue34410@roundup.psfhosted.org> Xiang Zhang added the comment: >It may be better to apply it even to the developed version. There is nothing wrong with creating the tee iterator in one thread and using it the other thread. Or using the tee iterators with external locking. I afraid that PR 15567 can break a legitimate code. +1 on this. I think it's better to also apply #15625 to master branch. I don't think we should prevent creating the iterator in one thread and using it in others. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 11:44:02 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Sep 2019 15:44:02 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567439042.4.0.958395711969.issue38006@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Unless we are missing something I think this may be caused by something in cffi that is not implementing gc-related functions correctly, as PyObject_ClearWeakRefs should not be called from a gc run. Given how complicated this is and even if the possible solution is to fix the problem in cffi or elsewhere, we can add an extra check in PyObject_ClearWeakRefs to NOT call callbacks that are in the process of being collected. Technically we should never reach that code, but we won't be segfaulting and the cost is a redundant-check that will be false in the normal path. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 12:01:27 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 02 Sep 2019 16:01:27 +0000 Subject: [issue36853] inconsistencies in docs builds (Sphinx 2) In-Reply-To: <1557331408.26.0.606381835406.issue36853@roundup.psfhosted.org> Message-ID: <1567440087.38.0.788451329919.issue36853@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset e1786b54162e2bfb01ca5aafa19d596c4af5a803 by Jason R. Coombs (Anthony Sottile) in branch 'master': bpo-36853: Fix suspicious.py to actually print the unused rules (#13579) https://github.com/python/cpython/commit/e1786b54162e2bfb01ca5aafa19d596c4af5a803 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 12:01:36 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 02 Sep 2019 16:01:36 +0000 Subject: [issue36853] inconsistencies in docs builds (Sphinx 2) In-Reply-To: <1557331408.26.0.606381835406.issue36853@roundup.psfhosted.org> Message-ID: <1567440096.62.0.394934890506.issue36853@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15316 pull_request: https://github.com/python/cpython/pull/15649 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 12:10:40 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 02 Sep 2019 16:10:40 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567440640.25.0.546554992993.issue38006@roundup.psfhosted.org> Christian Heimes added the comment: The biggest CFFI based dependency of FreeIPA is cryptography, but cryptography does not use weakref in its sources. CFFI on the other hand has a WeakValueDictionary object attached to its internal typecache backend, https://bitbucket.org/cffi/cffi/src/bf80722dea36237710083315e336c81bc8571fd0/cffi/model.py#lines-572 . Perhaps that is the culprit? I checked the CTypeDescrObject from the stacktrace. Three out of three times it's for "unsigned long(*)(void *)". I wasn't able to get any useful information from the other fields yet. (gdb) up 7 #7 0x00007fffe905babc in ctypedescr_dealloc (ct=0x7fffe6d958b0) at c/_cffi_backend.c:401 401 PyObject_ClearWeakRefs((PyObject *) ct); (gdb) p (char*)ct.ct_name $1 = 0x7fffe6d95908 "unsigned long(*)(void *)" (gdb) p ct $2 = (CTypeDescrObject *) 0x7fffe6d958b0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 12:11:06 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 02 Sep 2019 16:11:06 +0000 Subject: [issue38010] Synchronize importlib.metadata with importlib_metadata 0.20 In-Reply-To: <1567433986.41.0.642198993364.issue38010@roundup.psfhosted.org> Message-ID: <1567440666.35.0.0451598878999.issue38010@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset bf69e160c431dc40d6530d427cec71c6a97522f5 by Jason R. Coombs (Miss Islington (bot)) in branch '3.8': bpo-38010 Sync importlib.metadata with importlib_metadata 0.20. (GH-15646) (GH-15648) https://github.com/python/cpython/commit/bf69e160c431dc40d6530d427cec71c6a97522f5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 12:11:28 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 02 Sep 2019 16:11:28 +0000 Subject: [issue38010] Synchronize importlib.metadata with importlib_metadata 0.20 In-Reply-To: <1567433986.41.0.642198993364.issue38010@roundup.psfhosted.org> Message-ID: <1567440688.72.0.150357519228.issue38010@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 12:12:22 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 02 Sep 2019 16:12:22 +0000 Subject: [issue36853] inconsistencies in docs builds (Sphinx 2) In-Reply-To: <1557331408.26.0.606381835406.issue36853@roundup.psfhosted.org> Message-ID: <1567440742.45.0.9015314334.issue36853@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset b365cfae4675ae90df329cb1179a5664e8283c13 by Jason R. Coombs (Miss Islington (bot)) in branch '3.8': bpo-36853: Fix suspicious.py to actually print the unused rules (GH-13579) (GH-15649) https://github.com/python/cpython/commit/b365cfae4675ae90df329cb1179a5664e8283c13 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 12:23:15 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Sep 2019 16:23:15 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567441395.77.0.20452285833.issue38006@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: For the weakref to be handled correctly the ctypedescr needs to be identified correctly as part of the isolated cycle. If is not in the isolated cycle something may be missing tp_traverse or the GC flags. Can you check if the ctypedescr is part of GC.objects()? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 12:25:02 2019 From: report at bugs.python.org (Noam Sturmwind) Date: Mon, 02 Sep 2019 16:25:02 +0000 Subject: [issue38011] xml.dom.pulldom splits text data at buffer size when parsing from file Message-ID: <1567441502.07.0.479687799441.issue38011@roundup.psfhosted.org> New submission from Noam Sturmwind : Python 3.7.4 When parsing a file using xml.dom.pulldom.parse(), if the parser is in the middle of text data when default_bufsize is reached it will split the text into multiple DOM Text nodes. This breaks code expecting that reads the text data using node.firstChild.data. ---------- components: Library (Lib) files: test.py messages: 351021 nosy: nsturmwind priority: normal severity: normal status: open title: xml.dom.pulldom splits text data at buffer size when parsing from file type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48581/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 12:26:02 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Sep 2019 16:26:02 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567441562.52.0.799099583767.issue38006@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Wait, I just checked and the call is done manually: static void ctypedescr_dealloc(CTypeDescrObject *ct) { PyObject_GC_UnTrack(ct); if (ct->ct_weakreflist != NULL) PyObject_ClearWeakRefs((PyObject *) ct); I am not sure call to PyObject_ClearWeakRefs from tp_dealloc is safe. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 12:26:18 2019 From: report at bugs.python.org (hongweipeng) Date: Mon, 02 Sep 2019 16:26:18 +0000 Subject: [issue37953] Fix ForwardRef equality checks In-Reply-To: <1566828364.46.0.753751170409.issue37953@roundup.psfhosted.org> Message-ID: <1567441578.15.0.0701167739134.issue37953@roundup.psfhosted.org> Change by hongweipeng : ---------- pull_requests: +15317 pull_request: https://github.com/python/cpython/pull/15650 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 12:27:21 2019 From: report at bugs.python.org (Noam Sturmwind) Date: Mon, 02 Sep 2019 16:27:21 +0000 Subject: [issue38011] xml.dom.pulldom splits text data at buffer size when parsing from file In-Reply-To: <1567441502.07.0.479687799441.issue38011@roundup.psfhosted.org> Message-ID: <1567441641.09.0.471155579158.issue38011@roundup.psfhosted.org> Noam Sturmwind added the comment: Note that the parser handles it correctly if the buffer boundary lies in the middle of a tag name; only if it lies in the middle of text data does it result in this behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 12:34:49 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 02 Sep 2019 16:34:49 +0000 Subject: [issue38010] Synchronize importlib.metadata with importlib_metadata 0.20 In-Reply-To: <1567433986.41.0.642198993364.issue38010@roundup.psfhosted.org> Message-ID: <1567442089.32.0.461122353769.issue38010@roundup.psfhosted.org> Change by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 12:35:31 2019 From: report at bugs.python.org (Noam Sturmwind) Date: Mon, 02 Sep 2019 16:35:31 +0000 Subject: [issue38011] xml.dom.pulldom splits text data at buffer size when parsing from file In-Reply-To: <1567441502.07.0.479687799441.issue38011@roundup.psfhosted.org> Message-ID: <1567442131.36.0.446987344506.issue38011@roundup.psfhosted.org> Noam Sturmwind added the comment: I believe this is working as intended, but is potentially surprising behavior. If so, perhaps a note could be added to the xml.dom documentation mentioning that this needs to be accounted for. Per https://stackoverflow.com/a/317494 a correct way to read the text is ''.join(t.nodeValue for t in node.childNodes if t.nodeType == t.TEXT_NODE) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 12:43:09 2019 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 02 Sep 2019 16:43:09 +0000 Subject: [issue35923] Update the BuiltinImporter in importlib to use loader._ORIGIN instead of a hardcoded value In-Reply-To: <1549490401.35.0.0798819591421.issue35923@roundup.psfhosted.org> Message-ID: <1567442589.95.0.139026958984.issue35923@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +15318 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15651 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 12:43:57 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 02 Sep 2019 16:43:57 +0000 Subject: [issue38011] xml.dom.pulldom splits text data at buffer size when parsing from file In-Reply-To: <1567441502.07.0.479687799441.issue38011@roundup.psfhosted.org> Message-ID: <1567442637.55.0.403250599113.issue38011@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 12:54:23 2019 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 02 Sep 2019 16:54:23 +0000 Subject: [issue35923] Update the BuiltinImporter in importlib to use loader._ORIGIN instead of a hardcoded value In-Reply-To: <1549490401.35.0.0798819591421.issue35923@roundup.psfhosted.org> Message-ID: <1567443263.08.0.301748327825.issue35923@roundup.psfhosted.org> Change by Dong-hee Na : ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 12:55:12 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Sep 2019 16:55:12 +0000 Subject: [issue38005] Coercing strings and non-integer numbers to interpreter ID and channel ID In-Reply-To: <1567415474.91.0.412541266394.issue38005@roundup.psfhosted.org> Message-ID: <1567443312.82.0.372612834972.issue38005@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- title: Coercing strings and non-integer numbers to interpreter ID -> Coercing strings and non-integer numbers to interpreter ID and channel ID _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 13:06:41 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Sep 2019 17:06:41 +0000 Subject: [issue38005] Coercing strings and non-integer numbers to interpreter ID and channel ID In-Reply-To: <1567415474.91.0.412541266394.issue38005@roundup.psfhosted.org> Message-ID: <1567444001.02.0.368744507784.issue38005@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +15319 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15652 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 13:10:02 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Sep 2019 17:10:02 +0000 Subject: [issue38005] Coercing strings and non-integer numbers to interpreter ID and channel ID In-Reply-To: <1567415474.91.0.412541266394.issue38005@roundup.psfhosted.org> Message-ID: <1567444202.62.0.153331825492.issue38005@roundup.psfhosted.org> Serhiy Storchaka added the comment: PR 15652 fixes some bugs. But I am not sure that floats and strings (and bytearrays, and fractions) should be accepted in constructors and several other functions. Although there was a test for strings. What is a use case? Should not an ID be an integer? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 13:10:16 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 02 Sep 2019 17:10:16 +0000 Subject: [issue38005] Coercing strings and non-integer numbers to interpreter ID and channel ID In-Reply-To: <1567415474.91.0.412541266394.issue38005@roundup.psfhosted.org> Message-ID: <1567444216.69.0.602685975449.issue38005@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- components: +Interpreter Core type: -> behavior versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 13:31:50 2019 From: report at bugs.python.org (Anthony Sottile) Date: Mon, 02 Sep 2019 17:31:50 +0000 Subject: [issue36853] inconsistencies in docs builds (Sphinx 2) In-Reply-To: <1557331408.26.0.606381835406.issue36853@roundup.psfhosted.org> Message-ID: <1567445510.77.0.150541556768.issue36853@roundup.psfhosted.org> Change by Anthony Sottile : ---------- pull_requests: +15320 pull_request: https://github.com/python/cpython/pull/15653 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 13:39:20 2019 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 02 Sep 2019 17:39:20 +0000 Subject: [issue38011] xml.dom.pulldom splits text data at buffer size when parsing from file In-Reply-To: <1567441502.07.0.479687799441.issue38011@roundup.psfhosted.org> Message-ID: <1567445960.2.0.876613389524.issue38011@roundup.psfhosted.org> Stefan Behnel added the comment: I don't see anything inherently wrong with having multiple text nodes. In fact, input with very large text content can be considered a security threat (c.f. compression bombs), so a tool like pulldom (which is designed for incremental processing) should not start collecting more content than the user asked for. Getting multiple text nodes in some cases seems an ok-ish price to pay. A documentation PR is welcome. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 13:51:03 2019 From: report at bugs.python.org (Pavan Kumar Uppalanchu) Date: Mon, 02 Sep 2019 17:51:03 +0000 Subject: [issue38012] Python Fuction min is case sentive ? Message-ID: <1567446663.85.0.249805930926.issue38012@roundup.psfhosted.org> New submission from Pavan Kumar Uppalanchu : I have printed min('Infinity') and min('infinity') . Both are printing different characters. In first case , It's printing 'I' and in second case, it's printing 'F' ---------- messages: 351027 nosy: uppalanchupavankumar45 at gmail.com priority: normal severity: normal status: open title: Python Fuction min is case sentive ? type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 13:52:36 2019 From: report at bugs.python.org (Pavan Kumar Uppalanchu) Date: Mon, 02 Sep 2019 17:52:36 +0000 Subject: [issue38012] Python Fuction min is case sentive ? In-Reply-To: <1567446663.85.0.249805930926.issue38012@roundup.psfhosted.org> Message-ID: <1567446756.85.0.780900737153.issue38012@roundup.psfhosted.org> Pavan Kumar Uppalanchu added the comment: when I try to print min('Infinity') and min (InFinity). In first case, it's printing 'I' and in second case it's printing 'F'. Is this issue or working as Is ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 13:58:07 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 02 Sep 2019 17:58:07 +0000 Subject: [issue38012] Python Fuction min is case sentive ? In-Reply-To: <1567446663.85.0.249805930926.issue38012@roundup.psfhosted.org> Message-ID: <1567447087.09.0.159129472609.issue38012@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Here min uses the ASCII value of the letters for comparison. So for 'Infinity' 'I' (73) has the lowest value and for 'inFinity' 'F' (70) has the lowest value as seen below. >>> list(map(lambda c: (c, ord(c)), 'Infinity')) [('I', 73), ('n', 110), ('f', 102), ('i', 105), ('n', 110), ('i', 105), ('t', 116), ('y', 121)] >>> list(map(lambda c: (c, ord(c)), 'inFinity')) [('i', 105), ('n', 110), ('F', 70), ('i', 105), ('n', 110), ('i', 105), ('t', 116), ('y', 121)] ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 14:01:01 2019 From: report at bugs.python.org (Tim Peters) Date: Mon, 02 Sep 2019 18:01:01 +0000 Subject: [issue38012] Python Fuction min is case sentive ? In-Reply-To: <1567446663.85.0.249805930926.issue38012@roundup.psfhosted.org> Message-ID: <1567447261.22.0.156810095199.issue38012@roundup.psfhosted.org> Tim Peters added the comment: This has nothing in particular do with `min()`. As strings, 'I' < 'i', and 'F' < 'I'. For example, >>> 'I' < 'i' True >>> sorted("InFinity") ['F', 'I', 'i', 'i', 'n', 'n', 't', 'y'] That's all working as intended and as documented, so I'm closing this report. ---------- nosy: +tim.peters -xtreak resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 14:09:49 2019 From: report at bugs.python.org (hai shi) Date: Mon, 02 Sep 2019 18:09:49 +0000 Subject: [issue36267] User input to argparse raises Index_Error: "-a=" on a 'store_true' action In-Reply-To: <1552354570.63.0.477016922618.issue36267@roundup.psfhosted.org> Message-ID: <1567447789.4.0.32921102997.issue36267@roundup.psfhosted.org> hai shi added the comment: I do something such as: p = argparse.ArgumentParser() p.add_argument('-a', action='store_true') p.add_argument('-b', action='store_true') p.parse_args('-ab='.split()) thos code code jump in 1903, and the explicit_arg's value is: 'b=' 1901 action_tuples.append((action, [], option_string)) 1902 char = option_string[0] 1903 option_string = char + explicit_arg[0] IMHO, we should judge this explicit_arg's value before jump this judgment statement. ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 14:09:58 2019 From: report at bugs.python.org (Pavan Kumar Uppalanchu) Date: Mon, 02 Sep 2019 18:09:58 +0000 Subject: [issue38012] Python Fuction min is case sentive ? In-Reply-To: <1567447261.22.0.156810095199.issue38012@roundup.psfhosted.org> Message-ID: Pavan Kumar Uppalanchu added the comment: Hello Tim, Thanks for your quick response. Also, THE min("Infinity") is priniting "I". Practically, the minimum value is "e" right ? Regards, Pavan Uppalanchu On Mon, Sep 2, 2019 at 11:31 PM Tim Peters wrote: > > > Tim Peters added the comment: > > This has nothing in particular do with `min()`. As strings, 'I' < 'i', and 'F' < 'I'. For example, > > >>> 'I' < 'i' > True > > >>> sorted("InFinity") > ['F', 'I', 'i', 'i', 'n', 'n', 't', 'y'] > > That's all working as intended and as documented, so I'm closing this report. > > ---------- > nosy: +tim.peters -xtreak > resolution: -> not a bug > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 14:13:03 2019 From: report at bugs.python.org (Pavan Kumar Uppalanchu) Date: Mon, 02 Sep 2019 18:13:03 +0000 Subject: [issue38012] Python Fuction min is case sentive ? In-Reply-To: <1567447087.09.0.159129472609.issue38012@roundup.psfhosted.org> Message-ID: Pavan Kumar Uppalanchu added the comment: Hello Karthikeyan, Thank you very much for your valuable explanation. Regards, Pavan Uppalanchu On Mon, Sep 2, 2019 at 11:28 PM Karthikeyan Singaravelan wrote: > > > Karthikeyan Singaravelan added the comment: > > Here min uses the ASCII value of the letters for comparison. So for 'Infinity' 'I' (73) has the lowest value and for 'inFinity' 'F' (70) has the lowest value as seen below. > > >>> list(map(lambda c: (c, ord(c)), 'Infinity')) > [('I', 73), ('n', 110), ('f', 102), ('i', 105), ('n', 110), ('i', 105), ('t', 116), ('y', 121)] > >>> list(map(lambda c: (c, ord(c)), 'inFinity')) > [('i', 105), ('n', 110), ('F', 70), ('i', 105), ('n', 110), ('i', 105), ('t', 116), ('y', 121)] > > ---------- > nosy: +xtreak > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 14:13:21 2019 From: report at bugs.python.org (David Peall) Date: Mon, 02 Sep 2019 18:13:21 +0000 Subject: [issue28747] Expose SSL_CTX_set_cert_verify_callback In-Reply-To: <1479591372.9.0.198427018061.issue28747@psf.upfronthosting.co.za> Message-ID: <1567448001.29.0.921637483781.issue28747@roundup.psfhosted.org> Change by David Peall : ---------- nosy: +David Peall _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 14:27:07 2019 From: report at bugs.python.org (Tim Peters) Date: Mon, 02 Sep 2019 18:27:07 +0000 Subject: [issue38012] Python Fuction min is case sentive ? In-Reply-To: <1567446663.85.0.249805930926.issue38012@roundup.psfhosted.org> Message-ID: <1567448827.74.0.553466551889.issue38012@roundup.psfhosted.org> Tim Peters added the comment: > Also, THE min("Infinity") is priniting "I". Practically, > the minimum value is "e" right ? Sorry, I have no idea what "practically" means to you. It's just a fact that all uppercase ASCII letters compare less than all lowercase ASCII letters: >>> 'I' < 'e' True >>> 'Z' < 'a' True This isn't just Python - it's an industry-wide standard. Look at any reference for the ASCII character set; for example, here: http://www.asciitable.com/ Try posting about what you're trying to accomplish on the Python mailing list? The issue tracker isn't the right place for tutorials. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 14:28:32 2019 From: report at bugs.python.org (hai shi) Date: Mon, 02 Sep 2019 18:28:32 +0000 Subject: [issue36267] User input to argparse raises Index_Error: "-a=" on a 'store_true' action In-Reply-To: <1552354570.63.0.477016922618.issue36267@roundup.psfhosted.org> Message-ID: <1567448912.64.0.637331480778.issue36267@roundup.psfhosted.org> hai shi added the comment: Adding a judgment of explicit_args in judgment statement in the patch. ---------- keywords: +patch Added file: https://bugs.python.org/file48582/parse_v1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 15:17:28 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 02 Sep 2019 19:17:28 +0000 Subject: [issue36853] inconsistencies in docs builds (Sphinx 2) In-Reply-To: <1557331408.26.0.606381835406.issue36853@roundup.psfhosted.org> Message-ID: <1567451848.47.0.244053467199.issue36853@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset ebe709dc1d7c1f9f07dc7d77e53674d2500b223e by Jason R. Coombs (Anthony Sottile) in branch '3.7': bpo-36853: Fix suspicious.py to actually print the unused rules (#13579) (#15653) https://github.com/python/cpython/commit/ebe709dc1d7c1f9f07dc7d77e53674d2500b223e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 15:38:25 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 02 Sep 2019 19:38:25 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567453105.88.0.89285788641.issue38006@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- Removed message: https://bugs.python.org/msg351022 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 17:09:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Sep 2019 21:09:22 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567458562.26.0.560752796978.issue38006@roundup.psfhosted.org> STINNER Victor added the comment: I investigated the FreeIPA crash. * Python 3.8 behaves differently because func_clear() has been implemented (bpo-33418, commit 3c452404ae178b742967589a0bb4a5ec768d76e0) * The bug is a crash on a function call (_PyFunction_Vectorcall) because the function has been cleared (by func_clear), but there was still a weak reference using this function as its callback. * Note: the function is called *during* it's being cleared by func_clear(). * The GC has a workaround for weak references part of "unreachable" objects, but its handle_weakrefs() function doesn't work because CFFI CField_Type type doesn't implement tp_traverse. -- PR 15641 just hides the real bug. One issue is that CFFI doesn't implement correctly the GC protocol. If an object contains another object, its type must: * Have Py_TPFLAGS_HAVE_GC flag * Implement tp_traverse * Use PyObject_GC_Malloc() to allocate an object * Call PyObject_GC_Track() on created object Another issue is that the GC doesn't prevent the crash. Would it be possible to prevent the crash without changing the behavior (ex: still call weakref callbacks)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 17:23:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Sep 2019 21:23:30 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567459410.41.0.107027439523.issue38006@roundup.psfhosted.org> STINNER Victor added the comment: For the record, here is an annotated traceback of a FreeIPA crash. PyGC_list_contains() is a hack that I wrote to check if an object was in the unreachable argument of delete_garbage(). (gdb) where #0 0x0000000000434b78 in _PyFunction_Vectorcall (func=0x7ffff45d5690, stack=0x7fffffffd170, nargsf=1, kwnames=0x0) at Objects/call.c:406 remove() func=0x7ffff45d5690 (gdb) p _PyObject_Dump( ((PyFunctionObject*)func)->func_qualname ) object : 'WeakValueDictionary.__init__..remove' (gdb) p PyGC_list_contains(0x7ffff7a2bac0, func) # was unreachable? $8 = 1 #1 0x0000000000433640 in _PyObject_Vectorcall (callable=0x7ffff45d5690, args=0x7fffffffd170, nargsf=1, kwnames=0x0) at ./Include/cpython/abstract.h:127 #2 0x000000000043368b in _PyObject_FastCall (func=0x7ffff45d5690, args=0x7fffffffd170, nargs=1) at ./Include/cpython/abstract.h:147 #3 0x0000000000436ccc in object_vacall (base=0x0, callable=0x7ffff45d5690, vargs=0x7fffffffd1e0) at Objects/call.c:1186 #4 0x000000000043705b in PyObject_CallFunctionObjArgs (callable=0x7ffff45d5690) at Objects/call.c:1259 #5 0x0000000000502280 in handle_callback (ref=0x7ffff447dc90, callback=0x7ffff45d5690) at Objects/weakrefobject.c:877 #6 0x0000000000502403 in PyObject_ClearWeakRefs (object=0x7ffff42c1550) at Objects/weakrefobject.c:922 (gdb) p object->ob_type->tp_name $13 = 0x7ffff6be404b "_cffi_backend.CTypeDescr" (gdb) p PyGC_list_contains(0x7ffff7a2bac0, object) # was unreachable? $9 = 0 #7 0x00007ffff6a41abc in ctypedescr_dealloc (ct=0x7ffff42c1550) at c/_cffi_backend.c:401 #8 0x000000000047f1a5 in _Py_Dealloc (op=0x7ffff42c1550) at Objects/object.c:2213 #9 0x00007ffff6a3e825 in _Py_DECREF (filename=, lineno=703, op=) at /usr/include/python3.8/object.h:478 #10 cfield_dealloc (cf=0x7ffff444dc70) at c/_cffi_backend.c:703 Py_DECREF(cf->cf_type); (gdb) p cf->ob_base.ob_type $63 = (struct _typeobject *) 0x7ffff6a62460 (gdb) p PyGC_list_contains(0x7ffff7a2bac0, cf) # was unreachable? $14 = 0 #11 0x000000000047f1a5 in _Py_Dealloc (op=0x7ffff444dc70) at Objects/object.c:2213 #12 0x0000000000463af8 in _Py_DECREF (filename=0x6987a0 "./Include/object.h", lineno=541, op=0x7ffff444dc70) at ./Include/object.h:478 #13 0x0000000000463b46 in _Py_XDECREF (op=0x7ffff444dc70) at ./Include/object.h:541 #14 0x00000000004652de in free_keys_object (keys=0x11de780) at Objects/dictobject.c:580 #15 0x0000000000464877 in dictkeys_decref (dk=0x11de780) at Objects/dictobject.c:324 #16 0x00000000004694b0 in dict_dealloc (mp=0x7ffff44a6950) at Objects/dictobject.c:1994 {'C_Initialize': ..., 'C_CreateObject': ..., 'C_Finalize': ...} (gdb) p PyGC_list_contains(0x7ffff7a2bac0, mp) # was unreachable? $16 = 1 #17 0x000000000047f1a5 in _Py_Dealloc (op=0x7ffff44a6950) at Objects/object.c:2213 #18 0x00007ffff6a41b25 in _Py_DECREF (filename=, lineno=541, op=) at /usr/include/python3.8/object.h:478 #19 _Py_XDECREF (op=) at /usr/include/python3.8/object.h:541 #20 ctypedescr_dealloc (ct=0x7ffff42c12d0) at c/_cffi_backend.c:412 Py_XDECREF(ct->ct_stuff); (gdb) p (char*)(((CTypeDescrObject*)ct)->ct_name) $38 = 0x7ffff42c1328 "struct _CK_FUNCTION_LIST" #21 0x000000000047f1a5 in _Py_Dealloc (op=0x7ffff42c12d0) at Objects/object.c:2213 #22 0x000000000048f002 in _Py_DECREF (filename=0x6a2500 "./Include/object.h", lineno=541, op=0x7ffff42c12d0) at ./Include/object.h:478 #23 0x000000000048f02e in _Py_XDECREF (op=0x7ffff42c12d0) at ./Include/object.h:541 #24 0x000000000048fc0a in tupledealloc (op=0x7ffff451e050) at Objects/tupleobject.c:247 (CTypeDescrObject,) #25 0x000000000047f1a5 in _Py_Dealloc (op=0x7ffff451e050) at Objects/object.c:2213 #26 0x000000000048f002 in _Py_DECREF (filename=0x6a2500 "./Include/object.h", lineno=541, op=0x7ffff451e050) at ./Include/object.h:478 #27 0x000000000048f02e in _Py_XDECREF (op=0x7ffff451e050) at ./Include/object.h:541 #28 0x000000000048fc0a in tupledealloc (op=0x7ffff48e13c0) at Objects/tupleobject.c:247 (str, ) #29 0x000000000047f1a5 in _Py_Dealloc (op=0x7ffff48e13c0) at Objects/object.c:2213 #30 0x0000000000491815 in _Py_DECREF (filename=0x6a34bf "Objects/typeobject.c", lineno=1110, op=0x7ffff48e13c0) at ./Include/object.h:478 #31 0x000000000049431d in clear_slots (type=0x8e0330, self=0x7ffff447d9f0) at Objects/typeobject.c:1110 #32 0x0000000000494833 in subtype_dealloc (self=0x7ffff447d9f0) at Objects/typeobject.c:1262 weakref.KeyedRef #33 0x000000000047f1a5 in _Py_Dealloc (op=0x7ffff447d9f0) at Objects/object.c:2213 #34 0x0000000000463af8 in _Py_DECREF (filename=0x6987a0 "./Include/object.h", lineno=541, op=0x7ffff447d9f0) at ./Include/object.h:478 #35 0x0000000000463b46 in _Py_XDECREF (op=0x7ffff447d9f0) at ./Include/object.h:541 #36 0x00000000004652de in free_keys_object (keys=0x1209c90) at Objects/dictobject.c:580 #37 0x0000000000464877 in dictkeys_decref (dk=0x1209c90) at Objects/dictobject.c:324 #38 0x00000000004694b0 in dict_dealloc (mp=0x7ffff45d64d0) at Objects/dictobject.c:1994 WeakValueDictionary.data dict #39 0x000000000047f1a5 in _Py_Dealloc (op=0x7ffff45d64d0) at Objects/object.c:2213 #40 0x000000000062bb37 in _Py_DECREF (filename=0x745d20 "./Include/object.h", lineno=541, op=0x7ffff45d64d0) at ./Include/object.h:478 #41 0x000000000062bb85 in _Py_XDECREF (op=0x7ffff45d64d0) at ./Include/object.h:541 #42 0x000000000062bf4a in cell_dealloc (op=0x7ffff45d7050) at Objects/cellobject.c:84 remove() closure contains "d": WeakValueDictionary.data dict #43 0x000000000047f1a5 in _Py_Dealloc (op=0x7ffff45d7050) at Objects/object.c:2213 #44 0x000000000048f002 in _Py_DECREF (filename=0x6a2500 "./Include/object.h", lineno=541, op=0x7ffff45d7050) at ./Include/object.h:478 #45 0x000000000048f02e in _Py_XDECREF (op=0x7ffff45d7050) at ./Include/object.h:541 #46 0x000000000048fc0a in tupledealloc (op=0x7ffff45d4370) at Objects/tupleobject.c:247 #47 0x000000000047f1a5 in _Py_Dealloc (op=0x7ffff45d4370) at Objects/object.c:2213 #48 0x0000000000449e1b in _Py_DECREF (filename=0x693783 "Objects/funcobject.c", lineno=584, op=0x7ffff45d4370) at ./Include/object.h:478 #49 0x000000000044b730 in func_clear (op=0x7ffff45d5690) at Objects/funcobject.c:584 remove() func = 0x7ffff45d5690 #50 0x000000000058ebbd in delete_garbage (state=0x7fb798 <_PyRuntime+344>, collectable=0x7fffffffdc10, old=0x7fb7e0 <_PyRuntime+416>) at Modules/gcmodule.c:929 #51 0x000000000058f082 in collect (state=0x7fb798 <_PyRuntime+344>, generation=2, n_collected=0x0, n_uncollectable=0x0, nofail=1) at Modules/gcmodule.c:1106 #52 0x0000000000590861 in _PyGC_CollectNoFail () at Modules/gcmodule.c:1849 #53 0x0000000000542a1e in PyImport_Cleanup () at Python/import.c:541 #54 0x000000000055f8c3 in Py_FinalizeEx () at Python/pylifecycle.c:1226 #55 0x00000000005618d6 in Py_Exit (sts=0) at Python/pylifecycle.c:2248 #56 0x0000000000566726 in handle_system_exit () at Python/pythonrun.c:658 #57 0x000000000056673d in _PyErr_PrintEx (tstate=0x8044e0, set_sys_last_vars=1) at Python/pythonrun.c:668 #58 0x0000000000566a32 in PyErr_PrintEx (set_sys_last_vars=1) at Python/pythonrun.c:755 #59 0x0000000000566a43 in PyErr_Print () at Python/pythonrun.c:761 #60 0x000000000056602a in PyRun_SimpleFileExFlags (fp=0x800370, filename=0x7ffff7a1ff60 "/usr/sbin/ipa-server-install", closeit=1, flags=0x7fffffffe080) at Python/pythonrun.c:434 #61 0x000000000056555b in PyRun_AnyFileExFlags (fp=0x800370, filename=0x7ffff7a1ff60 "/usr/sbin/ipa-server-install", closeit=1, flags=0x7fffffffe080) at Python/pythonrun.c:86 #62 0x000000000042264a in pymain_run_file (config=0x8037e0, cf=0x7fffffffe080) at Modules/main.c:383 #63 0x0000000000422bfd in pymain_run_python (exitcode=0x7fffffffe0cc) at Modules/main.c:567 #64 0x0000000000422cee in Py_RunMain () at Modules/main.c:646 #65 0x0000000000422d68 in pymain_main (args=0x7fffffffe130) at Modules/main.c:676 #66 0x0000000000422de2 in Py_BytesMain (argc=3, argv=0x7fffffffe258) at Modules/main.c:700 #67 0x00000000004217a6 in main (argc=3, argv=0x7fffffffe258) at ./Programs/python.c:16 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 17:25:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Sep 2019 21:25:34 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567459534.9.0.240090559235.issue38006@roundup.psfhosted.org> STINNER Victor added the comment: > Another issue is that the GC doesn't prevent the crash. Would it be possible to prevent the crash without changing the behavior (ex: still call weakref callbacks)? Pablo opened bpo-38009 with a PR. I'm not sure if his PR is correct or not yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 17:38:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Sep 2019 21:38:36 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567460316.65.0.266603535295.issue38006@roundup.psfhosted.org> STINNER Victor added the comment: > Another issue is that the GC doesn't prevent the crash. Would it be possible to prevent the crash without changing the behavior (ex: still call weakref callbacks)? I discussed with Pablo and it doesn't seem possible to prevent to clear a function if it is indirectly used as a callback for a weak reference to a object which doesn't implement tp_traverse properly (like the CFFI type). The best that we can do is to detect the bug in C extension and emit a warning explaining the bug and suggesting a way to fix it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 17:49:58 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Sep 2019 21:49:58 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567460998.21.0.122205232504.issue38006@roundup.psfhosted.org> STINNER Victor added the comment: This bug is quite complex. Let me try to explain it more simply. * Create an object A * Create a weak reference to A with a callback CB * A and CB are part of a reference cycle * Removing the last references to A and CB are not enough to destroy them * Trigger a garbage collection to break the cycle * A and CB are seen as unreachable by the GC * The GC "clears" CB which makes CB inconsistent (tp_clear) * A is deleted which calls CB * Crash on calling inconsistent CB -- In the case of FreeIPA: * A is a _cffi_backend.CTypeDescr instance * CB is the remove() function defined in weakref.WeakValueDictionary constructor The FreeIPA reference cycle is quite complex: remove() -> remove().__closure__ (tuple) -> WeakValueDictionary.data (dict) = remove().__closure__[0] -> weakref.KeyedRef -> (, ) -> (,) = -> -> {'C_Initialize': ..., 'C_CreateObject': ..., 'C_Finalize': ...} (dict) -> <_cffi_backend.CField 4> -> <_cffi_backend.CTypeDescr 5> -> remove() = callback of a weak reference to <_cffi_backend.CTypeDescr 5> <_cffi_backend.CField 4> is not seen as unreachable by the GC because CField_Type.tp_traverse is not implemented (and CField_Type doesn't use Py_TPFLAGS_HAVE_GC flag). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 17:53:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Sep 2019 21:53:39 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567461219.55.0.632287086333.issue38006@roundup.psfhosted.org> STINNER Victor added the comment: > * A and CB are seen as unreachable by the GC Oh, that's not correct: * Only CB is seen as unreachable by the GC * The GC "clears" CB which makes CB inconsistent (tp_clear) * A is deleted indirectly * Deleting A calls CB through the weak reference to A The "A is deleted indirectly" step is also complex... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 17:55:21 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 02 Sep 2019 21:55:21 +0000 Subject: [issue38009] Handle weakreference callbacks invoked indirectly in the middle of a gc collection In-Reply-To: <1567432593.55.0.481148483159.issue38009@roundup.psfhosted.org> Message-ID: <1567461321.25.0.910221491176.issue38009@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 18:43:24 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Mon, 02 Sep 2019 22:43:24 +0000 Subject: [issue37969] urllib.parse functions reporting false equivalent URIs In-Reply-To: <1567004091.58.0.0475239472757.issue37969@roundup.psfhosted.org> Message-ID: <1567464204.95.0.554990512068.issue37969@roundup.psfhosted.org> G?ry added the comment: @nicktimko Thanks for the historical track. Here is a patch that solves this issue by updating the `urlsplit` and `urlunsplit` functions of the `urllib.parse` module to keep the '?' and '#' delimiters in URIs if present, even if their associated component is empty, as required by RFC 3986: https://github.com/python/cpython/pull/15642 That way we get the correct behavior: >>> import urllib.parse >>> urllib.parse.urlunsplit(urllib.parse.urlsplit("http://example.com/?")) 'http://example.com/?' >>> urllib.parse.urlunsplit(urllib.parse.urlsplit("http://example.com/#")) 'http://example.com/#' Any feedback welcome. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 20:13:43 2019 From: report at bugs.python.org (Michael Yoo) Date: Tue, 03 Sep 2019 00:13:43 +0000 Subject: [issue38013] AsyncGenerator breaks when not iterated fully with RuntimeError("can't send non-None value to a just-started coroutine") Message-ID: <1567469623.0.0.944759957345.issue38013@roundup.psfhosted.org> New submission from Michael Yoo : Version: Python 3.7.3 When I run this code: import asyncio class TestAsyncGenerator: def __init__(self): pass async def aiter(self): yield 1 yield 2 async def main(): gen = TestAsyncGenerator() async for number in gen.aiter(): break asyncio.run(main()) # unhandled exception during asyncio.run() shutdown # task: ()> exception=RuntimeError("can't send non-None value to a just-started coroutine")> # RuntimeError: can't send non-None value to a just-started coroutine There is a warning message that I don't expect to see. I would expect breaking from an async iteration to behave as if breaking from a normal iteration - that is, no problems. However, I see the warning message shown above. Am I missing something? Otherwise, I believe this is a bug. Thanks! ---------- components: asyncio messages: 351044 nosy: Michael Yoo, asvetlov, yselivanov priority: normal severity: normal status: open title: AsyncGenerator breaks when not iterated fully with RuntimeError("can't send non-None value to a just-started coroutine") type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 20:33:26 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Sep 2019 00:33:26 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567470806.91.0.467134652876.issue24416@roundup.psfhosted.org> Raymond Hettinger added the comment: FWIW, most things in Python that return a structseq previously returned a tuple (for example, time.localtime() and sys.version_info). This is not an unprecedented upgrade to improve the repr and provide access by field name in addition to positional access. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 21:04:27 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Sep 2019 01:04:27 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567472667.55.0.0140280591473.issue24416@roundup.psfhosted.org> Raymond Hettinger added the comment: What IS unprecedented is having a C function bend over backwards to return an instance of collections.namedtuple(). The only case I know of is with functools.lru_cache() and it was done there because we didn't really have a choice -- there was a pre-existing pure python API that already used collections.namedtuple(). ISTM the cross-version pickling issue is minor red herring. We've cheerfully upgraded tuples to structseqs on a number of occasions and it hasn't been an issue. Tim, would you please weigh in on this so we can put this to bed, either closing the request because we're too meek to make any change, upgrading to structseq to provide the requested functionality, or twisting our code in weird ways to have a C function become dependent on a pure python module. ---------- assignee: rhettinger -> tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 21:08:00 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Sep 2019 01:08:00 +0000 Subject: [issue36267] User input to argparse raises Index_Error: "-a=" on a 'store_true' action In-Reply-To: <1552354570.63.0.477016922618.issue36267@roundup.psfhosted.org> Message-ID: <1567472879.99.0.206943049859.issue36267@roundup.psfhosted.org> Raymond Hettinger added the comment: FWIW, raising an uncaught exception isn't what we normally consider a "crash". We typically save that designation for segfaults. Ideally, a good patch/pr will also have tests. Also, given the rarity of the exception, I would be reserved about backporting, keeping it to 3.8 and 3.9. ---------- nosy: +rhettinger type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 21:13:38 2019 From: report at bugs.python.org (hai shi) Date: Tue, 03 Sep 2019 01:13:38 +0000 Subject: [issue36267] User input to argparse raises Index_Error: "-a=" on a 'store_true' action In-Reply-To: <1552354570.63.0.477016922618.issue36267@roundup.psfhosted.org> Message-ID: <1567473218.49.0.845994020402.issue36267@roundup.psfhosted.org> hai shi added the comment: Thanks, Raymond. This patch not a formal patch, just show what i want to do. if everything agree this behavior, I would add a normal PR. ---------- type: behavior -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 22:33:07 2019 From: report at bugs.python.org (Daniel) Date: Tue, 03 Sep 2019 02:33:07 +0000 Subject: [issue38014] Python 3.7 does not compile Message-ID: <1567477987.66.0.578307493025.issue38014@roundup.psfhosted.org> New submission from Daniel : Hi, I use macOS Catalina 10.15. I use Xcode 10 and Xcode 11, but with that configuration, compiling Python 3.7.14 does not work for me. Any idea whats causing this issue? user at Users-MacBook-Pro Python-3.7.4 % ./configure --with-framework-name=python36 --with-universal-archs=64-bit --enable-universalsdk=/ --enable-optimizations --enable-framework=/Users/user/Desktop/Python-3.7 checking build system type... x86_64-apple-darwin19.0.0 checking host system type... x86_64-apple-darwin19.0.0 checking for python3.7... python3.7 checking for --enable-universalsdk... / checking for --with-universal-archs... 64-bit checking MACHDEP... checking for --without-gcc... no checking for --with-icc... no Configured with: --prefix=/Applications/Xcode-beta.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1 checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking how to run the C preprocessor... gcc -E checking for grep that handles long lines and -e... /usr/bin/grep checking for a sed that does not truncate output... /usr/bin/sed checking for --with-cxx-main=... no checking for g++... no configure: By default, distutils will build C++ extension modules with "g++". If this is not intended, then set CXX on the configure command line. checking for the platform triplet based on compiler characteristics... darwin checking for -Wl,--no-as-needed... no checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking whether it is safe to define __EXTENSIONS__... yes checking for the Android API level... not Android checking for --with-suffix... checking for case-insensitive build directory... yes checking LIBRARY... libpython$(VERSION)$(ABIFLAGS).a checking LINKCC... $(PURIFY) $(MAINCC) checking for GNU ld... no checking for --enable-shared... no checking for --enable-profiling... no checking LDLIBRARY... $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) checking for ar... ar checking for readelf... no checking for a BSD-compatible install... /usr/bin/install -c checking for a thread-safe mkdir -p... ./install-sh -c -d checking for --with-pydebug... no checking for --with-assertions... no checking for --enable-optimizations... yes checking for --with-lto... no checking for -llvm-profdata... no configure: llvm-profdata found via xcrun: /usr/bin/xcrun llvm-profdata checking for -Wextra... yes checking whether gcc accepts and needs -fno-strict-aliasing... no checking if we can turn off gcc unused result warning... yes checking if we can turn off gcc unused parameter warning... yes checking if we can turn off gcc missing field initializers warning... yes checking if we can turn off gcc invalid function cast warning... no checking if we can turn on gcc mixed sign comparison warning... yes checking if we can turn on gcc unreachable code warning... yes checking if we can turn on gcc strict-prototypes warning... yes checking if we can make implicit function declaration an error in gcc... yes checking which compiler should be used... gcc checking which MACOSX_DEPLOYMENT_TARGET to use... 10.15 checking whether pthreads are available without options... no checking whether gcc accepts -Kpthread... no checking whether gcc accepts -Kthread... no checking whether gcc accepts -pthread... no checking whether g++ also accepts flags for thread support... no checking for ANSI C header files... (cached) yes checking asm/types.h usability... no checking asm/types.h presence... no checking for asm/types.h... no checking crypt.h usability... no checking crypt.h presence... no checking for crypt.h... no checking conio.h usability... no checking conio.h presence... no checking for conio.h... no checking direct.h usability... no checking direct.h presence... no checking for direct.h... no checking dlfcn.h usability... no checking dlfcn.h presence... yes configure: WARNING: dlfcn.h: present but cannot be compiled configure: WARNING: dlfcn.h: check for missing prerequisite headers? configure: WARNING: dlfcn.h: see the Autoconf documentation configure: WARNING: dlfcn.h: section "Present But Cannot Be Compiled" configure: WARNING: dlfcn.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for dlfcn.h... no checking errno.h usability... no checking errno.h presence... yes configure: WARNING: errno.h: present but cannot be compiled configure: WARNING: errno.h: check for missing prerequisite headers? configure: WARNING: errno.h: see the Autoconf documentation configure: WARNING: errno.h: section "Present But Cannot Be Compiled" configure: WARNING: errno.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for errno.h... no checking fcntl.h usability... no checking fcntl.h presence... yes configure: WARNING: fcntl.h: present but cannot be compiled configure: WARNING: fcntl.h: check for missing prerequisite headers? configure: WARNING: fcntl.h: see the Autoconf documentation configure: WARNING: fcntl.h: section "Present But Cannot Be Compiled" configure: WARNING: fcntl.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for fcntl.h... no checking grp.h usability... no checking grp.h presence... yes configure: WARNING: grp.h: present but cannot be compiled configure: WARNING: grp.h: check for missing prerequisite headers? configure: WARNING: grp.h: see the Autoconf documentation configure: WARNING: grp.h: section "Present But Cannot Be Compiled" configure: WARNING: grp.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for grp.h... no checking ieeefp.h usability... no checking ieeefp.h presence... no checking for ieeefp.h... no checking io.h usability... no checking io.h presence... no checking for io.h... no checking langinfo.h usability... no checking langinfo.h presence... yes configure: WARNING: langinfo.h: present but cannot be compiled configure: WARNING: langinfo.h: check for missing prerequisite headers? configure: WARNING: langinfo.h: see the Autoconf documentation configure: WARNING: langinfo.h: section "Present But Cannot Be Compiled" configure: WARNING: langinfo.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for langinfo.h... no checking libintl.h usability... no checking libintl.h presence... no checking for libintl.h... no checking process.h usability... no checking process.h presence... no checking for process.h... no checking pthread.h usability... no checking pthread.h presence... yes configure: WARNING: pthread.h: present but cannot be compiled configure: WARNING: pthread.h: check for missing prerequisite headers? configure: WARNING: pthread.h: see the Autoconf documentation configure: WARNING: pthread.h: section "Present But Cannot Be Compiled" configure: WARNING: pthread.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for pthread.h... no checking sched.h usability... no checking sched.h presence... yes configure: WARNING: sched.h: present but cannot be compiled configure: WARNING: sched.h: check for missing prerequisite headers? configure: WARNING: sched.h: see the Autoconf documentation configure: WARNING: sched.h: section "Present But Cannot Be Compiled" configure: WARNING: sched.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for sched.h... no checking shadow.h usability... no checking shadow.h presence... no checking for shadow.h... no checking signal.h usability... no checking signal.h presence... yes configure: WARNING: signal.h: present but cannot be compiled configure: WARNING: signal.h: check for missing prerequisite headers? configure: WARNING: signal.h: see the Autoconf documentation configure: WARNING: signal.h: section "Present But Cannot Be Compiled" configure: WARNING: signal.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for signal.h... no checking stropts.h usability... no checking stropts.h presence... no checking for stropts.h... no checking termios.h usability... no checking termios.h presence... yes configure: WARNING: termios.h: present but cannot be compiled configure: WARNING: termios.h: check for missing prerequisite headers? configure: WARNING: termios.h: see the Autoconf documentation configure: WARNING: termios.h: section "Present But Cannot Be Compiled" configure: WARNING: termios.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for termios.h... no checking for unistd.h... (cached) yes checking utime.h usability... no checking utime.h presence... yes configure: WARNING: utime.h: present but cannot be compiled configure: WARNING: utime.h: check for missing prerequisite headers? configure: WARNING: utime.h: see the Autoconf documentation configure: WARNING: utime.h: section "Present But Cannot Be Compiled" configure: WARNING: utime.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for utime.h... no checking poll.h usability... no checking poll.h presence... yes configure: WARNING: poll.h: present but cannot be compiled configure: WARNING: poll.h: check for missing prerequisite headers? configure: WARNING: poll.h: see the Autoconf documentation configure: WARNING: poll.h: section "Present But Cannot Be Compiled" configure: WARNING: poll.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for poll.h... no checking sys/devpoll.h usability... no checking sys/devpoll.h presence... no checking for sys/devpoll.h... no checking sys/epoll.h usability... no checking sys/epoll.h presence... no checking for sys/epoll.h... no checking sys/poll.h usability... no checking sys/poll.h presence... yes configure: WARNING: sys/poll.h: present but cannot be compiled configure: WARNING: sys/poll.h: check for missing prerequisite headers? configure: WARNING: sys/poll.h: see the Autoconf documentation configure: WARNING: sys/poll.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/poll.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for sys/poll.h... no checking sys/audioio.h usability... no checking sys/audioio.h presence... no checking for sys/audioio.h... no checking sys/xattr.h usability... no checking sys/xattr.h presence... yes configure: WARNING: sys/xattr.h: present but cannot be compiled configure: WARNING: sys/xattr.h: check for missing prerequisite headers? configure: WARNING: sys/xattr.h: see the Autoconf documentation configure: WARNING: sys/xattr.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/xattr.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for sys/xattr.h... no checking sys/bsdtty.h usability... no checking sys/bsdtty.h presence... no checking for sys/bsdtty.h... no checking sys/event.h usability... no checking sys/event.h presence... yes configure: WARNING: sys/event.h: present but cannot be compiled configure: WARNING: sys/event.h: check for missing prerequisite headers? configure: WARNING: sys/event.h: see the Autoconf documentation configure: WARNING: sys/event.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/event.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for sys/event.h... no checking sys/file.h usability... no checking sys/file.h presence... yes configure: WARNING: sys/file.h: present but cannot be compiled configure: WARNING: sys/file.h: check for missing prerequisite headers? configure: WARNING: sys/file.h: see the Autoconf documentation configure: WARNING: sys/file.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/file.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for sys/file.h... no checking sys/ioctl.h usability... no checking sys/ioctl.h presence... yes configure: WARNING: sys/ioctl.h: present but cannot be compiled configure: WARNING: sys/ioctl.h: check for missing prerequisite headers? configure: WARNING: sys/ioctl.h: see the Autoconf documentation configure: WARNING: sys/ioctl.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/ioctl.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for sys/ioctl.h... no checking sys/kern_control.h usability... no checking sys/kern_control.h presence... yes configure: WARNING: sys/kern_control.h: present but cannot be compiled configure: WARNING: sys/kern_control.h: check for missing prerequisite headers? configure: WARNING: sys/kern_control.h: see the Autoconf documentation configure: WARNING: sys/kern_control.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/kern_control.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for sys/kern_control.h... no checking sys/loadavg.h usability... no checking sys/loadavg.h presence... no checking for sys/loadavg.h... no checking sys/lock.h usability... no checking sys/lock.h presence... yes configure: WARNING: sys/lock.h: present but cannot be compiled configure: WARNING: sys/lock.h: check for missing prerequisite headers? configure: WARNING: sys/lock.h: see the Autoconf documentation configure: WARNING: sys/lock.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/lock.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for sys/lock.h... no checking sys/mkdev.h usability... no checking sys/mkdev.h presence... no checking for sys/mkdev.h... no checking sys/modem.h usability... no checking sys/modem.h presence... no checking for sys/modem.h... no checking sys/param.h usability... no checking sys/param.h presence... yes configure: WARNING: sys/param.h: present but cannot be compiled configure: WARNING: sys/param.h: check for missing prerequisite headers? configure: WARNING: sys/param.h: see the Autoconf documentation configure: WARNING: sys/param.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/param.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for sys/param.h... no checking sys/random.h usability... no checking sys/random.h presence... yes configure: WARNING: sys/random.h: present but cannot be compiled configure: WARNING: sys/random.h: check for missing prerequisite headers? configure: WARNING: sys/random.h: see the Autoconf documentation configure: WARNING: sys/random.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/random.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for sys/random.h... no checking sys/select.h usability... no checking sys/select.h presence... yes configure: WARNING: sys/select.h: present but cannot be compiled configure: WARNING: sys/select.h: check for missing prerequisite headers? configure: WARNING: sys/select.h: see the Autoconf documentation configure: WARNING: sys/select.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/select.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for sys/select.h... no checking sys/sendfile.h usability... no checking sys/sendfile.h presence... no checking for sys/sendfile.h... no checking sys/socket.h usability... no checking sys/socket.h presence... yes configure: WARNING: sys/socket.h: present but cannot be compiled configure: WARNING: sys/socket.h: check for missing prerequisite headers? configure: WARNING: sys/socket.h: see the Autoconf documentation configure: WARNING: sys/socket.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/socket.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for sys/socket.h... no checking sys/statvfs.h usability... no checking sys/statvfs.h presence... yes configure: WARNING: sys/statvfs.h: present but cannot be compiled configure: WARNING: sys/statvfs.h: check for missing prerequisite headers? configure: WARNING: sys/statvfs.h: see the Autoconf documentation configure: WARNING: sys/statvfs.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/statvfs.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for sys/statvfs.h... no checking for sys/stat.h... (cached) yes checking sys/syscall.h usability... no checking sys/syscall.h presence... yes configure: WARNING: sys/syscall.h: present but cannot be compiled configure: WARNING: sys/syscall.h: check for missing prerequisite headers? configure: WARNING: sys/syscall.h: see the Autoconf documentation configure: WARNING: sys/syscall.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/syscall.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for sys/syscall.h... no checking sys/sys_domain.h usability... no checking sys/sys_domain.h presence... yes configure: WARNING: sys/sys_domain.h: present but cannot be compiled configure: WARNING: sys/sys_domain.h: check for missing prerequisite headers? configure: WARNING: sys/sys_domain.h: see the Autoconf documentation configure: WARNING: sys/sys_domain.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/sys_domain.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for sys/sys_domain.h... no checking sys/termio.h usability... no checking sys/termio.h presence... no checking for sys/termio.h... no checking sys/time.h usability... no checking sys/time.h presence... yes configure: WARNING: sys/time.h: present but cannot be compiled configure: WARNING: sys/time.h: check for missing prerequisite headers? configure: WARNING: sys/time.h: see the Autoconf documentation configure: WARNING: sys/time.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/time.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for sys/time.h... no checking sys/times.h usability... no checking sys/times.h presence... yes configure: WARNING: sys/times.h: present but cannot be compiled configure: WARNING: sys/times.h: check for missing prerequisite headers? configure: WARNING: sys/times.h: see the Autoconf documentation configure: WARNING: sys/times.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/times.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for sys/times.h... no checking for sys/types.h... (cached) yes checking sys/uio.h usability... no checking sys/uio.h presence... yes configure: WARNING: sys/uio.h: present but cannot be compiled configure: WARNING: sys/uio.h: check for missing prerequisite headers? configure: WARNING: sys/uio.h: see the Autoconf documentation configure: WARNING: sys/uio.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/uio.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for sys/uio.h... no checking sys/un.h usability... no checking sys/un.h presence... yes configure: WARNING: sys/un.h: present but cannot be compiled configure: WARNING: sys/un.h: check for missing prerequisite headers? configure: WARNING: sys/un.h: see the Autoconf documentation configure: WARNING: sys/un.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/un.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for sys/un.h... no checking sys/utsname.h usability... no checking sys/utsname.h presence... yes configure: WARNING: sys/utsname.h: present but cannot be compiled configure: WARNING: sys/utsname.h: check for missing prerequisite headers? configure: WARNING: sys/utsname.h: see the Autoconf documentation configure: WARNING: sys/utsname.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/utsname.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for sys/utsname.h... no checking sys/wait.h usability... no checking sys/wait.h presence... yes configure: WARNING: sys/wait.h: present but cannot be compiled configure: WARNING: sys/wait.h: check for missing prerequisite headers? configure: WARNING: sys/wait.h: see the Autoconf documentation configure: WARNING: sys/wait.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/wait.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for sys/wait.h... no checking pty.h usability... no checking pty.h presence... no checking for pty.h... no checking libutil.h usability... no checking libutil.h presence... no checking for libutil.h... no checking sys/resource.h usability... no checking sys/resource.h presence... yes configure: WARNING: sys/resource.h: present but cannot be compiled configure: WARNING: sys/resource.h: check for missing prerequisite headers? configure: WARNING: sys/resource.h: see the Autoconf documentation configure: WARNING: sys/resource.h: section "Present But Cannot Be Compiled" configure: WARNING: sys/resource.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for sys/resource.h... no checking netpacket/packet.h usability... no checking netpacket/packet.h presence... no checking for netpacket/packet.h... no checking sysexits.h usability... no checking sysexits.h presence... yes configure: WARNING: sysexits.h: present but cannot be compiled configure: WARNING: sysexits.h: check for missing prerequisite headers? configure: WARNING: sysexits.h: see the Autoconf documentation configure: WARNING: sysexits.h: section "Present But Cannot Be Compiled" configure: WARNING: sysexits.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for sysexits.h... no checking bluetooth.h usability... no checking bluetooth.h presence... no checking for bluetooth.h... no checking linux/tipc.h usability... no checking linux/tipc.h presence... no checking for linux/tipc.h... no checking linux/random.h usability... no checking linux/random.h presence... no checking for linux/random.h... no checking spawn.h usability... no checking spawn.h presence... yes configure: WARNING: spawn.h: present but cannot be compiled configure: WARNING: spawn.h: check for missing prerequisite headers? configure: WARNING: spawn.h: see the Autoconf documentation configure: WARNING: spawn.h: section "Present But Cannot Be Compiled" configure: WARNING: spawn.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for spawn.h... no checking util.h usability... no checking util.h presence... yes configure: WARNING: util.h: present but cannot be compiled configure: WARNING: util.h: check for missing prerequisite headers? configure: WARNING: util.h: see the Autoconf documentation configure: WARNING: util.h: section "Present But Cannot Be Compiled" configure: WARNING: util.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for util.h... no checking alloca.h usability... no checking alloca.h presence... yes configure: WARNING: alloca.h: present but cannot be compiled configure: WARNING: alloca.h: check for missing prerequisite headers? configure: WARNING: alloca.h: see the Autoconf documentation configure: WARNING: alloca.h: section "Present But Cannot Be Compiled" configure: WARNING: alloca.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for alloca.h... no checking endian.h usability... no checking endian.h presence... no checking for endian.h... no checking sys/endian.h usability... no checking sys/endian.h presence... no checking for sys/endian.h... no checking sys/sysmacros.h usability... no checking sys/sysmacros.h presence... no checking for sys/sysmacros.h... no checking for dirent.h that defines DIR... no checking for sys/ndir.h that defines DIR... no checking for sys/dir.h that defines DIR... no checking for ndir.h that defines DIR... no checking for library containing opendir... no checking whether sys/types.h defines makedev... no checking for sys/mkdev.h... (cached) no checking for sys/sysmacros.h... (cached) no checking bluetooth/bluetooth.h usability... no checking bluetooth/bluetooth.h presence... no checking for bluetooth/bluetooth.h... no checking for net/if.h... no checking for linux/netlink.h... no checking for linux/vm_sockets.h... no checking for linux/can.h... no checking for linux/can/raw.h... no checking for linux/can/bcm.h... no checking for clock_t in time.h... yes checking for makedev... no checking for le64toh... no checking for mode_t... no checking for off_t... no checking for pid_t... no checking for size_t... no checking for uid_t in sys/types.h... yes checking for ssize_t... no checking for __uint128_t... no checking size of int... 0 checking size of long... 0 checking size of long long... 0 checking size of void *... 0 checking size of short... 0 checking size of float... 0 checking size of double... 0 checking size of fpos_t... 0 checking size of size_t... 0 checking size of pid_t... 0 checking size of uintptr_t... 0 checking for long double support... no checking size of _Bool... 0 checking size of off_t... 0 checking whether to enable large file support... no checking size of time_t... 0 checking for pthread_t... no checking size of pthread_key_t... 0 checking whether pthread_key_t is compatible with int... no checking for --enable-framework... yes checking for dyld... always on for Darwin checking the extension of shared libraries... .so checking LDSHARED... $(CC) -bundle -undefined dynamic_lookup checking CCSHARED... checking LINKFORSHARED... -Wl,-stack_size,1000000 -framework CoreFoundation $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) checking CFLAGSFORSHARED... $(CCSHARED) checking SHLIBS... $(LIBS) checking for sendfile in -lsendfile... no checking for dlopen in -ldl... no checking for shl_load in -ldld... no checking uuid/uuid.h usability... no checking uuid/uuid.h presence... yes configure: WARNING: uuid/uuid.h: present but cannot be compiled configure: WARNING: uuid/uuid.h: check for missing prerequisite headers? configure: WARNING: uuid/uuid.h: see the Autoconf documentation configure: WARNING: uuid/uuid.h: section "Present But Cannot Be Compiled" configure: WARNING: uuid/uuid.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for uuid/uuid.h... no checking uuid.h usability... no checking uuid.h presence... no checking for uuid.h... no checking for uuid_generate_time_safe... no checking for uuid_create... no checking for uuid_enc_be... no checking for library containing sem_init... no checking for textdomain in -lintl... no checking aligned memory access is required... yes checking for --with-hash-algorithm... default checking for --with-address-sanitizer... no checking for --with-memory-sanitizer... no checking for --with-undefined-behavior-sanitizer... no checking for t_open in -lnsl... no checking for socket in -lsocket... no checking for --with-libs... no checking for pkg-config... no checking for --with-system-expat... no checking for --with-system-ffi... no checking for --with-system-libmpdec... no checking for --enable-loadable-sqlite-extensions... no checking for --with-tcltk-includes... default checking for --with-tcltk-libs... default checking for --with-dbmliborder... checking for _POSIX_THREADS in unistd.h... yes checking for pthread_create in -lpthread... checking for pthread_detach... no checking for pthread_create in -lpthreads... no checking for pthread_create in -lc_r... no checking for __pthread_create_system in -lpthread... no checking for pthread_create in -lcma... no configure: error: could not find pthreads on your system user at Users-MacBook-Pro Python-3.7.4 % ---------- components: macOS messages: 351049 nosy: m_python, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Python 3.7 does not compile type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 2 23:52:37 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Sep 2019 03:52:37 +0000 Subject: [issue36267] User input to argparse raises Index_Error: "-a=" on a 'store_true' action In-Reply-To: <1552354570.63.0.477016922618.issue36267@roundup.psfhosted.org> Message-ID: <1567482757.18.0.134287868603.issue36267@roundup.psfhosted.org> Raymond Hettinger added the comment: Why did you switch back to "crash"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 00:01:40 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 03 Sep 2019 04:01:40 +0000 Subject: [issue38014] Python 3.7 does not compile In-Reply-To: <1567477987.66.0.578307493025.issue38014@roundup.psfhosted.org> Message-ID: <1567483300.53.0.618400563956.issue38014@roundup.psfhosted.org> Ned Deily added the comment: When building a default 64-bit-only Python on current MacOS systems, don't use the --enable-universalsdk (and --with-universal-arch) options to ./configure since system header files are no longer installed in /usr/include. Be aware that you may have to supply some third-party libraries which are no longer or have never been shipped by Apple with macOS, most notably OpenSSL libraries and libzma. The Python Developer's Guide gives some help on how to use versions of these libraries from third-party disrbutors Homebrew or MacPorts. https://devguide.python.org/setup/#macos-and-os-x Also suggest you first try building and installing without using --enable-optimizations as that option greatly lengthens and complicates the build process. And you probably want to change --with-framework-name to python37 if you continue to use it. The Python build information for current macOS systems is somewhat out-of-date; it should be getting updated in the next few weeks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 00:02:44 2019 From: report at bugs.python.org (Ma Lin) Date: Tue, 03 Sep 2019 04:02:44 +0000 Subject: [issue38015] inline function generates slightly inefficient machine code Message-ID: <1567483364.75.0.314519224234.issue38015@roundup.psfhosted.org> New submission from Ma Lin : Commit 5e63ab0 replaces macro with this inline function: static inline int is_small_int(long long ival) { return -NSMALLNEGINTS <= ival && ival < NSMALLPOSINTS; } (by default, NSMALLNEGINTS is 5, NSMALLPOSINTS is 257) However, when invoking this function, and `sizeof(value) < sizeof(long long)`, there is an unnecessary type casting. For example, on 32-bit platform, if `value` is `Py_ssize_t`, it needs to be converted to 8-byte `long long` type. The following assembly code is the beginning part of `PyLong_FromSsize_t(Py_ssize_t v)` function. (32-bit x86 build generated by GCC 9.2, with `-m32 -O2` option) Use macro before commit 5e63ab0: mov eax, DWORD PTR [esp+4] add eax, 5 cmp eax, 261 ja .L2 sal eax, 4 add eax, OFFSET FLAT:small_ints add DWORD PTR [eax], 1 ret .L2: jmp PyLong_FromSsize_t_rest(int) Use inlined function: push ebx mov eax, DWORD PTR [esp+8] mov edx, 261 mov ecx, eax mov ebx, eax sar ebx, 31 add ecx, 5 adc ebx, 0 cmp edx, ecx mov edx, 0 sbb edx, ebx jc .L7 cwde sal eax, 4 add eax, OFFSET FLAT:small_ints+80 add DWORD PTR [eax], 1 pop ebx ret .L7: pop ebx jmp PyLong_FromSsize_t_rest(int) On 32-bit x86 platform, 8-byte `long long` is implemented in using two registers, so the machine code is much longer than macro version. At least these hot functions are suffered from this: PyObject* PyLong_FromSsize_t(Py_ssize_t v) PyObject* PyLong_FromLong(long v) Replacing the inline function with a macro version will fix this: #define IS_SMALL_INT(ival) (-NSMALLNEGINTS <= (ival) && (ival) < NSMALLPOSINTS) If you want to see assembly code generated by major compilers, you can paste attached file demo.c to https://godbolt.org/ - demo.c was original written by Greg Price. - use `-m32 -O2` to generate 32-bit build. ---------- components: Interpreter Core files: demo.c messages: 351052 nosy: Greg Price, Ma Lin, aeros167, mark.dickinson, rhettinger, sir-sigurd priority: normal severity: normal status: open title: inline function generates slightly inefficient machine code versions: Python 3.9 Added file: https://bugs.python.org/file48583/demo.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 00:27:46 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 03 Sep 2019 04:27:46 +0000 Subject: [issue38015] inline function generates slightly inefficient machine code In-Reply-To: <1567483364.75.0.314519224234.issue38015@roundup.psfhosted.org> Message-ID: <1567484866.4.0.31623277937.issue38015@roundup.psfhosted.org> Raymond Hettinger added the comment: Do you see a way to salvage the commit? If not, I'm fine with reverting it. Its benefit was only aesthetic. ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 00:35:34 2019 From: report at bugs.python.org (Ashwin Ramaswami) Date: Tue, 03 Sep 2019 04:35:34 +0000 Subject: [issue37764] email.Message.as_string infinite loop In-Reply-To: <1565022203.43.0.680976058043.issue37764@roundup.psfhosted.org> Message-ID: <1567485334.92.0.268916021963.issue37764@roundup.psfhosted.org> Change by Ashwin Ramaswami : ---------- pull_requests: +15321 pull_request: https://github.com/python/cpython/pull/15654 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 00:35:31 2019 From: report at bugs.python.org (Ma Lin) Date: Tue, 03 Sep 2019 04:35:31 +0000 Subject: [issue38015] inline function generates slightly inefficient machine code In-Reply-To: <1567483364.75.0.314519224234.issue38015@roundup.psfhosted.org> Message-ID: <1567485331.97.0.867954554216.issue38015@roundup.psfhosted.org> Ma Lin added the comment: There will always be a new commit, replacing with a macro version also looks good. I have no opinion, both are fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 00:38:48 2019 From: report at bugs.python.org (Kyle Stanley) Date: Tue, 03 Sep 2019 04:38:48 +0000 Subject: [issue37934] Docs: Clarify NotImplemented use cases In-Reply-To: <1566596946.3.0.57144717386.issue37934@roundup.psfhosted.org> Message-ID: <1567485528.15.0.452104494482.issue37934@roundup.psfhosted.org> Kyle Stanley added the comment: Thanks for the explanation. > Of course, you might argue that _once Python has NotImplemented_, it can be used elsewhere - but as I said, I don't think it should be encouraged. Hmm, okay. My understanding of Raymond's explanation was more so "let's not encourage this because we don't want to guarantee the behavior" rather than "using it outside of binary operators shoudn't be encouraged". Prior to Jerome's usage of it in ``fractions._as_integer_ratio()`` (https://github.com/python/cpython/pull/15327/files), I had not seen it used outside of special binary operators. I thought it was an interesting usage of NotImplemented, and the current phrasing of the documentation seemed to implicitly discourage it from being used in that manner. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 00:38:59 2019 From: report at bugs.python.org (Ashwin Ramaswami) Date: Tue, 03 Sep 2019 04:38:59 +0000 Subject: [issue21315] email._header_value_parser does not recognise in-line encoding changes In-Reply-To: <1398009498.59.0.139606640186.issue21315@psf.upfronthosting.co.za> Message-ID: <1567485539.82.0.184045621313.issue21315@roundup.psfhosted.org> Change by Ashwin Ramaswami : ---------- pull_requests: +15322 pull_request: https://github.com/python/cpython/pull/15655 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 00:50:37 2019 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Tue, 03 Sep 2019 04:50:37 +0000 Subject: [issue37934] Docs: Clarify NotImplemented use cases In-Reply-To: <1566596946.3.0.57144717386.issue37934@roundup.psfhosted.org> Message-ID: <1567486237.71.0.298468745004.issue37934@roundup.psfhosted.org> Vedran ?a?i? added the comment: Of course, languages evolve. Annotations were introduced just for function arguments, now we use them almost everywhere. Generators were simply loop managers, now they've blown up to complete asynchronous programming beasts. Ellipsis was introduced for easier slicing of n-dimensional objects, now we have it all over the language - precisely because it's so versatile. NotImplemented, I _think_ (but I'm really no expert), is not. As you say, we currently have only one usage of NotImplemented outside its intended purpose. Maybe we should wait to see whether it becomes at least a little bit more popular, before thinking about blessing it. About Raymond's post: well, there can be orthogonal reasons why something isn't a good idea. That doesn't mean it _is_ a good idea. :-] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 00:52:17 2019 From: report at bugs.python.org (Ralf Gommers) Date: Tue, 03 Sep 2019 04:52:17 +0000 Subject: [issue37980] regression when passing numpy bools to sorted(..., reverse=r) In-Reply-To: <1567096742.32.0.970581980709.issue37980@roundup.psfhosted.org> Message-ID: <1567486337.58.0.920806833762.issue37980@roundup.psfhosted.org> Change by Ralf Gommers : ---------- nosy: +ralf.gommers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 00:52:52 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 03 Sep 2019 04:52:52 +0000 Subject: [issue38004] Duplicated sections in changelog In-Reply-To: <1567411024.45.0.536092660752.issue38004@roundup.psfhosted.org> Message-ID: <1567486372.98.0.853407903537.issue38004@roundup.psfhosted.org> Ned Deily added the comment: I'm not sure what happened here or why we haven't noticed it before. For example, it appears that the consolidated blurb file for the earliest example, 3.5.2rc1.rst, has not been modified since its original blurbification (in b902833f35efa1053f75d7b37769b27cb39e2682) and the sections are not sorted and consolidated properly there, i.e. Security entries, then Library, then Security again, etc etc. I"m assuming blurb requires all entries for a section to be contiguous. If so, we'll need to reorder the entries in the affected .rst files perhaps with blurb's aid. Perhaps Larry has an insight on what the easiest approach might be to do that. After fixing the .rst files for the affected releases, it would be a good time to forward port the current versions to later release branches and master so that the changelogs produced in newer releases is complete for older releases (forward port Misc/NEWS.d entries from 3.4 -> 3.5 -> 3.6 -> ... -> master). ---------- nosy: +larry versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 01:06:33 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 03 Sep 2019 05:06:33 +0000 Subject: [issue38004] Duplicated sections in changelog In-Reply-To: <1567411024.45.0.536092660752.issue38004@roundup.psfhosted.org> Message-ID: <1567487193.36.0.367202866494.issue38004@roundup.psfhosted.org> Ned Deily added the comment: Ah, some further insight: I realized that the original docset for 3.5.2 is available in the documentation archive. Comparing the (pre-blurb) changelog from the original release to its current state: https://docs.python.org/release/3.5.2/whatsnew/changelog.html#python-3-5-2-release-candidate-1 https://docs.python.org/3.5/whatsnew/changelog.html#python-3-5-2-release-candidate-1 It looks like the issues are in the same order in both but some issues were reclassified from Library to Security or from Misc to Windows, for example, (during blurbification I imagine) and that seems to explain the non-contiguous sections. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 01:13:31 2019 From: report at bugs.python.org (hai shi) Date: Tue, 03 Sep 2019 05:13:31 +0000 Subject: [issue36267] User input to argparse raises Index_Error: "-a=" on a 'store_true' action In-Reply-To: <1552354570.63.0.477016922618.issue36267@roundup.psfhosted.org> Message-ID: <1567487611.03.0.111221756876.issue36267@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +15323 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15656 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 01:13:44 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 03 Sep 2019 05:13:44 +0000 Subject: [issue37768] IDLE: Show help(object) output in a text viewer In-Reply-To: <1565038566.59.0.841955505333.issue37768@roundup.psfhosted.org> Message-ID: <1567487624.68.0.780670823361.issue37768@roundup.psfhosted.org> Terry J. Reedy added the comment: For myself, I only want this for 'large' outputs. I prefer something like the following left alone. >>> help('continue') The "continue" statement ************************ continue_stmt ::= "continue" "continue" may only occur syntactically nested in a "for" or "while" loop, but not nested in a function or class definition within that loop. It continues with the next cycle of the nearest enclosing loop. When "continue" passes control out of a "try" statement with a "finally" clause, that "finally" clause is executed before really starting the next loop cycle. Related help topics: while, for The threshhold for squeezer should be good enough. I think of this as autosqueeze + autoexpand if this if the first output after '>>>' and the statement began with 'help('. An advantage of doing it this way is that the squeezer button remains after dismissing the viewer. Also, I suspect that most people who disable squeezer would not like this either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 01:17:03 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 03 Sep 2019 05:17:03 +0000 Subject: [issue35771] IDLE: Fix tooltip Hovertiptest failure In-Reply-To: <1547794267.4.0.582455332849.issue35771@roundup.psfhosted.org> Message-ID: <1567487823.54.0.972525408579.issue35771@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 132acaba5a7f01373ca624b1a5975b190fe866f5 by Terry Jan Reedy (Tal Einat) in branch 'master': bpo-35771: IDLE: Fix flaky tool-tip hover delay tests (GH-15634) https://github.com/python/cpython/commit/132acaba5a7f01373ca624b1a5975b190fe866f5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 01:17:14 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Sep 2019 05:17:14 +0000 Subject: [issue35771] IDLE: Fix tooltip Hovertiptest failure In-Reply-To: <1547794267.4.0.582455332849.issue35771@roundup.psfhosted.org> Message-ID: <1567487834.74.0.26748879844.issue35771@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15324 pull_request: https://github.com/python/cpython/pull/15657 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 01:17:53 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Sep 2019 05:17:53 +0000 Subject: [issue35771] IDLE: Fix tooltip Hovertiptest failure In-Reply-To: <1547794267.4.0.582455332849.issue35771@roundup.psfhosted.org> Message-ID: <1567487873.5.0.130263952767.issue35771@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15325 pull_request: https://github.com/python/cpython/pull/15658 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 01:18:27 2019 From: report at bugs.python.org (hai shi) Date: Tue, 03 Sep 2019 05:18:27 +0000 Subject: [issue36267] User input to argparse raises Index_Error: "-a=" on a 'store_true' action In-Reply-To: <1552354570.63.0.477016922618.issue36267@roundup.psfhosted.org> Message-ID: <1567487907.5.0.0336713289509.issue36267@roundup.psfhosted.org> hai shi added the comment: oh, sorry, pls ignore it. I misunderstand your opinion. ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 01:28:59 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 03 Sep 2019 05:28:59 +0000 Subject: [issue35771] IDLE: Fix tooltip Hovertiptest failure In-Reply-To: <1547794267.4.0.582455332849.issue35771@roundup.psfhosted.org> Message-ID: <1567488539.29.0.637159112135.issue35771@roundup.psfhosted.org> Terry J. Reedy added the comment: To decide whether I agree that a live delay test is needed would take time and energy currently better applied to other issues. Since the 2nd PR reduces net test time, and should be at least as good in avoiding spurious failures, I am merging it now. If I later take a new, more general look at when live tests are needed, that will be another issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 01:35:22 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Sep 2019 05:35:22 +0000 Subject: [issue35771] IDLE: Fix tooltip Hovertiptest failure In-Reply-To: <1547794267.4.0.582455332849.issue35771@roundup.psfhosted.org> Message-ID: <1567488922.6.0.803848952271.issue35771@roundup.psfhosted.org> miss-islington added the comment: New changeset 48058050cee5f6600150392100c162f223b4317f by Miss Islington (bot) in branch '3.7': bpo-35771: IDLE: Fix flaky tool-tip hover delay tests (GH-15634) https://github.com/python/cpython/commit/48058050cee5f6600150392100c162f223b4317f ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 01:39:10 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Sep 2019 05:39:10 +0000 Subject: [issue35771] IDLE: Fix tooltip Hovertiptest failure In-Reply-To: <1547794267.4.0.582455332849.issue35771@roundup.psfhosted.org> Message-ID: <1567489150.88.0.554548976882.issue35771@roundup.psfhosted.org> miss-islington added the comment: New changeset 1c18aec3bb7d59061742854d3204439a5274e201 by Miss Islington (bot) in branch '3.8': bpo-35771: IDLE: Fix flaky tool-tip hover delay tests (GH-15634) https://github.com/python/cpython/commit/1c18aec3bb7d59061742854d3204439a5274e201 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 01:42:42 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 03 Sep 2019 05:42:42 +0000 Subject: [issue37768] IDLE: Show help(object) output in a text viewer In-Reply-To: <1565038566.59.0.841955505333.issue37768@roundup.psfhosted.org> Message-ID: <1567489362.72.0.294113036354.issue37768@roundup.psfhosted.org> Terry J. Reedy added the comment: I should have said, 'who disable autosqueeze'. Anyway, an option to disable help autoview will make me more comfortable adding it. A similar change would be to add 'Squeeze & View' to the context menu. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 01:45:33 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 03 Sep 2019 05:45:33 +0000 Subject: [issue35771] IDLE: Fix tooltip Hovertiptest failure In-Reply-To: <1547794267.4.0.582455332849.issue35771@roundup.psfhosted.org> Message-ID: <1567489533.79.0.733338144199.issue35771@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 02:37:52 2019 From: report at bugs.python.org (Mallinath Akkalkot) Date: Tue, 03 Sep 2019 06:37:52 +0000 Subject: [issue38016] Results with re.sub and re.replace is giving different results Message-ID: <1567492672.11.0.939939262697.issue38016@roundup.psfhosted.org> New submission from Mallinath Akkalkot : Issue is explained in the attached presentation for the below python script. # PYTHON script import re stringPassed = "START, 0.272342208623734, 0.122712611838329\nCIRCL, 0.2739, 0.1175, 0.2644, 0.1175\nCIRCL, 0.2644, 0.108, 0.2644, 0.1175\nLINE, 0.26237716818855, 0.108\nCIRCL, 0.2564, 0.102522934456486, 0.26237716818855, 0.102\nLINE, 0.255041919210401, 0.087\nLINE, 0.255041919210401, 0.072\nCIRCL, 0.239541747114243, -0.0106446715786942, 0.0269671265080016, 0.0720000000000296\nCIRCL, 0.2391, -0.0130000000000008, 0.2456, -0.0130000000000008\nLINE, 0.2391, -0.0350000000000008\nCIRCL, 0.243376868486329, -0.0411080018232587, 0.2456, -0.0350000000000008\nLINE, 0.24865951460066, -0.0430307277670375\nCIRCL, 0.255041919210401, -0.0521457461886608, 0.245341919210401, -0.0521457461886608\nLINE, 0.255041919210401, -0.087\nLINE, 0.2564, -0.102522934456486\nCIRCL, 0.26237716818855, -0.108, 0.26237716818855, -0.102\nLINE, 0.2644, -0.108\nCIRCL, 0.2739, -0.1175, 0.2644, -0.1175\nCIRCL, 0.272342208623734, -0.122712611838329, 0.2644, -0.1175\n" retVal = re.findall(r"(\w+,\s+)(-\d+\.\d+)|(\d+\.\d+)", stringPassed, re.MULTILINE) floatNumbersList = [] # List conatins all Folat numbers for each in retVal: for each in each: if each != "":floatNumbersList.append(each) newStringUpdated = stringPassed for eachVal in floatNumbersList: newVal = str(float(eachVal)*1000) retVals = re.sub(eachVal, newVal, newStringUpdated) # retVals = newStringUpdated.replace(eachVal, newVal) newStringUpdated = retVals print(newStringUpdated) ---------- components: Regular Expressions files: Bug_Description_Regular Expression.pptx messages: 351066 nosy: Mallinath Akkalkot, ezio.melotti, mrabarnett priority: normal severity: normal status: open title: Results with re.sub and re.replace is giving different results type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48584/Bug_Description_Regular Expression.pptx _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 02:43:54 2019 From: report at bugs.python.org (Mallinath Akkalkot) Date: Tue, 03 Sep 2019 06:43:54 +0000 Subject: [issue38016] Results with re.sub and re.replace is giving different results In-Reply-To: <1567492672.11.0.939939262697.issue38016@roundup.psfhosted.org> Message-ID: <1567493034.47.0.919926787823.issue38016@roundup.psfhosted.org> Change by Mallinath Akkalkot : Removed file: https://bugs.python.org/file48584/Bug_Description_Regular Expression.pptx _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 02:44:14 2019 From: report at bugs.python.org (Mallinath Akkalkot) Date: Tue, 03 Sep 2019 06:44:14 +0000 Subject: [issue38016] Results with re.sub and re.replace is giving different results In-Reply-To: <1567492672.11.0.939939262697.issue38016@roundup.psfhosted.org> Message-ID: <1567493054.15.0.539731087102.issue38016@roundup.psfhosted.org> Change by Mallinath Akkalkot : Added file: https://bugs.python.org/file48585/Bug_Description_Regular Expression.pptx _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 03:07:54 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 03 Sep 2019 07:07:54 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567494474.18.0.400443102618.issue38006@roundup.psfhosted.org> Christian Heimes added the comment: Thanks Victor! I have opened a bug for CFFI, https://bitbucket.org/cffi/cffi/issues/416/python-38-segfault-cfield_type-does-not ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 03:15:55 2019 From: report at bugs.python.org (hongweipeng) Date: Tue, 03 Sep 2019 07:15:55 +0000 Subject: [issue38016] Results with re.sub and re.replace is giving different results In-Reply-To: <1567492672.11.0.939939262697.issue38016@roundup.psfhosted.org> Message-ID: <1567494955.81.0.409607509192.issue38016@roundup.psfhosted.org> hongweipeng added the comment: It's because ```re.sub('0.072', '72.0', newStringUpdated)``` match '03072' in -0.043'03072'77670375. `.` can match any character in regular expression.So I don't think that's a issue. ---------- nosy: +hongweipeng _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 03:24:44 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Sep 2019 07:24:44 +0000 Subject: [issue38016] Results with re.sub and re.replace is giving different results In-Reply-To: <1567492672.11.0.939939262697.issue38016@roundup.psfhosted.org> Message-ID: <1567495484.24.0.77872852561.issue38016@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 03:41:26 2019 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 03 Sep 2019 07:41:26 +0000 Subject: [issue37941] python -m and runpy.run_module set different __name__ by default In-Reply-To: <1566669555.03.0.62423685183.issue37941@roundup.psfhosted.org> Message-ID: <1567496486.26.0.40786686579.issue37941@roundup.psfhosted.org> Nick Coghlan added the comment: Yes, this is deliberate. From the run_module documentation: "__name__ is set to run_name if this optional argument is not None, to mod_name + '.__main__' if the named module is a package and to the mod_name argument otherwise." This allows arbitrary code to be executed to populate a namespace, but you have to explicitly opt-in to having a second pseudo-__main__ module run in the same process (with all the potential pickle compatibility issues that doing so creates). ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 03:41:37 2019 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 03 Sep 2019 07:41:37 +0000 Subject: [issue37941] python -m and runpy.run_module set different __name__ by default In-Reply-To: <1566669555.03.0.62423685183.issue37941@roundup.psfhosted.org> Message-ID: <1567496497.53.0.0610121301146.issue37941@roundup.psfhosted.org> Change by Nick Coghlan : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 03:47:43 2019 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 03 Sep 2019 07:47:43 +0000 Subject: [issue31874] [feature] runpy.run_module should mimic script launch behavior for sys.path In-Reply-To: <1509026474.72.0.213398074469.issue31874@psf.upfronthosting.co.za> Message-ID: <1567496863.38.0.929244531893.issue31874@roundup.psfhosted.org> Nick Coghlan added the comment: Good point regarding the heuristic: it would need to take the requested module name into account to be correct. * check if the requested module was found relative to the current directory (can be worked out from __main__.__spec__ and the current working directory) * if it was, make sys.path[0] the absolute path of the current directory * otherwise, remove sys.path[0] entirely ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 03:49:39 2019 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 03 Sep 2019 07:49:39 +0000 Subject: [issue37947] symtable_handle_namedexpr does not adjust correctly the recursion level In-Reply-To: <1566788950.92.0.897432675692.issue37947@roundup.psfhosted.org> Message-ID: <1567496979.62.0.492381520929.issue37947@roundup.psfhosted.org> Nick Coghlan added the comment: We never actually coded a reproducer for this, but if we had, it would have been a crash bug. ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 03:56:10 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 03 Sep 2019 07:56:10 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567497370.89.0.439375998656.issue38006@roundup.psfhosted.org> Christian Heimes added the comment: Pablo, Victor, could you please assist Armin on the CFFI issue? As usual the situation is more complex than I anticipated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 04:15:02 2019 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 03 Sep 2019 08:15:02 +0000 Subject: [issue37398] contextlib.ContextDecorator decorating async functions In-Reply-To: <1561445403.56.0.10750759042.issue37398@roundup.psfhosted.org> Message-ID: <1567498502.53.0.949028371449.issue37398@roundup.psfhosted.org> Nick Coghlan added the comment: It isn't the simple case where the auto-detection idea concerns me, it's decorator stacking cases like: @outer @magic_detection @inner_forces_async def sync_native_api(): ... (With the original asyncio.coroutine being one example, but there are other situations where this comes up, like a wrapper that bundles synchronous calls up into an executor invocation) That said, I'd be completely fine with a combination where: * ContextDecorator grew a coroutine() classmethod (open to suggestions for bikeshed colours) * The regular ContextDecorator constructor emitted a warning suggesting "cls.coroutine" when it was applied to a synchronous function Then the original example would provide distinct spellings for the sync and async case, without the definition of PerfTimer needing to change: @PerfTimer.coroutine('query_async') async def query_or_throw(self, q): return _parse_result(await self._send_query(q)) @PerfTimer('query_sync') def query_or_throw(self, q): return _parse_result(self._send_query_sync(q)) That way we're still refusing to guess in the face of ambiguity (does the user want the coroutine version of the context manager, or did they accidentally mix a potentially blocking synchronous context manager into their async code?), but the warning can be usefully explicit regarding how to resolve the ambiguity. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 04:25:36 2019 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 03 Sep 2019 08:25:36 +0000 Subject: [issue37743] How should contextmanager/ContextDecorator work with generators? In-Reply-To: <1564702384.75.0.948740630584.issue37743@roundup.psfhosted.org> Message-ID: <1567499136.05.0.113481700024.issue37743@roundup.psfhosted.org> Nick Coghlan added the comment: This is a documentation bug, as the current behaviour is as intended, but the documented equivalence doesn't hold for generator functions: for a generator function, the CM will only be applied when the generator is instantiated, whereas the inline context manager version will be held open until the generator is closed or destroyed. That said, an approach similar to the one discussed in #37398 could also be applied, here, with a separate "ContextDecorator.generator()" class method added to give the "wrapped yield from" behaviour. If anyone is interested in pursuing that, it can be filed as a separate enhancement issue (leaving this bug to cover the fact that the existing documentation is only accurate for regular synchronous functions) ---------- assignee: ncoghlan -> components: +Documentation -Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 04:26:35 2019 From: report at bugs.python.org (Julian Berman) Date: Tue, 03 Sep 2019 08:26:35 +0000 Subject: [issue37941] python -m and runpy.run_module set different __name__ by default In-Reply-To: <1567496497.55.0.915706655199.issue37941@roundup.psfhosted.org> Message-ID: Julian Berman added the comment: Is there no desire to have an API that works like -m (entirely. In this and any other way)? On Tue, Sep 3, 2019, 09:41 Nick Coghlan wrote: > > Change by Nick Coghlan : > > > ---------- > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 04:29:05 2019 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 03 Sep 2019 08:29:05 +0000 Subject: [issue37398] contextlib.ContextDecorator decorating async functions In-Reply-To: <1561445403.56.0.10750759042.issue37398@roundup.psfhosted.org> Message-ID: <1567499345.74.0.234618324342.issue37398@roundup.psfhosted.org> Nick Coghlan added the comment: The query in #37743 highlights that generator functions and other wrapped iterator factories actually face a similar problem: they need the function body to contain "yield from wrapped(*args, **kwargs)" if the CM is going to be closed after the iterator terminates (or is closed), rather than closing immediately after the iterator is created. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 04:45:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Sep 2019 08:45:31 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567500331.52.0.216286891717.issue38006@roundup.psfhosted.org> STINNER Victor added the comment: Attached crash.tar.gz: minimum reproducer which doesn't depend on FreeIPA anymore. Depends on: * cffi (_cffi_backend dynamic library) * pycparser * Python 3.8 (need "python3.8") To reproduce the crash: $ tar -xf reproducer.tar.gz $ cd reproducer/ $ ./bug.sh Output: (...) ++ env/bin/python ./crash.py exit ./bug.sh : ligne 7 : 14529 Segmentation fault (core dumped)env/bin/python ./crash.py ++ echo 'exitcode: 139' exitcode: 139 ---------- Added file: https://bugs.python.org/file48586/reproducer.tar.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 04:53:04 2019 From: report at bugs.python.org (Dirkjan Ochtman) Date: Tue, 03 Sep 2019 08:53:04 +0000 Subject: [issue7946] Convoy effect with I/O bound threads and New GIL In-Reply-To: <1266353325.38.0.278549753357.issue7946@psf.upfronthosting.co.za> Message-ID: <1567500784.27.0.703455052394.issue7946@roundup.psfhosted.org> Change by Dirkjan Ochtman : ---------- nosy: -djc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 04:52:40 2019 From: report at bugs.python.org (Dirkjan Ochtman) Date: Tue, 03 Sep 2019 08:52:40 +0000 Subject: [issue17239] XML vulnerabilities in Python In-Reply-To: <1361288141.97.0.791394359972.issue17239@psf.upfronthosting.co.za> Message-ID: <1567500760.95.0.192254475734.issue17239@roundup.psfhosted.org> Change by Dirkjan Ochtman : ---------- nosy: -djc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 04:53:14 2019 From: report at bugs.python.org (Dirkjan Ochtman) Date: Tue, 03 Sep 2019 08:53:14 +0000 Subject: [issue7247] test_fcntl_64_bit from test_fcntl.py fails in Python 2.6.4 In-Reply-To: <1257103206.04.0.134413608226.issue7247@psf.upfronthosting.co.za> Message-ID: <1567500794.32.0.900917446783.issue7247@roundup.psfhosted.org> Change by Dirkjan Ochtman : ---------- nosy: -djc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 04:53:24 2019 From: report at bugs.python.org (Dirkjan Ochtman) Date: Tue, 03 Sep 2019 08:53:24 +0000 Subject: [issue6731] Add option of non-zero exit status of setup.py when building of extensions has failed In-Reply-To: <1250634322.79.0.224296931911.issue6731@psf.upfronthosting.co.za> Message-ID: <1567500804.24.0.958870006464.issue6731@roundup.psfhosted.org> Change by Dirkjan Ochtman : ---------- nosy: -djc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 04:53:41 2019 From: report at bugs.python.org (Dirkjan Ochtman) Date: Tue, 03 Sep 2019 08:53:41 +0000 Subject: [issue29427] Option to skip padding for base64 urlsafe encoding/decoding In-Reply-To: <1486085117.43.0.563120448637.issue29427@psf.upfronthosting.co.za> Message-ID: <1567500821.09.0.552271447805.issue29427@roundup.psfhosted.org> Change by Dirkjan Ochtman : ---------- nosy: +djc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 05:21:52 2019 From: report at bugs.python.org (Tal Einat) Date: Tue, 03 Sep 2019 09:21:52 +0000 Subject: [issue37798] Add C fastpath for statistics.NormalDist.inv_cdf() In-Reply-To: <1565325806.95.0.315734354533.issue37798@roundup.psfhosted.org> Message-ID: <1567502512.08.0.432166841994.issue37798@roundup.psfhosted.org> Tal Einat added the comment: New changeset 0cf832a9ef84be6e18aad02464814530d80b82b2 by Tal Einat (Dong-hee Na) in branch 'master': bpo-37798: Fix _statistics module doc (GH-15546) https://github.com/python/cpython/commit/0cf832a9ef84be6e18aad02464814530d80b82b2 ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 05:22:12 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Sep 2019 09:22:12 +0000 Subject: [issue37798] Add C fastpath for statistics.NormalDist.inv_cdf() In-Reply-To: <1565325806.95.0.315734354533.issue37798@roundup.psfhosted.org> Message-ID: <1567502532.3.0.0110916693322.issue37798@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15326 pull_request: https://github.com/python/cpython/pull/15660 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 06:21:10 2019 From: report at bugs.python.org (Antony Lee) Date: Tue, 03 Sep 2019 10:21:10 +0000 Subject: [issue37743] How should contextmanager/ContextDecorator work with generators? In-Reply-To: <1564702384.75.0.948740630584.issue37743@roundup.psfhosted.org> Message-ID: <1567506070.95.0.251396741988.issue37743@roundup.psfhosted.org> Change by Antony Lee : ---------- nosy: -Antony.Lee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 06:22:06 2019 From: report at bugs.python.org (Tal Einat) Date: Tue, 03 Sep 2019 10:22:06 +0000 Subject: [issue37798] Add C fastpath for statistics.NormalDist.inv_cdf() In-Reply-To: <1565325806.95.0.315734354533.issue37798@roundup.psfhosted.org> Message-ID: <1567506126.06.0.794533853176.issue37798@roundup.psfhosted.org> Tal Einat added the comment: New changeset 58067d2cf6e81187f9782aff03cc8bec3d878778 by Tal Einat (Miss Islington (bot)) in branch '3.8': bpo-37798: Fix _statistics module doc (GH-15546) https://github.com/python/cpython/commit/58067d2cf6e81187f9782aff03cc8bec3d878778 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 06:59:56 2019 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 03 Sep 2019 10:59:56 +0000 Subject: [issue30076] Opcode names BUILD_MAP_UNPACK_WITH_CALL and BUILD_TUPLE_UNPACK_WITH_CALL are too long In-Reply-To: <1492277239.5.0.348724747458.issue30076@psf.upfronthosting.co.za> Message-ID: <1567508396.71.0.361387962425.issue30076@roundup.psfhosted.org> Nick Coghlan added the comment: Reviewing this again now, I think my previous naming suggestion is problematic, as it encourages conflating two different concepts that use similar syntax: * collecting arbitrary positional parameters in a tuple (VAR_POSITIONAL) or arbitrary keyword parameters in a dictionary (VAR_POSITIONAL, VAR_KEYWORD) * unpacking function arguments from iterables (BUILD_VAR_POSITIONAL) or mappings (BUILD_VAR_KEYWORD) I think the fix for that error is straightforward though: replace "VAR" with "ARG" in the new opcode names, giving: * BUILD_ARG_POSITIONAL * BUILD_ARG_KEYWORD That should also read nicely with Zackery's documentation updates. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 07:13:43 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 Sep 2019 11:13:43 +0000 Subject: [issue30076] Opcode names BUILD_MAP_UNPACK_WITH_CALL and BUILD_TUPLE_UNPACK_WITH_CALL are too long In-Reply-To: <1492277239.5.0.348724747458.issue30076@psf.upfronthosting.co.za> Message-ID: <1567509223.52.0.516813832585.issue30076@roundup.psfhosted.org> Serhiy Storchaka added the comment: These opcodes are always used with CALL_FUNCTION_EX (which can be used also without any of them). f(*a, *b, **c, **d) 1 0 LOAD_NAME 0 (f) 2 LOAD_NAME 1 (a) 4 LOAD_NAME 2 (b) 6 BUILD_TUPLE_UNPACK_WITH_CALL 2 8 LOAD_NAME 3 (c) 10 LOAD_NAME 4 (d) 12 BUILD_MAP_UNPACK_WITH_CALL 2 14 CALL_FUNCTION_EX 1 I though about naming CALL_FUNCTION_EX as CALL_FUNCTION_VAR in 3.6, but this name was used in pre-3.6 bytecode with different semantic. Now I think there is smaller change of confusion, so it can be renamed to CALL_FUNCTION_VAR or something other. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 08:21:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Sep 2019 12:21:13 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567513273.65.0.888277214763.issue38006@roundup.psfhosted.org> STINNER Victor added the comment: I failed to write a reproducer from scratch. So let me share my notes here. The first point is that remove() function of WeakValueDictionary keeps WeakValueDictionary.data alive like that: --- class NoisyDel: def __del__(self): print("dealloc data dict") def create_closure(): data = {0: NoisyDel()} def remove(): return data return remove remove = create_closure() print("clear ") remove = None print("exit") --- data is only deleted once remove is cleared. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 08:45:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Sep 2019 12:45:01 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567514701.35.0.255986681549.issue38006@roundup.psfhosted.org> STINNER Victor added the comment: Second step: when func_clear() is called, the closure is cleared. Clearing the closure should call the function which is being cleared (or is already cleared). --- import gc class CallFunc: def __del__(self): func = self.func if func is None: return print("CallFunc", func) func("call func from CallFunc.__del__") def create_remove(): call_func = CallFunc() def remove(msg): x = call_func print(msg) remove.__name__ = "evil_func" call_func.func = remove return call_func, remove call_func, remove = create_remove() print("== clear ==") call_func = None remove = None print() print("== collect ==") gc.collect() print() print("== exit ==") --- Output (with my hacked CPython): ------------------ == clear == == collect == CallFunc .remove at 0x7fab8a189eb0> call func from CallFunc.__del__ func_clear remove() -- in delete_garbage? 1 == exit == ------------------ call_func and remove are part of a reference cycle. A forced garbage collection breaks the cycle and removes the two objects, but they are not removed in the expected order: * first: call_func * then: remove The crash requires to destroy the objects in the reverse order ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 08:48:26 2019 From: report at bugs.python.org (DannyNiu) Date: Tue, 03 Sep 2019 12:48:26 +0000 Subject: [issue38017] IO-like interface for SHAKE-* and other XOFs. Message-ID: <1567514906.04.0.888108599586.issue38017@roundup.psfhosted.org> New submission from DannyNiu : The SHAKE family functions are the first formally defined XOFs (eXtensible Output Functions), previous implementations such as MGF from PKCS#1 relies on ad-hoc construction. In the current library, SHAKE-* are given digest-like interface, where their output has to be always obtained from the start; where as in reality, there exists applications that consumes such output progressively, such as deterministic key generation from fixed seed, and more specifically, as the random oracle used in Crystals-Dilithium post-quantum digital signature scheme. Therefore, I'd like developers consider adding ``shake.read(len)'' function to support IO-like consumption in hashlib. ---------- components: Library (Lib) messages: 351084 nosy: dannyniu priority: normal severity: normal status: open title: IO-like interface for SHAKE-* and other XOFs. type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 09:58:05 2019 From: report at bugs.python.org (Vinay Sharma) Date: Tue, 03 Sep 2019 13:58:05 +0000 Subject: [issue38018] Increase Code Coverage for multiprocessing.shared_memory Message-ID: <1567519085.54.0.887939969587.issue38018@roundup.psfhosted.org> New submission from Vinay Sharma : Increase Code coverage for multiprocessing.shared_memory.SharedMemory Class ---------- components: Tests messages: 351085 nosy: vinay0410 priority: normal severity: normal status: open title: Increase Code Coverage for multiprocessing.shared_memory versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 10:00:53 2019 From: report at bugs.python.org (Niklas Sombert) Date: Tue, 03 Sep 2019 14:00:53 +0000 Subject: [issue34226] cgi.parse_multipart() requires undocumented CONTENT-LENGTH in Python 3.7 In-Reply-To: <1532530540.72.0.56676864532.issue34226@psf.upfronthosting.co.za> Message-ID: <1567519253.54.0.169257298958.issue34226@roundup.psfhosted.org> Change by Niklas Sombert : ---------- nosy: +ytvwld _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 10:03:32 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 03 Sep 2019 14:03:32 +0000 Subject: [issue38018] Increase Code Coverage for multiprocessing.shared_memory In-Reply-To: <1567519085.54.0.887939969587.issue38018@roundup.psfhosted.org> Message-ID: <1567519412.16.0.574754263084.issue38018@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +davin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 10:09:48 2019 From: report at bugs.python.org (Vinay Sharma) Date: Tue, 03 Sep 2019 14:09:48 +0000 Subject: [issue38018] Increase Code Coverage for multiprocessing.shared_memory In-Reply-To: <1567519085.54.0.887939969587.issue38018@roundup.psfhosted.org> Message-ID: <1567519788.96.0.399585658286.issue38018@roundup.psfhosted.org> Change by Vinay Sharma : ---------- keywords: +patch pull_requests: +15327 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15662 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 10:20:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Sep 2019 14:20:30 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567520430.02.0.26752251203.issue38006@roundup.psfhosted.org> STINNER Victor added the comment: Aha! I reproduced the crash with attached gc_crash.py and gc_crash.patch: # cd /path/to/python/source $ git apply gc_crash.patch $ make $ ./python gc_crash.py Segmentation fault (core dumped) ---------- Added file: https://bugs.python.org/file48587/gc_crash.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 10:20:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Sep 2019 14:20:39 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567520439.04.0.669703053739.issue38006@roundup.psfhosted.org> Change by STINNER Victor : Added file: https://bugs.python.org/file48588/gc_crash.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 11:06:22 2019 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 03 Sep 2019 15:06:22 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567523182.13.0.352081063926.issue24416@roundup.psfhosted.org> Paul Ganssle added the comment: > What IS unprecedented is having a C function bend over backwards to return an instance of collections.namedtuple(). Is this an issue that anyone is currently insisting upon? From what I can tell the current implementation uses a structseq and none of my objections had to do with the properties of a structseq. > ISTM the cross-version pickling issue is minor red herring. We've cheerfully upgraded tuples to structseqs on a number of occasions and it hasn't been an issue. I generally agree with this - it is nice to not break this compatibility when there's no good reason to do so, but pickling data in one version of Python and unpickling it in another is not something that's supported by the pickle module anyway. > Tim, would you please weigh in on this so we can put this to bed, either closing the request because we're too meek to make any change, upgrading to structseq to provide the requested functionality, or twisting our code in weird ways to have a C function become dependent on a pure python module. I must take some umbrage at this framing of the question. I don't even know where meekness comes into it - adding *any* new functionality brings support burdens and additional code complexity and changes to code that's been stable for a long time like `dateutil.isocalendar` is particularly likely to cause breakages if only because of the time people have had to start relying on the specific implementation. I have merely asked for a justification and an argument other than your subjective judgement that this is a nice improvement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 12:42:58 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Sep 2019 16:42:58 +0000 Subject: [issue37764] email.Message.as_string infinite loop In-Reply-To: <1565022203.43.0.680976058043.issue37764@roundup.psfhosted.org> Message-ID: <1567528978.96.0.361408496669.issue37764@roundup.psfhosted.org> miss-islington added the comment: New changeset ea21389dda401457198fb214aa2c981a45ed9528 by Miss Islington (bot) (Ashwin Ramaswami) in branch '3.7': [3.7] bpo-37764: Fix infinite loop when parsing unstructured email headers. (GH-15239) (GH-15654) https://github.com/python/cpython/commit/ea21389dda401457198fb214aa2c981a45ed9528 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 12:55:09 2019 From: report at bugs.python.org (Marat Sharafutdinov) Date: Tue, 03 Sep 2019 16:55:09 +0000 Subject: [issue38019] AttributeError: 'NoneType' object has no attribute '_add_reader' / '_remove_reader' Message-ID: <1567529709.4.0.805713285268.issue38019@roundup.psfhosted.org> New submission from Marat Sharafutdinov : I'm trying to use dwdiff (https://os.ghalkes.nl/dwdiff.html) to compare two text files. While running subprocess I'm getting the following errors: ``` Traceback (most recent call last): File "test_dwdiff.py", line 17, in asyncio.run(main()) File "/home/decaz/.pyenv/versions/3.7.4/lib/python3.7/asyncio/runners.py", line 43, in run return loop.run_until_complete(main) File "/home/decaz/.pyenv/versions/3.7.4/lib/python3.7/asyncio/base_events.py", line 579, in run_until_complete return future.result() File "test_dwdiff.py", line 14, in main await asyncio.gather(*(dwdiff() for __ in range(25))) File "test_dwdiff.py", line 10, in dwdiff await process.communicate() File "/home/decaz/.pyenv/versions/3.7.4/lib/python3.7/asyncio/subprocess.py", line 187, in communicate loop=self._loop) File "/home/decaz/.pyenv/versions/3.7.4/lib/python3.7/asyncio/subprocess.py", line 166, in _read_stream output = await stream.read() File "/home/decaz/.pyenv/versions/3.7.4/lib/python3.7/asyncio/streams.py", line 633, in read block = await self.read(self._limit) File "/home/decaz/.pyenv/versions/3.7.4/lib/python3.7/asyncio/streams.py", line 646, in read self._maybe_resume_transport() File "/home/decaz/.pyenv/versions/3.7.4/lib/python3.7/asyncio/streams.py", line 417, in _maybe_resume_transport self._transport.resume_reading() File "/home/decaz/.pyenv/versions/3.7.4/lib/python3.7/asyncio/unix_events.py", line 498, in resume_reading self._loop._add_reader(self._fileno, self._read_ready) AttributeError: 'NoneType' object has no attribute '_add_reader' ``` and ``` Exception in callback SubprocessStreamProtocol.pipe_data_received(1, b'\xd0\x9f\xd...b8\xd1\x8f.\n') handle: Traceback (most recent call last): File "/home/decaz/.pyenv/versions/3.7.4/lib/python3.7/asyncio/events.py", line 88, in _run self._context.run(self._callback, *self._args) File "/home/decaz/.pyenv/versions/3.7.4/lib/python3.7/asyncio/subprocess.py", line 71, in pipe_data_received reader.feed_data(data) File "/home/decaz/.pyenv/versions/3.7.4/lib/python3.7/asyncio/streams.py", line 440, in feed_data self._transport.pause_reading() File "/home/decaz/.pyenv/versions/3.7.4/lib/python3.7/asyncio/unix_events.py", line 495, in pause_reading self._loop._remove_reader(self._fileno) AttributeError: 'NoneType' object has no attribute '_remove_reader' ``` The code is the following: ``` import asyncio async def dwdiff(): process = await asyncio.create_subprocess_exec( '/usr/local/bin/dwdiff', 'f1.txt', 'f2.txt', stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE, ) await process.communicate() async def main(): await asyncio.gather(*(dwdiff() for __ in range(25))) asyncio.run(main()) ``` Two text files f1.txt and f2.txt are attached as archive. Perhaps it relates to https://bugs.python.org/issue29704 ---------- components: asyncio files: f1_and_f2.zip messages: 351090 nosy: asvetlov, decaz, yselivanov priority: normal severity: normal status: open title: AttributeError: 'NoneType' object has no attribute '_add_reader' / '_remove_reader' type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48589/f1_and_f2.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 13:08:44 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Sep 2019 17:08:44 +0000 Subject: [issue21315] email._header_value_parser does not recognise in-line encoding changes In-Reply-To: <1398009498.59.0.139606640186.issue21315@psf.upfronthosting.co.za> Message-ID: <1567530524.5.0.180687519733.issue21315@roundup.psfhosted.org> miss-islington added the comment: New changeset 59e8fba7189d0e86d428a1125744afb8b0f40b5d by Miss Islington (bot) (Ashwin Ramaswami) in branch '3.8': [3.8] bpo-21315: Fix parsing of encoded words with missing leading ws (GH-13425) (GH-15655) https://github.com/python/cpython/commit/59e8fba7189d0e86d428a1125744afb8b0f40b5d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 13:57:47 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 03 Sep 2019 17:57:47 +0000 Subject: [issue37597] audit event table breaks PDF sphinx build In-Reply-To: <1563208463.4.0.49055543405.issue37597@roundup.psfhosted.org> Message-ID: <1567533467.36.0.254230318562.issue37597@roundup.psfhosted.org> Steve Dower added the comment: Guessing we still need to fix this... Julien - does this exception get raised through Doc/tools/extensions/pyspecific.py? At the get_relative_uri() call (line 573) perhaps? If so, it seems like we could just handle it there and leave out any links that aren't in the doc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 14:15:10 2019 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 03 Sep 2019 18:15:10 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567534510.12.0.198477397541.issue24416@roundup.psfhosted.org> Paul Ganssle added the comment: In an effort to get a sense of how useful this would actually be, I did a code search for `.isoformat()` on github. I saw a few doctests that will break (if they're even being run) if we make this change, but I also found that the *vast* majority of uses of `isocalendar` seem to be people pulling out a single component of it, like: `return datetime.datetime.now().isocalendar()[1]`. That is not the kind of usage pattern I was envisioning when I said that this was a marginal improvement, a *lot* of this code could be made considerably more readable with named fields. If indeed the performance is similar or the same and this won't impact consumers of the pure python version of the module unduly (I checked in #pypy and they think that it shouldn't be more than a minor irritation if anything), then I am changing my -1 to a +1. ---------- assignee: tim.peters -> p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 14:28:55 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 03 Sep 2019 18:28:55 +0000 Subject: [issue38020] os.path.realpath crashes in Windows Store package Message-ID: <1567535335.44.0.142880989456.issue38020@roundup.psfhosted.org> New submission from Steve Dower : When installed via the Store, "python3.8 -c 'import sysconfig'" crashes hard. So far, I've discovered it's inside an os.path.realpath() call, and appears to be a refcounting issue (double DECREF I think), but haven't gotten any further yet. I'm looking into it. ---------- assignee: steve.dower components: Windows keywords: 3.8regression messages: 351094 nosy: lukasz.langa, paul.moore, steve.dower, tim.golden, zach.ware priority: release blocker severity: normal stage: test needed status: open title: os.path.realpath crashes in Windows Store package type: crash versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 14:45:57 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 03 Sep 2019 18:45:57 +0000 Subject: [issue38020] os.path.realpath crashes in Windows Store package In-Reply-To: <1567535335.44.0.142880989456.issue38020@roundup.psfhosted.org> Message-ID: <1567536357.53.0.0988662728927.issue38020@roundup.psfhosted.org> Steve Dower added the comment: I forgot to initialize the result object in readlink() on Windows, and so when we hit the failure path it returns garbage. Attempting to DECREF that garbage fails. The call to readlink() fails in the Store app because sys.executable is not a readable link. It should fail in most cases anyway, but apparently outside of the app container the stack is NULL here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 14:49:05 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 03 Sep 2019 18:49:05 +0000 Subject: [issue38020] os.path.realpath crashes in Windows Store package In-Reply-To: <1567535335.44.0.142880989456.issue38020@roundup.psfhosted.org> Message-ID: <1567536545.73.0.904577080348.issue38020@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +15328 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/15663 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 15:02:48 2019 From: report at bugs.python.org (Michael Felt) Date: Tue, 03 Sep 2019 19:02:48 +0000 Subject: [issue38021] pep425 tag for AIX is inadequate Message-ID: <1567537368.97.0.869605154196.issue38021@roundup.psfhosted.org> New submission from Michael Felt : PEP425 stats the platform tag is what distutils.util.get_platform() (and sysconfig.get_platform()) returns. By that definition - anything is okay, as long as something is returned. However, in practice, it is insufficient. Simplest case - there is no indication of the fitness of the running Python. This, by itself, may be a reason that VARs and others have never attempted to develop binary (compatible) eggs or wheels. Looking further at missed potential - AIX has an algorithm that can be used to permit a forward (binary) compatible ABI for packaging. The current state of packaging for AIX is to create an RPM or INSTALLP formatted package - and install that. Even pure-python modules must be packaged in this way - to satisfy the "binary" dependencies. For a binary compatible algorithm to be possible changes will be needed in pypa tools. However, rather than "patch" three sets of tools to correct the inadequacy of the current PEP425 tag for AIX I propose to tag AIX as: AIX-VRTL-YYWW-BT or AIX.{}{}{:02d}.{}.{}".format(v,r,int(tl),bd,sz) where v=version, r=release, tl=technology_level, bd=builddate, and sz=fitness (32|64). Further, rather than place this code "inline" in distutils or sysconfig create a new support module for AIX - similar to the _osx_support module (I.e. _aix_support). ---------- components: Distutils, Library (Lib) messages: 351096 nosy: Michael.Felt, dstufft, eric.araujo priority: normal severity: normal status: open title: pep425 tag for AIX is inadequate type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 15:03:42 2019 From: report at bugs.python.org (Tal Einat) Date: Tue, 03 Sep 2019 19:03:42 +0000 Subject: [issue38022] IDLE: Upgrade help.html to sphinx 2 Message-ID: <1567537422.32.0.254523116379.issue38022@roundup.psfhosted.org> New submission from Tal Einat : The rest of our docs use version 2.x of Sphinx with its new HTML5 output writer. However, IDLE's help.html is a version of idle.rst rendered with the old writer, via the `-D html4_writer=1` command line parameter. The reason for this is that the new output is slightly different, and causes some regression in how IDLE's HTML help renderer displays the help information. I propose to upgrade the IDLE HTML help renderer to properly handle the new output. ---------- assignee: terry.reedy components: IDLE messages: 351097 nosy: taleinat, terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: Upgrade help.html to sphinx 2 type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 15:22:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Sep 2019 19:22:20 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567538540.65.0.539449668045.issue38006@roundup.psfhosted.org> STINNER Victor added the comment: gc_crash.py: * PyObject_GC_UnTrack() + PyObject_GC_Track() is used to order objects in the GC collection 0, the objects which are involved in the reference cycle. * BadGC2Type type is implemented in C, uses Py_TPFLAGS_HAVE_GC, implements tp_traverse, but it doesn't implement tp_clear. * IHMO gc_crash.py is only legit code. BadGC2Type implements the GC protocol (except to tp_clear). I'm not sure that it's the same bug than reproducer.tar.gz which uses a weak reference. BadGC2Type is used to call a function in tp_dealloc. It should be possible to use a weak reference for that: the weak reference can use a callback. But I failed write a reproducer script using a weak reference. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 15:30:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 03 Sep 2019 19:30:29 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567539029.24.0.634351307567.issue38006@roundup.psfhosted.org> STINNER Victor added the comment: collect() of gcmodule.c: * collect() builds an "unreachable" list which is quite important in this bug * the bug occurs in delete_garbage() which uses the unreachable list * weak references part of unreachable are handled before delete_garbage() in handle_weakrefs(): "Clear weakrefs and invoke callbacks as necessary". It seems like reproducer.tar.gz and gc_crash.py crashes involve a reference cycle. reproducer.tar.gz uses a weak reference which is *not* part of the reference cycle. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 15:46:15 2019 From: report at bugs.python.org (Tal Einat) Date: Tue, 03 Sep 2019 19:46:15 +0000 Subject: [issue38022] IDLE: Upgrade help.html to sphinx 2 In-Reply-To: <1567537422.32.0.254523116379.issue38022@roundup.psfhosted.org> Message-ID: <1567539975.53.0.562637685349.issue38022@roundup.psfhosted.org> Change by Tal Einat : ---------- keywords: +patch pull_requests: +15329 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15664 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 15:50:56 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 03 Sep 2019 19:50:56 +0000 Subject: [issue38020] os.path.realpath crashes in Windows Store package In-Reply-To: <1567535335.44.0.142880989456.issue38020@roundup.psfhosted.org> Message-ID: <1567540256.16.0.764557639806.issue38020@roundup.psfhosted.org> Steve Dower added the comment: New changeset 993ac92418839427d4068d6ae8e618b06b5d9294 by Steve Dower in branch 'master': bpo-38020: Fixes crash in os.readlink() on Windows (GH-15663) https://github.com/python/cpython/commit/993ac92418839427d4068d6ae8e618b06b5d9294 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 15:51:10 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Sep 2019 19:51:10 +0000 Subject: [issue38020] os.path.realpath crashes in Windows Store package In-Reply-To: <1567535335.44.0.142880989456.issue38020@roundup.psfhosted.org> Message-ID: <1567540270.18.0.0522218094094.issue38020@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15330 pull_request: https://github.com/python/cpython/pull/15665 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 15:52:22 2019 From: report at bugs.python.org (Tal Einat) Date: Tue, 03 Sep 2019 19:52:22 +0000 Subject: [issue38022] IDLE: Upgrade help.html to sphinx 2 In-Reply-To: <1567537422.32.0.254523116379.issue38022@roundup.psfhosted.org> Message-ID: <1567540342.97.0.270410889157.issue38022@roundup.psfhosted.org> Tal Einat added the comment: See PR GH-15664 with an implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 16:13:47 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Sep 2019 20:13:47 +0000 Subject: [issue38020] os.path.realpath crashes in Windows Store package In-Reply-To: <1567535335.44.0.142880989456.issue38020@roundup.psfhosted.org> Message-ID: <1567541627.0.0.393816583395.issue38020@roundup.psfhosted.org> miss-islington added the comment: New changeset 54dac6c0f4fa24d03025c45899ee7c5f2a4c367e by Miss Islington (bot) in branch '3.8': bpo-38020: Fixes crash in os.readlink() on Windows (GH-15663) https://github.com/python/cpython/commit/54dac6c0f4fa24d03025c45899ee7c5f2a4c367e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 16:16:14 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 03 Sep 2019 20:16:14 +0000 Subject: [issue38020] os.path.realpath crashes in Windows Store package In-Reply-To: <1567535335.44.0.142880989456.issue38020@roundup.psfhosted.org> Message-ID: <1567541774.72.0.31143859697.issue38020@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 16:53:03 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 03 Sep 2019 20:53:03 +0000 Subject: [issue38022] IDLE: Upgrade help.html to sphinx 2 In-Reply-To: <1567537422.32.0.254523116379.issue38022@roundup.psfhosted.org> Message-ID: <1567543983.89.0.000805110711798.issue38022@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 580bdb0ece681537eadb360f0c796123ead7a559 by Terry Jan Reedy (Tal Einat) in branch 'master': bpo-38022: IDLE: upgrade help.html to sphinx 2.x HTML5 output (GH-15664) https://github.com/python/cpython/commit/580bdb0ece681537eadb360f0c796123ead7a559 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 16:53:11 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Sep 2019 20:53:11 +0000 Subject: [issue38022] IDLE: Upgrade help.html to sphinx 2 In-Reply-To: <1567537422.32.0.254523116379.issue38022@roundup.psfhosted.org> Message-ID: <1567543991.07.0.602991683992.issue38022@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15331 pull_request: https://github.com/python/cpython/pull/15667 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 16:53:35 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Sep 2019 20:53:35 +0000 Subject: [issue38022] IDLE: Upgrade help.html to sphinx 2 In-Reply-To: <1567537422.32.0.254523116379.issue38022@roundup.psfhosted.org> Message-ID: <1567544015.81.0.638730587667.issue38022@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15332 pull_request: https://github.com/python/cpython/pull/15668 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 17:10:00 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Sep 2019 21:10:00 +0000 Subject: [issue38022] IDLE: Upgrade help.html to sphinx 2 In-Reply-To: <1567537422.32.0.254523116379.issue38022@roundup.psfhosted.org> Message-ID: <1567545000.87.0.854330872889.issue38022@roundup.psfhosted.org> miss-islington added the comment: New changeset 52fd6616235412d4a49ef28c1046bd133b30bc90 by Miss Islington (bot) in branch '3.7': bpo-38022: IDLE: upgrade help.html to sphinx 2.x HTML5 output (GH-15664) https://github.com/python/cpython/commit/52fd6616235412d4a49ef28c1046bd133b30bc90 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 17:18:50 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 03 Sep 2019 21:18:50 +0000 Subject: [issue38022] IDLE: Upgrade help.html to sphinx 2 In-Reply-To: <1567537422.32.0.254523116379.issue38022@roundup.psfhosted.org> Message-ID: <1567545530.97.0.942746143928.issue38022@roundup.psfhosted.org> miss-islington added the comment: New changeset 952ea67289ffbd2f4785a9e537884a63d1208101 by Miss Islington (bot) in branch '3.8': bpo-38022: IDLE: upgrade help.html to sphinx 2.x HTML5 output (GH-15664) https://github.com/python/cpython/commit/952ea67289ffbd2f4785a9e537884a63d1208101 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 18:05:51 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 03 Sep 2019 22:05:51 +0000 Subject: [issue38022] IDLE: Upgrade help.html to sphinx 2 In-Reply-To: <1567537422.32.0.254523116379.issue38022@roundup.psfhosted.org> Message-ID: <1567548351.31.0.903346279211.issue38022@roundup.psfhosted.org> Terry J. Reedy added the comment: Using -D was a temporary kludge until someone updated the html2tk writer. The key to the fix was adding the prevtag attribute with opener? field. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 18:31:43 2019 From: report at bugs.python.org (Jennifer Baker) Date: Tue, 03 Sep 2019 22:31:43 +0000 Subject: [issue23670] Terminate bugs In-Reply-To: <1426400747.11.0.0527548590348.issue23670@psf.upfronthosting.co.za> Message-ID: <1567549903.94.0.593717394938.issue23670@roundup.psfhosted.org> Change by Jennifer Baker : ---------- title: Modifications to support iOS as a cross-compilation target -> Terminate bugs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 18:34:57 2019 From: report at bugs.python.org (Jennifer Baker) Date: Tue, 03 Sep 2019 22:34:57 +0000 Subject: [issue23670] Restore In-Reply-To: <1426400747.11.0.0527548590348.issue23670@psf.upfronthosting.co.za> Message-ID: <1567550097.12.0.705766531481.issue23670@roundup.psfhosted.org> Change by Jennifer Baker : ---------- title: Terminate bugs -> Restore _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 18:37:24 2019 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 03 Sep 2019 22:37:24 +0000 Subject: [issue36030] add internal API function to create tuple without items array initialization In-Reply-To: <1550563364.86.0.164811838679.issue36030@roundup.psfhosted.org> Message-ID: <1567550244.46.0.731486084827.issue36030@roundup.psfhosted.org> Change by Zackery Spytz : ---------- pull_requests: +15333 pull_request: https://github.com/python/cpython/pull/15670 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 20:08:40 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 04 Sep 2019 00:08:40 +0000 Subject: [issue23670] Modifications to support iOS as a cross-compilation target In-Reply-To: <1426400747.11.0.0527548590348.issue23670@psf.upfronthosting.co.za> Message-ID: <1567555720.87.0.998500600081.issue23670@roundup.psfhosted.org> Change by Josh Rosenberg : ---------- title: Restore -> Modifications to support iOS as a cross-compilation target _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 20:18:43 2019 From: report at bugs.python.org (almenon anon) Date: Wed, 04 Sep 2019 00:18:43 +0000 Subject: [issue38023] Deal better with StackOverflow exception when debugging Message-ID: <1567556323.3.0.435761006518.issue38023@roundup.psfhosted.org> New submission from almenon anon : Code that runs fine in the command line can crash in the debugger Note that because https://bugs.python.org/issue10933 is not fixed yet I'm assuming this applies to all python 3 versions but it was confirmed in python 3.6 See https://github.com/microsoft/ptvsd/issues/1379: @fabioz says it better than I could: > This is really a CPython bug, not ptvsd (CPython is crashing because of a stack overflow when the stack overflow is thrown inside a tracing function -- because the user code already recursed too much). > As a note, the debugger is even disabled on the face of a stack overflow (see: https://bugs.python.org/issue10933), so, even if it didn't crash, things wouldn't work very well from that point onwards... > Maybe we could try to detect that a stack overflow is about to happen and notify about it right before it happens in the debugger so that users could know that the debugger would stop (note that this is actually pretty hard to do from the debugger without killing performance because we don't have a stack in the debugger as we try to run with frames untraced whenever possible and I don't think there's a python API that provides the size of the stack in a fast way -- but maybe I'm wrong, I haven't investigated much). > As a note, the ideal place for that would probably be in CPython itself (when it got to that condition it could raise the recursion limit a bit and call a handler or at least give some warning if configured to do so as it can be really puzzling to know that the tracing got disabled because of a swallowed StackOverflow). > So, I'm going to rename this issue to Deal better with StackOverflow in CPython so that it reflects better the issue at hand, but it's not currently high-priority -- that's really a bug in CPython itself and is probably better fixed there (the workaround in user code -- in this case foxdot -- is not throwing a StackOverflow). ---------- components: Interpreter Core messages: 351107 nosy: almenon anon priority: normal severity: normal status: open title: Deal better with StackOverflow exception when debugging type: crash versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 21:46:26 2019 From: report at bugs.python.org (Maxime Belanger) Date: Wed, 04 Sep 2019 01:46:26 +0000 Subject: [issue32280] Expose `_PyRuntime` through a section name In-Reply-To: <1513034681.19.0.213398074469.issue32280@psf.upfronthosting.co.za> Message-ID: <1567561586.74.0.791423379264.issue32280@roundup.psfhosted.org> Maxime Belanger added the comment: Thanks for taking a look! To answer your question, the need for the named section comes not from the API being being "internal", but because we need to access it at runtime from a tool running in a separate process. We have augmented Crashpad (Google's crash reporter) tool, which inspects the memory of a crashing process to create/upload a report, to access each native thread's stack and reconstruct its Python stack frames. This allows us to quickly make sense of native crashes involving Python code. To do this, the tool needs to know where the Python runtime stores state within thread-local storage. This is actually the only reason we need to access `_PyRuntime`: it allows us to retrieve `autoTSSKey` for the process, which we can use to look up the `PyThreadState` for each underlying/native thread. At the time, `_PyRuntime` seemed like a natural structure to expose and a named section a simple-enough way of doing so. We're certainly open to alternatives if you think there's a better way. Given your plans for 3.9: I'm assuming `autoTSSKey` will remain the same per-process? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 21:48:12 2019 From: report at bugs.python.org (Maxime Belanger) Date: Wed, 04 Sep 2019 01:48:12 +0000 Subject: [issue33376] [pysqlite] Duplicate rows can be returned after rolling back a transaction In-Reply-To: <1524874511.54.0.682650639539.issue33376@psf.upfronthosting.co.za> Message-ID: <1567561692.5.0.215084397954.issue33376@roundup.psfhosted.org> Change by Maxime Belanger : ---------- versions: +Python 3.9 -Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 22:25:04 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 04 Sep 2019 02:25:04 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567563904.6.0.0733482903519.issue24416@roundup.psfhosted.org> Raymond Hettinger added the comment: Paul, you're a new core dev. Please don't take issues away from the assignee. Please try to learn from more seasoned core devs. Don't argue with everything they say and demand they give you justifications. I asked Tim to opine on this because 1) he is one of the principal authors of the datetime module, 2) he was party to previous decisions to upgrade from tuples to struct seq, 3) he has a good deal of common sense and knows what is important, and 4) he's far more senior than me, so there is a chance you might listen to him (my comments don't seem to carry any weight with you). ---------- assignee: p-ganssle -> tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 22:25:46 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 04 Sep 2019 02:25:46 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567563946.86.0.797577041007.issue24416@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 22:37:05 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 04 Sep 2019 02:37:05 +0000 Subject: [issue36252] update to Unicode 12 In-Reply-To: <1552174088.7.0.771249971447.issue36252@roundup.psfhosted.org> Message-ID: <1567564625.87.0.477096747506.issue36252@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- pull_requests: +15334 pull_request: https://github.com/python/cpython/pull/12256 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 22:45:57 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 04 Sep 2019 02:45:57 +0000 Subject: [issue37966] is_normalized is much slower at "no" than the standard's algorithm In-Reply-To: <1566964376.46.0.968905414274.issue37966@roundup.psfhosted.org> Message-ID: <1567565157.69.0.00657470062775.issue37966@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15335 pull_request: https://github.com/python/cpython/pull/15671 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 22:46:07 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 04 Sep 2019 02:46:07 +0000 Subject: [issue37966] is_normalized is much slower at "no" than the standard's algorithm In-Reply-To: <1566964376.46.0.968905414274.issue37966@roundup.psfhosted.org> Message-ID: <1567565167.04.0.675343691669.issue37966@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 2f09413947d1ce0043de62ed2346f9a2b4e5880b by Benjamin Peterson (Greg Price) in branch 'master': closes bpo-37966: Fully implement the UAX #15 quick-check algorithm. (GH-15558) https://github.com/python/cpython/commit/2f09413947d1ce0043de62ed2346f9a2b4e5880b ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 22:47:17 2019 From: report at bugs.python.org (Maxime Belanger) Date: Wed, 04 Sep 2019 02:47:17 +0000 Subject: [issue37966] is_normalized is much slower at "no" than the standard's algorithm In-Reply-To: <1566964376.46.0.968905414274.issue37966@roundup.psfhosted.org> Message-ID: <1567565237.86.0.0968426187999.issue37966@roundup.psfhosted.org> Maxime Belanger added the comment: Thanks for that! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 23:03:43 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 04 Sep 2019 03:03:43 +0000 Subject: [issue37966] is_normalized is much slower at "no" than the standard's algorithm In-Reply-To: <1566964376.46.0.968905414274.issue37966@roundup.psfhosted.org> Message-ID: <1567566223.6.0.0637424607565.issue37966@roundup.psfhosted.org> miss-islington added the comment: New changeset 4dd1c9d9c2bca4744c70c9556b7051f4465ede3e by Miss Islington (bot) in branch '3.8': closes bpo-37966: Fully implement the UAX GH-15 quick-check algorithm. (GH-15558) https://github.com/python/cpython/commit/4dd1c9d9c2bca4744c70c9556b7051f4465ede3e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 23:28:13 2019 From: report at bugs.python.org (Ashley Harvey) Date: Wed, 04 Sep 2019 03:28:13 +0000 Subject: [issue37858] CookieLib: MozillaCookieJar.py uses case-sensitive regex to validate cookies file In-Reply-To: <1565813694.91.0.343923131881.issue37858@roundup.psfhosted.org> Message-ID: <1567567693.98.0.0559460253761.issue37858@roundup.psfhosted.org> Change by Ashley Harvey : ---------- versions: +Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 3 23:53:56 2019 From: report at bugs.python.org (Vinay Sharma) Date: Wed, 04 Sep 2019 03:53:56 +0000 Subject: [issue38018] Increase Code Coverage for multiprocessing.shared_memory In-Reply-To: <1567519085.54.0.887939969587.issue38018@roundup.psfhosted.org> Message-ID: <1567569236.43.0.0157485665911.issue38018@roundup.psfhosted.org> Vinay Sharma added the comment: Can anyone please review my pull request. No Reviewer has been assigned yet to it. And I don't have permissions to request a review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 00:23:24 2019 From: report at bugs.python.org (tzickel) Date: Wed, 04 Sep 2019 04:23:24 +0000 Subject: [issue36226] multipart/related header causes false positive StartBoundaryNotFoundDefect and MultipartInvariantViolationDefect In-Reply-To: <1551972677.41.0.0937724546543.issue36226@roundup.psfhosted.org> Message-ID: <1567571004.52.0.32623600619.issue36226@roundup.psfhosted.org> tzickel added the comment: It should be noted that this causes a big headache for users of requests / urllib3 / etc... as those print on each multipart response a logging warning based on this bug, and it might cause people to go try debugging valid code: https://github.com/urllib3/urllib3/issues/800 https://github.com/psf/requests/issues/3001 https://github.com/diyan/pywinrm/issues/269 https://github.com/jborean93/pypsrp/issues/39 https://github.com/home-assistant/home-assistant/pull/17042 https://github.com/Azure/azure-storage-python/issues/167 and others.... ---------- nosy: +tzickel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 01:55:00 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 04 Sep 2019 05:55:00 +0000 Subject: [issue38021] pep425 tag for AIX is inadequate In-Reply-To: <1567537368.97.0.869605154196.issue38021@roundup.psfhosted.org> Message-ID: <1567576500.36.0.529706481608.issue38021@roundup.psfhosted.org> Ned Deily added the comment: I don't have an opinion about the bulk of the proposed change. But, since _osx_support was mentioned as a model for an _aix_support, I wanted to comment on the history of _osx_support. _osx_support was created as a separate module back when the distutils2 (aka packaging) project was active and it appeared that, at least for some number of releases, both distutils and distutils2 would have to co-exist in the cpython source repo. So, rather than duplicating the macOS code - most of which had been added on to distutils piecemeal over the years - in both places, we ripped out the existing code from distutils and put it into the new _osx_support module for use by both. In the end, though, a different direction for distutils was chosen and the distutils2/packaging project code was removed from cpython prior to a formal release. If we were doing it today, there probably would be no reason to have a separate _osx_support module as nearly all of the code is only called from one place. Thus, I would not use its existence as a justification for having a separate _aix_support module. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 02:39:43 2019 From: report at bugs.python.org (sushma) Date: Wed, 04 Sep 2019 06:39:43 +0000 Subject: [issue37970] urllib.parse docstrings incomplete In-Reply-To: <1567009599.74.0.471882594509.issue37970@roundup.psfhosted.org> Message-ID: <1567579183.3.0.00292382784354.issue37970@roundup.psfhosted.org> sushma added the comment: hello! I can see that we might want to add documentation for splitting netloc, but I don't understand why we'd have scheme and netloc, but nothing for path and query. What are you suggesting we add for scheme/allow_fragements? Thanks! ---------- nosy: +syadlapalli _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 03:41:52 2019 From: report at bugs.python.org (QA.Nathaniel Logarta) Date: Wed, 04 Sep 2019 07:41:52 +0000 Subject: [issue38024] adding or subtracting decimals Message-ID: <1567582912.8.0.129413108747.issue38024@roundup.psfhosted.org> New submission from QA.Nathaniel Logarta : Just try to add decimals It doesn't have any trigger on my end As long as it is a complex decimal or adding decimal zeroes to non-zero ---------- components: Windows files: adding or subtracting decimals.PNG messages: 351117 nosy: QA.Nathaniel Logarta, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: adding or subtracting decimals versions: Python 3.7 Added file: https://bugs.python.org/file48590/adding or subtracting decimals.PNG _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 03:53:13 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 04 Sep 2019 07:53:13 +0000 Subject: [issue38024] adding or subtracting decimals In-Reply-To: <1567582912.8.0.129413108747.issue38024@roundup.psfhosted.org> Message-ID: <1567583593.73.0.14317941396.issue38024@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Please include the text of the repl session in issue so that it would be easy to copy past and also more accessible. The issue is as below in the attached image. I guess this is due to floating point representation and has some possible solutions in this page : https://docs.python.org/3/tutorial/floatingpoint.html and https://docs.python.org/3/faq/design.html#why-are-floating-point-calculations-so-inaccurate $ python3 Python 3.8.0b4 (v3.8.0b4:d93605de72, Aug 29 2019, 21:47:47) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> 17.00005 + 6169.90760 6186.907649999999 >>> from decimal import Decimal >>> Decimal('17.00005') + Decimal('6169.90760') Decimal('6186.90765') ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 04:04:08 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 04 Sep 2019 08:04:08 +0000 Subject: [issue38024] adding or subtracting decimals In-Reply-To: <1567582912.8.0.129413108747.issue38024@roundup.psfhosted.org> Message-ID: <1567584248.77.0.597221655789.issue38024@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 06:49:03 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 04 Sep 2019 10:49:03 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1567594143.36.0.276640142585.issue38006@roundup.psfhosted.org> Change by Inada Naoki : ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 07:05:51 2019 From: report at bugs.python.org (Daniel Futterweit) Date: Wed, 04 Sep 2019 11:05:51 +0000 Subject: [issue38025] format Message-ID: <1567595151.82.0.58620854901.issue38025@roundup.psfhosted.org> Change by Daniel Futterweit : ---------- nosy: Daniel_Python priority: normal severity: normal status: open title: format type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 07:06:46 2019 From: report at bugs.python.org (Daniel Futterweit) Date: Wed, 04 Sep 2019 11:06:46 +0000 Subject: [issue38025] format Message-ID: <1567595206.45.0.981388951699.issue38025@roundup.psfhosted.org> New submission from Daniel Futterweit : f'{10000000000000001323120000000000001:,.0f}' returns: '10,000,000,000,000,001,761,595,319,084,122,112' f'{10000000000000001323120000000000001:,}' returns: '10,000,000,000,000,001,323,120,000,000,000,001' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 07:12:33 2019 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 04 Sep 2019 11:12:33 +0000 Subject: [issue38025] format In-Reply-To: <1567595206.45.0.981388951699.issue38025@roundup.psfhosted.org> Message-ID: <1567595553.7.0.959745725013.issue38025@roundup.psfhosted.org> Eric V. Smith added the comment: When you convert the integer to a float (because of the 'f' in the first format spec), you're losing precision. See: https://docs.python.org/3/tutorial/floatingpoint.html and https://docs.python.org/3/faq/design.html#why-are-floating-point-calculations-so-inaccurate ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 07:27:21 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 04 Sep 2019 11:27:21 +0000 Subject: [issue38026] inspect.getattr_static should avoid dynamic lookup Message-ID: <1567596441.56.0.650171643141.issue38026@roundup.psfhosted.org> New submission from Inada Naoki : Reported here: https://github.com/python/cpython/commit/feaefc7f60cd3be7bf4ecc2b73e77d2bfe048403 I merged GH-5351 but it broke inspect.getattr_static behavior. It should be reverted. ---------- components: Library (Lib) keywords: 3.8regression messages: 351121 nosy: inada.naoki priority: normal severity: normal status: open title: inspect.getattr_static should avoid dynamic lookup versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 07:36:30 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 04 Sep 2019 11:36:30 +0000 Subject: [issue38026] inspect.getattr_static should avoid dynamic lookup In-Reply-To: <1567596441.56.0.650171643141.issue38026@roundup.psfhosted.org> Message-ID: <1567596990.87.0.55633581022.issue38026@roundup.psfhosted.org> Change by Inada Naoki : ---------- keywords: +patch pull_requests: +15336 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15676 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 08:28:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Sep 2019 12:28:22 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567600102.96.0.167085836132.issue24416@roundup.psfhosted.org> STINNER Victor added the comment: The main blocker issue (if we decide to accept this feature) is the pickle serialization issue. Serhiy Storchaka: > No, it is not fully backwards-compatible. First, if pickle a namedtuple, it can't be unpickled in previous versions. Would it be possible to tell pickle to serialize .isocalendar() as a tuple, and deserialize it from a tuple to a structseq? I'm thinking at __getstate__ and __setstate__ methods, but I'm not sure how to use them. Serhiy Storchaka: > Second, namedtuple is slower and larger than tuple, so it shouldn't be used in memory or performance critical code. vstinner at apu$ python3 Python 3.7.4 (default, Jul 9 2019, 16:32:37) >>> import sys >>> s=sys.version_info >>> t=tuple(s) >>> sys.getsizeof(t), sys.getsizeof(s) (96, 96) >>> type(s) Hum, structseq and tuple seem to have exactly the same memory footprint: only the type is larger, not instances. According to msg350986, the performance to instanciate a new object is exactly the same between tuple and structseq. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 08:45:53 2019 From: report at bugs.python.org (Ana) Date: Wed, 04 Sep 2019 12:45:53 +0000 Subject: [issue38027] Can't use Numpy, SciPy, pandas in Python3.8.0b4 without conda Message-ID: <1567601153.07.0.326922242017.issue38027@roundup.psfhosted.org> New submission from Ana : So, all in all, if I try to install Numpy, SciPy, pandas or any related libraries via pip I see several issues, no AIX version written (somewhere?) for Python 3.8, as well as pip addresses to mkl_rt, which is not found in the path. I am trying to use python3.8 as a system interpreter and pip version: pip 19.2.3 I don't want to use conda. I am trying to test it using my system. What can I do? ---------- components: macOS messages: 351123 nosy: annelischen, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Can't use Numpy, SciPy, pandas in Python3.8.0b4 without conda type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 08:49:17 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Sep 2019 12:49:17 +0000 Subject: [issue38027] Can't use Numpy, SciPy, pandas in Python3.8.0b4 without conda In-Reply-To: <1567601153.07.0.326922242017.issue38027@roundup.psfhosted.org> Message-ID: <1567601357.07.0.670423576643.issue38027@roundup.psfhosted.org> Ronald Oussoren added the comment: What issues to you see? What operating system and version are you on? How did you install Python? Note that Python 3.8 is still in beta and therefore a lot of 3th party libraries do no yet have binary wheels available. You therefore likely need a compiler to install Numpy and related libraries. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 09:05:59 2019 From: report at bugs.python.org (Ana) Date: Wed, 04 Sep 2019 13:05:59 +0000 Subject: [issue38027] Can't use Numpy, SciPy, pandas in Python3.8.0b4 without conda In-Reply-To: <1567601357.07.0.670423576643.issue38027@roundup.psfhosted.org> Message-ID: <61F7E09D-A7C6-4ABB-BB6C-986EDB0129C9@gmail.com> Ana added the comment: 1) The OS: Mojave 10.14.6 2) Python is currently here: /usr/local/bin/python 3)Pip is here: /usr/local/bin/pip Here is pip -V: pip 19.2.3 from /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip (python 3.8) 4)I know it?s in beta, but I am trying to report the issues, which I find wrong 5) pip install doesn?t work 6) If I install manually, I can install the libs: $ pip download $ cd somewhat $ python setup.py build $ python setup.py install And in that case everything works, I can see the libs installed in my PyCharm app as well. And I can run simple code in PyCharm with given Python and Pip, if I install the libs manually. However, everything must work with just pip install , that?s why I am reporting. Thx > On 4 Sep 2019, at 15:49, Ronald Oussoren wrote: > > > Ronald Oussoren added the comment: > > What issues to you see? > > What operating system and version are you on? > > How did you install Python? > > Note that Python 3.8 is still in beta and therefore a lot of 3th party libraries do no yet have binary wheels available. You therefore likely need a compiler to install Numpy and related libraries. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 09:14:06 2019 From: report at bugs.python.org (Srinivas Nyayapati) Date: Wed, 04 Sep 2019 13:14:06 +0000 Subject: [issue37891] Exceptions tutorial page does not mention raise from In-Reply-To: <1566285667.91.0.992762773609.issue37891@roundup.psfhosted.org> Message-ID: <1567602846.22.0.828145405012.issue37891@roundup.psfhosted.org> Srinivas Nyayapati added the comment: Here is my first pass at this. I propose the following sentence be added at the end section 8.4: If you need to track related exceptions (exceptions during exception handling), you should use exception chaining. You can chain exceptions by using the ``from`` clause. Just raise a new exception class or instance from an existing exception. The existing exception will be set as the cause for the new exception. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 09:56:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Sep 2019 13:56:46 +0000 Subject: [issue37966] is_normalized is much slower at "no" than the standard's algorithm In-Reply-To: <1566964376.46.0.968905414274.issue37966@roundup.psfhosted.org> Message-ID: <1567605406.55.0.0467747038489.issue37966@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Greg Price for this nice optimization! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 09:58:08 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Sep 2019 13:58:08 +0000 Subject: [issue36030] add internal API function to create tuple without items array initialization In-Reply-To: <1550563364.86.0.164811838679.issue36030@roundup.psfhosted.org> Message-ID: <1567605488.73.0.455407399322.issue36030@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 60bd1f88f21073965a444c8b39c4202d015da5d6 by Victor Stinner (Zackery Spytz) in branch 'master': bpo-36030: Fix a possible segfault in PyTuple_New() (GH-15670) https://github.com/python/cpython/commit/60bd1f88f21073965a444c8b39c4202d015da5d6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 10:01:32 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Sep 2019 14:01:32 +0000 Subject: [issue38027] Can't use Numpy, SciPy, pandas in Python3.8.0b4 without conda In-Reply-To: <1567601153.07.0.326922242017.issue38027@roundup.psfhosted.org> Message-ID: <1567605692.82.0.683422024762.issue38027@roundup.psfhosted.org> Ronald Oussoren added the comment: Thanks for the update. What's the error message you get when using pip to install? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 10:06:59 2019 From: report at bugs.python.org (Ana) Date: Wed, 04 Sep 2019 14:06:59 +0000 Subject: [issue38027] Can't use Numpy, SciPy, pandas in Python3.8.0b4 without conda In-Reply-To: <1567601153.07.0.326922242017.issue38027@roundup.psfhosted.org> Message-ID: <1567606019.75.0.591373239723.issue38027@roundup.psfhosted.org> Ana added the comment: That's huge, so I am attaching it in a separate file ---------- Added file: https://bugs.python.org/file48591/piperroroutput.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 10:09:14 2019 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 04 Sep 2019 14:09:14 +0000 Subject: [issue38027] Can't use Numpy, SciPy, pandas in Python3.8.0b4 without conda In-Reply-To: <1567601153.07.0.326922242017.issue38027@roundup.psfhosted.org> Message-ID: <1567606154.15.0.777218664546.issue38027@roundup.psfhosted.org> Mark Dickinson added the comment: There are known Cython-related issues with the latest NumPy *release* and Python 3.8, due to a signature change in PyCode_New. But those issues are already fixed in NumPy master. `pip install numpy` fails for me in a Python 3.8b4 venv, but `pip install git+https://github.com/numpy/numpy.git` works. But none of this indicates a bug in core Python, as far as I know. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 10:11:17 2019 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 04 Sep 2019 14:11:17 +0000 Subject: [issue38027] Can't use Numpy, SciPy, pandas in Python3.8.0b4 without conda In-Reply-To: <1567601153.07.0.326922242017.issue38027@roundup.psfhosted.org> Message-ID: <1567606277.83.0.544442883217.issue38027@roundup.psfhosted.org> Mark Dickinson added the comment: I forgot to include the NumPy issue link: https://github.com/numpy/numpy/issues/14403 (and other similar issues). The pip error output you posted looks like the same issue to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 10:12:06 2019 From: report at bugs.python.org (Ana) Date: Wed, 04 Sep 2019 14:12:06 +0000 Subject: [issue38027] Can't use Numpy, SciPy, pandas in Python3.8.0b4 without conda In-Reply-To: <1567606154.15.0.777218664546.issue38027@roundup.psfhosted.org> Message-ID: Ana added the comment: At the end of each error log, there is a message stating different python versions (up to 3.7) and AIX. However, there is no python3.8 + AIX, and there is no corresponding dependency: ERROR: Command errored out with exit status 2: command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/tmp/pip-build-env-4mykinsd/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- wheel setuptools 'Cython>=0.29.2' 'numpy==1.13.3; python_version=='"'"'3.5'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.13.3; python_version=='"'"'3.6'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.14.5; python_version>='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.5'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.6'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version>='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"'' cwd: None > On 4 Sep 2019, at 17:09, Mark Dickinson wrote: > > pip install git+https://github.com/numpy/numpy.git ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 10:13:36 2019 From: report at bugs.python.org (Ana) Date: Wed, 04 Sep 2019 14:13:36 +0000 Subject: [issue38027] Can't use Numpy, SciPy, pandas in Python3.8.0b4 without conda In-Reply-To: <1567606277.83.0.544442883217.issue38027@roundup.psfhosted.org> Message-ID: <13788603-0B13-436F-B5E4-EE3D5F60145E@gmail.com> Ana added the comment: Thx for the link. Btw, I have tried: pip install git+https://github.com/numpy/numpy.git That doesn?t work for me. The only way I can install somewhat is downloading the package, building and installing it. > On 4 Sep 2019, at 17:11, Mark Dickinson wrote: > > > Mark Dickinson added the comment: > > I forgot to include the NumPy issue link: https://github.com/numpy/numpy/issues/14403 (and other similar issues). > > The pip error output you posted looks like the same issue to me. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 10:44:35 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 04 Sep 2019 14:44:35 +0000 Subject: [issue37970] urllib.parse docstrings incomplete In-Reply-To: <1567009599.74.0.471882594509.issue37970@roundup.psfhosted.org> Message-ID: <1567608275.41.0.128645045865.issue37970@roundup.psfhosted.org> Zachary Ware added the comment: >I don't understand why we'd have scheme and netloc, but nothing for path and query. I'm not sure what you mean here; can you please clarify? > What are you suggesting we add for scheme/allow_fragements? Just a brief description of what effect the arguments actually have on the returned result. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 11:32:40 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 04 Sep 2019 15:32:40 +0000 Subject: [issue38027] Can't use Numpy, SciPy, pandas in Python3.8.0b4 without conda In-Reply-To: <1567601153.07.0.326922242017.issue38027@roundup.psfhosted.org> Message-ID: <1567611160.4.0.633054487326.issue38027@roundup.psfhosted.org> Ronald Oussoren added the comment: Ana, The error in "piperroroutput.txt" points to the issue Mark mentioned in msg351131: the current release of Numpy is not compatible with Python 3.8, but the tip of the tree on GitHub is. I can install Numpy from the repository: $ python --version Python 3.8.0b4 $ pip install git+https://github.com/numpy/numpy.git Collecting git+https://github.com/numpy/numpy.git Cloning https://github.com/numpy/numpy.git to /private/var/folders/dy/5fl45b9s61x84g7k_18618vc0000gn/T/pip-req-build-b3_tnmd0 Running command git clone -q https://github.com/numpy/numpy.git /private/var/folders/dy/5fl45b9s61x84g7k_18618vc0000gn/T/pip-req-build-b3_tnmd0 Running command git submodule update --init --recursive -q Installing build dependencies ... done Getting requirements to build wheel ... done Preparing wheel metadata ... done Building wheels for collected packages: numpy Building wheel for numpy (PEP 517) ... done Created wheel for numpy: filename=numpy-1.18.0.dev0+3883be3-cp38-cp38-macosx_10_9_x86_64.whl size=4534619 sha256=005a0085f7dcca60b138b0ed01c72977fa0777e4ef1e0693a84295b663ef1178 Stored in directory: /private/var/folders/dy/5fl45b9s61x84g7k_18618vc0000gn/T/pip-ephem-wheel-cache-f8wuhnns/wheels/08/c9/f0/5fb73d652a67220580b707eb5b66bfcccf521160a016ae6f2e Successfully built numpy Installing collected packages: numpy Successfully installed numpy-1.18.0.dev0+3883be3 I propose closing this issue as a 3th-party issue. This should resolve itself with the next release of Numpy. ---------- resolution: -> third party status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 11:44:36 2019 From: report at bugs.python.org (sushma) Date: Wed, 04 Sep 2019 15:44:36 +0000 Subject: [issue37970] urllib.parse docstrings incomplete In-Reply-To: <1567009599.74.0.471882594509.issue37970@roundup.psfhosted.org> Message-ID: <1567611876.63.0.328575873585.issue37970@roundup.psfhosted.org> sushma added the comment: I guess what I'm wondering is this: urlsplit(url, scheme='', allow_fragments=True) Parse a URL into 5 components: :///?# Return a 5-tuple: (scheme, netloc, path, query, fragment). Note that we don't break the components up in smaller bits (e.g. netloc is a single string) and we don't expand % escapes. (END) We don't have details regarding anything, i.e scheme, netloc, path or query or fragments. So I was curious about why we would have more documentation around netloc and scheme and nothing about path and query Should we be adding information for all(scheme, netloc, path, query, fragment) of them, including extra attributes of the returned SplitResult? p.s - newbie trying to contribute here ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 11:53:21 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 04 Sep 2019 15:53:21 +0000 Subject: [issue38027] Can't use Numpy, SciPy, pandas in Python3.8.0b4 without conda In-Reply-To: <1567601153.07.0.326922242017.issue38027@roundup.psfhosted.org> Message-ID: <1567612401.39.0.969404020508.issue38027@roundup.psfhosted.org> Change by Ned Deily : ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 11:58:20 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 04 Sep 2019 15:58:20 +0000 Subject: [issue36226] multipart/related header causes false positive StartBoundaryNotFoundDefect and MultipartInvariantViolationDefect In-Reply-To: <1551972677.41.0.0937724546543.issue36226@roundup.psfhosted.org> Message-ID: <1567612700.28.0.277422422652.issue36226@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +barry, maxking, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 12:02:45 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 04 Sep 2019 16:02:45 +0000 Subject: [issue35923] Update the BuiltinImporter in importlib to use loader._ORIGIN instead of a hardcoded value In-Reply-To: <1549490401.35.0.0798819591421.issue35923@roundup.psfhosted.org> Message-ID: <1567612965.71.0.738232111481.issue35923@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +brett.cannon, eric.snow, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 12:06:08 2019 From: report at bugs.python.org (Ana) Date: Wed, 04 Sep 2019 16:06:08 +0000 Subject: [issue38028] Assertion error in Python 3.8 Message-ID: <1567613168.85.0.729930445227.issue38028@roundup.psfhosted.org> New submission from Ana : After all, I am trying to install the dev version of Numpy and the other libs. Unfortunately, I am still unable to install them. I have some assertion errors: ERROR: Exception: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 188, in main status = self.run(options, args) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 398, in run installed = install_given_reqs( File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_internal/req/__init__.py", line 54, in install_given_reqs requirement.install( File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 925, in install self.move_wheel_files( File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 453, in move_wheel_files wheel.move_wheel_files( File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_internal/wheel.py", line 324, in move_wheel_files scheme = distutils_scheme( File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_internal/locations.py", line 104, in distutils_scheme assert not (home and prefix), "home={} prefix={}".format(home, prefix) AssertionError: home=/private/tmp/pip-target-4p5evqc_ prefix=/private/tmp/pip-build-env-b27ru_1v/overlay That's the first time I see such an issue and googling doesn't resolve it at all ---------- components: macOS messages: 351138 nosy: annelischen, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Assertion error in Python 3.8 type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 12:08:31 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 04 Sep 2019 16:08:31 +0000 Subject: [issue38028] Assertion error in Python 3.8 In-Reply-To: <1567613168.85.0.729930445227.issue38028@roundup.psfhosted.org> Message-ID: <1567613311.62.0.532341548441.issue38028@roundup.psfhosted.org> Change by Steve Dower : ---------- nosy: +Marcus.Smith, dstufft, ncoghlan, paul.moore, pradyunsg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 12:09:55 2019 From: report at bugs.python.org (Brian Skinn) Date: Wed, 04 Sep 2019 16:09:55 +0000 Subject: [issue38029] Should io.TextIOWrapper raise an error at instantiation if a StringIO is passed as 'buffer'? Message-ID: <1567613395.14.0.527188435842.issue38029@roundup.psfhosted.org> New submission from Brian Skinn : If I read the docs correctly, io.TextIOWrapper is meant to provide a str-typed interface to an underlying bytes stream. If a TextIOWrapper is instantiated with the underlying buffer=io.StringIO(), it breaks: >>> import io >>> tw = io.TextIOWrapper(io.StringIO()) >>> tw.write(b'abcd\n') Traceback (most recent call last): File "", line 1, in TypeError: write() argument must be str, not bytes >>> tw.write('abcd\n') 5 >>> tw.read() Traceback (most recent call last): File "", line 1, in TypeError: string argument expected, got 'bytes' >>> tw.read(1) Traceback (most recent call last): File "", line 1, in TypeError: underlying read() should have returned a bytes-like object, not 'str' Would it be better for TextIOWrapper to fail earlier, at instantiation-time, for this kind of (unrecoverably?) broken type mismatch? ---------- components: Library (Lib) messages: 351139 nosy: bskinn priority: normal severity: normal status: open title: Should io.TextIOWrapper raise an error at instantiation if a StringIO is passed as 'buffer'? type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 12:10:16 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 04 Sep 2019 16:10:16 +0000 Subject: [issue38028] Assertion error in Python 3.8 In-Reply-To: <1567613168.85.0.729930445227.issue38028@roundup.psfhosted.org> Message-ID: <1567613416.63.0.942257891338.issue38028@roundup.psfhosted.org> Ned Deily added the comment: NumPy has a very complex build and install process including supplying its own modified version of Distutils. You should take up any build and install issues first with the NumPy project and then, if you both agree that there appears to be a problem in Python itself, re-open an issue here. We really are not in a position to debug NumPy installs here. ---------- resolution: -> third party stage: -> resolved type: crash -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 12:14:41 2019 From: report at bugs.python.org (Ana) Date: Wed, 04 Sep 2019 16:14:41 +0000 Subject: [issue38028] Assertion error in Python 3.8 In-Reply-To: <1567613416.63.0.942257891338.issue38028@roundup.psfhosted.org> Message-ID: Ana added the comment: Well I have been looking through the interim commands running by the terminal. As far as I can see that?s not Numpy/scipy or whatever. These are the setup tools, wheel and Cython. I may be wrong, but I guess these are pretty universal and are required by many functionalities of Python sudo -H /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/tmp/pip-build-env-b27ru_1v/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel cython Password: Collecting setuptools Using cached https://files.pythonhosted.org/packages/b2/86/095d2f7829badc207c893dd4ac767e871f6cd547145df797ea26baea4e2e/setuptools-41.2.0-py2.py3-none-any.whl Collecting wheel Using cached https://files.pythonhosted.org/packages/00/83/b4a77d044e78ad1a45610eb88f745be2fd2c6d658f9798a15e384b7d57c9/wheel-0.33.6-py2.py3-none-any.whl Collecting cython Installing collected packages: setuptools, wheel, cython The error appeared right after running that command. So, is it still a Numpy issue? > On 4 Sep 2019, at 19:10, Ned Deily wrote: > > > Ned Deily added the comment: > > NumPy has a very complex build and install process including supplying its own modified version of Distutils. You should take up any build and install issues first with the NumPy project and then, if you both agree that there appears to be a problem in Python itself, re-open an issue here. We really are not in a position to debug NumPy installs here. > > ---------- > resolution: -> third party > stage: -> resolved > type: crash -> > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 12:15:50 2019 From: report at bugs.python.org (hai shi) Date: Wed, 04 Sep 2019 16:15:50 +0000 Subject: [issue9938] Add optional kwargs to argparse In-Reply-To: <1285338690.84.0.283413950067.issue9938@psf.upfronthosting.co.za> Message-ID: <1567613750.56.0.191073922638.issue9938@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 12:18:48 2019 From: report at bugs.python.org (Michael Felt) Date: Wed, 04 Sep 2019 16:18:48 +0000 Subject: [issue38021] pep425 tag for AIX is inadequate In-Reply-To: <1567537368.97.0.869605154196.issue38021@roundup.psfhosted.org> Message-ID: <1567613928.73.0.361072581116.issue38021@roundup.psfhosted.org> Michael Felt added the comment: Thank you Ned. Not a justification perhaps, but a way to specify that it is support. Three+ years ago when I first worked on something for Lib/ctypes to get find_library() et al working for AIX I was also asked to add it as _aix.py similar to the macos support (with, iirc is more than just a single file) being separate from util.py. To me, it just seemed that is the way it is done to keep maintenance of the core (external) code cleaner. After I post the PR I welcome your perspective on the sense or nonsense of having a separate _xxx_support.py file (where _xxx could be any platform, not merely osx or aix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 12:35:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Sep 2019 16:35:42 +0000 Subject: [issue37245] Azure Pipeline 3.8 CI: multiple tests hung and timed out on macOS 10.13 In-Reply-To: <1560340622.3.0.842050597369.issue37245@roundup.psfhosted.org> Message-ID: <1567614942.43.0.322079548346.issue37245@roundup.psfhosted.org> STINNER Victor added the comment: > I'm still seeing this, maybe 1 in 20 builds, so it's semi-random. A new deadlock, maybe? It seems like only the jobs on Azure are killed by timeout. The jobs on macOS buildbots look fine. Maybe macOS on Azure is running slower and we should just increase the timeout? The bug still occurs: https://github.com/python/cpython/pull/15651 https://dev.azure.com/Python/cpython/_build/results?buildId=49786&view=results 0:49:27 load avg: 1.41 [419/419/6] test_threading crashed (Exit code 1) 6 tests failed: test_concurrent_futures test_functools test_importlib test_multiprocessing_forkserver test_multiprocessing_spawn test_threading The whole job was killed after 57 minutes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 12:37:47 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 04 Sep 2019 16:37:47 +0000 Subject: [issue38028] Assertion error in Python 3.8 In-Reply-To: <1567613168.85.0.729930445227.issue38028@roundup.psfhosted.org> Message-ID: <1567615067.11.0.0710151693014.issue38028@roundup.psfhosted.org> Ned Deily added the comment: The traceback you provide in the first message: File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_internal/wheel.py", line 324, in move_wheel_files scheme = distutils_scheme( File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_internal/locations.py", line 104, in distutils_scheme assert not (home and prefix), "home={} prefix={}".format(home, prefix) AssertionError: home=/private/tmp/pip-target-4p5evqc_ prefix=/private/tmp/pip-build-env-b27ru_1v/overlay shows a reference to a Distutils data structure. As I noted above, NumPy has (or at least it used to have) its own customized version of Distutils. So that seems quite likely to be due to some incompatibility between the two versions of Distutil. And, in any case, if it were to be determined that there is a problem with pip or setuptools or cython, each of those projects has its own issue tracker. Again, you should start with the NumPy project since they are the ones who make all these pieces work together by providing NumPy's build and installation scripts. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 12:40:10 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 04 Sep 2019 16:40:10 +0000 Subject: [issue37970] urllib.parse docstrings incomplete In-Reply-To: <1567009599.74.0.471882594509.issue37970@roundup.psfhosted.org> Message-ID: <1567615210.83.0.275039174655.issue37970@roundup.psfhosted.org> Zachary Ware added the comment: I see. I don't think we need to describe each returned component in the docstring; they're some combination of self-explanatory, described in the reference docs, or just industry-standard terms that are easily defined from other sources. I'm not suggesting to add anything to the docstring about the `scheme` return component, but rather the *scheme* argument (which is the default value for the `scheme` return component when it's not found in the *url*). The subcomponents of netloc should be mentioned because the docstring currently gives the impression that the user has to parse them out for themselves, which is not true. Off the top of my head, I'd suggest changing the `urlsplit` docstring to something like: ``` Parse *url* and return a SplitResult. SplitResult is a named 5-tuple of the following components: :///?# The ``username``, ``password``, ``hostname``, and ``port`` sub-components of ``netloc`` can also be accessed as attributes of the SplitResult object. The *scheme* argument provides the default value of the ``scheme`` component when no scheme is found in *url*. If *allow_fragments* is False, no attempt is made to separate the ``fragment`` component from the previous component, which can be either ``path`` or ``query``. Note that % escapes are not expanded. ``` ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 12:59:18 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 04 Sep 2019 16:59:18 +0000 Subject: [issue37245] Azure Pipeline 3.8 CI: multiple tests hung and timed out on macOS 10.13 In-Reply-To: <1560340622.3.0.842050597369.issue37245@roundup.psfhosted.org> Message-ID: <1567616358.25.0.369436421591.issue37245@roundup.psfhosted.org> Steve Dower added the comment: > Maybe macOS on Azure is running slower and we should just increase the timeout? (Aside, why don't the macOS buildbots have a tag saying that? Took me ages to find them...) I doubt it's running 6-7x slower. More likely something is causing one of the workers to crash at a point where the lock remains held instead of being released (I saw this at work the other week in a slightly different context, but same symptoms). Could os._exit() at the wrong time cause it? It also looks like Azure is running tests with 4 processes, but the buildbot (at least the one I'm looking at) is only using 2. So perhaps there are more conflicts from that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 13:20:30 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 04 Sep 2019 17:20:30 +0000 Subject: [issue37245] Azure Pipeline 3.8 CI: multiple tests hung and timed out on macOS 10.13 In-Reply-To: <1560340622.3.0.842050597369.issue37245@roundup.psfhosted.org> Message-ID: <1567617630.22.0.146818516686.issue37245@roundup.psfhosted.org> Ned Deily added the comment: Yeah, I agree that increasing the timeout shouldn't be the answer here. I still have never seen failure modes like this when running my own tests. The idea about CPUs is one worth pursuing although I usually run with -j3. Also I wonder how much memory the VM is configured with. Any way we can find out number of cpus and memory easily? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 13:53:07 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 04 Sep 2019 17:53:07 +0000 Subject: [issue38014] Python 3.7 does not compile In-Reply-To: <1567477987.66.0.578307493025.issue38014@roundup.psfhosted.org> Message-ID: <1567619587.68.0.704842758995.issue38014@roundup.psfhosted.org> Change by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 13:57:42 2019 From: report at bugs.python.org (Michael Felt) Date: Wed, 04 Sep 2019 17:57:42 +0000 Subject: [issue38021] pep425 tag for AIX is inadequate In-Reply-To: <1567537368.97.0.869605154196.issue38021@roundup.psfhosted.org> Message-ID: <1567619862.39.0.182154026011.issue38021@roundup.psfhosted.org> Change by Michael Felt : ---------- keywords: +patch pull_requests: +15337 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15678 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 15:03:26 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 04 Sep 2019 19:03:26 +0000 Subject: [issue37934] Docs: Clarify NotImplemented use cases In-Reply-To: <1566596946.3.0.57144717386.issue37934@roundup.psfhosted.org> Message-ID: <1567623806.13.0.84774445162.issue37934@roundup.psfhosted.org> Jeroen Demeyer added the comment: > As you say, we currently have only one usage of NotImplemented outside its intended purpose. I know at least 3 in CPython, so it's not so rare to use NotImplemented for something else than binary operators: 1. __subclasshook__ 2. reducer_override (in pickling) 3. __length_hint__ > Of course, you might argue that _once Python has NotImplemented_, it can be used elsewhere - but as I said, I don't think it should be encouraged. I'm not saying that it should be actively encouraged, but the documentation shouldn't be limited to just one use case. Given that NotImplemented exists, why shouldn't it be used in more cases to indicate that an operation is not implemented? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 15:13:27 2019 From: report at bugs.python.org (Ashley Harvey) Date: Wed, 04 Sep 2019 19:13:27 +0000 Subject: [issue37858] CookieLib: MozillaCookieJar.py uses case-sensitive regex to validate cookies file In-Reply-To: <1565813694.91.0.343923131881.issue37858@roundup.psfhosted.org> Message-ID: <1567624407.02.0.527700723216.issue37858@roundup.psfhosted.org> Change by Ashley Harvey : ---------- keywords: +patch pull_requests: +15338 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15673 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 15:17:10 2019 From: report at bugs.python.org (Ashley Harvey) Date: Wed, 04 Sep 2019 19:17:10 +0000 Subject: [issue37858] CookieLib: MozillaCookieJar.py uses case-sensitive regex to validate cookies file In-Reply-To: <1565813694.91.0.343923131881.issue37858@roundup.psfhosted.org> Message-ID: <1567624630.37.0.274132694923.issue37858@roundup.psfhosted.org> Change by Ashley Harvey : ---------- pull_requests: +15339 pull_request: https://github.com/python/cpython/pull/15679 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 15:29:30 2019 From: report at bugs.python.org (Ashley Harvey) Date: Wed, 04 Sep 2019 19:29:30 +0000 Subject: [issue37858] CookieLib: MozillaCookieJar.py uses case-sensitive regex to validate cookies file In-Reply-To: <1565813694.91.0.343923131881.issue37858@roundup.psfhosted.org> Message-ID: <1567625370.35.0.741828799912.issue37858@roundup.psfhosted.org> Change by Ashley Harvey : ---------- pull_requests: +15340 pull_request: https://github.com/python/cpython/pull/15680 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 16:26:32 2019 From: report at bugs.python.org (Eryk Sun) Date: Wed, 04 Sep 2019 20:26:32 +0000 Subject: [issue38030] os.stat fails for block devices such as //./PhysicalDrive0 Message-ID: <1567628792.17.0.732081344869.issue38030@roundup.psfhosted.org> New submission from Eryk Sun : In issue 37834, I posted a suggest implementation of win32_xstat_impl that included the following snippet of code: if (!GetFileInformationByHandle(hFile, &fileInfo)) { error = GetLastError(); if (error != ERROR_INVALID_PARAMETER && error != ERROR_INVALID_FUNCTION && error != ERROR_NOT_SUPPORTED) { retval = -1; goto cleanup; } /* Volumes and physical disks are block devices, e.g. \\.\C: and \\.\PhysicalDrive0. */ memset(result, 0, sizeof(*result)); result->st_mode = 0x6000; /* S_IFBLK */ goto cleanup; } This is meant to handle the above errors. We know we have FILE_TYPE_DISK. If GetFileInformationByHandle fails with one of the above error codes, then we must have a disk or volume device without a mounted file-system device. This should be reported as a block device. However it was changed in the final version as follows: if (!GetFileInformationByHandle(hFile, &fileInfo)) { switch (GetLastError()) { case ERROR_INVALID_PARAMETER: case ERROR_INVALID_FUNCTION: case ERROR_NOT_SUPPORTED: retval = -1; goto cleanup; } /* Volumes and physical disks are block devices, e.g. \\.\C: and \\.\PhysicalDrive0. */ memset(result, 0, sizeof(*result)); result->st_mode = 0x6000; /* S_IFBLK */ goto cleanup; } Now it's failing on the errors that should be handled, and succeeding on all other errors that should fail. If we want to use a switch statement here, I suggest the following: if (!GetFileInformationByHandle(hFile, &fileInfo)) { switch (GetLastError()) { case ERROR_INVALID_PARAMETER: case ERROR_INVALID_FUNCTION: case ERROR_NOT_SUPPORTED: /* Volumes and physical disks are block devices, e.g. \\.\C: and \\.\PhysicalDrive0. */ memset(result, 0, sizeof(*result)); result->st_mode = 0x6000; /* S_IFBLK */ goto cleanup; } retval = -1; goto cleanup; } ---------- components: IO, Windows messages: 351149 nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware priority: high severity: normal stage: needs patch status: open title: os.stat fails for block devices such as //./PhysicalDrive0 type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 16:55:09 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 04 Sep 2019 20:55:09 +0000 Subject: [issue38030] os.stat fails for block devices such as //./PhysicalDrive0 In-Reply-To: <1567628792.17.0.732081344869.issue38030@roundup.psfhosted.org> Message-ID: <1567630509.36.0.162794208032.issue38030@roundup.psfhosted.org> Change by Steve Dower : ---------- assignee: -> steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 17:02:38 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 04 Sep 2019 21:02:38 +0000 Subject: [issue37858] CookieLib: MozillaCookieJar.py uses case-sensitive regex to validate cookies file In-Reply-To: <1565813694.91.0.343923131881.issue37858@roundup.psfhosted.org> Message-ID: <1567630958.96.0.279401568767.issue37858@roundup.psfhosted.org> Change by Ned Deily : ---------- versions: -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 17:10:12 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 04 Sep 2019 21:10:12 +0000 Subject: [issue38030] os.stat fails for block devices such as //./PhysicalDrive0 In-Reply-To: <1567628792.17.0.732081344869.issue38030@roundup.psfhosted.org> Message-ID: <1567631412.36.0.81289521977.issue38030@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +15341 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15681 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 17:19:41 2019 From: report at bugs.python.org (Maxwell Bernstein) Date: Wed, 04 Sep 2019 21:19:41 +0000 Subject: [issue38031] FileIO.__init__ aborts when opener returns bad fd Message-ID: <1567631981.81.0.541424946013.issue38031@roundup.psfhosted.org> New submission from Maxwell Bernstein : On a debug build, the following causes an abort: import _io _io.FileIO("foobar", opener=lambda name, flags: 1000000) 1000000 is not a valid fd. FileIO attempts to raise an IOError from errno, but there is already an exception set when PyErr_SetFromErrno uses PyObject_Call to create the exception. ---------- components: IO messages: 351150 nosy: tekknolagi priority: normal severity: normal status: open title: FileIO.__init__ aborts when opener returns bad fd type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 17:43:03 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 04 Sep 2019 21:43:03 +0000 Subject: [issue38030] os.stat fails for block devices such as //./PhysicalDrive0 In-Reply-To: <1567628792.17.0.732081344869.issue38030@roundup.psfhosted.org> Message-ID: <1567633383.65.0.163261040808.issue38030@roundup.psfhosted.org> Steve Dower added the comment: New changeset 772ec0fad57412daa53d16d7019b6b2fe6e94942 by Steve Dower in branch 'master': bpo-38030: Fix os.stat failures on block devices on Windows (GH-15681) https://github.com/python/cpython/commit/772ec0fad57412daa53d16d7019b6b2fe6e94942 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 17:43:18 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 04 Sep 2019 21:43:18 +0000 Subject: [issue38030] os.stat fails for block devices such as //./PhysicalDrive0 In-Reply-To: <1567628792.17.0.732081344869.issue38030@roundup.psfhosted.org> Message-ID: <1567633398.11.0.848234804435.issue38030@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15342 pull_request: https://github.com/python/cpython/pull/15682 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 18:18:08 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 04 Sep 2019 22:18:08 +0000 Subject: [issue38030] os.stat fails for block devices such as //./PhysicalDrive0 In-Reply-To: <1567628792.17.0.732081344869.issue38030@roundup.psfhosted.org> Message-ID: <1567635488.07.0.0225208279934.issue38030@roundup.psfhosted.org> miss-islington added the comment: New changeset cad7abf8abe657b696b9c8deb4b727e0cefaf36d by Miss Islington (bot) in branch '3.8': bpo-38030: Fix os.stat failures on block devices on Windows (GH-15681) https://github.com/python/cpython/commit/cad7abf8abe657b696b9c8deb4b727e0cefaf36d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 18:18:27 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 04 Sep 2019 22:18:27 +0000 Subject: [issue38030] os.stat fails for block devices such as //./PhysicalDrive0 In-Reply-To: <1567628792.17.0.732081344869.issue38030@roundup.psfhosted.org> Message-ID: <1567635507.83.0.154432332402.issue38030@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 19:21:42 2019 From: report at bugs.python.org (Justin ARthur) Date: Wed, 04 Sep 2019 23:21:42 +0000 Subject: [issue38032] lib2to3 doesn't parse Python 3 identifiers containing non-spacing marks Message-ID: <1567639302.72.0.55214965787.issue38032@roundup.psfhosted.org> New submission from Justin ARthur : Python 3 code with an identifier that has a non-spacing mark in it does not get tokenized by lib2to3 and will result in an exception thrown in the parsing process. Parsing the attached file (badvar.py), results in `ParseError: bad token: type=58, value='?', context=('', (1, 1))` This happens because the Name pattern regular expression in lib2to3 is `r'\w+'` and the word character class doesn't contain non-spacing marks (and possible other [continuation characters allowed in Python 3 identifiers](https://docs.python.org/3/reference/lexical_analysis.html#identifiers)). (reported by energizer in the Python IRC channel) ---------- components: 2to3 (2.x to 3.x conversion tool), Library (Lib) files: badvar.py messages: 351153 nosy: JustinTArthur priority: normal severity: normal status: open title: lib2to3 doesn't parse Python 3 identifiers containing non-spacing marks versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file48592/badvar.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 19:27:04 2019 From: report at bugs.python.org (Chiaki Ishikawa) Date: Wed, 04 Sep 2019 23:27:04 +0000 Subject: [issue38033] Use After Free: PyObject_Free Message-ID: <1567639624.78.0.948902616905.issue38033@roundup.psfhosted.org> New submission from Chiaki Ishikawa : Hi, I am new to Python bug tracker, so my setting of the fields may be inadequate. If so, apologies in advance. I think Use After Free bug is a potential security issue and so wanted to report ASAP. First my environment: I am using Debian GNU/Linux, and its kernel version is: uname -a output, SMP Debian 4.19.37-6 (2019-07-18) x86_64 GNU/Linux Python version is: # python3 --version Python 3.7.4 mozilla thunderbird mail client testing framework uses python as a test driver, and when I was checking the local build of thunderbird under a test suite invoked from |make mozmill| under valgrind (a memory usage checker), the first thing I noticed is the following message from valgrind. PyObject_Free seems to access a memory location (4 octets) in an already freed block. This happened many times during the test. I have not bothered to look into the source code of python, but a seasoned developer should be able to figure out where such reference is made. >From valgrind log: ==30354== Invalid read of size 4 ==30354== at 0x5A29FE: PyObject_Free (in /usr/bin/python3.7) ==30354== by 0x5B7337: ??? (in /usr/bin/python3.7) ==30354== by 0x5BBBFF: PyDict_SetItem (in /usr/bin/python3.7) ==30354== by 0x58DE19: PyType_Ready (in /usr/bin/python3.7) ==30354== by 0x6482A0: _Py_ReadyTypes (in /usr/bin/python3.7) ==30354== by 0x63551A: _Py_InitializeCore_impl (in /usr/bin/python3.7) ==30354== by 0x6357AA: _Py_InitializeCore (in /usr/bin/python3.7) ==30354== by 0x5E17EC: ??? (in /usr/bin/python3.7) ==30354== by 0x653D88: ??? (in /usr/bin/python3.7) ==30354== by 0x65424D: _Py_UnixMain (in /usr/bin/python3.7) ==30354== by 0x4ACB09A: (below main) (libc-start.c:308) ==30354== Address 0x4c8b020 is 16 bytes after a block of size 576 free'd ==30354== at 0x4833FC0: free (vg_replace_malloc.c:538) ==30354== by 0x5B7337: ??? (in /usr/bin/python3.7) ==30354== by 0x5BBBFF: PyDict_SetItem (in /usr/bin/python3.7) ==30354== by 0x58DE19: PyType_Ready (in /usr/bin/python3.7) ==30354== by 0x6482A0: _Py_ReadyTypes (in /usr/bin/python3.7) ==30354== by 0x63551A: _Py_InitializeCore_impl (in /usr/bin/python3.7) ==30354== by 0x6357AA: _Py_InitializeCore (in /usr/bin/python3.7) ==30354== by 0x5E17EC: ??? (in /usr/bin/python3.7) ==30354== by 0x653D88: ??? (in /usr/bin/python3.7) ==30354== by 0x65424D: _Py_UnixMain (in /usr/bin/python3.7) ==30354== by 0x4ACB09A: (below main) (libc-start.c:308) ==30354== Block was alloc'd at ==30354== at 0x4832E13: malloc (vg_replace_malloc.c:307) ==30354== by 0x5A4B16: PyObject_Malloc (in /usr/bin/python3.7) ==30354== by 0x5B72BD: ??? (in /usr/bin/python3.7) ==30354== by 0x5BBBFF: PyDict_SetItem (in /usr/bin/python3.7) ==30354== by 0x58DE19: PyType_Ready (in /usr/bin/python3.7) ==30354== by 0x6482A0: _Py_ReadyTypes (in /usr/bin/python3.7) ==30354== by 0x63551A: _Py_InitializeCore_impl (in /usr/bin/python3.7) ==30354== by 0x6357AA: _Py_InitializeCore (in /usr/bin/python3.7) ==30354== by 0x5E17EC: ??? (in /usr/bin/python3.7) ==30354== by 0x653D88: ??? (in /usr/bin/python3.7) ==30354== by 0x65424D: _Py_UnixMain (in /usr/bin/python3.7) ==30354== by 0x4ACB09A: (below main) (libc-start.c:308) ==30354== TIA ---------- components: Library (Lib) messages: 351154 nosy: zephyrus00jp priority: normal severity: normal status: open title: Use After Free: PyObject_Free type: security versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 19:52:29 2019 From: report at bugs.python.org (Chiaki Ishikawa) Date: Wed, 04 Sep 2019 23:52:29 +0000 Subject: [issue38033] Use After Free: PyObject_Free In-Reply-To: <1567639624.78.0.948902616905.issue38033@roundup.psfhosted.org> Message-ID: <1567641149.36.0.59749300702.issue38033@roundup.psfhosted.org> Chiaki Ishikawa added the comment: Addtion: PyObject_Realloc also has the issue of Use After Free: this may be more serious. ==31128== Invalid read of size 4 ==31128== at 0x5A48CA: PyObject_Realloc (in /usr/bin/python3.7) ==31128== by 0x5DD8FB: _PyBytes_Resize (in /usr/bin/python3.7) ==31128== by 0x4F53BC: ??? (in /usr/bin/python3.7) ==31128== by 0x5D9A22: _PyMethodDef_RawFastCallKeywords (in /usr/bin/python3.7) ==31128== by 0x54C75F: ??? (in /usr/bin/python3.7) ==31128== by 0x5537DA: _PyEval_EvalFrameDefault (in /usr/bin/python3.7) ==31128== by 0x5DA3EB: _PyFunction_FastCallKeywords (in /usr/bin/python3.7) ==31128== by 0x54FA9B: _PyEval_EvalFrameDefault (in /usr/bin/python3.7) ==31128== by 0x54D0A1: _PyEval_EvalCodeWithName (in /usr/bin/python3.7) ==31128== by 0x5DA6E1: _PyFunction_FastCallKeywords (in /usr/bin/python3.7) ==31128== by 0x54FA9B: _PyEval_EvalFrameDefault (in /usr/bin/python3.7) ==31128== by 0x5DA3EB: _PyFunction_FastCallKeywords (in /usr/bin/python3.7) ==31128== by 0x54F8FB: _PyEval_EvalFrameDefault (in /usr/bin/python3.7) ==31128== by 0x54D0A1: _PyEval_EvalCodeWithName (in /usr/bin/python3.7) ==31128== by 0x5DA6E1: _PyFunction_FastCallKeywords (in /usr/bin/python3.7) ==31128== by 0x54F8FB: _PyEval_EvalFrameDefault (in /usr/bin/python3.7) ==31128== by 0x5DA3EB: _PyFunction_FastCallKeywords (in /usr/bin/python3.7) ==31128== by 0x54F8FB: _PyEval_EvalFrameDefault (in /usr/bin/python3.7) ==31128== by 0x5DA3EB: _PyFunction_FastCallKeywords (in /usr/bin/python3.7) ==31128== by 0x54C61F: ??? (in /usr/bin/python3.7) ==31128== by 0x5537DA: _PyEval_EvalFrameDefault (in /usr/bin/python3.7) ==31128== by 0x5DA3EB: _PyFunction_FastCallKeywords (in /usr/bin/python3.7) ==31128== by 0x54F8FB: _PyEval_EvalFrameDefault (in /usr/bin/python3.7) ==31128== by 0x54D0A1: _PyEval_EvalCodeWithName (in /usr/bin/python3.7) ==31128== by 0x54F3F2: PyEval_EvalCode (in /usr/bin/python3.7) ==31128== by 0x6313D1: ??? (in /usr/bin/python3.7) ==31128== by 0x631486: PyRun_FileExFlags (in /usr/bin/python3.7) ==31128== by 0x6320EE: PyRun_SimpleFileExFlags (in /usr/bin/python3.7) ==31128== by 0x653EED: ??? (in /usr/bin/python3.7) ==31128== by 0x65424D: _Py_UnixMain (in /usr/bin/python3.7) ==31128== by 0x4ACB09A: (below main) (libc-start.c:308) ==31128== Address 0x5b21020 is 32,208 bytes inside a block of size 32,801 free'd ==31128== at 0x4835259: realloc (vg_replace_malloc.c:834) ==31128== by 0x5A49AB: PyObject_Realloc (in /usr/bin/python3.7) ==31128== by 0x5DD8FB: _PyBytes_Resize (in /usr/bin/python3.7) ==31128== by 0x4F53BC: ??? (in /usr/bin/python3.7) ==31128== by 0x5D9A22: _PyMethodDef_RawFastCallKeywords (in /usr/bin/python3.7) ==31128== by 0x54C75F: ??? (in /usr/bin/python3.7) ==31128== by 0x5537DA: _PyEval_EvalFrameDefault (in /usr/bin/python3.7) ==31128== by 0x5DA3EB: _PyFunction_FastCallKeywords (in /usr/bin/python3.7) ==31128== by 0x54FA9B: _PyEval_EvalFrameDefault (in /usr/bin/python3.7) ==31128== by 0x54D0A1: _PyEval_EvalCodeWithName (in /usr/bin/python3.7) ==31128== by 0x5DA6E1: _PyFunction_FastCallKeywords (in /usr/bin/python3.7) ==31128== by 0x54FA9B: _PyEval_EvalFrameDefault (in /usr/bin/python3.7) ==31128== by 0x5DA3EB: _PyFunction_FastCallKeywords (in /usr/bin/python3.7) ==31128== by 0x54F8FB: _PyEval_EvalFrameDefault (in /usr/bin/python3.7) ==31128== by 0x54D0A1: _PyEval_EvalCodeWithName (in /usr/bin/python3.7) ==31128== by 0x5DA6E1: _PyFunction_FastCallKeywords (in /usr/bin/python3.7) ==31128== by 0x54F8FB: _PyEval_EvalFrameDefault (in /usr/bin/python3.7) ==31128== by 0x5DA3EB: _PyFunction_FastCallKeywords (in /usr/bin/python3.7) ==31128== by 0x54F8FB: _PyEval_EvalFrameDefault (in /usr/bin/python3.7) ==31128== by 0x5DA3EB: _PyFunction_FastCallKeywords (in /usr/bin/python3.7) ==31128== by 0x54C61F: ??? (in /usr/bin/python3.7) ==31128== by 0x5537DA: _PyEval_EvalFrameDefault (in /usr/bin/python3.7) ==31128== by 0x5DA3EB: _PyFunction_FastCallKeywords (in /usr/bin/python3.7) ==31128== by 0x54F8FB: _PyEval_EvalFrameDefault (in /usr/bin/python3.7) ==31128== by 0x54D0A1: _PyEval_EvalCodeWithName (in /usr/bin/python3.7) ==31128== by 0x54F3F2: PyEval_EvalCode (in /usr/bin/python3.7) ==31128== by 0x6313D1: ??? (in /usr/bin/python3.7) ==31128== by 0x631486: PyRun_FileExFlags (in /usr/bin/python3.7) ==31128== by 0x6320EE: PyRun_SimpleFileExFlags (in /usr/bin/python3.7) ==31128== by 0x653EED: ??? (in /usr/bin/python3.7) ==31128== by 0x65424D: _Py_UnixMain (in /usr/bin/python3.7) ==31128== by 0x4ACB09A: (below main) (libc-start.c:308) ==31128== Block was alloc'd at ==31128== at 0x4832E13: malloc (vg_replace_malloc.c:307) ==31128== by 0x5DE3AA: PyBytes_FromStringAndSize (in /usr/bin/python3.7) ==31128== by 0x4F5375: ??? (in /usr/bin/python3.7) ==31128== by 0x5D9A22: _PyMethodDef_RawFastCallKeywords (in /usr/bin/python3.7) ==31128== by 0x54C75F: ??? (in /usr/bin/python3.7) ==31128== by 0x5537DA: _PyEval_EvalFrameDefault (in /usr/bin/python3.7) ==31128== by 0x5DA3EB: _PyFunction_FastCallKeywords (in /usr/bin/python3.7) ==31128== by 0x54FA9B: _PyEval_EvalFrameDefault (in /usr/bin/python3.7) ==31128== by 0x54D0A1: _PyEval_EvalCodeWithName (in /usr/bin/python3.7) ==31128== by 0x5DA6E1: _PyFunction_FastCallKeywords (in /usr/bin/python3.7) ==31128== by 0x54FA9B: _PyEval_EvalFrameDefault (in /usr/bin/python3.7) ==31128== by 0x5DA3EB: _PyFunction_FastCallKeywords (in /usr/bin/python3.7) ==31128== by 0x54F8FB: _PyEval_EvalFrameDefault (in /usr/bin/python3.7) ==31128== by 0x54D0A1: _PyEval_EvalCodeWithName (in /usr/bin/python3.7) ==31128== by 0x5DA6E1: _PyFunction_FastCallKeywords (in /usr/bin/python3.7) ==31128== by 0x54F8FB: _PyEval_EvalFrameDefault (in /usr/bin/python3.7) ==31128== by 0x5DA3EB: _PyFunction_FastCallKeywords (in /usr/bin/python3.7) ==31128== by 0x54F8FB: _PyEval_EvalFrameDefault (in /usr/bin/python3.7) ==31128== by 0x5DA3EB: _PyFunction_FastCallKeywords (in /usr/bin/python3.7) ==31128== by 0x54C61F: ??? (in /usr/bin/python3.7) ==31128== by 0x5537DA: _PyEval_EvalFrameDefault (in /usr/bin/python3.7) ==31128== by 0x5DA3EB: _PyFunction_FastCallKeywords (in /usr/bin/python3.7) ==31128== by 0x54F8FB: _PyEval_EvalFrameDefault (in /usr/bin/python3.7) ==31128== by 0x54D0A1: _PyEval_EvalCodeWithName (in /usr/bin/python3.7) ==31128== by 0x54F3F2: PyEval_EvalCode (in /usr/bin/python3.7) ==31128== by 0x6313D1: ??? (in /usr/bin/python3.7) ==31128== by 0x631486: PyRun_FileExFlags (in /usr/bin/python3.7) ==31128== by 0x6320EE: PyRun_SimpleFileExFlags (in /usr/bin/python3.7) ==31128== by 0x653EED: ??? (in /usr/bin/python3.7) ==31128== by 0x65424D: _Py_UnixMain (in /usr/bin/python3.7) ==31128== by 0x4ACB09A: (below main) (libc-start.c:308) ==31128== { ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 20:34:39 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 05 Sep 2019 00:34:39 +0000 Subject: [issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name In-Reply-To: <1409971957.28.0.64915967452.issue22347@psf.upfronthosting.co.za> Message-ID: <1567643679.07.0.441376330206.issue22347@roundup.psfhosted.org> miss-islington added the comment: New changeset 87bd2071c756188b6cd577889fb1682831142ceb by Miss Islington (bot) (Dong-hee Na) in branch 'master': bpo-22347: Update mimetypes.guess_type to allow proper parsing of URLs (GH-15522) https://github.com/python/cpython/commit/87bd2071c756188b6cd577889fb1682831142ceb ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 20:34:48 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 05 Sep 2019 00:34:48 +0000 Subject: [issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name In-Reply-To: <1409971957.28.0.64915967452.issue22347@psf.upfronthosting.co.za> Message-ID: <1567643688.3.0.617363502534.issue22347@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15343 pull_request: https://github.com/python/cpython/pull/15685 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 20:41:23 2019 From: report at bugs.python.org (Abhilash Raj) Date: Thu, 05 Sep 2019 00:41:23 +0000 Subject: [issue37764] email.Message.as_string infinite loop In-Reply-To: <1565022203.43.0.680976058043.issue37764@roundup.psfhosted.org> Message-ID: <1567644083.21.0.254548833311.issue37764@roundup.psfhosted.org> Change by Abhilash Raj : ---------- pull_requests: +15344 pull_request: https://github.com/python/cpython/pull/15686 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 20:49:06 2019 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 05 Sep 2019 00:49:06 +0000 Subject: [issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name In-Reply-To: <1409971957.28.0.64915967452.issue22347@psf.upfronthosting.co.za> Message-ID: <1567644546.53.0.987025906233.issue22347@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +15345 pull_request: https://github.com/python/cpython/pull/15687 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 20:55:01 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 05 Sep 2019 00:55:01 +0000 Subject: [issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name In-Reply-To: <1409971957.28.0.64915967452.issue22347@psf.upfronthosting.co.za> Message-ID: <1567644901.92.0.642917561366.issue22347@roundup.psfhosted.org> miss-islington added the comment: New changeset 6d7a786d2e4b48a6b50614e042ace9ff996f0238 by Miss Islington (bot) in branch '3.8': bpo-22347: Update mimetypes.guess_type to allow proper parsing of URLs (GH-15522) https://github.com/python/cpython/commit/6d7a786d2e4b48a6b50614e042ace9ff996f0238 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:13:39 2019 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 05 Sep 2019 01:13:39 +0000 Subject: [issue38031] FileIO.__init__ aborts when opener returns bad fd In-Reply-To: <1567631981.81.0.541424946013.issue38031@roundup.psfhosted.org> Message-ID: <1567646019.58.0.617011076394.issue38031@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +15346 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15688 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:16:42 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 05 Sep 2019 01:16:42 +0000 Subject: [issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name In-Reply-To: <1409971957.28.0.64915967452.issue22347@psf.upfronthosting.co.za> Message-ID: <1567646202.0.0.491818016769.issue22347@roundup.psfhosted.org> miss-islington added the comment: New changeset 8873bff2871078e9f23e6c7d942d3a8edbd0921f by Miss Islington (bot) (Dong-hee Na) in branch '3.7': [3.7] bpo-22347: Update mimetypes.guess_type to allow proper parsing of URLs (GH-15522) (GH-15687) https://github.com/python/cpython/commit/8873bff2871078e9f23e6c7d942d3a8edbd0921f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:18:41 2019 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 05 Sep 2019 01:18:41 +0000 Subject: [issue38031] FileIO.__init__ aborts when opener returns bad fd In-Reply-To: <1567631981.81.0.541424946013.issue38031@roundup.psfhosted.org> Message-ID: <1567646321.81.0.400027271957.issue38031@roundup.psfhosted.org> Zackery Spytz added the comment: Thank you for the report. ---------- components: +Interpreter Core nosy: +ZackerySpytz versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:20:44 2019 From: report at bugs.python.org (Abhilash Raj) Date: Thu, 05 Sep 2019 01:20:44 +0000 Subject: [issue37764] email.Message.as_string infinite loop In-Reply-To: <1565022203.43.0.680976058043.issue37764@roundup.psfhosted.org> Message-ID: <1567646444.95.0.82719559564.issue37764@roundup.psfhosted.org> Abhilash Raj added the comment: New changeset 6ad0a2c45f78020f7994e47620c1cf7b225f8197 by Abhilash Raj in branch '3.8': [3.8] bpo-37764: Fix infinite loop when parsing unstructured email headers. (GH-15239) (GH-15686) https://github.com/python/cpython/commit/6ad0a2c45f78020f7994e47620c1cf7b225f8197 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:21:40 2019 From: report at bugs.python.org (Abhilash Raj) Date: Thu, 05 Sep 2019 01:21:40 +0000 Subject: [issue37764] email.Message.as_string infinite loop In-Reply-To: <1565022203.43.0.680976058043.issue37764@roundup.psfhosted.org> Message-ID: <1567646500.18.0.693640638179.issue37764@roundup.psfhosted.org> Change by Abhilash Raj : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:23:02 2019 From: report at bugs.python.org (wuck) Date: Thu, 05 Sep 2019 01:23:02 +0000 Subject: [issue38034] Typo on logging.handlers.QueueListener documentation Message-ID: <1567646582.17.0.242396034373.issue38034@roundup.psfhosted.org> New submission from wuck : There appears to be a typo on the documentation page for logging.handlers.QueueListener at https://docs.python.org/3/library/logging.handlers.html#logging.handlers.QueueListener The line "Changed in version 3.5: The respect_handler_levels argument was added." should instead refer to "Changed in version 3.5: The respect_handler_level argument was added.", removing the 's' at the end of respect_handler_level. ---------- assignee: docs at python components: Documentation messages: 351161 nosy: docs at python, wuck priority: normal severity: normal status: open title: Typo on logging.handlers.QueueListener documentation versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:26:52 2019 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 05 Sep 2019 01:26:52 +0000 Subject: [issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name In-Reply-To: <1409971957.28.0.64915967452.issue22347@psf.upfronthosting.co.za> Message-ID: <1567646812.45.0.744278175653.issue22347@roundup.psfhosted.org> Dong-hee Na added the comment: @vstinner(my mentor) @maxking Now this issue is solved. I'd like to close this issue. Is it okay? ---------- nosy: +maxking, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:28:47 2019 From: report at bugs.python.org (Chiaki Ishikawa) Date: Thu, 05 Sep 2019 01:28:47 +0000 Subject: [issue38033] Use After Free: PyObject_Free In-Reply-To: <1567639624.78.0.948902616905.issue38033@roundup.psfhosted.org> Message-ID: <1567646927.64.0.810568699744.issue38033@roundup.psfhosted.org> Chiaki Ishikawa added the comment: PyMem_Free and PyMem_Realloc also suffer from similar "Use After Free" issue. The standard version of Python3.7 interpreter does not seem to have debug symbol and so I installed a debug version of it. Now it seems to have a shadow symbol of inlined function so that we can now learn the line numbers of functions where the problem occurs in more detail. I am attaching the valgrind log excerpts for PyObj_Free, PyObj_Realloc, PyMem_Free, PyMem_Realloc, etc. Sorry for piecemeal reporting. The earlier messages swamp the log very verbosely and so I had to disable the reporting one by one. PS: There seem to be cases where the result of reading uninitialized value is used for conditional testing, too. ---------- Added file: https://bugs.python.org/file48593/PyMem_Free.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:29:06 2019 From: report at bugs.python.org (Abhilash Raj) Date: Thu, 05 Sep 2019 01:29:06 +0000 Subject: [issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name In-Reply-To: <1409971957.28.0.64915967452.issue22347@psf.upfronthosting.co.za> Message-ID: <1567646946.03.0.192457481777.issue22347@roundup.psfhosted.org> Abhilash Raj added the comment: I think so, yes. Also, while you are at it, can you also close bpo-35939 with a comment that points to this issue and the right PR for the fix? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:30:00 2019 From: report at bugs.python.org (Chiaki Ishikawa) Date: Thu, 05 Sep 2019 01:30:00 +0000 Subject: [issue38033] Use After Free: PyObject_Free In-Reply-To: <1567639624.78.0.948902616905.issue38033@roundup.psfhosted.org> Message-ID: <1567647000.41.0.353202840259.issue38033@roundup.psfhosted.org> Chiaki Ishikawa added the comment: I found that the inlined functions are used by other functions and resulted in similar issues. Once obmalloc.c is fixed, I think such problems are automatically fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:33:36 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 05 Sep 2019 01:33:36 +0000 Subject: [issue37902] Add scrolling for IDLE browsers In-Reply-To: <1566352480.43.0.51909437022.issue37902@roundup.psfhosted.org> Message-ID: <1567647216.83.0.739042370708.issue37902@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 2cd902585815582eb059e3b40e014ebe4e7fdee7 by Terry Jan Reedy (GeeTransit) in branch 'master': bpo-37902: IDLE: Add scrolling for IDLE browsers. (#15368) https://github.com/python/cpython/commit/2cd902585815582eb059e3b40e014ebe4e7fdee7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:34:34 2019 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 05 Sep 2019 01:34:34 +0000 Subject: [issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name In-Reply-To: <1409971957.28.0.64915967452.issue22347@psf.upfronthosting.co.za> Message-ID: <1567647274.66.0.202929469269.issue22347@roundup.psfhosted.org> Dong-hee Na added the comment: Great! I will close bpo-35939 also. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:34:56 2019 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 05 Sep 2019 01:34:56 +0000 Subject: [issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name In-Reply-To: <1409971957.28.0.64915967452.issue22347@psf.upfronthosting.co.za> Message-ID: <1567647296.62.0.911157618025.issue22347@roundup.psfhosted.org> Change by Dong-hee Na : ---------- stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:35:18 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 05 Sep 2019 01:35:18 +0000 Subject: [issue37902] Add scrolling for IDLE browsers In-Reply-To: <1566352480.43.0.51909437022.issue37902@roundup.psfhosted.org> Message-ID: <1567647318.34.0.437920529273.issue37902@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15347 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/15689 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:35:24 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 05 Sep 2019 01:35:24 +0000 Subject: [issue37902] Add scrolling for IDLE browsers In-Reply-To: <1566352480.43.0.51909437022.issue37902@roundup.psfhosted.org> Message-ID: <1567647324.38.0.922213024975.issue37902@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15348 pull_request: https://github.com/python/cpython/pull/15690 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:43:49 2019 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 05 Sep 2019 01:43:49 +0000 Subject: [issue35939] Remove urllib.parse._splittype from mimetypes.guess_type In-Reply-To: <1549613683.87.0.509050815243.issue35939@roundup.psfhosted.org> Message-ID: <1567647829.3.0.94528281997.issue35939@roundup.psfhosted.org> Dong-hee Na added the comment: This issue is fixed by https://github.com/python/cpython/pull/15522 ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:44:00 2019 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 05 Sep 2019 01:44:00 +0000 Subject: [issue22347] mimetypes.guess_type("//example.com") misinterprets host name as file name In-Reply-To: <1409971957.28.0.64915967452.issue22347@psf.upfronthosting.co.za> Message-ID: <1567647840.12.0.741163826784.issue22347@roundup.psfhosted.org> Change by Dong-hee Na : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:47:34 2019 From: report at bugs.python.org (Tim Peters) Date: Thu, 05 Sep 2019 01:47:34 +0000 Subject: [issue38033] Use After Free: PyObject_Free (valgrind) In-Reply-To: <1567639624.78.0.948902616905.issue38033@roundup.psfhosted.org> Message-ID: <1567648054.79.0.761116264954.issue38033@roundup.psfhosted.org> Tim Peters added the comment: You're probably chasing ghosts ;-) Please read about what needs to be done to use valgrind successfully with Python: https://github.com/python/cpython/blob/master/Misc/README.valgrind ---------- nosy: +tim.peters title: Use After Free: PyObject_Free -> Use After Free: PyObject_Free (valgrind) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:53:50 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 05 Sep 2019 01:53:50 +0000 Subject: [issue37902] Add scrolling for IDLE browsers In-Reply-To: <1566352480.43.0.51909437022.issue37902@roundup.psfhosted.org> Message-ID: <1567648430.37.0.491670449156.issue37902@roundup.psfhosted.org> miss-islington added the comment: New changeset 9c2654d1aa85968fede1b888fba86aebc06c5be6 by Miss Islington (bot) in branch '3.8': bpo-37902: IDLE: Add scrolling for IDLE browsers. (GH-15368) https://github.com/python/cpython/commit/9c2654d1aa85968fede1b888fba86aebc06c5be6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 21:58:25 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 05 Sep 2019 01:58:25 +0000 Subject: [issue37902] Add scrolling for IDLE browsers In-Reply-To: <1566352480.43.0.51909437022.issue37902@roundup.psfhosted.org> Message-ID: <1567648705.48.0.420131020649.issue37902@roundup.psfhosted.org> miss-islington added the comment: New changeset 16af39aa84cc3553c51d57461964ab4e28029184 by Miss Islington (bot) in branch '3.7': bpo-37902: IDLE: Add scrolling for IDLE browsers. (GH-15368) https://github.com/python/cpython/commit/16af39aa84cc3553c51d57461964ab4e28029184 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 4 22:05:57 2019 From: report at bugs.python.org (Abhilash Raj) Date: Thu, 05 Sep 2019 02:05:57 +0000 Subject: [issue37764] email.Message.as_string infinite loop In-Reply-To: <1565022203.43.0.680976058043.issue37764@roundup.psfhosted.org> Message-ID: <1567649157.35.0.486874888856.issue37764@roundup.psfhosted.org> Change by Abhilash Raj : ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 00:07:12 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 05 Sep 2019 04:07:12 +0000 Subject: [issue38026] inspect.getattr_static should avoid dynamic lookup In-Reply-To: <1567596441.56.0.650171643141.issue38026@roundup.psfhosted.org> Message-ID: <1567656432.18.0.623668167975.issue38026@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 8f9cc8771ffb8d0e21be287eaed42ae06087acca by Inada Naoki in branch 'master': bpo-38026: fix inspect.getattr_static (GH-15676) https://github.com/python/cpython/commit/8f9cc8771ffb8d0e21be287eaed42ae06087acca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 00:07:19 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 05 Sep 2019 04:07:19 +0000 Subject: [issue38026] inspect.getattr_static should avoid dynamic lookup In-Reply-To: <1567596441.56.0.650171643141.issue38026@roundup.psfhosted.org> Message-ID: <1567656439.64.0.518765932032.issue38026@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15349 pull_request: https://github.com/python/cpython/pull/15692 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 00:13:49 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 05 Sep 2019 04:13:49 +0000 Subject: [issue37902] Add scrolling for IDLE browsers In-Reply-To: <1566352480.43.0.51909437022.issue37902@roundup.psfhosted.org> Message-ID: <1567656829.18.0.603674145177.issue37902@roundup.psfhosted.org> Terry J. Reedy added the comment: Thanks for the patch. More IDLE patches would be welcome should you want to attack something else. Possible browser scrolling refinements: 1. Scroll by an integral number of labels. This is easy with text. For our synthesized tree, we would have to calculate the # of canvas pixels to scroll. However, if we switch to ttk.Treeview (#31552), it, like Text has a height in lines. So its yview method might scroll in line units, like text. 2. Only bind wheel event(s) used on system? Should test on 3 systems. Do all *nix other than tk for macOS use X-window buttons? Not a big deal. 3. Use bindtags to bind wheel events just once. Then unbind when shutdown? (Check if unbind elsewhere.) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 00:26:02 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 05 Sep 2019 04:26:02 +0000 Subject: [issue38026] inspect.getattr_static should avoid dynamic lookup In-Reply-To: <1567596441.56.0.650171643141.issue38026@roundup.psfhosted.org> Message-ID: <1567657562.54.0.760838423372.issue38026@roundup.psfhosted.org> miss-islington added the comment: New changeset bdcbb83c6640c2b30d0e1a2a497e9ba34cc53b26 by Miss Islington (bot) in branch '3.8': bpo-38026: fix inspect.getattr_static (GH-15676) https://github.com/python/cpython/commit/bdcbb83c6640c2b30d0e1a2a497e9ba34cc53b26 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 00:38:01 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 05 Sep 2019 04:38:01 +0000 Subject: [issue38026] inspect.getattr_static should avoid dynamic lookup In-Reply-To: <1567596441.56.0.650171643141.issue38026@roundup.psfhosted.org> Message-ID: <1567658281.35.0.418984986761.issue38026@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 01:01:08 2019 From: report at bugs.python.org (Vinay Sharma) Date: Thu, 05 Sep 2019 05:01:08 +0000 Subject: [issue38035] shared_semaphores cannot be shared across unrelated processes Message-ID: <1567659668.43.0.186142682202.issue38035@roundup.psfhosted.org> New submission from Vinay Sharma : Currently, shared semaphores can only be created, and existing semaphores can't be opened. Shared semaphores are opened using the following command. ``` sem_open(name, O_CREAT | O_EXCL, 0600, val) ``` This will raise error if a semaphore which already exists. This behaviour works well when the file descriptors of these semaphores can be shared with children processes. But, it doesn't work when an unrelated process which needs access to shared semaphore tries to open it. ---------- components: Library (Lib) messages: 351176 nosy: vinay0410 priority: normal severity: normal status: open title: shared_semaphores cannot be shared across unrelated processes versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 01:01:29 2019 From: report at bugs.python.org (Vinay Sharma) Date: Thu, 05 Sep 2019 05:01:29 +0000 Subject: [issue38035] shared_semaphores cannot be shared across unrelated processes In-Reply-To: <1567659668.43.0.186142682202.issue38035@roundup.psfhosted.org> Message-ID: <1567659689.65.0.253888343768.issue38035@roundup.psfhosted.org> Change by Vinay Sharma : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 01:18:05 2019 From: report at bugs.python.org (Ashwin Ramaswami) Date: Thu, 05 Sep 2019 05:18:05 +0000 Subject: [issue37764] email.Message.as_string infinite loop In-Reply-To: <1565022203.43.0.680976058043.issue37764@roundup.psfhosted.org> Message-ID: <1567660685.88.0.991398225538.issue37764@roundup.psfhosted.org> Ashwin Ramaswami added the comment: Should we get a CVE for this because this is a security issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 02:00:06 2019 From: report at bugs.python.org (Tal Einat) Date: Thu, 05 Sep 2019 06:00:06 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567663206.35.0.112372572106.issue24416@roundup.psfhosted.org> Tal Einat added the comment: > Would it be possible to tell pickle to serialize .isocalendar() as a tuple, and deserialize it from a tuple to a structseq? The former is possible but that latter is not: If the object is pickled as a tuple, it will always be unpickled as a simple tuple. To customize unpickling, the serialized data must include the name of the class to use, and that class will never exist in earlier Python versions. I don't think there's a way around this. However, I find Raymond's note very convincing, in that we should likely not let the unpickling issue get in the way of this improvement: > FWIW, most things in Python that return a structseq previously returned a tuple (for example, time.localtime() and sys.version_info). > > This is not an unprecedented upgrade to improve the repr and provide access by field name in addition to positional access. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 02:15:34 2019 From: report at bugs.python.org (Niels Albers) Date: Thu, 05 Sep 2019 06:15:34 +0000 Subject: [issue37891] Exceptions tutorial page does not mention raise from In-Reply-To: <1566285667.91.0.992762773609.issue37891@roundup.psfhosted.org> Message-ID: <1567664134.01.0.210055976292.issue37891@roundup.psfhosted.org> Niels Albers added the comment: Thanks Srinivas for the suggestion. IMO exception chaining has more utility than only dealing with new exceptions that are caused by exception handling. It's all about preserving exception context. As both a writer of libraries and a user of such, I do like to have a full context chain when I have to handle an exception (or more importantly as a devops engineeer: log it) Is this edit acceptable? "If you need to track exception context, you can use exception chaining. You can chain exceptions by using the ``from`` clause. Just raise a new exception class or instance from an existing exception. The existing exception will be set as the cause for the new exception." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 02:28:56 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 05 Sep 2019 06:28:56 +0000 Subject: [issue18049] Re-enable threading test on macOS In-Reply-To: <1369405666.05.0.54874731136.issue18049@psf.upfronthosting.co.za> Message-ID: <1567664936.31.0.747350361365.issue18049@roundup.psfhosted.org> Kyle Stanley added the comment: Ronald, is it feasible that the changes made in https://github.com/python/cpython/pull/14748/files to THREAD_STACK_SIZE in Python/thread_pthread.h could be causing intermittent failures for the Azure macOS PR tests? In a recent PR (https://github.com/python/cpython/pull/15651), test_pending_calls_race (test.test_concurrent_futures.ThreadPoolWaitTests) seemed to be timing out. See the build log for more details: https://dev.azure.com/Python/cpython/_build/results?buildId=49786&view=logs&j=18d1a34d-6940-5fc1-f55b-405e2fba32b1. It doesn't appear to be causing consistent failures for Azure, but the latest commit to PR-15651 was only involving a formatting change to the news entry, so it should not have had any influence on the test that timed out. Prior to that commit, there were no CI failures. ---------- nosy: +aeros167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 02:46:22 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 05 Sep 2019 06:46:22 +0000 Subject: [issue37934] Docs: Clarify NotImplemented use cases In-Reply-To: <1566596946.3.0.57144717386.issue37934@roundup.psfhosted.org> Message-ID: <1567665982.12.0.0473294221547.issue37934@roundup.psfhosted.org> Kyle Stanley added the comment: > As you say, we currently have only one usage of NotImplemented outside its intended purpose. Maybe we should wait to see whether it becomes at least a little bit more popular, before thinking about blessing it. > I know at least 3 in CPython, so it's not so rare to use NotImplemented for something else than binary operators I'm thinking that it might be worthwhile to start a discussion about this on python-dev, to see what the others think about how the NotImplemented docs should be defined, and whether or not it should be used outside of binary operators. Based on the feedback from Raymond and Vedran, I'm in agreement that it might not be the best idea in the long term to keep adding additional use cases to the documentation. But, it really doesn't make much sense to me that the constant is entirely defined around a single use case in the doc while we're using it for other purposes throughout CPython. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 02:48:33 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 Sep 2019 06:48:33 +0000 Subject: [issue36324] Inverse cumulative normal distribution function In-Reply-To: <1552810539.51.0.509978356002.issue36324@roundup.psfhosted.org> Message-ID: <1567666113.99.0.327334782361.issue36324@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +15350 pull_request: https://github.com/python/cpython/pull/15693 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 03:11:42 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 05 Sep 2019 07:11:42 +0000 Subject: [issue37669] Make mock_open return per-file content In-Reply-To: <1563972418.64.0.300779941937.issue37669@roundup.psfhosted.org> Message-ID: <1567667502.78.0.416880356104.issue37669@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Using a side_effect is one way to achieve this currently if I understand the use case correctly. For every open side_effect will be called and hence it will return a new mock_open with read_data for the given filename used inside the context. This can handle nested calls since each will have it's own mock_open object. PR seems to do similar approach to refactor out to created predefined mock_open per filename and to return objects from a dictionary. from unittest.mock import mock_open, patch DEFAULT_MOCK_DATA = "default mock data" data_dict = {"file1": "data1", "file2": "data2"} def open_side_effect(name): return mock_open(read_data=data_dict.get(name, DEFAULT_MOCK_DATA))() with patch(f"{__name__}.open", side_effect=open_side_effect): with open("file1") as file1: assert file1.read() == "data1" with open("file2") as file2: assert file2.read() == "data2" with open("file1") as file3: assert file3.read(1) == "d" assert file1.read() == "" with open("defaultfile") as file4: assert file4.read() == "default mock data" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 03:13:58 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 05 Sep 2019 07:13:58 +0000 Subject: [issue38034] Typo on logging.handlers.QueueListener documentation In-Reply-To: <1567646582.17.0.242396034373.issue38034@roundup.psfhosted.org> Message-ID: <1567667638.81.0.861019225505.issue38034@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks for the report. Would you be able to make a PR for this? I think this is a good newcomer friendly issue. ---------- nosy: +vinay.sajip, xtreak versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 03:18:50 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 Sep 2019 07:18:50 +0000 Subject: [issue36324] Inverse cumulative normal distribution function In-Reply-To: <1552810539.51.0.509978356002.issue36324@roundup.psfhosted.org> Message-ID: <1567667930.92.0.830963841931.issue36324@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset e4810b2a6c1d0db1a27ad046831b8fa3b57967a4 by Raymond Hettinger in branch 'master': bpo-36324: Apply review comments from Allen Downey (GH-15693) https://github.com/python/cpython/commit/e4810b2a6c1d0db1a27ad046831b8fa3b57967a4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 03:19:06 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 05 Sep 2019 07:19:06 +0000 Subject: [issue36324] Inverse cumulative normal distribution function In-Reply-To: <1552810539.51.0.509978356002.issue36324@roundup.psfhosted.org> Message-ID: <1567667946.18.0.386987806614.issue36324@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15351 pull_request: https://github.com/python/cpython/pull/15694 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 03:26:02 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 05 Sep 2019 07:26:02 +0000 Subject: [issue18049] Re-enable threading test on macOS In-Reply-To: <1369405666.05.0.54874731136.issue18049@psf.upfronthosting.co.za> Message-ID: <1567668362.16.0.101612691424.issue18049@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: @aeros167 The build log failures due to timeout in the linked Azure pipeline failure seem to be similar to report at issue37245 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 03:31:45 2019 From: report at bugs.python.org (Nathaniel Smith) Date: Thu, 05 Sep 2019 07:31:45 +0000 Subject: [issue38036] ssl docs say that ssl.SSLContext() is secure-by-default since 3.6, but it isn't Message-ID: <1567668705.95.0.408076289223.issue38036@roundup.psfhosted.org> New submission from Nathaniel Smith : Quoting from the docs for ssl.SSLContext: "Changed in version 3.6: The context is created with secure default values." - https://docs.python.org/3/library/ssl.html#ssl.SSLContext This is not true. If you call ssl.SSLContext(), you get a context with cert validation entirely disabled. And this has led to serious security bugs in practice: https://github.com/theelous3/asks/issues/134 Changing the defaults to make them actually secure would of course be nice, but is a complicated question that would need discussion. In the mean time, the docs shouldn't claim that it's secure. There should be a big bold note saying "UNLESS YOU HAVE A VERY GOOD REASON, DON'T USE THIS, USE ssl.create_default_connection()". ---------- messages: 351186 nosy: alex, christian.heimes, dstufft, janssen, njs priority: normal severity: normal status: open title: ssl docs say that ssl.SSLContext() is secure-by-default since 3.6, but it isn't _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 03:42:31 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 Sep 2019 07:42:31 +0000 Subject: [issue36324] Inverse cumulative normal distribution function In-Reply-To: <1552810539.51.0.509978356002.issue36324@roundup.psfhosted.org> Message-ID: <1567669351.49.0.561470099184.issue36324@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset dafbe3265657dc5a5c46e762080023f0aa25ec58 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-36324: Apply review comments from Allen Downey (GH-15693) (GH-15694) https://github.com/python/cpython/commit/dafbe3265657dc5a5c46e762080023f0aa25ec58 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 03:56:51 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 Sep 2019 07:56:51 +0000 Subject: [issue36324] Inverse cumulative normal distribution function In-Reply-To: <1552810539.51.0.509978356002.issue36324@roundup.psfhosted.org> Message-ID: <1567670211.0.0.0833566810231.issue36324@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +15352 pull_request: https://github.com/python/cpython/pull/15695 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 04:01:10 2019 From: report at bugs.python.org (Christian Heimes) Date: Thu, 05 Sep 2019 08:01:10 +0000 Subject: [issue38036] ssl docs say that ssl.SSLContext() is secure-by-default since 3.6, but it isn't In-Reply-To: <1567668705.95.0.408076289223.issue38036@roundup.psfhosted.org> Message-ID: <1567670470.33.0.985443507097.issue38036@roundup.psfhosted.org> Christian Heimes added the comment: Indeed, the text is misleading. "secure default values" refers to SSLContext.options only (no compression, "good" TLS versions) and not to cert and host name verification. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 04:03:20 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 Sep 2019 08:03:20 +0000 Subject: [issue36324] Inverse cumulative normal distribution function In-Reply-To: <1552810539.51.0.509978356002.issue36324@roundup.psfhosted.org> Message-ID: <1567670600.92.0.952729027956.issue36324@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 9b51570ffd0494c07dafe10c7d2afe865754694c by Raymond Hettinger in branch 'master': bpo-36324: Apply review comment from Jake Vanderplas (GH-15695) https://github.com/python/cpython/commit/9b51570ffd0494c07dafe10c7d2afe865754694c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 04:03:24 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 05 Sep 2019 08:03:24 +0000 Subject: [issue36324] Inverse cumulative normal distribution function In-Reply-To: <1552810539.51.0.509978356002.issue36324@roundup.psfhosted.org> Message-ID: <1567670604.5.0.96215566753.issue36324@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15353 pull_request: https://github.com/python/cpython/pull/15696 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 04:10:44 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 Sep 2019 08:10:44 +0000 Subject: [issue36324] Inverse cumulative normal distribution function In-Reply-To: <1552810539.51.0.509978356002.issue36324@roundup.psfhosted.org> Message-ID: <1567671044.24.0.425058864539.issue36324@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset f5649bfe7622447b302ef55e4db3a96b5840f8e8 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-36324: Apply review comment from Jake Vanderplas (GH-15695) (GH-15696) https://github.com/python/cpython/commit/f5649bfe7622447b302ef55e4db3a96b5840f8e8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 04:11:38 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 05 Sep 2019 08:11:38 +0000 Subject: [issue36409] plistlib old API should be removed In-Reply-To: <1553357509.76.0.695003516452.issue36409@roundup.psfhosted.org> Message-ID: <1567671098.42.0.998951856283.issue36409@roundup.psfhosted.org> Ronald Oussoren added the comment: New changeset ce81a925ef2d466b0d801deaba9af44a0dfc2aa1 by Ronald Oussoren (Jon Janzen) in branch 'master': bpo-36409: Remove old plistlib API deprecated in 3.4 (GH-15615) https://github.com/python/cpython/commit/ce81a925ef2d466b0d801deaba9af44a0dfc2aa1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 04:47:39 2019 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Thu, 05 Sep 2019 08:47:39 +0000 Subject: [issue37934] Docs: Clarify NotImplemented use cases In-Reply-To: <1566596946.3.0.57144717386.issue37934@roundup.psfhosted.org> Message-ID: <1567673259.8.0.994563665573.issue37934@roundup.psfhosted.org> Vedran ?a?i? added the comment: Of course, if there are independent use cases already in the codebase, then my opinion is changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 05:47:50 2019 From: report at bugs.python.org (hongweipeng) Date: Thu, 05 Sep 2019 09:47:50 +0000 Subject: [issue37402] Fatal Python error: Cannot recover from stack overflow issues on Python 3.6 and 3.7 In-Reply-To: <1561467308.7.0.878273526771.issue37402@roundup.psfhosted.org> Message-ID: <1567676870.21.0.402991398874.issue37402@roundup.psfhosted.org> hongweipeng added the comment: According to the provided text.py file. `__exit__` will always execute due to the `with` syntax. It looks like this: ``` def rec(): try: rec() except RecursionError: rec() rec() ``` ---------- nosy: +hongweipeng _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 06:00:24 2019 From: report at bugs.python.org (Maxwell McKinnon) Date: Thu, 05 Sep 2019 10:00:24 +0000 Subject: [issue32689] shutil.move raises AttributeError if first argument is a pathlib.Path object and destination is a directory In-Reply-To: <1517097684.51.0.467229070634.issue32689@psf.upfronthosting.co.za> Message-ID: <1567677624.85.0.124508026803.issue32689@roundup.psfhosted.org> Change by Maxwell McKinnon : ---------- nosy: +bodom _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 06:56:35 2019 From: report at bugs.python.org (Kyle Stanley) Date: Thu, 05 Sep 2019 10:56:35 +0000 Subject: [issue37245] Azure Pipeline 3.8 CI: multiple tests hung and timed out on macOS 10.13 In-Reply-To: <1560340622.3.0.842050597369.issue37245@roundup.psfhosted.org> Message-ID: <1567680995.06.0.316966763421.issue37245@roundup.psfhosted.org> Kyle Stanley added the comment: It looks like the Azure macOS tests timed out again in the recently opened PR-15688. Specifically, for test_multiprocessing_spawn and test_functools (both of which also timed out in PR-15651, which Victor mentioned earlier): 0:26:41 load avg: 2.89 [418/419/1] test_multiprocessing_spawn crashed (Exit code 1) -- running: test_functools (14 min 38 sec) Timeout (0:20:00)! 0:32:03 load avg: 3.17 [419/419/2] test_functools crashed (Exit code 1) Timeout (0:20:00)! Build logs: https://dev.azure.com/Python/cpython/_build/results?buildId=49868&view=logs&j=18d1a34d-6940-5fc1-f55b-405e2fba32b1 As far as I can tell, PR-15688 should have had no direct influence on test_multiprocessing_spawn or test_functools. > Maybe macOS on Azure is running slower and we should just increase the timeout? > Yeah, I agree that increasing the timeout shouldn't be the answer here. Since this seems to be affecting multiple PRs, would it be appropriate to attempt to increase the timeout duration as a temporary fix and open an issue for further investigation on the cause of the intermittent slowdown on those tests? ---------- nosy: +aeros167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 07:14:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Sep 2019 11:14:02 +0000 Subject: [issue18049] Re-enable threading test on macOS In-Reply-To: <1369405666.05.0.54874731136.issue18049@psf.upfronthosting.co.za> Message-ID: <1567682042.04.0.427641923719.issue18049@roundup.psfhosted.org> STINNER Victor added the comment: > Ronald, is it feasible that the changes made in https://github.com/python/cpython/pull/14748/files to THREAD_STACK_SIZE in Python/thread_pthread.h could be causing intermittent failures for the Azure macOS PR tests? See also bpo-37245 ("Azure Pipeline 3.8 CI: multiple tests hung and timed out on macOS 10.13"). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 07:14:08 2019 From: report at bugs.python.org (Ma Lin) Date: Thu, 05 Sep 2019 11:14:08 +0000 Subject: [issue38037] Assertion failed: object has negative ref count Message-ID: <1567682048.52.0.677025547591.issue38037@roundup.psfhosted.org> New submission from Ma Lin : Adding these two lines to /Objects/longobject.c will disable the "preallocated small integer pool": #define NSMALLPOSINTS 0 #define NSMALLNEGINTS 0 Then run this reproduce code (attached): from enum import IntEnum import _signal class Handlers(IntEnum): A = _signal.SIG_DFL B = _signal.SIG_IGN When the interpreter exits, will get this error: d:\dev\cpython\PCbuild\win32>python_d.exe d:\a.py d:\dev\cpython\include\object.h:541: _Py_NegativeRefcount: Assertion failed: object has negative ref count Fatal Python error: _PyObject_AssertFailed Current thread 0x0000200c (most recent call first): 3.8 and 3.9 branches are affected. I'm sorry, this issue is beyond my ability. ---------- files: reproduce.py messages: 351196 nosy: Ma Lin priority: normal severity: normal status: open title: Assertion failed: object has negative ref count versions: Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48594/reproduce.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 07:16:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Sep 2019 11:16:51 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567682211.48.0.383804719637.issue24416@roundup.psfhosted.org> STINNER Victor added the comment: """ ./python.exe -m timeit -r11 -s 'import datetime' -s 'a = datetime.datetime.now().isocalendar()' 50000000 loops, best of 11: 8.72 nsec per loop Let me know if the benchmark code is not appropriate """ Hum wait, this benchmark measures the performance of the pass opcode... That's why it's so fast :-) -s 'a = datetime.datetime.now().isocalendar()' is run exactly once for the whole benchmark, not at each benchmark iteration... I suggest you this microbenchmark instead: ./python.exe -m pyperf timeit -s 'import datetime; dt = datetime.datetime.now()' 'dt.isocalendar()' For example, on my Fedora 30 with Python 3.7.4, I get: Mean +- std dev: 108 ns +- 4 ns ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 08:19:43 2019 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 05 Sep 2019 12:19:43 +0000 Subject: [issue35939] Remove urllib.parse._splittype from mimetypes.guess_type In-Reply-To: <1549613683.87.0.509050815243.issue35939@roundup.psfhosted.org> Message-ID: <1567685983.45.0.645612043963.issue35939@roundup.psfhosted.org> Change by Dong-hee Na : ---------- resolution: fixed -> duplicate superseder: -> mimetypes.guess_type("//example.com") misinterprets host name as file name _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 08:49:02 2019 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Thu, 05 Sep 2019 12:49:02 +0000 Subject: [issue36797] Cull more oudated distutils information In-Reply-To: <1557003947.84.0.478951846534.issue36797@roundup.psfhosted.org> Message-ID: <1567687742.4.0.304383541367.issue36797@roundup.psfhosted.org> Change by Miro Hron?ok : ---------- pull_requests: +15354 pull_request: https://github.com/python/cpython/pull/15700 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 09:26:46 2019 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 05 Sep 2019 13:26:46 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567690006.77.0.0139605889138.issue24416@roundup.psfhosted.org> Dong-hee Na added the comment: @vstinner Here is the new benchmark with you suggested. It seems to affect performance. == Baseline == Mean +- std dev: 134 ns +- 2 ns == PR 15633 == Mean +- std dev: 174 ns +- 5 ns ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 09:37:57 2019 From: report at bugs.python.org (Jon Janzen) Date: Thu, 05 Sep 2019 13:37:57 +0000 Subject: [issue36409] plistlib old API should be removed In-Reply-To: <1553357509.76.0.695003516452.issue36409@roundup.psfhosted.org> Message-ID: <1567690677.29.0.0818389306438.issue36409@roundup.psfhosted.org> Change by Jon Janzen : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 10:13:03 2019 From: report at bugs.python.org (Ma Lin) Date: Thu, 05 Sep 2019 14:13:03 +0000 Subject: [issue38037] Assertion failed: object has negative ref count In-Reply-To: <1567682048.52.0.677025547591.issue38037@roundup.psfhosted.org> Message-ID: <1567692783.25.0.187961649508.issue38037@roundup.psfhosted.org> Change by Ma Lin : ---------- keywords: +patch pull_requests: +15355 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15701 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 10:15:51 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Thu, 05 Sep 2019 14:15:51 +0000 Subject: [issue15088] PyGen_NeedsFinalizing is public, but undocumented In-Reply-To: <1339906861.99.0.42415214654.issue15088@psf.upfronthosting.co.za> Message-ID: <1567692951.79.0.6621761091.issue15088@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- pull_requests: +15356 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15702 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 10:19:51 2019 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 05 Sep 2019 14:19:51 +0000 Subject: [issue38038] Remove urllib.parse._ from xmlrpc.client Message-ID: <1567693191.9.0.654396049137.issue38038@roundup.psfhosted.org> New submission from Dong-hee Na : This issue is the same as bpo-22347. Let's remove the deprecated urllib.parse._splituser and urllib.parse._splittype from xmlrpc.client ---------- components: Library (Lib) messages: 351199 nosy: corona10, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Remove urllib.parse._ from xmlrpc.client versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 10:20:00 2019 From: report at bugs.python.org (Ma Lin) Date: Thu, 05 Sep 2019 14:20:00 +0000 Subject: [issue38037] Assertion failed: object has negative ref count In-Reply-To: <1567682048.52.0.677025547591.issue38037@roundup.psfhosted.org> Message-ID: <1567693200.08.0.340378400133.issue38037@roundup.psfhosted.org> Ma Lin added the comment: I did a Git bisect, this is the first bad commit: https://github.com/python/cpython/commit/9541bd321a94f13dc41163a5d7a1a847816fac84 nosy involved mates. ---------- nosy: +berker.peksag, nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 10:20:33 2019 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 05 Sep 2019 14:20:33 +0000 Subject: [issue38038] Remove urllib.parse._ from xmlrpc.client In-Reply-To: <1567693191.9.0.654396049137.issue38038@roundup.psfhosted.org> Message-ID: <1567693233.14.0.841103217211.issue38038@roundup.psfhosted.org> Change by Dong-hee Na : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 10:23:15 2019 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 05 Sep 2019 14:23:15 +0000 Subject: [issue38038] Remove urllib.parse._ from xmlrpc.client In-Reply-To: <1567693191.9.0.654396049137.issue38038@roundup.psfhosted.org> Message-ID: <1567693395.19.0.640197149084.issue38038@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +15357 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15703 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 10:24:19 2019 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 05 Sep 2019 14:24:19 +0000 Subject: [issue38038] Remove urllib.parse._ from xmlrpc.client In-Reply-To: <1567693191.9.0.654396049137.issue38038@roundup.psfhosted.org> Message-ID: <1567693459.75.0.981769890016.issue38038@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 10:43:15 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Sep 2019 14:43:15 +0000 Subject: [issue37926] regression: PySys_SetArgvEx(0, NULL, 0): SystemError: Python-3.8.0b3/Objects/unicodeobject.c:2089: bad argument to internal function In-Reply-To: <1566545949.45.0.201062291719.issue37926@roundup.psfhosted.org> Message-ID: <1567694595.51.0.569048914361.issue37926@roundup.psfhosted.org> STINNER Victor added the comment: FYI this bug was found in paraview in Fedora Rawhide: https://bugzilla.redhat.com/show_bug.cgi?id=1743896 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 10:55:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Sep 2019 14:55:01 +0000 Subject: [issue37064] Feature request: option to keep/add flags to pathfix. In-Reply-To: <1558962587.87.0.563974081614.issue37064@roundup.psfhosted.org> Message-ID: <1567695301.62.0.486345905802.issue37064@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 50254ac4c179cb412e90682098c97db786143929 by Victor Stinner (PatrikKopkan) in branch 'master': bpo-37064: Add option -k to Tools/scripts/pathfix.py (GH-15548) https://github.com/python/cpython/commit/50254ac4c179cb412e90682098c97db786143929 ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 11:06:51 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 05 Sep 2019 15:06:51 +0000 Subject: [issue36797] Cull more oudated distutils information In-Reply-To: <1557003947.84.0.478951846534.issue36797@roundup.psfhosted.org> Message-ID: <1567696011.49.0.245212480453.issue36797@roundup.psfhosted.org> miss-islington added the comment: New changeset 2c2b561967c1916855399f809e30ae0ba7e09ae2 by Miss Islington (bot) (Miro Hron?ok) in branch 'master': bpo-36797: Fix a dead link in Doc/distutils/apiref (GH-15700) https://github.com/python/cpython/commit/2c2b561967c1916855399f809e30ae0ba7e09ae2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 11:06:57 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 05 Sep 2019 15:06:57 +0000 Subject: [issue36797] Cull more oudated distutils information In-Reply-To: <1557003947.84.0.478951846534.issue36797@roundup.psfhosted.org> Message-ID: <1567696017.88.0.887358775225.issue36797@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15358 pull_request: https://github.com/python/cpython/pull/15704 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 11:21:03 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Thu, 05 Sep 2019 15:21:03 +0000 Subject: [issue15088] PyGen_NeedsFinalizing is public, but undocumented In-Reply-To: <1339906861.99.0.42415214654.issue15088@psf.upfronthosting.co.za> Message-ID: <1567696863.67.0.337099285311.issue15088@roundup.psfhosted.org> Joannah Nanjekye added the comment: My searches show references to this function in CPython cloned repositories. From @pitrous's views, I think it is better to deprecate it with a removal notice for a later release. I have deprecated the Function instead and will be removed in the next release in this PR https://github.com/python/cpython/pull/15702 . ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 11:22:12 2019 From: report at bugs.python.org (Chip Lynch) Date: Thu, 05 Sep 2019 15:22:12 +0000 Subject: [issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone In-Reply-To: <1561315344.64.0.509844893886.issue37380@roundup.psfhosted.org> Message-ID: <1567696932.12.0.440667932707.issue37380@roundup.psfhosted.org> Chip Lynch added the comment: I see there is a merged patch for this (https://github.com/python/cpython/pull/14360); is it possible to get it tagged for backport to 3.7? I haven't seen the 3.7.5 tag drop yet so wanted to recommend it's included, it's giving us fits. On our Windows 10 dev boxes and Win 2016 servers, emanuel's repro fails 3.5.4, 3.6.8, 3.7.4, and 3.8.0b4, but not apparently 2.7 (I think we tested 2.7.12). Per vstinner's request, I agree and would like to see it get a 3.7 and 3.8 backport. Many thanks! ---------- nosy: +Chip Lynch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 11:37:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Sep 2019 15:37:20 +0000 Subject: [issue37064] Feature request: option to keep/add flags to pathfix. In-Reply-To: <1558962587.87.0.563974081614.issue37064@roundup.psfhosted.org> Message-ID: <1567697840.0.0.0840899634334.issue37064@roundup.psfhosted.org> STINNER Victor added the comment: The newly added test fails if Python is installed: https://buildbot.python.org/all/#/builders/188/builds/927 ====================================================================== FAIL: test_pathfix (test.test_tools.test_pathfix.TestPathfixFunctional) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/lib/python3.9/test/test_tools/test_pathfix.py", line 36, in test_pathfix self.pathfix( File "/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/lib/python3.9/test/test_tools/test_pathfix.py", line 24, in pathfix self.assertEqual(proc.returncode, 0, proc) AssertionError: 2 != 0 : CompletedProcess(args=['/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/bin/python3.9', '/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/lib/Tools/scripts/pathfix.py', '-i', '/usr/bin/python3', '-n', '@test_1589863_tmp'], returncode=2, stdout=b'', stderr=b"/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/bin/python3.9: can't open file '/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/lib/Tools/scripts/pathfix.py': [Errno 2] No such file or directory\n") ====================================================================== FAIL: test_pathfix_keeping_flags (test.test_tools.test_pathfix.TestPathfixFunctional) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/lib/python3.9/test/test_tools/test_pathfix.py", line 50, in test_pathfix_keeping_flags self.pathfix( File "/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/lib/python3.9/test/test_tools/test_pathfix.py", line 24, in pathfix self.assertEqual(proc.returncode, 0, proc) AssertionError: 2 != 0 : CompletedProcess(args=['/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/bin/python3.9', '/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/lib/Tools/scripts/pathfix.py', '-i', '/usr/bin/python3', '-k', '-n', '@test_1589863_tmp'], returncode=2, stdout=b'', stderr=b"/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/bin/python3.9: can't open file '/home/buildbot/buildarea/3.x.cstratak-fedora.installed/build/target/lib/Tools/scripts/pathfix.py': [Errno 2] No such file or directory\n") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 11:43:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Sep 2019 15:43:38 +0000 Subject: [issue37064] Feature request: option to keep/add flags to pathfix. In-Reply-To: <1558962587.87.0.563974081614.issue37064@roundup.psfhosted.org> Message-ID: <1567698218.16.0.448301903894.issue37064@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15359 pull_request: https://github.com/python/cpython/pull/15705 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 11:54:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Sep 2019 15:54:22 +0000 Subject: [issue15088] PyGen_NeedsFinalizing is public, but undocumented In-Reply-To: <1339906861.99.0.42415214654.issue15088@psf.upfronthosting.co.za> Message-ID: <1567698862.93.0.953180857073.issue15088@roundup.psfhosted.org> STINNER Victor added the comment: PyGen_NeedsFinalizing() was added by: commit 49fd7fa4431da299196d74087df4a04f99f9c46f Author: Thomas Wouters Date: Fri Apr 21 10:40:58 2006 +0000 Merge p3yk branch with the trunk up to revision 45595. This breaks a fair number of tests, all because of the codecs/_multibytecodecs issue described here (it's not a Py3K issue, just something Py3K discovers): http://mail.python.org/pipermail/python-dev/2006-April/064051.html Hye-Shik Chang promised to look for a fix, so no need to fix it here. The tests that are expected to break are: test_codecencodings_cn test_codecencodings_hk test_codecencodings_jp test_codecencodings_kr test_codecencodings_tw test_codecs test_multibytecodec This merge fixes an actual test failure (test_weakref) in this branch, though, so I believe merging is the right thing to do anyway. It was used in this gcmodule.c function: /* Return true if object has a finalization method. * CAUTION: An instance of an old-style class has to be checked for a *__del__ method, and earlier versions of this used to call PyObject_HasAttr, * which in turn could call the class's __getattr__ hook (if any). That * could invoke arbitrary Python code, mutating the object graph in arbitrary * ways, and that was the source of some excruciatingly subtle bugs. */ static int has_finalizer(PyObject *op) { if (PyInstance_Check(op)) { assert(delstr != NULL); return _PyInstance_Lookup(op, delstr) != NULL; } else if (PyType_HasFeature(op->ob_type, Py_TPFLAGS_HEAPTYPE)) return op->ob_type->tp_del != NULL; else if (PyGen_CheckExact(op)) return PyGen_NeedsFinalizing((PyGenObject *)op); else return 0; } (2) The PEP 442 implementation made PyGen_NeedsFinalizing() useless: commit 796564c27b8f2e32b9fbc034bbdda75f9507ca43 Author: Antoine Pitrou Date: Tue Jul 30 19:59:21 2013 +0200 Issue #18112: PEP 442 implementation (safe object finalization). Replaced: /* Return true if object has a finalization method. */ static int has_finalizer(PyObject *op) { if (PyGen_CheckExact(op)) return PyGen_NeedsFinalizing((PyGenObject *)op); else return op->ob_type->tp_del != NULL; } with: /* Return true if object has a pre-PEP 442 finalization method. */ static int has_legacy_finalizer(PyObject *op) { return op->ob_type->tp_del != NULL; } -- The last reference to PyGen_NeedsFinalizing() can be found in ceval.c: case TARGET(SETUP_FINALLY): { /* NOTE: If you add any new block-setup opcodes that are not try/except/finally handlers, you may need to update the PyGen_NeedsFinalizing() function. */ PyFrame_BlockSetup(f, SETUP_FINALLY, INSTR_OFFSET() + oparg, STACK_LEVEL()); DISPATCH(); } ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 11:58:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Sep 2019 15:58:28 +0000 Subject: [issue15088] PyGen_NeedsFinalizing is public, but undocumented In-Reply-To: <1339906861.99.0.42415214654.issue15088@psf.upfronthosting.co.za> Message-ID: <1567699108.86.0.961515593652.issue15088@roundup.psfhosted.org> STINNER Victor added the comment: The function is not documented nor tested. I searched for usage of PyGen_NeedsFinalizing() in C code in GitHub: https://github.com/search?l=C&p=1&q=PyGen_NeedsFinalizing&type=Code I only found copies of the CPython code source: PyGen_NeedsFinalizing() definition in genobject.h. IHMO we can safely remove the function right now. If someone complains, we can reintroduce it later. We just have to document clearly its removal at: https://docs.python.org/dev/whatsnew/3.9.html#build-and-c-api-changes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 12:00:49 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 05 Sep 2019 16:00:49 +0000 Subject: [issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone In-Reply-To: <1561315344.64.0.509844893886.issue37380@roundup.psfhosted.org> Message-ID: <1567699249.97.0.637400283998.issue37380@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15360 pull_request: https://github.com/python/cpython/pull/15706 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 12:00:56 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 05 Sep 2019 16:00:56 +0000 Subject: [issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone In-Reply-To: <1561315344.64.0.509844893886.issue37380@roundup.psfhosted.org> Message-ID: <1567699256.12.0.394371011065.issue37380@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15361 pull_request: https://github.com/python/cpython/pull/15707 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 12:01:11 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 05 Sep 2019 16:01:11 +0000 Subject: [issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone In-Reply-To: <1561315344.64.0.509844893886.issue37380@roundup.psfhosted.org> Message-ID: <1567699271.92.0.921212825231.issue37380@roundup.psfhosted.org> Steve Dower added the comment: I triggered automatic backports to see how they go. Doesn't necessarily mean we'll merge them without looking more closely, but may as well check out what our automated tools suggest. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 12:01:19 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 05 Sep 2019 16:01:19 +0000 Subject: [issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone In-Reply-To: <1561315344.64.0.509844893886.issue37380@roundup.psfhosted.org> Message-ID: <1567699279.41.0.358359577486.issue37380@roundup.psfhosted.org> Change by Steve Dower : ---------- stage: patch review -> backport needed versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 12:06:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Sep 2019 16:06:54 +0000 Subject: [issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent() In-Reply-To: <1565985235.6.0.212314052144.issue37878@roundup.psfhosted.org> Message-ID: <1567699614.15.0.862343871081.issue37878@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 2bc43cdc015eda4f1a651bb2b308a17a83c38e14 by Victor Stinner (Joannah Nanjekye) in branch 'master': bpo-37878: Remove PyThreadState_DeleteCurrent() function (GH-15315) https://github.com/python/cpython/commit/2bc43cdc015eda4f1a651bb2b308a17a83c38e14 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 12:07:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Sep 2019 16:07:34 +0000 Subject: [issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent() In-Reply-To: <1565985235.6.0.212314052144.issue37878@roundup.psfhosted.org> Message-ID: <1567699654.38.0.416231001889.issue37878@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Joannah. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 12:09:49 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 05 Sep 2019 16:09:49 +0000 Subject: [issue37064] Feature request: option to keep/add flags to pathfix. In-Reply-To: <1558962587.87.0.563974081614.issue37064@roundup.psfhosted.org> Message-ID: <1567699789.18.0.90214030355.issue37064@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 3f43ceff186da09978d0aff257bb18b8ac7611f7 by Victor Stinner in branch 'master': bpo-37064: Skip test_tools.test_pathfix if installed (GH-15705) https://github.com/python/cpython/commit/3f43ceff186da09978d0aff257bb18b8ac7611f7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 12:48:36 2019 From: report at bugs.python.org (Ilya Valmianski) Date: Thu, 05 Sep 2019 16:48:36 +0000 Subject: [issue38039] Segfault when pickling dictionary with large pandas dataframes Message-ID: <1567702116.93.0.155927302531.issue38039@roundup.psfhosted.org> New submission from Ilya Valmianski : Tried pickling a dictionary with multiple pandas tables and python primitive types. Pandas tables are large so full object size is ~200GB but system should not be OOM (crashed with ~300 GB system memory available). Reproduced on two machines running RHEL 7.5. Tried using Python 3.6 and 3.7. Tried pickle and dill. All python versions were installed as environments via Anaconda. All segfault in pickle. Here is a dump: Fatal Python error: Segmentation fault Current thread 0x00007f724af23740 (most recent call first): File "/apps/anaconda3/lib/python3.6/pickle.py", line 496 in save File "/apps/anaconda3/lib/python3.6/pickle.py", line 805 in _batch_appends File "/apps/anaconda3/lib/python3.6/pickle.py", line 781 in save_list File "/apps/anaconda3/lib/python3.6/pickle.py", line 476 in save File "/apps/anaconda3/lib/python3.6/pickle.py", line 751 in save_tuple File "/apps/anaconda3/lib/python3.6/pickle.py", line 476 in save File "/apps/anaconda3/lib/python3.6/pickle.py", line 634 in save_reduce File "/apps/anaconda3/lib/python3.6/pickle.py", line 521 in save File "/apps/anaconda3/lib/python3.6/pickle.py", line 847 in _batch_setitems File "/apps/anaconda3/lib/python3.6/pickle.py", line 821 in save_dict File "/apps/anaconda3/lib/python3.6/site-packages/dill/_dill.py", line 893 in save_module_dict File "/apps/anaconda3/lib/python3.6/pickle.py", line 476 in save File "/apps/anaconda3/lib/python3.6/pickle.py", line 634 in save_reduce File "/apps/anaconda3/lib/python3.6/pickle.py", line 521 in save File "/apps/anaconda3/lib/python3.6/pickle.py", line 847 in _batch_setitems File "/apps/anaconda3/lib/python3.6/pickle.py", line 821 in save_dict File "/apps/anaconda3/lib/python3.6/site-packages/dill/_dill.py", line 893 in save_module_dict File "/apps/anaconda3/lib/python3.6/pickle.py", line 476 in save File "/apps/anaconda3/lib/python3.6/pickle.py", line 409 in dump File "/apps/anaconda3/lib/python3.6/site-packages/dill/_dill.py", line 286 in dump File "precompute_control_patients.py", line 220 in main File "/apps/anaconda3/lib/python3.6/site-packages/absl/app.py", line 251 in _run_main File "/apps/anaconda3/lib/python3.6/site-packages/absl/app.py", line 300 in run File "precompute_control_patients.py", line 227 in ---------- messages: 351213 nosy: Ilya Valmianski priority: normal severity: normal status: open title: Segfault when pickling dictionary with large pandas dataframes type: crash versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 12:56:29 2019 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 05 Sep 2019 16:56:29 +0000 Subject: [issue38038] Remove urllib.parse._splittype from xmlrpc.client In-Reply-To: <1567693191.9.0.654396049137.issue38038@roundup.psfhosted.org> Message-ID: <1567702589.97.0.525367893723.issue38038@roundup.psfhosted.org> Change by Dong-hee Na : ---------- title: Remove urllib.parse._ from xmlrpc.client -> Remove urllib.parse._splittype from xmlrpc.client _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 13:26:24 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 05 Sep 2019 17:26:24 +0000 Subject: [issue38035] shared_semaphores cannot be shared across unrelated processes In-Reply-To: <1567659668.43.0.186142682202.issue38035@roundup.psfhosted.org> Message-ID: <1567704384.44.0.084940111979.issue38035@roundup.psfhosted.org> Ned Deily added the comment: Please give an example of how this is a problem in using Python. You don't give any context here. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 13:39:39 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 05 Sep 2019 17:39:39 +0000 Subject: [issue38032] lib2to3 doesn't parse Python 3 identifiers containing non-spacing marks In-Reply-To: <1567639302.72.0.55214965787.issue38032@roundup.psfhosted.org> Message-ID: <1567705179.54.0.443081916244.issue38032@roundup.psfhosted.org> Ned Deily added the comment: "2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code." The example you supply, badvar,py, is not a valid Python 2.x program. Python 2 identifiers cannot contain such characters. https://docs.python.org/3/library/2to3.html https://docs.python.org/2/reference/lexical_analysis.html#identifiers https://docs.python.org/3/reference/lexical_analysis.html#identifiers ---------- nosy: +ned.deily resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:22:56 2019 From: report at bugs.python.org (Sean Happenny) Date: Thu, 05 Sep 2019 18:22:56 +0000 Subject: [issue38040] Typo: "Writeable" Should be "Writable" in IO Library Documentation Message-ID: <1567707776.67.0.386340687421.issue38040@roundup.psfhosted.org> New submission from Sean Happenny : Problem: There are 4 instances of the typo "writeable" in the documentation for the IO library affecting, at least, versions 3.7, 3.8, 3.9, and the latest master of the documentation (https://docs.python.org/[3.7,3.8,3.9]/library/io.html and https://github.com/python/cpython/blob/master/Doc/library/io.rst). This can cause confusion to the reader. The instances are under the "BufferedWriter" section (https://docs.python.org/3/library/io.html#io.BufferedWriter) and "BufferedRWPair" section (https://docs.python.org/3.7/library/io.html#io.BufferedRWPair). Fix: Change all instances of "writeable" to "writable" in the IO library documentation. ---------- assignee: docs at python components: Documentation, IO messages: 351216 nosy: Sean Happenny, docs at python priority: normal severity: normal status: open title: Typo: "Writeable" Should be "Writable" in IO Library Documentation type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:44:44 2019 From: report at bugs.python.org (SilentGhost) Date: Thu, 05 Sep 2019 18:44:44 +0000 Subject: [issue38040] Typo: "Writeable" Should be "Writable" in IO Library Documentation In-Reply-To: <1567707776.67.0.386340687421.issue38040@roundup.psfhosted.org> Message-ID: <1567709084.82.0.603161810319.issue38040@roundup.psfhosted.org> SilentGhost added the comment: There are more cases of using this spelling in the code base, but I personally don't see how any confusion can arise and why this "fix" is needed. ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:52:14 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 05 Sep 2019 18:52:14 +0000 Subject: [issue38041] IDLE Shell: Redesign minimum restart line Message-ID: <1567709534.52.0.152965325603.issue38041@roundup.psfhosted.org> New submission from Terry J. Reedy : Currently, Shell prints restart lines as =...= RESTART filename =...= where filename is 'Shell' or the full pathname. The code is tag = 'RESTART: ' + (filename if filename else 'Shell') halfbar = ((int(console.width) -len(tag) - 4) // 2) * '=' console.write("\n{0} {1} {0}".format(halfbar, tag)) The initial '\n' is needed because typically the cursor is sitting at a prompt. The -4 is from #21192 when I added 'Shell' or filename. It is -2 for the spaces plus a couple of extra spaces that were there before. I believe -2 is sufficient but will have to test to be sure. The number of '='s is the currently the same on both ends. (Because this is easiest.) It does not have to be, and would sometimes not be if we exactly filled the console width. I think we should because it would show the actual non-printable margin and would allow The minimum number of '='s is 0. The problem revealed in https://stackoverflow.com/questions/57795679/why-is-this-code-printing-an-empty-line-when-run-under-idle is that if console.width is exactly 10 + len(filename), the remaining trailing space wraps to the next line, making it look like a spurious print(' ') had occurred. Possible solutions: 0. Do nothing. I rejected this by opening this issue. The SO beginner was apparently genuinely confused and might not be the only such person. With no spec for the restart line, this is not an implementation bug but is a design glitch. As I hinted above, some current details are the result of adding filenames with minimal change. 1. Delete the ' 's surrounding the tag when there are no '='s. This looks strange because the '='s visually mark a restart line as much as 'RESTART'. 2. Print a minimum of 1 '=' on each end (by adding them to the format). This could result in a wrap of exactly ' =' or '=', either of which are bad. If there is any wrap, it should be the filename, so the user can recognize it as such. 3. A hybrid solution with a minimum of 1 '=' on the front and 0 on the end, with no space if no '='. I intend to try this after extracting the restart line into a testable function and writing tests that now fail. 4. Add a horizontal scrollbar to Shell. This not happening now, might be made optional, and would still require specification decisions. ---------- assignee: terry.reedy components: IDLE messages: 351218 nosy: terry.reedy priority: normal severity: normal stage: test needed status: open title: IDLE Shell: Redesign minimum restart line type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:55:34 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Thu, 05 Sep 2019 18:55:34 +0000 Subject: [issue14689] make PYTHONWARNINGS variable work in libpython In-Reply-To: <1335606965.58.0.412104204254.issue14689@psf.upfronthosting.co.za> Message-ID: <1567709734.68.0.46898814073.issue14689@roundup.psfhosted.org> Joannah Nanjekye added the comment: @petere do you want to open a PR with your patch here: https://github.com/python/cpython/pulls ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 14:57:03 2019 From: report at bugs.python.org (Justin Arthur) Date: Thu, 05 Sep 2019 18:57:03 +0000 Subject: [issue38032] lib2to3 doesn't parse Python 3 identifiers containing non-spacing marks In-Reply-To: <1567639302.72.0.55214965787.issue38032@roundup.psfhosted.org> Message-ID: <1567709823.04.0.0530612152492.issue38032@roundup.psfhosted.org> Justin Arthur added the comment: Ned, can you confirm that 2to3 is not intended for cumulative/incremental runs over the same codebase? If it's not intended to be run on previously ported code, this will just need to be fixed on the lib2to3 downstream projects like awpa and Black that are encountering this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 15:01:58 2019 From: report at bugs.python.org (Sean Happenny) Date: Thu, 05 Sep 2019 19:01:58 +0000 Subject: [issue38040] Typo: "Writeable" Should be "Writable" in IO Library Documentation In-Reply-To: <1567709084.82.0.603161810319.issue38040@roundup.psfhosted.org> Message-ID: Sean Happenny added the comment: It is a minor issue and I understand that there are many, much more important fixes and features the whole Python dev team is working on. But reading the documentation for these classes indicates that these classes may have a "writeable" member. If, as an example, the user then needs to examine the implementation of these classes and searches for "writeable" in the CPython, they'll find instances in comments, but not in the code. This may cause them to miss the real spelling of the method "writable()". Also, another justification is that the documentation should be correct and currently it is not. This fix should be a very simple find-and-replace, but does touch multiple files (probably more than those I referenced) and I understand how that is. On Thu, Sep 5, 2019, 11:44 SilentGhost wrote: > > SilentGhost added the comment: > > There are more cases of using this spelling in the code base, but I > personally don't see how any confusion can arise and why this "fix" is > needed. > > ---------- > nosy: +SilentGhost > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 15:08:28 2019 From: report at bugs.python.org (Ryan May) Date: Thu, 05 Sep 2019 19:08:28 +0000 Subject: [issue37980] regression when passing numpy bools to sorted(..., reverse=r) In-Reply-To: <1567096742.32.0.970581980709.issue37980@roundup.psfhosted.org> Message-ID: <1567710508.29.0.986202493427.issue37980@roundup.psfhosted.org> Change by Ryan May : ---------- nosy: +Ryan May _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 16:50:01 2019 From: report at bugs.python.org (Alexander Kurakin) Date: Thu, 05 Sep 2019 20:50:01 +0000 Subject: [issue38042] Crash on double list(lxml.etree.iterparse(f)) Edit Message-ID: <1567716601.15.0.507352834054.issue38042@roundup.psfhosted.org> New submission from Alexander Kurakin : I have a crash in Python 3.x environments and don't have in 2.7. === Crashes in: Python 3.7.4, Anaconda, Linux 64bit, lxml 4.3.3 OR Python 3.7.4, Anaconda, Linux 64bit, lxml 4.4.1 OR Python 3.6.5, Gentoo Linux 64bit, lxml 4.3.3 test.py: import lxml import lxml.etree with open('test.xml', 'rb') as f: list( lxml.etree.iterparse(f) ) # Traceback (most recent call last): # File "test.py", line 18, in # lxml.etree.iterparse(f) # File "src/lxml/iterparse.pxi", line 209, in lxml.etree.iterparse.__next__ # File "src/lxml/iterparse.pxi", line 194, in lxml.etree.iterparse.__next__ # File "src/lxml/iterparse.pxi", line 225, in lxml.etree.iterparse._read_more_events # File "src/lxml/parser.pxi", line 1380, in lxml.etree._FeedParser.close # Segmentation fault list( lxml.etree.iterparse(f) ) test.xml: (or any else) GDB's backtrace see in attachment. === Doesn't crash in: Python 2.7.15, Gentoo Linux 64bit, lxml 4.3.3 # Traceback (most recent call last): # File "test.py", line 19, in # lxml.etree.iterparse(f) # File "src/lxml/iterparse.pxi", line 209, in lxml.etree.iterparse.__next__ # File "/home/sasha/_lxml-bug/test.xml", line 0 lxml.etree.XMLSyntaxError: no element found === See also: https://bugs.launchpad.net/lxml/+bug/1833050 ---------- files: bt.txt messages: 351222 nosy: kuraga priority: normal severity: normal status: open title: Crash on double list(lxml.etree.iterparse(f)) Edit type: crash versions: Python 3.6, Python 3.7 Added file: https://bugs.python.org/file48595/bt.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 16:50:19 2019 From: report at bugs.python.org (Alexander Kurakin) Date: Thu, 05 Sep 2019 20:50:19 +0000 Subject: [issue38042] Crash on double list(lxml.etree.iterparse(f)) In-Reply-To: <1567716601.15.0.507352834054.issue38042@roundup.psfhosted.org> Message-ID: <1567716619.85.0.222265122092.issue38042@roundup.psfhosted.org> Change by Alexander Kurakin : ---------- title: Crash on double list(lxml.etree.iterparse(f)) Edit -> Crash on double list(lxml.etree.iterparse(f)) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 20:22:30 2019 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 06 Sep 2019 00:22:30 +0000 Subject: [issue38039] Segfault when pickling dictionary with large pandas dataframes In-Reply-To: <1567702116.93.0.155927302531.issue38039@roundup.psfhosted.org> Message-ID: <1567729350.43.0.748058630732.issue38039@roundup.psfhosted.org> Eric V. Smith added the comment: Can you provide the code that caused the segfault? ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 22:48:28 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 06 Sep 2019 02:48:28 +0000 Subject: [issue38032] lib2to3 doesn't parse Python 3 identifiers containing non-spacing marks In-Reply-To: <1567639302.72.0.55214965787.issue38032@roundup.psfhosted.org> Message-ID: <1567738108.91.0.309066646769.issue38032@roundup.psfhosted.org> Ned Deily added the comment: Benjamin, can you answer Justin's question above? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 23:08:25 2019 From: report at bugs.python.org (Roundup Robot) Date: Fri, 06 Sep 2019 03:08:25 +0000 Subject: [issue38034] Typo on logging.handlers.QueueListener documentation In-Reply-To: <1567646582.17.0.242396034373.issue38034@roundup.psfhosted.org> Message-ID: <1567739305.12.0.231435796464.issue38034@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +15362 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15708 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 23:24:49 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 06 Sep 2019 03:24:49 +0000 Subject: [issue38041] IDLE Shell: Redesign minimum restart line In-Reply-To: <1567709534.52.0.152965325603.issue38041@roundup.psfhosted.org> Message-ID: <1567740289.62.0.142511234842.issue38041@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +15364 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/15709 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 23:29:06 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 06 Sep 2019 03:29:06 +0000 Subject: [issue38041] Refine IDLE Shell restart line In-Reply-To: <1567709534.52.0.152965325603.issue38041@roundup.psfhosted.org> Message-ID: <1567740546.04.0.957368958028.issue38041@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- title: IDLE Shell: Redesign minimum restart line -> Refine IDLE Shell restart line _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 23:35:22 2019 From: report at bugs.python.org (Vinay Sharma) Date: Fri, 06 Sep 2019 03:35:22 +0000 Subject: [issue38035] shared_semaphores cannot be shared across unrelated processes In-Reply-To: <1567659668.43.0.186142682202.issue38035@roundup.psfhosted.org> Message-ID: <1567740922.84.0.389150609054.issue38035@roundup.psfhosted.org> Vinay Sharma added the comment: Let's say I have two processes which are accessing a shared resource (let's say shared memory). Now, these two processes will need some kind of synchronisation mechanism, to be able to access the resource properly, and avoid race condition. Currently, shared semaphores can be shared with child processes, but there is no way of accessing a named shared semaphore by two separate processes. Although, the semaphore created by default is a named semaphore, and has the potential to be accessed by multiple processes, but because of the flags, it can't be opened by any other process. This is a feature request, and not a bug, therefore I have selected type as enhancement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 5 23:42:31 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 06 Sep 2019 03:42:31 +0000 Subject: [issue38041] IDLE Shell: Refine restart line In-Reply-To: <1567709534.52.0.152965325603.issue38041@roundup.psfhosted.org> Message-ID: <1567741351.63.0.223418860419.issue38041@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- stage: patch review -> commit review title: Refine IDLE Shell restart line -> IDLE Shell: Refine restart line _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 00:10:06 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 06 Sep 2019 04:10:06 +0000 Subject: [issue38032] lib2to3 doesn't parse Python 3 identifiers containing non-spacing marks In-Reply-To: <1567738108.91.0.309066646769.issue38032@roundup.psfhosted.org> Message-ID: Benjamin Peterson added the comment: 2to3 should be able to parse valid Python 3 code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 00:26:42 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 06 Sep 2019 04:26:42 +0000 Subject: [issue38032] lib2to3 doesn't parse Python 3 identifiers containing non-spacing marks In-Reply-To: <1567639302.72.0.55214965787.issue38032@roundup.psfhosted.org> Message-ID: <1567744002.61.0.889966835588.issue38032@roundup.psfhosted.org> Ned Deily added the comment: > 2to3 should be able to parse valid Python 3 code. OK, then should the original behavior here be treated as a bug and fixed? If so, this issue should be re-opened. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 00:26:53 2019 From: report at bugs.python.org (Ma Lin) Date: Fri, 06 Sep 2019 04:26:53 +0000 Subject: [issue38015] inline function generates slightly inefficient machine code In-Reply-To: <1567483364.75.0.314519224234.issue38015@roundup.psfhosted.org> Message-ID: <1567744013.5.0.998078551821.issue38015@roundup.psfhosted.org> Change by Ma Lin : ---------- keywords: +patch pull_requests: +15365 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15710 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 00:30:11 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 06 Sep 2019 04:30:11 +0000 Subject: [issue38032] lib2to3 doesn't parse Python 3 identifiers containing non-spacing marks In-Reply-To: <1567639302.72.0.55214965787.issue38032@roundup.psfhosted.org> Message-ID: <1567744211.5.0.297132821795.issue38032@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- resolution: not a bug -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 00:31:10 2019 From: report at bugs.python.org (Ma Lin) Date: Fri, 06 Sep 2019 04:31:10 +0000 Subject: [issue38015] inline function generates slightly inefficient machine code In-Reply-To: <1567483364.75.0.314519224234.issue38015@roundup.psfhosted.org> Message-ID: <1567744270.68.0.384876701138.issue38015@roundup.psfhosted.org> Ma Lin added the comment: Revert commit 5e63ab0 or use PR 15710, both are fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 00:38:14 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 06 Sep 2019 04:38:14 +0000 Subject: [issue38032] lib2to3 doesn't parse Python 3 identifiers containing non-spacing marks In-Reply-To: <1567639302.72.0.55214965787.issue38032@roundup.psfhosted.org> Message-ID: <1567744694.01.0.905394079432.issue38032@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: -ned.deily stage: resolved -> needs patch versions: +Python 3.9 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 00:46:54 2019 From: report at bugs.python.org (Greg Price) Date: Fri, 06 Sep 2019 04:46:54 +0000 Subject: [issue38043] small cleanups in Unicode normalization code Message-ID: <1567745214.3.0.712701659381.issue38043@roundup.psfhosted.org> New submission from Greg Price : Benjamin noticed in reviewing GH-15558 (for #37966) several points where the existing code around Unicode normalization can be improved: * on the `QuickcheckResult` enum: > Maybe `makeunicodedata.py` should output this enum (with better name namespacing) * > merging `test_normalization` into this file [i.e. `test_unicodedata.py`] for clarity * > These "boolean int" parameters could be actual `bool`s. [sc. the `nfc` and `k` parameters to `is_normalized_quickcheck`] None of these are super hard, so good to knock them out while we're thinking of them. ---------- components: Unicode messages: 351229 nosy: Greg Price, benjamin.peterson, ezio.melotti, vstinner priority: normal severity: normal status: open title: small cleanups in Unicode normalization code versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 01:22:27 2019 From: report at bugs.python.org (Greg Price) Date: Fri, 06 Sep 2019 05:22:27 +0000 Subject: [issue38043] small cleanups in Unicode normalization code In-Reply-To: <1567745214.3.0.712701659381.issue38043@roundup.psfhosted.org> Message-ID: <1567747347.97.0.886480995061.issue38043@roundup.psfhosted.org> Change by Greg Price : ---------- keywords: +patch pull_requests: +15366 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15711 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 01:24:24 2019 From: report at bugs.python.org (Greg Price) Date: Fri, 06 Sep 2019 05:24:24 +0000 Subject: [issue38043] small cleanups in Unicode normalization code In-Reply-To: <1567745214.3.0.712701659381.issue38043@roundup.psfhosted.org> Message-ID: <1567747464.86.0.507127625519.issue38043@roundup.psfhosted.org> Change by Greg Price : ---------- pull_requests: +15367 pull_request: https://github.com/python/cpython/pull/15712 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 01:27:57 2019 From: report at bugs.python.org (Greg Price) Date: Fri, 06 Sep 2019 05:27:57 +0000 Subject: [issue38043] small cleanups in Unicode normalization code In-Reply-To: <1567745214.3.0.712701659381.issue38043@roundup.psfhosted.org> Message-ID: <1567747677.91.0.710612089215.issue38043@roundup.psfhosted.org> Change by Greg Price : ---------- pull_requests: +15368 pull_request: https://github.com/python/cpython/pull/15558 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 01:44:55 2019 From: report at bugs.python.org (hai shi) Date: Fri, 06 Sep 2019 05:44:55 +0000 Subject: [issue14364] Argparse incorrectly handles '--' as argument to option In-Reply-To: <1332080953.55.0.495639573781.issue14364@psf.upfronthosting.co.za> Message-ID: <1567748695.83.0.663310134439.issue14364@roundup.psfhosted.org> hai shi added the comment: some test cases which paul provided looks doesn't keep compatible. In TestDoubleDashRemoval: # output in my env is Namespace(cmd='cmd', foo=None, rest=['--', '--foo']) ('-- cmd -- -- --foo', NS(cmd='cmd', foo=None, rest=['--', '--', '--foo'])) # output in my env is Namespace(cmd='--', foo='1', rest=['1', '2']) ('-f1 -- -- 1 -- 2', NS(cmd='--', foo='1', rest=['1', '--', '2'])) # output in my env is Namespace(cmd='--foo', foo=None, rest=['--bar', '2']) ('-- --foo -- --bar 2', NS(cmd='--foo', foo=None, rest=['--', '--bar', '2'])) # output in my env is Namespace(cmd='cmd', foo=None, rest=['--foo', '-f2']) ('cmd -- --foo -- -f2', NS(cmd='cmd', foo=None, rest=['--foo', '--', '-f2'])) In TestDoubleDashRemoval1: # output in my env is Namespace(cmd='cmd', foo='1', rest=['-f2', '3']) ('-f1 -- cmd -- -f2 3', NS(cmd='cmd', foo='1', rest=['--', '-f2', '3'])) my python's version is: 2.7.5, 3.6.8 ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 01:58:00 2019 From: report at bugs.python.org (hai shi) Date: Fri, 06 Sep 2019 05:58:00 +0000 Subject: [issue14364] Argparse incorrectly handles '--' as argument to option In-Reply-To: <1332080953.55.0.495639573781.issue14364@psf.upfronthosting.co.za> Message-ID: <1567749480.24.0.524699092295.issue14364@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +15369 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15714 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 01:58:28 2019 From: report at bugs.python.org (hai shi) Date: Fri, 06 Sep 2019 05:58:28 +0000 Subject: [issue14364] Argparse incorrectly handles '--' as argument to option In-Reply-To: <1332080953.55.0.495639573781.issue14364@psf.upfronthosting.co.za> Message-ID: <1567749508.56.0.769809528692.issue14364@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +rhettinger type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 03:04:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Sep 2019 07:04:51 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1567753491.48.0.276168580497.issue34037@roundup.psfhosted.org> STINNER Victor added the comment: This bug still occurs randomly on the CI. Example on AppVeyor: https://ci.appveyor.com/project/python/cpython/builds/27209898 test_reader_callback (test.test_asyncio.test_events.SelectEventLoopTests) ... ok test_remove_fds_after_closing (test.test_asyncio.test_events.SelectEventLoopTests) ... ok test_run_in_executor (test.test_asyncio.test_events.SelectEventLoopTests) ... ok test_run_in_executor_cancel (test.test_asyncio.test_events.SelectEventLoopTests) ... Warning -- threading_cleanup() failed to cleanup 1 threads (count: 1, dangling: 2) Dangling thread: Dangling thread: <_MainThread(MainThread, started 1916)> ok Any plan to reapply my change, or fix it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 03:19:54 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 06 Sep 2019 07:19:54 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1567754394.16.0.212005773338.issue34037@roundup.psfhosted.org> Kyle Stanley added the comment: > Any plan to reapply my change, or fix it? I can try to help with this. I'm not the most familiar with the internals of asyncio, but I think it would provide a good learning experience. ---------- nosy: +aeros167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 03:56:49 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 06 Sep 2019 07:56:49 +0000 Subject: [issue38042] Crash on double list(lxml.etree.iterparse(f)) In-Reply-To: <1567716601.15.0.507352834054.issue38042@roundup.psfhosted.org> Message-ID: <1567756609.34.0.496600710543.issue38042@roundup.psfhosted.org> Serhiy Storchaka added the comment: This tracker is for bugs in CPython (the C implementation of Python). lxml is not a part of the standard library. Please use a proper tracker for reporting a bug in lxml. ---------- nosy: +serhiy.storchaka resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 05:03:15 2019 From: report at bugs.python.org (Alexander Kurakin) Date: Fri, 06 Sep 2019 09:03:15 +0000 Subject: [issue38042] Crash on double list(lxml.etree.iterparse(f)) In-Reply-To: <1567716601.15.0.507352834054.issue38042@roundup.psfhosted.org> Message-ID: <1567760595.43.0.182914895755.issue38042@roundup.psfhosted.org> Alexander Kurakin added the comment: Yes, I do. Please read all. 1) According to https://bugs.launchpad.net/lxml/+bug/1833050 (by lxml author's opinion) it's not a lxml bug. 2) I wouldn't said that but according to backtrace we have crash at Python-time. 3) Moreover crash existence depends on Python version! Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 05:13:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Sep 2019 09:13:59 +0000 Subject: [issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone In-Reply-To: <1561315344.64.0.509844893886.issue37380@roundup.psfhosted.org> Message-ID: <1567761239.47.0.932416828186.issue37380@roundup.psfhosted.org> STINNER Victor added the comment: > When a Popen instance is finalized by the garbage collector, the internal handle is also finalized and closed despite the instance being put on the active list. This results in _cleanup throwing because the handle can no longer be used. Right, that's a more practical case where this bug still occurs on Python 3.8 and older. I would suggest to fix applications which should get a ResourceWarning warning in this case. Chip Lynch wrote me an email saying that his team is impacted by the bug on Windows with Python 3.7. I tried to write a simpler patch ignoring ERROR_INVALID_HANDLE, but then I read again this issue discussion: Eryk Sun and me agree that ignorning ERROR_INVALID_HANDLE is a bad idea, it can be worse: silence a real bug. So I now agree to backport the fix from master to 3.7 and 3.8 branches. I prefer to leave 2.7 unchanged even if it's affected. I don't want to take the risk of introducing another regression in 2.7. Moreover, subprocess.Popen has a __del__() method. Python 2.7 handles reference cycles differently than Python 3: it doesn't implement finalizers (PEP 442). While Python 2.7 might be affected, it should be affected differently. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 05:14:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Sep 2019 09:14:41 +0000 Subject: [issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone In-Reply-To: <1561315344.64.0.509844893886.issue37380@roundup.psfhosted.org> Message-ID: <1567761281.6.0.698809039538.issue37380@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 1e2707d7e82aedf73c59772bc7aa228286323c3c by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-37380: subprocess: don't use _active on win (GH-14360) (GH-15706) https://github.com/python/cpython/commit/1e2707d7e82aedf73c59772bc7aa228286323c3c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 05:14:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Sep 2019 09:14:41 +0000 Subject: [issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone In-Reply-To: <1561315344.64.0.509844893886.issue37380@roundup.psfhosted.org> Message-ID: <1567761281.74.0.476136235632.issue37380@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 4d1abedce9422473af2ac78047e55cde73208208 by Victor Stinner (Miss Islington (bot)) in branch '3.8': bpo-37380: subprocess: don't use _active on win (GH-14360) (GH-15707) https://github.com/python/cpython/commit/4d1abedce9422473af2ac78047e55cde73208208 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 05:20:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Sep 2019 09:20:35 +0000 Subject: [issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone In-Reply-To: <1561315344.64.0.509844893886.issue37380@roundup.psfhosted.org> Message-ID: <1567761635.27.0.102721743687.issue37380@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Ruslan Kuprieiev for the bug report and the fix. Thanks Eryk Sun (as usual!) for the great analysis of this issue. Ok, the bug should now be fixed in 3.7, 3.8 and master branches. I chose to not fix Python 2.7: see my previous comment. See bpo-37410 for the follow-up: "[Windows] subprocess: close the handle when the process completes". ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 05:23:10 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 06 Sep 2019 09:23:10 +0000 Subject: [issue38042] Crash on double list(lxml.etree.iterparse(f)) In-Reply-To: <1567716601.15.0.507352834054.issue38042@roundup.psfhosted.org> Message-ID: <1567761790.18.0.163661887643.issue38042@roundup.psfhosted.org> Serhiy Storchaka added the comment: Indeed, there is a bug in Python. It can be reproduced without lxml: $ ./python -c "raise SyntaxError('error', (b'file', 1, 2, 'text'))" Traceback (most recent call last): File "", line 1, in python: Objects/unicodeobject.c:397: _PyUnicode_CheckConsistency: Assertion `PyUnicode_Check(op)' failed. Aborted (core dumped) It has been fixed in 3.7+ by issue37467, but the fix was not backported to 3.6. ---------- components: +Interpreter Core nosy: +vstinner resolution: third party -> stage: resolved -> status: closed -> open versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 05:27:13 2019 From: report at bugs.python.org (hongweipeng) Date: Fri, 06 Sep 2019 09:27:13 +0000 Subject: [issue27145] long_add and long_sub might return a new int where &small_ints[x] could be returned In-Reply-To: <1464451117.45.0.85462287723.issue27145@psf.upfronthosting.co.za> Message-ID: <1567762033.88.0.0965051807218.issue27145@roundup.psfhosted.org> Change by hongweipeng : ---------- pull_requests: +15370 pull_request: https://github.com/python/cpython/pull/15716 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 05:29:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Sep 2019 09:29:20 +0000 Subject: [issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone In-Reply-To: <1561315344.64.0.509844893886.issue37380@roundup.psfhosted.org> Message-ID: <1567762160.12.0.185390356782.issue37380@roundup.psfhosted.org> STINNER Victor added the comment: Steve Dower: "I triggered automatic backports to see how they go. Doesn't necessarily mean we'll merge them without looking more closely, but may as well check out what our automated tools suggest." Thanks, I merged the backports. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 05:38:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Sep 2019 09:38:28 +0000 Subject: [issue38042] Crash on double list(lxml.etree.iterparse(f)) In-Reply-To: <1567716601.15.0.507352834054.issue38042@roundup.psfhosted.org> Message-ID: <1567762708.84.0.288493601319.issue38042@roundup.psfhosted.org> STINNER Victor added the comment: I understand that this bug is a duplicate of bpo-37467 that I fixed recently in 3.7, 3.8 and master branches: commit f9b7457bd7f438263e0d2dd1f70589ad56a2585e Author: Victor Stinner Date: Mon Jul 1 16:51:18 2019 +0200 bpo-37467: Fix PyErr_Display() for bytes filename (GH-14504) > It has been fixed in 3.7+ by issue37467, but the fix was not backported to 3.6. Python 3.6 no longer accept bug fixes, only security fixes: https://devguide.python.org/#status-of-python-branches And this bug doesn't look like a security issue. Python 2.7 doesn't seem to be affected by this issue. In short, nothing can be one on the Python side: please upgrade to Python 3.7. I close this issue as a duplicate of bpo-37467. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> sys.excepthook (PyErr_Display) does crash with SyntaxError which has a bytes filename _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 05:43:43 2019 From: report at bugs.python.org (Alexander Kurakin) Date: Fri, 06 Sep 2019 09:43:43 +0000 Subject: [issue38042] Crash on double list(lxml.etree.iterparse(f)) In-Reply-To: <1567716601.15.0.507352834054.issue38042@roundup.psfhosted.org> Message-ID: <1567763023.85.0.813486899473.issue38042@roundup.psfhosted.org> Alexander Kurakin added the comment: Ok, thanks! Good that I was too lazy to open bug in June because our colleague did it better then me :) Seems like the fix doesn't present in current 3.7 version (3.7.4). Will try in 3.7.5 and will close UPD: Oh, closed? Ok. But *no*, it's not fixed in current 3.7 version (in master - yes). I wrote: 3.7.4. Let's check each other instead of... Sorry. Thanks. ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 06:11:18 2019 From: report at bugs.python.org (Jeremy) Date: Fri, 06 Sep 2019 10:11:18 +0000 Subject: [issue38044] unittest causing segfaults with string malloc in c++ module Message-ID: <1567764678.03.0.448906028899.issue38044@roundup.psfhosted.org> New submission from Jeremy : If a unittest is written which accesses a module written in C++ (I used Pybind11 to allow Python access) which uses malloc for a string, a segmentation fault is caused. This is not replicated when malloc is used for some other data types such as int, char or char* C++ code: #include #include #include using namespace std; void t(){ string * data = (string*)malloc(100*sizeof(string)); data[0] = "this is a test"; cout< _______________________________________ From report at bugs.python.org Fri Sep 6 08:18:00 2019 From: report at bugs.python.org (Antony Lee) Date: Fri, 06 Sep 2019 12:18:00 +0000 Subject: [issue38045] Flag instance creation is slow Message-ID: <1567772280.73.0.782923595007.issue38045@roundup.psfhosted.org> New submission from Antony Lee : Consider the following example from enum import Flag F = Flag("F", list("abcdefghijklm")) for idx in range(2**len(F) - 1): F(idx) creating all possible combos of 13 flags, so 8192 instances (yes, I know the instances are cached later, but the initial cost is still significant). Locally, this takes over 4.5s to execute; profiling shows that ~30% of that time is spent executing enum._is_power_of_two(!): def _power_of_two(value): if value < 1: return False return value == 2 ** _high_bit(value) Indeed, replacing the implementation of _power_of_two by import math _powers_of_two = { 2 ** i for i in range(math.ceil(math.log2(sys.maxsize)) + 1)} def _power_of_two(value): return (value in _powers_of_two if value <= sys.maxsize else value == 2 ** _high_bit(value)) shaves off ~30% of the runtime (obviously this won't help for huge (>sys.maxsize) flag values, but these are rarer I would think). An even better fix, I think, would be for Flag to cache `flags_to_check` (updating it at the same time as `_value2member_map_`) instead of recomputing it each time in _decompose flags_to_check = [ (m, v) for v, m in list(flag._value2member_map_.items()) if m.name is not None or _power_of_two(v) ] as this actually needlessly introduces quadratic complexity when iterating over all possible combos (because the size of _value2member_map_ is growing). (Also, it's not actually clear to me how one can end up with unnamed power-of-two instances in _value2member_map?) ---------- messages: 351244 nosy: Antony.Lee priority: normal severity: normal status: open title: Flag instance creation is slow versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 09:07:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Sep 2019 13:07:54 +0000 Subject: [issue38042] Crash on double list(lxml.etree.iterparse(f)) In-Reply-To: <1567716601.15.0.507352834054.issue38042@roundup.psfhosted.org> Message-ID: <1567775274.57.0.664377253657.issue38042@roundup.psfhosted.org> STINNER Victor added the comment: https://github.com/python/cpython/commit/8cbffc4d96d1da0fbc38da6f34f2da30c5ffd601 has been merged after 3.7.4 has been released, correct. I will be part of the next 3.7.5 release. About the workflow: we close a bug once the change is merged into the development branch, not when a release is published. For the current 3.7.5 schedule, see: https://www.python.org/dev/peps/pep-0537/#id4 In the meanwhile, avoid calling lxml.etree.iterparse(f) twice :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 09:08:46 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 06 Sep 2019 13:08:46 +0000 Subject: [issue38045] Flag instance creation is slow In-Reply-To: <1567772280.73.0.782923595007.issue38045@roundup.psfhosted.org> Message-ID: <1567775326.46.0.459789670253.issue38045@roundup.psfhosted.org> Serhiy Storchaka added the comment: The fast method to check if the value is a power of two: not value & (value - 1) ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 09:20:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Sep 2019 13:20:41 +0000 Subject: [issue38045] enum.Flag instance creation is slow In-Reply-To: <1567772280.73.0.782923595007.issue38045@roundup.psfhosted.org> Message-ID: <1567776041.36.0.456516443594.issue38045@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Flag instance creation is slow -> enum.Flag instance creation is slow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 09:29:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Sep 2019 13:29:51 +0000 Subject: [issue14689] make PYTHONWARNINGS variable work in libpython In-Reply-To: <1335606965.58.0.412104204254.issue14689@psf.upfronthosting.co.za> Message-ID: <1567776591.91.0.426353494019.issue14689@roundup.psfhosted.org> STINNER Victor added the comment: I refactored deeply Modules/main.c and moved the code to Python/initconfig.c and Python/preconfig.c. There is now a public C API to access to all configuration parameters documented at: https://docs.python.org/dev/c-api/init_config.html The design document is the PEP 587 which has been implemented in Python 3.8. If you use the "Python Configuration", you now get the same behaviour than system Python program ("python"). Or you can use "Isolated Configuration" but opt-in for environment variables. Or you can modify PyConfig.warnoptions: https://docs.python.org/dev/c-api/init_config.html#c.PyConfig.warnoptions So you know have plently of choices to use PYTHONWARNINGS env var when you embed Python. Good news: Python 3.8 beta4 is now available for testing! ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 09:30:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Sep 2019 13:30:02 +0000 Subject: [issue14689] make PYTHONWARNINGS variable work in libpython In-Reply-To: <1335606965.58.0.412104204254.issue14689@psf.upfronthosting.co.za> Message-ID: <1567776602.6.0.328125279574.issue14689@roundup.psfhosted.org> STINNER Victor added the comment: I close the issue since it's now fixed ;-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 09:44:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Sep 2019 13:44:39 +0000 Subject: [issue38037] Assertion failed: object has negative ref count In-Reply-To: <1567682048.52.0.677025547591.issue38037@roundup.psfhosted.org> Message-ID: <1567777479.99.0.123525724661.issue38037@roundup.psfhosted.org> STINNER Victor added the comment: This issue is a Python 3.8 regression. Joannah: Would you mind to have a look? x = DefaultHandler = PyLong_FromVoidPtr((void *)SIG_DFL); if (PyModule_AddObject(m, "SIG_DFL", x)) goto finally; This change is not easy to read. DefaultHandler must be a strong reference: finisignal() calls Py_CLEAR(DefaultHandler); Previously, the code uses PyDict_SetItemString(d, "SIG_DFL", x): PyDict_SetItemString increases the reference counter, whereas PyModule_AddObject leaves the reference counter unchanged (yeah, it's a strange/bad C API). I guess than an INCREF() is needed somewhere. Compare it to: int PyModule_AddIntConstant(PyObject *m, const char *name, long value) { PyObject *o = PyLong_FromLong(value); if (!o) return -1; if (PyModule_AddObject(m, name, o) == 0) return 0; Py_DECREF(o); return -1; } ---------- nosy: +lukasz.langa, vstinner priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 09:48:33 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Fri, 06 Sep 2019 13:48:33 +0000 Subject: [issue38037] Assertion failed: object has negative ref count In-Reply-To: <1567682048.52.0.677025547591.issue38037@roundup.psfhosted.org> Message-ID: <1567777713.41.0.45313359341.issue38037@roundup.psfhosted.org> Joannah Nanjekye added the comment: I will look after my next meeting which is in 10 minutes. In the meantime have you perused this PR : https://github.com/python/cpython/pull/15701 If it can solve this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 09:48:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Sep 2019 13:48:35 +0000 Subject: [issue24011] Add error checks to PyInit_signal() In-Reply-To: <1429471695.96.0.523863138973.issue24011@psf.upfronthosting.co.za> Message-ID: <1567777715.22.0.159117750193.issue24011@roundup.psfhosted.org> STINNER Victor added the comment: There is a regression related to reference count: see bpo-38037. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 09:51:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Sep 2019 13:51:47 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567777907.47.0.634067011115.issue24416@roundup.psfhosted.org> STINNER Victor added the comment: > It seems to affect performance. Oh ok. So this change makes .isocalendar() slower and breaks the backward compatibility on the serialization. I'm not longer sure that it's worth it. I defer the decision the datetime module maintainers: Alexander Beloposky and Paul Ganssle. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 09:55:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Sep 2019 13:55:06 +0000 Subject: [issue38033] Use After Free: PyObject_Free (valgrind) In-Reply-To: <1567639624.78.0.948902616905.issue38033@roundup.psfhosted.org> Message-ID: <1567778106.76.0.657139311233.issue38033@roundup.psfhosted.org> STINNER Victor added the comment: By default, Python is optimized for performance but its pymalloc memory allocator causes false alarms in Valgrind. > https://github.com/python/cpython/blob/master/Misc/README.valgrind This or you can disable pymalloc at runtime using: PYTHONMALLOC=malloc python3 ... or: PYTHONMALLOC=malloc_debug python3 ... See: https://docs.python.org/dev/c-api/memory.html and https://docs.python.org/dev/using/cmdline.html#envvar-PYTHONMALLOC ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 09:56:00 2019 From: report at bugs.python.org (Patrik Kopkan) Date: Fri, 06 Sep 2019 13:56:00 +0000 Subject: [issue37064] Feature request: option to keep/add flags to pathfix. In-Reply-To: <1558962587.87.0.563974081614.issue37064@roundup.psfhosted.org> Message-ID: <1567778160.56.0.149373597027.issue37064@roundup.psfhosted.org> Change by Patrik Kopkan : ---------- pull_requests: +15371 pull_request: https://github.com/python/cpython/pull/15717 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 10:21:20 2019 From: report at bugs.python.org (Sergey Fedoseev) Date: Fri, 06 Sep 2019 14:21:20 +0000 Subject: [issue38015] inline function generates slightly inefficient machine code In-Reply-To: <1567483364.75.0.314519224234.issue38015@roundup.psfhosted.org> Message-ID: <1567779680.32.0.269712450754.issue38015@roundup.psfhosted.org> Change by Sergey Fedoseev : ---------- pull_requests: +15372 pull_request: https://github.com/python/cpython/pull/15718 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 10:27:44 2019 From: report at bugs.python.org (Charalampos Stratakis) Date: Fri, 06 Sep 2019 14:27:44 +0000 Subject: [issue38033] Use After Free: PyObject_Free (valgrind) In-Reply-To: <1567639624.78.0.948902616905.issue38033@roundup.psfhosted.org> Message-ID: <1567780064.37.0.287897203645.issue38033@roundup.psfhosted.org> Charalampos Stratakis added the comment: Another thing also, is to be sure to utilize the python's suppression file by adding the --suppressions= to valgrind's command line invocation. ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 10:28:25 2019 From: report at bugs.python.org (Sergey Fedoseev) Date: Fri, 06 Sep 2019 14:28:25 +0000 Subject: [issue38015] inline function generates slightly inefficient machine code In-Reply-To: <1567483364.75.0.314519224234.issue38015@roundup.psfhosted.org> Message-ID: <1567780105.65.0.980302436578.issue38015@roundup.psfhosted.org> Sergey Fedoseev added the comment: I added similar patch that replaces get_small_int() with macro version, since it also induces unnecessary casts and makes machine code less efficient. Example assembly can be checked at https://godbolt.org/z/1SjG3E. This change produces tiny, but measurable speed-up for handling small ints: $ python -m pyperf timeit -s "from collections import deque; consume = deque(maxlen=0).extend; r = range(256)" "consume(r)" --compare-to=../cpython-master/venv/bin/python --duplicate=1000 /home/sergey/tmp/cpython-master/venv/bin/python: ..................... 1.03 us +- 0.08 us /home/sergey/tmp/cpython-dev/venv/bin/python: ..................... 973 ns +- 18 ns Mean +- std dev: [/home/sergey/tmp/cpython-master/venv/bin/python] 1.03 us +- 0.08 us -> [/home/sergey/tmp/cpython-dev/venv/bin/python] 973 ns +- 18 ns: 1.05x faster (-5%) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 10:30:57 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 06 Sep 2019 14:30:57 +0000 Subject: [issue18049] Re-enable threading test on macOS In-Reply-To: <1369405666.05.0.54874731136.issue18049@psf.upfronthosting.co.za> Message-ID: <1567780257.08.0.53762720899.issue18049@roundup.psfhosted.org> Ronald Oussoren added the comment: I think it is unlikely that the timeouts on Azure CI are related to this change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 10:43:48 2019 From: report at bugs.python.org (Daniel Himmelstein) Date: Fri, 06 Sep 2019 14:43:48 +0000 Subject: [issue22454] Adding the opposite function of shlex.split() In-Reply-To: <1411328149.26.0.00522128245951.issue22454@psf.upfronthosting.co.za> Message-ID: <1567781028.68.0.933694582784.issue22454@roundup.psfhosted.org> Daniel Himmelstein added the comment: I am interested in shlex.join as a way to log subprocess.CompletedProcess.args as a string that users could run in their terminals. I initially assumed that this was also the scope of shlex.join. However, it seems that shlex.join does not accept all types of command arguments supported by subprocess, such as pathlib.Path objects. Should shlex.join support an split_command list that includes pathlib.Path objects and any other types supported by subprocess? ---------- nosy: +dhimmel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 11:42:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Sep 2019 15:42:01 +0000 Subject: [issue15088] PyGen_NeedsFinalizing is public, but undocumented In-Reply-To: <1339906861.99.0.42415214654.issue15088@psf.upfronthosting.co.za> Message-ID: <1567784521.86.0.281609973342.issue15088@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 74b662cf202753d224d82d5503974cce881f7436 by Victor Stinner (Joannah Nanjekye) in branch 'master': bpo-15088 : Remove PyGen_NeedsFinalizing() (GH-15702) https://github.com/python/cpython/commit/74b662cf202753d224d82d5503974cce881f7436 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 11:43:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 06 Sep 2019 15:43:02 +0000 Subject: [issue15088] Remove unused and undocumented PyGen_NeedsFinalizing() function In-Reply-To: <1339906861.99.0.42415214654.issue15088@psf.upfronthosting.co.za> Message-ID: <1567784582.44.0.73854384053.issue15088@roundup.psfhosted.org> STINNER Victor added the comment: I merged Joannah's change: thanks. If anyone uses the removed function, please complain before Python 3.9.0 release :-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed title: PyGen_NeedsFinalizing is public, but undocumented -> Remove unused and undocumented PyGen_NeedsFinalizing() function versions: +Python 3.9 -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 11:57:27 2019 From: report at bugs.python.org (Brandt Bucher) Date: Fri, 06 Sep 2019 15:57:27 +0000 Subject: [issue26868] Document PyModule_AddObject's behavior on error In-Reply-To: <1461735404.8.0.653639688918.issue26868@psf.upfronthosting.co.za> Message-ID: <1567785447.98.0.937144444647.issue26868@roundup.psfhosted.org> Brandt Bucher added the comment: It looks like the idiom of calling PyModule_AddObject without Py_DECREF'ing on the error condition (or even checking for it at all) has spread quite a bit since this first reported. I'm preparing a PR to fix the other call sites. ---------- nosy: +brandtbucher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 12:48:09 2019 From: report at bugs.python.org (Eryk Sun) Date: Fri, 06 Sep 2019 16:48:09 +0000 Subject: [issue37380] subprocess.Popen._cleanup() "The handle is invalid" error when some old process is gone In-Reply-To: <1561315344.64.0.509844893886.issue37380@roundup.psfhosted.org> Message-ID: <1567788489.78.0.949880137652.issue37380@roundup.psfhosted.org> Eryk Sun added the comment: > When a Popen instance is finalized by the garbage collector, the > internal handle is also finalized and closed despite the instance > being put on the active list. This results in _cleanup throwing > because the handle can no longer be used. Thanks. I hadn't considered that. It can lead to unusual behavior like this when __del__ keeps an object alive. The object can't assume that referenced objects haven't already been finalized. All of the subsequently required instance methods should take this into account. For example, Popen._internal_poll could set the return code to -1 if self._handle.closed is true. That's at a higher level, and much more reasonable, than trying to handle ERROR_INVALID_HANDLE, which could mask bugs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 12:51:12 2019 From: report at bugs.python.org (Ilya Valmianski) Date: Fri, 06 Sep 2019 16:51:12 +0000 Subject: [issue38039] Segfault when pickling dictionary with large pandas dataframes In-Reply-To: <1567702116.93.0.155927302531.issue38039@roundup.psfhosted.org> Message-ID: <1567788672.41.0.330896341623.issue38039@roundup.psfhosted.org> Ilya Valmianski added the comment: Below is the code. It segfaults with either dill or pickle on 3.6 and 3.7. with open(output_path,'wb') as fout: dill.dump({ 'timed_dfs' : timed_dfs, #large pandas dataframe with all but one columns being strings, one column is datetime 'notime_dfs' : notime_dfs, #large pandas dataframe with all elements being strings 'control_features' : control_features, #dictionary of lists of 3 element tuples of strings 'config' : config, #small-ish dictionary with ints, strings, and lists of int/str 'version' : __VERSION__ #string }, fout, protocol=4) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 12:53:40 2019 From: report at bugs.python.org (Ilya Valmianski) Date: Fri, 06 Sep 2019 16:53:40 +0000 Subject: [issue38039] Segfault when pickling dictionary with large pandas dataframes In-Reply-To: <1567702116.93.0.155927302531.issue38039@roundup.psfhosted.org> Message-ID: <1567788820.95.0.635001858033.issue38039@roundup.psfhosted.org> Ilya Valmianski added the comment: As a sizing clarification, timed_dfs ~ 150GB, control_features ~30 GB, notime_dfs ~ 2GB. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 13:54:50 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 06 Sep 2019 17:54:50 +0000 Subject: [issue38041] IDLE Shell: Refine restart line In-Reply-To: <1567709534.52.0.152965325603.issue38041@roundup.psfhosted.org> Message-ID: <1567792490.44.0.829811425167.issue38041@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 38da805d563422cf1bb9cd9be24c73806840fe30 by Terry Jan Reedy in branch 'master': bpo-38041: Refine IDLE Shell restart lines. (GH-15709) https://github.com/python/cpython/commit/38da805d563422cf1bb9cd9be24c73806840fe30 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 13:55:07 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 06 Sep 2019 17:55:07 +0000 Subject: [issue38041] IDLE Shell: Refine restart line In-Reply-To: <1567709534.52.0.152965325603.issue38041@roundup.psfhosted.org> Message-ID: <1567792507.57.0.906582062282.issue38041@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15373 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/15719 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 13:55:14 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 06 Sep 2019 17:55:14 +0000 Subject: [issue38041] IDLE Shell: Refine restart line In-Reply-To: <1567709534.52.0.152965325603.issue38041@roundup.psfhosted.org> Message-ID: <1567792514.94.0.48593739202.issue38041@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15374 pull_request: https://github.com/python/cpython/pull/15720 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 14:08:17 2019 From: report at bugs.python.org (Antony Lee) Date: Fri, 06 Sep 2019 18:08:17 +0000 Subject: [issue38045] enum.Flag instance creation is slow In-Reply-To: <1567772280.73.0.782923595007.issue38045@roundup.psfhosted.org> Message-ID: <1567793297.21.0.801692017112.issue38045@roundup.psfhosted.org> Antony Lee added the comment: Actually, microoptimizing _power_of_two is a red herring and the problem is the quadratic complexity of _decompose (_value2member_map_ becomes bigger and bigger at each iteration). Replacing the implementation of _decompose by the following fixes the performance issue (the original snippet executes in ~150ms, which may be even more optimizable but already a 30x improvement :)), and still passes test_enum.py (from cpython 3.7.4): def _decompose(flag, value): """Extract all members from the value.""" # _decompose is only called if the value is not named not_covered = value members = [] for member in flag: member_value = member.value if member_value and member_value & value == member_value: members.append(member) not_covered &= ~member_value if issubclass(flag, IntFlag) and value > 0: while not_covered: new_value = 2 ** _high_bit(not_covered) if new_value not in flag._value2member_map_: # construct singleton pseudo-members pseudo_member = int.__new__(flag, value) pseudo_member._name_ = None pseudo_member._value_ = value flag._value2member_map_.setdefault(value, pseudo_member) members.append(flag(new_value)) not_covered &= ~new_value if not members and value in flag._value2member_map_: members.append(flag._value2member_map_[value]) members.sort(key=lambda m: m._value_, reverse=True) if len(members) > 1 and members[0].value == value: # we have the breakdown, don't need the value member itself members.pop(0) return members, not_covered Checking for issubclass(flag, IntFlag) is a bit ugly but that's because Flag and IntFlag really need two separate implementations of _decompose -- the former wants to error out on uncovered values, the latter should create them on-the-fly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 14:14:59 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 06 Sep 2019 18:14:59 +0000 Subject: [issue38041] IDLE Shell: Refine restart line In-Reply-To: <1567709534.52.0.152965325603.issue38041@roundup.psfhosted.org> Message-ID: <1567793699.03.0.202909086727.issue38041@roundup.psfhosted.org> miss-islington added the comment: New changeset 4009a8522d774c36918005527dfb0975f389c8c2 by Miss Islington (bot) in branch '3.8': bpo-38041: Refine IDLE Shell restart lines. (GH-15709) https://github.com/python/cpython/commit/4009a8522d774c36918005527dfb0975f389c8c2 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 14:19:33 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 06 Sep 2019 18:19:33 +0000 Subject: [issue38041] IDLE Shell: Refine restart line In-Reply-To: <1567709534.52.0.152965325603.issue38041@roundup.psfhosted.org> Message-ID: <1567793973.07.0.363348426854.issue38041@roundup.psfhosted.org> miss-islington added the comment: New changeset 084ba337a93facac4694459b460cf329d58d2b62 by Miss Islington (bot) in branch '3.7': bpo-38041: Refine IDLE Shell restart lines. (GH-15709) https://github.com/python/cpython/commit/084ba337a93facac4694459b460cf329d58d2b62 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 14:56:05 2019 From: report at bugs.python.org (guillard) Date: Fri, 06 Sep 2019 18:56:05 +0000 Subject: [issue38046] JSON sorting type error Message-ID: <1567796165.48.0.695777601425.issue38046@roundup.psfhosted.org> New submission from guillard : If the dict included both str and int keys, sorted returns this error : TypeError: '<' not supported between instances of 'int' and 'str' It is a little bit problematic when used with default library behavior, as jsonify in Flask. possible solution : try: items = sorted(dct.items()) except(TypeError): items = sorted(dct.items(), key=lambda kv: str(kv[0])) ---------- files: json_bug_exemple.py messages: 351268 nosy: yoann934 priority: normal severity: normal status: open title: JSON sorting type error type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48596/json_bug_exemple.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 15:47:23 2019 From: report at bugs.python.org (Nick Timkovich) Date: Fri, 06 Sep 2019 19:47:23 +0000 Subject: [issue38046] JSON sorting type error In-Reply-To: <1567796165.48.0.695777601425.issue38046@roundup.psfhosted.org> Message-ID: <1567799243.24.0.177674633687.issue38046@roundup.psfhosted.org> Nick Timkovich added the comment: It's not clear what you suggest, but it is likely better to alert the user that their keys have mismatched types than to suppress it by default. Perhaps alongside the `sort_keys` argument, you would like a parameter that gets passed into `sorted()` when the items are sorted? Perhaps an additional argument, or if sort_keys is a callable, use that as the `key` argument to sorted? ``` strange = {"1":"one", 2:"ii"} json.dumps(strange, sort_keys=True, key=str) json.dumps(strange, sort_keys=str) # {"1": "one", 2: "ii"} ``` ---------- nosy: +nicktimko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 15:50:14 2019 From: report at bugs.python.org (Nick Timkovich) Date: Fri, 06 Sep 2019 19:50:14 +0000 Subject: [issue38046] Can't use sort_keys in json.dumps with mismatched types In-Reply-To: <1567796165.48.0.695777601425.issue38046@roundup.psfhosted.org> Message-ID: <1567799414.73.0.869421245093.issue38046@roundup.psfhosted.org> Change by Nick Timkovich : ---------- components: +Library (Lib) title: JSON sorting type error -> Can't use sort_keys in json.dumps with mismatched types versions: +Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 16:13:55 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 06 Sep 2019 20:13:55 +0000 Subject: [issue38046] Can't use sort_keys in json.dumps with mismatched types In-Reply-To: <1567796165.48.0.695777601425.issue38046@roundup.psfhosted.org> Message-ID: <1567800835.55.0.463406495408.issue38046@roundup.psfhosted.org> Josh Rosenberg added the comment: This is an exact duplicate of #25457. ---------- nosy: +josh.r resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> json dump fails for mixed-type keys when sort_keys is specified _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 18:01:49 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 06 Sep 2019 22:01:49 +0000 Subject: [issue37992] Change datetime.MINYEAR to allow for negative years In-Reply-To: <1567214511.52.0.325708343044.issue37992@roundup.psfhosted.org> Message-ID: <1567807309.91.0.0982118900001.issue37992@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> rejected stage: -> resolved status: open -> closed versions: +Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 18:07:48 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 06 Sep 2019 22:07:48 +0000 Subject: [issue37995] Multiline ast.dump() In-Reply-To: <1567243768.69.0.362429469264.issue37995@roundup.psfhosted.org> Message-ID: <1567807668.39.0.764900724377.issue37995@roundup.psfhosted.org> Terry J. Reedy added the comment: Much better. I prefer the first version with closers on the last item. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 18:25:19 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 06 Sep 2019 22:25:19 +0000 Subject: [issue38003] Incorrect "fixing" of isinstance tests for basestring In-Reply-To: <1567374009.32.0.247747586449.issue38003@roundup.psfhosted.org> Message-ID: <1567808719.92.0.525659183815.issue38003@roundup.psfhosted.org> Terry J. Reedy added the comment: Bob, this issue tracker is for managing patches to the cpython repository. not for 'help me understand' requests, The latter belong on, for instance, python-list. Unless you have a specific proposal, other than leaving 'basestring' alone(1), that we could reject or accept and implement, please close this(2) as 'not a bug' or whatever. (1) Rejected as leaving code broken for 3.x. (2) Discussion elsewhere *might* result in a concrete suggestion appropriate for this or a new issue. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 18:34:51 2019 From: report at bugs.python.org (Bob Kline) Date: Fri, 06 Sep 2019 22:34:51 +0000 Subject: [issue38003] Incorrect "fixing" of isinstance tests for basestring In-Reply-To: <1567374009.32.0.247747586449.issue38003@roundup.psfhosted.org> Message-ID: <1567809291.65.0.396415489342.issue38003@roundup.psfhosted.org> Bob Kline added the comment: > Unless you have a specific proposal, ... I _do_ have a specific proposal: replace `basestring` with `(str, bytes)`, which preserves the behavior of the original code. So, if isinstance(value, basestring) becomes if isinstance(value, (str, bytes)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 20:00:04 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 07 Sep 2019 00:00:04 +0000 Subject: [issue38005] Coercing strings and non-integer numbers to interpreter ID and channel ID In-Reply-To: <1567415474.91.0.412541266394.issue38005@roundup.psfhosted.org> Message-ID: <1567814404.4.0.245570575061.issue38005@roundup.psfhosted.org> Terry J. Reedy added the comment: Regardless of the intention of the _xx... author, intransitive equality is objectionable as it violates the assumption of sets and dicts. We went through this before with decimal.Decimal when the original implementation had 1.0 == 1 == Decimal(1) but 1.0 != Decimal(1). The latter was fixed. Here, I think the fix should be to not make the id be equal to everything it can be derived from. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 20:11:29 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 07 Sep 2019 00:11:29 +0000 Subject: [issue38007] Regression: name of PyType_Spec::slots conflicts with Qt macro In-Reply-To: <1567419827.68.0.665093966998.issue38007@roundup.psfhosted.org> Message-ID: <1567815089.88.0.643986376983.issue38007@roundup.psfhosted.org> Terry J. Reedy added the comment: My initial thought is similar to that of Michael Hudson in msg23757, that Python should not be hostage to foreign code processors. I also note that the 2010 patch is by Martin Loewis, who was part of the 2006 discussion, and that the 2010 patch was about the stable public ABI, which should not be changed. But I am not familiar with C details at all. ---------- nosy: +terry.reedy, vstinner versions: -Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 20:29:31 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 07 Sep 2019 00:29:31 +0000 Subject: [issue38040] Typo: "Writeable" Should be "Writable" in IO Library Documentation In-Reply-To: <1567707776.67.0.386340687421.issue38040@roundup.psfhosted.org> Message-ID: <1567816171.56.0.383736833325.issue38040@roundup.psfhosted.org> Terry J. Reedy added the comment: Wiktionary and dictionary.com see 'writeable' as an alternate spelling of 'writable', while merriam-webster.com does not. Neither of the former say anything about American versus British usage. I wonder if the first two are rubber-stamping what used to be a misspelling. Or maybe the unabridged merriam-webster behind a paywall has it as a rare variant (but if so, I would expect mention in the 'writable' entry. If it is British, it should be changed. If it is misleading, ditto. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 22:05:23 2019 From: report at bugs.python.org (Haibo Huang) Date: Sat, 07 Sep 2019 02:05:23 +0000 Subject: [issue38047] multiarch headers are added when cross compiling Message-ID: <1567821923.97.0.672604626109.issue38047@roundup.psfhosted.org> Change by Haibo Huang : ---------- components: Cross-Build nosy: Alex.Willmer, hhb priority: normal pull_requests: 15375 severity: normal status: open title: multiarch headers are added when cross compiling versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 22:56:40 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Sat, 07 Sep 2019 02:56:40 +0000 Subject: [issue38003] Incorrect "fixing" of isinstance tests for basestring In-Reply-To: <1567374009.32.0.247747586449.issue38003@roundup.psfhosted.org> Message-ID: <1567825000.04.0.340682620702.issue38003@roundup.psfhosted.org> Josh Rosenberg added the comment: basestring in Python 2 means "thing that is logically text", because in Python 2, str can mean *either* logical text *or* binary data, and unicode is always logical text. str and unicode can kinda sorta interoperate on Python 2, so it can make sense to test for basestring if you're planning to use it as logical text; if you do 'foo' + u'bar', that's fine in Python 2. In Python 3, only str is logically text; b'foo' + 'bar' is completely illegal, so it doesn't make sense to convert it to recognize both bytes and str. Your problem is that you're using basestring incorrectly in Python 2, and it happens to work only because Python 2 did a bad job of separating text and binary data. Your original example code should actually have been written in Python 2 as: if isinstance(value, bytes): # bytes is an alias of str, and only str, on 2.7 value = value.decode(encoding) elif not isinstance(value, unicode): some other code which 2to3 would convert correctly (changing unicode to str, and leaving everything else untouched) because you actually tested what you meant to test to control the actions taken: 1. If it was binary data (which you interpret all Py2 strs to be), then it is decoded to text (Py2 unicode/Py3 str) 2. If it wasn't binary data and it wasn't text, you did something else Point is, the converter is doing the right thing. You misunderstood the logical meaning of basestring, and wrote code that depended on your misinterpretation, that's all. Your try/except to try to detect Python 3-ness was doomed from the start; you referenced basestring, and 2to3 (reasonably) converts that to str, which breaks your logic. You wrote cross-version code that can't be 2to3-ed because it's *already* Python 3 code; Python 3 code should never be subjected to 2to3, because it'll do dumb things (e.g. change print(1, 2) to print((1, 2))); it's 2to3, not 2or3to3 after all. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 23:05:12 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 07 Sep 2019 03:05:12 +0000 Subject: [issue38003] Change 2to3 to replace 'basestring' with '(str,bytes)' In-Reply-To: <1567374009.32.0.247747586449.issue38003@roundup.psfhosted.org> Message-ID: <1567825512.7.0.41721558858.issue38003@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +benjamin.peterson title: Incorrect "fixing" of isinstance tests for basestring -> Change 2to3 to replace 'basestring' with '(str,bytes)' versions: +Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 23:57:06 2019 From: report at bugs.python.org (Ma Lin) Date: Sat, 07 Sep 2019 03:57:06 +0000 Subject: [issue38015] inline function generates slightly inefficient machine code In-Reply-To: <1567483364.75.0.314519224234.issue38015@roundup.psfhosted.org> Message-ID: <1567828626.11.0.430162522253.issue38015@roundup.psfhosted.org> Ma Lin added the comment: This range has not been changed since "preallocated small integer pool" was introduced: #define NSMALLPOSINTS 257 #define NSMALLNEGINTS 5 The commit (Jan 2007): https://github.com/python/cpython/commit/ddefaf31b366ea84250fc5090837c2b764a04102 Is it worth increase the range? FYI, build with MSVC 2017, the `small_ints` size: 32-bit build: sizeof(PyLongObject) 16 bytes sizeof(small_ints) 4192 bytes 64-bit build: sizeof(PyLongObject) 32 bytes sizeof(small_ints) 8384 bytes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 6 23:59:37 2019 From: report at bugs.python.org (Ma Lin) Date: Sat, 07 Sep 2019 03:59:37 +0000 Subject: [issue38037] reference counter issue in signal module In-Reply-To: <1567682048.52.0.677025547591.issue38037@roundup.psfhosted.org> Message-ID: <1567828777.56.0.357469915724.issue38037@roundup.psfhosted.org> Change by Ma Lin : ---------- title: Assertion failed: object has negative ref count -> reference counter issue in signal module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 00:11:20 2019 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 07 Sep 2019 04:11:20 +0000 Subject: [issue15382] os.utime() mishandles some arguments In-Reply-To: <1342558958.87.0.656849983066.issue15382@psf.upfronthosting.co.za> Message-ID: <1567829480.51.0.0495017900816.issue15382@roundup.psfhosted.org> Dong-hee Na added the comment: @vstinner This issue is not solved yet. Can I finalize this issue? ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 01:21:03 2019 From: report at bugs.python.org (Tim Peters) Date: Sat, 07 Sep 2019 05:21:03 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567833663.74.0.885086683398.issue24416@roundup.psfhosted.org> Tim Peters added the comment: I favor making this a structseq, primarily based on Paul's attempt to find actual use cases, which showed that named member access would be most useful most often. I have no intuition for that myself, because while I wrote the original functions here, I've never used them and never will ;-) But if I ever did, I'd probably want the ISO week number, and would appreciate not having to remember which meaningless index means "week". Don't care about moving pickles to older versions. Don't care about the putative speed hit - it's still measured in nanoseconds, so can still create over a million per second. In apps with a large number of dates, they're typically not _calculated_, but read up from a relatively snail-like database or network connection. I doubt anyone would notice if `.isocalendar()` got 10x slower. Note: I'm unassigning myself, because I have nothing else to say :-) ---------- assignee: tim.peters -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 01:24:08 2019 From: report at bugs.python.org (Larry Hastings) Date: Sat, 07 Sep 2019 05:24:08 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1567833848.21.0.847863970353.issue34155@roundup.psfhosted.org> Larry Hastings added the comment: New changeset 063eba280a11d3c9a5dd9ee5abe4de640907951b by larryhastings (Abhilash Raj) in branch '3.5': [3.5] bpo-34155: Dont parse domains containing @ (GH-13079) (#15317) https://github.com/python/cpython/commit/063eba280a11d3c9a5dd9ee5abe4de640907951b ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 01:33:00 2019 From: report at bugs.python.org (Netzeband) Date: Sat, 07 Sep 2019 05:33:00 +0000 Subject: [issue37835] typing.get_type_hints wrong namespace for forward-declaration of inner class In-Reply-To: <1565689003.91.0.0312877377737.issue37835@roundup.psfhosted.org> Message-ID: <1567834380.67.0.506044685974.issue37835@roundup.psfhosted.org> Netzeband added the comment: Thanks for your explanations. It sounds, that there is no way to fix this issue officially. Only the meta-class workaround is left, which is - as you highlight - really just a workaround. I anyway always wonder, why functions, which are methods, do not hold a reference to the class, which they belong to. It could help here and second, this would be a good way to differentiate if a function object is a method or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 01:39:24 2019 From: report at bugs.python.org (Larry Hastings) Date: Sat, 07 Sep 2019 05:39:24 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1567834764.99.0.614546454006.issue34155@roundup.psfhosted.org> Larry Hastings added the comment: All PRs merged. Thanks, everybody! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 02:06:32 2019 From: report at bugs.python.org (Larry Hastings) Date: Sat, 07 Sep 2019 06:06:32 +0000 Subject: [issue36576] Some test_ssl and test_asyncio tests fail with OpenSSL 1.1.1 on Python 3.4 and 3.5 In-Reply-To: <1554820906.29.0.786226900608.issue36576@roundup.psfhosted.org> Message-ID: <1567836392.65.0.0504364597641.issue36576@roundup.psfhosted.org> Larry Hastings added the comment: New changeset 4d1c2541c125fe9d211016193ebfd5899a8511aa by larryhastings (Victor Stinner) in branch '3.5': bpo-36576: Skip test_ssl and test_asyncio tests failing with OpenSSL 1.1.1 (#12694) https://github.com/python/cpython/commit/4d1c2541c125fe9d211016193ebfd5899a8511aa ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 02:33:27 2019 From: report at bugs.python.org (Larry Hastings) Date: Sat, 07 Sep 2019 06:33:27 +0000 Subject: [issue36742] CVE-2019-10160: urlsplit NFKD normalization vulnerability in user:password@ In-Reply-To: <1556368216.92.0.317568776121.issue36742@roundup.psfhosted.org> Message-ID: <1567838007.52.0.173247149106.issue36742@roundup.psfhosted.org> Larry Hastings added the comment: New changeset 095373c32d16df575ba5fcb5f44bf44119b26193 by larryhastings (Victor Stinner) in branch '3.5': bpo-36742: Corrects fix to handle decomposition in usernames (GH-13812) (GH-13814) (#14772) https://github.com/python/cpython/commit/095373c32d16df575ba5fcb5f44bf44119b26193 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 03:03:08 2019 From: report at bugs.python.org (Gaurav Kumar Pandit) Date: Sat, 07 Sep 2019 07:03:08 +0000 Subject: [issue38048] unususal behavior Message-ID: <1567839788.75.0.725833597762.issue38048@roundup.psfhosted.org> New submission from Gaurav Kumar Pandit : when I run the programme the cursur is blinking and is taking many number of inputs but in the source code I have not written any syntax for taking input ---------- components: Windows files: test.py messages: 351286 nosy: Gaurav Kumar Pandit, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: unususal behavior type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48597/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 03:05:32 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Sep 2019 07:05:32 +0000 Subject: [issue20806] os.times document points to wrong section of non-Linux manual In-Reply-To: <1393590805.13.0.860460942185.issue20806@psf.upfronthosting.co.za> Message-ID: <1567839932.55.0.760262034636.issue20806@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 3ccdbc33385a849c60a268def578cb06b8d41be6 by Serhiy Storchaka (Joannah Nanjekye) in branch 'master': bpo-20806: Reference both times(2) and times(3) and link to MSDN. (GH-15479) https://github.com/python/cpython/commit/3ccdbc33385a849c60a268def578cb06b8d41be6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 03:05:59 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 07 Sep 2019 07:05:59 +0000 Subject: [issue20806] os.times document points to wrong section of non-Linux manual In-Reply-To: <1393590805.13.0.860460942185.issue20806@psf.upfronthosting.co.za> Message-ID: <1567839959.95.0.756631927371.issue20806@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15376 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15722 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 03:06:05 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 07 Sep 2019 07:06:05 +0000 Subject: [issue20806] os.times document points to wrong section of non-Linux manual In-Reply-To: <1393590805.13.0.860460942185.issue20806@psf.upfronthosting.co.za> Message-ID: <1567839965.76.0.157383581078.issue20806@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15377 pull_request: https://github.com/python/cpython/pull/15723 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 03:08:12 2019 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 07 Sep 2019 07:08:12 +0000 Subject: [issue38048] unususal behavior In-Reply-To: <1567839788.75.0.725833597762.issue38048@roundup.psfhosted.org> Message-ID: <1567840092.2.0.702677912757.issue38048@roundup.psfhosted.org> Eric V. Smith added the comment: This forum is for reporting bugs in python, not for getting help with writing python programs. I suggest you ask about this on the python-tutor mailing list: https://mail.python.org/mailman/listinfo/tutor Good luck! ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 03:08:55 2019 From: report at bugs.python.org (Larry Hastings) Date: Sat, 07 Sep 2019 07:08:55 +0000 Subject: [issue37461] email.parser.Parser hang In-Reply-To: <1561951273.26.0.821144691276.issue37461@roundup.psfhosted.org> Message-ID: <1567840135.75.0.776955355891.issue37461@roundup.psfhosted.org> Larry Hastings added the comment: New changeset c28e4a5160d3283b12514c7c28ed6e0a2a52271a by larryhastings (Abhilash Raj) in branch '3.5': [3.5] bpo-37461: Fix infinite loop in parsing of specially crafted email headers (GH-14794) (#15446) https://github.com/python/cpython/commit/c28e4a5160d3283b12514c7c28ed6e0a2a52271a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 03:10:29 2019 From: report at bugs.python.org (Gaurav Kumar Pandit) Date: Sat, 07 Sep 2019 07:10:29 +0000 Subject: [issue38048] unususal behavior In-Reply-To: <1567840092.2.0.702677912757.issue38048@roundup.psfhosted.org> Message-ID: <5d7357e1.1c69fb81.e115.5aa1@mx.google.com> Gaurav Kumar Pandit added the comment: The programme has detected a bug in python .For This reson I am using c++ not python. Useless python!!!! bsdk Sent from Mail for Windows 10 From: Eric V. Smith Sent: 07 September 2019 12:38 PM To: grvkmrpandit at gmail.com Subject: [issue38048] unususal behavior Eric V. Smith added the comment: This forum is for reporting bugs in python, not for getting help with writing python programs. I suggest you ask about this on the python-tutor mailing list: https://mail.python.org/mailman/listinfo/tutor Good luck! ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 03:12:37 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 07 Sep 2019 07:12:37 +0000 Subject: [issue20806] os.times document points to wrong section of non-Linux manual In-Reply-To: <1393590805.13.0.860460942185.issue20806@psf.upfronthosting.co.za> Message-ID: <1567840357.79.0.935422761242.issue20806@roundup.psfhosted.org> miss-islington added the comment: New changeset cc51a6d7c7b6b06fb537860428347d88776d802b by Miss Islington (bot) in branch '3.8': bpo-20806: Reference both times(2) and times(3) and link to MSDN. (GH-15479) https://github.com/python/cpython/commit/cc51a6d7c7b6b06fb537860428347d88776d802b ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 03:16:30 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 07 Sep 2019 07:16:30 +0000 Subject: [issue20806] os.times document points to wrong section of non-Linux manual In-Reply-To: <1393590805.13.0.860460942185.issue20806@psf.upfronthosting.co.za> Message-ID: <1567840590.63.0.729946226779.issue20806@roundup.psfhosted.org> miss-islington added the comment: New changeset a6eac83c1804fd14ed076b1776ffeea8dcb9478a by Miss Islington (bot) in branch '3.7': bpo-20806: Reference both times(2) and times(3) and link to MSDN. (GH-15479) https://github.com/python/cpython/commit/a6eac83c1804fd14ed076b1776ffeea8dcb9478a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 03:39:22 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Sep 2019 07:39:22 +0000 Subject: [issue37937] Mention ``frame.f_trace`` in :func:`sys.settrace` docs. Message-ID: <1567841962.19.0.174314664422.issue37937@roundup.psfhosted.org> New submission from Serhiy Storchaka : AFAIK setting frame.f_trace *instead* of calling sys.settrace() does not work. You need to call sys.settrace() to enable tracing. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 03:50:10 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 07 Sep 2019 07:50:10 +0000 Subject: [issue38048] unususal behavior In-Reply-To: <1567839788.75.0.725833597762.issue38048@roundup.psfhosted.org> Message-ID: <1567842610.02.0.661109853509.issue38048@roundup.psfhosted.org> Steven D'Aprano added the comment: Hi Gaurav, It is very unlikely that you have "discovered a bug in Python". Millions of people use Python every day, and the chances that you will have noticed something that everyone else has missed is tiny. More likely you have misunderstood something. Unfortunately, it is impossible to diagnose your issue with the information you have provided. But my guess is that it has something to do with the terminal or IDE you are using. As Eric said, you should take this question to another forum, explain how you are running your code (in IDLE, Jupyter, the Windows command line, a Linux terminal, an IDE like Spyder, PyCharm, etc...) and see if somebody can either explain what is happening or confirm that it is an actual bug in the interpreter on your system. This is not a help desk or forum, we're not going to diagnose your issue for you, but the Python community is very large and there are plenty of places that will be happy to help. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 03:56:03 2019 From: report at bugs.python.org (Ram Rachum) Date: Sat, 07 Sep 2019 07:56:03 +0000 Subject: [issue37937] Mention ``frame.f_trace`` in :func:`sys.settrace` docs. In-Reply-To: <1567841962.19.0.174314664422.issue37937@roundup.psfhosted.org> Message-ID: <1567842963.31.0.554661186368.issue37937@roundup.psfhosted.org> Ram Rachum added the comment: Serhiy: I confirmed what you're saying and corrected the documentation. Could you please review? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 04:08:31 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Sep 2019 08:08:31 +0000 Subject: [issue20806] os.times document points to wrong section of non-Linux manual In-Reply-To: <1393590805.13.0.860460942185.issue20806@psf.upfronthosting.co.za> Message-ID: <1567843711.96.0.255303483943.issue20806@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8, Python 3.9 -Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 04:57:26 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Sep 2019 08:57:26 +0000 Subject: [issue37995] Multiline ast.dump() In-Reply-To: <1567243768.69.0.362429469264.issue37995@roundup.psfhosted.org> Message-ID: <1567846646.03.0.23546452246.issue37995@roundup.psfhosted.org> Serhiy Storchaka added the comment: > It would be great is the tool wasn't tightly bound to our particular AST and could be used for any hand-rolled AST. I do not think it is possible. Every tree has its specifics: what types of nodes are supported (AST, list and primitive immutable values), what children the node can have (node._fields and node._attributes), how to get a child (getattr(node, name), but can be absent), what is the node name (node.__class__.__name__), how to represent nodes (constructor, list display and literals for primitives), what options are supported (annotate_fields, include_attributes and indent), what nodes are simple and what are complex. All these details are different in every AST implementation. Recursive walking the tree is trivial in general, handling specifics makes every foramating function unique. What was interesting in the first Raymond's implementation, is that some simple nodes are written in one line. Its code can't be used with ast.AST because of different tree structure and different meaning of simple nodes (and also nodes with a single child are very rare), but PR 15631 has been updated to produce more compact output by using other heuristics: >>> print(ast.dump(node, indent=3)) Module( body=[ Expr( value=Call( func=Name(id='spam', ctx=Load()), args=[ Name(id='eggs', ctx=Load()), Constant(value='and cheese', kind=None)], keywords=[]))], type_ignores=[]) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 05:31:33 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Sep 2019 09:31:33 +0000 Subject: [issue38049] Add command-line interface for the ast module Message-ID: <1567848693.22.0.0359513964627.issue38049@roundup.psfhosted.org> New submission from Serhiy Storchaka : The proposed PR adds a simple command-line interface to the ast module, similar to CLI of the tokenize and dis modules. It reads the content of a specified file (or stdin), parses it with ast.parse() and outputs the tree with ast.dump(). It can be used for learning internals of the Python compiler, in addition to tokenize and dis. ---------- components: Library (Lib) messages: 351297 nosy: benjamin.peterson, brett.cannon, rhettinger, serhiy.storchaka, yselivanov priority: normal severity: normal status: open title: Add command-line interface for the ast module type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 05:38:21 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Sep 2019 09:38:21 +0000 Subject: [issue38049] Add command-line interface for the ast module In-Reply-To: <1567848693.22.0.0359513964627.issue38049@roundup.psfhosted.org> Message-ID: <1567849101.32.0.302551681651.issue38049@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +15378 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15724 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 05:38:48 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Sep 2019 09:38:48 +0000 Subject: [issue38049] Add command-line interface for the ast module In-Reply-To: <1567848693.22.0.0359513964627.issue38049@roundup.psfhosted.org> Message-ID: <1567849128.28.0.265568651376.issue38049@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- dependencies: +Multiline ast.dump() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 05:45:24 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Sep 2019 09:45:24 +0000 Subject: [issue15382] os.utime() mishandles some arguments In-Reply-To: <1342558958.87.0.656849983066.issue15382@psf.upfronthosting.co.za> Message-ID: <1567849524.72.0.551400963459.issue15382@roundup.psfhosted.org> Serhiy Storchaka added the comment: The documentation issue was fixed in issue23738. The documentation no longer claims that ns can be None. If specified it must be a tuple of floats. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 05:56:29 2019 From: report at bugs.python.org (Roundup Robot) Date: Sat, 07 Sep 2019 09:56:29 +0000 Subject: [issue38046] Can't use sort_keys in json.dumps with mismatched types In-Reply-To: <1567796165.48.0.695777601425.issue38046@roundup.psfhosted.org> Message-ID: <1567850189.37.0.51793680189.issue38046@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +15379 pull_request: https://github.com/python/cpython/pull/15691 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 06:33:29 2019 From: report at bugs.python.org (Bob Kline) Date: Sat, 07 Sep 2019 10:33:29 +0000 Subject: [issue38003] Change 2to3 to replace 'basestring' with '(str,bytes)' In-Reply-To: <1567374009.32.0.247747586449.issue38003@roundup.psfhosted.org> Message-ID: <1567852409.78.0.681594168123.issue38003@roundup.psfhosted.org> Bob Kline added the comment: OK, I give up. In parting I will point out that the official Python 2 documentation says "basestring() This abstract type is the superclass for str and unicode. It cannot be called or instantiated, but it can be used to test whether an object is an instance of str or unicode. isinstance(obj, basestring) is equivalent to isinstance(obj, (str, unicode))." That's exactly what the code we are converting (much of which was written years before Python 3 even existed) was doing. As for the idea that we weren't really "planning to use it as logical text" (ignoring the fact that _everyone_ used Python 2 str objects to represent logical text back in 2003, and ignoring the fact that the repro case given at the top of this report converts the 8-bit string value to Unicode -- why else would it do that except to use the value as "logical text"?) ... well, I don't know where to start. I'm done here. :->} ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 06:45:58 2019 From: report at bugs.python.org (Sean Frazier) Date: Sat, 07 Sep 2019 10:45:58 +0000 Subject: [issue38050] open('file.txt') path not found Message-ID: <1567853158.61.0.971448699802.issue38050@roundup.psfhosted.org> New submission from Sean Frazier : I am running a problem in 'Think Python' and was having no issues with: fin = open('words.txt') Then when I was working with the reference file, running a function, my IDLE crashed and is no longer able to locate files using [var = open('file.txt')] I have tried opening as 'r' and 'w', with no luck. Also, sometimes I do not get an error, but when I go to read the list, it is empty ''. ---------- components: Windows messages: 351300 nosy: Sean Frazier, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: open('file.txt') path not found type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 07:28:49 2019 From: report at bugs.python.org (Thrlwiti) Date: Sat, 07 Sep 2019 11:28:49 +0000 Subject: [issue32972] unittest.TestCase coroutine support In-Reply-To: <1519843317.02.0.467229070634.issue32972@psf.upfronthosting.co.za> Message-ID: <1567855729.98.0.644597209667.issue32972@roundup.psfhosted.org> Change by Thrlwiti : ---------- nosy: +THRlWiTi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 08:14:37 2019 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 07 Sep 2019 12:14:37 +0000 Subject: [issue38050] open('file.txt') path not found In-Reply-To: <1567853158.61.0.971448699802.issue38050@roundup.psfhosted.org> Message-ID: <1567858477.62.0.369894946439.issue38050@roundup.psfhosted.org> Eric V. Smith added the comment: This is almost certainly not a bug in Python. This forum is for reporting bugs in Python, not for getting help on using Python. I suggest you try the python-tutor mailing list: https://mail.python.org/mailman/listinfo/tutor ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 08:17:42 2019 From: report at bugs.python.org (Sean Frazier) Date: Sat, 07 Sep 2019 12:17:42 +0000 Subject: [issue38050] open('file.txt') path not found In-Reply-To: <1567853158.61.0.971448699802.issue38050@roundup.psfhosted.org> Message-ID: <1567858662.66.0.93887387861.issue38050@roundup.psfhosted.org> Sean Frazier added the comment: If you are running a program and an the program crashes, then doesn't work properly afterward, what would you call that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 08:30:04 2019 From: report at bugs.python.org (Ryan Hiebert) Date: Sat, 07 Sep 2019 12:30:04 +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: <1567859404.13.0.263371458466.issue29988@roundup.psfhosted.org> Change by Ryan Hiebert : ---------- nosy: +ryanhiebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 08:32:21 2019 From: report at bugs.python.org (Ryan Hiebert) Date: Sat, 07 Sep 2019 12:32:21 +0000 Subject: [issue31387] asyncio should make it easy to enable cooperative SIGINT handling In-Reply-To: <1504813050.77.0.505378891387.issue31387@psf.upfronthosting.co.za> Message-ID: <1567859541.5.0.963721638621.issue31387@roundup.psfhosted.org> Change by Ryan Hiebert : ---------- nosy: +ryanhiebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 11:52:11 2019 From: report at bugs.python.org (Brandt Bucher) Date: Sat, 07 Sep 2019 15:52:11 +0000 Subject: [issue26868] Document PyModule_AddObject's behavior on error In-Reply-To: <1461735404.8.0.653639688918.issue26868@psf.upfronthosting.co.za> Message-ID: <1567871531.68.0.98261233235.issue26868@roundup.psfhosted.org> Change by Brandt Bucher : ---------- pull_requests: +15380 pull_request: https://github.com/python/cpython/pull/15725 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 12:11:15 2019 From: report at bugs.python.org (Steve Dower) Date: Sat, 07 Sep 2019 16:11:15 +0000 Subject: [issue38050] open('file.txt') path not found In-Reply-To: <1567853158.61.0.971448699802.issue38050@roundup.psfhosted.org> Message-ID: <1567872675.32.0.518386968425.issue38050@roundup.psfhosted.org> Steve Dower added the comment: Potentially an IDLE issue, if valid but incorrect code is causing it to break. Sean, we'll need you to provide step-by-step instructions (including copies of any files you are using) to see the problem ourselves, otherwise there's no way we can help. Please also include the full text of any error messages you receive. Without the error text (not just "I got an error"), we have no idea what could be going wrong. ---------- assignee: -> terry.reedy components: +IDLE -Windows nosy: +terry.reedy stage: resolved -> test needed status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 12:24:36 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 07 Sep 2019 16:24:36 +0000 Subject: [issue38003] Change 2to3 to replace 'basestring' with '(str,bytes)' In-Reply-To: <1567374009.32.0.247747586449.issue38003@roundup.psfhosted.org> Message-ID: <1567873476.58.0.800802537631.issue38003@roundup.psfhosted.org> Benjamin Peterson added the comment: Even at this late stage, we could really change 2to3's behavior here. Presumably many others are relying on the current behavior. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 12:24:54 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 07 Sep 2019 16:24:54 +0000 Subject: [issue38003] Change 2to3 to replace 'basestring' with '(str,bytes)' In-Reply-To: <1567374009.32.0.247747586449.issue38003@roundup.psfhosted.org> Message-ID: <1567873494.85.0.423189375966.issue38003@roundup.psfhosted.org> Benjamin Peterson added the comment: meant to say "really couldn't" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 13:07:19 2019 From: report at bugs.python.org (Justin Arthur) Date: Sat, 07 Sep 2019 17:07:19 +0000 Subject: [issue12731] python lib re uses obsolete sense of \w in full violation of UTS#18 RL1.2a In-Reply-To: <1313090311.62.0.0473644856742.issue12731@psf.upfronthosting.co.za> Message-ID: <1567876039.4.0.347728891057.issue12731@roundup.psfhosted.org> Change by Justin Arthur : ---------- nosy: +JustinTArthur _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 13:30:09 2019 From: report at bugs.python.org (John Daily) Date: Sat, 07 Sep 2019 17:30:09 +0000 Subject: [issue38051] time.strftime handling %z/%Z badly Message-ID: <1567877409.54.0.490954987769.issue38051@roundup.psfhosted.org> New submission from John Daily : My apologies if this is a duplicate; there are more than a few bug reports on time and strftime, but I wasn't able to locate any reporting this specifically. I'd be happy to do more in-depth tests with some guidance. I see that this is largely the responsibility of system libraries, but it seems likely that Python is doing something incorrectly when invoking them since the behavior is broken in both Mac and Windows. On both my personal Mac laptop and work Windows laptop, time.strftime('%z') gives the wrong output. On Windows, '%Z' also fails. I'm currently at -0400 (EDT) and my best guess is that because the tm_isdst flag is set to false, it's interpreting my Eastern time zone as it would be when we're no longer on DST. Technically displaying "UTC" is also a bug, since the actual time zone is "GMT". Python 3.6 on my Amazon Linux instance handles everything correctly. Mac, 3.7.3: >>> epoch = int(datetime.datetime.now().timestamp()) >>> epoch 1567872682 >>> gmt = time.gmtime(epoch) >>> gmt.tm_zone 'UTC' >>> time.strftime('%Z', gmt) 'UTC' >>> time.strftime('%z', gmt) '-0500' Python 3.7.1, Windows 7 >>> gmt.tm_zone 'UTC' >>> time.strftime('%Z', gmt) 'Eastern Standard Time' >>> time.strftime('%z', gmt) '-0500' Python 3.6.8, Amazon Linux >>> epoch = int(datetime.datetime.now().timestamp()) >>> gmt = time.gmtime(epoch) >>> gmt.tm_zone 'GMT' >>> time.strftime('%Z', gmt) 'GMT' >>> time.strftime('%z', gmt) '+0000' ---------- messages: 351306 nosy: macintux priority: normal severity: normal status: open title: time.strftime handling %z/%Z badly versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 13:50:19 2019 From: report at bugs.python.org (Juan Telleria) Date: Sat, 07 Sep 2019 17:50:19 +0000 Subject: [issue38052] Include sspipe Module with Core Python Message-ID: <1567878619.06.0.744538231736.issue38052@roundup.psfhosted.org> New submission from Juan Telleria : Could sspipe be included as a Core Python module? https://sspipe.github.io/ https://github.com/sspipe/sspipe https://pypi.org/project/sspipe/ sspipe allows to use syntax such as: from sspipe import p, px import numpy as np import pandas as pd ( np.linspace(0, pi, 100) | p({'x': px, 'y': np.sin(px)}) | p(pd.DataFrame) | px[px.x > px.y].head() | p(print, "Example 6: pandas and numpy support:\n", px) ) ---------- components: Extension Modules messages: 351307 nosy: Juan Telleria2 priority: normal severity: normal status: open title: Include sspipe Module with Core Python versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 13:52:05 2019 From: report at bugs.python.org (Juan Telleria) Date: Sat, 07 Sep 2019 17:52:05 +0000 Subject: [issue38052] Include sspipe Module with Core Python In-Reply-To: <1567878619.06.0.744538231736.issue38052@roundup.psfhosted.org> Message-ID: <1567878725.86.0.973775787787.issue38052@roundup.psfhosted.org> Change by Juan Telleria : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 14:28:56 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 07 Sep 2019 18:28:56 +0000 Subject: [issue38003] Change 2to3 to replace 'basestring' with '(str,bytes)' In-Reply-To: <1567374009.32.0.247747586449.issue38003@roundup.psfhosted.org> Message-ID: <1567880936.39.0.458960970194.issue38003@roundup.psfhosted.org> Terry J. Reedy added the comment: Replacing 'basestring' with 'str' is not a bug in the behavioral sense because it is intended and documented. https://docs.python.org/3/library/2to3.html#2to3fixer-basestring How the current behavior is correct: 2to3 converts syntactically valid 2.x code to syntactically valid 3.x code. It cannot, however, guarantee semantic correctness. A particular problem is that str is semantically ambiguous in 2.x, as it is used both for (encoded) text and binary data. To resolve the ambiguity, 2.6 introduced 'bytes' as a synonym for 'str'. 2to3 assumes that 'bytes' means binary data, including text that will still be encoded in 3.x, while 'str' means text that is encoded bytes in 2.x but *will be unicode* in 3.x. Hence it changes 'unicode' to unambiguous 'str' and 'basestring' == Union(unicode, str) to Union(str, str) == 'str'. If you fool 2to3 by applying isinstance(value, basestring) to a value that will still be bytes at that point in 3.x, you get a semantic change. Possible fixes: 1. Since you decode value after the check, do it before the check. if isinstance(value, bytes): value = value.decode(encoding) if not isinstance(value, unicode): some other code 2. Replace 'basestring' with '(unicode, basestring)' In both cases, the 'unicode' to 'str' replacement should result in correct 3.x code. 3. Edit Lib/lib2to3/fixes/fix_basestring.py to replace with '(str, bytes)'. This should be straightforward, but ask on python-list if you need help. As for your second example, 2to3 is not meant for 2&3 code using exception tricks and six/future imports. Turning 2&3 code into idiomatic 3-only code is a separate subject. Since other have and will run into the same issues, I intend to post a revised version of the explanation above, with fixes for a revised example, to python-list as "2to3, str, and basestring". Any further discussion should go there. ---------- resolution: rejected -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 15:08:18 2019 From: report at bugs.python.org (Jon Janzen) Date: Sat, 07 Sep 2019 19:08:18 +0000 Subject: [issue38053] Update plistlib documentation Message-ID: <1567883298.21.0.0945741912998.issue38053@roundup.psfhosted.org> New submission from Jon Janzen : * Update "Mac OS X" to "Apple" since plists are used more widely than just macOS * Remove notes about the new API being added in 3.4 since 3.4 is no longer supported * Re-add the UID class documentation (oops, removed in issue36409) ---------- assignee: docs at python components: Documentation messages: 351309 nosy: bigfootjon, docs at python priority: normal pull_requests: 15381 severity: normal status: open title: Update plistlib documentation type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 15:19:31 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Sep 2019 19:19:31 +0000 Subject: [issue38053] Update plistlib documentation In-Reply-To: <1567883298.21.0.0945741912998.issue38053@roundup.psfhosted.org> Message-ID: <1567883971.18.0.263826721778.issue38053@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 15:31:47 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 07 Sep 2019 19:31:47 +0000 Subject: [issue38003] Change 2to3 to replace 'basestring' with '(str,bytes)' In-Reply-To: <1567374009.32.0.247747586449.issue38003@roundup.psfhosted.org> Message-ID: <1567884707.17.0.596744686153.issue38003@roundup.psfhosted.org> Terry J. Reedy added the comment: Replace 2. above with "2. Replace 'basestring' with '(unicode, bytes)'." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 16:54:21 2019 From: report at bugs.python.org (Zachary Ware) Date: Sat, 07 Sep 2019 20:54:21 +0000 Subject: [issue38048] unususal behavior In-Reply-To: <1567839788.75.0.725833597762.issue38048@roundup.psfhosted.org> Message-ID: <1567889661.2.0.704054665857.issue38048@roundup.psfhosted.org> Zachary Ware added the comment: To reiterate, there is no bug in Python here. The code that you attached here has a typo that turns this example into an infinite loop, and the Windows Command Prompt will happily take any input and echo it, even though Python is not actually consuming any of it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 19:19:29 2019 From: report at bugs.python.org (Bill Minasian) Date: Sat, 07 Sep 2019 23:19:29 +0000 Subject: [issue38014] Python 3.7 does not compile In-Reply-To: <1567477987.66.0.578307493025.issue38014@roundup.psfhosted.org> Message-ID: <1567898369.64.0.174561531865.issue38014@roundup.psfhosted.org> Bill Minasian added the comment: Under OSX 10.15 beta and Xcode 11.0 beta the following does not work: ./configure --enable-framework DYLD_FRAMEWORK_PATH=/Users/bill/cpython ./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 /bin/sh: line 1: 78734 Segmentation fault: 11 DYLD_FRAMEWORK_PATH=/Users/bill/cpython ./python.exe -E -S -m sysconfig --generate-posix-vars generate-posix-vars failed The following seems to work: ./configure --disable-framework My guess is that this is an Xcode 11 beta issue. ---------- nosy: +BMinas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 19:54:25 2019 From: report at bugs.python.org (Ma Lin) Date: Sat, 07 Sep 2019 23:54:25 +0000 Subject: [issue26868] Document PyModule_AddObject's behavior on error In-Reply-To: <1461735404.8.0.653639688918.issue26868@psf.upfronthosting.co.za> Message-ID: <1567900465.22.0.0650382939915.issue26868@roundup.psfhosted.org> Change by Ma Lin : ---------- nosy: +Ma Lin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 20:09:32 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 08 Sep 2019 00:09:32 +0000 Subject: [issue38052] Include sspipe Module with Core Python In-Reply-To: <1567878619.06.0.744538231736.issue38052@roundup.psfhosted.org> Message-ID: <1567901372.93.0.504379684674.issue38052@roundup.psfhosted.org> Steven D'Aprano added the comment: Before proposing a third party module for inclusion in the standard library, you should check: - is the module mature and stable? - does it have an FOSS licence compatible with Python, and if not, are the authors willing to re-licence it? - are the authors willing to donate the module to Python? - are the authors happy to change their release schedule to match Python? - are they happy to adhere to Python's policy on backwards compatibility and new functionality? - are you (or the authors) willing to write a PEP proposing to add this module to the standard library? https://www.python.org/dev/peps/ - can you find a Core Developer willing to sponsor this PEP? (You can probably ask on the Python-Dev or Python-Ideas mailing lists, or the Python Discuss, or face-to-face in person at a sprint, etc.) Only after you have done all those things, and got Yes answers to them all, should you propose adding the module. (A single No means there is no chance.) ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 21:41:24 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 08 Sep 2019 01:41:24 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567906884.21.0.551641145497.issue24416@roundup.psfhosted.org> Raymond Hettinger added the comment: [Tim Peters] > I favor making this a structseq If there are no further objections to upgrading isocalendar() to return a structseq, I would like to take the issue back so I can supervise Dong-hee Na writing a patch and then help bring it fruition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 22:01:21 2019 From: report at bugs.python.org (Tim Peters) Date: Sun, 08 Sep 2019 02:01:21 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567908081.62.0.00429796031789.issue24416@roundup.psfhosted.org> Change by Tim Peters : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 7 22:36:31 2019 From: report at bugs.python.org (Roundup Robot) Date: Sun, 08 Sep 2019 02:36:31 +0000 Subject: [issue25457] json dump fails for mixed-type keys when sort_keys is specified In-Reply-To: <1445500861.68.0.856599723102.issue25457@psf.upfronthosting.co.za> Message-ID: <1567910191.63.0.277480336386.issue25457@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +15382 pull_request: https://github.com/python/cpython/pull/15691 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 01:53:17 2019 From: report at bugs.python.org (Ma Lin) Date: Sun, 08 Sep 2019 05:53:17 +0000 Subject: [issue38015] inline function generates slightly inefficient machine code In-Reply-To: <1567483364.75.0.314519224234.issue38015@roundup.psfhosted.org> Message-ID: <1567921997.4.0.851324833966.issue38015@roundup.psfhosted.org> Ma Lin added the comment: > This change produces tiny, but measurable speed-up for handling small ints I didn't get measurable change, I run this command a dozen times and take the best result: D:\dev\cpython\PCbuild\amd64\python.exe -m pyperf timeit -s "from collections import deque; consume = deque(maxlen=0).extend; r = range(256)" "consume(r)" --duplicate=1000 before: Mean +- std dev: 771 ns +- 16 ns after: Mean +- std dev: 770 ns +- 10 ns Environment: 64-bit release build by MSVC 2017 CPU: i3 4160, System: latest Windows 10 64-bit Check the machine code from godbolt.org, x64 MSVC v19.14 only saves one instruction: movsxd rax, ecx x86-64 GCC 9.2 saves two instructions: lea eax, [rdi+5] cdqe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 01:59:21 2019 From: report at bugs.python.org (Sergey Fedoseev) Date: Sun, 08 Sep 2019 05:59:21 +0000 Subject: [issue38015] inline function generates slightly inefficient machine code In-Reply-To: <1567483364.75.0.314519224234.issue38015@roundup.psfhosted.org> Message-ID: <1567922361.33.0.937341924032.issue38015@roundup.psfhosted.org> Sergey Fedoseev added the comment: I use GCC 9.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 03:02:54 2019 From: report at bugs.python.org (Gaurav Kumar Pandit) Date: Sun, 08 Sep 2019 07:02:54 +0000 Subject: [issue38048] unususal behavior In-Reply-To: <1567889661.2.0.704054665857.issue38048@roundup.psfhosted.org> Message-ID: <5d74a79a.1c69fb81.7ddae.d427@mx.google.com> Gaurav Kumar Pandit added the comment: Oh thanks.May I know the typo error Sent from Mail for Windows 10 From: Zachary Ware Sent: 08 September 2019 02:24 AM To: grvkmrpandit at gmail.com Subject: [issue38048] unususal behavior Zachary Ware added the comment: To reiterate, there is no bug in Python here. The code that you attached here has a typo that turns this example into an infinite loop, and the Windows Command Prompt will happily take any input and echo it, even though Python is not actually consuming any of it. ---------- _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 04:54:18 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 08 Sep 2019 08:54:18 +0000 Subject: [issue38038] Remove urllib.parse._splittype from xmlrpc.client In-Reply-To: <1567693191.9.0.654396049137.issue38038@roundup.psfhosted.org> Message-ID: <1567932858.32.0.17829757275.issue38038@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 9c4c459ac66c86a4511c8fec1997e8760e15ec17 by Serhiy Storchaka (Dong-hee Na) in branch 'master': bpo-38038: Remove urllib.parse._splittype from xmlrpc.client. (GH-15703) https://github.com/python/cpython/commit/9c4c459ac66c86a4511c8fec1997e8760e15ec17 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 05:06:09 2019 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 08 Sep 2019 09:06:09 +0000 Subject: [issue38038] Remove urllib.parse._splittype from xmlrpc.client In-Reply-To: <1567693191.9.0.654396049137.issue38038@roundup.psfhosted.org> Message-ID: <1567933569.95.0.843440726995.issue38038@roundup.psfhosted.org> Change by Dong-hee Na : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 05:12:28 2019 From: report at bugs.python.org (hai shi) Date: Sun, 08 Sep 2019 09:12:28 +0000 Subject: [issue38053] Update plistlib documentation In-Reply-To: <1567883298.21.0.0945741912998.issue38053@roundup.psfhosted.org> Message-ID: <1567933948.45.0.171592432653.issue38053@roundup.psfhosted.org> hai shi added the comment: >* Remove notes about the new API being added in 3.4 since 3.4 is no longer supported Related bpo in issue14455 ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 05:14:22 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 08 Sep 2019 09:14:22 +0000 Subject: [issue38007] Regression: name of PyType_Spec::slots conflicts with Qt macro In-Reply-To: <1567419827.68.0.665093966998.issue38007@roundup.psfhosted.org> Message-ID: <1567934062.23.0.690420467479.issue38007@roundup.psfhosted.org> Serhiy Storchaka added the comment: This is a major breaking change. It may need changing the Python version to 4.0. I suggest you to not use global macros without prefixes and undefine the conflicting one before using the Python C API. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 06:16:00 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 08 Sep 2019 10:16:00 +0000 Subject: [issue36946] Possible signed integer overflow in slice handling In-Reply-To: <1558072124.41.0.0531416904304.issue36946@roundup.psfhosted.org> Message-ID: <1567937760.24.0.0415535069493.issue36946@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 3c87a667bb367ace1de6bd1577fdb4f66947da52 by Serhiy Storchaka (HongWeipeng) in branch 'master': bpo-36946:Fix possible signed integer overflow when handling slices. (GH-15639) https://github.com/python/cpython/commit/3c87a667bb367ace1de6bd1577fdb4f66947da52 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 06:16:49 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 08 Sep 2019 10:16:49 +0000 Subject: [issue36946] Possible signed integer overflow in slice handling In-Reply-To: <1558072124.41.0.0531416904304.issue36946@roundup.psfhosted.org> Message-ID: <1567937809.58.0.678176776242.issue36946@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15383 pull_request: https://github.com/python/cpython/pull/15729 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 06:28:04 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 08 Sep 2019 10:28:04 +0000 Subject: [issue38005] Coercing strings and non-integer numbers to interpreter ID and channel ID In-Reply-To: <1567415474.91.0.412541266394.issue38005@roundup.psfhosted.org> Message-ID: <1567938484.86.0.867019188439.issue38005@roundup.psfhosted.org> Serhiy Storchaka added the comment: I have doubts about accepting floats and bytes objects in all function that accept InterpreterID or ChannelID. Is it intentional? There are tests for strings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 06:36:41 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 08 Sep 2019 10:36:41 +0000 Subject: [issue36946] Possible signed integer overflow in slice handling In-Reply-To: <1558072124.41.0.0531416904304.issue36946@roundup.psfhosted.org> Message-ID: <1567939001.37.0.278974560754.issue36946@roundup.psfhosted.org> miss-islington added the comment: New changeset 021e5db20bc19d678a5b94247a5cdcf689eff006 by Miss Islington (bot) in branch '3.7': bpo-36946:Fix possible signed integer overflow when handling slices. (GH-15639) https://github.com/python/cpython/commit/021e5db20bc19d678a5b94247a5cdcf689eff006 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 06:44:15 2019 From: report at bugs.python.org (Alexander Ulyanov) Date: Sun, 08 Sep 2019 10:44:15 +0000 Subject: [issue38054] enhance pdb.set_trace() to run when the specified condition is true Message-ID: <1567939455.37.0.149072874331.issue38054@roundup.psfhosted.org> New submission from Alexander Ulyanov : Through out my experience with python debugger, I often found myself creating if-statements around set_trace() instructions. This patch introduces a key-word argument that allows to pass in a boolean or a condition that evaluates to boolean to control whether pdb.set_trace() command needs to be executed. ---------- messages: 351324 nosy: alex-ulnv priority: normal severity: normal status: open title: enhance pdb.set_trace() to run when the specified condition is true versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 06:54:41 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 08 Sep 2019 10:54:41 +0000 Subject: [issue36946] Possible signed integer overflow in slice handling In-Reply-To: <1558072124.41.0.0531416904304.issue36946@roundup.psfhosted.org> Message-ID: <1567940081.06.0.634027935394.issue36946@roundup.psfhosted.org> Serhiy Storchaka added the comment: Thank you Zackery and HongWeipeng for your contribution! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 07:10:08 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 08 Sep 2019 11:10:08 +0000 Subject: [issue38005] Coercing strings and non-integer numbers to interpreter ID and channel ID In-Reply-To: <1567415474.91.0.412541266394.issue38005@roundup.psfhosted.org> Message-ID: <1567941008.17.0.496556509952.issue38005@roundup.psfhosted.org> Serhiy Storchaka added the comment: There is more serious issue: InterpreterID and ChannelID are declared as int subclasses, but actually they have incompatible structure, so using them as int causes a crash. For example, the following code is crashed: float(int(id)) == id ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 07:10:15 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 08 Sep 2019 11:10:15 +0000 Subject: [issue38005] Coercing strings and non-integer numbers to interpreter ID and channel ID In-Reply-To: <1567415474.91.0.412541266394.issue38005@roundup.psfhosted.org> Message-ID: <1567941015.96.0.166397690721.issue38005@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- type: behavior -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 07:31:01 2019 From: report at bugs.python.org (Alexander Ulyanov) Date: Sun, 08 Sep 2019 11:31:01 +0000 Subject: [issue38054] enhance pdb.set_trace() to run when the specified condition is true In-Reply-To: <1567939455.37.0.149072874331.issue38054@roundup.psfhosted.org> Message-ID: <1567942261.4.0.0843210759829.issue38054@roundup.psfhosted.org> Change by Alexander Ulyanov : ---------- keywords: +patch pull_requests: +15384 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15731 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 07:37:44 2019 From: report at bugs.python.org (Paul Ganssle) Date: Sun, 08 Sep 2019 11:37:44 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567942664.84.0.290669117642.issue24416@roundup.psfhosted.org> Paul Ganssle added the comment: I haven't had time to try this with an optimized build, I have done a few more benchmarks using a standard build, I'm seeing almost a 50% regression on isocalendar() calls, but the picture is a little rosier if you consider the fact that you need to construct a `date` or `datetime` object in the first place and anyone concerned with performance will likely be making exactly one `isocalendar()` call per datetime object. The common case is that they construct the datetime with a datetime literal or something equivalent. The "worst case scenario" is that they construct a single "seed" datetime and then construct many new datetimes with faster operations like adding a timedelta. I have compared the following cases: call only: -s 'import datetime; dt = datetime.datetime(2019, 1, 1)' 'dt.isocalendar()' constructor + call: -s 'import datetime' 'dt = datetime.datetime(2019, 1, 1); dt.isocalendar()' timedelta + call: -s 'import datetime; dt = datetime.datetime(2019, 1, 1); td = timedelta(days=1)' '(dt + td).isocalendar()' The results are summarized below, the most likely real practical impact on performance-sensitive "hot loops" would be a 29% performance regression *if* isocalendar() is the bottleneck: benchmark | master (ns) | PR 15633 (ns) | ? (%) ------------------------------------+---------------+-----------------+---------- call only (datetime) | 349 (?14) | 511 (?22) | 46 constructor + call (datetime) | 989 (?48) | 1130 (?50) | 14 timedelta + call (datetime) | 550 (?14) | 711 (?22) | 29 The numbers for `datetime.date` are basically similar: benchmark | master (ns) | PR 15633 (ns) | ? (%) ------------------------------------+---------------+-----------------+---------- call only (date) | 360 (?18) | 530 (?41) | 47 constructor + call (date) | 824 (?17) | 975 (?29) | 18 timedelta + call (datetime) | 534 (?20) | 685 (?24) | 28 This is a bit disheartening, but I think the fact that these performance sensitive situations are rare and the "grab a single component" use is overwhelmingly the common case, I think it's worth it in the end. If there are significant complaints about the performance regression, we may be able to create a variant method similar to the way that `chain` has `chain.from_iterables`, something like `dt.isocalendar.as_tuple()` for the performance-sensitive folks. That said, that's very YAGNI, we should not do that unless someone comes forward with a real use case that will be adversely affected here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 08:09:01 2019 From: report at bugs.python.org (Ryan Hiebert) Date: Sun, 08 Sep 2019 12:09:01 +0000 Subject: [issue30491] Add a lightweight mechanism for detecting un-awaited coroutine objects In-Reply-To: <1495867380.86.0.533205071954.issue30491@psf.upfronthosting.co.za> Message-ID: <1567944541.48.0.38796021263.issue30491@roundup.psfhosted.org> Change by Ryan Hiebert : ---------- nosy: +ryanhiebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 08:52:00 2019 From: report at bugs.python.org (Alexander Ulyanov) Date: Sun, 08 Sep 2019 12:52:00 +0000 Subject: [issue38054] enhance pdb.set_trace() to run when the specified condition is true In-Reply-To: <1567939455.37.0.149072874331.issue38054@roundup.psfhosted.org> Message-ID: <1567947120.55.0.497318495155.issue38054@roundup.psfhosted.org> Change by Alexander Ulyanov : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 10:06:55 2019 From: report at bugs.python.org (Donny Brown) Date: Sun, 08 Sep 2019 14:06:55 +0000 Subject: [issue38055] Starting multiprocessing.Process causes FileNotFoundError Message-ID: <1567951615.68.0.110531280911.issue38055@roundup.psfhosted.org> New submission from Donny Brown : Starting multiprocessing.Process causes FileNotFoundError in certain case: ``` import multiprocessing as mp import time def demo(f): print(f) def main(): cxt=mp.get_context('spawn') f=cxt.Value('i', 0) p=cxt.Process(target=demo, args=[f]) p.start() return p if __name__ == "__main__": p=main() p.join() ``` In this example, 'f' is supposed to stay in memory since it is referred by p._args. However, starting the process raises FileNotFoundError once there is not explicit reference to the arguments passed to the new process in the original process. ---------- components: Interpreter Core files: test.py messages: 351328 nosy: Donny Brown, davin, pitrou priority: normal severity: normal status: open title: Starting multiprocessing.Process causes FileNotFoundError versions: Python 3.7 Added file: https://bugs.python.org/file48598/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 10:14:30 2019 From: report at bugs.python.org (Ma Lin) Date: Sun, 08 Sep 2019 14:14:30 +0000 Subject: [issue38056] Add examples for common text encoding Error Handlers Message-ID: <1567952070.11.0.225789110598.issue38056@roundup.psfhosted.org> New submission from Ma Lin : Text descriptions about `Error Handlers` are not very friendly to novices. https://docs.python.org/3/library/codecs.html#error-handlers For example: 'xmlcharrefreplace' Replace with the appropriate XML character reference (only for encoding). Implemented in :func:`xmlcharrefreplace_errors`. 'backslashreplace' Replace with backslashed escape sequences. Implemented in :func:`backslashreplace_errors`. 'namereplace' Replace with ``\N{...}`` escape sequences (only for encoding). Implemented in :func:`namereplace_errors`. Novices may not know what these are. Giving some examples may help the reader to understand more intuitively. The effect picture is attached. I picked two characters: ? https://www.compart.com/en/unicode/U+00DF ? https://www.compart.com/en/unicode/U+266C ---------- assignee: docs at python components: Documentation files: effect.png messages: 351329 nosy: Ma Lin, docs at python priority: normal severity: normal status: open title: Add examples for common text encoding Error Handlers versions: Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file48599/effect.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 10:16:34 2019 From: report at bugs.python.org (Ma Lin) Date: Sun, 08 Sep 2019 14:16:34 +0000 Subject: [issue38056] Add examples for common text encoding Error Handlers In-Reply-To: <1567952070.11.0.225789110598.issue38056@roundup.psfhosted.org> Message-ID: <1567952194.35.0.359450196453.issue38056@roundup.psfhosted.org> Change by Ma Lin : ---------- keywords: +patch pull_requests: +15386 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15732 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 10:58:23 2019 From: report at bugs.python.org (Adorilson Bezerra) Date: Sun, 08 Sep 2019 14:58:23 +0000 Subject: [issue38057] Docs: source code don't can be translate Message-ID: <1567954703.31.0.993707976717.issue38057@roundup.psfhosted.org> New submission from Adorilson Bezerra : The source code examples in documentation doesn't can be translated because it doesn't included in po files (and after in transifex). It would be wonderful if we can to translate the code: class MyClass: """A simple example class""" i = 12345 def f(self): return 'hello world' to: class MinhaClasse: """Um exemplo simples de classe""" i = 12345 def f(self): return 'ol?, mundo' ---------- assignee: docs at python components: Documentation messages: 351330 nosy: adorilson, docs at python priority: normal severity: normal status: open title: Docs: source code don't can be translate type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 12:13:34 2019 From: report at bugs.python.org (Kevin) Date: Sun, 08 Sep 2019 16:13:34 +0000 Subject: [issue38058] Tutorial: 4.2. for Statements Message-ID: <1567959214.96.0.389227588448.issue38058@roundup.psfhosted.org> New submission from Kevin : >>> # Measure some strings: ... words = ['cat', 'window', 'defenestrate'] >>> for w in words: ... print(w, len(w)) ... cat 3 window 6 defenestrate 12 If you need to modify the sequence you are iterating over while inside the loop (for example to duplicate selected items), it is recommended that you first make a copy. Iterating over a sequence does not implicitly make a copy. The slice notation makes this especially convenient: >>>>>> for w in words[:]: # Loop over a slice copy of the entire list. ... if len(w) > 6: ... words.insert(0, w) ... >>> words ['defenestrate', 'cat', 'window', 'defenestrate'] words is a tuple and is immutable ---------- assignee: docs at python components: Documentation messages: 351331 nosy: Derangedn00b, docs at python priority: normal severity: normal status: open title: Tutorial: 4.2. for Statements type: compile error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 12:17:16 2019 From: report at bugs.python.org (Kevin) Date: Sun, 08 Sep 2019 16:17:16 +0000 Subject: [issue38058] Tutorial: 4.2. for Statements In-Reply-To: <1567959214.96.0.389227588448.issue38058@roundup.psfhosted.org> Message-ID: <1567959436.28.0.255766291743.issue38058@roundup.psfhosted.org> Change by Kevin : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 12:34:42 2019 From: report at bugs.python.org (Michael Felt) Date: Sun, 08 Sep 2019 16:34:42 +0000 Subject: [issue38021] pep425 tag for AIX is inadequate In-Reply-To: <1567537368.97.0.869605154196.issue38021@roundup.psfhosted.org> Message-ID: <1567960482.67.0.169437526407.issue38021@roundup.psfhosted.org> Michael Felt added the comment: When testing the PR with --with-pydebug I started getting the following error: root at x066:[/data/prj/python/git/pr-test]./python '-X' 'tracemalloc' -m test test_venv Run tests sequentially 0:00:00 [1/1] test_venv test test_venv failed -- Traceback (most recent call last): File "/data/prj/python/git/pr-test/Lib/test/test_venv.py", line 501, in test_with_pip self.do_test_with_pip(False) File "/data/prj/python/git/pr-test/Lib/test/test_venv.py", line 459, in do_test_with_pip self.assertEqual(err, "") AssertionError: '/data/prj/python/git/pr-test/Lib/_aix_sup[277 chars]t,\n' != '' - /data/prj/python/git/pr-test/Lib/_aix_support.py:47: ResourceWarning: unclosed file <_io.TextIOWrapper name=4 encoding='ISO8859-1'> - return aix_pep425() - Object allocated at (most recent call last): - File "/data/prj/python/git/pr-test/Lib/subprocess.py", lineno 837 - self.stdout = io.TextIOWrapper(self.stdout, test_venv failed in 34 sec 401 ms == Tests result: FAILURE == 1 test failed: test_venv Total duration: 34 sec 485 ms Tests result: FAILURE +++ capturing some debug output: root at x066:[/data/prj/python/git/pr-test]cat /tmp/test_venv.debug env:/tmp/tmppcl06489/bin/python '-X', 'tracemalloc', '-W', 'ignore::DeprecationWarning', '-I', -m pip --version err:/data/prj/python/git/pr-test/Lib/_aix_support.py:47: ResourceWarning: unclosed file <_io.TextIOWrapper name=4 encoding='ISO8859-1'> return aix_pep425() Object allocated at (most recent call last): File "/data/prj/python/git/pr-test/Lib/subprocess.py", lineno 837 self.stdout = io.TextIOWrapper(self.stdout, out:pip 19.2.1 from /tmp/tmppcl06489/lib/python3.9/site-packages/pip (python 3.9) +++ I thought - p = Popen(....) .... p.wait() that the call p.wait() was waiting for the process to complete (and close files). Apparently, that is not the case. Note: changing p.wait() to p.wait is not the solution: the message changes to: AssertionError: '/data/prj/python/git/pr-test/Lib/subproce[609 chars]t,\n' != '' - /data/prj/python/git/pr-test/Lib/subprocess.py:933: ResourceWarning: subprocess 11337774 is still running - _warn("subprocess %s is still running" % self.pid, - Object allocated at (most recent call last): - File "/data/prj/python/git/pr-test/Lib/_aix_support.py", lineno 35 - p = Popen(["/usr/bin/lslpp", "-Lqc", "bos.mp64"], - /data/prj/python/git/pr-test/Lib/_aix_support.py:47: ResourceWarning: unclosed file <_io.TextIOWrapper name=4 encoding='ISO8859-1'> - return aix_pep425() - Object allocated at (most recent call last): - File "/data/prj/python/git/pr-test/Lib/subprocess.py", lineno 837 - self.stdout = io.TextIOWrapper(self.stdout, root at x066:[/data/prj/python/git/pr-test]cat /tmp/test_venv.debug env:/tmp/tmp8wpnz193/bin/python '-X', 'tracemalloc', '-W', 'ignore::DeprecationWarning', '-I', -m pip --version err:/data/prj/python/git/pr-test/Lib/subprocess.py:933: ResourceWarning: subprocess 11337774 is still running _warn("subprocess %s is still running" % self.pid, Object allocated at (most recent call last): File "/data/prj/python/git/pr-test/Lib/_aix_support.py", lineno 35 p = Popen(["/usr/bin/lslpp", "-Lqc", "bos.mp64"], /data/prj/python/git/pr-test/Lib/_aix_support.py:47: ResourceWarning: unclosed file <_io.TextIOWrapper name=4 encoding='ISO8859-1'> return aix_pep425() Object allocated at (most recent call last): File "/data/prj/python/git/pr-test/Lib/subprocess.py", lineno 837 self.stdout = io.TextIOWrapper(self.stdout, out:pip 19.2.1 from /tmp/tmp8wpnz193/lib/python3.9/site-packages/pip (python 3.9) I was able to resolve the issue by changing Popen() to run(): oot at x066:[/data/prj/python/git/pr-test]diff -u /data/prj/python/git/pr-test/Lib/_aix_support.py /tmp/_aix_support.py --- /data/prj/python/git/pr-test/Lib/_aix_support.py 2019-09-08 16:24:51.000000000 +0000 +++ /tmp/_aix_support.py 2019-09-08 16:17:14.000000000 +0000 @@ -1,7 +1,7 @@ """Shared AIX support functions.""" import sys - from subprocess import Popen, PIPE, DEVNULL + from subprocess import run from sysconfig import get_config_var as get_var _is_32bit = sys.maxsize == 2147483647 @@ -32,10 +32,9 @@ The pep425 platform tag for AIX becomes: AIX.VRTL.YYWW.SZ, e.g., AIX.6107.1415.32 """ - p = Popen(["/usr/bin/lslpp", "-Lqc", "bos.mp64"], - universal_newlines=True, stdout=PIPE, stderr=DEVNULL) - _lslppLqc = p.stdout.read().strip().split(":") - p.wait + p = run(["/usr/bin/lslpp", "-Lqc", "bos.mp64"], + capture_output=True, text=True) + _lslppLqc = p.stdout.strip().split(":") (lpp, vrmf, bd) = list(_lslppLqc[index] for index in [0, 2, -1]) assert lpp == "bos.mp64", "%s != %s" % (lpp, "bos.mp64") Don't know if this is a bug in Popen(), or just an error in my use of Popen(). Happy that using run() solves it! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 13:28:53 2019 From: report at bugs.python.org (Ammar Askar) Date: Sun, 08 Sep 2019 17:28:53 +0000 Subject: [issue38057] Docs: source code don't can be translate In-Reply-To: <1567954703.31.0.993707976717.issue38057@roundup.psfhosted.org> Message-ID: <1567963733.08.0.251562953981.issue38057@roundup.psfhosted.org> Ammar Askar added the comment: What version of Sphinx are you using? As far as I know, Sphinx supports internationalization for autodoc, so this should be possible. ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 13:42:23 2019 From: report at bugs.python.org (Adorilson Bezerra) Date: Sun, 08 Sep 2019 17:42:23 +0000 Subject: [issue38057] Docs: source code don't can be translate In-Reply-To: <1567954703.31.0.993707976717.issue38057@roundup.psfhosted.org> Message-ID: <1567964543.1.0.791658435409.issue38057@roundup.psfhosted.org> Adorilson Bezerra added the comment: I'm not using the Sphinx itself. I'm just a translator. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 14:16:47 2019 From: report at bugs.python.org (Paul Ganssle) Date: Sun, 08 Sep 2019 18:16:47 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567966607.65.0.736480634271.issue24416@roundup.psfhosted.org> Paul Ganssle added the comment: I have compiled both versions with optimizations on, looks like the gap gets a bit smaller (percentage-wise) after that: benchmark | master (ns) | PR 15633 (ns) | ? (%) ------------------------------------+---------------+-----------------+---------- call only (datetime) | 73 (?3) | 92.3 (?7) | 26 constructor + call (datetime) | 228 (?9) | 260 (?16) | 14 timedelta + call (datetime) | 108 (?5) | 128 (?9) | 18 If this were something fundamental like a performance regression in building a tuple or constructing a dictionary or something I'd be concerned, but this just reinforces my feeling that, on balance, this is worth it, and that we are probably not going to need a "fast path" version of this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 14:22:30 2019 From: report at bugs.python.org (signing_agreement) Date: Sun, 08 Sep 2019 18:22:30 +0000 Subject: [issue38059] Using sys.exit() over exit() in inspect.py Message-ID: <1567966950.72.0.597820636326.issue38059@roundup.psfhosted.org> New submission from signing_agreement : The change is arguably trivial, but given that this is a code change in a commonly-used module, I was asked to create an issue and a NEWS entry for it. ---------- components: Library (Lib) messages: 351336 nosy: signing_agreement priority: normal pull_requests: 15387 severity: normal status: open title: Using sys.exit() over exit() in inspect.py type: enhancement versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 15:43:37 2019 From: report at bugs.python.org (Juan Telleria) Date: Sun, 08 Sep 2019 19:43:37 +0000 Subject: [issue38052] Include sspipe Module with Core Python In-Reply-To: <1567878619.06.0.744538231736.issue38052@roundup.psfhosted.org> Message-ID: <1567971817.53.0.982480254777.issue38052@roundup.psfhosted.org> Juan Telleria added the comment: There was a positive response from package mantainers for this issue :) See: https://github.com/sspipe/sspipe/issues/4 >> is the module mature and stable? I am using this module in my own projects for a while and it satisfies my own requirements. However, I think if we want to propose it as a PEP, we should plan for a 1.0.0 release with some improvements on the API and documentation and tests. >> does it have an FOSS licence compatible with Python, and if not, are the authors willing to re-licence it? I am willing to re-licence it. >> are the authors willing to donate the module to Python? Yes >> are the authors happy to change their release schedule to match Python? Yes >> are they happy to adhere to Python's policy on backwards compatibility and new functionality? Yes >> are you (or the authors) willing to write a PEP proposing to add this module to the standard library? https://www.python.org/dev/peps/ Yes, with your contribution. >> can you find a Core Developer willing to sponsor this PEP? (You can probably ask on the Python-Dev or Python-Ideas mailing lists, or the Python Discuss, or face-to-face in person at a sprint, etc.) We may try. I will request support for this project in Python-Dev and Pytgon-Ideas during this week by sending an e-mail. Thank you also Steven for your bullet points to complete! Juan ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 15:55:13 2019 From: report at bugs.python.org (sushma) Date: Sun, 08 Sep 2019 19:55:13 +0000 Subject: [issue37970] urllib.parse docstrings incomplete In-Reply-To: <1567009599.74.0.471882594509.issue37970@roundup.psfhosted.org> Message-ID: <1567972513.42.0.178208710211.issue37970@roundup.psfhosted.org> sushma added the comment: got it - thanks for the detailed explanation! I'll go ahead and create a PR soon ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 18:32:33 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 08 Sep 2019 22:32:33 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1567981953.79.0.567127387902.issue24416@roundup.psfhosted.org> Raymond Hettinger added the comment: [Paul Ganssle] > "grab a single component" use is overwhelmingly the common case, > I think it's worth it in the end. Dong-hee Na, you can now go ahead with the patch. The relevant function is date_isocalendar() located in Modules/_datetime.c. Model the structseq code after the PyFloat_GetInfo() function in Objects/floatobject.h. When you have a PR with a doc update and tests, please request my review and I help you wrap it up. Ask questions here if you get stuck. Good luck! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 19:19:00 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 08 Sep 2019 23:19:00 +0000 Subject: [issue36018] Add a Normal Distribution class to the statistics module In-Reply-To: <1550448059.37.0.914986932061.issue36018@roundup.psfhosted.org> Message-ID: <1567984740.35.0.717136645979.issue36018@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +15388 pull_request: https://github.com/python/cpython/pull/15733 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 19:58:06 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 08 Sep 2019 23:58:06 +0000 Subject: [issue36018] Add a Normal Distribution class to the statistics module In-Reply-To: <1550448059.37.0.914986932061.issue36018@roundup.psfhosted.org> Message-ID: <1567987086.44.0.185934140608.issue36018@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 4db25d5c39e369f4b55eab52dc8f87f390233892 by Raymond Hettinger in branch 'master': bpo-36018: Address more reviewer feedback (GH-15733) https://github.com/python/cpython/commit/4db25d5c39e369f4b55eab52dc8f87f390233892 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 20:15:12 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 Sep 2019 00:15:12 +0000 Subject: [issue36018] Add a Normal Distribution class to the statistics module In-Reply-To: <1550448059.37.0.914986932061.issue36018@roundup.psfhosted.org> Message-ID: <1567988112.23.0.472719235948.issue36018@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +15389 pull_request: https://github.com/python/cpython/pull/15734 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 21:40:09 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 Sep 2019 01:40:09 +0000 Subject: [issue36018] Add a Normal Distribution class to the statistics module In-Reply-To: <1550448059.37.0.914986932061.issue36018@roundup.psfhosted.org> Message-ID: <1567993209.23.0.113318019522.issue36018@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset cc1bdf91d53b1a4751be84ef607e24e69a327a9b by Raymond Hettinger in branch '3.8': [3.8] bpo-36018: Address more reviewer feedback (GH-15733) (GH-15734) https://github.com/python/cpython/commit/cc1bdf91d53b1a4751be84ef607e24e69a327a9b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 22:28:58 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Mon, 09 Sep 2019 02:28:58 +0000 Subject: [issue21024] PyTypeObject tp_doc is char* instead of const char* In-Reply-To: <1395483485.81.0.6602220127.issue21024@psf.upfronthosting.co.za> Message-ID: <1567996138.8.0.0143500753732.issue21024@roundup.psfhosted.org> Joannah Nanjekye added the comment: tp_doc is now const char*. So this should be closed. ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 22:51:21 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Mon, 09 Sep 2019 02:51:21 +0000 Subject: [issue27718] help('signal') incomplete (e.g: signal.signal not visible) In-Reply-To: <1470746479.88.0.0919609545752.issue27718@psf.upfronthosting.co.za> Message-ID: <1567997481.77.0.811672040661.issue27718@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 22:52:27 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Mon, 09 Sep 2019 02:52:27 +0000 Subject: [issue16649] Add a PyCF_DISPLAY_EXPRESSION_RESULTS flag In-Reply-To: <1355034868.91.0.795623819186.issue16649@psf.upfronthosting.co.za> Message-ID: <1567997547.64.0.458280694338.issue16649@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 23:20:52 2019 From: report at bugs.python.org (Nick Henderson) Date: Mon, 09 Sep 2019 03:20:52 +0000 Subject: [issue37790] subprocess.Popen() is extremely slow In-Reply-To: <1565210160.36.0.538688157223.issue37790@roundup.psfhosted.org> Message-ID: <1567999252.43.0.647582191193.issue37790@roundup.psfhosted.org> Nick Henderson added the comment: We have recently bumped into a similar problem. Using FreeBSD, subprocess calls were taking more than 10 times the usual time to execute after migrating to python3.6. After some digging, the default for 'close_fds' was changed to 'True'. On linux, this actually made things faster, but for unix, much slower. Passing 'close_fds=False' solved this for us. ---------- nosy: +nickhendo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 23:35:45 2019 From: report at bugs.python.org (Sangeeta M Chauhan) Date: Mon, 09 Sep 2019 03:35:45 +0000 Subject: [issue38060] precedence (relational, logical operator)not working with single value Message-ID: <1568000145.4.0.491367390087.issue38060@roundup.psfhosted.org> New submission from Sangeeta M Chauhan : precendence betweeen relational and logical operators not working properly if expression contains single values instead of sub expressions. . Please see attached file ---------- components: Interpreter Core files: pythonBug.py messages: 351344 nosy: sangeetamchauhan priority: normal severity: normal status: open title: precedence (relational,logical operator)not working with single value type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file48600/pythonBug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 8 23:55:13 2019 From: report at bugs.python.org (Tim Peters) Date: Mon, 09 Sep 2019 03:55:13 +0000 Subject: [issue38060] precedence (relational, logical operator)not working with single value In-Reply-To: <1568000145.4.0.491367390087.issue38060@roundup.psfhosted.org> Message-ID: <1568001313.18.0.812181700112.issue38060@roundup.psfhosted.org> Tim Peters added the comment: It's working fine. What do you expect? For example, 9 or 7 > "str" groups as 9 or (7 > "str") 9 is evaluated for "truthiness" first, and since it's not 0 it's considered to be true. That's enough to determine the result of "or", so (7 > "str") isn't evaluated at all. 9 is the result. This is all working as designed and as documented, so I'm closing this report. ---------- nosy: +tim.peters resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 00:26:15 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 09 Sep 2019 04:26:15 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1568003175.97.0.303181255044.issue34037@roundup.psfhosted.org> Change by Kyle Stanley : ---------- pull_requests: +15390 pull_request: https://github.com/python/cpython/pull/15735 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 00:28:53 2019 From: report at bugs.python.org (Sangeeta M Chauhan) Date: Mon, 09 Sep 2019 04:28:53 +0000 Subject: [issue38060] precedence (relational, logical operator)not working with single value In-Reply-To: <1568001313.18.0.812181700112.issue38060@roundup.psfhosted.org> Message-ID: Sangeeta M Chauhan added the comment: i am not satisfied ..with your answer . as in the following expression 9 or 7 > "str" precedence must be given to relational operator . why is is executing logical operator first?????????????? if we write 4>9 or 7> "str" it works correct but if we replace first condition(4>9) with a numeric value it is not giving correct output On Mon, Sep 9, 2019 at 9:25 AM Tim Peters wrote: > > Tim Peters added the comment: > > It's working fine. What do you expect? For example, > > 9 or 7 > "str" > > groups as > > 9 or (7 > "str") > > 9 is evaluated for "truthiness" first, and since it's not 0 it's > considered to be true. That's enough to determine the result of "or", so > (7 > "str") isn't evaluated at all. 9 is the result. > > This is all working as designed and as documented, so I'm closing this > report. > > ---------- > nosy: +tim.peters > resolution: -> not a bug > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- title: precedence (relational,logical operator)not working with single value -> precedence (relational, logical operator)not working with single value _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 00:47:48 2019 From: report at bugs.python.org (Tim Peters) Date: Mon, 09 Sep 2019 04:47:48 +0000 Subject: [issue38060] precedence (relational, logical operator)not working with single value In-Reply-To: <1568000145.4.0.491367390087.issue38060@roundup.psfhosted.org> Message-ID: <1568004468.71.0.362903428178.issue38060@roundup.psfhosted.org> Tim Peters added the comment: I'm sorry you're not satisfied with the answer, but I'm a bona fide expert on this and you're not going to get anyone to agree with your confusion here ;-) But the bug tracker is not the right place for tutorials. Please take this up on, e.g., the Python mailing list instead. There is no bug here. One hint: in EXPR1 or EXPR2 bool(EXPR1) is _always_ evaluated first. It makes no difference at all to this whether EXPR1 is "x < y" or "1 + 2 + 3" or "9". Trying to make a special case out of "a numerical value" is entirely in your own head: the language does nothing of the sort. 9 or (ANYTHING_AT_ALL) always results in 9, for the same reason 4+5 or (ANYTHING_AT_ALL) always results in 9. Whether the left-hand expression evaluating to 9 is a literal or a complex expression is irrelevant. In the same way, e.g., x = 9 and x = 4+6 both bind x to 9. A numeric literal is just as much "an expression" as any other kind of expression. "Single value" has nothing to do with this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 01:41:42 2019 From: report at bugs.python.org (Greg Price) Date: Mon, 09 Sep 2019 05:41:42 +0000 Subject: [issue38015] inline function generates slightly inefficient machine code In-Reply-To: <1567483364.75.0.314519224234.issue38015@roundup.psfhosted.org> Message-ID: <1568007702.31.0.782792657638.issue38015@roundup.psfhosted.org> Greg Price added the comment: (Just to help keep discussions together: some earlier discussion was on GH-15216 .) Because is_small_int / IS_SMALL_INT is so small, there's not much cost in the source code to making it a macro (as GH-15710 did). But I think it'd be a mistake to go a lot farther than that and convert significantly larger chunks of code like get_small_int to macros (as GH-15718 would), unless the payoff were really commensurate. It'd be better to focus optimization efforts where profiling shows a lot of time is really being spent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 01:50:36 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 09 Sep 2019 05:50:36 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1568008236.97.0.98587964353.issue34037@roundup.psfhosted.org> Kyle Stanley added the comment: I've opened PR-15735 which applies the same functionality as Victor's PR-13786, but adds the public getter and setter methods (for both AbstractEventLoop and BaseEventLoop) as requested by Andrew. Since this is still causing intermittent CI failures from test_asyncio, I think it's important to implement these changes in some form in the near future. ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 02:39:07 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Sep 2019 06:39:07 +0000 Subject: [issue21024] PyTypeObject tp_doc is char* instead of const char* In-Reply-To: <1395483485.81.0.6602220127.issue21024@psf.upfronthosting.co.za> Message-ID: <1568011147.59.0.738434025488.issue21024@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 03:25:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 07:25:36 +0000 Subject: [issue38061] FreeBSD: Optimize subprocess.Popen(close_fds=True) using closefrom() Message-ID: <1568013936.15.0.668992536534.issue38061@roundup.psfhosted.org> New submission from STINNER Victor : The default value of subprocess.Popen "close_fds" parameter changed to True in Python 3. Compared to Python 2, close_fds=True can make Popen 10x slower: see bpo-37790. A single close(fd) syscall is cheap. But when MAXFDS (maximum file descriptor number) is high, the loop calling close(fd) on each file descriptor can take several milliseconds. On FreeBSD, the _posixsubprocess could use closefrom() to reduce the number of syscalls. On Linux, _posixsubprocess lists the content of /proc/self/fd/ to only close open file descriptor, after fork() and before exec(). ---------- components: Library (Lib) messages: 351351 nosy: vstinner priority: normal severity: normal status: open title: FreeBSD: Optimize subprocess.Popen(close_fds=True) using closefrom() type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 03:26:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 07:26:12 +0000 Subject: [issue37790] subprocess.Popen() is extremely slow In-Reply-To: <1565210160.36.0.538688157223.issue37790@roundup.psfhosted.org> Message-ID: <1568013972.06.0.635887855064.issue37790@roundup.psfhosted.org> STINNER Victor added the comment: I create bpo-38061 "FreeBSD: Optimize subprocess.Popen(close_fds=True) using closefrom()". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 03:28:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 07:28:51 +0000 Subject: [issue38061] FreeBSD: Optimize subprocess.Popen(close_fds=True) using closefrom() In-Reply-To: <1568013936.15.0.668992536534.issue38061@roundup.psfhosted.org> Message-ID: <1568014131.11.0.536494003937.issue38061@roundup.psfhosted.org> STINNER Victor added the comment: A workaround is to use close_fds=False which is only safe if all code used in Python implements the PEP 446. This PEP mentions the FreeBSD issue, mentioning bpo-11284 with MAXFD=655,000: "The operation can be slow if MAXFD is large. For example, on a FreeBSD buildbot with MAXFD=655,000, the operation took 300 ms: see issue #11284: slow close file descriptors." Note: the subprocess module is now able to use posix_spawn() syscall, but it doesn't use it if close_fds=True, so it's outside the scope of this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 03:29:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 07:29:00 +0000 Subject: [issue38061] FreeBSD: Optimize subprocess.Popen(close_fds=True) using closefrom() In-Reply-To: <1568013936.15.0.668992536534.issue38061@roundup.psfhosted.org> Message-ID: <1568014140.91.0.758161555426.issue38061@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 03:29:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 07:29:20 +0000 Subject: [issue13788] os.closerange optimization In-Reply-To: <1326601765.34.0.310008166629.issue13788@psf.upfronthosting.co.za> Message-ID: <1568014160.23.0.252187372288.issue13788@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-38061: "FreeBSD: Optimize subprocess.Popen(close_fds=True) using closefrom()". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 03:31:58 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 07:31:58 +0000 Subject: [issue38061] FreeBSD: Optimize subprocess.Popen(close_fds=True) using closefrom() In-Reply-To: <1568013936.15.0.668992536534.issue38061@roundup.psfhosted.org> Message-ID: <1568014318.85.0.204047696683.issue38061@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-13788: "os.closerange optimization". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 03:32:08 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Sep 2019 07:32:08 +0000 Subject: [issue27898] regexp performance degradation between 2.7.6 and 2.7.12 In-Reply-To: <1472574470.7.0.512575721216.issue27898@psf.upfronthosting.co.za> Message-ID: <1568014328.5.0.427028834541.issue27898@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 03:37:09 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Sep 2019 07:37:09 +0000 Subject: [issue34410] itertools.tee not thread-safe; can segfault interpreter when wrapped iterator releases GIL In-Reply-To: <1534298908.58.0.56676864532.issue34410@psf.upfronthosting.co.za> Message-ID: <1568014629.3.0.515276919557.issue34410@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +15391 pull_request: https://github.com/python/cpython/pull/15736 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 03:41:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 07:41:13 +0000 Subject: [issue38061] FreeBSD: Optimize subprocess.Popen(close_fds=True) using closefrom() In-Reply-To: <1568013936.15.0.668992536534.issue38061@roundup.psfhosted.org> Message-ID: <1568014873.55.0.858123124378.issue38061@roundup.psfhosted.org> STINNER Victor added the comment: > On Linux, _posixsubprocess lists the content of /proc/self/fd/ to only close open file descriptor, after fork() and before exec(). This code is specific to Linux because it uses the SYS_getdents64 syscall. FreeBSD has a similar concept using /dev/fd "file-descriptor file system". See fdescfs manual page: https://www.freebsd.org/cgi/man.cgi?query=fdescfs&sektion=5 I'm not sure how it is supposed to work. When I open a file in Python, I don't see its file descriptor in /dev/fd: vstinner at freebsd$ python3 Python 3.6.9 (default, Aug 8 2019, 01:16:42) >>> import os >>> os.listdir("/dev/fd") ['0', '1', '2'] >>> f=open("/etc/motd") >>> os.listdir("/dev/fd") ['0', '1', '2'] >>> f.fileno() 3 >>> os.set_inheritable(f.fileno(), True) >>> os.listdir("/dev/fd") ['0', '1', '2'] >>> import sys, subprocess >>> rc=subprocess.call([sys.executable, "-c", "import os; print(os.listdir('/dev/fd')); print(os.fstat(3))"], close_fds=False) ['0', '1', '2'] os.stat_result(st_mode=33188, st_ino=321134, st_dev=83, st_nlink=1, st_uid=0, st_gid=0, st_size=899, st_atime=1568014491, st_mtime=1566390614, st_ctime=1566390614) The file descriptor 3 is not listed in /dev/fd/. It is inherited: fstat(3) in a child process doesn't fail and it's not listed in /dev/fd/ in the child process. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 04:16:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 08:16:13 +0000 Subject: [issue38061] FreeBSD: Optimize subprocess.Popen(close_fds=True) using closefrom() In-Reply-To: <1568013936.15.0.668992536534.issue38061@roundup.psfhosted.org> Message-ID: <1568016973.1.0.704428007587.issue38061@roundup.psfhosted.org> STINNER Victor added the comment: Oh, _posixsubprocess uses /dev/fd/ on FreeBSD, but only if it's mounted file system (expected to be fdescfs filesystem): #if defined(__FreeBSD__) || (defined(__APPLE__) && defined(__MACH__)) # define FD_DIR "/dev/fd" #else # define FD_DIR "/proc/self/fd" #endif #if defined(__FreeBSD__) /* When /dev/fd isn't mounted it is often a static directory populated * with 0 1 2 or entries for 0 .. 63 on FreeBSD, NetBSD and OpenBSD. * NetBSD and OpenBSD have a /proc fs available (though not necessarily * mounted) and do not have fdescfs for /dev/fd. MacOS X has a devfs * that properly supports /dev/fd. */ static int _is_fdescfs_mounted_on_dev_fd(void) { struct stat dev_stat; struct stat dev_fd_stat; if (stat("/dev", &dev_stat) != 0) return 0; if (stat(FD_DIR, &dev_fd_stat) != 0) return 0; if (dev_stat.st_dev == dev_fd_stat.st_dev) return 0; /* / == /dev == /dev/fd means it is static. #fail */ return 1; } #endif On my FreeBSD 12 VM, MAXFD is around 230k which is quite large. vstinner at freebsd$ uname -a FreeBSD freebsd 12.0-RELEASE-p10 FreeBSD 12.0-RELEASE-p10 GENERIC amd64 vstinner at freebsd$ ./python Python 3.9.0a0 (heads/master:4db25d5c39, Sep 9 2019, 07:52:01) >>> import os; os.sysconf("SC_OPEN_MAX") 229284 It's easy to measure the overhead of 230k close() syscalls: vstinner at freebsd$ python3 -m pyperf timeit -s 'import subprocess; args=["/usr/bin/true"]' 'subprocess.Popen(args, close_fds=False).wait()' ..................... Mean +- std dev: 1.22 ms +- 0.12 ms vstinner at freebsd$ python3 -m pyperf timeit -s 'import subprocess; args=["/usr/bin/true"]' 'subprocess.Popen(args, close_fds=True).wait()' ..................... Mean +- std dev: 53.3 ms +- 1.4 ms The overhead is 52.08 ms per Popen().wait() call (with close_fds=True). If I mount manually the fdescfs filesystem, suddenly, subprocess is efficient again: vstinner at freebsd$ sudo mount -t fdescfs /dev/fd vstinner at freebsd$ python3 -m pyperf timeit -s 'import subprocess; args=["/usr/bin/true"]' 'subprocess.Popen(args, close_fds=True).wait()' ..................... Mean +- std dev: 1.20 ms +- 0.06 ms close_fds=True becomes as efficient as close_fds=False. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 04:33:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 08:33:37 +0000 Subject: [issue38061] FreeBSD: Optimize subprocess.Popen(close_fds=True) using closefrom() In-Reply-To: <1568013936.15.0.668992536534.issue38061@roundup.psfhosted.org> Message-ID: <1568018017.02.0.0787122527223.issue38061@roundup.psfhosted.org> STINNER Victor added the comment: > FreeBSD has a similar concept using /dev/fd "file-descriptor file system". (...) I'm not sure how it is supposed to work. Sadly, on my FreeBSD VM, it seems like /dev/fd/ is not mounted with fdescfs by default, but as a regular directory with 3 hardcoded files 0, 1 and 2 which are character devices. I had to mount fdescfs filesystem manually at /dev/fd/ :-( $ cat /etc/fstab # Custom /etc/fstab for FreeBSD VM images /dev/gpt/rootfs / ufs rw 1 1 /dev/gpt/swapfs none swap sw 0 0 Maybe it's an issue with "FreeBSD VM images" that I chose. -- The FreeBSD CURRENT buildbot worker mounts /dev/fd: CURRENT-amd64% cat /etc/fstab # Device Mountpoint FStype Options Dump Pass# /dev/da0p2 none swap sw 0 0 /dev/da0p3 / ufs rw 1 1 fdescfs /dev/fd fdescfs rw 0 0 CURRENT-amd64% mount|grep fd fdescfs on /dev/fd (fdescfs) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 04:34:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 08:34:39 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1568018079.78.0.16473752753.issue34037@roundup.psfhosted.org> STINNER Victor added the comment: I change the version to Python 3.9: the 3.8 branch don't accept new features anymore. ---------- versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 04:47:37 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 08:47:37 +0000 Subject: [issue34410] itertools.tee not thread-safe; can segfault interpreter when wrapped iterator releases GIL In-Reply-To: <1534298908.58.0.56676864532.issue34410@psf.upfronthosting.co.za> Message-ID: <1568018857.0.0.328653393742.issue34410@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15392 pull_request: https://github.com/python/cpython/pull/15737 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 04:47:44 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 08:47:44 +0000 Subject: [issue34410] itertools.tee not thread-safe; can segfault interpreter when wrapped iterator releases GIL In-Reply-To: <1534298908.58.0.56676864532.issue34410@psf.upfronthosting.co.za> Message-ID: <1568018864.34.0.0185922965689.issue34410@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15393 pull_request: https://github.com/python/cpython/pull/15738 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 04:47:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 08:47:46 +0000 Subject: [issue38007] Regression: name of PyType_Spec::slots conflicts with Qt macro In-Reply-To: <1567419827.68.0.665093966998.issue38007@roundup.psfhosted.org> Message-ID: <1568018866.86.0.446113421975.issue38007@roundup.psfhosted.org> STINNER Victor added the comment: I don't understand this issue, it mostly contains reference to other bugs. Can someone please try to elaborate the issue? "Regression: name of PyType_Spec::slots conflicts with Qt macro" What is "::slots"? Is it C++ syntax? I don't understand how "slots" name can be an issue: it's not a global variable, but a structure member name. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 04:47:17 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Sep 2019 08:47:17 +0000 Subject: [issue34410] itertools.tee not thread-safe; can segfault interpreter when wrapped iterator releases GIL In-Reply-To: <1534298908.58.0.56676864532.issue34410@psf.upfronthosting.co.za> Message-ID: <1568018837.59.0.650060653396.issue34410@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 526a01467b3277f9fcf7f91e66c23321caa1245d by Serhiy Storchaka in branch 'master': bpo-34410: Fix a crash in the tee iterator when re-enter it. (GH-15625) https://github.com/python/cpython/commit/526a01467b3277f9fcf7f91e66c23321caa1245d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 04:49:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 08:49:52 +0000 Subject: [issue38038] Remove urllib.parse._splittype from xmlrpc.client In-Reply-To: <1567693191.9.0.654396049137.issue38038@roundup.psfhosted.org> Message-ID: <1568018992.47.0.84331985129.issue38038@roundup.psfhosted.org> STINNER Victor added the comment: > Let's remove the deprecated urllib.parse._splituser and urllib.parse._splittype from xmlrpc.client splittype() is deprecated, _splittype() is not deprecated. Should we deprecate _splittype() as well? I don't know the rationale of splittype() deprecation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 04:51:28 2019 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 09 Sep 2019 08:51:28 +0000 Subject: [issue38062] Clarify that atexit.unregister matches by equality, not identity Message-ID: <1568019088.84.0.443323623922.issue38062@roundup.psfhosted.org> New submission from Mark Dickinson : Suppose I have a class that looks like this: class A: def cleanup(self): print("Doing essential cleanup") and on an instance `a = A()`, I do: `atexit.register(a.cleanup)`. Then it's not obvious from the documentation that an `atexit.unregister(a.cleanup)` will successfully undo the effect of the reigster call: the second `a.cleanup` is a different object from the first: >>> a = A() >>> clean1 = a.cleanup >>> clean2 = a.cleanup >>> clean1 is clean2 False Luckily, though the two bound methods are different objects, they're equal: >>> clean1 == clean2 True and from looking at the source, it's apparent that `atexit.unregister` compares by equality rather than identity, so everything works. It would be good to add a sentence to the documentation for `atexit.unregister` to clarify that this can be expected to work. ---------- messages: 351363 nosy: mark.dickinson priority: normal severity: normal status: open title: Clarify that atexit.unregister matches by equality, not identity _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 04:51:53 2019 From: report at bugs.python.org (Riccardo Schirone) Date: Mon, 09 Sep 2019 08:51:53 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1568019112.99.0.00580856430476.issue34155@roundup.psfhosted.org> Riccardo Schirone added the comment: CVE-2019-16056 has been assigned to this issue. See https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-16056 . ---------- nosy: +rschiron _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 04:52:05 2019 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 09 Sep 2019 08:52:05 +0000 Subject: [issue38062] Clarify that atexit.unregister matches by equality, not identity In-Reply-To: <1568019088.84.0.443323623922.issue38062@roundup.psfhosted.org> Message-ID: <1568019125.97.0.433145739195.issue38062@roundup.psfhosted.org> Change by Mark Dickinson : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 04:54:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 08:54:43 +0000 Subject: [issue15382] os.utime() mishandles some arguments In-Reply-To: <1342558958.87.0.656849983066.issue15382@psf.upfronthosting.co.za> Message-ID: <1568019283.5.0.047777193387.issue15382@roundup.psfhosted.org> STINNER Victor added the comment: > The documentation issue was fixed in issue23738. The documentation no longer claims that ns can be None. If specified it must be a tuple of floats. tuple of integers, not tuple a floats. Python 3.9 documentation says: "If ns is specified, it must be a 2-tuple of the form (atime_ns, mtime_ns) where each member is an int expressing nanoseconds." which is correct. Python 3.9 now emits a DeprecationWarning when passing floats: vstinner at apu$ ./python Python 3.9.0a0 (heads/pr/15701-dirty:a0f335c74c, Sep 6 2019, 17:38:14) >>> import os >>> os.utime("x", ns=(1, 1)) >>> os.utime("x", ns=(0.1, 1)) :1: DeprecationWarning: an integer is required (got type float). Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:01:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 09:01:47 +0000 Subject: [issue15382] os.utime() mishandles some arguments In-Reply-To: <1342558958.87.0.656849983066.issue15382@psf.upfronthosting.co.za> Message-ID: <1568019707.92.0.999634485689.issue15382@roundup.psfhosted.org> STINNER Victor added the comment: By the way, error messages are now also correct: >>> os.utime("x", ns=None) Traceback (most recent call last): File "", line 1, in TypeError: utime: 'ns' must be a tuple of two ints >>> os.utime("x", times=(0, 0), ns=None) Traceback (most recent call last): File "", line 1, in ValueError: utime: you may specify either 'times' or 'ns' but not both ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:02:21 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Mon, 09 Sep 2019 09:02:21 +0000 Subject: [issue38061] FreeBSD: Optimize subprocess.Popen(close_fds=True) using closefrom() In-Reply-To: <1568013936.15.0.668992536534.issue38061@roundup.psfhosted.org> Message-ID: <1568019741.35.0.49601651763.issue38061@roundup.psfhosted.org> Kubilay Kocak added the comment: We're tracking this in our downstream bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221700 There's a patch there you may base something upstream on Open question: closefrom(2) test in ./configure && ifdef __FreeBSD__ ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:06:41 2019 From: report at bugs.python.org (Zachary Ware) Date: Mon, 09 Sep 2019 09:06:41 +0000 Subject: [issue15817] Misc/gdbinit: Expose command documentation to gdb help In-Reply-To: <1346283185.13.0.0954859318202.issue15817@psf.upfronthosting.co.za> Message-ID: <1568020001.0.0.00105481172444.issue15817@roundup.psfhosted.org> Zachary Ware added the comment: New changeset 1f86fdcfc57270ee569cc58269a4e08afe7608ec by Zachary Ware (Florian Bruhin) in branch 'master': bpo-15817: gdbinit: Document commands after defining them (GH-15021) https://github.com/python/cpython/commit/1f86fdcfc57270ee569cc58269a4e08afe7608ec ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:06:51 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Sep 2019 09:06:51 +0000 Subject: [issue34410] itertools.tee not thread-safe; can segfault interpreter when wrapped iterator releases GIL In-Reply-To: <1534298908.58.0.56676864532.issue34410@psf.upfronthosting.co.za> Message-ID: <1568020011.88.0.0651929042213.issue34410@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +15394 pull_request: https://github.com/python/cpython/pull/15740 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:07:35 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Mon, 09 Sep 2019 09:07:35 +0000 Subject: [issue38061] FreeBSD: Optimize subprocess.Popen(close_fds=True) using closefrom() In-Reply-To: <1568013936.15.0.668992536534.issue38061@roundup.psfhosted.org> Message-ID: <1568020055.22.0.289221616813.issue38061@roundup.psfhosted.org> Kubilay Kocak added the comment: @Victor I mounted fdescfs on the buildbot workers to make the tests run faster. You're correct that it's not enabled by default. If we could look at the initial support being as simple as possible, we can look to backport this to 2.7 as well ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:07:54 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 09:07:54 +0000 Subject: [issue34410] itertools.tee not thread-safe; can segfault interpreter when wrapped iterator releases GIL In-Reply-To: <1534298908.58.0.56676864532.issue34410@psf.upfronthosting.co.za> Message-ID: <1568020074.72.0.30892843961.issue34410@roundup.psfhosted.org> miss-islington added the comment: New changeset 6e3809c7ce9fbee11c3a3f89dd7e89829b7581ac by Miss Islington (bot) in branch '3.8': bpo-34410: Fix a crash in the tee iterator when re-enter it. (GH-15625) https://github.com/python/cpython/commit/6e3809c7ce9fbee11c3a3f89dd7e89829b7581ac ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:11:25 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 09:11:25 +0000 Subject: [issue34410] itertools.tee not thread-safe; can segfault interpreter when wrapped iterator releases GIL In-Reply-To: <1534298908.58.0.56676864532.issue34410@psf.upfronthosting.co.za> Message-ID: <1568020285.49.0.756791550403.issue34410@roundup.psfhosted.org> miss-islington added the comment: New changeset 5190b7193c184268d5c8a9440b3a5a8bcd84a23e by Miss Islington (bot) in branch '3.7': bpo-34410: Fix a crash in the tee iterator when re-enter it. (GH-15625) https://github.com/python/cpython/commit/5190b7193c184268d5c8a9440b3a5a8bcd84a23e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:15:17 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 09:15:17 +0000 Subject: [issue11953] Missing WSA* error codes In-Reply-To: <1304030330.14.0.209711289978.issue11953@psf.upfronthosting.co.za> Message-ID: <1568020517.08.0.208495633342.issue11953@roundup.psfhosted.org> Steve Dower added the comment: New changeset 71ea688d662a74ddf39a3874e06c73e58df55c02 by Steve Dower (Ngalim Siregar) in branch 'master': bpo-11953: Extend table of Windows WSA* error codes (GH-15004) https://github.com/python/cpython/commit/71ea688d662a74ddf39a3874e06c73e58df55c02 ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:16:34 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 09 Sep 2019 09:16:34 +0000 Subject: [issue38043] small cleanups in Unicode normalization code In-Reply-To: <1567745214.3.0.712701659381.issue38043@roundup.psfhosted.org> Message-ID: <1568020594.4.0.59224356894.issue38043@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 7669cb8b21c7c9cef758609c44017c09d1ce4658 by Benjamin Peterson (Greg Price) in branch 'master': bpo-38043: Use `bool` for boolean flags on is_normalized_quickcheck. (GH-15711) https://github.com/python/cpython/commit/7669cb8b21c7c9cef758609c44017c09d1ce4658 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:18:03 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 09:18:03 +0000 Subject: [issue11953] Missing WSA* error codes In-Reply-To: <1304030330.14.0.209711289978.issue11953@psf.upfronthosting.co.za> Message-ID: <1568020683.44.0.841561750098.issue11953@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +15395 pull_request: https://github.com/python/cpython/pull/15741 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:20:42 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 09:20:42 +0000 Subject: [issue37445] Some FormatMessageW() calls use FORMAT_MESSAGE_FROM_SYSTEM without FORMAT_MESSAGE_IGNORE_INSERTS In-Reply-To: <1561766338.66.0.394752973171.issue37445@roundup.psfhosted.org> Message-ID: <1568020842.29.0.659925145988.issue37445@roundup.psfhosted.org> Steve Dower added the comment: New changeset a6563650c835d50f7302971a5b145e94f9d0dc68 by Steve Dower (Zackery Spytz) in branch 'master': bpo-37445: Include FORMAT_MESSAGE_IGNORE_INSERTS in FormatMessageW() calls (GH-14462) https://github.com/python/cpython/commit/a6563650c835d50f7302971a5b145e94f9d0dc68 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:20:50 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 09:20:50 +0000 Subject: [issue37445] Some FormatMessageW() calls use FORMAT_MESSAGE_FROM_SYSTEM without FORMAT_MESSAGE_IGNORE_INSERTS In-Reply-To: <1561766338.66.0.394752973171.issue37445@roundup.psfhosted.org> Message-ID: <1568020849.99.0.281861403246.issue37445@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15396 pull_request: https://github.com/python/cpython/pull/15742 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:21:02 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 09:21:02 +0000 Subject: [issue37445] Some FormatMessageW() calls use FORMAT_MESSAGE_FROM_SYSTEM without FORMAT_MESSAGE_IGNORE_INSERTS In-Reply-To: <1561766338.66.0.394752973171.issue37445@roundup.psfhosted.org> Message-ID: <1568020862.0.0.851543585423.issue37445@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15397 pull_request: https://github.com/python/cpython/pull/15743 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:22:47 2019 From: report at bugs.python.org (Zachary Ware) Date: Mon, 09 Sep 2019 09:22:47 +0000 Subject: [issue15817] Misc/gdbinit: Expose command documentation to gdb help In-Reply-To: <1346283185.13.0.0954859318202.issue15817@psf.upfronthosting.co.za> Message-ID: <1568020967.21.0.581340801319.issue15817@roundup.psfhosted.org> Change by Zachary Ware : ---------- pull_requests: +15398 pull_request: https://github.com/python/cpython/pull/15744 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:24:48 2019 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 09 Sep 2019 09:24:48 +0000 Subject: [issue38038] Remove urllib.parse._splittype from xmlrpc.client In-Reply-To: <1567693191.9.0.654396049137.issue38038@roundup.psfhosted.org> Message-ID: <1568021088.59.0.810268726124.issue38038@roundup.psfhosted.org> Dong-hee Na added the comment: @vstinner Right. splittype() is deprecated. Nevertheless, the same functionality is still accessible to end users with _splittype (). So I thought we should go in the direction of removing this completely. >From the view of the standard library is used by Python end users as a reference for their own implementation, I suggest removing indirectly usage of deprecated API gradually. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:26:18 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 09:26:18 +0000 Subject: [issue32587] Make REG_MULTI_SZ support zero-length strings In-Reply-To: <1516212552.32.0.467229070634.issue32587@psf.upfronthosting.co.za> Message-ID: <1568021178.68.0.935644008081.issue32587@roundup.psfhosted.org> Steve Dower added the comment: New changeset e223ba13d8d871ee58570dfca4e82a591189cc2f by Steve Dower (Zackery Spytz) in branch 'master': bpo-32587: Make winreg.REG_MULTI_SZ support zero-length strings (#13239) https://github.com/python/cpython/commit/e223ba13d8d871ee58570dfca4e82a591189cc2f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:26:27 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 09:26:27 +0000 Subject: [issue32587] Make REG_MULTI_SZ support zero-length strings In-Reply-To: <1516212552.32.0.467229070634.issue32587@psf.upfronthosting.co.za> Message-ID: <1568021187.91.0.784620749027.issue32587@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15399 pull_request: https://github.com/python/cpython/pull/15745 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:26:42 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 09 Sep 2019 09:26:42 +0000 Subject: [issue13788] os.closerange optimization In-Reply-To: <1326601765.34.0.310008166629.issue13788@psf.upfronthosting.co.za> Message-ID: <1568021202.49.0.210876986159.issue13788@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- versions: +Python 3.8 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:28:37 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 09:28:37 +0000 Subject: [issue32587] Make REG_MULTI_SZ support zero-length strings In-Reply-To: <1516212552.32.0.467229070634.issue32587@psf.upfronthosting.co.za> Message-ID: <1568021317.37.0.594615653207.issue32587@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15400 pull_request: https://github.com/python/cpython/pull/15746 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:31:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 09:31:27 +0000 Subject: [issue34155] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1568021487.02.0.559393967076.issue34155@roundup.psfhosted.org> STINNER Victor added the comment: I reopen the issue since Python 2.7 is still vulnerable. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:33:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 09:33:42 +0000 Subject: [issue34155] [CVE-2019-16056] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1568021622.51.0.822702384581.issue34155@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: email.utils.parseaddr mistakenly parse an email -> [CVE-2019-16056] email.utils.parseaddr mistakenly parse an email _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:33:54 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 09:33:54 +0000 Subject: [issue37705] winerror_to_errno implementation In-Reply-To: <1564407660.89.0.454912973453.issue37705@roundup.psfhosted.org> Message-ID: <1568021634.43.0.345951993375.issue37705@roundup.psfhosted.org> Steve Dower added the comment: I'm going to merge and backport this all the way to 3.7. Adding a publicly accessible dict for use in Python code should be 3.9 only. ---------- versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:34:53 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 09:34:53 +0000 Subject: [issue37936] gitignore file is too broad In-Reply-To: <1566630912.92.0.00349300289224.issue37936@roundup.psfhosted.org> Message-ID: <1568021693.68.0.336100828369.issue37936@roundup.psfhosted.org> miss-islington added the comment: New changeset 5e5e9515029f70836003a8cfb30433166fcc8db7 by Miss Islington (bot) (Greg Price) in branch 'master': bpo-37936: Avoid ignoring files that we actually do track. (GH-15451) https://github.com/python/cpython/commit/5e5e9515029f70836003a8cfb30433166fcc8db7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:35:02 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 09:35:02 +0000 Subject: [issue37936] gitignore file is too broad In-Reply-To: <1566630912.92.0.00349300289224.issue37936@roundup.psfhosted.org> Message-ID: <1568021702.08.0.592306781234.issue37936@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15401 pull_request: https://github.com/python/cpython/pull/15747 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:35:08 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 09:35:08 +0000 Subject: [issue37936] gitignore file is too broad In-Reply-To: <1566630912.92.0.00349300289224.issue37936@roundup.psfhosted.org> Message-ID: <1568021708.13.0.765348824446.issue37936@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15402 pull_request: https://github.com/python/cpython/pull/15748 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:35:11 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 09:35:11 +0000 Subject: [issue37705] winerror_to_errno implementation In-Reply-To: <1564407660.89.0.454912973453.issue37705@roundup.psfhosted.org> Message-ID: <1568021711.2.0.800459327772.issue37705@roundup.psfhosted.org> Steve Dower added the comment: New changeset 19052a11314e7be7ba003fd6cdbb5400a5d77d96 by Steve Dower (Zackery Spytz) in branch 'master': bpo-37705: Improve the implementation of winerror_to_errno() (GH-15623) https://github.com/python/cpython/commit/19052a11314e7be7ba003fd6cdbb5400a5d77d96 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:35:20 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 09:35:20 +0000 Subject: [issue37705] winerror_to_errno implementation In-Reply-To: <1564407660.89.0.454912973453.issue37705@roundup.psfhosted.org> Message-ID: <1568021720.12.0.450872108245.issue37705@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15403 pull_request: https://github.com/python/cpython/pull/15749 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:35:26 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 09:35:26 +0000 Subject: [issue37705] winerror_to_errno implementation In-Reply-To: <1564407660.89.0.454912973453.issue37705@roundup.psfhosted.org> Message-ID: <1568021726.92.0.387109505797.issue37705@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15404 pull_request: https://github.com/python/cpython/pull/15750 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:38:08 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Sep 2019 09:38:08 +0000 Subject: [issue34410] itertools.tee not thread-safe; can segfault interpreter when wrapped iterator releases GIL In-Reply-To: <1534298908.58.0.56676864532.issue34410@psf.upfronthosting.co.za> Message-ID: <1568021888.1.0.0455805366624.issue34410@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 2fb6921ab296f933caf361a662e6471e143abefc by Serhiy Storchaka in branch '2.7': [2.7] bpo-34410: Fix a crash in the tee iterator when re-enter it. (GH-15625) (GH-15740) https://github.com/python/cpython/commit/2fb6921ab296f933caf361a662e6471e143abefc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:39:04 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 09 Sep 2019 09:39:04 +0000 Subject: [issue36816] self-signed.pythontest.net TLS certificate key is too weak In-Reply-To: <1557165940.63.0.800219956591.issue36816@roundup.psfhosted.org> Message-ID: <1568021944.04.0.0555591355969.issue36816@roundup.psfhosted.org> Gregory P. Smith added the comment: I believe this has been addressed. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:40:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 09:40:43 +0000 Subject: [issue38061] FreeBSD: Optimize subprocess.Popen(close_fds=True) using closefrom() In-Reply-To: <1568013936.15.0.668992536534.issue38061@roundup.psfhosted.org> Message-ID: <1568022043.85.0.227820506774.issue38061@roundup.psfhosted.org> STINNER Victor added the comment: > @Victor I mounted fdescfs on the buildbot workers to make the tests run faster. You're correct that it's not enabled by default. Would it be possible to modify FreeBSD to enable it by default? Or is there a reason to not enable it by default? > We're tracking this in our downstream bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221700 There's a patch there you may base something upstream on Which patch? https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221700#c3 or something else? > Open question: closefrom(2) test in ./configure && ifdef __FreeBSD__ ? No need to make closefrom test conditional depending on the platform. We have plently of tests which are platform specific but run on all platforms. It's common that a function is first available on a single platform, but then available on more platforms. It seems like closefrom() is available on: * FreeBSD * NetBSD: https://netbsd.gw.com/cgi-bin/man-cgi?closefrom++NetBSD-current * OpenBSD: https://man.openbsd.org/closefrom.2 * Solaris: https://docs.oracle.com/cd/E23823_01/html/816-5168/closefrom-3c.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:43:07 2019 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 09 Sep 2019 09:43:07 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1568022187.35.0.995890760512.issue34037@roundup.psfhosted.org> Yury Selivanov added the comment: Here's the API I propose to solve this problem: https://github.com/python/cpython/pull/15735#pullrequestreview-285389412 Summary: * Add a new loop.shutdown_threadpool() method. Just like with shutdown_asyncgens() -- it would be invalid to call loop.run_in_executer() after loop.shutdown_threadpool() is called. * Make asyncio.run() to call the new loop.shutdown_threadpool(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:43:57 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 09 Sep 2019 09:43:57 +0000 Subject: [issue37936] gitignore file is too broad In-Reply-To: <1566630912.92.0.00349300289224.issue37936@roundup.psfhosted.org> Message-ID: <1568022237.62.0.688958697937.issue37936@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:44:13 2019 From: report at bugs.python.org (Lisa Roach) Date: Mon, 09 Sep 2019 09:44:13 +0000 Subject: [issue37251] Mocking a MagicMock with a function spec results in an AsyncMock In-Reply-To: <1560348018.57.0.546920052201.issue37251@roundup.psfhosted.org> Message-ID: <1568022253.2.0.945639957646.issue37251@roundup.psfhosted.org> Lisa Roach added the comment: I made a new branch with the changes I am suggesting here to try to be more clear: https://github.com/lisroach/cpython/tree/issue37251 What do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:45:47 2019 From: report at bugs.python.org (Mark Shannon) Date: Mon, 09 Sep 2019 09:45:47 +0000 Subject: [issue21120] PyArena type is used in headers from the limited API In-Reply-To: <1396339821.73.0.473299529971.issue21120@psf.upfronthosting.co.za> Message-ID: <1568022347.3.0.739567872874.issue21120@roundup.psfhosted.org> Mark Shannon added the comment: This seems like the correct thing to do. Since the AST changes from version to version, I don't see how these files could reasonably be part of the limited API. ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:45:59 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 09 Sep 2019 09:45:59 +0000 Subject: [issue38015] inline function generates slightly inefficient machine code In-Reply-To: <1567483364.75.0.314519224234.issue38015@roundup.psfhosted.org> Message-ID: <1568022359.18.0.829170558102.issue38015@roundup.psfhosted.org> Benjamin Peterson added the comment: I agree with msg351348. The performance wins are very context-dependent and even then very small. It's not worth further disturbing the small int code. So, we should close this issue out. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:50:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 09:50:24 +0000 Subject: [issue38038] Remove urllib.parse._splittype from xmlrpc.client In-Reply-To: <1567693191.9.0.654396049137.issue38038@roundup.psfhosted.org> Message-ID: <1568022624.85.0.979776832018.issue38038@roundup.psfhosted.org> STINNER Victor added the comment: splittype() was deprecated in Python 3.8 by bpo-27485: commit 0250de48199552cdaed5a4fe44b3f9cdb5325363 Author: Cheryl Sabella Date: Wed Apr 25 16:51:54 2018 -0700 bpo-27485: Rename and deprecate undocumented functions in urllib.parse (GH-2205) Dong-hee Na: This issue is about xmlrpc.client. If you consider that it's time to remove deprecated urllib.parse functions, please open a separated issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:50:34 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 09:50:34 +0000 Subject: [issue37445] Some FormatMessageW() calls use FORMAT_MESSAGE_FROM_SYSTEM without FORMAT_MESSAGE_IGNORE_INSERTS In-Reply-To: <1561766338.66.0.394752973171.issue37445@roundup.psfhosted.org> Message-ID: <1568022634.77.0.441201325396.issue37445@roundup.psfhosted.org> miss-islington added the comment: New changeset e103732f5df13a97f610a8b80883895f7a273573 by Miss Islington (bot) in branch '3.8': bpo-37445: Include FORMAT_MESSAGE_IGNORE_INSERTS in FormatMessageW() calls (GH-14462) https://github.com/python/cpython/commit/e103732f5df13a97f610a8b80883895f7a273573 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:53:49 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 09:53:49 +0000 Subject: [issue36311] Flaw in Windows code page decoder for large input In-Reply-To: <1552723600.79.0.686719955113.issue36311@roundup.psfhosted.org> Message-ID: <1568022829.57.0.627035991779.issue36311@roundup.psfhosted.org> Steve Dower added the comment: Declaring this out-of-scope for 2.7, unless someone wants to insist (and provide a PR). ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:53:49 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 09 Sep 2019 09:53:49 +0000 Subject: [issue38060] precedence (relational, logical operator)not working with single value In-Reply-To: <1568000145.4.0.491367390087.issue38060@roundup.psfhosted.org> Message-ID: <1568022829.86.0.692162696085.issue38060@roundup.psfhosted.org> Steven D'Aprano added the comment: Tim is correct, the behaviour is right, however the docs could be clearer. I think what you are missing is that ``or`` and ``and`` are short-circuiting operators. So in the expression 9 or (anything) the "anything" expression never gets evaluated because 9 is a truthy value. You might get a better example of what is happening if you disassemble the byte-code: py> from dis import dis py> dis(compile("9 or 7 < 'str'", '', 'eval')) 1 0 LOAD_CONST 0 (9) 3 JUMP_IF_TRUE_OR_POP 15 6 LOAD_CONST 1 (7) 9 LOAD_CONST 2 ('str') 12 COMPARE_OP 0 (<) >> 15 RETURN_VALUE Another way to see the order of evaluation is if we make the left hand operand falsey: py> print("first") or print("second") < 'str' first second Traceback (most recent call last): File "", line 1, in TypeError: unorderable types: NoneType() < str() In this case, the order of operations is: - evaluate ``print("first")`` (returns None) - since None is falsey, evaluate ``print("second") < 'str'`` - which prints the word "second", then raises an exception. We can get rid of the exception: py> print("first") or str(print("second")) < 'str' first second True I can see how the docs are a little bit confusing if you don't remember that ``or`` and ``and`` are short-circuiting operators. If you would like to propose an improvement to the docs, please suggest something. But the behaviour is correct and is not a bug. https://docs.python.org/3/reference/expressions.html#operator-precedence ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:55:22 2019 From: report at bugs.python.org (Lisa Roach) Date: Mon, 09 Sep 2019 09:55:22 +0000 Subject: [issue37383] call count in not registered in AsyncMock till the coroutine is awaited In-Reply-To: <1561372216.92.0.906837687381.issue37383@roundup.psfhosted.org> Message-ID: <1568022922.84.0.738410307269.issue37383@roundup.psfhosted.org> Lisa Roach added the comment: I see your point it is confusing the difference between the async and sync API, but I think the current AsyncMock call check is correct. According to the asyncio docs: "...simply calling a coroutine will not schedule it to be executed" (https://docs.python.org/3/library/asyncio-task.html#coroutines) and it goes on to say you either need to call the function with await, asyncio.run(), or asyncio.create_task(). So I believe calling an AsyncMock without using await should not log as a call, it is only if one of the three criteria above is met that it should be added to the mock_calls list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:56:06 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 09:56:06 +0000 Subject: [issue37445] Some FormatMessageW() calls use FORMAT_MESSAGE_FROM_SYSTEM without FORMAT_MESSAGE_IGNORE_INSERTS In-Reply-To: <1561766338.66.0.394752973171.issue37445@roundup.psfhosted.org> Message-ID: <1568022966.88.0.0300800779015.issue37445@roundup.psfhosted.org> miss-islington added the comment: New changeset 1af2c0ec2f63cc6516eb814c3e29d94451a52194 by Miss Islington (bot) in branch '3.7': bpo-37445: Include FORMAT_MESSAGE_IGNORE_INSERTS in FormatMessageW() calls (GH-14462) https://github.com/python/cpython/commit/1af2c0ec2f63cc6516eb814c3e29d94451a52194 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:56:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 09:56:33 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1568022993.9.0.428338847442.issue34037@roundup.psfhosted.org> STINNER Victor added the comment: "shutdown_threadpool()" name What do you think of the "shutdown_default_executor()" name? The default executor can be overriden by set_default_executor(): def set_default_executor(self, executor): if not isinstance(executor, concurrent.futures.ThreadPoolExecutor): warnings.warn( 'Using the default executor that is not an instance of ' 'ThreadPoolExecutor is deprecated and will be prohibited ' 'in Python 3.9', DeprecationWarning, 2) self._default_executor = executor The default executor should always be a thread pool, so "shutdown_threadpool()" name is also correct. I have no strong preference. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:56:41 2019 From: report at bugs.python.org (Zachary Ware) Date: Mon, 09 Sep 2019 09:56:41 +0000 Subject: [issue15817] Misc/gdbinit: Expose command documentation to gdb help In-Reply-To: <1346283185.13.0.0954859318202.issue15817@psf.upfronthosting.co.za> Message-ID: <1568023001.07.0.0393196598844.issue15817@roundup.psfhosted.org> Zachary Ware added the comment: New changeset 14f7de72b62ec8e73a8a57b25ad8fef230dc6a3c by Zachary Ware in branch '3.8': [3.8] bpo-15817: gdbinit: Document commands after defining them (GH-15021) (#15744) https://github.com/python/cpython/commit/14f7de72b62ec8e73a8a57b25ad8fef230dc6a3c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:57:20 2019 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 09 Sep 2019 09:57:20 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1568023040.95.0.677176094808.issue34037@roundup.psfhosted.org> Yury Selivanov added the comment: > What do you think of the "shutdown_default_executor()" name? Yeah, I think it's a better name! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:58:11 2019 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 09 Sep 2019 09:58:11 +0000 Subject: [issue38038] Remove urllib.parse._splittype from xmlrpc.client In-Reply-To: <1567693191.9.0.654396049137.issue38038@roundup.psfhosted.org> Message-ID: <1568023091.27.0.767349125769.issue38038@roundup.psfhosted.org> Dong-hee Na added the comment: Understood ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 05:59:14 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 09 Sep 2019 09:59:14 +0000 Subject: [issue37835] typing.get_type_hints wrong namespace for forward-declaration of inner class In-Reply-To: <1565689003.91.0.0312877377737.issue37835@roundup.psfhosted.org> Message-ID: <1568023154.84.0.386056378303.issue37835@roundup.psfhosted.org> Ivan Levkivskyi added the comment: > I anyway always wonder, why functions, which are methods, do not hold a reference to the class, which they belong to. This may indeed be a useful feature on its own, but it will also require a much more wider discussion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:01:14 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 10:01:14 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568023274.77.0.475561469166.issue37531@roundup.psfhosted.org> STINNER Victor added the comment: Crap, test_regrtest.test_multiprocessing_timeout() hangs sometimes (randomly), and then support.temp_cwd() fails on rmtree() with "PermissionError: [WinError 32] The process cannot access the file because it is being used by another process". running: test_regrtest (14 min 24 sec) running: test_regrtest (14 min 54 sec) 0:24:35 load avg: 2.02 [419/419/1] test_regrtest crashed (Exit code 1) Timeout (0:15:00)! Thread 0x000017d0 (most recent call first): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\subprocess.py", line 1353 in _readerthread File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\threading.py", line 882 in run File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\threading.py", line 944 in _bootstrap_inner File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\threading.py", line 902 in _bootstrap Thread 0x00000a30 (most recent call first): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\threading.py", line 1039 in _wait_for_tstate_lock File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\threading.py", line 1023 in join File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\subprocess.py", line 1382 in _communicate File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\subprocess.py", line 1015 in communicate File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\subprocess.py", line 491 in run File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_regrtest.py", line 504 in run_command File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_regrtest.py", line 529 in run_python File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_regrtest.py", line 680 in run_tests File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_regrtest.py", line 1178 in test_multiprocessing_timeout (...) 1 re-run test: test_regrtest Total duration: 25 min 20 sec Tests result: FAILURE then SUCCESS Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", line 1013, in temp_dir yield path File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", line 1065, in temp_cwd yield cwd_dir File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\libregrtest\main.py", line 628, in main self._main(tests, kwargs) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\libregrtest\main.py", line 690, in _main sys.exit(0) SystemExit: 0 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", line 330, in _force_run return func(*args) PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\buildbot.python.org\\3.x.kloth-win64\\build\\build\\test_python_4376\\test_python_worker_5136' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\runpy.py", line 192, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\__main__.py", line 2, in main() File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\libregrtest\main.py", line 695, in main Regrtest().main(tests=tests, **kwargs) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\libregrtest\main.py", line 628, in main self._main(tests, kwargs) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\contextlib.py", line 131, in __exit__ self.gen.throw(type, value, traceback) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", line 1065, in temp_cwd yield cwd_dir File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\contextlib.py", line 131, in __exit__ self.gen.throw(type, value, traceback) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", line 1018, in temp_dir rmtree(path) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", line 452, in rmtree _rmtree(path) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", line 393, in _rmtree _waitfor(_rmtree_inner, path, waitall=True) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", line 341, in _waitfor func(pathname) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", line 390, in _rmtree_inner _force_run(fullname, os.rmdir, fullname) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", line 336, in _force_run return func(*args) PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\\buildbot.python.org\\3.x.kloth-win64\\build\\build\\test_python_4376\\test_python_worker_5136' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:02:05 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 09 Sep 2019 10:02:05 +0000 Subject: [issue37857] Setting logger.level directly has no effect due to caching in 3.7+ In-Reply-To: <1565811970.47.0.529067236549.issue37857@roundup.psfhosted.org> Message-ID: <1568023325.23.0.813173753949.issue37857@roundup.psfhosted.org> Vinay Sajip added the comment: That code in the wild that sets the level attribute directly is wrong and should be changed, right? The documentation has always been clear that setLevel() should be used. If we now take steps to support setting the level via attribute, isn't that encouraging bypassing the documented APIs? I'm not sure such misuse is widespread. Using a property might seem a good solution, but there is a performance impact, so I am not keen on this change. I don't know what the real-world performance impact would be, but this simple script to look at the base access timing: import timeit class Logger(object): def __init__(self): self._levelprop = self.level = 0 @property def levelprop(self): return self.level def main(): logger = Logger() print(timeit.timeit('logger.level', globals=locals())) print(timeit.timeit('logger.levelprop', globals=locals())) if __name__ == '__main__': main() gives, for example, 0.12630631799993353 0.4208384449998448 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:04:57 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 10:04:57 +0000 Subject: [issue32587] Make REG_MULTI_SZ support zero-length strings In-Reply-To: <1516212552.32.0.467229070634.issue32587@psf.upfronthosting.co.za> Message-ID: <1568023497.49.0.266315162848.issue32587@roundup.psfhosted.org> miss-islington added the comment: New changeset bbf02da42e2368ae6b40015d6e92eaac4120f2dc by Miss Islington (bot) in branch '3.7': bpo-32587: Make winreg.REG_MULTI_SZ support zero-length strings (GH-13239) https://github.com/python/cpython/commit/bbf02da42e2368ae6b40015d6e92eaac4120f2dc ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:11:04 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 10:11:04 +0000 Subject: [issue32587] Make REG_MULTI_SZ support zero-length strings In-Reply-To: <1516212552.32.0.467229070634.issue32587@psf.upfronthosting.co.za> Message-ID: <1568023864.18.0.156969144277.issue32587@roundup.psfhosted.org> miss-islington added the comment: New changeset ebca7eb093f31052ff9f245b306d38941c28a1ad by Miss Islington (bot) in branch '3.8': bpo-32587: Make winreg.REG_MULTI_SZ support zero-length strings (GH-13239) https://github.com/python/cpython/commit/ebca7eb093f31052ff9f245b306d38941c28a1ad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:12:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 10:12:41 +0000 Subject: [issue1154351] add get_current_dir_name() to os module Message-ID: <1568023961.25.0.722365797325.issue1154351@roundup.psfhosted.org> STINNER Victor added the comment: I rejected PR 10117 which adds os.get_current_dir_name(). Copy of my comment: https://github.com/python/cpython/pull/10117#issuecomment-529399532 The os module is thin wrappers to functions of the libc or even system calls. We don't implement heuristic using 2 variants of the same feature: there shutil module is there for that. Compare os.get_terminal_size() to shutil.get_terminal_size() for example. I close the PR to add os.get_current_dir_name(): IMHO it's more a feature for the shutil module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:18:14 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 10:18:14 +0000 Subject: [issue1154351] add get_current_dir_name() to os module Message-ID: <1568024294.38.0.127475592648.issue1154351@roundup.psfhosted.org> STINNER Victor added the comment: I don't see much traction to get this feature into Python. Only a few comments since 2005. I close the issue. The function implement is just a few lines of pure Python code. If you need it, it's easy to put it in your project. Sorry, but I'm not convinced that we really need this feature in Python. I close the issue. If you want this feature, please come back with a better rationale. I don't understand which use case is solved by this feature. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:22:37 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 09 Sep 2019 10:22:37 +0000 Subject: [issue35667] activate for venv containing apostrophe doesn't work in powershell In-Reply-To: <1546724069.06.0.00436819935865.issue35667@roundup.psfhosted.org> Message-ID: <1568024557.13.0.969466796587.issue35667@roundup.psfhosted.org> Vinay Sajip added the comment: This has reportedly been fixed by the changes made to fix bpo-37354. I'll close this, but please reopen if you find it's still a problem. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:25:07 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 10:25:07 +0000 Subject: [issue37936] gitignore file is too broad In-Reply-To: <1566630912.92.0.00349300289224.issue37936@roundup.psfhosted.org> Message-ID: <1568024707.95.0.984271600662.issue37936@roundup.psfhosted.org> miss-islington added the comment: New changeset c837ad408e85eed9d20ba8331751df15e14f6aef by Miss Islington (bot) in branch '3.8': bpo-37936: Avoid ignoring files that we actually do track. (GH-15451) https://github.com/python/cpython/commit/c837ad408e85eed9d20ba8331751df15e14f6aef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:26:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 10:26:30 +0000 Subject: [issue38063] Modify test_socket.py to use unittest test discovery Message-ID: <1568024790.32.0.574936667066.issue38063@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: Tests nosy: vstinner priority: normal severity: normal status: open title: Modify test_socket.py to use unittest test discovery type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:27:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 10:27:19 +0000 Subject: [issue38063] Modify test_socket.py to use unittest test discovery Message-ID: <1568024839.12.0.0898482861063.issue38063@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +15405 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15751 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:28:02 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 09 Sep 2019 10:28:02 +0000 Subject: [issue37383] call count in not registered in AsyncMock till the coroutine is awaited In-Reply-To: <1561372216.92.0.906837687381.issue37383@roundup.psfhosted.org> Message-ID: <1568024882.87.0.43750930893.issue37383@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I just checked the behavior with asynctest. The _mock_call implementation where the call is recorded is similar except that in asynctest it's a synchronous function [0] and in AsyncMock it's an async function [1] thus needs to be awaited to register call count. Agreed it's more of a confusion over does call mean a function call or something that should be recorded only once awaited given that there is call_count and await_calls. But would be good to have this documented that call_count is recorded only after await. Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 16:52:21) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import asynctest >>> m = asynctest.CoroutineMock() >>> m(1) .proxy at 0x1023c8b88> >>> m.mock_calls [call(1)] Python 3.9.0a0 (heads/master:a6563650c8, Sep 9 2019, 14:53:16) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from unittest.mock import AsyncMock >>> m = AsyncMock() >>> m.mock_calls [] [0] https://github.com/Martiusweb/asynctest/blob/d1d47ecb8220371284230d6d6fe642649ef82ab2/asynctest/mock.py#L584 [1] https://github.com/python/cpython/blob/19052a11314e7be7ba003fd6cdbb5400a5d77d96/Lib/unittest/mock.py#L2120 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:30:04 2019 From: report at bugs.python.org (Poker Online) Date: Mon, 09 Sep 2019 10:30:04 +0000 Subject: [issue38064] Agen Poker Online Terpercaya Message-ID: <1568025004.13.0.211579167516.issue38064@roundup.psfhosted.org> New submission from Poker Online : Situs agen poker online terpercayahttps://www.jakartapoker.net/ ---------- components: Cross-Build messages: 351408 nosy: Alex.Willmer, pokeronline63 priority: normal severity: normal status: open title: Agen Poker Online Terpercaya type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:30:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 10:30:06 +0000 Subject: [issue38063] Modify test_socket.py to use unittest test discovery Message-ID: <1568025006.16.0.526059432214.issue38063@roundup.psfhosted.org> Change by STINNER Victor : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:31:32 2019 From: report at bugs.python.org (Zachary Ware) Date: Mon, 09 Sep 2019 10:31:32 +0000 Subject: [issue38063] Modify test_socket.py to use unittest test discovery Message-ID: <1568025092.75.0.792665697576.issue38063@roundup.psfhosted.org> New submission from Zachary Ware : See also #14408. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:32:08 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 09 Sep 2019 10:32:08 +0000 Subject: [issue38064] Agen Poker Online Terpercaya In-Reply-To: <1568025004.13.0.211579167516.issue38064@roundup.psfhosted.org> Message-ID: <1568025128.49.0.849264398562.issue38064@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This looks like spam to me. Feel free to reopen the issue if incorrect with a better description and example of the problem. ---------- nosy: +xtreak resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:32:53 2019 From: report at bugs.python.org (Zachary Ware) Date: Mon, 09 Sep 2019 10:32:53 +0000 Subject: [issue38064] Spam In-Reply-To: <1568025004.13.0.211579167516.issue38064@roundup.psfhosted.org> Message-ID: <1568025173.7.0.0780684080801.issue38064@roundup.psfhosted.org> Change by Zachary Ware : ---------- components: -Cross-Build nosy: -Alex.Willmer, pokeronline63, xtreak title: Agen Poker Online Terpercaya -> Spam versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:33:02 2019 From: report at bugs.python.org (Zachary Ware) Date: Mon, 09 Sep 2019 10:33:02 +0000 Subject: [issue38064] Spam In-Reply-To: <1568025128.49.0.849264398562.issue38064@roundup.psfhosted.org> Message-ID: <1568025182.89.0.5707700595.issue38064@roundup.psfhosted.org> Change by Zachary Ware : ---------- Removed message: https://bugs.python.org/msg351408 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:33:57 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 10:33:57 +0000 Subject: [issue32587] Make REG_MULTI_SZ support zero-length strings In-Reply-To: <1516212552.32.0.467229070634.issue32587@psf.upfronthosting.co.za> Message-ID: <1568025237.51.0.117836413495.issue32587@roundup.psfhosted.org> Steve Dower added the comment: This introduced a new warning: c:\projects\cpython\pc\winreg.c(775): warning C4267: '-=': conversion from 'size_t' to 'int', possible loss of data [C:\Projects\cpython\PCbuild\pythoncore.vcxproj] I'll fix it (after I'm done with my current task) unless someone else gets there first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:34:52 2019 From: report at bugs.python.org (Lisa Roach) Date: Mon, 09 Sep 2019 10:34:52 +0000 Subject: [issue37383] call count in not registered in AsyncMock till the coroutine is awaited In-Reply-To: <1561372216.92.0.906837687381.issue37383@roundup.psfhosted.org> Message-ID: <1568025292.78.0.919771938845.issue37383@roundup.psfhosted.org> Lisa Roach added the comment: Agreed, I think documentation can be clearer around this. I'll add a PR to try to clarify. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:35:46 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 10:35:46 +0000 Subject: [issue37445] Some FormatMessageW() calls use FORMAT_MESSAGE_FROM_SYSTEM without FORMAT_MESSAGE_IGNORE_INSERTS In-Reply-To: <1561766338.66.0.394752973171.issue37445@roundup.psfhosted.org> Message-ID: <1568025346.24.0.160639515258.issue37445@roundup.psfhosted.org> Steve Dower added the comment: Going to say this doesn't qualify for 2.7 (unless someone insists and provides a PR), given the lack of reports that anything is actually impacted. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:36:07 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 10:36:07 +0000 Subject: [issue11953] Missing WSA* error codes In-Reply-To: <1304030330.14.0.209711289978.issue11953@psf.upfronthosting.co.za> Message-ID: <1568025367.75.0.41225753385.issue11953@roundup.psfhosted.org> Steve Dower added the comment: New changeset eb02196bd95ea12fcccff3960f36601596811570 by Steve Dower in branch '3.8': bpo-11953: Extend table of Windows WSA* error codes (GH-15004) https://github.com/python/cpython/commit/eb02196bd95ea12fcccff3960f36601596811570 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:36:23 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 10:36:23 +0000 Subject: [issue11953] Missing WSA* error codes In-Reply-To: <1304030330.14.0.209711289978.issue11953@psf.upfronthosting.co.za> Message-ID: <1568025383.58.0.741009567742.issue11953@roundup.psfhosted.org> Change by Steve Dower : ---------- assignee: -> steve.dower resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:37:58 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 10:37:58 +0000 Subject: [issue37705] winerror_to_errno implementation In-Reply-To: <1564407660.89.0.454912973453.issue37705@roundup.psfhosted.org> Message-ID: <1568025478.62.0.762658046968.issue37705@roundup.psfhosted.org> miss-islington added the comment: New changeset 68e401fa0b1a3407bce395ad893535f65107ee6e by Miss Islington (bot) in branch '3.8': bpo-37705: Improve the implementation of winerror_to_errno() (GH-15623) https://github.com/python/cpython/commit/68e401fa0b1a3407bce395ad893535f65107ee6e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:38:15 2019 From: report at bugs.python.org (Lisa Roach) Date: Mon, 09 Sep 2019 10:38:15 +0000 Subject: [issue37383] call count in not registered in AsyncMock till the coroutine is awaited In-Reply-To: <1561372216.92.0.906837687381.issue37383@roundup.psfhosted.org> Message-ID: <1568025495.77.0.0203014344393.issue37383@roundup.psfhosted.org> Lisa Roach added the comment: I wonder if `await_count` is really necessary, since it is essentially the same as `call_count`. Would it be too late or confusing to remove it now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:39:25 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 10:39:25 +0000 Subject: [issue37705] winerror_to_errno implementation In-Reply-To: <1564407660.89.0.454912973453.issue37705@roundup.psfhosted.org> Message-ID: <1568025565.37.0.808674108239.issue37705@roundup.psfhosted.org> miss-islington added the comment: New changeset c25759187829d5732eea73f52a269c88aba28371 by Miss Islington (bot) in branch '3.7': bpo-37705: Improve the implementation of winerror_to_errno() (GH-15623) https://github.com/python/cpython/commit/c25759187829d5732eea73f52a269c88aba28371 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:44:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 10:44:27 +0000 Subject: [issue38063] Modify test_socket.py to use unittest test discovery In-Reply-To: <1568025092.75.0.792665697576.issue38063@roundup.psfhosted.org> Message-ID: <1568025867.21.0.273964107643.issue38063@roundup.psfhosted.org> STINNER Victor added the comment: Right now, test_main() is awful: 75 lines of code which is a very long list of class names! There are just 2 lines to check if tests don't leak a running thread. def test_main(): tests = [GeneralModuleTests, BasicTCPTest, TCPCloserTest, TCPTimeoutTest, TestExceptions, BufferIOTest, BasicTCPTest2, BasicUDPTest, UDPTimeoutTest, CreateServerTest, CreateServerFunctionalTest] tests.extend([ NonBlockingTCPTests, FileObjectClassTestCase, UnbufferedFileObjectClassTestCase, LineBufferedFileObjectClassTestCase, SmallBufferedFileObjectClassTestCase, UnicodeReadFileObjectClassTestCase, UnicodeWriteFileObjectClassTestCase, UnicodeReadWriteFileObjectClassTestCase, NetworkConnectionNoServer, NetworkConnectionAttributesTest, NetworkConnectionBehaviourTest, ContextManagersTest, InheritanceTest, NonblockConstantTest ]) tests.append(BasicSocketPairTest) tests.append(TestUnixDomain) tests.append(TestLinuxAbstractNamespace) tests.extend([TIPCTest, TIPCThreadableTest]) tests.extend([BasicCANTest, CANTest]) tests.extend([BasicRDSTest, RDSTest]) tests.append(LinuxKernelCryptoAPI) tests.append(BasicQIPCRTRTest) tests.extend([ BasicVSOCKTest, ThreadedVSOCKSocketStreamTest, ]) tests.append(BasicBluetoothTest) tests.extend([ CmsgMacroTests, SendmsgUDPTest, RecvmsgUDPTest, RecvmsgIntoUDPTest, SendmsgUDP6Test, RecvmsgUDP6Test, RecvmsgRFC3542AncillaryUDP6Test, RecvmsgIntoRFC3542AncillaryUDP6Test, RecvmsgIntoUDP6Test, SendmsgUDPLITETest, RecvmsgUDPLITETest, RecvmsgIntoUDPLITETest, SendmsgUDPLITE6Test, RecvmsgUDPLITE6Test, RecvmsgRFC3542AncillaryUDPLITE6Test, RecvmsgIntoRFC3542AncillaryUDPLITE6Test, RecvmsgIntoUDPLITE6Test, SendmsgTCPTest, RecvmsgTCPTest, RecvmsgIntoTCPTest, SendmsgSCTPStreamTest, RecvmsgSCTPStreamTest, RecvmsgIntoSCTPStreamTest, SendmsgUnixStreamTest, RecvmsgUnixStreamTest, RecvmsgIntoUnixStreamTest, RecvmsgSCMRightsStreamTest, RecvmsgIntoSCMRightsStreamTest, # These are slow when setitimer() is not available InterruptedRecvTimeoutTest, InterruptedSendTimeoutTest, TestSocketSharing, SendfileUsingSendTest, SendfileUsingSendfileTest, ]) tests.append(TestMSWindowsTCPFlags) thread_info = support.threading_setup() support.run_unittest(*tests) support.threading_cleanup(*thread_info) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:45:32 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 09 Sep 2019 10:45:32 +0000 Subject: [issue30491] Add a lightweight mechanism for detecting un-awaited coroutine objects In-Reply-To: <1495867380.86.0.533205071954.issue30491@psf.upfronthosting.co.za> Message-ID: <1568025932.32.0.716557229445.issue30491@roundup.psfhosted.org> Andrew Svetlov added the comment: This is a new feature (and not a blocker). Shift to 3.9. Nathaniel, the PR is outdated. Have you an intention to land it or the issue can be closed by the lack of interest? ---------- nosy: +asvetlov versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:45:37 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 10:45:37 +0000 Subject: [issue37283] Unexpected behavior when running installer a second time with the same arguments or unattend.xml In-Reply-To: <1560514187.3.0.83059947509.issue37283@roundup.psfhosted.org> Message-ID: <1568025937.16.0.618026653878.issue37283@roundup.psfhosted.org> Steve Dower added the comment: Okay, this is definitely an ordering issue in Tools/msi/bundle/bootstrap/PythonBootstrapApplication.cpp Fixing most of the options is easy - just a case of moving LoadOptionalFeatureStates() a few lines up - but Install_launcher is set much later. I should be able to fix both though. ---------- stage: -> needs patch versions: +Python 3.8, Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:46:01 2019 From: report at bugs.python.org (Zachary Ware) Date: Mon, 09 Sep 2019 10:46:01 +0000 Subject: [issue36250] pdb: interaction might cause "ValueError: signal only works in main thread" In-Reply-To: <1552141425.82.0.352633065246.issue36250@roundup.psfhosted.org> Message-ID: <1568025961.53.0.7164553642.issue36250@roundup.psfhosted.org> Zachary Ware added the comment: New changeset 8d64bfafdffd9f866bb6ac2e5b4c4bdfcb16aea0 by Zachary Ware (Daniel Hahler) in branch 'master': bpo-36250: ignore ValueError from signal in non-main thread (GH-12251) https://github.com/python/cpython/commit/8d64bfafdffd9f866bb6ac2e5b4c4bdfcb16aea0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:46:12 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 10:46:12 +0000 Subject: [issue36250] pdb: interaction might cause "ValueError: signal only works in main thread" In-Reply-To: <1552141425.82.0.352633065246.issue36250@roundup.psfhosted.org> Message-ID: <1568025972.57.0.249703123163.issue36250@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15406 pull_request: https://github.com/python/cpython/pull/15752 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:47:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 10:47:18 +0000 Subject: [issue38063] Modify test_socket.py to use unittest test discovery In-Reply-To: <1568025092.75.0.792665697576.issue38063@roundup.psfhosted.org> Message-ID: <1568026038.1.0.985012560413.issue38063@roundup.psfhosted.org> STINNER Victor added the comment: > See also #14408 In 2012, test_main() was used to skip a few test cases. But since that time, the availability tests were moved from test_main() to the test case classes directly using unittest.skipIf or unittest.skipUnless decorators. So now using unittest.main() became trivial. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:47:30 2019 From: report at bugs.python.org (Zachary Ware) Date: Mon, 09 Sep 2019 10:47:30 +0000 Subject: [issue36250] pdb: interaction might cause "ValueError: signal only works in main thread" In-Reply-To: <1552141425.82.0.352633065246.issue36250@roundup.psfhosted.org> Message-ID: <1568026050.53.0.0987532575183.issue36250@roundup.psfhosted.org> Change by Zachary Ware : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:47:44 2019 From: report at bugs.python.org (Ma Lin) Date: Mon, 09 Sep 2019 10:47:44 +0000 Subject: [issue38037] reference counter issue in signal module In-Reply-To: <1567682048.52.0.677025547591.issue38037@roundup.psfhosted.org> Message-ID: <1568026064.28.0.0843344841874.issue38037@roundup.psfhosted.org> Change by Ma Lin : ---------- pull_requests: +15407 pull_request: https://github.com/python/cpython/pull/15753 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:50:23 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 09 Sep 2019 10:50:23 +0000 Subject: [issue37383] call count in not registered in AsyncMock till the coroutine is awaited In-Reply-To: <1561372216.92.0.906837687381.issue37383@roundup.psfhosted.org> Message-ID: <1568026223.93.0.545464297225.issue37383@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: > I wonder if `await_count` is really necessary, since it is essentially the same as `call_count`. Would it be too late or confusing to remove it now? IMO if we are to document that mock_calls is recorded over await then we can have both call_count and await_count because if users start using AsyncMock then they can keep using the call_* functions. Removing it would mean there are also other counterparts as below to make sure we keep or remove all to remove discrepancy. I am more leaned towards keeping them and document it. >>> m.await m.await_args m.await_args_list m.await_count m.awaited >>> m.call m.call_args m.call_args_list m.call_count m.called With respect to removal I think the window is still open till the 3.8.0RC1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:50:55 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 09 Sep 2019 10:50:55 +0000 Subject: [issue33523] loop.run_until_complete re-entrancy to support more complicated codebases in transition to asyncio In-Reply-To: <1526401266.56.0.682650639539.issue33523@psf.upfronthosting.co.za> Message-ID: <1568026255.13.0.208915033651.issue33523@roundup.psfhosted.org> Andrew Svetlov added the comment: Let's close the issue as "won't fix". Third-party loop implementation *can* be reentrant but we don't want to encourage people to use this pattern in stdlib. ---------- resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:52:43 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 09 Sep 2019 10:52:43 +0000 Subject: [issue37909] Thread pool return ref hold memory In-Reply-To: <1566420903.63.0.857548145971.issue37909@roundup.psfhosted.org> Message-ID: <1568026363.01.0.164624497441.issue37909@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:54:57 2019 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 09 Sep 2019 10:54:57 +0000 Subject: [issue33523] loop.run_until_complete re-entrancy to support more complicated codebases in transition to asyncio In-Reply-To: <1526401266.56.0.682650639539.issue33523@psf.upfronthosting.co.za> Message-ID: <1568026497.46.0.541365554352.issue33523@roundup.psfhosted.org> Yury Selivanov added the comment: ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:55:25 2019 From: report at bugs.python.org (Zachary Ware) Date: Mon, 09 Sep 2019 10:55:25 +0000 Subject: [issue37212] ordered keyword arguments in unittest.mock.call repr and error messages In-Reply-To: <1560153217.35.0.990763770677.issue37212@roundup.psfhosted.org> Message-ID: <1568026525.23.0.531618741497.issue37212@roundup.psfhosted.org> Zachary Ware added the comment: New changeset 9d607061c9c888913ae2c18543775cf360d55f27 by Zachary Ware (Xtreak) in branch 'master': bpo-37212: Preserve keyword argument order in unittest.mock.call and error messages (GH-14310) https://github.com/python/cpython/commit/9d607061c9c888913ae2c18543775cf360d55f27 ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:56:50 2019 From: report at bugs.python.org (Paul Ganssle) Date: Mon, 09 Sep 2019 10:56:50 +0000 Subject: [issue38065] Document the datetime capsule API Message-ID: <1568026610.33.0.270212554664.issue38065@roundup.psfhosted.org> New submission from Paul Ganssle : The datetime module has a capsule API, which is very useful for other languages' bindings, but the C API documentation for datetime only covers the C macros: https://docs.python.org/3/c-api/datetime.html The current extent of the documentation is that everyone who wants to bind to the C API (PyO3, Cython, pypy, etc), you need to just read the struct definition ( https://github.com/python/cpython/blob/master/Include/datetime.h#L150 ) and reads `_datetimemodule.c`. There's even some question as to whether the capsule is public (see, e.g. https://github.com/PyO3/pyo3/pull/393#issuecomment-476664650 ), when in fact I'm fairly certain that it's actually *preferred* to use the capsule API. Most or many of the macros are thin wrappers around the capsule API, so we may need to figure out whether we want to try and use the same "documentation" for both versions, e.g.: .. c:function:: PyObject* PyDateTime_CAPI.Date_FromDate(int year, int month, int day, PyTypeObject* cls) .. c:function:: PyObject* PyDate_FromDate(int year, int month, int day) Return a :class:`datetime.date` object with the specified year, month and day. The version of this function in the capsule module takes an additional argument representing the specific subclass to construct. Could replace: .. c:function:: PyObject* PyDate_FromDate(int year, int month, int day) Return a :class:`datetime.date` object with the specified year, month and day. I would say that we also need a paragraph or two at the beginning of the C API document explaining why there are two ways to access most of these things? A more minor bikeshedding-y issue is how we should stylize these: PyDatetime_CAPI.x? PyDatetime_CAPI->x? A dedicated RST directive? Something else? ---------- assignee: docs at python components: Documentation messages: 351427 nosy: belopolsky, docs at python, eric.araujo, ezio.melotti, mdk, p-ganssle, willingc priority: normal severity: normal status: open title: Document the datetime capsule API type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:57:14 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 10:57:14 +0000 Subject: [issue37212] ordered keyword arguments in unittest.mock.call repr and error messages In-Reply-To: <1560153217.35.0.990763770677.issue37212@roundup.psfhosted.org> Message-ID: <1568026634.89.0.438587256317.issue37212@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15408 pull_request: https://github.com/python/cpython/pull/15755 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:59:04 2019 From: report at bugs.python.org (Lisa Roach) Date: Mon, 09 Sep 2019 10:59:04 +0000 Subject: [issue37383] call count in not registered in AsyncMock till the coroutine is awaited In-Reply-To: <1561372216.92.0.906837687381.issue37383@roundup.psfhosted.org> Message-ID: <1568026744.71.0.248516635169.issue37383@roundup.psfhosted.org> Lisa Roach added the comment: I think you are right, I'd prefer to leave it in. It also helps users who are switching from AsyncTest to the std lib AsyncMock, they can keep using `await_count`. I'll update the docs! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 06:59:38 2019 From: report at bugs.python.org (Zachary Ware) Date: Mon, 09 Sep 2019 10:59:38 +0000 Subject: [issue37212] ordered keyword arguments in unittest.mock.call repr and error messages In-Reply-To: <1560153217.35.0.990763770677.issue37212@roundup.psfhosted.org> Message-ID: <1568026778.85.0.29669949871.issue37212@roundup.psfhosted.org> Change by Zachary Ware : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 07:02:26 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 11:02:26 +0000 Subject: [issue37841] Python store app launcher has dependency on msvcp140.dll In-Reply-To: <1565711367.34.0.212877315326.issue37841@roundup.psfhosted.org> Message-ID: <1568026946.4.0.877505597867.issue37841@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15409 pull_request: https://github.com/python/cpython/pull/15756 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 07:07:48 2019 From: report at bugs.python.org (Thomas Wouters) Date: Mon, 09 Sep 2019 11:07:48 +0000 Subject: [issue37589] Missing dependences in the Makefile In-Reply-To: <1563087187.08.0.733315200631.issue37589@roundup.psfhosted.org> Message-ID: <1568027268.22.0.575062988586.issue37589@roundup.psfhosted.org> Change by Thomas Wouters : ---------- keywords: +patch pull_requests: +15410 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15757 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 07:10:59 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 09 Sep 2019 11:10:59 +0000 Subject: [issue37683] Use importlib.resources in venv In-Reply-To: <1564077021.19.0.886613759672.issue37683@roundup.psfhosted.org> Message-ID: <1568027459.81.0.478684623991.issue37683@roundup.psfhosted.org> Vinay Sajip added the comment: The install_scripts() API is intended to allow users to add their own venv-specific scripts from their own project folders. We could add an install_resources() method, which would add all the resources in a given package. The signature would be def install_resources(self, context, package_name): ... To do this for the existing scripts directory would require adding __init__.py files to each directory in this scripts tree, right? This wouldn't really give any particular benefits, as the __init__.py files would need to be filtered out when copying to the venv's binaries folder. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 07:24:15 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 09 Sep 2019 11:24:15 +0000 Subject: [issue34652] never enable lchmod on Linux In-Reply-To: <1536788618.14.0.956365154283.issue34652@psf.upfronthosting.co.za> Message-ID: <1568028255.85.0.0981485041928.issue34652@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- pull_requests: +15411 pull_request: https://github.com/python/cpython/pull/15758 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 07:24:54 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 11:24:54 +0000 Subject: [issue37283] Unexpected behavior when running installer a second time with the same arguments or unattend.xml In-Reply-To: <1560514187.3.0.83059947509.issue37283@roundup.psfhosted.org> Message-ID: <1568028294.79.0.703383952554.issue37283@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +15412 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15759 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 07:25:24 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 11:25:24 +0000 Subject: [issue36250] pdb: interaction might cause "ValueError: signal only works in main thread" In-Reply-To: <1552141425.82.0.352633065246.issue36250@roundup.psfhosted.org> Message-ID: <1568028324.27.0.688909324614.issue36250@roundup.psfhosted.org> miss-islington added the comment: New changeset 87a5a331eab5a99538d60a6dab25bdf299a68e3e by Miss Islington (bot) in branch '3.8': bpo-36250: ignore ValueError from signal in non-main thread (GH-12251) https://github.com/python/cpython/commit/87a5a331eab5a99538d60a6dab25bdf299a68e3e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 07:30:34 2019 From: report at bugs.python.org (Eric Snow) Date: Mon, 09 Sep 2019 11:30:34 +0000 Subject: [issue36876] Global C variables are a problem. In-Reply-To: <1557514902.13.0.853517754348.issue36876@roundup.psfhosted.org> Message-ID: <1568028634.31.0.215767792921.issue36876@roundup.psfhosted.org> Change by Eric Snow : ---------- pull_requests: +15413 pull_request: https://github.com/python/cpython/pull/15760 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 07:30:41 2019 From: report at bugs.python.org (Zachary Ware) Date: Mon, 09 Sep 2019 11:30:41 +0000 Subject: [issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method In-Reply-To: <1536239121.16.0.56676864532.issue34596@psf.upfronthosting.co.za> Message-ID: <1568028641.98.0.0294405598821.issue34596@roundup.psfhosted.org> Zachary Ware added the comment: I think we need Michael's ruling on which way to go here. I'm fine with either an exception or a default reason, but still lean towards the default. I don't think `skipIf` or `skipUnless` really need a change either way; they both require two arguments and thus can't be misused in the same way as `skip`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 07:31:19 2019 From: report at bugs.python.org (Davin Potts) Date: Mon, 09 Sep 2019 11:31:19 +0000 Subject: [issue37754] Consistency of Unix's shared_memory implementation with windows In-Reply-To: <1564914758.61.0.506857998168.issue37754@roundup.psfhosted.org> Message-ID: <1568028679.35.0.329663744681.issue37754@roundup.psfhosted.org> Davin Potts added the comment: A shared semaphore approach for the resource tracker sounds appealing as a way to make the behavior on Windows and posix systems more consistent. However this might get implemented, we should not artificially prevent users from having some option to persist beyond the last Python process's exit. I like the point that @eryksun makes that we could instead consider using NtMakePermanentObject on Windows to permit more posix-like behavior instead, but I do not think we want to head down a path of using undocumented NT APIs. In the current code, the resource tracker inappropriately triggers _posixshmem.shm_unlink; we need to fix this in the immediate short term (before 3.8 is released) as it breaks the expected behavior @vinay0410 describes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 07:35:33 2019 From: report at bugs.python.org (Lisa Roach) Date: Mon, 09 Sep 2019 11:35:33 +0000 Subject: [issue37383] call count in not registered in AsyncMock till the coroutine is awaited In-Reply-To: <1561372216.92.0.906837687381.issue37383@roundup.psfhosted.org> Message-ID: <1568028933.01.0.967900454957.issue37383@roundup.psfhosted.org> Change by Lisa Roach : ---------- keywords: +patch pull_requests: +15414 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15761 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 07:38:35 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 09 Sep 2019 11:38:35 +0000 Subject: [issue38066] Hide internal asyncio.Stream methods Message-ID: <1568029115.61.0.532730850424.issue38066@roundup.psfhosted.org> New submission from Andrew Svetlov : As discussed in discussion https://github.com/python/cpython/pull/14488#discussion_r322176319 Hide feed_eof(), feed_data(), set_exception() and set_transport() methods. ---------- components: asyncio messages: 351433 nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Hide internal asyncio.Stream methods versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 07:41:31 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 11:41:31 +0000 Subject: [issue37841] Python store app launcher has dependency on msvcp140.dll In-Reply-To: <1565711367.34.0.212877315326.issue37841@roundup.psfhosted.org> Message-ID: <1568029291.49.0.243282111545.issue37841@roundup.psfhosted.org> miss-islington added the comment: New changeset 58a7f809ac978ed54034b7b48f2ea64000aa4661 by Miss Islington (bot) in branch '3.7': bpo-37841: Remove python_uwp dependency on msvcp140.dll (GH-15253) https://github.com/python/cpython/commit/58a7f809ac978ed54034b7b48f2ea64000aa4661 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 07:41:37 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 09 Sep 2019 11:41:37 +0000 Subject: [issue38066] Hide internal asyncio.Stream methods In-Reply-To: <1568029115.61.0.532730850424.issue38066@roundup.psfhosted.org> Message-ID: <1568029297.58.0.879237401499.issue38066@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +15415 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15762 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 07:42:46 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 11:42:46 +0000 Subject: [issue37212] ordered keyword arguments in unittest.mock.call repr and error messages In-Reply-To: <1560153217.35.0.990763770677.issue37212@roundup.psfhosted.org> Message-ID: <1568029366.1.0.929236714085.issue37212@roundup.psfhosted.org> miss-islington added the comment: New changeset bee8bfe5f440c2dde7f5af189febdbf81b27abd5 by Miss Islington (bot) in branch '3.8': bpo-37212: Preserve keyword argument order in unittest.mock.call and error messages (GH-14310) https://github.com/python/cpython/commit/bee8bfe5f440c2dde7f5af189febdbf81b27abd5 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:13:05 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 09 Sep 2019 12:13:05 +0000 Subject: [issue34652] never enable lchmod on Linux In-Reply-To: <1536788618.14.0.956365154283.issue34652@psf.upfronthosting.co.za> Message-ID: <1568031185.46.0.861640034807.issue34652@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset bed04b664729e3e6fcee42daa108936360bac6ea by Benjamin Peterson in branch 'master': bpo-34652 again: Remove lchmod from the default AC_CHECK_FUNCS list. (GH-15758) https://github.com/python/cpython/commit/bed04b664729e3e6fcee42daa108936360bac6ea ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:13:17 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 12:13:17 +0000 Subject: [issue34652] never enable lchmod on Linux In-Reply-To: <1536788618.14.0.956365154283.issue34652@psf.upfronthosting.co.za> Message-ID: <1568031197.26.0.920233741605.issue34652@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15416 pull_request: https://github.com/python/cpython/pull/15763 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:15:09 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 12:15:09 +0000 Subject: [issue37283] Unexpected behavior when running installer a second time with the same arguments or unattend.xml In-Reply-To: <1560514187.3.0.83059947509.issue37283@roundup.psfhosted.org> Message-ID: <1568031309.96.0.339261272893.issue37283@roundup.psfhosted.org> Steve Dower added the comment: New changeset 3a0ddbcdfcbc0f4372905fabf81e093f1b043e99 by Steve Dower in branch 'master': bpo-37283: Ensure command-line and unattend.xml setting override previously detected states in Windows installer (GH-15759) https://github.com/python/cpython/commit/3a0ddbcdfcbc0f4372905fabf81e093f1b043e99 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:15:25 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 12:15:25 +0000 Subject: [issue37283] Unexpected behavior when running installer a second time with the same arguments or unattend.xml In-Reply-To: <1560514187.3.0.83059947509.issue37283@roundup.psfhosted.org> Message-ID: <1568031325.15.0.217247902927.issue37283@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15418 pull_request: https://github.com/python/cpython/pull/15765 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:15:18 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 12:15:18 +0000 Subject: [issue37283] Unexpected behavior when running installer a second time with the same arguments or unattend.xml In-Reply-To: <1560514187.3.0.83059947509.issue37283@roundup.psfhosted.org> Message-ID: <1568031318.24.0.688907971395.issue37283@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15417 pull_request: https://github.com/python/cpython/pull/15764 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:16:03 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 12:16:03 +0000 Subject: [issue32587] Make REG_MULTI_SZ support zero-length strings In-Reply-To: <1516212552.32.0.467229070634.issue32587@psf.upfronthosting.co.za> Message-ID: <1568031363.42.0.4139011078.issue32587@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +15419 pull_request: https://github.com/python/cpython/pull/15766 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:17:22 2019 From: report at bugs.python.org (Thomas Wouters) Date: Mon, 09 Sep 2019 12:17:22 +0000 Subject: [issue37589] Missing dependences in the Makefile In-Reply-To: <1563087187.08.0.733315200631.issue37589@roundup.psfhosted.org> Message-ID: <1568031442.1.0.611026681655.issue37589@roundup.psfhosted.org> Thomas Wouters added the comment: New changeset b4612f5d54aced5bc37f1b85bf50b4cafa2480f0 by T. Wouters in branch 'master': bpo-37589: Add a few missing dependencies on .h files in the Makefile. (GH-15757) https://github.com/python/cpython/commit/b4612f5d54aced5bc37f1b85bf50b4cafa2480f0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:17:30 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 12:17:30 +0000 Subject: [issue37589] Missing dependences in the Makefile In-Reply-To: <1563087187.08.0.733315200631.issue37589@roundup.psfhosted.org> Message-ID: <1568031450.51.0.416107386508.issue37589@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15420 pull_request: https://github.com/python/cpython/pull/15767 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:17:30 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 12:17:30 +0000 Subject: [issue37705] winerror_to_errno implementation In-Reply-To: <1564407660.89.0.454912973453.issue37705@roundup.psfhosted.org> Message-ID: <1568031450.89.0.433331694572.issue37705@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:22:31 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 09 Sep 2019 12:22:31 +0000 Subject: [issue37662] Document venv.EnvBuilder.upgrade_dependencies() In-Reply-To: <1563913525.16.0.930618817758.issue37662@roundup.psfhosted.org> Message-ID: <1568031751.09.0.533461510525.issue37662@roundup.psfhosted.org> Change by Vinay Sajip : ---------- keywords: +patch pull_requests: +15421 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15768 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:23:28 2019 From: report at bugs.python.org (Thomas Wouters) Date: Mon, 09 Sep 2019 12:23:28 +0000 Subject: [issue37589] Missing dependences in the Makefile In-Reply-To: <1563087187.08.0.733315200631.issue37589@roundup.psfhosted.org> Message-ID: <1568031808.6.0.0378763986396.issue37589@roundup.psfhosted.org> Change by Thomas Wouters : ---------- pull_requests: +15422 pull_request: https://github.com/python/cpython/pull/15769 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:24:09 2019 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 09 Sep 2019 12:24:09 +0000 Subject: [issue38066] Hide internal asyncio.Stream methods In-Reply-To: <1568029115.61.0.532730850424.issue38066@roundup.psfhosted.org> Message-ID: <1568031849.03.0.537362614846.issue38066@roundup.psfhosted.org> Yury Selivanov added the comment: BTW, if we are doing this -- maybe not expose the underlying transport at all? I don't like that we do that currently, and there multiple ways for the user to screw up the Stream object (and potentially break start_tls()/sendfile() etc) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:28:17 2019 From: report at bugs.python.org (Emmanuel Arias) Date: Mon, 09 Sep 2019 12:28:17 +0000 Subject: [issue38067] Add headers parameter on RobotFileParser Message-ID: <1568032097.51.0.453299797445.issue38067@roundup.psfhosted.org> New submission from Emmanuel Arias : Hello I open an issue from a PR that I think need discussion: I write here the @fuwaraido's PR description: > I found some website like "sony.co.jp" requests User-Agent field in headers when I try to fetch their robots.txt. Unless they returns 403 Forbidden status code and RobotTextParser fails to read robots.txt. Currently there is no way to specify headers so I propose add headers arguments in constructor. ---------- components: Library (Lib) messages: 351440 nosy: eamanu priority: normal pull_requests: 15423 severity: normal status: open title: Add headers parameter on RobotFileParser type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:33:14 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 12:33:14 +0000 Subject: [issue37702] memory leak in ssl certification In-Reply-To: <1564386329.8.0.956014299339.issue37702@roundup.psfhosted.org> Message-ID: <1568032394.62.0.208851594485.issue37702@roundup.psfhosted.org> Steve Dower added the comment: Thanks for the simpler patch. I'm happier taking that one, given we know the rest of the code already works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:33:46 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 12:33:46 +0000 Subject: [issue37702] memory leak in ssl certification In-Reply-To: <1564386329.8.0.956014299339.issue37702@roundup.psfhosted.org> Message-ID: <1568032426.59.0.600284326042.issue37702@roundup.psfhosted.org> Steve Dower added the comment: New changeset ed70129e15ea028469145111044a4349960a4e6f by Steve Dower (neonene) in branch 'master': bpo-37702: Fix SSL's certificate-store leak on Windows (GH-15632) https://github.com/python/cpython/commit/ed70129e15ea028469145111044a4349960a4e6f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:34:02 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 12:34:02 +0000 Subject: [issue37702] memory leak in ssl certification In-Reply-To: <1564386329.8.0.956014299339.issue37702@roundup.psfhosted.org> Message-ID: <1568032442.33.0.660510235009.issue37702@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15424 pull_request: https://github.com/python/cpython/pull/15770 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:34:09 2019 From: report at bugs.python.org (Davin Potts) Date: Mon, 09 Sep 2019 12:34:09 +0000 Subject: [issue37185] use os.memfd_create in multiprocessing.shared_memory? In-Reply-To: <1559859610.5.0.492744373458.issue37185@roundup.psfhosted.org> Message-ID: <1568032449.1.0.00237560986969.issue37185@roundup.psfhosted.org> Davin Potts added the comment: Unless I am missing something, memfd_create appears to be specific to the Linux kernel still so we would need to replicate its behavior on all of the other unix systems. To your point, but quoting from the docs, "separate invocations of memfd_create with the same name will not return descriptors for the same region of memory". If it is possible to use the anonymous shared memory created via memfd_create in another process (which is arguably the primary motivation / use case for multiprocessing.shared_memory), we would need to replicate the unique way of referencing a shared memory segment when trying to attach to it from other processes. To permit resource management of a shared memory segment (in the sense of ensuring the shared memory segment is always unlinked at the end), the multiprocessing.managers.SharedMemoryManager exists. Because destroying a shared memory segment at exit is not always desirable, the SharedMemoryManager provides additional control over when it is appropriate to unlink a shared memory segment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:35:22 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 12:35:22 +0000 Subject: [issue37702] memory leak in ssl certification In-Reply-To: <1564386329.8.0.956014299339.issue37702@roundup.psfhosted.org> Message-ID: <1568032522.95.0.402943367244.issue37702@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +15425 pull_request: https://github.com/python/cpython/pull/15771 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:38:02 2019 From: report at bugs.python.org (Michael Foord) Date: Mon, 09 Sep 2019 12:38:02 +0000 Subject: [issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method In-Reply-To: <1536239121.16.0.56676864532.issue34596@psf.upfronthosting.co.za> Message-ID: <1568032682.41.0.545348394603.issue34596@roundup.psfhosted.org> Michael Foord added the comment: I'm in favour of a default and "Unconditionally skipped" is fine with me. Although "Skipped" would also be fine. Making @skip work with no arguments is fine. Having to pass in arguments message arguments you don't want is a pain and there's no need to force the user. Let's add a default message and make the skipped tests report as skipped properly on 3.8 and close it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:46:34 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Mon, 09 Sep 2019 12:46:34 +0000 Subject: [issue37488] Document the "gotcha" behaviors in utcnow() and utcfromtimestamp() In-Reply-To: <1562083298.89.0.799843667155.issue37488@roundup.psfhosted.org> Message-ID: <1568033194.32.0.498854953733.issue37488@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- keywords: +patch pull_requests: +15426 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15773 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:46:46 2019 From: report at bugs.python.org (Vinay Sharma) Date: Mon, 09 Sep 2019 12:46:46 +0000 Subject: [issue37754] Consistency of Unix's shared_memory implementation with windows In-Reply-To: <1564914758.61.0.506857998168.issue37754@roundup.psfhosted.org> Message-ID: <1568033206.14.0.830977315141.issue37754@roundup.psfhosted.org> Vinay Sharma added the comment: Hi @davin, I researched on lots of approaches to solve this problem, and I have listed down some of the best ones. 1. As Eryk Sun suggested initially to use advisory locking to implement a reference count type of mechanism. I implemented this in the current Pull Request already open. And it works great on most platforms, but fails on MacOS. This is because MacOS makes no file-system entry like Linux in /dev/shm. In fact it makes no filesystem entry for the created shared memory segment. Therefore this won't work. 2. I thought of creating a manual file entry for the created shared memory segment in /tmp in MacOS. This will work just fine unless the user manually changes the permissions of /tmp directory on MacOS. And we will have to rely on the fact that /tmp is writable if we use this approach. 3. Shared Semaphores: This is a very interesting approach to implement reference count, where a semaphore is created corresponding to every shared memory segment, which keeps reference count of the shared memory. Resource Tracker will clear the shared memory segment and the shared semaphore as soon as the value of the shared semaphore becomes 0. The only problem with this approach is to decide the name of shared semaphore. We will have to define a standardised way to get extract shared semaphore's name from shared segment's name. For instance, shared_semaphore_name = 'psem' + shared_segment_name. This can cause problems if a semaphore with shared_semaphore_name is already present. This could be solved by taking any available name and storing it inside shared memory segment upon creation, and then extracting this name to open the shared semaphore. 4. Another way could be to initialize a semaphore by sem_init() inside the shared memory segment. For example the first 4 bytes can be reserved for semaphore. But, since MacOS has deprecated sem_init(), it wouldn't be a good practice. 5. Atomic Calls: I think this is the most simple and best way to solve the above problem. We can reserve first 4 bytes for an integer which is nothing but the reference count of shared memory, and to prevent data races we could use atomic calls to update it. gcc has inbuilt support for some atomic operations. I have tested them using processes by updating them inside shared memory. And they work great. Following are some atomic calls: type __sync_add_and_fetch (type *ptr, type value, ...) type __sync_sub_and_fetch (type *ptr, type value, ...) type __sync_or_and_fetch (type *ptr, type value, ...) Documentation of these can be found at below links: https://gcc.gnu.org/onlinedocs/gcc/_005f_005fsync-Builtins.html#g_t_005f_005fsync-Builtins https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html#g_t_005f_005fatomic-Builtins ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:53:24 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 09 Sep 2019 12:53:24 +0000 Subject: [issue38068] clean up configure logic for gettimeofday Message-ID: <1568033604.94.0.557427388401.issue38068@roundup.psfhosted.org> New submission from Benjamin Peterson : We assume gettimeofday exists, so we don't need a configure test for it. We should also assume it always takes a second argument per POSIX. ---------- messages: 351446 nosy: benjamin.peterson priority: normal severity: normal status: open title: clean up configure logic for gettimeofday versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:53:45 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Mon, 09 Sep 2019 12:53:45 +0000 Subject: [issue15733] PEP 3121, 384 Refactoring applied to winapi module In-Reply-To: <1345455591.0.0.532625871045.issue15733@psf.upfronthosting.co.za> Message-ID: <1568033625.84.0.609063638484.issue15733@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- keywords: +patch pull_requests: +15427 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15773 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:54:35 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 09 Sep 2019 12:54:35 +0000 Subject: [issue38068] clean up configure logic for gettimeofday In-Reply-To: <1568033604.94.0.557427388401.issue38068@roundup.psfhosted.org> Message-ID: <1568033675.48.0.867762678071.issue38068@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- keywords: +patch pull_requests: +15428 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15775 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:58:05 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 09 Sep 2019 12:58:05 +0000 Subject: [issue36580] unittest.mock does not understand dataclasses In-Reply-To: <1554844113.82.0.464270307904.issue36580@roundup.psfhosted.org> Message-ID: <1568033885.55.0.133054250228.issue36580@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Closing this as not a bug since autospeccing with create_autospec can be used and spec only does attribute access validation. Thanks ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 08:59:03 2019 From: report at bugs.python.org (Lisa Roach) Date: Mon, 09 Sep 2019 12:59:03 +0000 Subject: [issue38054] enhance pdb.set_trace() to run when the specified condition is true In-Reply-To: <1567939455.37.0.149072874331.issue38054@roundup.psfhosted.org> Message-ID: <1568033943.87.0.115240322595.issue38054@roundup.psfhosted.org> Lisa Roach added the comment: Does this flag make things much easier? You would still need an if statement in order to correctly pass in True/False for the trigger flag. ---------- nosy: +lisroach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:01:50 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 13:01:50 +0000 Subject: [issue34652] never enable lchmod on Linux In-Reply-To: <1536788618.14.0.956365154283.issue34652@psf.upfronthosting.co.za> Message-ID: <1568034110.8.0.866888323595.issue34652@roundup.psfhosted.org> miss-islington added the comment: New changeset 12acb5b9c8c21e486083483bded422d8443c38a7 by Miss Islington (bot) in branch '3.8': bpo-34652 again: Remove lchmod from the default AC_CHECK_FUNCS list. (GH-15758) https://github.com/python/cpython/commit/12acb5b9c8c21e486083483bded422d8443c38a7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:02:47 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 13:02:47 +0000 Subject: [issue37283] Unexpected behavior when running installer a second time with the same arguments or unattend.xml In-Reply-To: <1560514187.3.0.83059947509.issue37283@roundup.psfhosted.org> Message-ID: <1568034167.27.0.131286240935.issue37283@roundup.psfhosted.org> miss-islington added the comment: New changeset 2a4a982cbccf66dd8d29439dbd232c79fe3ec44e by Miss Islington (bot) in branch '3.8': bpo-37283: Ensure command-line and unattend.xml setting override previously detected states in Windows installer (GH-15759) https://github.com/python/cpython/commit/2a4a982cbccf66dd8d29439dbd232c79fe3ec44e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:05:54 2019 From: report at bugs.python.org (Jon Janzen) Date: Mon, 09 Sep 2019 13:05:54 +0000 Subject: [issue38053] Update plistlib documentation In-Reply-To: <1567883298.21.0.0945741912998.issue38053@roundup.psfhosted.org> Message-ID: <1568034354.41.0.00482432343732.issue38053@roundup.psfhosted.org> Jon Janzen added the comment: >* Remove notes about the new API being added in 3.4 since 3.4 is no longer supported Per discussion in the PR, this is no longer a goal of this issue ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:07:29 2019 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 09 Sep 2019 13:07:29 +0000 Subject: [issue37499] test_gdb.test_pycfunction should use dedicated test functions In-Reply-To: <1562272164.16.0.880170642341.issue37499@roundup.psfhosted.org> Message-ID: <1568034449.61.0.849773773219.issue37499@roundup.psfhosted.org> Change by Petr Viktorin : ---------- pull_requests: +15429 pull_request: https://github.com/python/cpython/pull/15776 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:08:58 2019 From: report at bugs.python.org (Dino Viehland) Date: Mon, 09 Sep 2019 13:08:58 +0000 Subject: [issue26185] zipfile.ZipInfo slots can raise unexpected AttributeError In-Reply-To: <1453545713.56.0.930101536202.issue26185@psf.upfronthosting.co.za> Message-ID: <1568034538.65.0.969072648774.issue26185@roundup.psfhosted.org> Dino Viehland added the comment: New changeset 992347d7376765fe3f4fc958fb1be193ba21f6c3 by Dino Viehland (Micka?l Schoentgen) in branch 'master': bpo-26185: Fix repr() on empty ZipInfo object (#13441) https://github.com/python/cpython/commit/992347d7376765fe3f4fc958fb1be193ba21f6c3 ---------- nosy: +dino.viehland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:10:25 2019 From: report at bugs.python.org (Zachary Ware) Date: Mon, 09 Sep 2019 13:10:25 +0000 Subject: [issue37936] gitignore file is too broad In-Reply-To: <1566630912.92.0.00349300289224.issue37936@roundup.psfhosted.org> Message-ID: <1568034625.63.0.0872641515772.issue37936@roundup.psfhosted.org> Zachary Ware added the comment: New changeset 9ae9ac1061c76d637ebe9c1d6c6c802311d6ddba by Zachary Ware (Miss Islington (bot)) in branch '3.7': bpo-37936: Avoid ignoring files that we actually do track. (GH-15451) (GH-15748) https://github.com/python/cpython/commit/9ae9ac1061c76d637ebe9c1d6c6c802311d6ddba ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:11:43 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 09 Sep 2019 13:11:43 +0000 Subject: [issue16575] ctypes: unions as arguments In-Reply-To: <1354163044.21.0.431588472559.issue16575@psf.upfronthosting.co.za> Message-ID: <1568034703.75.0.435827561331.issue16575@roundup.psfhosted.org> Vinay Sajip added the comment: Link to issue has changed to: https://github.com/libffi/libffi/issues/33 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:15:30 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 13:15:30 +0000 Subject: [issue37283] Unexpected behavior when running installer a second time with the same arguments or unattend.xml In-Reply-To: <1560514187.3.0.83059947509.issue37283@roundup.psfhosted.org> Message-ID: <1568034930.7.0.853072514126.issue37283@roundup.psfhosted.org> miss-islington added the comment: New changeset d3b8a6bf7c5f7574a3256468c4d0a755ba7a9048 by Miss Islington (bot) in branch '3.7': bpo-37283: Ensure command-line and unattend.xml setting override previously detected states in Windows installer (GH-15759) https://github.com/python/cpython/commit/d3b8a6bf7c5f7574a3256468c4d0a755ba7a9048 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:24:18 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 09 Sep 2019 13:24:18 +0000 Subject: [issue32587] Make REG_MULTI_SZ support zero-length strings In-Reply-To: <1516212552.32.0.467229070634.issue32587@psf.upfronthosting.co.za> Message-ID: <1568035458.47.0.224774294807.issue32587@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset ef66f31ce21cd759cc0c618c5c42ba6da0a06834 by Jason R. Coombs (Steve Dower) in branch 'master': bpo-32587: Fixes unsafe downcast in PC/winreg.c (GH-15766) https://github.com/python/cpython/commit/ef66f31ce21cd759cc0c618c5c42ba6da0a06834 ---------- nosy: +jaraco _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:24:30 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 13:24:30 +0000 Subject: [issue32587] Make REG_MULTI_SZ support zero-length strings In-Reply-To: <1516212552.32.0.467229070634.issue32587@psf.upfronthosting.co.za> Message-ID: <1568035470.59.0.145068855954.issue32587@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15430 pull_request: https://github.com/python/cpython/pull/15777 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:24:37 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 13:24:37 +0000 Subject: [issue32587] Make REG_MULTI_SZ support zero-length strings In-Reply-To: <1516212552.32.0.467229070634.issue32587@psf.upfronthosting.co.za> Message-ID: <1568035477.02.0.182979932905.issue32587@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15431 pull_request: https://github.com/python/cpython/pull/15778 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:26:37 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Mon, 09 Sep 2019 13:26:37 +0000 Subject: [issue38061] FreeBSD: Optimize subprocess.Popen(close_fds=True) using closefrom() In-Reply-To: <1568013936.15.0.668992536534.issue38061@roundup.psfhosted.org> Message-ID: <1568035597.42.0.772137430761.issue38061@roundup.psfhosted.org> Kubilay Kocak added the comment: > Would it be possible to modify FreeBSD to enable it by default? Or is there a reason to not enable it by default? That's very unlikely to happen. I believe it was added as an opt-in feature for some linux compatibility situations. The correct solution is to use closefrom(2), as it is the optimal current solution, and in our case, safe to use. > Which patch? https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221700#c3 or something else? Yep, that one. > It seems like closefrom() is available on: Per #8052 there was some concerns about closefrom(2) not being async-signal safe. [1] I can't speak to other implementations, but this is what I requested clarity from our FreeBSD developers on, and confirmed that our implementation is indeed safe. That is the reason why I thought scoping closefrom(2) to __FreeBSD__ may be warranted, just like like the linux specific bits in https://hg.python.org/cpython/rev/61aa484a3e54 from #8052 But I'll leave the decision as to how its implemented (configure checkls, ifdef'd or not) in your capable hands. Summary: FreeBSD's closefrom(2) is safe to anywhere in Python where it needs to close a range of fd's, including the subprocess module. [1] https://bugs.python.org/issue8052#msg132307 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:28:10 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 13:28:10 +0000 Subject: [issue37589] Missing dependences in the Makefile In-Reply-To: <1563087187.08.0.733315200631.issue37589@roundup.psfhosted.org> Message-ID: <1568035690.4.0.22376699643.issue37589@roundup.psfhosted.org> miss-islington added the comment: New changeset 248387f3f1182087da8f432c989ac6f18315b50f by Miss Islington (bot) in branch '3.8': bpo-37589: Add a few missing dependencies on .h files in the Makefile. (GH-15757) https://github.com/python/cpython/commit/248387f3f1182087da8f432c989ac6f18315b50f ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:33:21 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 13:33:21 +0000 Subject: [issue32587] Make REG_MULTI_SZ support zero-length strings In-Reply-To: <1516212552.32.0.467229070634.issue32587@psf.upfronthosting.co.za> Message-ID: <1568036001.86.0.172425347725.issue32587@roundup.psfhosted.org> Steve Dower added the comment: Fixed, assuming the backports merge okay. ---------- assignee: -> steve.dower resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:33:51 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 13:33:51 +0000 Subject: [issue37283] Unexpected behavior when running installer a second time with the same arguments or unattend.xml In-Reply-To: <1560514187.3.0.83059947509.issue37283@roundup.psfhosted.org> Message-ID: <1568036031.48.0.323633260414.issue37283@roundup.psfhosted.org> Steve Dower added the comment: This will be fixed in the next release. Thanks for the report! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:36:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 13:36:56 +0000 Subject: [issue38061] FreeBSD: Optimize subprocess.Popen(close_fds=True) using closefrom() In-Reply-To: <1568013936.15.0.668992536534.issue38061@roundup.psfhosted.org> Message-ID: <1568036216.79.0.0154697404509.issue38061@roundup.psfhosted.org> STINNER Victor added the comment: > That's very unlikely to happen. I believe it was added as an opt-in feature for some linux compatibility situations. The correct solution is to use closefrom(2), as it is the optimal current solution, and in our case, safe to use. If you have like 50k open file descriptors and want to pass fd 50000 to a child process using Popen(pass_fds={50000}), you will have to call close() 49 997 times: close(3)..close(49999), then closefrom(50001). For the pass_fds case, being able to enumerate open file descriptors (ex: fdescfs) is more efficient than closefrom(). Well, the best would be a system call "close all file descriptors except of ", but it's not available yet. Or maybe at least having a system like close_range(a, b). In May 2019, the close_range() syscall was in the Linux kernel ! https://lwn.net/Articles/789023/ ... but it seems like the feature was not accepted yet. I'm disappointed that posix_spawn() doesn't implement a feature like Python subprocess close_fds=True. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:38:41 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 13:38:41 +0000 Subject: [issue37589] Missing dependences in the Makefile In-Reply-To: <1563087187.08.0.733315200631.issue37589@roundup.psfhosted.org> Message-ID: <1568036321.82.0.0802501245934.issue37589@roundup.psfhosted.org> miss-islington added the comment: New changeset 64f7f6efa0b6ccd5f942b0dd7c63978957d1660e by Miss Islington (bot) (T. Wouters) in branch '3.7': [3.7] bpo-37589: Add a few missing dependencies on .h files in the Makefile. (GH-15757) (GH-15769) https://github.com/python/cpython/commit/64f7f6efa0b6ccd5f942b0dd7c63978957d1660e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:39:06 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 13:39:06 +0000 Subject: [issue37702] memory leak in ssl certification In-Reply-To: <1564386329.8.0.956014299339.issue37702@roundup.psfhosted.org> Message-ID: <1568036346.08.0.96019974846.issue37702@roundup.psfhosted.org> Steve Dower added the comment: Closing now, as we're just waiting on the backports to clear CI. Thanks for your contributions! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:40:47 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 13:40:47 +0000 Subject: [issue37702] memory leak in ssl certification In-Reply-To: <1564386329.8.0.956014299339.issue37702@roundup.psfhosted.org> Message-ID: <1568036447.05.0.142900883269.issue37702@roundup.psfhosted.org> miss-islington added the comment: New changeset 472f37ab9a33050d7d50d1ebe33ba324a51c52c2 by Miss Islington (bot) in branch '3.7': bpo-37702: Fix SSL's certificate-store leak on Windows (GH-15632) https://github.com/python/cpython/commit/472f37ab9a33050d7d50d1ebe33ba324a51c52c2 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:42:44 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Mon, 09 Sep 2019 13:42:44 +0000 Subject: [issue38061] FreeBSD: Optimize subprocess.Popen(close_fds=True) using closefrom() In-Reply-To: <1568013936.15.0.668992536534.issue38061@roundup.psfhosted.org> Message-ID: <1568036564.92.0.346477187905.issue38061@roundup.psfhosted.org> Kubilay Kocak added the comment: On "close_except", close_range and posix_spawn(close_fds=True), I'll talk to my interested FreeBSD colleagues about potential inroads in that regard. In the meantime, we're good on closefrom(2) anywhere it can be used in Python ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:46:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 13:46:29 +0000 Subject: [issue38037] reference counter issue in signal module In-Reply-To: <1567682048.52.0.677025547591.issue38037@roundup.psfhosted.org> Message-ID: <1568036789.7.0.901385771692.issue38037@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 77643c486fd22d8030e0d82c13012684b4ab6df1 by Victor Stinner (animalize) in branch 'master': bpo-38037: Fix reference counters in signal module (GH-15753) https://github.com/python/cpython/commit/77643c486fd22d8030e0d82c13012684b4ab6df1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:48:18 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 13:48:18 +0000 Subject: [issue38037] reference counter issue in signal module In-Reply-To: <1567682048.52.0.677025547591.issue38037@roundup.psfhosted.org> Message-ID: <1568036898.72.0.240348982674.issue38037@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15432 pull_request: https://github.com/python/cpython/pull/15779 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:48:27 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 13:48:27 +0000 Subject: [issue37702] memory leak in ssl certification In-Reply-To: <1564386329.8.0.956014299339.issue37702@roundup.psfhosted.org> Message-ID: <1568036907.07.0.488026536982.issue37702@roundup.psfhosted.org> Steve Dower added the comment: New changeset 5d695b6b7bcccf5f028cdacd986096de15bc0ca6 by Steve Dower in branch '3.8': bpo-37702: Fix SSL's certificate-store leak on Windows (GH-15632) https://github.com/python/cpython/commit/5d695b6b7bcccf5f028cdacd986096de15bc0ca6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:49:10 2019 From: report at bugs.python.org (Matej Cepl) Date: Mon, 09 Sep 2019 13:49:10 +0000 Subject: [issue34155] [CVE-2019-16056] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1568036950.63.0.181984672366.issue34155@roundup.psfhosted.org> Change by Matej Cepl : ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:50:41 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 09 Sep 2019 13:50:41 +0000 Subject: [issue37662] Document venv.EnvBuilder.upgrade_dependencies() In-Reply-To: <1563913525.16.0.930618817758.issue37662@roundup.psfhosted.org> Message-ID: <1568037041.74.0.894852979812.issue37662@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 264e034f990240e2aa379d8484b15b9e70c1fad5 by Vinay Sajip in branch 'master': bpo-37662: Documented venv.EnvBuilder.upgrade_dependencies(). (GH-15768) https://github.com/python/cpython/commit/264e034f990240e2aa379d8484b15b9e70c1fad5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:50:57 2019 From: report at bugs.python.org (Dino Viehland) Date: Mon, 09 Sep 2019 13:50:57 +0000 Subject: [issue38069] Make _posixsubprocess PEP-384 compatible Message-ID: <1568037057.64.0.843985719026.issue38069@roundup.psfhosted.org> Change by Dino Viehland : ---------- assignee: dino.viehland components: Extension Modules nosy: dino.viehland, eric.snow priority: normal severity: normal status: open title: Make _posixsubprocess PEP-384 compatible versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:52:20 2019 From: report at bugs.python.org (Dino Viehland) Date: Mon, 09 Sep 2019 13:52:20 +0000 Subject: [issue38069] Make _posixsubprocess PEP-384 compatible Message-ID: <1568037140.12.0.547735820882.issue38069@roundup.psfhosted.org> Change by Dino Viehland : ---------- keywords: +patch pull_requests: +15433 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15780 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 09:55:08 2019 From: report at bugs.python.org (Thomas Wouters) Date: Mon, 09 Sep 2019 13:55:08 +0000 Subject: [issue37589] Missing dependences in the Makefile In-Reply-To: <1563087187.08.0.733315200631.issue37589@roundup.psfhosted.org> Message-ID: <1568037308.45.0.0575460148504.issue37589@roundup.psfhosted.org> Change by Thomas Wouters : ---------- assignee: -> twouters resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:03:32 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 09 Sep 2019 14:03:32 +0000 Subject: [issue25597] unittest.mock does not wrap dunder methods (__getitem__ etc) In-Reply-To: <1447174958.96.0.448093662654.issue25597@psf.upfronthosting.co.za> Message-ID: <1568037812.85.0.526808278585.issue25597@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This seems to a reasonable change to me since dict.get returns the value then making a contains check dict.__contains__ should return True instead of the fixed return value of False. Below is a patch where the mock_wraps attribute is set with the relevant method that would make sure in the report dict.get would used. diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py index 298b41e0d7..077d22d08e 100644 --- a/Lib/unittest/mock.py +++ b/Lib/unittest/mock.py @@ -1935,6 +1935,12 @@ _side_effect_methods = { def _set_return_value(mock, method, name): + # If _mock_wraps is present then attach it so that it's return + # value is used when called. + if mock._mock_wraps is not None: + method._mock_wraps = getattr(mock._mock_wraps, name) + return + fixed = _return_values.get(name, DEFAULT) if fixed is not DEFAULT: method.return_value = fixed ---------- nosy: +cjw296, mariocj89 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:05:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 14:05:36 +0000 Subject: [issue38070] visit_decref(): add an assertion to check that the object is not freed Message-ID: <1568037936.88.0.10373402622.issue38070@roundup.psfhosted.org> New submission from STINNER Victor : This issue is related to bpo-36389 "Add gc.enable_object_debugger(): detect corrupted Python objects in the GC. I propose to call _PyObject_IsFreed() in visit_decref() in debug mode, to get a better error message if something goes wrong. visit_decref() is commonly found in C traceback (ex: gdb backtrace) of bugs related to the garbage collector. ---------- components: Interpreter Core messages: 351470 nosy: vstinner priority: normal severity: normal status: open title: visit_decref(): add an assertion to check that the object is not freed type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:06:56 2019 From: report at bugs.python.org (Roundup Robot) Date: Mon, 09 Sep 2019 14:06:56 +0000 Subject: [issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method In-Reply-To: <1536239121.16.0.56676864532.issue34596@psf.upfronthosting.co.za> Message-ID: <1568038016.78.0.656616292512.issue34596@roundup.psfhosted.org> Roundup Robot added the comment: New changeset d5fd75c53fad7049fc640c9a6162d35f0c5bea03 by Michael Foord (Naitree Zhu) in branch 'master': bpo-34596: Fallback to a default reason when @unittest.skip is uncalled (#9082) https://github.com/python/cpython/commit/d5fd75c53fad7049fc640c9a6162d35f0c5bea03 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:07:00 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 14:07:00 +0000 Subject: [issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method In-Reply-To: <1536239121.16.0.56676864532.issue34596@psf.upfronthosting.co.za> Message-ID: <1568038020.63.0.731173918595.issue34596@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15434 pull_request: https://github.com/python/cpython/pull/15781 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:09:45 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 14:09:45 +0000 Subject: [issue38070] visit_decref(): add an assertion to check that the object is not freed In-Reply-To: <1568037936.88.0.10373402622.issue38070@roundup.psfhosted.org> Message-ID: <1568038185.7.0.785179339738.issue38070@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +15435 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15782 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:11:30 2019 From: report at bugs.python.org (Zane Bitter) Date: Mon, 09 Sep 2019 14:11:30 +0000 Subject: [issue37857] Setting logger.level directly has no effect due to caching in 3.7+ In-Reply-To: <1565811970.47.0.529067236549.issue37857@roundup.psfhosted.org> Message-ID: <1568038290.85.0.697985678161.issue37857@roundup.psfhosted.org> Zane Bitter added the comment: > That code in the wild that sets the level attribute directly is wrong and should be changed, right? It definitely should be changed (and in our case we did change it once we found it). Whether it's "wrong" is more of a philosophical question ;). But the problem with that is that it's very difficult to find - the object's state appears to be set OK but the behaviour doesn't match because of the hidden cache with different values. > I'm not sure such misuse is widespread. There's no way to be sure. But if you have a public (i.e. non-underscore-prfixed) attribute then some percentage of people are going to set it, particularly if it seems to work. I went back and looked at how this was introduced in the example I linked, and the patch was reviewed by the guy who literally wrote the book on the Python standard library. That suggests to me that this could happen to anyone. The code doesn't look wrong, so mistakes are going to happen. > I don't know what the real-world performance impact would be Me neither, but the good news is that the values are now cached :) So it doesn't impact the performance of logging a message at all. It will have some impact on the performance of rebuilding the cache, but I'd expect it to be negligible in the context of the other work required to rebuild the cache (which includes obtaining a lock). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:12:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 14:12:09 +0000 Subject: [issue38070] visit_decref(): add an assertion to check that the object is not freed In-Reply-To: <1568037936.88.0.10373402622.issue38070@roundup.psfhosted.org> Message-ID: <1568038329.73.0.111275785287.issue38070@roundup.psfhosted.org> STINNER Victor added the comment: > visit_decref() is commonly found in C traceback (ex: gdb backtrace) of bugs related to the garbage collector. Example with attached bpo-38037-bug.patch: you can apply this patch on the master branch to reintroduce bpo-38037 bug. vstinner at apu$ git apply bpo-38037-bug.patch vstinner at apu$ make Without PR 15782: vstinner at apu$ ./python -c pass Segmentation fault (core dumped) With PR 15782: vstinner at apu$ ./python -c pass Modules/gcmodule.c:379: visit_decref: Assertion "!_PyObject_IsFreed(op)" failed Fatal Python error: _PyObject_AssertFailed Current thread 0x00007f171a280740 (most recent call first): Aborted (core dumped) The bug is catched earlier. And Python provides more information. ---------- Added file: https://bugs.python.org/file48602/bpo-38037-bug.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:13:46 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 09 Sep 2019 14:13:46 +0000 Subject: [issue38053] Update plistlib documentation In-Reply-To: <1567883298.21.0.0945741912998.issue38053@roundup.psfhosted.org> Message-ID: <1568038426.11.0.211350561065.issue38053@roundup.psfhosted.org> Ronald Oussoren added the comment: New changeset 24b11b8c95e96cf9c93fb7fc253e6e96506f2d77 by Ronald Oussoren (Jon Janzen) in branch 'master': bpo-38053 Update documentation for plistlib (GH-15727) https://github.com/python/cpython/commit/24b11b8c95e96cf9c93fb7fc253e6e96506f2d77 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:14:24 2019 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 09 Sep 2019 14:14:24 +0000 Subject: [issue38053] Update plistlib documentation In-Reply-To: <1567883298.21.0.0945741912998.issue38053@roundup.psfhosted.org> Message-ID: <1568038464.5.0.679207436758.issue38053@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:15:46 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 14:15:46 +0000 Subject: [issue38059] Using sys.exit() over exit() in inspect.py In-Reply-To: <1567966950.72.0.597820636326.issue38059@roundup.psfhosted.org> Message-ID: <1568038546.15.0.141660827993.issue38059@roundup.psfhosted.org> Steve Dower added the comment: New changeset e3c59a75279b0df4e7553d6f0031e202de434e43 by Steve Dower (Alan Yee) in branch 'master': bpo-38059: Using sys.exit() over exit() in inspect.py (GH-15666) https://github.com/python/cpython/commit/e3c59a75279b0df4e7553d6f0031e202de434e43 ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:15:57 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 14:15:57 +0000 Subject: [issue38059] Using sys.exit() over exit() in inspect.py In-Reply-To: <1567966950.72.0.597820636326.issue38059@roundup.psfhosted.org> Message-ID: <1568038557.01.0.463596982001.issue38059@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch pull_requests: +15436 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15783 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:16:05 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 14:16:05 +0000 Subject: [issue38059] Using sys.exit() over exit() in inspect.py In-Reply-To: <1567966950.72.0.597820636326.issue38059@roundup.psfhosted.org> Message-ID: <1568038565.88.0.192729715372.issue38059@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15437 pull_request: https://github.com/python/cpython/pull/15784 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:18:05 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 14:18:05 +0000 Subject: [issue38059] Using sys.exit() over exit() in inspect.py In-Reply-To: <1567966950.72.0.597820636326.issue38059@roundup.psfhosted.org> Message-ID: <1568038685.19.0.823940199815.issue38059@roundup.psfhosted.org> Steve Dower added the comment: Thanks! This helps people who use the "-S" option. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:23:39 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 14:23:39 +0000 Subject: [issue32587] Make REG_MULTI_SZ support zero-length strings In-Reply-To: <1516212552.32.0.467229070634.issue32587@psf.upfronthosting.co.za> Message-ID: <1568039019.97.0.123636689302.issue32587@roundup.psfhosted.org> miss-islington added the comment: New changeset 44729c9f5198211faf533da49fa0fa26693a1993 by Miss Islington (bot) in branch '3.8': bpo-32587: Fixes unsafe downcast in PC/winreg.c (GH-15766) https://github.com/python/cpython/commit/44729c9f5198211faf533da49fa0fa26693a1993 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:23:46 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 14:23:46 +0000 Subject: [issue38007] Regression: name of PyType_Spec::slots conflicts with Qt macro In-Reply-To: <1567419827.68.0.665093966998.issue38007@roundup.psfhosted.org> Message-ID: <1568039026.22.0.423119618823.issue38007@roundup.psfhosted.org> Steve Dower added the comment: Yes, even as a struct member name (at least in the definition), the C preprocessor will substitute a macro. It sounds like Qt defines a macro "slots", and so the definition of the struct will be broken. Unfortunately, this would be a more significant change than removing the deprecated tp_print field, which we eventually decided not to do because of the compatibility impact. So I can confidently say we won't be able to do this one either. ---------- nosy: +steve.dower resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:25:23 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 14:25:23 +0000 Subject: [issue32587] Make REG_MULTI_SZ support zero-length strings In-Reply-To: <1516212552.32.0.467229070634.issue32587@psf.upfronthosting.co.za> Message-ID: <1568039123.8.0.449041933933.issue32587@roundup.psfhosted.org> miss-islington added the comment: New changeset 55a6f73b49625ebff575521c3a0b919880f5f0ec by Miss Islington (bot) in branch '3.7': bpo-32587: Fixes unsafe downcast in PC/winreg.c (GH-15766) https://github.com/python/cpython/commit/55a6f73b49625ebff575521c3a0b919880f5f0ec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:30:11 2019 From: report at bugs.python.org (Dino Viehland) Date: Mon, 09 Sep 2019 14:30:11 +0000 Subject: [issue38071] Make termios PEP-384 compatible Message-ID: <1568039411.64.0.805971266622.issue38071@roundup.psfhosted.org> Change by Dino Viehland : ---------- components: Extension Modules nosy: dino.viehland, eric.snow priority: normal severity: normal status: open title: Make termios PEP-384 compatible type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:31:35 2019 From: report at bugs.python.org (Dino Viehland) Date: Mon, 09 Sep 2019 14:31:35 +0000 Subject: [issue38071] Make termios PEP-384 compatible Message-ID: <1568039495.57.0.237762091689.issue38071@roundup.psfhosted.org> Change by Dino Viehland : ---------- keywords: +patch pull_requests: +15438 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15785 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:33:10 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 09 Sep 2019 14:33:10 +0000 Subject: [issue37857] Setting logger.level directly has no effect due to caching in 3.7+ In-Reply-To: <1565811970.47.0.529067236549.issue37857@roundup.psfhosted.org> Message-ID: <1568039590.34.0.957104244086.issue37857@roundup.psfhosted.org> Vinay Sajip added the comment: > There's no way to be sure. But if you have a public (i.e. non-underscore-prfixed) attribute then some percentage of people are going to set it, particularly if it seems to work. Well, reading it isn't problematic, so there's no leading underscore. (The setXXX() code in logging predates Python 2 and properties). > The code doesn't look wrong, so mistakes are going to happen. That's true for lots of code. Sure, mistakes will happen, and that's the price paid when one doesn't follow documentation. It feels wrong to do this as a band-aid to help out people who didn't do the right thing. > but the good news is that the values are now cached That's not relevant to the performance numbers I posted above, is it? In that code snippet, that's a single constant value (0) that's being returned either via an attribute, or via a property. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:35:21 2019 From: report at bugs.python.org (Lisa Roach) Date: Mon, 09 Sep 2019 14:35:21 +0000 Subject: [issue30782] Allow limiting the number of concurrent tasks in asyncio.as_completed In-Reply-To: <1498525522.6.0.617023291854.issue30782@psf.upfronthosting.co.za> Message-ID: <1568039721.15.0.0662390598093.issue30782@roundup.psfhosted.org> Lisa Roach added the comment: I would like to see this implemented. I run into memory and speed issues when running with 1000+ tasks quite frequently, and have to write my own rate limiters around it. It doesn't look to me that it is adding a large amount of complexity to as_completed. This was closed in 2017, perhaps it is worth revisiting? ---------- nosy: +lisroach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:40:33 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 09 Sep 2019 14:40:33 +0000 Subject: [issue1652] subprocess should have an option to restore SIGPIPE to default action In-Reply-To: <1197992466.47.0.0612439954222.issue1652@psf.upfronthosting.co.za> Message-ID: <1568040033.71.0.0129863630513.issue1652@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:41:34 2019 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 09 Sep 2019 14:41:34 +0000 Subject: [issue30782] Allow limiting the number of concurrent tasks in asyncio.as_completed In-Reply-To: <1498525522.6.0.617023291854.issue30782@psf.upfronthosting.co.za> Message-ID: <1568040094.85.0.114131918138.issue30782@roundup.psfhosted.org> Yury Selivanov added the comment: We want to add TaskGroups to asyncio (a similar concept to Trio's nurseries). TaskGroups use the `async with` statement to clearly define where Tasks are created and at which point they are expected to be completed or destroyed. asyncio.gather(), asyncio.as_completed(), and few others will be considered legacy APIs after we implement TaskGroups. Implementing rate limiting on top of TaskGroups is easier and more reliable. I'd really prefer to keep as_completed() and especially gather() as is, as I consider them a bit broken already. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:42:38 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 14:42:38 +0000 Subject: [issue38037] reference counter issue in signal module In-Reply-To: <1567682048.52.0.677025547591.issue38037@roundup.psfhosted.org> Message-ID: <1568040158.68.0.339407626993.issue38037@roundup.psfhosted.org> miss-islington added the comment: New changeset b150d0bf1bb4c3203bb3293625e32aed01b25887 by Miss Islington (bot) in branch '3.8': bpo-38037: Fix reference counters in signal module (GH-15753) https://github.com/python/cpython/commit/b150d0bf1bb4c3203bb3293625e32aed01b25887 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:43:53 2019 From: report at bugs.python.org (Lisa Roach) Date: Mon, 09 Sep 2019 14:43:53 +0000 Subject: [issue30782] Allow limiting the number of concurrent tasks in asyncio.as_completed In-Reply-To: <1498525522.6.0.617023291854.issue30782@psf.upfronthosting.co.za> Message-ID: <1568040233.21.0.825126539334.issue30782@roundup.psfhosted.org> Lisa Roach added the comment: Sounds good, thanks for the explanation Yury. I look forward to the TaskGroups! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:44:10 2019 From: report at bugs.python.org (Michael Foord) Date: Mon, 09 Sep 2019 14:44:10 +0000 Subject: [issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method In-Reply-To: <1536239121.16.0.56676864532.issue34596@psf.upfronthosting.co.za> Message-ID: <1568040250.07.0.871605079059.issue34596@roundup.psfhosted.org> Change by Michael Foord : ---------- assignee: -> michael.foord components: +Extension Modules -Library (Lib), Tests resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:44:15 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 14:44:15 +0000 Subject: [issue38037] reference counter issue in signal module In-Reply-To: <1567682048.52.0.677025547591.issue38037@roundup.psfhosted.org> Message-ID: <1568040255.84.0.971941755127.issue38037@roundup.psfhosted.org> STINNER Victor added the comment: Thanks for the fix animalize. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:46:09 2019 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 09 Sep 2019 14:46:09 +0000 Subject: [issue30782] Allow limiting the number of concurrent tasks in asyncio.as_completed In-Reply-To: <1498525522.6.0.617023291854.issue30782@psf.upfronthosting.co.za> Message-ID: <1568040369.51.0.93864143305.issue30782@roundup.psfhosted.org> Yury Selivanov added the comment: FWIW I've been using TaskGroups in EdgeDB codebase extensively: https://github.com/edgedb/edgedb/blob/master/edb/common/taskgroup.py (you can use the code, it's Apache 2) The only thing that prevented us from merging them in 3.8 is that we need to formally define & implement ExceptionGroup (or MultiError) in CPython. I'm going to work on an initial PEP for that this week. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:50:39 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 14:50:39 +0000 Subject: [issue37876] Tests for Rot13 codec In-Reply-To: <1565971596.92.0.47171524836.issue37876@roundup.psfhosted.org> Message-ID: <1568040639.93.0.366349598284.issue37876@roundup.psfhosted.org> Steve Dower added the comment: New changeset b3b48c81f09d1472010937f1331c5a208a2a2d48 by Steve Dower (Zeth) in branch 'master': bpo-37876: Tests for ROT-13 codec (GH-15314) https://github.com/python/cpython/commit/b3b48c81f09d1472010937f1331c5a208a2a2d48 ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:50:52 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 14:50:52 +0000 Subject: [issue37876] Tests for Rot13 codec In-Reply-To: <1565971596.92.0.47171524836.issue37876@roundup.psfhosted.org> Message-ID: <1568040652.56.0.698836026961.issue37876@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch pull_requests: +15439 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15786 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:52:37 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 09 Sep 2019 14:52:37 +0000 Subject: [issue36797] Cull more oudated distutils information In-Reply-To: <1557003947.84.0.478951846534.issue36797@roundup.psfhosted.org> Message-ID: <1568040757.29.0.910686175147.issue36797@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset cabcbbe7a518d53cd7dbb915ceccf4970c2d0ea5 by St?phane Wirtel (Miss Islington (bot)) in branch '3.8': bpo-36797: Fix a dead link in Doc/distutils/apiref (GH-15700) (GH-15704) https://github.com/python/cpython/commit/cabcbbe7a518d53cd7dbb915ceccf4970c2d0ea5 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:51:40 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 14:51:40 +0000 Subject: [issue37876] Tests for Rot13 codec In-Reply-To: <1565971596.92.0.47171524836.issue37876@roundup.psfhosted.org> Message-ID: <1568040700.7.0.435360895849.issue37876@roundup.psfhosted.org> Steve Dower added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:53:07 2019 From: report at bugs.python.org (Lisa Roach) Date: Mon, 09 Sep 2019 14:53:07 +0000 Subject: [issue30782] Allow limiting the number of concurrent tasks in asyncio.as_completed In-Reply-To: <1568040369.51.0.93864143305.issue30782@roundup.psfhosted.org> Message-ID: Lisa Roach added the comment: Oh nice, I remember talking to you about the MultiError before, it will help simplify some Mock things. Happy to help out if you want more eyes on it. On Mon, Sep 9, 2019 at 3:46 PM Yury Selivanov wrote: > > Yury Selivanov added the comment: > > FWIW I've been using TaskGroups in EdgeDB codebase extensively: > https://github.com/edgedb/edgedb/blob/master/edb/common/taskgroup.py (you > can use the code, it's Apache 2) > > The only thing that prevented us from merging them in 3.8 is that we need > to formally define & implement ExceptionGroup (or MultiError) in CPython. > I'm going to work on an initial PEP for that this week. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:54:30 2019 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 09 Sep 2019 14:54:30 +0000 Subject: [issue30782] Allow limiting the number of concurrent tasks in asyncio.as_completed In-Reply-To: <1498525522.6.0.617023291854.issue30782@psf.upfronthosting.co.za> Message-ID: <1568040870.88.0.193876470887.issue30782@roundup.psfhosted.org> Yury Selivanov added the comment: > it will help simplify some Mock things. Yeah, we'll need to chat about that so I can use Mock requirements in the PEP. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:56:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 14:56:03 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1568040963.11.0.13409876932.issue38006@roundup.psfhosted.org> STINNER Victor added the comment: New changeset a2af05a0d3f0da06b8d432f52efa3ecf29038532 by Victor Stinner in branch 'master': bpo-38006: Avoid closure in weakref.WeakValueDictionary (GH-15641) https://github.com/python/cpython/commit/a2af05a0d3f0da06b8d432f52efa3ecf29038532 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:56:12 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 14:56:12 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1568040972.34.0.120684351716.issue38006@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15440 pull_request: https://github.com/python/cpython/pull/15787 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:58:35 2019 From: report at bugs.python.org (Dino Viehland) Date: Mon, 09 Sep 2019 14:58:35 +0000 Subject: [issue38072] Make grp module PEP-384 compatible Message-ID: <1568041115.77.0.778733211879.issue38072@roundup.psfhosted.org> Change by Dino Viehland : ---------- assignee: dino.viehland components: Extension Modules nosy: dino.viehland, eric.snow priority: normal severity: normal status: open title: Make grp module PEP-384 compatible versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 10:59:37 2019 From: report at bugs.python.org (Dino Viehland) Date: Mon, 09 Sep 2019 14:59:37 +0000 Subject: [issue38072] Make grp module PEP-384 compatible Message-ID: <1568041177.2.0.194380521682.issue38072@roundup.psfhosted.org> Change by Dino Viehland : ---------- keywords: +patch pull_requests: +15441 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15788 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:00:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 15:00:00 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1568041200.05.0.986955859134.issue38006@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15442 pull_request: https://github.com/python/cpython/pull/15789 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:01:17 2019 From: report at bugs.python.org (Roundup Robot) Date: Mon, 09 Sep 2019 15:01:17 +0000 Subject: [issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method In-Reply-To: <1536239121.16.0.56676864532.issue34596@psf.upfronthosting.co.za> Message-ID: <1568041277.88.0.6899255714.issue34596@roundup.psfhosted.org> Roundup Robot added the comment: New changeset 3bd4bed78a0b068e28bcf2242d33aed227c2532c by Michael Foord (Miss Islington (bot)) in branch '3.8': bpo-34596: Fallback to a default reason when @unittest.skip is uncalled (GH-9082) (#15781) https://github.com/python/cpython/commit/3bd4bed78a0b068e28bcf2242d33aed227c2532c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:08:25 2019 From: report at bugs.python.org (Tim Peters) Date: Mon, 09 Sep 2019 15:08:25 +0000 Subject: [issue38060] precedence (relational, logical operator)not working with single value In-Reply-To: <1568000145.4.0.491367390087.issue38060@roundup.psfhosted.org> Message-ID: <1568041705.58.0.756090980018.issue38060@roundup.psfhosted.org> Tim Peters added the comment: @sangeetamchauhan, the reply you got in the image you attached was in error - kind of. Section "6.16. Operator precedence" defines Python's operator precedence: https://docs.python.org/3/reference/expressions.html#index-92 """ The following table summarizes the operator precedence in Python, from lowest precedence (least binding) to highest precedence (most binding). """ As you can see there, "and" and "or" are very near the top of the table, so bind very weakly - almost anything else on either side gets evaluated first. In particular, all comparison operators bind more tightly than "and" and "or". It's the bitwise operators (| & ^) that bind more tightly than comparisons. I asked at the start "What do you expect?" but you never answered. You just keep repeating that it's wrong. Sorry, but I still have no idea what you think "should" happen instead. As I also said the start, 9 or 7 > "str" groups as 9 or (7 > "str") exactly as the operator precedence table says it should, and returns 9, exactly as the docs for "or" say it should do. What about that do you think is wrong? Please be very specific, and back your answer with a reference to what the docs actually say. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:15:55 2019 From: report at bugs.python.org (Dino Viehland) Date: Mon, 09 Sep 2019 15:15:55 +0000 Subject: [issue38073] Make pwd module PEP-384 compatible Message-ID: <1568042155.96.0.920833676792.issue38073@roundup.psfhosted.org> New submission from Dino Viehland : Make the pwd module PEP-384 compatible ---------- assignee: dino.viehland components: Extension Modules messages: 351495 nosy: dino.viehland, eric.snow priority: normal severity: normal status: open title: Make pwd module PEP-384 compatible versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:16:43 2019 From: report at bugs.python.org (Dino Viehland) Date: Mon, 09 Sep 2019 15:16:43 +0000 Subject: [issue38073] Make pwd module PEP-384 compatible In-Reply-To: <1568042155.96.0.920833676792.issue38073@roundup.psfhosted.org> Message-ID: <1568042203.42.0.399740377546.issue38073@roundup.psfhosted.org> Change by Dino Viehland : ---------- keywords: +patch pull_requests: +15443 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15790 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:17:54 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 15:17:54 +0000 Subject: [issue20490] Show clear error message on circular import In-Reply-To: <1391367888.31.0.501253544651.issue20490@psf.upfronthosting.co.za> Message-ID: <1568042274.3.0.979367886103.issue20490@roundup.psfhosted.org> Steve Dower added the comment: New changeset 65366bc8bdc4716ebc361e622590b45a6e5aef07 by Steve Dower (Anthony Sottile) in branch 'master': bpo-20490: Improve circular import error message (GH-15308) https://github.com/python/cpython/commit/65366bc8bdc4716ebc361e622590b45a6e5aef07 ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:19:16 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 15:19:16 +0000 Subject: [issue38059] Using sys.exit() over exit() in inspect.py In-Reply-To: <1567966950.72.0.597820636326.issue38059@roundup.psfhosted.org> Message-ID: <1568042356.18.0.495915884702.issue38059@roundup.psfhosted.org> miss-islington added the comment: New changeset b7bf632d4ebacfeffc8770a7848c690fa2a90a62 by Miss Islington (bot) in branch '3.7': bpo-38059: Using sys.exit() over exit() in inspect.py (GH-15666) https://github.com/python/cpython/commit/b7bf632d4ebacfeffc8770a7848c690fa2a90a62 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:20:32 2019 From: report at bugs.python.org (TK) Date: Mon, 09 Sep 2019 15:20:32 +0000 Subject: [issue18108] shutil.chown should support dir_fd and follow_symlinks keyword arguments In-Reply-To: <1370005797.04.0.715885093574.issue18108@psf.upfronthosting.co.za> Message-ID: <1568042432.19.0.49293517414.issue18108@roundup.psfhosted.org> Change by TK : ---------- nosy: +ta1hia _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:20:39 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 15:20:39 +0000 Subject: [issue38059] Using sys.exit() over exit() in inspect.py In-Reply-To: <1567966950.72.0.597820636326.issue38059@roundup.psfhosted.org> Message-ID: <1568042439.85.0.626277499733.issue38059@roundup.psfhosted.org> miss-islington added the comment: New changeset 0d4396c04cba5ac2b66fdaa23c01db84b1b54227 by Miss Islington (bot) in branch '3.8': bpo-38059: Using sys.exit() over exit() in inspect.py (GH-15666) https://github.com/python/cpython/commit/0d4396c04cba5ac2b66fdaa23c01db84b1b54227 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:20:43 2019 From: report at bugs.python.org (Thomas Wouters) Date: Mon, 09 Sep 2019 15:20:43 +0000 Subject: [issue37758] unicodedata checksum-tests only test 1/17th of Unicode's codepoints In-Reply-To: <1564967162.48.0.525882022653.issue37758@roundup.psfhosted.org> Message-ID: <1568042443.86.0.805659696499.issue37758@roundup.psfhosted.org> Thomas Wouters added the comment: New changeset 3cbc23aa229bc5ec04845053df78eae5f54e0497 by T. Wouters (Greg Price) in branch 'master': bpo-37758: Cut always-constant conditionals on sys.maxunicode. (GH-15302) https://github.com/python/cpython/commit/3cbc23aa229bc5ec04845053df78eae5f54e0497 ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:21:00 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 15:21:00 +0000 Subject: [issue20490] Show clear error message on circular import In-Reply-To: <1391367888.31.0.501253544651.issue20490@psf.upfronthosting.co.za> Message-ID: <1568042460.13.0.42118388986.issue20490@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +15444 pull_request: https://github.com/python/cpython/pull/15791 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:26:07 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 09 Sep 2019 15:26:07 +0000 Subject: [issue37185] use os.memfd_create in multiprocessing.shared_memory? In-Reply-To: <1559859610.5.0.492744373458.issue37185@roundup.psfhosted.org> Message-ID: <1568042767.62.0.683632211956.issue37185@roundup.psfhosted.org> Christian Heimes added the comment: You are corret, Davin. The concept of memory fd is a new Linux Kernel feature. It's not available on older Linux Kernels or on non-Linux OS. To share memory fd segments between processes, the processes have to exchange or inherit the file descriptor somehow. Either the fd can be inherited from a parent process or send over an AF_UNIX socket using SOL_SOCKET / SCM_RIGHTS. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:38:51 2019 From: report at bugs.python.org (Dino Viehland) Date: Mon, 09 Sep 2019 15:38:51 +0000 Subject: [issue38074] Make zlib PEP-384 compatible Message-ID: <1568043531.47.0.907223270637.issue38074@roundup.psfhosted.org> New submission from Dino Viehland : Make zlib PEP-384 compatible ---------- components: Extension Modules messages: 351501 nosy: dino.viehland, eric.snow priority: normal severity: normal status: open title: Make zlib PEP-384 compatible versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:39:34 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 09 Sep 2019 15:39:34 +0000 Subject: [issue38007] Regression: name of PyType_Spec::slots conflicts with Qt macro In-Reply-To: <1567419827.68.0.665093966998.issue38007@roundup.psfhosted.org> Message-ID: <1568043574.68.0.864431279925.issue38007@roundup.psfhosted.org> Benjamin Peterson added the comment: (You might also argue that Qt should be the ones fixing their namespacing.) ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:40:03 2019 From: report at bugs.python.org (Dino Viehland) Date: Mon, 09 Sep 2019 15:40:03 +0000 Subject: [issue38074] Make zlib PEP-384 compatible In-Reply-To: <1568043531.47.0.907223270637.issue38074@roundup.psfhosted.org> Message-ID: <1568043603.12.0.64991787413.issue38074@roundup.psfhosted.org> Change by Dino Viehland : ---------- keywords: +patch pull_requests: +15445 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15792 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:40:25 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 09 Sep 2019 15:40:25 +0000 Subject: [issue28569] mock.attach_mock should work with any return value of patch() In-Reply-To: <1477935134.31.0.733482108189.issue28569@psf.upfronthosting.co.za> Message-ID: <1568043625.41.0.14970260168.issue28569@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I am closing this in favor of issue21478 as the original report is now fixed. Thanks. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed superseder: -> mock calls don't propagate to parent (autospec) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:45:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 15:45:02 +0000 Subject: [issue38070] visit_decref(): add an assertion to check that the object is not freed In-Reply-To: <1568037936.88.0.10373402622.issue38070@roundup.psfhosted.org> Message-ID: <1568043902.78.0.683455907116.issue38070@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d91d4de31745fc1ed4c7e6c208917827c9c472b6 by Victor Stinner in branch 'master': bpo-38070: visit_decref() calls _PyObject_IsFreed() (GH-15782) https://github.com/python/cpython/commit/d91d4de31745fc1ed4c7e6c208917827c9c472b6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:45:12 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 15:45:12 +0000 Subject: [issue38070] visit_decref(): add an assertion to check that the object is not freed In-Reply-To: <1568037936.88.0.10373402622.issue38070@roundup.psfhosted.org> Message-ID: <1568043912.35.0.423271147017.issue38070@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15446 pull_request: https://github.com/python/cpython/pull/15793 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:48:07 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 15:48:07 +0000 Subject: [issue20490] Show clear error message on circular import In-Reply-To: <1391367888.31.0.501253544651.issue20490@psf.upfronthosting.co.za> Message-ID: <1568044087.49.0.00367425567664.issue20490@roundup.psfhosted.org> Steve Dower added the comment: Thanks for the patch, Anthony! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:48:26 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 09 Sep 2019 15:48:26 +0000 Subject: [issue37662] Document venv.EnvBuilder.upgrade_dependencies() In-Reply-To: <1563913525.16.0.930618817758.issue37662@roundup.psfhosted.org> Message-ID: <1568044106.37.0.973200830844.issue37662@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:48:35 2019 From: report at bugs.python.org (Thomas Wouters) Date: Mon, 09 Sep 2019 15:48:35 +0000 Subject: [issue36279] os.wait3() leaks some uninitialized stack when no processes exist In-Reply-To: <1552447660.04.0.72531550499.issue36279@roundup.psfhosted.org> Message-ID: <1568044115.02.0.255953474943.issue36279@roundup.psfhosted.org> Thomas Wouters added the comment: New changeset 682107cf458578ee6bd92b7cc6862113034a4fad by T. Wouters (Zackery Spytz) in branch 'master': bpo-36279: Ensure os.wait3() rusage is initialized (GH-15111) https://github.com/python/cpython/commit/682107cf458578ee6bd92b7cc6862113034a4fad ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:49:34 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 15:49:34 +0000 Subject: [issue37662] Document venv.EnvBuilder.upgrade_dependencies() In-Reply-To: <1563913525.16.0.930618817758.issue37662@roundup.psfhosted.org> Message-ID: <1568044174.38.0.598461047287.issue37662@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15447 pull_request: https://github.com/python/cpython/pull/15794 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:50:24 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 15:50:24 +0000 Subject: [issue37794] Replace /Ox with /O2 In-Reply-To: <1565284442.44.0.244166862045.issue37794@roundup.psfhosted.org> Message-ID: <1568044224.48.0.717014499569.issue37794@roundup.psfhosted.org> Steve Dower added the comment: Given the potential compatibility impact (small chance of third-party extensions relying on function aliasing), I'd like to see an update to Docs/whatsnew/3.9.rst as well. Also the suggested change to the NEWS entry is good. I don't think this one should pass completely silently. ---------- nosy: +steve.dower versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:54:37 2019 From: report at bugs.python.org (Zachary Ware) Date: Mon, 09 Sep 2019 15:54:37 +0000 Subject: [issue35803] Test and document that `dir=...` in tempfile may be PathLike In-Reply-To: <1548108422.42.0.0789815194403.issue35803@roundup.psfhosted.org> Message-ID: <1568044477.51.0.972510796754.issue35803@roundup.psfhosted.org> Zachary Ware added the comment: New changeset 370138ba9c29595df773cc057d17ea26fb6f21bd by Zachary Ware (Anthony Sottile) in branch 'master': bpo-35803: Document and test dir=PathLike for tempfile (GH-11644) https://github.com/python/cpython/commit/370138ba9c29595df773cc057d17ea26fb6f21bd ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:54:46 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 15:54:46 +0000 Subject: [issue35803] Test and document that `dir=...` in tempfile may be PathLike In-Reply-To: <1548108422.42.0.0789815194403.issue35803@roundup.psfhosted.org> Message-ID: <1568044486.61.0.584600844215.issue35803@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15448 pull_request: https://github.com/python/cpython/pull/15796 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:54:53 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 15:54:53 +0000 Subject: [issue35803] Test and document that `dir=...` in tempfile may be PathLike In-Reply-To: <1548108422.42.0.0789815194403.issue35803@roundup.psfhosted.org> Message-ID: <1568044493.27.0.803847930907.issue35803@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15449 pull_request: https://github.com/python/cpython/pull/15797 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:56:59 2019 From: report at bugs.python.org (Zachary Ware) Date: Mon, 09 Sep 2019 15:56:59 +0000 Subject: [issue35803] Test and document that `dir=...` in tempfile may be PathLike In-Reply-To: <1548108422.42.0.0789815194403.issue35803@roundup.psfhosted.org> Message-ID: <1568044619.53.0.762226386177.issue35803@roundup.psfhosted.org> Change by Zachary Ware : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:57:58 2019 From: report at bugs.python.org (Dino Viehland) Date: Mon, 09 Sep 2019 15:57:58 +0000 Subject: [issue38075] Make random module PEP-384 compatible Message-ID: <1568044678.81.0.091085634764.issue38075@roundup.psfhosted.org> New submission from Dino Viehland : Make random module PEP-384 compatible ---------- assignee: dino.viehland components: Extension Modules messages: 351509 nosy: dino.viehland, eric.snow priority: normal severity: normal status: open title: Make random module PEP-384 compatible versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 11:58:16 2019 From: report at bugs.python.org (Dino Viehland) Date: Mon, 09 Sep 2019 15:58:16 +0000 Subject: [issue38075] Make random module PEP-384 compatible In-Reply-To: <1568044678.81.0.091085634764.issue38075@roundup.psfhosted.org> Message-ID: <1568044696.98.0.940267724854.issue38075@roundup.psfhosted.org> Change by Dino Viehland : ---------- keywords: +patch pull_requests: +15450 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15798 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:01:28 2019 From: report at bugs.python.org (Julien Palard) Date: Mon, 09 Sep 2019 16:01:28 +0000 Subject: [issue30122] Added missing archive programs. In-Reply-To: <1492747399.44.0.402463454209.issue30122@psf.upfronthosting.co.za> Message-ID: <1568044888.89.0.880582489463.issue30122@roundup.psfhosted.org> Julien Palard added the comment: This FAQ entry has been deleted. ---------- nosy: +mdk resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:04:14 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 09 Sep 2019 16:04:14 +0000 Subject: [issue36338] urlparse of urllib returns wrong hostname In-Reply-To: <1552896371.92.0.122580708995.issue36338@roundup.psfhosted.org> Message-ID: <1568045054.04.0.570734225186.issue36338@roundup.psfhosted.org> Christian Heimes added the comment: The guidelines https://url.spec.whatwg.org/#host-parsing make a lot of sense to me. Python should refuse hostnames with "[" unless * the hostname starts with "[" * the hostname ends with "]" * the string between [] is a valid IPv6 address (full or shortened, without or with correctly quoted scope id) Python should refuse any hostname with forbidden chars "\x00\n\r #%/:?@", too. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:04:30 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 09 Sep 2019 16:04:30 +0000 Subject: [issue36338] urlparse of urllib returns wrong hostname In-Reply-To: <1552896371.92.0.122580708995.issue36338@roundup.psfhosted.org> Message-ID: <1568045070.55.0.17726316168.issue36338@roundup.psfhosted.org> Change by Christian Heimes : ---------- priority: normal -> high versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:05:25 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 16:05:25 +0000 Subject: [issue37649] calculate_init fails to check that EXEC_PREFIX was decoded In-Reply-To: <1563790914.65.0.328698742549.issue37649@roundup.psfhosted.org> Message-ID: <1568045125.04.0.452123780532.issue37649@roundup.psfhosted.org> Steve Dower added the comment: New changeset 09090d04ef8d2f4c94157b852d3d530a51e13d22 by Steve Dower (Orivej Desh) in branch 'master': bpo-37649: Fix exec_prefix check (GH-14897) https://github.com/python/cpython/commit/09090d04ef8d2f4c94157b852d3d530a51e13d22 ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:05:33 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 16:05:33 +0000 Subject: [issue37649] calculate_init fails to check that EXEC_PREFIX was decoded In-Reply-To: <1563790914.65.0.328698742549.issue37649@roundup.psfhosted.org> Message-ID: <1568045133.93.0.033293825525.issue37649@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch pull_requests: +15452 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15801 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:05:41 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 16:05:41 +0000 Subject: [issue37649] calculate_init fails to check that EXEC_PREFIX was decoded In-Reply-To: <1563790914.65.0.328698742549.issue37649@roundup.psfhosted.org> Message-ID: <1568045141.4.0.344920134525.issue37649@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15453 pull_request: https://github.com/python/cpython/pull/15802 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:06:20 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 16:06:20 +0000 Subject: [issue37649] calculate_init fails to check that EXEC_PREFIX was decoded In-Reply-To: <1563790914.65.0.328698742549.issue37649@roundup.psfhosted.org> Message-ID: <1568045180.36.0.29075268878.issue37649@roundup.psfhosted.org> Steve Dower added the comment: Thanks! Great catch ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:06:58 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 16:06:58 +0000 Subject: [issue35941] ssl.enum_certificates() regression In-Reply-To: <1549637009.73.0.764067041861.issue35941@roundup.psfhosted.org> Message-ID: <1568045218.14.0.701434508932.issue35941@roundup.psfhosted.org> Steve Dower added the comment: New changeset 915cd3f0696cb8a7206754a8fc34d4cd865a1b4a by Steve Dower (Christian Heimes) in branch 'master': bpo-35941: Fix performance regression in new code (GH-12610) https://github.com/python/cpython/commit/915cd3f0696cb8a7206754a8fc34d4cd865a1b4a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:10:20 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 09 Sep 2019 16:10:20 +0000 Subject: [issue38000] importlib can not handle module file names with periods In-Reply-To: <1567340874.27.0.741402287818.issue38000@roundup.psfhosted.org> Message-ID: <1568045420.08.0.0844949075721.issue38000@roundup.psfhosted.org> Brett Cannon added the comment: This works as expected as nothing is inherently injected into your global namespace in any of the other code that you are executing. Otherwise the fact that the imported module is not being put into sys.modules also doesn't help if you're trying to get access via `import cmdoplib_yaml`. But once the module object is created then the file name does not matter. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:10:42 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 16:10:42 +0000 Subject: [issue35941] ssl.enum_certificates() regression In-Reply-To: <1549637009.73.0.764067041861.issue35941@roundup.psfhosted.org> Message-ID: <1568045442.34.0.449091308095.issue35941@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +15454 pull_request: https://github.com/python/cpython/pull/15803 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:12:04 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 16:12:04 +0000 Subject: [issue37876] Tests for Rot13 codec In-Reply-To: <1565971596.92.0.47171524836.issue37876@roundup.psfhosted.org> Message-ID: <1568045524.47.0.698283831721.issue37876@roundup.psfhosted.org> miss-islington added the comment: New changeset b6ef8f2beb90678a4a54218d6169040afbbf9fe1 by Miss Islington (bot) in branch '3.8': bpo-37876: Tests for ROT-13 codec (GH-15314) https://github.com/python/cpython/commit/b6ef8f2beb90678a4a54218d6169040afbbf9fe1 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:13:33 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 16:13:33 +0000 Subject: [issue35941] ssl.enum_certificates() regression In-Reply-To: <1549637009.73.0.764067041861.issue35941@roundup.psfhosted.org> Message-ID: <1568045613.31.0.76056429165.issue35941@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +15455 pull_request: https://github.com/python/cpython/pull/15804 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:18:18 2019 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 09 Sep 2019 16:18:18 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568045898.49.0.824230116903.issue37531@roundup.psfhosted.org> Jeremy Kloth added the comment: Well, the kill timeout doesn't seem to be working, at least completely: https://buildbot.python.org/all/#/builders/40/builds/3012 The worker process has been killed (line 562), but regrtest is still waiting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:20:31 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 09 Sep 2019 16:20:31 +0000 Subject: [issue37683] Use importlib.resources in venv In-Reply-To: <1564077021.19.0.886613759672.issue37683@roundup.psfhosted.org> Message-ID: <1568046031.58.0.315080127993.issue37683@roundup.psfhosted.org> Brett Cannon added the comment: Since no one has ever asked for this I won't worry about it. This was mostly to start using the proper API for reading data out of a package, but it isn't critical. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:24:19 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 16:24:19 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1568046259.32.0.137421054785.issue38006@roundup.psfhosted.org> miss-islington added the comment: New changeset 78d15faf6c522619098e94be3e7f6d88a9e61123 by Miss Islington (bot) in branch '3.8': bpo-38006: Avoid closure in weakref.WeakValueDictionary (GH-15641) https://github.com/python/cpython/commit/78d15faf6c522619098e94be3e7f6d88a9e61123 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:28:15 2019 From: report at bugs.python.org (Julien Palard) Date: Mon, 09 Sep 2019 16:28:15 +0000 Subject: [issue18576] Document test.support.script_helper In-Reply-To: <1375014764.64.0.152576599022.issue18576@psf.upfronthosting.co.za> Message-ID: <1568046495.52.0.370354719968.issue18576@roundup.psfhosted.org> Julien Palard added the comment: All those functions has already been documented. ---------- dependencies: -Make test.script_helper more comprehensive, and use it in the test suite nosy: +mdk resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:28:38 2019 From: report at bugs.python.org (Thomas Wouters) Date: Mon, 09 Sep 2019 16:28:38 +0000 Subject: [issue37840] bytearray_getitem() handles negative index incorrectly In-Reply-To: <1565697002.74.0.85786305512.issue37840@roundup.psfhosted.org> Message-ID: <1568046518.02.0.434048135833.issue37840@roundup.psfhosted.org> Thomas Wouters added the comment: New changeset 92709a263e9cec0bc646ccc1ea051fc528800d8d by T. Wouters (Sergey Fedoseev) in branch 'master': bpo-37840: Fix handling of negative indices in bytearray_getitem() (GH-15250) https://github.com/python/cpython/commit/92709a263e9cec0bc646ccc1ea051fc528800d8d ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:33:15 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Sep 2019 16:33:15 +0000 Subject: [issue37995] Multiline ast.dump() In-Reply-To: <1567243768.69.0.362429469264.issue37995@roundup.psfhosted.org> Message-ID: <1568046795.97.0.919401090873.issue37995@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 850573b836d5b82d1a1ebe75a635aaa0a3dff997 by Serhiy Storchaka in branch 'master': bpo-37995: Add an option to ast.dump() to produce a multiline output. (GH-15631) https://github.com/python/cpython/commit/850573b836d5b82d1a1ebe75a635aaa0a3dff997 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:35:08 2019 From: report at bugs.python.org (Dino Viehland) Date: Mon, 09 Sep 2019 16:35:08 +0000 Subject: [issue38076] Make struct module PEP-384 compatible Message-ID: <1568046908.42.0.641730550956.issue38076@roundup.psfhosted.org> New submission from Dino Viehland : Make struct module PEP-384 compatible ---------- assignee: dino.viehland components: Extension Modules messages: 351524 nosy: dino.viehland, eric.snow priority: normal severity: normal status: open title: Make struct module PEP-384 compatible versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:35:56 2019 From: report at bugs.python.org (Dino Viehland) Date: Mon, 09 Sep 2019 16:35:56 +0000 Subject: [issue38076] Make struct module PEP-384 compatible In-Reply-To: <1568046908.42.0.641730550956.issue38076@roundup.psfhosted.org> Message-ID: <1568046956.92.0.206243918617.issue38076@roundup.psfhosted.org> Change by Dino Viehland : ---------- keywords: +patch pull_requests: +15456 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15805 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:37:16 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 09 Sep 2019 16:37:16 +0000 Subject: [issue36502] str.isspace() for U+00A0 and U+202F differs from document In-Reply-To: <1554186967.56.0.21483381742.issue36502@roundup.psfhosted.org> Message-ID: <1568047036.7.0.454145349704.issue36502@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 64c6ac74e254d31f93fcc74bf02b3daa7d3e3f25 by Benjamin Peterson (Greg Price) in branch 'master': bpo-36502: Update link to UAX #44, the Unicode doc on the UCD. (GH-15301) https://github.com/python/cpython/commit/64c6ac74e254d31f93fcc74bf02b3daa7d3e3f25 ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:37:26 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 16:37:26 +0000 Subject: [issue36502] str.isspace() for U+00A0 and U+202F differs from document In-Reply-To: <1554186967.56.0.21483381742.issue36502@roundup.psfhosted.org> Message-ID: <1568047046.21.0.247007430464.issue36502@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15457 pull_request: https://github.com/python/cpython/pull/15806 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:37:32 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 16:37:32 +0000 Subject: [issue36502] str.isspace() for U+00A0 and U+202F differs from document In-Reply-To: <1554186967.56.0.21483381742.issue36502@roundup.psfhosted.org> Message-ID: <1568047052.82.0.538700063329.issue36502@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15458 pull_request: https://github.com/python/cpython/pull/15807 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:43:11 2019 From: report at bugs.python.org (Tim Peters) Date: Mon, 09 Sep 2019 16:43:11 +0000 Subject: [issue38060] precedence (relational, logical operator)not working with single value In-Reply-To: <1568000145.4.0.491367390087.issue38060@roundup.psfhosted.org> Message-ID: <1568047391.4.0.648197162119.issue38060@roundup.psfhosted.org> Tim Peters added the comment: BTW, the docs also spell out that "and" and "or" ALWAYS evaluate their left operand before their right operand, and don't evaluate the right operand at all if the result of evaluating the left operand is true (for "or") or false (for "and"). So, e.g., result = (EXPR1) or (EXPR2) acts like result = EXPR1 if not bool(result): result = EXPR2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:43:51 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 16:43:51 +0000 Subject: [issue37245] Azure Pipeline 3.8 CI: multiple tests hung and timed out on macOS 10.13 In-Reply-To: <1560340622.3.0.842050597369.issue37245@roundup.psfhosted.org> Message-ID: <1568047431.36.0.855988411428.issue37245@roundup.psfhosted.org> Steve Dower added the comment: I suspect this code is a repro - it certainly locks up the host process reliably enough. Perhaps if we unblock multiprocessing in the context of a crashed worker then it'll show what the underlying errors are? import os from multiprocessing import Pool def f(x): os._exit(0) return "success" if __name__ == '__main__': with Pool(1) as p: print(p.map(f, [1])) ---------- nosy: +davin, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:45:20 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 09 Sep 2019 16:45:20 +0000 Subject: [issue20490] Show clear error message on circular import In-Reply-To: <1391367888.31.0.501253544651.issue20490@psf.upfronthosting.co.za> Message-ID: <1568047520.93.0.281007079137.issue20490@roundup.psfhosted.org> Steve Dower added the comment: New changeset 2d5594fac21a81a06f82c3605318dfa96e72398f by Steve Dower in branch '3.8': bpo-20490: Improve circular import error message (GH-15308) https://github.com/python/cpython/commit/2d5594fac21a81a06f82c3605318dfa96e72398f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:45:35 2019 From: report at bugs.python.org (Zachary Ware) Date: Mon, 09 Sep 2019 16:45:35 +0000 Subject: [issue7940] re.finditer and re.findall should support negative end positions In-Reply-To: <1266329075.25.0.639780854585.issue7940@psf.upfronthosting.co.za> Message-ID: <1568047535.04.0.533429638721.issue7940@roundup.psfhosted.org> Zachary Ware added the comment: Ezio requested further opinions, so here's mine. I don't think the current behavior makes sense; I doubt anyone actually expects a negative index to be squashed to 0, especially for endpos. I'm not certain that allowing negative indexes is really necessary, but seems nicer than raising an exception which would be the other acceptable option to me. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:48:58 2019 From: report at bugs.python.org (Davin Potts) Date: Mon, 09 Sep 2019 16:48:58 +0000 Subject: [issue38018] Increase Code Coverage for multiprocessing.shared_memory In-Reply-To: <1567519085.54.0.887939969587.issue38018@roundup.psfhosted.org> Message-ID: <1568047738.35.0.585947201342.issue38018@roundup.psfhosted.org> Davin Potts added the comment: New changeset d14e39c8d9a9b525c7dcd83b2a260e2707fa85c1 by Davin Potts (Vinay Sharma) in branch 'master': bpo-38018: Increase code coverage for multiprocessing.shared_memory (GH-15662) https://github.com/python/cpython/commit/d14e39c8d9a9b525c7dcd83b2a260e2707fa85c1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:51:56 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 09 Sep 2019 16:51:56 +0000 Subject: [issue36502] str.isspace() for U+00A0 and U+202F differs from document In-Reply-To: <1554186967.56.0.21483381742.issue36502@roundup.psfhosted.org> Message-ID: <1568047916.05.0.258026730501.issue36502@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- pull_requests: +15459 pull_request: https://github.com/python/cpython/pull/15808 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:51:39 2019 From: report at bugs.python.org (Zane Bitter) Date: Mon, 09 Sep 2019 16:51:39 +0000 Subject: [issue37857] Setting logger.level directly has no effect due to caching in 3.7+ In-Reply-To: <1565811970.47.0.529067236549.issue37857@roundup.psfhosted.org> Message-ID: <1568047899.39.0.864489939197.issue37857@roundup.psfhosted.org> Zane Bitter added the comment: > It feels wrong to do this as a band-aid to help out people who didn't do the right thing. I mean... are we here to punish people for making mistakes by sending them to schroedinbug purgatory, or are we here to help them upgrade to the latest Python without feeling like it's a minefield? I genuinely don't know what Python's stance on this is. Certainly the Linux kernel and Windows both have a philosophy of not breaking working userspace code no matter how wrong it might be, so it's not unheard-of to choose the latter. I suggested on the PR that we could deprecate the setter so that people who are Doing It Wrong will get a warning that they can much more easily track down and fix, and we won't encourage any wrong new code. Would that change your opinion? > > but the good news is that the values are now cached > That's not relevant to the performance numbers I posted above, is it? Not directly - your performance numbers show that accessing the attribute is ~300ns slower when it's a property. But the thing that gets called all the time that we want to be fast is isEnabledFor(), and the results of that are cached so it only calls getEffectiveLevel() (which is the thing accessing the attribute) once. Note that populating the cache is already considerably more expensive than the previous path (it requires handling an exception and acquiring a lock), but it's still worth it because the cost is typically amortised across many log calls. The addition of an extra property lookup in this path is not going to be noticeable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:54:16 2019 From: report at bugs.python.org (Lisa Roach) Date: Mon, 09 Sep 2019 16:54:16 +0000 Subject: [issue37383] call count in not registered in AsyncMock till the coroutine is awaited In-Reply-To: <1561372216.92.0.906837687381.issue37383@roundup.psfhosted.org> Message-ID: <1568048056.3.0.213008761768.issue37383@roundup.psfhosted.org> Lisa Roach added the comment: New changeset b9f65f01fd761da7799f36d29b54518399d3458e by Lisa Roach in branch 'master': bpo-37383: Updates docs to reflect AsyncMock call_count after await. (#15761) https://github.com/python/cpython/commit/b9f65f01fd761da7799f36d29b54518399d3458e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:55:47 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Sep 2019 16:55:47 +0000 Subject: [issue7940] re.finditer and re.findall should support negative end positions In-Reply-To: <1266329075.25.0.639780854585.issue7940@psf.upfronthosting.co.za> Message-ID: <1568048147.91.0.0736540641836.issue7940@roundup.psfhosted.org> Serhiy Storchaka added the comment: Note that changing the current behavior is a breaking change. For example someone can use `pattern.findall(text, curpos-50, curpos+50)` to search in the range ?50 characters from the current position. If negative positions change meaning, this will break a code for curpos < 50. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 12:56:20 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 09 Sep 2019 16:56:20 +0000 Subject: [issue37683] Use importlib.resources in venv In-Reply-To: <1564077021.19.0.886613759672.issue37683@roundup.psfhosted.org> Message-ID: <1568048180.62.0.989085139648.issue37683@roundup.psfhosted.org> Barry A. Warsaw added the comment: See also this ticket: https://gitlab.com/python-devs/importlib_resources/issues/58 We've basically agreed that you should be able to load resources from subdirectories that aren't packages. It turns out to be not a simple change in importlib.resources, but contributions are welcome! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 13:10:10 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 09 Sep 2019 17:10:10 +0000 Subject: [issue36502] str.isspace() for U+00A0 and U+202F differs from document In-Reply-To: <1554186967.56.0.21483381742.issue36502@roundup.psfhosted.org> Message-ID: <1568049010.78.0.00198995644319.issue36502@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 58d61efd4cdece3b026868a66d829001198d29b1 by Benjamin Peterson in branch '2.7': [2.7] bpo-36502: Update link to UAX GH-44, the Unicode doc on the UCD. (GH-15808) https://github.com/python/cpython/commit/58d61efd4cdece3b026868a66d829001198d29b1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 13:10:57 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 17:10:57 +0000 Subject: [issue37383] call count in not registered in AsyncMock till the coroutine is awaited In-Reply-To: <1561372216.92.0.906837687381.issue37383@roundup.psfhosted.org> Message-ID: <1568049057.31.0.971413293833.issue37383@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15460 pull_request: https://github.com/python/cpython/pull/15810 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 13:18:12 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 17:18:12 +0000 Subject: [issue38070] visit_decref(): add an assertion to check that the object is not freed In-Reply-To: <1568037936.88.0.10373402622.issue38070@roundup.psfhosted.org> Message-ID: <1568049492.71.0.695410007687.issue38070@roundup.psfhosted.org> miss-islington added the comment: New changeset 5731172bb1e958b1d80b18eaf88d3f2f93cfccdd by Miss Islington (bot) in branch '3.8': bpo-38070: visit_decref() calls _PyObject_IsFreed() (GH-15782) https://github.com/python/cpython/commit/5731172bb1e958b1d80b18eaf88d3f2f93cfccdd ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 13:31:35 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 17:31:35 +0000 Subject: [issue35803] Test and document that `dir=...` in tempfile may be PathLike In-Reply-To: <1548108422.42.0.0789815194403.issue35803@roundup.psfhosted.org> Message-ID: <1568050295.39.0.432720209634.issue35803@roundup.psfhosted.org> miss-islington added the comment: New changeset eadf6b8787e979920c4fb6845797c33d270d2729 by Miss Islington (bot) in branch '3.8': bpo-35803: Document and test dir=PathLike for tempfile (GH-11644) https://github.com/python/cpython/commit/eadf6b8787e979920c4fb6845797c33d270d2729 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 13:33:21 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 17:33:21 +0000 Subject: [issue35803] Test and document that `dir=...` in tempfile may be PathLike In-Reply-To: <1548108422.42.0.0789815194403.issue35803@roundup.psfhosted.org> Message-ID: <1568050401.04.0.847581538605.issue35803@roundup.psfhosted.org> miss-islington added the comment: New changeset b4591ad33a727873c0a07d084211295bf4f5b892 by Miss Islington (bot) in branch '3.7': bpo-35803: Document and test dir=PathLike for tempfile (GH-11644) https://github.com/python/cpython/commit/b4591ad33a727873c0a07d084211295bf4f5b892 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 13:59:20 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 17:59:20 +0000 Subject: [issue37649] calculate_init fails to check that EXEC_PREFIX was decoded In-Reply-To: <1563790914.65.0.328698742549.issue37649@roundup.psfhosted.org> Message-ID: <1568051960.91.0.0244080679161.issue37649@roundup.psfhosted.org> miss-islington added the comment: New changeset e83296314583ba9c7952d6539c63aae803a197ae by Miss Islington (bot) in branch '3.8': bpo-37649: Fix exec_prefix check (GH-14897) https://github.com/python/cpython/commit/e83296314583ba9c7952d6539c63aae803a197ae ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 14:06:55 2019 From: report at bugs.python.org (TK) Date: Mon, 09 Sep 2019 18:06:55 +0000 Subject: [issue18108] shutil.chown should support dir_fd and follow_symlinks keyword arguments In-Reply-To: <1370005797.04.0.715885093574.issue18108@psf.upfronthosting.co.za> Message-ID: <1568052415.0.0.845397130276.issue18108@roundup.psfhosted.org> Change by TK : ---------- pull_requests: +15461 pull_request: https://github.com/python/cpython/pull/15811 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 14:12:03 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 18:12:03 +0000 Subject: [issue37649] calculate_init fails to check that EXEC_PREFIX was decoded In-Reply-To: <1563790914.65.0.328698742549.issue37649@roundup.psfhosted.org> Message-ID: <1568052723.59.0.996964206732.issue37649@roundup.psfhosted.org> miss-islington added the comment: New changeset 328cfde754c6b30c1249c5b9c12ab6b8faab551e by Miss Islington (bot) in branch '3.7': bpo-37649: Fix exec_prefix check (GH-14897) https://github.com/python/cpython/commit/328cfde754c6b30c1249c5b9c12ab6b8faab551e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 14:21:09 2019 From: report at bugs.python.org (TK) Date: Mon, 09 Sep 2019 18:21:09 +0000 Subject: [issue18108] shutil.chown should support dir_fd and follow_symlinks keyword arguments In-Reply-To: <1370005797.04.0.715885093574.issue18108@psf.upfronthosting.co.za> Message-ID: <1568053269.84.0.949249633188.issue18108@roundup.psfhosted.org> TK added the comment: Hi everybody, I just submitted a PR for this issue. It's my first contribution to the cPython project so please let me know if I need to change anything. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 14:37:14 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 09 Sep 2019 18:37:14 +0000 Subject: [issue38018] Increase Code Coverage for multiprocessing.shared_memory In-Reply-To: <1567519085.54.0.887939969587.issue38018@roundup.psfhosted.org> Message-ID: <1568054234.46.0.20655741453.issue38018@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: PR15552 introduced a regression in FreeBSD buildbots: https://buildbot.python.org/all/#/builders/168/builds/1417 Could you take a look? ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 14:40:08 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 18:40:08 +0000 Subject: [issue36502] str.isspace() for U+00A0 and U+202F differs from document In-Reply-To: <1554186967.56.0.21483381742.issue36502@roundup.psfhosted.org> Message-ID: <1568054408.46.0.316767843989.issue36502@roundup.psfhosted.org> miss-islington added the comment: New changeset 0a86da87da82c4a28d7ec91eb54c0b9ca40bbea7 by Miss Islington (bot) in branch '3.7': bpo-36502: Update link to UAX GH-44, the Unicode doc on the UCD. (GH-15301) https://github.com/python/cpython/commit/0a86da87da82c4a28d7ec91eb54c0b9ca40bbea7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 14:41:16 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 09 Sep 2019 18:41:16 +0000 Subject: [issue36502] str.isspace() for U+00A0 and U+202F differs from document In-Reply-To: <1554186967.56.0.21483381742.issue36502@roundup.psfhosted.org> Message-ID: <1568054476.91.0.852518759098.issue36502@roundup.psfhosted.org> miss-islington added the comment: New changeset c1c04cbc24c11cd7a47579af3faffee05a16acd7 by Miss Islington (bot) in branch '3.8': bpo-36502: Update link to UAX GH-44, the Unicode doc on the UCD. (GH-15301) https://github.com/python/cpython/commit/c1c04cbc24c11cd7a47579af3faffee05a16acd7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 15:01:56 2019 From: report at bugs.python.org (Gabriel C) Date: Mon, 09 Sep 2019 19:01:56 +0000 Subject: [issue37997] Segfault when using pickle with exceptions and dynamic class inheritance In-Reply-To: <1567294757.43.0.590587702854.issue37997@roundup.psfhosted.org> Message-ID: <1568055716.35.0.154740095031.issue37997@roundup.psfhosted.org> Gabriel C added the comment: Some further investigation suggests this may have nothing to do with pickle at all. Consider the following short example: ``` def CreateDynamicClass(basetype): class DynamicClassImpl(basetype): def __init__(self): super(DynamicClassImpl, self).__init__() return DynamicClassImpl() # Comment out any of the following three lines and the test passes dynamic_memerror = CreateDynamicClass(MemoryError) memory_error = MemoryError("Test") dynamic_memerror = CreateDynamicClass(MemoryError) print(MemoryError("Test2")) ``` This reliably produces the following stack trace: ``` Traceback (most recent call last): File "test_min2.py", line 13, in print(MemoryError("Test2")) TypeError: __init__() takes 1 positional argument but 2 were given ``` In addition it causes a bus error (signal 10) around 30% of the time when run on python 3.7.4 (macOS high sierra) and a segmentation fault around 10% of the time when run on python 3.5 (Ubuntu 16.04). Now modify the short example as follows, inserting a dummy argument into the constructor of the dynamic exception type: ``` def CreateDynamicClass(basetype): class DynamicClassImpl(basetype): def __init__(self, dummy_arg): if dummy_arg is not None: raise AssertionError("Dynamic exception constructor called.") super(DynamicClassImpl, self).__init__() return DynamicClassImpl(None) # Comment out any of the following three lines and the test passes dynamic_memerror = CreateDynamicClass(MemoryError) memory_error = MemoryError("Test") dynamic_memerror = CreateDynamicClass(MemoryError) print(MemoryError("Test2")) ``` This produces the following stack trace: ``` Traceback (most recent call last): File "test_min2.py", line 15, in print(MemoryError("Test2")) File "test_min2.py", line 5, in __init__ raise AssertionError("Dynamic exception constructor called.") AssertionError: Dynamic exception constructor called. ``` showing that the user-defined type constructor is actually called when the MemoryError object is created. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 15:18:27 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 Sep 2019 19:18:27 +0000 Subject: [issue38075] Make random module PEP-384 compatible In-Reply-To: <1568044678.81.0.091085634764.issue38075@roundup.psfhosted.org> Message-ID: <1568056707.15.0.183997621462.issue38075@roundup.psfhosted.org> Raymond Hettinger added the comment: I'm curious what this does for us. _randommodule.c isn't public. Internally, we get to use our full ABI, not just the stable public ABI. I'm unclear on why this needs to change at all. Is code like this deemed broken in some way? ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 16:16:42 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 09 Sep 2019 20:16:42 +0000 Subject: [issue38066] Hide internal asyncio.Stream methods In-Reply-To: <1568029115.61.0.532730850424.issue38066@roundup.psfhosted.org> Message-ID: <1568060201.99.0.619849113493.issue38066@roundup.psfhosted.org> Andrew Svetlov added the comment: Done. The only API from transport that users really need is get_extra_info() which is exposed as a stream method already. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 16:36:16 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Sep 2019 20:36:16 +0000 Subject: [issue38049] Add command-line interface for the ast module In-Reply-To: <1567848693.22.0.0359513964627.issue38049@roundup.psfhosted.org> Message-ID: <1568061376.75.0.0566606402035.issue38049@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 832e8640086ac4fa547c055a72929879cc5a963a by Serhiy Storchaka in branch 'master': bpo-38049: Add command-line interface for the ast module. (GH-15724) https://github.com/python/cpython/commit/832e8640086ac4fa547c055a72929879cc5a963a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 16:40:38 2019 From: report at bugs.python.org (Carl Jacobsen) Date: Mon, 09 Sep 2019 20:40:38 +0000 Subject: [issue36990] test_asyncio.test_create_connection_ipv6_scope fails(in mock test?) In-Reply-To: <1558439793.15.0.664756328285.issue36990@roundup.psfhosted.org> Message-ID: <1568061638.53.0.125294552916.issue36990@roundup.psfhosted.org> Change by Carl Jacobsen : ---------- nosy: +CarlRJ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 16:42:49 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Sep 2019 20:42:49 +0000 Subject: [issue37995] Multiline ast.dump() In-Reply-To: <1567243768.69.0.362429469264.issue37995@roundup.psfhosted.org> Message-ID: <1568061769.63.0.769067499776.issue37995@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 16:42:56 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 Sep 2019 20:42:56 +0000 Subject: [issue38049] Add command-line interface for the ast module In-Reply-To: <1567848693.22.0.0359513964627.issue38049@roundup.psfhosted.org> Message-ID: <1568061776.02.0.642218241814.issue38049@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 16:46:04 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Mon, 09 Sep 2019 20:46:04 +0000 Subject: [issue1615158] POSIX capabilities support Message-ID: <1568061964.78.0.911430852152.issue1615158@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- pull_requests: +15463 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15815 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 17:11:20 2019 From: report at bugs.python.org (Zachary Ware) Date: Mon, 09 Sep 2019 21:11:20 +0000 Subject: [issue36511] Add Windows ARM32 buildbot In-Reply-To: <1554232161.58.0.393661272603.issue36511@roundup.psfhosted.org> Message-ID: <1568063480.88.0.441907237882.issue36511@roundup.psfhosted.org> Zachary Ware added the comment: New changeset 55d12ce8b8d397dd4e376bb0d1c27b3cced0ef50 by Zachary Ware (Paul Monson) in branch 'master': bpo-36511: clean up python process before deploy on ARM Windows buildbots (GH-14431) https://github.com/python/cpython/commit/55d12ce8b8d397dd4e376bb0d1c27b3cced0ef50 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 17:13:04 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 Sep 2019 21:13:04 +0000 Subject: [issue38077] IDLE leaking ARGV into globals() namespace Message-ID: <1568063584.53.0.428247792791.issue38077@roundup.psfhosted.org> New submission from Raymond Hettinger : Reproducer: 1) Turn-on IDLE 2) Create an empty file called: tmp.py 3) Press F5 to run the empty file 4) In the output shell window, type dir() which gives >>> dir() ['__annotations__', '__builtins__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'argv'] ---------- assignee: terry.reedy components: IDLE messages: 351552 nosy: rhettinger, terry.reedy priority: high severity: normal status: open title: IDLE leaking ARGV into globals() namespace type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 17:15:47 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 09 Sep 2019 21:15:47 +0000 Subject: [issue38077] IDLE leaking ARGV into globals() namespace In-Reply-To: <1568063584.53.0.428247792791.issue38077@roundup.psfhosted.org> Message-ID: <1568063747.11.0.433947516895.issue38077@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 17:33:55 2019 From: report at bugs.python.org (Davin Potts) Date: Mon, 09 Sep 2019 21:33:55 +0000 Subject: [issue38018] Increase Code Coverage for multiprocessing.shared_memory In-Reply-To: <1567519085.54.0.887939969587.issue38018@roundup.psfhosted.org> Message-ID: <1568064835.78.0.22077058721.issue38018@roundup.psfhosted.org> Davin Potts added the comment: Initial review of the test failure suggests a likely flaw in the mechanism used by the resource tracker. I will continue investigating more tomorrow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 17:52:06 2019 From: report at bugs.python.org (Zachary Ware) Date: Mon, 09 Sep 2019 21:52:06 +0000 Subject: [issue34293] DOC: Makefile inherits a Sphinx 1.5 bug regarding PAPER envvar In-Reply-To: <1533042613.34.0.56676864532.issue34293@psf.upfronthosting.co.za> Message-ID: <1568065926.77.0.0832020577728.issue34293@roundup.psfhosted.org> Zachary Ware added the comment: New changeset b5381f669718aa19690f42f3b8bd88f03045b9d2 by Zachary Ware (Jean-Fran?ois B) in branch 'master': bpo-34293: Fix PDF documentation paper size (GH-8585) https://github.com/python/cpython/commit/b5381f669718aa19690f42f3b8bd88f03045b9d2 ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 17:54:51 2019 From: report at bugs.python.org (Zachary Ware) Date: Mon, 09 Sep 2019 21:54:51 +0000 Subject: [issue34293] DOC: Makefile inherits a Sphinx 1.5 bug regarding PAPER envvar In-Reply-To: <1533042613.34.0.56676864532.issue34293@psf.upfronthosting.co.za> Message-ID: <1568066091.76.0.572977861806.issue34293@roundup.psfhosted.org> Change by Zachary Ware : ---------- pull_requests: +15464 pull_request: https://github.com/python/cpython/pull/15816 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 17:57:56 2019 From: report at bugs.python.org (Zachary Ware) Date: Mon, 09 Sep 2019 21:57:56 +0000 Subject: [issue34293] DOC: Makefile inherits a Sphinx 1.5 bug regarding PAPER envvar In-Reply-To: <1533042613.34.0.56676864532.issue34293@psf.upfronthosting.co.za> Message-ID: <1568066276.7.0.886762360425.issue34293@roundup.psfhosted.org> Change by Zachary Ware : ---------- pull_requests: +15465 pull_request: https://github.com/python/cpython/pull/15817 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 17:58:13 2019 From: report at bugs.python.org (Michael Burt) Date: Mon, 09 Sep 2019 21:58:13 +0000 Subject: [issue24564] shutil.copytree fails when copying NFS to NFS In-Reply-To: <1436040350.32.0.650425735541.issue24564@psf.upfronthosting.co.za> Message-ID: <1568066293.6.0.818291957275.issue24564@roundup.psfhosted.org> Michael Burt added the comment: This is still a problem when shutil gets a errno.ENOSYS I hit this bug on Microsoft Azure when I mount an Azure File (managed NFS) into an AKS cluster (managed Kubernetes offering) and try to copy a file from the NFS over to the local disk on the node using shutil.copytree(). The workaround I am using came from this StackOverflow answer: https://stackoverflow.com/a/51635427/3736286 ---------- nosy: +Michael Burt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 17:59:54 2019 From: report at bugs.python.org (Zachary Ware) Date: Mon, 09 Sep 2019 21:59:54 +0000 Subject: [issue34293] DOC: Makefile inherits a Sphinx 1.5 bug regarding PAPER envvar In-Reply-To: <1533042613.34.0.56676864532.issue34293@psf.upfronthosting.co.za> Message-ID: <1568066394.11.0.933925965675.issue34293@roundup.psfhosted.org> Zachary Ware added the comment: Thank you for the patch! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 18:11:08 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 09 Sep 2019 22:11:08 +0000 Subject: [issue38018] Increase Code Coverage for multiprocessing.shared_memory In-Reply-To: <1567519085.54.0.887939969587.issue38018@roundup.psfhosted.org> Message-ID: <1568067068.27.0.451318804362.issue38018@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: This is the failure for reference: ====================================================================== ERROR: test_shared_memory_basics (test.test_multiprocessing_spawn.WithProcessesTestSharedMemory) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/_test_multiprocessing.py", line 3737, in test_shared_memory_basics shm1 = shared_memory.SharedMemory(create=True, size=1) File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/multiprocessing/shared_memory.py", line 89, in __init__ self._fd = _posixshmem.shm_open( OSError: [Errno 22] Invalid argument: 'test01_fn' ---------------------------------------------------------------------- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 18:11:26 2019 From: report at bugs.python.org (Zachary Ware) Date: Mon, 09 Sep 2019 22:11:26 +0000 Subject: [issue34293] DOC: Makefile inherits a Sphinx 1.5 bug regarding PAPER envvar In-Reply-To: <1533042613.34.0.56676864532.issue34293@psf.upfronthosting.co.za> Message-ID: <1568067086.53.0.544052240627.issue34293@roundup.psfhosted.org> Zachary Ware added the comment: New changeset 99df5e837334b62c29c979bb0806f525778a4f3e by Zachary Ware in branch '3.8': [3.8] bpo-34293: Fix PDF documentation paper size (GH-8585) (GH-15816) https://github.com/python/cpython/commit/99df5e837334b62c29c979bb0806f525778a4f3e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 18:11:37 2019 From: report at bugs.python.org (Zachary Ware) Date: Mon, 09 Sep 2019 22:11:37 +0000 Subject: [issue34293] DOC: Makefile inherits a Sphinx 1.5 bug regarding PAPER envvar In-Reply-To: <1533042613.34.0.56676864532.issue34293@psf.upfronthosting.co.za> Message-ID: <1568067097.2.0.822247618988.issue34293@roundup.psfhosted.org> Zachary Ware added the comment: New changeset 12228ce41de1b8fcfb3f1ba0a86d98a232815e85 by Zachary Ware in branch '3.7': [3.7] bpo-34293: Fix PDF documentation paper size (GH-8585) (GH-15817) https://github.com/python/cpython/commit/12228ce41de1b8fcfb3f1ba0a86d98a232815e85 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 18:12:57 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 09 Sep 2019 22:12:57 +0000 Subject: [issue38018] Increase Code Coverage for multiprocessing.shared_memory In-Reply-To: <1567519085.54.0.887939969587.issue38018@roundup.psfhosted.org> Message-ID: <1568067177.87.0.745620413908.issue38018@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Correction, is PR 15662 the one that introduced the recession (the one in this issue) not the previous one I linked. Apologies for that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 18:31:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Sep 2019 22:31:25 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1568068285.02.0.789600226661.issue38006@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 23669330b7d0d5ad1a9aac40315ba4c2e765f9dd by Victor Stinner in branch '3.7': bpo-38006: Avoid closure in weakref.WeakValueDictionary (GH-15641) (GH-15789) https://github.com/python/cpython/commit/23669330b7d0d5ad1a9aac40315ba4c2e765f9dd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 21:37:51 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 10 Sep 2019 01:37:51 +0000 Subject: [issue38078] IDLE: Don't run internal code in user namespace. Message-ID: <1568079471.24.0.207748043003.issue38078@roundup.psfhosted.org> New submission from Terry J. Reedy : #38077 fixed the bug of internal runcommand code not deleting 'argv' from the user namespace. This issue is about not running code there. When a subprocess is running, pyshell.ModifiedInterpreter.runcommand runs python code created by IDLE in locals == __main__.__dict__, the same as code enter by a user. This requires that the code carefully clean up after itself. I believe the same effect could by had more safely by exec-ing internal commands in the run module dict or a fresh temporary dict. Possible solution. In run.Executive.runcode, add 'user=True' to runcode signature, add 'if user else {}' to 'self.locals' arg, and add def runcommand(self, code): return self.runcode(code, user=False). Then replace 'runcode' with 'runcommand' in pyshell runcommand body. ---------- assignee: terry.reedy components: IDLE messages: 351562 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: Don't run internal code in user namespace. type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 22:08:00 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 10 Sep 2019 02:08:00 +0000 Subject: [issue38077] IDLE leaking ARGV into globals() namespace In-Reply-To: <1568063584.53.0.428247792791.issue38077@roundup.psfhosted.org> Message-ID: <1568081280.03.0.121165207501.issue38077@roundup.psfhosted.org> Terry J. Reedy added the comment: I verified that 'argv' (bound to sys.argv) appears for all three versions after running an editor file, but not when Shell is started normally, without a file. The immediate culprit is the runcommand code in runscript, lines 156-168. As part of the patch to allow additions to sys.argv, temporary name 'argv' was added but not deleted at the end. I missed this when I reviewed the patch. So this bug only affected 3.7.4 and 3.8.0b2 to 3.8.0b4. The immediate fix is trivial. The deeper problem is running internal IDLE code in the user namespace. I believe that this is not necessary and opened #38078 to test and fix. ---------- nosy: +cheryl.sabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 22:18:13 2019 From: report at bugs.python.org (Ma Lin) Date: Tue, 10 Sep 2019 02:18:13 +0000 Subject: [issue38015] inline function generates slightly inefficient machine code In-Reply-To: <1567483364.75.0.314519224234.issue38015@roundup.psfhosted.org> Message-ID: <1568081892.99.0.562869776295.issue38015@roundup.psfhosted.org> Ma Lin added the comment: PR 15710 has been merged into the master, but the merge message is not shown here. Commit: https://github.com/python/cpython/commit/6b519985d23bd0f0bd072b5d5d5f2c60a81a19f2 Maybe this issue can be closed. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 22:22:23 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 10 Sep 2019 02:22:23 +0000 Subject: [issue38077] IDLE leaking ARGV into globals() namespace In-Reply-To: <1568063584.53.0.428247792791.issue38077@roundup.psfhosted.org> Message-ID: <1568082143.2.0.216437066793.issue38077@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +15466 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15818 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 22:45:02 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 10 Sep 2019 02:45:02 +0000 Subject: [issue37825] IDLE doc improvements In-Reply-To: <1565542459.61.0.695168571425.issue37825@roundup.psfhosted.org> Message-ID: <1568083502.36.0.658072263544.issue37825@roundup.psfhosted.org> Terry J. Reedy added the comment: 5 Delete use of 'extension' referring to converted features. "If you don?t like the ACW popping up unbidden, simply make the delay longer or disable the extension." Remove ' or ...' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 23:10:52 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 10 Sep 2019 03:10:52 +0000 Subject: [issue38077] IDLE leaking ARGV into globals() namespace In-Reply-To: <1568063584.53.0.428247792791.issue38077@roundup.psfhosted.org> Message-ID: <1568085052.17.0.454999809533.issue38077@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset c59295a1ca304f37ca136dd7efca9e560db27d28 by Terry Jan Reedy in branch 'master': bpo-38077: IDLE no longer adds 'argv' to the user namespace (GH-15818) https://github.com/python/cpython/commit/c59295a1ca304f37ca136dd7efca9e560db27d28 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 23:10:59 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 03:10:59 +0000 Subject: [issue38077] IDLE leaking ARGV into globals() namespace In-Reply-To: <1568063584.53.0.428247792791.issue38077@roundup.psfhosted.org> Message-ID: <1568085059.39.0.382222064335.issue38077@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15467 pull_request: https://github.com/python/cpython/pull/15819 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 23:11:06 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 03:11:06 +0000 Subject: [issue38077] IDLE leaking ARGV into globals() namespace In-Reply-To: <1568063584.53.0.428247792791.issue38077@roundup.psfhosted.org> Message-ID: <1568085066.3.0.518355602046.issue38077@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15468 pull_request: https://github.com/python/cpython/pull/15820 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 23:27:06 2019 From: report at bugs.python.org (Ashwin Ramaswami) Date: Tue, 10 Sep 2019 03:27:06 +0000 Subject: [issue37488] Document the "gotcha" behaviors in utcnow() and utcfromtimestamp() In-Reply-To: <1562083298.89.0.799843667155.issue37488@roundup.psfhosted.org> Message-ID: <1568086026.3.0.713061399742.issue37488@roundup.psfhosted.org> Ashwin Ramaswami added the comment: Why not deprecate them? ---------- nosy: +epicfaace _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 23:29:04 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 03:29:04 +0000 Subject: [issue38077] IDLE leaking ARGV into globals() namespace In-Reply-To: <1568063584.53.0.428247792791.issue38077@roundup.psfhosted.org> Message-ID: <1568086144.83.0.482091478073.issue38077@roundup.psfhosted.org> miss-islington added the comment: New changeset 29bde48ade5dbd5d88cfe309653014c84bebb89c by Miss Islington (bot) in branch '3.8': bpo-38077: IDLE no longer adds 'argv' to the user namespace (GH-15818) https://github.com/python/cpython/commit/29bde48ade5dbd5d88cfe309653014c84bebb89c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 9 23:33:27 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 03:33:27 +0000 Subject: [issue38077] IDLE leaking ARGV into globals() namespace In-Reply-To: <1568063584.53.0.428247792791.issue38077@roundup.psfhosted.org> Message-ID: <1568086407.84.0.964492727734.issue38077@roundup.psfhosted.org> miss-islington added the comment: New changeset 64947dc81a94692fa8ed21c2199a19a0188150ad by Miss Islington (bot) in branch '3.7': bpo-38077: IDLE no longer adds 'argv' to the user namespace (GH-15818) https://github.com/python/cpython/commit/64947dc81a94692fa8ed21c2199a19a0188150ad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 00:03:47 2019 From: report at bugs.python.org (Vinay Sharma) Date: Tue, 10 Sep 2019 04:03:47 +0000 Subject: [issue38018] Increase Code Coverage for multiprocessing.shared_memory In-Reply-To: <1567519085.54.0.887939969587.issue38018@roundup.psfhosted.org> Message-ID: <1568088227.08.0.907056424729.issue38018@roundup.psfhosted.org> Change by Vinay Sharma : ---------- pull_requests: +15469 pull_request: https://github.com/python/cpython/pull/15821 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 00:58:47 2019 From: report at bugs.python.org (Vinay Sharma) Date: Tue, 10 Sep 2019 04:58:47 +0000 Subject: [issue38018] Increase Code Coverage for multiprocessing.shared_memory In-Reply-To: <1567519085.54.0.887939969587.issue38018@roundup.psfhosted.org> Message-ID: <1568091527.4.0.546896116532.issue38018@roundup.psfhosted.org> Vinay Sharma added the comment: Hi I have opened another PR: https://github.com/python/cpython/pull/15821 This should fix test failures in FreeBSD. FreeBSD requires a leading slash in shared memory names. That's why it was throwing the below error: ====================================================================== ERROR: test_shared_memory_basics (test.test_multiprocessing_spawn.WithProcessesTestSharedMemory) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/_test_multiprocessing.py", line 3737, in test_shared_memory_basics shm1 = shared_memory.SharedMemory(create=True, size=1) File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/multiprocessing/shared_memory.py", line 89, in __init__ self._fd = _posixshmem.shm_open( OSError: [Errno 22] Invalid argument: 'test01_fn' ---------------------------------------------------------------------- test01_fn doesn't contain a leading slash that's why it is an invalid argument. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 01:00:03 2019 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Tue, 10 Sep 2019 05:00:03 +0000 Subject: [issue38077] IDLE leaking ARGV into globals() namespace In-Reply-To: <1568063584.53.0.428247792791.issue38077@roundup.psfhosted.org> Message-ID: <1568091603.96.0.107448725604.issue38077@roundup.psfhosted.org> Vedran ?a?i? added the comment: I just want to express my delight, Terry, about your desire to solve the root of the problem instead of just fixing a particular instance. (This is not the first time I witnessed that.) It's a big part of the reason why I love Python so much. ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 01:26:45 2019 From: report at bugs.python.org (Vinay Sharma) Date: Tue, 10 Sep 2019 05:26:45 +0000 Subject: [issue38018] Increase Code Coverage for multiprocessing.shared_memory In-Reply-To: <1567519085.54.0.887939969587.issue38018@roundup.psfhosted.org> Message-ID: <1568093205.69.0.409153869247.issue38018@roundup.psfhosted.org> Vinay Sharma added the comment: Also, I haven't made a NEWS entry since it's just a short bug fix ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 01:39:06 2019 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 10 Sep 2019 05:39:06 +0000 Subject: [issue37445] Some FormatMessageW() calls use FORMAT_MESSAGE_FROM_SYSTEM without FORMAT_MESSAGE_IGNORE_INSERTS In-Reply-To: <1561766338.66.0.394752973171.issue37445@roundup.psfhosted.org> Message-ID: <1568093946.31.0.31980303484.issue37445@roundup.psfhosted.org> Change by Zackery Spytz : ---------- pull_requests: +15470 pull_request: https://github.com/python/cpython/pull/15822 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 02:03:54 2019 From: report at bugs.python.org (Greg Price) Date: Tue, 10 Sep 2019 06:03:54 +0000 Subject: [issue38079] _PyObject_VAR_SIZE should avoid arithmetic overflow Message-ID: <1568095434.38.0.419984745356.issue38079@roundup.psfhosted.org> New submission from Greg Price : Currently `_PyObject_VAR_SIZE` effectively has a precondition that it must not be passed arguments which would overflow in its arithmetic. If that's violated, it overflows... which is undefined behavior already, and in fact the likely next thing that happens is we allocate a short buffer for a giant array of items, then overflow the buffer, bam! (The arithmetic is on `Py_ssize_t`, a signed integer type; that's why overflow is UB.) It's quite difficult to maintain that precondition at call sites, because it effectively means writing a check that duplicates the content of `_PyObject_VAR_SIZE` modulo some algebraic rearrangement. Empirically we don't consistently manage that: we just fixed an 11-year-old bug where such a check was wrong (luckily in the safe/over-conservative direction), and some other call paths don't immediately appear to be checking at all. So, I think it would be helpful to move that check into `_PyObject_VAR_SIZE` itself. Cc'ing the three folks on the interest list "coverity scan", as that one seems the closest match for who'd likely be interested in commenting on this. Details below, largely from GH-14838 which got me looking at this. --- In GH-14838, @sir-sigurd fixed an overflow check on a call to PyObject_GC_NewVar. The call site looked like this: if ((size_t)size > ((size_t)PY_SSIZE_T_MAX - sizeof(PyTupleObject) - sizeof(PyObject *)) / sizeof(PyObject *)) { return (PyTupleObject *)PyErr_NoMemory(); } op = PyObject_GC_NewVar(PyTupleObject, &PyTuple_Type, size); but the `- sizeof(PyObject *)` had the wrong sign. Happily the bug made the check too conservative, but that's basically a lucky coin-flip we had -- a similar bug could just as easily have gone the other direction, making the code vulnerable to arithmetic overflow, then memory corruption from overflowing a too-small buffer. The bug was present for 11 years. Sergey, I am still very curious how you discovered the bug. :-) I feel like there's an opportunity for a more complete fix as a followup to this; that's this thread. --- My next question on reading that fix was, OK, how can we write this so it's hard to get wrong? I think the point is that `PyObject_GC_NewVar` really has a precondition, that the `nitems` it's passed (`size` in this caller) not be so big that the allocation will overflow. Specifically `_PyObject_VAR_SIZE(tp, nitems)` needs to not overflow. All the trickiness in this overflow check is basically an algebraic rearrangement of what `_PyObject_VAR_SIZE(&PyTuple_Type, size)` would say, plus substituting in the values actually found at `&PyTuple_Type`. So, a sort of minimal fix would be to make something with a name like `PyObject_GC_NewVar_WouldOverflow` that encodes that. Maybe that in turn would just be a macro to delegate to a `_PyObject_VAR_SIZE_WOULD_OVERFLOW`, so that each layer only has to know what it actually knows. I think that immediately raises a next question, though, which is: are other call sites of `PyObject_GC_NewVar` checking properly for overflow? At a quick grep, I see some that don't appear to be checking. And: why should they have to? It seems like the best place for this check is immediately before the possibly-overflowing computation; or if not there, then the closer to it the better. So, the ideal solution: `_PyObject_VAR_SIZE` itself would be augmented to first do this check, and only if it won't overflow then go and actually multiply. There are only a handful of call sites of `_PyObject_VAR_SIZE`, so it wouldn't even be much of a migration to then take care of each of them. Then we wouldn't need these prophylactic checks at callers' callers -- which (a) this bug demonstrates are hard to consistently get right, and (b) the grep mentioned above suggests we may not be consistently doing in the first place. ---------- components: Interpreter Core messages: 351573 nosy: Greg Price, brett.cannon, christian.heimes, sir-sigurd, twouters priority: normal severity: normal status: open title: _PyObject_VAR_SIZE should avoid arithmetic overflow versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 02:05:35 2019 From: report at bugs.python.org (Sergey Fedoseev) Date: Tue, 10 Sep 2019 06:05:35 +0000 Subject: [issue38079] _PyObject_VAR_SIZE should avoid arithmetic overflow In-Reply-To: <1568095434.38.0.419984745356.issue38079@roundup.psfhosted.org> Message-ID: <1568095535.64.0.249122653134.issue38079@roundup.psfhosted.org> Change by Sergey Fedoseev : ---------- keywords: +patch pull_requests: +15471 stage: -> patch review pull_request: https://github.com/python/cpython/pull/14838 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 02:08:06 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 Sep 2019 06:08:06 +0000 Subject: [issue38075] Make random module PEP-384 compatible In-Reply-To: <1568044678.81.0.091085634764.issue38075@roundup.psfhosted.org> Message-ID: <1568095686.91.0.544775055213.issue38075@roundup.psfhosted.org> Serhiy Storchaka added the comment: I have the same questions. The new code looks more complex and cumbersome. What is the benefit of all these changes? I see you have created many similar issues. Would be nice to discuss first on the Python-Dev list what they do and why they are needed. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 02:09:27 2019 From: report at bugs.python.org (Greg Price) Date: Tue, 10 Sep 2019 06:09:27 +0000 Subject: [issue38079] _PyObject_VAR_SIZE should avoid arithmetic overflow In-Reply-To: <1568095434.38.0.419984745356.issue38079@roundup.psfhosted.org> Message-ID: <1568095767.29.0.158022709395.issue38079@roundup.psfhosted.org> Greg Price added the comment: (The tracker just linked GH-14838 to this issue because I mentioned it in a comment there, but it's not for this issue -- it's that recent fix for an 11-year-old bug in a callsite's overflow check.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 02:14:06 2019 From: report at bugs.python.org (=?utf-8?b?5b6Q6Z2W?=) Date: Tue, 10 Sep 2019 06:14:06 +0000 Subject: [issue38080] 2to3 urllib fixer: missing fix for urllib.getproxies Message-ID: <1568096046.76.0.575371443955.issue38080@roundup.psfhosted.org> New submission from ?? : urllib.getproxies can be converted to urllib.request.getproxies, and their documentation looks the same. but in fix_urllib.py and my real test, it is ignored. I do not know why 2to3 does nothing. Is it a bug? ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 351576 nosy: shiyuchong priority: normal severity: normal status: open title: 2to3 urllib fixer: missing fix for urllib.getproxies type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 02:30:37 2019 From: report at bugs.python.org (=?utf-8?b?0JDQu9C10LrRgdCw0L3QtNGAINCh0LXQvNC10L3QvtCy?=) Date: Tue, 10 Sep 2019 06:30:37 +0000 Subject: [issue38081] Different behavior of in 3.7 and 3.8 os.path.realpath('nul') Message-ID: <1568097037.9.0.584511449633.issue38081@roundup.psfhosted.org> New submission from ????????? ??????? : Windows 10: ``` C:\Users\User\Downloads>py -3.7 -c "import os.path;os.path.realpath('nul')" C:\Users\User\Downloads>py -3.8 -c "import os.path;os.path.realpath('nul')" Traceback (most recent call last): File "", line 1, in File "C:\Python38\lib\ntpath.py", line 592, in realpath path = _getfinalpathname_nonstrict(path) File "C:\Python38\lib\ntpath.py", line 566, in _getfinalpathname_nonstrict path = _readlink_deep(path, seen) File "C:\Python38\lib\ntpath.py", line 536, in _readlink_deep path = _nt_readlink(path) OSError: [WinError 1] ???????? ???????: 'nul' ``` I think it's a bug. pip uses this code, so 'pip install pandas' won't work in 3.8 ---------- components: Library (Lib) messages: 351577 nosy: ????????? ??????? priority: normal severity: normal status: open title: Different behavior of in 3.7 and 3.8 os.path.realpath('nul') type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 02:33:14 2019 From: report at bugs.python.org (Donny Brown) Date: Tue, 10 Sep 2019 06:33:14 +0000 Subject: [issue38055] Starting multiprocessing.Process raises FileNotFoundError unexpectedly In-Reply-To: <1567951615.68.0.110531280911.issue38055@roundup.psfhosted.org> Message-ID: <1568097194.49.0.19873571492.issue38055@roundup.psfhosted.org> Change by Donny Brown : ---------- title: Starting multiprocessing.Process causes FileNotFoundError -> Starting multiprocessing.Process raises FileNotFoundError unexpectedly type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 02:34:22 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 10 Sep 2019 06:34:22 +0000 Subject: [issue38081] Different behavior of in 3.7 and 3.8 os.path.realpath('nul') In-Reply-To: <1568097037.9.0.584511449633.issue38081@roundup.psfhosted.org> Message-ID: <1568097262.74.0.292186462582.issue38081@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 02:37:36 2019 From: report at bugs.python.org (=?utf-8?b?0JDQu9C10LrRgdCw0L3QtNGAINCh0LXQvNC10L3QvtCy?=) Date: Tue, 10 Sep 2019 06:37:36 +0000 Subject: [issue38081] Different behavior of in 3.7 and 3.8 os.path.realpath('nul') In-Reply-To: <1568097037.9.0.584511449633.issue38081@roundup.psfhosted.org> Message-ID: <1568097456.95.0.756793736611.issue38081@roundup.psfhosted.org> ????????? ??????? added the comment: 1) Python 3.8.0b4 (tags/v3.8.0b4:d93605d, Aug 29 2019, 23:21:28) [MSC v.1916 64 bit (AMD64)] on win32 2) Looks like identical with https://bugs.python.org/issue1311 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 02:42:15 2019 From: report at bugs.python.org (=?utf-8?b?0JDQu9C10LrRgdCw0L3QtNGAINCh0LXQvNC10L3QvtCy?=) Date: Tue, 10 Sep 2019 06:42:15 +0000 Subject: [issue38081] Different behavior of os.path.realpath('nul') in 3.7 and 3.8 In-Reply-To: <1568097037.9.0.584511449633.issue38081@roundup.psfhosted.org> Message-ID: <1568097735.6.0.235461570947.issue38081@roundup.psfhosted.org> Change by ????????? ??????? : ---------- title: Different behavior of in 3.7 and 3.8 os.path.realpath('nul') -> Different behavior of os.path.realpath('nul') in 3.7 and 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 02:48:31 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 10 Sep 2019 06:48:31 +0000 Subject: [issue38018] Increase Code Coverage for multiprocessing.shared_memory In-Reply-To: <1567519085.54.0.887939969587.issue38018@roundup.psfhosted.org> Message-ID: <1568098111.11.0.560899104096.issue38018@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 2fc1160a80733f4c5c88796319154b3f59e98e4b by Pablo Galindo (Vinay Sharma) in branch 'master': bpo-38018: Fix test for multiprocessing.shared_memory in BSD systems (GH-15821) https://github.com/python/cpython/commit/2fc1160a80733f4c5c88796319154b3f59e98e4b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 03:03:53 2019 From: report at bugs.python.org (Abhisek Maiti) Date: Tue, 10 Sep 2019 07:03:53 +0000 Subject: [issue38082] datetime.time object incorrectly shows associated date in strftime() output Message-ID: <1568099033.84.0.293529557755.issue38082@roundup.psfhosted.org> New submission from Abhisek Maiti : ` from datetime import time t = time(13, 5, 45) ` While `t.year`, `t.month` and `t.day` results into `AttributeError` the following: ` t.strftime('%Y : %B : %d - %H : %M : %S') ` generates: ` 1900 : January : 01 - 13 : 05 : 45 ` This is unexpected behavior since `datetime.time` object does not have those attributes. The documentation at https://docs.python.org/3/library/datetime.html specifically states that " class datetime.time An idealized time, independent of any particular day, assuming that every day has exactly 24*60*60 seconds (there is no notion of ?leap seconds? here). Attributes: hour, minute, second, microsecond, and tzinfo. " ---------- components: Library (Lib) messages: 351580 nosy: Abhisek Maiti priority: normal severity: normal status: open title: datetime.time object incorrectly shows associated date in strftime() output type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 03:10:11 2019 From: report at bugs.python.org (Greg Price) Date: Tue, 10 Sep 2019 07:10:11 +0000 Subject: [issue37936] gitignore file is too broad In-Reply-To: <1566630912.92.0.00349300289224.issue37936@roundup.psfhosted.org> Message-ID: <1568099411.04.0.577163055395.issue37936@roundup.psfhosted.org> Change by Greg Price : ---------- pull_requests: +15472 pull_request: https://github.com/python/cpython/pull/15823 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 03:19:18 2019 From: report at bugs.python.org (Greg Price) Date: Tue, 10 Sep 2019 07:19:18 +0000 Subject: [issue37936] gitignore file is too broad In-Reply-To: <1566630912.92.0.00349300289224.issue37936@roundup.psfhosted.org> Message-ID: <1568099958.84.0.867533611326.issue37936@roundup.psfhosted.org> Greg Price added the comment: Thanks @zach.ware for the review and merge of GH-15451! That was the "minimal" fix, fixing rules that apply to files we have in the repo now. So `rg` will no longer ignore `PC/pyconfig.h`. :-) I've just sent GH-15823 with the "more thorough" fix on top of that, which tries to make it easy not to fall into the same Git pitfall again. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 03:21:56 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 Sep 2019 07:21:56 +0000 Subject: [issue38083] Minor improvements in asdl_c.py and Python-ast.c Message-ID: <1568100116.88.0.525709025274.issue38083@roundup.psfhosted.org> New submission from Serhiy Storchaka : * Use the const qualifier for constant C strings. This will save memory for their copy in a modifiable memory. * Intern field and attribute names. This will save time, as comparing interned strings is faster. * Temporary incref a borrowed reference to a list item. Arbitrary Python code can be executed when convert an item to C values. The list containing the item can be modified and the reference can became dead if not incref it. ---------- components: Interpreter Core messages: 351582 nosy: eric.snow, serhiy.storchaka priority: normal severity: normal status: open title: Minor improvements in asdl_c.py and Python-ast.c versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 03:23:21 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 Sep 2019 07:23:21 +0000 Subject: [issue38083] Minor improvements in asdl_c.py and Python-ast.c In-Reply-To: <1568100116.88.0.525709025274.issue38083@roundup.psfhosted.org> Message-ID: <1568100201.01.0.961733915144.issue38083@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +15473 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15824 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 03:29:46 2019 From: report at bugs.python.org (=?utf-8?b?0JDQu9C10LrRgdCw0L3QtNGAINCh0LXQvNC10L3QvtCy?=) Date: Tue, 10 Sep 2019 07:29:46 +0000 Subject: [issue38081] Different behavior of os.path.realpath('nul') in 3.7 and 3.8 In-Reply-To: <1568097037.9.0.584511449633.issue38081@roundup.psfhosted.org> Message-ID: <1568100586.82.0.538656807044.issue38081@roundup.psfhosted.org> ????????? ??????? added the comment: It breaks setuptools.sandbox.DirectorySandbox.__init__() with default param 'exceptions' which includes os.devnull and calls os.path.realpath() on it. So, many distributions crashes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 03:31:38 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 07:31:38 +0000 Subject: [issue37383] call count in not registered in AsyncMock till the coroutine is awaited In-Reply-To: <1561372216.92.0.906837687381.issue37383@roundup.psfhosted.org> Message-ID: <1568100698.2.0.931982549758.issue37383@roundup.psfhosted.org> miss-islington added the comment: New changeset d4391aa5eb4767e19b7b380a836413e7c47f1fb4 by Miss Islington (bot) in branch '3.8': bpo-37383: Updates docs to reflect AsyncMock call_count after await. (GH-15761) https://github.com/python/cpython/commit/d4391aa5eb4767e19b7b380a836413e7c47f1fb4 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 03:31:59 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 07:31:59 +0000 Subject: [issue37662] Document venv.EnvBuilder.upgrade_dependencies() In-Reply-To: <1563913525.16.0.930618817758.issue37662@roundup.psfhosted.org> Message-ID: <1568100719.26.0.364351798787.issue37662@roundup.psfhosted.org> miss-islington added the comment: New changeset 74b7413d3a9be5e06b16eb2b9a6bdc1f3fe44bbb by Miss Islington (bot) in branch '3.8': bpo-37662: Documented venv.EnvBuilder.upgrade_dependencies(). (GH-15768) https://github.com/python/cpython/commit/74b7413d3a9be5e06b16eb2b9a6bdc1f3fe44bbb ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 03:33:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Sep 2019 07:33:33 +0000 Subject: [issue36511] Add Windows ARM32 buildbot In-Reply-To: <1554232161.58.0.393661272603.issue36511@roundup.psfhosted.org> Message-ID: <1568100813.88.0.706595089366.issue36511@roundup.psfhosted.org> STINNER Victor added the comment: I rejected PR 14244 because there are now many conflicts: the commit f355069a3337711642c3403429afb9faef93f512 should be backported manually to Python 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 03:36:11 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 10 Sep 2019 07:36:11 +0000 Subject: [issue38082] datetime.time object incorrectly shows associated date in strftime() output In-Reply-To: <1568099033.84.0.293529557755.issue38082@roundup.psfhosted.org> Message-ID: <1568100971.37.0.0425858607861.issue38082@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +belopolsky, p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 03:41:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Sep 2019 07:41:38 +0000 Subject: [issue33418] Memory leaks in functions In-Reply-To: <1525370063.61.0.682650639539.issue33418@psf.upfronthosting.co.za> Message-ID: <1568101298.09.0.0433335091871.issue33418@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15474 pull_request: https://github.com/python/cpython/pull/15826 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 03:42:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Sep 2019 07:42:59 +0000 Subject: [issue33418] Memory leaks in functions In-Reply-To: <1525370063.61.0.682650639539.issue33418@psf.upfronthosting.co.za> Message-ID: <1568101379.62.0.702523417375.issue33418@roundup.psfhosted.org> STINNER Victor added the comment: "f.__doc__ = f" or "f.__module__ = f" don't make any sense. It looks like a bug triggered on purpose. While it's bad, it's not a big deal. The fix (commit 3c452404ae178b742967589a0bb4a5ec768d76e0) is causing way worse issues than the "artificial" memory leak (reference cycle). I wrote PR 15826 to revert the change in Python 3.8. bpo-38006 root issues are not well understood nor fixed yet. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 03:52:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Sep 2019 07:52:00 +0000 Subject: [issue37245] Azure Pipeline 3.8 CI: multiple tests hung and timed out on macOS 10.13 In-Reply-To: <1560340622.3.0.842050597369.issue37245@roundup.psfhosted.org> Message-ID: <1568101920.39.0.0474439490656.issue37245@roundup.psfhosted.org> STINNER Victor added the comment: Steve: Would you mind to open a separated issue for the multiprocessing bug? multiprocessing is supposed to handle this case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 03:58:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Sep 2019 07:58:02 +0000 Subject: [issue36338] urlparse of urllib returns wrong hostname In-Reply-To: <1552896371.92.0.122580708995.issue36338@roundup.psfhosted.org> Message-ID: <1568102282.3.0.285325776989.issue36338@roundup.psfhosted.org> STINNER Victor added the comment: To be clear, the \ in 'http://benign.com\[attacker.com]' is not needed to reproduce the bug: vstinner at apu$ python3 Python 3.7.4 (default, Jul 9 2019, 16:32:37) >>> from urllib.parse import urlparse; print(urlparse('http://demo.com[attacker.com]').hostname) attacker.com ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 04:07:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Sep 2019 08:07:39 +0000 Subject: [issue36338] urlparse of urllib returns wrong hostname In-Reply-To: <1552896371.92.0.122580708995.issue36338@roundup.psfhosted.org> Message-ID: <1568102859.75.0.891017463482.issue36338@roundup.psfhosted.org> STINNER Victor added the comment: Python 3.5 and newer are impacted, but Python 2.7 behaves differently: vstinner at apu$ python2 Python 2.7.16 (default, Apr 30 2019, 15:54:43) >>> from urlparse import urlparse >>> urlparse('http://demo.com[attacker.com]').hostname 'emo.com[attacker.com' ---------- versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 04:46:59 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 08:46:59 +0000 Subject: [issue35941] ssl.enum_certificates() regression In-Reply-To: <1549637009.73.0.764067041861.issue35941@roundup.psfhosted.org> Message-ID: <1568105219.67.0.0573330467916.issue35941@roundup.psfhosted.org> Steve Dower added the comment: New changeset b4fb2c29f34c322855ab6be72b491930cf508f64 by Steve Dower in branch '3.7': bpo-35941: Fix performance regression in SSL certificate code (GH-12610) https://github.com/python/cpython/commit/b4fb2c29f34c322855ab6be72b491930cf508f64 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 04:50:44 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 10 Sep 2019 08:50:44 +0000 Subject: [issue37383] call count in not registered in AsyncMock till the coroutine is awaited In-Reply-To: <1561372216.92.0.906837687381.issue37383@roundup.psfhosted.org> Message-ID: <1568105444.05.0.842183593311.issue37383@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Closing since docs are updated. Thank you Lisa. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 04:53:38 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 08:53:38 +0000 Subject: [issue37597] audit event table breaks PDF sphinx build In-Reply-To: <1563208463.4.0.49055543405.issue37597@roundup.psfhosted.org> Message-ID: <1568105618.66.0.360583658009.issue37597@roundup.psfhosted.org> Change by Steve Dower : ---------- assignee: -> mdk keywords: +patch pull_requests: +15475 resolution: -> fixed stage: -> patch review status: open -> closed pull_request: https://github.com/python/cpython/pull/15739 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 04:55:08 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 10 Sep 2019 08:55:08 +0000 Subject: [issue37597] audit event table breaks PDF sphinx build In-Reply-To: <1563208463.4.0.49055543405.issue37597@roundup.psfhosted.org> Message-ID: <1568105708.8.0.80906733488.issue37597@roundup.psfhosted.org> Change by Julien Palard : ---------- stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 04:55:37 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 10 Sep 2019 08:55:37 +0000 Subject: [issue25237] Add doc for tkinter commondialog.Dialog and subclasses In-Reply-To: <1443236612.77.0.515516122635.issue25237@psf.upfronthosting.co.za> Message-ID: <1568105737.18.0.248859437129.issue25237@roundup.psfhosted.org> Julien Palard added the comment: New changeset 80428ed4e19b31071433806b4d89465c88e084c6 by Julien Palard (Nikhil) in branch 'master': bpo-25237: Documentation for tkinter modules (GH-1870) https://github.com/python/cpython/commit/80428ed4e19b31071433806b4d89465c88e084c6 ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 04:56:16 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 10 Sep 2019 08:56:16 +0000 Subject: [issue25237] Add doc for tkinter commondialog.Dialog and subclasses In-Reply-To: <1443236612.77.0.515516122635.issue25237@psf.upfronthosting.co.za> Message-ID: <1568105776.59.0.414082325607.issue25237@roundup.psfhosted.org> Change by Julien Palard : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 04:58:29 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 08:58:29 +0000 Subject: [issue38084] multiprocessing cannot recover from crashed worker Message-ID: <1568105909.03.0.686404819271.issue38084@roundup.psfhosted.org> New submission from Steve Dower : Imitation repro: import os from multiprocessing import Pool def f(x): os._exit(0) return "success" if __name__ == '__main__': with Pool(1) as p: print(p.map(f, [1])) Obviously a process may crash for various other reasons besides os._exit(). I believe this is the cause of issue37245. ---------- messages: 351594 nosy: davin, pitrou, steve.dower priority: normal severity: normal status: open title: multiprocessing cannot recover from crashed worker type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 04:58:52 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 08:58:52 +0000 Subject: [issue37245] Azure Pipeline 3.8 CI: multiple tests hung and timed out on macOS 10.13 In-Reply-To: <1560340622.3.0.842050597369.issue37245@roundup.psfhosted.org> Message-ID: <1568105932.04.0.623631380425.issue37245@roundup.psfhosted.org> Steve Dower added the comment: Filed as issue38084 I recommend not investigating this issue any further until that one is resolved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 05:02:08 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 09:02:08 +0000 Subject: [issue35941] ssl.enum_certificates() regression In-Reply-To: <1549637009.73.0.764067041861.issue35941@roundup.psfhosted.org> Message-ID: <1568106128.73.0.56252859036.issue35941@roundup.psfhosted.org> Steve Dower added the comment: New changeset fdd17abc51e363ab19d248375d717512b8b26966 by Steve Dower in branch '3.8': bpo-35941: Fix performance regression in SSL certificate code (GH-12610) https://github.com/python/cpython/commit/fdd17abc51e363ab19d248375d717512b8b26966 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 05:03:27 2019 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 10 Sep 2019 09:03:27 +0000 Subject: [issue37857] Setting logger.level directly has no effect due to caching in 3.7+ In-Reply-To: <1565811970.47.0.529067236549.issue37857@roundup.psfhosted.org> Message-ID: <1568106207.03.0.050622926655.issue37857@roundup.psfhosted.org> Vinay Sajip added the comment: > are we here to punish people No, that's not what I'm saying. But it's not a priority to support situations where people don't follow published APIs and still expect things to work the way they would like. I would prefer people to use setLevel(), as it helps to have consistent usage. > Certainly the Linux kernel and Windows both have a philosophy of not breaking working userspace code It's Python's philosophy, too. The philosophy is that of not breaking userspace code *which follows published APIs*. If you use unpublished APIs or rely on implementation details, you're generally on your own. That's the situation here, in reference to code that's out in the wild setting the attribute directly rather than via setLevel(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 05:08:14 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 09:08:14 +0000 Subject: [issue35941] ssl.enum_certificates() regression In-Reply-To: <1549637009.73.0.764067041861.issue35941@roundup.psfhosted.org> Message-ID: <1568106494.41.0.19818592493.issue35941@roundup.psfhosted.org> Steve Dower added the comment: That's 3.7 and later dealt with. Apparently this needs a backport to 2.7 still, so I'll leave the bug open. ---------- stage: patch review -> backport needed versions: -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 05:09:41 2019 From: report at bugs.python.org (xitop) Date: Tue, 10 Sep 2019 09:09:41 +0000 Subject: [issue38085] Interrupting class creation in __init_subclass__ may lead to incorrect isinstance() and issubclass() results Message-ID: <1568106581.16.0.558052842785.issue38085@roundup.psfhosted.org> New submission from xitop : An exception in __init__subclass__ leads under certain circumstances to wrong isinstance() and issubclass() results. The exception probably leaves Python internal data in inconsistent state. Here is a demonstration program from Stack Overflow: --- begin -- from abc import ABCMeta class Animal(metaclass=ABCMeta): pass class Plant(metaclass=ABCMeta): def __init_subclass__(cls): assert not issubclass(cls, Animal), "Plants cannot be Animals" class Dog(Animal): pass try: class Triffid(Animal, Plant): pass except Exception: pass print("Dog is Animal?", issubclass(Dog, Animal)) print("Dog is Plant?", issubclass(Dog, Plant)) --- end -- Result is: Dog is Animal? True Dog is Plant? True Changing the order of the print statements will result in: Dog is Plant? False Dog is Animal? False Another ill-behaving program and a partial analysis can be found at SO: https://stackoverflow.com/q/57848663/5378816 ---------- components: Interpreter Core messages: 351599 nosy: xitop priority: normal severity: normal status: open title: Interrupting class creation in __init_subclass__ may lead to incorrect isinstance() and issubclass() results type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 05:29:29 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 10 Sep 2019 09:29:29 +0000 Subject: [issue38043] small cleanups in Unicode normalization code In-Reply-To: <1567745214.3.0.712701659381.issue38043@roundup.psfhosted.org> Message-ID: <1568107769.83.0.876404780044.issue38043@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 1ad0c776cb640be9f19c8019bbf34bb4aba312ad by Benjamin Peterson (Greg Price) in branch 'master': bpo-38043: Move unicodedata.normalize tests into test_unicodedata. (GH-15712) https://github.com/python/cpython/commit/1ad0c776cb640be9f19c8019bbf34bb4aba312ad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 05:34:09 2019 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 10 Sep 2019 09:34:09 +0000 Subject: [issue38082] datetime.time object incorrectly shows associated date in strftime() output In-Reply-To: <1568099033.84.0.293529557755.issue38082@roundup.psfhosted.org> Message-ID: <1568108049.81.0.411333141284.issue38082@roundup.psfhosted.org> Paul Ganssle added the comment: Hi Abhisek, This is actually the expected / intended behavior, and it is documented under "strptime() and strftime() behavior": https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior (which is linked to by the time.strftime documentation: https://docs.python.org/3/library/datetime.html#datetime.datetime.strftime . The relevant section is: For time objects, the format codes for year, month, and day should not be used, as time objects have no such values. If they?re used anyway, 1900 is substituted for the year, and 1 for the month and day. If I were designing `datetime.time.strftime` from scratch, my instinct would be to throw an error in this case, but my philosophy on parsing interfaces tends towards the stricter side. At this point, I think it would do more harm than good to change this behavior. I imagine that the motivation is something like the Robustness Principle ( https://en.wikipedia.org/wiki/Robustness_principle ), but I wasn't involved in the original design so I can't be sure. Thank you for taking the time to make a bug report, it's very appreciated even when it turns out to not be a bug. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 05:44:23 2019 From: report at bugs.python.org (Dino Viehland) Date: Tue, 10 Sep 2019 09:44:23 +0000 Subject: [issue37725] "make clean" should remove PGO task data In-Reply-To: <1564529029.65.0.599090827857.issue37725@roundup.psfhosted.org> Message-ID: <1568108663.21.0.0355302180255.issue37725@roundup.psfhosted.org> Dino Viehland added the comment: New changeset c6bbcd258302b4b9b3d4f3c39bb5f7ff0120ec67 by Dino Viehland (Neil Schemenauer) in branch 'master': bpo-37725: have "make clean" remove PGO task data (#15033) https://github.com/python/cpython/commit/c6bbcd258302b4b9b3d4f3c39bb5f7ff0120ec67 ---------- nosy: +dino.viehland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 05:50:09 2019 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 10 Sep 2019 09:50:09 +0000 Subject: [issue37683] Use importlib.resources in venv In-Reply-To: <1564077021.19.0.886613759672.issue37683@roundup.psfhosted.org> Message-ID: <1568109009.81.0.0762375022462.issue37683@roundup.psfhosted.org> Vinay Sajip added the comment: > We've basically agreed that you should be able to load resources from subdirectories that aren't packages. It turns out to be not a simple change in importlib.resources, but contributions are welcome! In case anyone is interested, I've already done this in distlib.resources: https://distlib.readthedocs.io/en/latest/reference.html#the-distlib-resources-package Possibly a similar approach could be used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 05:52:23 2019 From: report at bugs.python.org (Inada Naoki) Date: Tue, 10 Sep 2019 09:52:23 +0000 Subject: [issue33418] Memory leaks in functions In-Reply-To: <1525370063.61.0.682650639539.issue33418@psf.upfronthosting.co.za> Message-ID: <1568109143.13.0.838391366196.issue33418@roundup.psfhosted.org> Inada Naoki added the comment: I'm OK to revert it in 3.8. But I am worrying about func.func_closure. Can it create cyclic reference in real life applications? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 05:57:08 2019 From: report at bugs.python.org (Lisa Roach) Date: Tue, 10 Sep 2019 09:57:08 +0000 Subject: [issue37251] Mocking a MagicMock with a function spec results in an AsyncMock In-Reply-To: <1560348018.57.0.546920052201.issue37251@roundup.psfhosted.org> Message-ID: <1568109428.82.0.86632107726.issue37251@roundup.psfhosted.org> Change by Lisa Roach : ---------- pull_requests: +15476 pull_request: https://github.com/python/cpython/pull/15830 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 05:57:34 2019 From: report at bugs.python.org (Thomas Wouters) Date: Tue, 10 Sep 2019 09:57:34 +0000 Subject: [issue33418] Memory leaks in functions In-Reply-To: <1525370063.61.0.682650639539.issue33418@psf.upfronthosting.co.za> Message-ID: <1568109454.47.0.337741196182.issue33418@roundup.psfhosted.org> Thomas Wouters added the comment: New changeset ccaea525885e41c5f1e566bb68698847faaa82ca by T. Wouters (Victor Stinner) in branch '3.8': Revert "bpo-33418: Add tp_clear for function object (GH-8058)" (GH-15826) https://github.com/python/cpython/commit/ccaea525885e41c5f1e566bb68698847faaa82ca ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 06:02:33 2019 From: report at bugs.python.org (Thomas Wouters) Date: Tue, 10 Sep 2019 10:02:33 +0000 Subject: [issue38083] Minor improvements in asdl_c.py and Python-ast.c In-Reply-To: <1568100116.88.0.525709025274.issue38083@roundup.psfhosted.org> Message-ID: <1568109753.6.0.660290145523.issue38083@roundup.psfhosted.org> Thomas Wouters added the comment: New changeset 43c9731334470573209464b7f67914d386457efc by T. Wouters (Serhiy Storchaka) in branch 'master': bpo-38083: Minor improvements in asdl_c.py and Python-ast.c. (GH-15824) https://github.com/python/cpython/commit/43c9731334470573209464b7f67914d386457efc ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 06:03:52 2019 From: report at bugs.python.org (Thomas Wouters) Date: Tue, 10 Sep 2019 10:03:52 +0000 Subject: [issue38083] Minor improvements in asdl_c.py and Python-ast.c In-Reply-To: <1568100116.88.0.525709025274.issue38083@roundup.psfhosted.org> Message-ID: <1568109832.09.0.38361500781.issue38083@roundup.psfhosted.org> Thomas Wouters added the comment: This doesn't feel like a change that's worth backporting to 3.8 at this point. Do you agree? Is there anything left to do for this bug? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 06:18:40 2019 From: report at bugs.python.org (Thomas Wouters) Date: Tue, 10 Sep 2019 10:18:40 +0000 Subject: [issue38076] Make struct module PEP-384 compatible In-Reply-To: <1568046908.42.0.641730550956.issue38076@roundup.psfhosted.org> Message-ID: <1568110720.08.0.998627350285.issue38076@roundup.psfhosted.org> Thomas Wouters added the comment: New changeset 4f384af067d05b16a554bfd976934fca9f87a1cf by T. Wouters (Dino Viehland) in branch 'master': bpo-38076: Make struct module PEP-384 compatible (#15805) https://github.com/python/cpython/commit/4f384af067d05b16a554bfd976934fca9f87a1cf ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 06:27:05 2019 From: report at bugs.python.org (Thomas Wouters) Date: Tue, 10 Sep 2019 10:27:05 +0000 Subject: [issue38074] Make zlib PEP-384 compatible In-Reply-To: <1568043531.47.0.907223270637.issue38074@roundup.psfhosted.org> Message-ID: <1568111225.94.0.504042463729.issue38074@roundup.psfhosted.org> Thomas Wouters added the comment: New changeset a1ffad07195b8b976f8c371a92028240946d4e76 by T. Wouters (Dino Viehland) in branch 'master': bpo-38074: Make zlib extension module PEP-384 compatible (GH-15792) https://github.com/python/cpython/commit/a1ffad07195b8b976f8c371a92028240946d4e76 ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 06:27:32 2019 From: report at bugs.python.org (Michael Foord) Date: Tue, 10 Sep 2019 10:27:32 +0000 Subject: [issue30587] Mock with spec object does not ensure method call signatures In-Reply-To: <1496837046.98.0.920527641247.issue30587@psf.upfronthosting.co.za> Message-ID: <1568111252.69.0.0727147138234.issue30587@roundup.psfhosted.org> Michael Foord added the comment: I'd like spec to have signature validation. I don't think the use case for "attribute validation only" (current spec behaviour) is very strong and I'd rather not add new keywords. The mock API is already too complex. I'll take the existing PR and modify it to use spec instead of adding the new autospec. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 06:30:38 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 10:30:38 +0000 Subject: [issue32165] PyEval_InitThreads is called before Py_Initialize in LoadPython in Modules/_ctypes/callbacks.c In-Reply-To: <1511924168.1.0.213398074469.issue32165@psf.upfronthosting.co.za> Message-ID: <1568111438.95.0.498602461004.issue32165@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch pull_requests: +15477 pull_request: https://github.com/python/cpython/pull/15832 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 06:30:39 2019 From: report at bugs.python.org (Thomas Wouters) Date: Tue, 10 Sep 2019 10:30:39 +0000 Subject: [issue38072] Make grp module PEP-384 compatible Message-ID: <1568111439.21.0.082874199542.issue38072@roundup.psfhosted.org> New submission from Thomas Wouters : New changeset 40a5313edfc18173d136bb5e19495880934b7d83 by T. Wouters (Dino Viehland) in branch 'master': bpo-38072: PEP-384 grpmodule (GH-15788) https://github.com/python/cpython/commit/40a5313edfc18173d136bb5e19495880934b7d83 ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 06:31:08 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 10:31:08 +0000 Subject: [issue32165] PyEval_InitThreads is called before Py_Initialize in LoadPython in Modules/_ctypes/callbacks.c In-Reply-To: <1511924168.1.0.213398074469.issue32165@psf.upfronthosting.co.za> Message-ID: <1568111468.07.0.0565528174171.issue32165@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15478 pull_request: https://github.com/python/cpython/pull/15833 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 06:31:28 2019 From: report at bugs.python.org (Lisa Roach) Date: Tue, 10 Sep 2019 10:31:28 +0000 Subject: [issue37052] Add examples for mocking async for and async context manager in unittest.mock docs In-Reply-To: <1558857063.08.0.951093658338.issue37052@roundup.psfhosted.org> Message-ID: <1568111488.61.0.300391679252.issue37052@roundup.psfhosted.org> Lisa Roach added the comment: I think this is a great addition! Ezio and I were chatting about trying to add an example where the child mocks are also AsyncMocks, since by default they will be MagicMocks. Adding him to nosy. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 06:33:33 2019 From: report at bugs.python.org (Thomas Wouters) Date: Tue, 10 Sep 2019 10:33:33 +0000 Subject: [issue38071] Make termios PEP-384 compatible Message-ID: <1568111613.31.0.271452551159.issue38071@roundup.psfhosted.org> New submission from Thomas Wouters : New changeset bd0c7a12d9e28ce74bfc16244d7694aca906838c by T. Wouters (Dino Viehland) in branch 'master': bpo-38071: Make termios PEP-384 compatible (GH-15785) https://github.com/python/cpython/commit/bd0c7a12d9e28ce74bfc16244d7694aca906838c ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 06:37:20 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 10:37:20 +0000 Subject: [issue37052] Add examples for mocking async for and async context manager in unittest.mock docs In-Reply-To: <1558857063.08.0.951093658338.issue37052@roundup.psfhosted.org> Message-ID: <1568111840.63.0.315447434526.issue37052@roundup.psfhosted.org> miss-islington added the comment: New changeset c8dfa7333d6317d7cd8c5c7366023f5a668e3f91 by Miss Islington (bot) (Xtreak) in branch 'master': bpo-37052: Add examples for mocking async iterators and context managers (GH-14660) https://github.com/python/cpython/commit/c8dfa7333d6317d7cd8c5c7366023f5a668e3f91 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 06:37:28 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 10:37:28 +0000 Subject: [issue37052] Add examples for mocking async for and async context manager in unittest.mock docs In-Reply-To: <1558857063.08.0.951093658338.issue37052@roundup.psfhosted.org> Message-ID: <1568111848.81.0.757406741903.issue37052@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15479 pull_request: https://github.com/python/cpython/pull/15834 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 06:38:01 2019 From: report at bugs.python.org (Thomas Wouters) Date: Tue, 10 Sep 2019 10:38:01 +0000 Subject: [issue38068] clean up configure logic for gettimeofday In-Reply-To: <1568033604.94.0.557427388401.issue38068@roundup.psfhosted.org> Message-ID: <1568111881.91.0.268788537784.issue38068@roundup.psfhosted.org> Thomas Wouters added the comment: New changeset f1c19031fd5f4cf6faad539e30796b42954527db by T. Wouters (Benjamin Peterson) in branch 'master': bpo-38068: Clean up gettimeofday configure logic. (GH-15775) https://github.com/python/cpython/commit/f1c19031fd5f4cf6faad539e30796b42954527db ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 06:42:02 2019 From: report at bugs.python.org (Dino Viehland) Date: Tue, 10 Sep 2019 10:42:02 +0000 Subject: [issue36971] Add subsections in C API "Common Object Structures" page In-Reply-To: <1558365249.02.0.267009483185.issue36971@roundup.psfhosted.org> Message-ID: <1568112122.31.0.753333055188.issue36971@roundup.psfhosted.org> Dino Viehland added the comment: New changeset 9669931e5e76cf4b6ae6d3d66e699b5fd6ffe931 by Dino Viehland (Jeroen Demeyer) in branch 'master': bpo-36971: add subsections in C API "Common Object Structures" page (#13446) https://github.com/python/cpython/commit/9669931e5e76cf4b6ae6d3d66e699b5fd6ffe931 ---------- nosy: +dino.viehland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 06:43:50 2019 From: report at bugs.python.org (Michael Foord) Date: Tue, 10 Sep 2019 10:43:50 +0000 Subject: [issue30587] Mock with spec object does not ensure method call signatures In-Reply-To: <1496837046.98.0.920527641247.issue30587@psf.upfronthosting.co.za> Message-ID: <1568112230.34.0.356622093944.issue30587@roundup.psfhosted.org> Michael Foord added the comment: This will affect spec and spec_set. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 06:55:10 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 10:55:10 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568112910.19.0.517894442736.issue36373@roundup.psfhosted.org> miss-islington added the comment: New changeset 537877d85d1c27d2c2f5189e39da64a7a0c413d3 by Miss Islington (bot) (Emmanuel Arias) in branch 'master': bpo-36373: Deprecate explicit loop parameter in all public asyncio APIs [locks] (GH-13920) https://github.com/python/cpython/commit/537877d85d1c27d2c2f5189e39da64a7a0c413d3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 06:55:45 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 10:55:45 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568112945.61.0.952971973024.issue36373@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15480 pull_request: https://github.com/python/cpython/pull/15835 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:01:23 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 11:01:23 +0000 Subject: [issue38069] Make _posixsubprocess PEP-384 compatible Message-ID: <1568113283.44.0.254536222867.issue38069@roundup.psfhosted.org> New submission from miss-islington : New changeset 5a7d2e11aaea2dd32878dc5c6b1aae8caf56cb44 by Miss Islington (bot) (Dino Viehland) in branch 'master': bpo-38069: Convert _posixsubprocess to PEP-384 (GH-15780) https://github.com/python/cpython/commit/5a7d2e11aaea2dd32878dc5c6b1aae8caf56cb44 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:01:39 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 10 Sep 2019 11:01:39 +0000 Subject: [issue38069] Make _posixsubprocess PEP-384 compatible In-Reply-To: <1568113283.44.0.254536222867.issue38069@roundup.psfhosted.org> Message-ID: <1568113299.07.0.988852791123.issue38069@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:08:58 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 11:08:58 +0000 Subject: [issue37052] Add examples for mocking async for and async context manager in unittest.mock docs In-Reply-To: <1558857063.08.0.951093658338.issue37052@roundup.psfhosted.org> Message-ID: <1568113738.66.0.731123850888.issue37052@roundup.psfhosted.org> miss-islington added the comment: New changeset ab74e52f768be5048faf2a11e78822533afebcb7 by Miss Islington (bot) in branch '3.8': bpo-37052: Add examples for mocking async iterators and context managers (GH-14660) https://github.com/python/cpython/commit/ab74e52f768be5048faf2a11e78822533afebcb7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:11:18 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 11:11:18 +0000 Subject: [issue32165] PyEval_InitThreads is called before Py_Initialize in LoadPython in Modules/_ctypes/callbacks.c In-Reply-To: <1511924168.1.0.213398074469.issue32165@psf.upfronthosting.co.za> Message-ID: <1568113878.49.0.339305952955.issue32165@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15481 pull_request: https://github.com/python/cpython/pull/15836 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:18:48 2019 From: report at bugs.python.org (Lisa Roach) Date: Tue, 10 Sep 2019 11:18:48 +0000 Subject: [issue37251] Mocking a MagicMock with a function spec results in an AsyncMock In-Reply-To: <1560348018.57.0.546920052201.issue37251@roundup.psfhosted.org> Message-ID: <1568114328.02.0.081573275707.issue37251@roundup.psfhosted.org> Lisa Roach added the comment: New changeset f1a297acb60b88917712450ebd3cfa707e6efd6b by Lisa Roach in branch 'master': bpo-37251: Removes __code__ check from _is_async_obj. (GH-15830) https://github.com/python/cpython/commit/f1a297acb60b88917712450ebd3cfa707e6efd6b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:18:50 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 11:18:50 +0000 Subject: [issue37251] Mocking a MagicMock with a function spec results in an AsyncMock In-Reply-To: <1560348018.57.0.546920052201.issue37251@roundup.psfhosted.org> Message-ID: <1568114330.19.0.492567226304.issue37251@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15482 pull_request: https://github.com/python/cpython/pull/15837 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:19:02 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 10 Sep 2019 11:19:02 +0000 Subject: [issue38074] Make zlib PEP-384 compatible In-Reply-To: <1568043531.47.0.907223270637.issue38074@roundup.psfhosted.org> Message-ID: <1568114342.94.0.127410383766.issue38074@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:19:16 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 10 Sep 2019 11:19:16 +0000 Subject: [issue35941] ssl.enum_certificates() regression In-Reply-To: <1549637009.73.0.764067041861.issue35941@roundup.psfhosted.org> Message-ID: <1568114356.2.0.553679946367.issue35941@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:19:58 2019 From: report at bugs.python.org (Lisa Roach) Date: Tue, 10 Sep 2019 11:19:58 +0000 Subject: [issue37251] Mocking a MagicMock with a function spec results in an AsyncMock In-Reply-To: <1560348018.57.0.546920052201.issue37251@roundup.psfhosted.org> Message-ID: <1568114398.42.0.303415881589.issue37251@roundup.psfhosted.org> Change by Lisa Roach : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:20:06 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 10 Sep 2019 11:20:06 +0000 Subject: [issue38071] Make termios PEP-384 compatible In-Reply-To: <1568111613.31.0.271452551159.issue38071@roundup.psfhosted.org> Message-ID: <1568114406.09.0.234826209154.issue38071@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:20:35 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 10 Sep 2019 11:20:35 +0000 Subject: [issue38072] Make grp module PEP-384 compatible In-Reply-To: <1568111439.21.0.082874199542.issue38072@roundup.psfhosted.org> Message-ID: <1568114435.14.0.260726451412.issue38072@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:21:12 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 11:21:12 +0000 Subject: [issue37499] test_gdb.test_pycfunction should use dedicated test functions In-Reply-To: <1562272164.16.0.880170642341.issue37499@roundup.psfhosted.org> Message-ID: <1568114472.61.0.361757819276.issue37499@roundup.psfhosted.org> miss-islington added the comment: New changeset f958377b67c36a98d4df67b94c01eb29e3104f61 by Miss Islington (bot) (Petr Viktorin) in branch 'master': bpo-37499: Test various C calling conventions (GH-15776) https://github.com/python/cpython/commit/f958377b67c36a98d4df67b94c01eb29e3104f61 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:21:23 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 10 Sep 2019 11:21:23 +0000 Subject: [issue38076] Make struct module PEP-384 compatible In-Reply-To: <1568046908.42.0.641730550956.issue38076@roundup.psfhosted.org> Message-ID: <1568114483.79.0.208966673155.issue38076@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:21:59 2019 From: report at bugs.python.org (Thomas Wouters) Date: Tue, 10 Sep 2019 11:21:59 +0000 Subject: [issue37619] update_one_slot() should not ignore wrapper descriptors for wrong type In-Reply-To: <1563440658.46.0.882912152625.issue37619@roundup.psfhosted.org> Message-ID: <1568114519.72.0.0526878353154.issue37619@roundup.psfhosted.org> Thomas Wouters added the comment: New changeset 57ea33560662e0f20a3b0334bb20065771edf4da by T. Wouters (Jeroen Demeyer) in branch 'master': bpo-37619: update_one_slot() should not ignore wrapper descriptors for wrong type (GH-14836) https://github.com/python/cpython/commit/57ea33560662e0f20a3b0334bb20065771edf4da ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:22:09 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 11:22:09 +0000 Subject: [issue37619] update_one_slot() should not ignore wrapper descriptors for wrong type In-Reply-To: <1563440658.46.0.882912152625.issue37619@roundup.psfhosted.org> Message-ID: <1568114529.21.0.756499669758.issue37619@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15483 pull_request: https://github.com/python/cpython/pull/15838 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:22:47 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 10 Sep 2019 11:22:47 +0000 Subject: [issue38075] Make random module PEP-384 compatible In-Reply-To: <1568044678.81.0.091085634764.issue38075@roundup.psfhosted.org> Message-ID: <1568114567.92.0.839175251416.issue38075@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:26:57 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 11:26:57 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568114817.56.0.0696304924917.issue36373@roundup.psfhosted.org> miss-islington added the comment: New changeset bb8fc8bd309419c159b632068dff73c3c76d478c by Miss Islington (bot) in branch '3.8': bpo-36373: Deprecate explicit loop parameter in all public asyncio APIs [locks] (GH-13920) https://github.com/python/cpython/commit/bb8fc8bd309419c159b632068dff73c3c76d478c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:34:36 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 10 Sep 2019 11:34:36 +0000 Subject: [issue38073] Make pwd module PEP-384 compatible In-Reply-To: <1568042155.96.0.920833676792.issue38073@roundup.psfhosted.org> Message-ID: <1568115276.23.0.532513319367.issue38073@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:35:19 2019 From: report at bugs.python.org (Christian Heimes) Date: Tue, 10 Sep 2019 11:35:19 +0000 Subject: [issue38075] Make random module PEP-384 compatible In-Reply-To: <1568044678.81.0.091085634764.issue38075@roundup.psfhosted.org> Message-ID: <1568115319.54.0.812865211684.issue38075@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: +christian.heimes resolution: fixed -> stage: resolved -> patch review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:36:10 2019 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 10 Sep 2019 11:36:10 +0000 Subject: [issue22273] abort when passing certain structs by value using ctypes In-Reply-To: <1408988002.99.0.886549500758.issue22273@psf.upfronthosting.co.za> Message-ID: <1568115370.49.0.648260523311.issue22273@roundup.psfhosted.org> Change by Vinay Sajip : ---------- pull_requests: +15484 pull_request: https://github.com/python/cpython/pull/15839 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:36:34 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 10 Sep 2019 11:36:34 +0000 Subject: [issue38086] Synchronize importlib.metadata with importlib_metadata 0.21 Message-ID: <1568115394.78.0.274032945021.issue38086@roundup.psfhosted.org> New submission from Jason R. Coombs : Importlib_metadata 0.21 has been released (technically releasing at this moment). This issue serves as an anchor to incorporate those changes (https://gitlab.com/python-devs/importlib_metadata/blob/4b86813ecf7e40e6d553976e3f5604f90d475fb4/importlib_metadata/docs/changelog.rst). ---------- assignee: jaraco messages: 351625 nosy: barry, jaraco, lukasz.langa priority: release blocker severity: normal stage: needs patch status: open title: Synchronize importlib.metadata with importlib_metadata 0.21 type: enhancement versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:38:40 2019 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 10 Sep 2019 11:38:40 +0000 Subject: [issue16575] ctypes: unions as arguments In-Reply-To: <1354163044.21.0.431588472559.issue16575@psf.upfronthosting.co.za> Message-ID: <1568115520.16.0.570082737664.issue16575@roundup.psfhosted.org> Change by Vinay Sajip : ---------- keywords: +patch pull_requests: +15485 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15839 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:38:40 2019 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 10 Sep 2019 11:38:40 +0000 Subject: [issue16576] ctypes: structure with bitfields as argument In-Reply-To: <1354164812.19.0.708202681719.issue16576@psf.upfronthosting.co.za> Message-ID: <1568115520.33.0.689456729522.issue16576@roundup.psfhosted.org> Change by Vinay Sajip : ---------- pull_requests: +15486 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15839 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:41:23 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 10 Sep 2019 11:41:23 +0000 Subject: [issue38086] Synchronize importlib.metadata with importlib_metadata 0.21 In-Reply-To: <1568115394.78.0.274032945021.issue38086@roundup.psfhosted.org> Message-ID: <1568115683.22.0.409619050915.issue38086@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- keywords: +patch pull_requests: +15487 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15840 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:46:15 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 11:46:15 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568115975.28.0.622007411137.issue36373@roundup.psfhosted.org> miss-islington added the comment: New changeset 9008be303a89bfab8c3314c6a42330b5523adc8b by Miss Islington (bot) (Emmanuel Arias) in branch 'master': bpo-36373: Deprecate explicit loop parameter in all public asyncio APIs [queue] (GH-13950) https://github.com/python/cpython/commit/9008be303a89bfab8c3314c6a42330b5523adc8b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 07:46:23 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 11:46:23 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568115983.54.0.0483910131295.issue36373@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15488 pull_request: https://github.com/python/cpython/pull/15841 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 08:31:49 2019 From: report at bugs.python.org (Dino Viehland) Date: Tue, 10 Sep 2019 12:31:49 +0000 Subject: [issue38075] Make random module PEP-384 compatible In-Reply-To: <1568044678.81.0.091085634764.issue38075@roundup.psfhosted.org> Message-ID: <1568118709.49.0.549701698419.issue38075@roundup.psfhosted.org> Dino Viehland added the comment: There's several different reasons why these changes are beneficial. It'll help make the modules more compatible with PEP 554 in the future, enable more code re-use across Python VMs, reduce code maintenance going forward, and may also help with performance oriented changes in the future. On the PEP 554 front it is necessary to remove the static state that is used in the modules as we can't have sharing across the interpreters. The modules that are loaded into the different interpreter will need to not share any state on so all of their state needs to be per-instance state (there's also just an argument that static global state is just kind of ugly). On the re-use across VMs front it'll mean that alternative VMs will only need to stick to the stable API and well be able to use these modules as-is without having to re-implement them. It may not even be strictly necessary that these modules stick to 100% of the stable API if the places where they go outside dramatically help the implementation (for example PR 15805 uses _PyBytesWriter still). Sticking to the stable API will also naturally make it somewhat easier to make changes that impact the non-stable API. By it's very nature the stable API is going to change less (theoretically never) and therefore these modules will be less impacted by updates which are attempting to improve performance on the core. One example of that is the recent vector call support where many of the types needed to be updated (although trivially). So the final, and probably most speculative area, is the possibility of unlocking performance in the core runtime per Victor's stable API work: https://pythoncapi.readthedocs.io/. By having less dependencies on the core implementation details it should be easier to evolve those going forward an making it easier to unlock future performance gains in the core. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 08:32:52 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 10 Sep 2019 12:32:52 +0000 Subject: [issue37052] Add examples for mocking async for and async context manager in unittest.mock docs In-Reply-To: <1558857063.08.0.951093658338.issue37052@roundup.psfhosted.org> Message-ID: <1568118772.06.0.0176318246248.issue37052@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I will open a separate PR as discussed around mocking a class with an async method which is patched with AsyncMock. Meanwhile a method that returns a coroutine is patched with a MagicMock and needs to be explicitly mocked with an AsyncMock as new in the patch call. The original example in Zulip is as below showing the difference. from unittest.mock import AsyncMock, patch import asyncio async def foo(): pass async def post(url): pass class Response: async def json(self): pass def sync_json(self): return foo() # Returns a coroutine which should be awaited to get the result async def main(): # post function is an async function and hence AsyncMock is returned. with patch(f"{__name__}.post", return_value={'a': 1}) as m: print(await post("http://example.com")) # The json method call is a coroutine whose return_value is set with the dictionary # json is an async function and hence during patching here m is an AsyncMock response = Response() with patch.object(response, 'json', return_value={'a': 1}): print(await response.json()) # sync_json returns a coroutine and not an async def itself. So it's mocked as MagicMock # by patch.object and we need to pass an explicit callable as AsyncMock to make sure it's # awaitable response = Response() with patch.object(response, 'sync_json', AsyncMock(return_value={'a': 1})): print(await response.sync_json()) asyncio.run(main()) ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 08:44:01 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 10 Sep 2019 12:44:01 +0000 Subject: [issue25461] Unclear language (the word ineffective) in the documentation for os.walk In-Reply-To: <1445533538.52.0.421272081658.issue25461@psf.upfronthosting.co.za> Message-ID: <1568119441.27.0.0183933745567.issue25461@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 734f1202a50641eb2c4bfbcd5b75247c1dc99a8f by Benjamin Peterson (Bernt R?skar Brenna) in branch 'master': closes bpo-25461: Update os.walk() docstring to match the online docs. (GH-11836) https://github.com/python/cpython/commit/734f1202a50641eb2c4bfbcd5b75247c1dc99a8f ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 08:44:09 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 12:44:09 +0000 Subject: [issue25461] Unclear language (the word ineffective) in the documentation for os.walk In-Reply-To: <1445533538.52.0.421272081658.issue25461@psf.upfronthosting.co.za> Message-ID: <1568119449.47.0.22585652857.issue25461@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15489 pull_request: https://github.com/python/cpython/pull/15843 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 08:44:15 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 12:44:15 +0000 Subject: [issue25461] Unclear language (the word ineffective) in the documentation for os.walk In-Reply-To: <1445533538.52.0.421272081658.issue25461@psf.upfronthosting.co.za> Message-ID: <1568119455.07.0.172466189491.issue25461@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15490 pull_request: https://github.com/python/cpython/pull/15844 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 08:50:17 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 12:50:17 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568119817.12.0.958948013886.issue36373@roundup.psfhosted.org> miss-islington added the comment: New changeset 55daf1a56163e0673654712bb92ce47a9b6f7be3 by Miss Islington (bot) in branch '3.8': bpo-36373: Deprecate explicit loop parameter in all public asyncio APIs [queue] (GH-13950) https://github.com/python/cpython/commit/55daf1a56163e0673654712bb92ce47a9b6f7be3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 08:51:12 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 10 Sep 2019 12:51:12 +0000 Subject: [issue21018] [patch] added missing documentation about escaping characters for configparser In-Reply-To: <1395464420.76.0.68706986346.issue21018@psf.upfronthosting.co.za> Message-ID: <1568119872.59.0.139883985717.issue21018@roundup.psfhosted.org> Julien Palard added the comment: New changeset 9a94093189417adddd6b59d6c80cc5544630c8aa by Julien Palard (Arun Persaud) in branch 'master': bpo-21018: added missing documentation about escaping characters for configparser (GH-6137) https://github.com/python/cpython/commit/9a94093189417adddd6b59d6c80cc5544630c8aa ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 08:51:20 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 12:51:20 +0000 Subject: [issue21018] [patch] added missing documentation about escaping characters for configparser In-Reply-To: <1395464420.76.0.68706986346.issue21018@psf.upfronthosting.co.za> Message-ID: <1568119880.81.0.88433435048.issue21018@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15491 pull_request: https://github.com/python/cpython/pull/15845 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 08:52:01 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 12:52:01 +0000 Subject: [issue21018] [patch] added missing documentation about escaping characters for configparser In-Reply-To: <1395464420.76.0.68706986346.issue21018@psf.upfronthosting.co.za> Message-ID: <1568119921.77.0.164800383806.issue21018@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15492 pull_request: https://github.com/python/cpython/pull/15846 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 08:52:34 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 10 Sep 2019 12:52:34 +0000 Subject: [issue21018] [patch] added missing documentation about escaping characters for configparser In-Reply-To: <1395464420.76.0.68706986346.issue21018@psf.upfronthosting.co.za> Message-ID: <1568119954.97.0.707586873618.issue21018@roundup.psfhosted.org> Julien Palard added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 08:55:14 2019 From: report at bugs.python.org (Thomas Wouters) Date: Tue, 10 Sep 2019 12:55:14 +0000 Subject: [issue37619] update_one_slot() should not ignore wrapper descriptors for wrong type In-Reply-To: <1563440658.46.0.882912152625.issue37619@roundup.psfhosted.org> Message-ID: <1568120114.82.0.976468850735.issue37619@roundup.psfhosted.org> Thomas Wouters added the comment: New changeset eb1bc48c74f4f8af88b5276729f9652201e46324 by T. Wouters (Miss Islington (bot)) in branch '3.8': bpo-37619: update_one_slot() should not ignore wrapper descriptors for wrong type (GH-15838) https://github.com/python/cpython/commit/eb1bc48c74f4f8af88b5276729f9652201e46324 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 08:56:17 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 12:56:17 +0000 Subject: [issue38066] Hide internal asyncio.Stream methods In-Reply-To: <1568029115.61.0.532730850424.issue38066@roundup.psfhosted.org> Message-ID: <1568120177.27.0.503928529128.issue38066@roundup.psfhosted.org> miss-islington added the comment: New changeset 12c122ae958a55c9874ed4c7d7805ceb084411d7 by Miss Islington (bot) (Andrew Svetlov) in branch 'master': bpo-38066: Hide internal Stream methods (GH-15762) https://github.com/python/cpython/commit/12c122ae958a55c9874ed4c7d7805ceb084411d7 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 08:56:25 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 12:56:25 +0000 Subject: [issue38066] Hide internal asyncio.Stream methods In-Reply-To: <1568029115.61.0.532730850424.issue38066@roundup.psfhosted.org> Message-ID: <1568120185.78.0.752388318295.issue38066@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15493 pull_request: https://github.com/python/cpython/pull/15847 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 08:59:54 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 12:59:54 +0000 Subject: [issue38073] Make pwd module PEP-384 compatible In-Reply-To: <1568042155.96.0.920833676792.issue38073@roundup.psfhosted.org> Message-ID: <1568120394.36.0.046665209844.issue38073@roundup.psfhosted.org> miss-islington added the comment: New changeset b7f8e52433b656a6a524229fd7a65e4682a43729 by Miss Islington (bot) (Dino Viehland) in branch 'master': bpo-38073: Make pwd module PEP-384 compatible (GH-15790) https://github.com/python/cpython/commit/b7f8e52433b656a6a524229fd7a65e4682a43729 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:00:51 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 13:00:51 +0000 Subject: [issue14143] test_ntpath failure on Windows In-Reply-To: <1330369660.88.0.127957807148.issue14143@psf.upfronthosting.co.za> Message-ID: <1568120451.44.0.55930003584.issue14143@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> out of date stage: needs patch -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:01:34 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 13:01:34 +0000 Subject: [issue17667] Windows: build with "build_pgo.bat -2" fails to optimize python.dll In-Reply-To: <1365444634.63.0.621793850181.issue17667@psf.upfronthosting.co.za> Message-ID: <1568120494.27.0.723708489321.issue17667@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:02:30 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 13:02:30 +0000 Subject: [issue38087] test_ntpath must account for casing changes Message-ID: <1568120550.64.0.710799778395.issue38087@roundup.psfhosted.org> New submission from Steve Dower : Tests in test_ntpath that go via the actual file system (e.g. via realpath()) need to allow for the case of the path potentially changing. ---------- assignee: steve.dower components: Windows messages: 351636 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal pull_requests: 15494 severity: normal status: open title: test_ntpath must account for casing changes versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:03:16 2019 From: report at bugs.python.org (Thomas Wouters) Date: Tue, 10 Sep 2019 13:03:16 +0000 Subject: [issue37619] update_one_slot() should not ignore wrapper descriptors for wrong type In-Reply-To: <1563440658.46.0.882912152625.issue37619@roundup.psfhosted.org> Message-ID: <1568120596.77.0.825071569837.issue37619@roundup.psfhosted.org> Thomas Wouters added the comment: I don't think this should be backported to 3.7 at this point; if you disagree feel free to reopen the bug. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:03:38 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 13:03:38 +0000 Subject: [issue38088] distutils cannot locate vcruntime140.dll with only VS 2019 installed Message-ID: <1568120618.81.0.389197586577.issue38088@roundup.psfhosted.org> New submission from Steve Dower : Because we are only looking for the VC141 redistributable, if we only have VC142 available then we won't find it. We should expand the glob() call to allow VC14?\vcruntime140.dll. ---------- assignee: steve.dower components: Distutils, Windows messages: 351638 nosy: dstufft, eric.araujo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal pull_requests: 15495 severity: normal status: open title: distutils cannot locate vcruntime140.dll with only VS 2019 installed versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:04:47 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 13:04:47 +0000 Subject: [issue38089] Make macOS tests optional on Azure Pipelines Message-ID: <1568120687.8.0.406819210697.issue38089@roundup.psfhosted.org> New submission from Steve Dower : Avoid blocking PRs because of random macOS failures (such as in issue37245). Also reduce the timeout. ---------- assignee: steve.dower components: Build messages: 351639 nosy: steve.dower priority: normal pull_requests: 15496 severity: normal status: open title: Make macOS tests optional on Azure Pipelines type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:06:05 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 10 Sep 2019 13:06:05 +0000 Subject: [issue38090] test_ctypes is leaking references Message-ID: <1568120765.1.0.320006339983.issue38090@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : test_ctypes leaked [22, 22, 22] references, sum=66 3 tests failed again: test_ctypes test_import test_importlib https://buildbot.python.org/all/#/builders/1/builds/710 ---------- components: Tests messages: 351640 nosy: pablogsal priority: normal severity: normal status: open title: test_ctypes is leaking references versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:06:28 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 10 Sep 2019 13:06:28 +0000 Subject: [issue38090] test_ctypes is leaking references In-Reply-To: <1568120765.1.0.320006339983.issue38090@roundup.psfhosted.org> Message-ID: <1568120788.4.0.0479172457002.issue38090@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Bisecting points to commit 65366bc8bdc4716ebc361e622590b45a6e5aef07 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:06:52 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 10 Sep 2019 13:06:52 +0000 Subject: [issue20490] Show clear error message on circular import In-Reply-To: <1391367888.31.0.501253544651.issue20490@psf.upfronthosting.co.za> Message-ID: <1568120812.68.0.737528080934.issue20490@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: This PR introduced a reference leak tracked in: https://bugs.python.org/issue38090 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:09:54 2019 From: report at bugs.python.org (Alexander Ulyanov) Date: Tue, 10 Sep 2019 13:09:54 +0000 Subject: [issue38054] enhance pdb.set_trace() to run when the specified condition is true In-Reply-To: <1567939455.37.0.149072874331.issue38054@roundup.psfhosted.org> Message-ID: <1568120994.74.0.965690276165.issue38054@roundup.psfhosted.org> Alexander Ulyanov added the comment: Perhaps it's a matter of preference. I found it convenient, since passing in a boolean expression allows me to get rid of extra if-blocks thus reducing lines of code and increasing debugging speed. I wanted to share my idea with the community - but please feel free to close the issue if you find it trivial. ############## SAMPLE USE CASE ############## import pdb def square(i): pdb.set_trace(trigger=not isinstance(i, (float, int))) print(i**2) # debug: hunting for TypeError a = 2 square(a) # will not execute set_trace() b = None square(b) # will execute set_trace() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:10:10 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 10 Sep 2019 13:10:10 +0000 Subject: [issue38090] test_ctypes is leaking references In-Reply-To: <1568120765.1.0.320006339983.issue38090@roundup.psfhosted.org> Message-ID: <1568121010.22.0.587791711082.issue38090@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +15497 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15848 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:13:29 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 10 Sep 2019 13:13:29 +0000 Subject: [issue38090] test_ctypes is leaking references In-Reply-To: <1568120765.1.0.320006339983.issue38090@roundup.psfhosted.org> Message-ID: <1568121209.16.0.0959889175279.issue38090@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +Anthony Sottile, steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:16:03 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 13:16:03 +0000 Subject: [issue37251] Mocking a MagicMock with a function spec results in an AsyncMock In-Reply-To: <1560348018.57.0.546920052201.issue37251@roundup.psfhosted.org> Message-ID: <1568121363.13.0.71418881129.issue37251@roundup.psfhosted.org> miss-islington added the comment: New changeset c3008dd480d645678409273eecbfd24bbc9669d7 by Miss Islington (bot) in branch '3.8': bpo-37251: Removes __code__ check from _is_async_obj. (GH-15830) https://github.com/python/cpython/commit/c3008dd480d645678409273eecbfd24bbc9669d7 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:16:49 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 10 Sep 2019 13:16:49 +0000 Subject: [issue38070] visit_decref(): add an assertion to check that the object is not freed In-Reply-To: <1568037936.88.0.10373402622.issue38070@roundup.psfhosted.org> Message-ID: <1568121409.12.0.170705938248.issue38070@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Should this be closed now? ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:18:30 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 13:18:30 +0000 Subject: [issue38088] distutils cannot locate vcruntime140.dll with only VS 2019 installed In-Reply-To: <1568120618.81.0.389197586577.issue38088@roundup.psfhosted.org> Message-ID: <1568121510.12.0.955704926694.issue38088@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +15498 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15849 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:22:00 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 13:22:00 +0000 Subject: [issue25461] Unclear language (the word ineffective) in the documentation for os.walk In-Reply-To: <1445533538.52.0.421272081658.issue25461@psf.upfronthosting.co.za> Message-ID: <1568121720.91.0.189268246695.issue25461@roundup.psfhosted.org> miss-islington added the comment: New changeset c43f26eca35f22707a52fb8f3fbfc9340639b58d by Miss Islington (bot) in branch '3.8': closes bpo-25461: Update os.walk() docstring to match the online docs. (GH-11836) https://github.com/python/cpython/commit/c43f26eca35f22707a52fb8f3fbfc9340639b58d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:22:29 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 13:22:29 +0000 Subject: [issue38087] test_ntpath must account for casing changes In-Reply-To: <1568120550.64.0.710799778395.issue38087@roundup.psfhosted.org> Message-ID: <1568121749.18.0.884166856297.issue38087@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +15499 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15850 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:26:40 2019 From: report at bugs.python.org (Ronan Lamy) Date: Tue, 10 Sep 2019 13:26:40 +0000 Subject: [issue38091] Import deadlock detection causes deadlock Message-ID: <1568122000.74.0.240735069302.issue38091@roundup.psfhosted.org> New submission from Ronan Lamy : There seems to be a race condition in importlib._bootstrap._ModuleLock that can cause a deadlock. The sequence of operations is as follows: * Thread 1 calls lock.acquire() * Thread 1 sets itself as lock.owner and begins importing the module * Thread 2 calls lock.acquire() and waits for lock.lock * Thread 2 gets lock.lock * Thread 1 calls lock.acquire() again, due to a nested import * Thread 1 sets itself as blocking on lock: _blocking_on[tid1] = lock * Thread 2 enters lock.has_deadlock() * Thread 2 busy-waits forever in has_deadlock() because lock.owner == tid1 and _blocking_on[tid1] == lock * Thread 1 waits forever for lock.lock since thread 2 owns it The issue was found in pypy3 but it also affects all the recent CPython versions I tried. I can reliably reproduce the issue by adding an artificial delay to _ModuleLock.has_deadlock(), e.g. with this patch: diff --git a/Lib/test/test_import/__init__.py b/Lib/test/test_import/__init__.py index f167c84..7f7188e 100644 --- a/Lib/test/test_import/__init__.py +++ b/Lib/test/test_import/__init__.py @@ -435,10 +435,15 @@ class ImportTests(unittest.TestCase): os.does_not_exist def test_concurrency(self): + def delay_has_deadlock(frame, event, arg): + if event == 'call' and frame.f_code.co_name == 'has_deadlock': + time.sleep(0.2) + sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'data')) try: exc = None def run(): + sys.settrace(delay_has_deadlock) event.wait() try: import package ---------- components: Library (Lib) messages: 351647 nosy: Ronan.Lamy priority: normal severity: normal status: open title: Import deadlock detection causes deadlock type: behavior versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:27:12 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 13:27:12 +0000 Subject: [issue38089] Make macOS tests optional on Azure Pipelines In-Reply-To: <1568120687.8.0.406819210697.issue38089@roundup.psfhosted.org> Message-ID: <1568122032.31.0.875423452179.issue38089@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +15500 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15851 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:30:21 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 10 Sep 2019 13:30:21 +0000 Subject: [issue34720] Fix test_importlib.test_bad_traverse for AIX In-Reply-To: <1537272185.7.0.956365154283.issue34720@psf.upfronthosting.co.za> Message-ID: <1568122221.21.0.081317817545.issue34720@roundup.psfhosted.org> Ned Deily added the comment: New changeset 61f34f9f63aab7503420603627ad5bd8902d904b by Ned Deily (Michael Felt) in branch '3.7': bpo-34720: Fix test_importlib.test_bad_traverse for AIX (GH-14238) https://github.com/python/cpython/commit/61f34f9f63aab7503420603627ad5bd8902d904b ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:31:05 2019 From: report at bugs.python.org (Dino Viehland) Date: Tue, 10 Sep 2019 13:31:05 +0000 Subject: [issue36781] Optimize sum() for bools In-Reply-To: <1556876973.98.0.990157093134.issue36781@roundup.psfhosted.org> Message-ID: <1568122265.38.0.540098607364.issue36781@roundup.psfhosted.org> Dino Viehland added the comment: New changeset 88bdb9280b251d753f1b1c8d9183de0fff003622 by Dino Viehland (Serhiy Storchaka) in branch 'master': bpo-36781: Optimize sum() for bools. (#13074) https://github.com/python/cpython/commit/88bdb9280b251d753f1b1c8d9183de0fff003622 ---------- nosy: +dino.viehland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:32:39 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 10 Sep 2019 13:32:39 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568122359.73.0.902756200831.issue36373@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: async_case passes loop parameter to the queue used to collect tests and this causes below DeprecationWarning with last change over deprecation in queues and locks API. ./python.exe -m unittest Lib.unittest.test.test_async_case /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/async_case.py:116: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10. self._asyncioCallsQueue = asyncio.Queue(loop=loop) /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/asyncio/queues.py:48: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10. self._finished = locks.Event(loop=self._loop) ....... ---------------------------------------------------------------------- Ran 7 tests in 0.083s OK ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:32:39 2019 From: report at bugs.python.org (Pierre Glaser) Date: Tue, 10 Sep 2019 13:32:39 +0000 Subject: [issue38092] environment variables not passed correctly using new virtualenv launching in windows and python3.7+ Message-ID: <1568122359.92.0.800539114246.issue38092@roundup.psfhosted.org> New submission from Pierre Glaser : If I am not mistaken, when creating a new process on Python3.7 and later on Windows, if using a virtualenv, Python now uses a launcher. The launcher is being notified that it must create a virtual-environment Python (and not a system Python) program using the __PYVENV_LAUNCHER__ environment variable, passed as part of the environment of launcher process created using in _winapi.CreateProcess (see https://github.com/python/cpython/blob/9008be303a89bfab8c3314c6a42330b5523adc8b/Lib/multiprocessing/popen_spawn_win32.py#L73-L75) However, if I am not mistaken `env` is not passed at the right position (https://github.com/python/cpython/blob/9008be303a89bfab8c3314c6a42330b5523adc8b/Modules/_winapi.c#L1062-L1068). These lines were part of a bugfix patch (see https://bugs.python.org/issue35797), solving an issue for multiprocessing-based packages. We ended trying to backport to loky (https://github.com/tomMoral/loky, a multiprocessing-based package) but the bug was not fixed. Passing 'env' correctly fixed the bug. Two things: - It is hard to provide a reproducer for this issue as it requires patching the CPython source code. - I don't understand why env being not passed correctly does not manifest itself in the test-suite. What is even more troubling is that even with this bug, the virtualenv launcher seems to get that a virtualenv is used when creating processes in multiprocessing (at least, sys.path includes the path/to/venv/lib/python3.x/site-packages). However, I am not familiar with the virtualenv launcher for python3.7+ and windows. ---------- components: Windows messages: 351650 nosy: paul.moore, pierreglaser, pitrou, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: environment variables not passed correctly using new virtualenv launching in windows and python3.7+ type: crash versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:32:46 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 10 Sep 2019 13:32:46 +0000 Subject: [issue21018] [patch] added missing documentation about escaping characters for configparser In-Reply-To: <1395464420.76.0.68706986346.issue21018@psf.upfronthosting.co.za> Message-ID: <1568122366.2.0.906414696952.issue21018@roundup.psfhosted.org> Julien Palard added the comment: New changeset 122bbf7f8ac2cef4368e3601af593a027dc62ccf by Julien Palard (Miss Islington (bot)) in branch '3.7': bpo-21018: added missing documentation about escaping characters for configparser (GH-6137) (GH-15845) https://github.com/python/cpython/commit/122bbf7f8ac2cef4368e3601af593a027dc62ccf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:32:59 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 10 Sep 2019 13:32:59 +0000 Subject: [issue21018] [patch] added missing documentation about escaping characters for configparser In-Reply-To: <1395464420.76.0.68706986346.issue21018@psf.upfronthosting.co.za> Message-ID: <1568122379.22.0.851305051491.issue21018@roundup.psfhosted.org> Julien Palard added the comment: New changeset 5cf8155bbd2c65572295b26e96c221763b3322f0 by Julien Palard (Miss Islington (bot)) in branch '3.8': bpo-21018: added missing documentation about escaping characters for configparser (GH-6137) (GH-15846) https://github.com/python/cpython/commit/5cf8155bbd2c65572295b26e96c221763b3322f0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:32:58 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 13:32:58 +0000 Subject: [issue38090] test_ctypes is leaking references In-Reply-To: <1568120765.1.0.320006339983.issue38090@roundup.psfhosted.org> Message-ID: <1568122378.32.0.123060813274.issue38090@roundup.psfhosted.org> Steve Dower added the comment: New changeset a511c7a4961a684db1f8d0ed438822d87d7d3dcf by Steve Dower (Pablo Galindo) in branch 'master': bpo-38090: Fix reference leak in ceval.c (GH-15848) https://github.com/python/cpython/commit/a511c7a4961a684db1f8d0ed438822d87d7d3dcf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:33:09 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 13:33:09 +0000 Subject: [issue38090] test_ctypes is leaking references In-Reply-To: <1568120765.1.0.320006339983.issue38090@roundup.psfhosted.org> Message-ID: <1568122389.95.0.048412971324.issue38090@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15501 pull_request: https://github.com/python/cpython/pull/15852 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:33:26 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 13:33:26 +0000 Subject: [issue38090] test_ctypes is leaking references In-Reply-To: <1568120765.1.0.320006339983.issue38090@roundup.psfhosted.org> Message-ID: <1568122406.28.0.761767751418.issue38090@roundup.psfhosted.org> Steve Dower added the comment: Thanks Pablo! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:34:02 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 13:34:02 +0000 Subject: [issue38090] test_ctypes is leaking references In-Reply-To: <1568120765.1.0.320006339983.issue38090@roundup.psfhosted.org> Message-ID: <1568122442.01.0.257127028713.issue38090@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:34:06 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 13:34:06 +0000 Subject: [issue25461] Unclear language (the word ineffective) in the documentation for os.walk In-Reply-To: <1445533538.52.0.421272081658.issue25461@psf.upfronthosting.co.za> Message-ID: <1568122446.17.0.785802720882.issue25461@roundup.psfhosted.org> miss-islington added the comment: New changeset d94b762ce824e97c441f9231f0e69ef8f59beeab by Miss Islington (bot) in branch '3.7': closes bpo-25461: Update os.walk() docstring to match the online docs. (GH-11836) https://github.com/python/cpython/commit/d94b762ce824e97c441f9231f0e69ef8f59beeab ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:36:27 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 10 Sep 2019 13:36:27 +0000 Subject: [issue28494] is_zipfile false positives In-Reply-To: <1476997729.0.0.643464084789.issue28494@psf.upfronthosting.co.za> Message-ID: <1568122587.05.0.962549997694.issue28494@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +15502 pull_request: https://github.com/python/cpython/pull/15853 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:36:38 2019 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 10 Sep 2019 13:36:38 +0000 Subject: [issue37499] test_gdb.test_pycfunction should use dedicated test functions In-Reply-To: <1562272164.16.0.880170642341.issue37499@roundup.psfhosted.org> Message-ID: <1568122598.54.0.607086669962.issue37499@roundup.psfhosted.org> Paul Ganssle added the comment: This is done, thanks Petr and Jeroen! I don't see a need to backport this unless we also want to backport GH-14311 or something else that depends on it. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:43:40 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 10 Sep 2019 13:43:40 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568123020.35.0.54571012542.issue36373@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Few more tests and call sites ./python.exe -Wall -m test test_asyncio Run tests sequentially 0:00:00 load avg: 2.41 [1/1] test_asyncio /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/asyncio/locks.py:335: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10. lock = Lock(loop=self._loop) test_asyncio passed in 1 min 38 sec == Tests result: SUCCESS == 1 test OK. Total duration: 1 min 38 sec Tests result: SUCCESS call sites >>> list(asyncio.tasks.as_completed([asyncio.ensure_future(asyncio.sleep(1))])) /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/asyncio/tasks.py:579: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10. done = Queue(loop=loop) /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/asyncio/queues.py:48: DeprecationWarning: The loop argument is deprecated since Python 3.8, and scheduled for removal in Python 3.10. self._finished = locks.Event(loop=self._loop) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:44:38 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 13:44:38 +0000 Subject: [issue38066] Hide internal asyncio.Stream methods In-Reply-To: <1568029115.61.0.532730850424.issue38066@roundup.psfhosted.org> Message-ID: <1568123078.28.0.102861880362.issue38066@roundup.psfhosted.org> miss-islington added the comment: New changeset f12ff05bc07ac087743a4615c4af5f66b73f8d2c by Miss Islington (bot) in branch '3.8': bpo-38066: Hide internal Stream methods (GH-15762) https://github.com/python/cpython/commit/f12ff05bc07ac087743a4615c4af5f66b73f8d2c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:45:49 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 Sep 2019 13:45:49 +0000 Subject: [issue36781] Optimize sum() for bools In-Reply-To: <1556876973.98.0.990157093134.issue36781@roundup.psfhosted.org> Message-ID: <1568123149.77.0.154833123217.issue36781@roundup.psfhosted.org> Serhiy Storchaka added the comment: Oh, I was going to withdraw this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:48:50 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 10 Sep 2019 13:48:50 +0000 Subject: [issue34711] Lib/http/server.py: Return HTTPStatus.NOT_FOUND if path.endswith(/) and not a directory In-Reply-To: <1537179798.31.0.956365154283.issue34711@psf.upfronthosting.co.za> Message-ID: <1568123330.07.0.953322186885.issue34711@roundup.psfhosted.org> Change by Ned Deily : ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:52:26 2019 From: report at bugs.python.org (Zachary Ware) Date: Tue, 10 Sep 2019 13:52:26 +0000 Subject: [issue38088] distutils cannot locate vcruntime140.dll with only VS 2019 installed In-Reply-To: <1568120618.81.0.389197586577.issue38088@roundup.psfhosted.org> Message-ID: <1568123546.71.0.14726959051.issue38088@roundup.psfhosted.org> Zachary Ware added the comment: New changeset cd8221152dd235ec5d06e3d9d0d8787645bbac8e by Zachary Ware (Steve Dower) in branch 'master': bpo-38088: Fixes distutils not finding vcruntime140.dll with only v142 toolset installed (GH-15849) https://github.com/python/cpython/commit/cd8221152dd235ec5d06e3d9d0d8787645bbac8e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:52:35 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 13:52:35 +0000 Subject: [issue38088] distutils cannot locate vcruntime140.dll with only VS 2019 installed In-Reply-To: <1568120618.81.0.389197586577.issue38088@roundup.psfhosted.org> Message-ID: <1568123555.85.0.421190830789.issue38088@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15503 pull_request: https://github.com/python/cpython/pull/15856 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:52:51 2019 From: report at bugs.python.org (Zachary Ware) Date: Tue, 10 Sep 2019 13:52:51 +0000 Subject: [issue38087] test_ntpath must account for casing changes In-Reply-To: <1568120550.64.0.710799778395.issue38087@roundup.psfhosted.org> Message-ID: <1568123571.35.0.86771857185.issue38087@roundup.psfhosted.org> Zachary Ware added the comment: New changeset 97d7906e30eeee1261b20a45a22242a8accb1cfb by Zachary Ware (Steve Dower) in branch 'master': bpo-38087: Fix case sensitivity in test_pathlib and test_ntpath (GH-15850) https://github.com/python/cpython/commit/97d7906e30eeee1261b20a45a22242a8accb1cfb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:53:34 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 10 Sep 2019 13:53:34 +0000 Subject: [issue38086] Synchronize importlib.metadata with importlib_metadata 0.21 In-Reply-To: <1568115394.78.0.274032945021.issue38086@roundup.psfhosted.org> Message-ID: <1568123614.45.0.703202346694.issue38086@roundup.psfhosted.org> Brett Cannon added the comment: New changeset 17499d82702432955d8e442a1871ff276ca64bc5 by Brett Cannon (Jason R. Coombs) in branch 'master': bpo-38086: Sync importlib.metadata with importlib_metadata 0.21. (GH-15840) https://github.com/python/cpython/commit/17499d82702432955d8e442a1871ff276ca64bc5 ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:57:25 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 13:57:25 +0000 Subject: [issue38088] distutils cannot locate vcruntime140.dll with only VS 2019 installed In-Reply-To: <1568120618.81.0.389197586577.issue38088@roundup.psfhosted.org> Message-ID: <1568123845.26.0.368969483683.issue38088@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +15504 pull_request: https://github.com/python/cpython/pull/15857 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:57:40 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 10 Sep 2019 13:57:40 +0000 Subject: [issue35704] On AIX, test_unpack_archive_xztar fails with default MAXDATA settings In-Reply-To: <1547111571.31.0.315459583294.issue35704@roundup.psfhosted.org> Message-ID: <1568123860.91.0.6456000116.issue35704@roundup.psfhosted.org> Change by Ned Deily : ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:58:20 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 13:58:20 +0000 Subject: [issue38087] test_ntpath must account for casing changes In-Reply-To: <1568120550.64.0.710799778395.issue38087@roundup.psfhosted.org> Message-ID: <1568123900.67.0.481421680728.issue38087@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +15505 pull_request: https://github.com/python/cpython/pull/15858 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 09:59:02 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 13:59:02 +0000 Subject: [issue38087] test_ntpath must account for casing changes In-Reply-To: <1568120550.64.0.710799778395.issue38087@roundup.psfhosted.org> Message-ID: <1568123942.11.0.0713714315136.issue38087@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +15506 pull_request: https://github.com/python/cpython/pull/15859 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:01:16 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 14:01:16 +0000 Subject: [issue37913] Document that __length_hint__ may return NotImplemented In-Reply-To: <1566469027.85.0.30597516641.issue37913@roundup.psfhosted.org> Message-ID: <1568124076.51.0.170249101489.issue37913@roundup.psfhosted.org> Steve Dower added the comment: New changeset 009ef2955d91e04f62a7159a1c7ddaddbfedc3b6 by Steve Dower (Jeroen Demeyer) in branch 'master': bpo-37913: document that __length_hint__ can return NotImplemented (GH-15383) https://github.com/python/cpython/commit/009ef2955d91e04f62a7159a1c7ddaddbfedc3b6 ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:03:13 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 14:03:13 +0000 Subject: [issue37913] Document that __length_hint__ may return NotImplemented In-Reply-To: <1566469027.85.0.30597516641.issue37913@roundup.psfhosted.org> Message-ID: <1568124193.07.0.489596054193.issue37913@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +15507 pull_request: https://github.com/python/cpython/pull/15860 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:04:17 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 10 Sep 2019 14:04:17 +0000 Subject: [issue38066] Hide internal asyncio.Stream methods In-Reply-To: <1568029115.61.0.532730850424.issue38066@roundup.psfhosted.org> Message-ID: <1568124257.88.0.433460974058.issue38066@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:04:35 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 10 Sep 2019 14:04:35 +0000 Subject: [issue38086] Synchronize importlib.metadata with importlib_metadata 0.21 In-Reply-To: <1568115394.78.0.274032945021.issue38086@roundup.psfhosted.org> Message-ID: <1568124275.25.0.585802142212.issue38086@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- pull_requests: +15508 pull_request: https://github.com/python/cpython/pull/15861 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:06:34 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 10 Sep 2019 14:06:34 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568124394.3.0.0122641306687.issue36373@roundup.psfhosted.org> Andrew Svetlov added the comment: Thanks for the report xtreak, I'll make a fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:06:41 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 14:06:41 +0000 Subject: [issue37913] Document that __length_hint__ may return NotImplemented In-Reply-To: <1566469027.85.0.30597516641.issue37913@roundup.psfhosted.org> Message-ID: <1568124401.06.0.242628979558.issue37913@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +15509 pull_request: https://github.com/python/cpython/pull/15862 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:17:45 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 14:17:45 +0000 Subject: [issue38087] test_ntpath must account for casing changes In-Reply-To: <1568120550.64.0.710799778395.issue38087@roundup.psfhosted.org> Message-ID: <1568125065.49.0.132994416068.issue38087@roundup.psfhosted.org> Steve Dower added the comment: New changeset 0d7e6a6d2d9e564d670efb6e3705598846de188d by Steve Dower in branch '3.7': bpo-38087: Fix case sensitivity in test_pathlib and test_ntpath (GH-15850) https://github.com/python/cpython/commit/0d7e6a6d2d9e564d670efb6e3705598846de188d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:18:05 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 14:18:05 +0000 Subject: [issue38088] distutils cannot locate vcruntime140.dll with only VS 2019 installed In-Reply-To: <1568120618.81.0.389197586577.issue38088@roundup.psfhosted.org> Message-ID: <1568125085.44.0.680351894245.issue38088@roundup.psfhosted.org> Steve Dower added the comment: New changeset 0fccd4ab5b2238b6340901dd0023a1a157852792 by Steve Dower in branch '3.7': bpo-38088: Fixes distutils not finding vcruntime140.dll with only v142 toolset installed (GH-15849) https://github.com/python/cpython/commit/0fccd4ab5b2238b6340901dd0023a1a157852792 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:18:25 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 10 Sep 2019 14:18:25 +0000 Subject: [issue16079] list duplicate test names with patchcheck In-Reply-To: <1348827338.06.0.659343787847.issue16079@psf.upfronthosting.co.za> Message-ID: <1568125105.75.0.835422730701.issue16079@roundup.psfhosted.org> Ned Deily added the comment: The open proposed PR for this issue has been languishing unreviewed for several months now. Since the proposal is really a request to change our development process, I'm nosying Brett and ?ukasz (3.9 RM). In any case, if we would decide to add this to our CI, I thine we should only start with the master branch so I'm closing the 3.7 and 2.7 backport PRs. ---------- nosy: +brett.cannon, lukasz.langa, ned.deily versions: +Python 3.9 -Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:19:43 2019 From: report at bugs.python.org (Matej Cepl) Date: Tue, 10 Sep 2019 14:19:43 +0000 Subject: [issue36369] test_weakref super slow on RPi Zero In-Reply-To: <1553015837.07.0.00449042281864.issue36369@roundup.psfhosted.org> Message-ID: <1568125183.02.0.753385989715.issue36369@roundup.psfhosted.org> Change by Matej Cepl : ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:20:57 2019 From: report at bugs.python.org (Dino Viehland) Date: Tue, 10 Sep 2019 14:20:57 +0000 Subject: [issue36781] Optimize sum() for bools In-Reply-To: <1556876973.98.0.990157093134.issue36781@roundup.psfhosted.org> Message-ID: <1568125257.4.0.859820411492.issue36781@roundup.psfhosted.org> Dino Viehland added the comment: Sorry, it seemed like a perfectly reasonable change when I was looking at the PR! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:21:23 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 14:21:23 +0000 Subject: [issue38092] environment variables not passed correctly using new virtualenv launching in windows and python3.7+ In-Reply-To: <1568122359.92.0.800539114246.issue38092@roundup.psfhosted.org> Message-ID: <1568125283.32.0.419203526001.issue38092@roundup.psfhosted.org> Steve Dower added the comment: Yeah, very strange that. I can only assume that it's launching the venv redirector directly, rather than the real sys.executable, and we aren't ever calling set_executable() with the real one anymore. Dropping this into Lib/multiprocessing/spawn.py should cause a repro: if WINSERVICE: _python_exe = os.path.join(sys.exec_prefix, 'python.exe') else: _python_exe = getattr(sys, '_base_executable', sys.executable) And as you point out, fixing the CreateProcess call should provide a fix. Could you try that? And maybe submit a PR with the fix? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:25:15 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 14:25:15 +0000 Subject: [issue37913] Document that __length_hint__ may return NotImplemented In-Reply-To: <1566469027.85.0.30597516641.issue37913@roundup.psfhosted.org> Message-ID: <1568125515.96.0.0522141032712.issue37913@roundup.psfhosted.org> Steve Dower added the comment: New changeset a39a4c7439ed09069e619c10d30a6d0ec9332d1a by Steve Dower in branch 'master': bpo-37913: Link to NotImplemented from new docs (GH-15860) https://github.com/python/cpython/commit/a39a4c7439ed09069e619c10d30a6d0ec9332d1a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:25:39 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 14:25:39 +0000 Subject: [issue37913] Document that __length_hint__ may return NotImplemented In-Reply-To: <1566469027.85.0.30597516641.issue37913@roundup.psfhosted.org> Message-ID: <1568125539.91.0.0613971447906.issue37913@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +15510 pull_request: https://github.com/python/cpython/pull/15863 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:26:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Sep 2019 14:26:55 +0000 Subject: [issue36369] test_weakref super slow on RPi Zero In-Reply-To: <1553015837.07.0.00449042281864.issue36369@roundup.psfhosted.org> Message-ID: <1568125615.76.0.340682221806.issue36369@roundup.psfhosted.org> STINNER Victor added the comment: How long take other tests on Raspberry Pi Zero W? You can try: ./python -m test -j0 --slowest -j0 spawns one job per CPU. I don't know how many CPUs have this hardware. --slowest gives the timing of the 10 slowest tests. But even without --slowest, Python displays the test duration if a test takes longer than 30 seconds. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:29:33 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 14:29:33 +0000 Subject: [issue38087] test_ntpath must account for casing changes In-Reply-To: <1568120550.64.0.710799778395.issue38087@roundup.psfhosted.org> Message-ID: <1568125773.79.0.766575998172.issue38087@roundup.psfhosted.org> Steve Dower added the comment: New changeset 206e4c3d3547b024935ea9655f960061dffbb80f by Steve Dower in branch '3.8': bpo-38087: Fix case sensitivity in test_pathlib and test_ntpath (GH-15850) https://github.com/python/cpython/commit/206e4c3d3547b024935ea9655f960061dffbb80f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:30:08 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 14:30:08 +0000 Subject: [issue38087] test_ntpath must account for casing changes In-Reply-To: <1568120550.64.0.710799778395.issue38087@roundup.psfhosted.org> Message-ID: <1568125808.8.0.316832864042.issue38087@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:31:10 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 14:31:10 +0000 Subject: [issue38090] test_ctypes is leaking references In-Reply-To: <1568120765.1.0.320006339983.issue38090@roundup.psfhosted.org> Message-ID: <1568125870.86.0.00976916512928.issue38090@roundup.psfhosted.org> Steve Dower added the comment: New changeset 45bc3928e232603a97451dea3106d824b0f7a392 by Steve Dower (Miss Islington (bot)) in branch '3.8': bpo-38090: Fix reference leak in ceval.c (GH-15848) https://github.com/python/cpython/commit/45bc3928e232603a97451dea3106d824b0f7a392 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:31:29 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 14:31:29 +0000 Subject: [issue37913] Document that __length_hint__ may return NotImplemented In-Reply-To: <1566469027.85.0.30597516641.issue37913@roundup.psfhosted.org> Message-ID: <1568125889.11.0.973975162052.issue37913@roundup.psfhosted.org> Steve Dower added the comment: New changeset ed99bb9ca68b37cfaec3629afa67d70289f3ffc7 by Steve Dower in branch '3.8': bpo-37913: document that __length_hint__ can return NotImplemented (GH-15383) https://github.com/python/cpython/commit/ed99bb9ca68b37cfaec3629afa67d70289f3ffc7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:31:37 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 14:31:37 +0000 Subject: [issue37913] Document that __length_hint__ may return NotImplemented In-Reply-To: <1566469027.85.0.30597516641.issue37913@roundup.psfhosted.org> Message-ID: <1568125897.71.0.410011355303.issue37913@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15511 pull_request: https://github.com/python/cpython/pull/15864 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:32:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Sep 2019 14:32:57 +0000 Subject: [issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit In-Reply-To: <1567417707.23.0.718072799916.issue38006@roundup.psfhosted.org> Message-ID: <1568125977.57.0.321107970589.issue38006@roundup.psfhosted.org> STINNER Victor added the comment: I reverted the change which added func_clear() to get more time to investigate this bug: New changeset ccaea525885e41c5f1e566bb68698847faaa82ca by T. Wouters (Victor Stinner) in branch '3.8': Revert "bpo-33418: Add tp_clear for function object (GH-8058)" (GH-15826) https://github.com/python/cpython/commit/ccaea525885e41c5f1e566bb68698847faaa82ca This issue looks quite complex, and I prefer to wait Python 3.9 to fix it. We are stabilizing Python 3.8 to prepare 3.8.0 final release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:33:19 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 10 Sep 2019 14:33:19 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568125999.92.0.399622157225.issue36373@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Is it okay to have _asyncio_internal keyword with default value as False and the places where it's used internally in stdlib like AsyncMock (Condition), async_case (Queue) and other tests we can pass in True? I have a patch if that would be a good approach :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:38:50 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 10 Sep 2019 14:38:50 +0000 Subject: [issue32165] PyEval_InitThreads is called before Py_Initialize in LoadPython in Modules/_ctypes/callbacks.c In-Reply-To: <1511924168.1.0.213398074469.issue32165@psf.upfronthosting.co.za> Message-ID: <1568126330.4.0.333299060388.issue32165@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:40:53 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 14:40:53 +0000 Subject: [issue37504] Documentation fails to build when using Sphinx' texinfo builder In-Reply-To: <1562320155.27.0.39785501395.issue37504@roundup.psfhosted.org> Message-ID: <1568126453.26.0.338986391381.issue37504@roundup.psfhosted.org> Steve Dower added the comment: New changeset c3d679fd398f42a2e489fbe3dab17fac1fb2439c by Steve Dower (Dmitry Shachnev) in branch 'master': bpo-37504: Fix documentation build with texinfo builder (GH-14606) https://github.com/python/cpython/commit/c3d679fd398f42a2e489fbe3dab17fac1fb2439c ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:41:02 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 14:41:02 +0000 Subject: [issue37504] Documentation fails to build when using Sphinx' texinfo builder In-Reply-To: <1562320155.27.0.39785501395.issue37504@roundup.psfhosted.org> Message-ID: <1568126462.57.0.425207762494.issue37504@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15512 pull_request: https://github.com/python/cpython/pull/15866 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:41:44 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 10 Sep 2019 14:41:44 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568126504.86.0.519040738609.issue36373@roundup.psfhosted.org> Andrew Svetlov added the comment: Better to avoid _asyncio_internal if not strictly necessary. Currently, _asyncio_internal is used for protection of asyncio class direct instantiation. E.g. stream = asyncio.Stream() is forbidden, people should use factories like stream = await asyncio.connect(...) for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:42:01 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 14:42:01 +0000 Subject: [issue37913] Document that __length_hint__ may return NotImplemented In-Reply-To: <1566469027.85.0.30597516641.issue37913@roundup.psfhosted.org> Message-ID: <1568126521.27.0.641328846994.issue37913@roundup.psfhosted.org> Steve Dower added the comment: New changeset aa3b629a09bfcdf26cdfbbf7d6445ae333c0d44d by Steve Dower in branch '3.7': bpo-37913: document that __length_hint__ can return NotImplemented (GH-15383) https://github.com/python/cpython/commit/aa3b629a09bfcdf26cdfbbf7d6445ae333c0d44d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:42:29 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 14:42:29 +0000 Subject: [issue38088] distutils cannot locate vcruntime140.dll with only VS 2019 installed In-Reply-To: <1568120618.81.0.389197586577.issue38088@roundup.psfhosted.org> Message-ID: <1568126549.63.0.308147932523.issue38088@roundup.psfhosted.org> Steve Dower added the comment: New changeset 2ed0ac6bf17d599bc246c513c32710c154e50a64 by Steve Dower (Miss Islington (bot)) in branch '3.8': bpo-38088: Fixes distutils not finding vcruntime140.dll with only v142 toolset installed (GH-15849) https://github.com/python/cpython/commit/2ed0ac6bf17d599bc246c513c32710c154e50a64 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:42:41 2019 From: report at bugs.python.org (Lisa Roach) Date: Tue, 10 Sep 2019 14:42:41 +0000 Subject: [issue38093] Update MagicMock __aenter__ and __aexit__ to return AsyncMock's Message-ID: <1568126561.19.0.234964443085.issue38093@roundup.psfhosted.org> New submission from Lisa Roach : After a discussion with Michael, xtreak, and Ezio we've decided to try to make the process of mocking an async context manager slightly easier. Currently if you want to mock a context manager that is used like this: async with cm(): # note that cm is called here blah You need to mock cm as a MagicMock and set __aenter__ and __aexit__ return values directly because they do not exist on MagicMocks. Our first step to making this easier is setting the calculated return value of MagicMock __aenter__ and __aexit__ to be AsyncMock, which will make it so you do not need to set them specifically. A future improvement may be to create a ContextManagerMock directly that can take an async kwarg that would return a context manager with AsyncMocks for __aenter__ and __aexit__ automatically. ---------- assignee: lisroach messages: 351682 nosy: ezio.melotti, lisroach, michael.foord, xtreak priority: normal severity: normal stage: needs patch status: open title: Update MagicMock __aenter__ and __aexit__ to return AsyncMock's type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:42:39 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 14:42:39 +0000 Subject: [issue38088] distutils cannot locate vcruntime140.dll with only VS 2019 installed In-Reply-To: <1568120618.81.0.389197586577.issue38088@roundup.psfhosted.org> Message-ID: <1568126559.32.0.674665493795.issue38088@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:43:44 2019 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 10 Sep 2019 14:43:44 +0000 Subject: [issue38090] test_ctypes is leaking references In-Reply-To: <1568120765.1.0.320006339983.issue38090@roundup.psfhosted.org> Message-ID: <1568126624.61.0.776016784554.issue38090@roundup.psfhosted.org> Anthony Sottile added the comment: oops! thanks for the quick fix, I'll double check where I copied this from since it might have the same bug ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:46:43 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 10 Sep 2019 14:46:43 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568126803.98.0.679055115583.issue36373@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Ah okay. There were places like Condition's constructor that has a deprecation warning and we construct a Lock with loop passed in the constructor and I passed along _asyncio_internal. I would be happy to look into your PR since mine is just passing along _asyncio_internal=True for all the stdlib calls. I think it would be good if tests ran with warnings (at least DeprecationWarning and some class of warnings) as error but not sure why :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:47:06 2019 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 10 Sep 2019 14:47:06 +0000 Subject: [issue38090] test_ctypes is leaking references In-Reply-To: <1568120765.1.0.320006339983.issue38090@roundup.psfhosted.org> Message-ID: <1568126826.48.0.530950154332.issue38090@roundup.psfhosted.org> Anthony Sottile added the comment: https://github.com/python/cpython/pull/6398/files#diff-fb54fd281a2569006594f7edc6ad90f9R744 hmm I assume _PyDict_GetItemId has different reference semantics? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:48:40 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Sep 2019 14:48:40 +0000 Subject: [issue38070] visit_decref(): add an assertion to check that the object is not freed In-Reply-To: <1568037936.88.0.10373402622.issue38070@roundup.psfhosted.org> Message-ID: <1568126920.62.0.046641706781.issue38070@roundup.psfhosted.org> STINNER Victor added the comment: > Should this be closed now? Please keep it open, I have a few more local changess to enhance Py_FatalError() :-) I would like to reuse the bpo number. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:50:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Sep 2019 14:50:52 +0000 Subject: [issue33418] Memory leaks in functions In-Reply-To: <1525370063.61.0.682650639539.issue33418@psf.upfronthosting.co.za> Message-ID: <1568127052.56.0.654784676404.issue33418@roundup.psfhosted.org> STINNER Victor added the comment: > But I am worrying about func.func_closure. Can it create cyclic reference in real life applications? remove.__closure__ is part of a reference cycle in bpo-38006. I like func_clear() (which is still implemented in the master branch), but we need to understand why/how it was possible *crash Python* in bpo-38006. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:51:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Sep 2019 14:51:13 +0000 Subject: [issue38043] small cleanups in Unicode normalization code In-Reply-To: <1567745214.3.0.712701659381.issue38043@roundup.psfhosted.org> Message-ID: <1568127073.35.0.263101601762.issue38043@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:51:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Sep 2019 14:51:36 +0000 Subject: [issue38084] multiprocessing cannot recover from crashed worker In-Reply-To: <1568105909.03.0.686404819271.issue38084@roundup.psfhosted.org> Message-ID: <1568127096.56.0.698760292013.issue38084@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +pablogsal, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:51:47 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 14:51:47 +0000 Subject: [issue37504] Documentation fails to build when using Sphinx' texinfo builder In-Reply-To: <1562320155.27.0.39785501395.issue37504@roundup.psfhosted.org> Message-ID: <1568127107.02.0.405635747277.issue37504@roundup.psfhosted.org> Steve Dower added the comment: New changeset 313f80192a7396ea3e5ab107175afe4c5a017ab8 by Steve Dower (Miss Islington (bot)) in branch '3.8': bpo-37504: Fix documentation build with texinfo builder (GH-14606) https://github.com/python/cpython/commit/313f80192a7396ea3e5ab107175afe4c5a017ab8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:52:06 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 14:52:06 +0000 Subject: [issue37504] Documentation fails to build when using Sphinx' texinfo builder In-Reply-To: <1562320155.27.0.39785501395.issue37504@roundup.psfhosted.org> Message-ID: <1568127126.28.0.568137502018.issue37504@roundup.psfhosted.org> Steve Dower added the comment: Thanks for the report and the patch! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:52:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Sep 2019 14:52:19 +0000 Subject: [issue38084] multiprocessing cannot recover from crashed worker In-Reply-To: <1568105909.03.0.686404819271.issue38084@roundup.psfhosted.org> Message-ID: <1568127139.97.0.494304386397.issue38084@roundup.psfhosted.org> STINNER Victor added the comment: > multiprocessing cannot recover from crashed worker This issue has been seen on the macOS job of the Azure Pipeline: bpo-37245. I don't know if other platforms are affected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:54:30 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 14:54:30 +0000 Subject: [issue38084] multiprocessing cannot recover from crashed worker In-Reply-To: <1568105909.03.0.686404819271.issue38084@roundup.psfhosted.org> Message-ID: <1568127270.84.0.323326660607.issue38084@roundup.psfhosted.org> Steve Dower added the comment: Windows is definitely affected, and you can run the repro in my first post to check other platforms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:57:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Sep 2019 14:57:06 +0000 Subject: [issue38090] test_ctypes is leaking references In-Reply-To: <1568120765.1.0.320006339983.issue38090@roundup.psfhosted.org> Message-ID: <1568127426.34.0.934203152399.issue38090@roundup.psfhosted.org> STINNER Victor added the comment: FTR it seems like it was a regression introduced by: commit 2d5594fac21a81a06f82c3605318dfa96e72398f Author: Steve Dower Date: Mon Sep 9 09:45:18 2019 -0700 bpo-20490: Improve circular import error message (GH-15308) Thanks for the quick fix ;-) ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:57:19 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 14:57:19 +0000 Subject: [issue37913] Document that __length_hint__ may return NotImplemented In-Reply-To: <1566469027.85.0.30597516641.issue37913@roundup.psfhosted.org> Message-ID: <1568127439.38.0.416424927752.issue37913@roundup.psfhosted.org> Steve Dower added the comment: New changeset 756eb849d7d968f0a0924fa33b68c62831e8884e by Steve Dower (Miss Islington (bot)) in branch '3.7': bpo-37913: document that __length_hint__ can return NotImplemented (GH-15383) https://github.com/python/cpython/commit/756eb849d7d968f0a0924fa33b68c62831e8884e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:58:06 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 14:58:06 +0000 Subject: [issue37913] Document that __length_hint__ may return NotImplemented In-Reply-To: <1566469027.85.0.30597516641.issue37913@roundup.psfhosted.org> Message-ID: <1568127486.28.0.775528219176.issue37913@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 10:58:32 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 10 Sep 2019 14:58:32 +0000 Subject: [issue38086] Synchronize importlib.metadata with importlib_metadata 0.21 In-Reply-To: <1568115394.78.0.274032945021.issue38086@roundup.psfhosted.org> Message-ID: <1568127512.44.0.590737918213.issue38086@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset 97c2f68a4c0bf4e69a1e769928d7928fab73a666 by Jason R. Coombs in branch '3.8': [3.8] bpo-38086: Sync importlib.metadata with importlib_metadata 0.21. (GH-15840) (#15861) https://github.com/python/cpython/commit/97c2f68a4c0bf4e69a1e769928d7928fab73a666 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:00:12 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 15:00:12 +0000 Subject: [issue38090] test_ctypes is leaking references In-Reply-To: <1568120765.1.0.320006339983.issue38090@roundup.psfhosted.org> Message-ID: <1568127612.33.0.497651627938.issue38090@roundup.psfhosted.org> Steve Dower added the comment: > hmm I assume _PyDict_GetItemId has different reference semantics? Pretty sure it's the same. Perhaps we don't have any test coverage for that one? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:02:31 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 10 Sep 2019 15:02:31 +0000 Subject: [issue38047] multiarch headers are added when cross compiling Message-ID: <1568127751.37.0.757987886967.issue38047@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:07:08 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Sep 2019 15:07:08 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568128028.71.0.233272773277.issue37531@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15513 pull_request: https://github.com/python/cpython/pull/15871 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:11:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Sep 2019 15:11:07 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568128267.56.0.90559130716.issue37531@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15514 pull_request: https://github.com/python/cpython/pull/15874 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:11:19 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 10 Sep 2019 15:11:19 +0000 Subject: [issue33602] Remove set and queue references from Data Types In-Reply-To: <1526999288.77.0.682650639539.issue33602@psf.upfronthosting.co.za> Message-ID: <1568128279.36.0.489966138382.issue33602@roundup.psfhosted.org> Julien Palard added the comment: New changeset 912108891db52c2067889be1f4ce5713839807cd by Julien Palard (Andre Delfino) in branch 'master': bpo-33602: Doc: Remove set and queue references from Data Types (GH-7055) https://github.com/python/cpython/commit/912108891db52c2067889be1f4ce5713839807cd ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:11:27 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 15:11:27 +0000 Subject: [issue33602] Remove set and queue references from Data Types In-Reply-To: <1526999288.77.0.682650639539.issue33602@psf.upfronthosting.co.za> Message-ID: <1568128287.83.0.436030327742.issue33602@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15515 pull_request: https://github.com/python/cpython/pull/15875 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:11:34 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 15:11:34 +0000 Subject: [issue33602] Remove set and queue references from Data Types In-Reply-To: <1526999288.77.0.682650639539.issue33602@psf.upfronthosting.co.za> Message-ID: <1568128294.13.0.543497726639.issue33602@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15516 pull_request: https://github.com/python/cpython/pull/15876 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:20:18 2019 From: report at bugs.python.org (Thomas Wouters) Date: Tue, 10 Sep 2019 15:20:18 +0000 Subject: [issue36253] Use after free in ctypes test suite In-Reply-To: <1552176520.99.0.273814604607.issue36253@roundup.psfhosted.org> Message-ID: <1568128818.33.0.246313962958.issue36253@roundup.psfhosted.org> Thomas Wouters added the comment: New changeset a9b6033179b64b985394ad351501089a6a94fc9d by T. Wouters (Ben Harper) in branch 'master': bpo-36253: Remove use after free reference in ctypes test suite (GH-12257) https://github.com/python/cpython/commit/a9b6033179b64b985394ad351501089a6a94fc9d ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:21:52 2019 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 10 Sep 2019 15:21:52 +0000 Subject: [issue32424] Synchronize copy methods between Python and C implementations of xml.etree.ElementTree.Element In-Reply-To: <1514141500.33.0.213398074469.issue32424@psf.upfronthosting.co.za> Message-ID: <1568128912.83.0.823111622445.issue32424@roundup.psfhosted.org> Stefan Behnel added the comment: Let's just deprecate it directly (in Py3.9, I guess), given that it was never documented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:22:05 2019 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 10 Sep 2019 15:22:05 +0000 Subject: [issue32424] Synchronize copy methods between Python and C implementations of xml.etree.ElementTree.Element In-Reply-To: <1514141500.33.0.213398074469.issue32424@psf.upfronthosting.co.za> Message-ID: <1568128925.19.0.324276954778.issue32424@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset 7d952ded6813c896ea3f4234bb8db5247dcb5484 by Stefan Behnel (Gordon P. Hemsley) in branch 'master': bpo-32424: Deprecate xml.etree.ElementTree.Element.copy() in favor of copy.copy() (GH-12995) https://github.com/python/cpython/commit/7d952ded6813c896ea3f4234bb8db5247dcb5484 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:22:43 2019 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 10 Sep 2019 15:22:43 +0000 Subject: [issue32424] Synchronize copy methods between Python and C implementations of xml.etree.ElementTree.Element In-Reply-To: <1514141500.33.0.213398074469.issue32424@psf.upfronthosting.co.za> Message-ID: <1568128963.61.0.229041449343.issue32424@roundup.psfhosted.org> Change by Stefan Behnel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:24:16 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 10 Sep 2019 15:24:16 +0000 Subject: [issue38094] unneeded assignment to wb.len in PyBytes_Concat using buffer protocol Message-ID: <1568129056.61.0.163100885596.issue38094@roundup.psfhosted.org> New submission from Gregory P. Smith : https://github.com/python/cpython/pull/15274 ---------- assignee: gregory.p.smith messages: 351700 nosy: gregory.p.smith priority: normal severity: normal status: open title: unneeded assignment to wb.len in PyBytes_Concat using buffer protocol versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:24:32 2019 From: report at bugs.python.org (Sergey Fedoseev) Date: Tue, 10 Sep 2019 15:24:32 +0000 Subject: [issue38094] unneeded assignment to wb.len in PyBytes_Concat using buffer protocol In-Reply-To: <1568129056.61.0.163100885596.issue38094@roundup.psfhosted.org> Message-ID: <1568129072.18.0.205625603097.issue38094@roundup.psfhosted.org> Change by Sergey Fedoseev : ---------- keywords: +patch pull_requests: +15517 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15274 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:25:52 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 15:25:52 +0000 Subject: [issue31226] shutil.rmtree fails when target has an internal directory junction (Windows) In-Reply-To: <1502978298.87.0.60982184572.issue31226@psf.upfronthosting.co.za> Message-ID: <1568129152.06.0.863525833876.issue31226@roundup.psfhosted.org> Steve Dower added the comment: Closing this as we've resolved it elsewhere. Thanks for the contribution! ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:30:58 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Sep 2019 15:30:58 +0000 Subject: [issue38084] multiprocessing cannot recover from crashed worker In-Reply-To: <1568105909.03.0.686404819271.issue38084@roundup.psfhosted.org> Message-ID: <1568129458.49.0.397040144767.issue38084@roundup.psfhosted.org> STINNER Victor added the comment: I converted the example into attached file mp_exit.py and I added a call to faulthandler to see what is going on. Output with the master branch of Python: vstinner at apu$ ~/python/master/python ~/mp_exit.py Timeout (0:00:05)! Thread 0x00007ff40139a700 (most recent call first): File "/home/vstinner/python/master/Lib/multiprocessing/connection.py", line 379 in _recv File "/home/vstinner/python/master/Lib/multiprocessing/connection.py", line 414 in _recv_bytes File "/home/vstinner/python/master/Lib/multiprocessing/connection.py", line 250 in recv File "/home/vstinner/python/master/Lib/multiprocessing/pool.py", line 576 in _handle_results File "/home/vstinner/python/master/Lib/threading.py", line 882 in run File "/home/vstinner/python/master/Lib/threading.py", line 944 in _bootstrap_inner File "/home/vstinner/python/master/Lib/threading.py", line 902 in _bootstrap Thread 0x00007ff401b9b700 (most recent call first): File "/home/vstinner/python/master/Lib/multiprocessing/pool.py", line 528 in _handle_tasks File "/home/vstinner/python/master/Lib/threading.py", line 882 in run File "/home/vstinner/python/master/Lib/threading.py", line 944 in _bootstrap_inner File "/home/vstinner/python/master/Lib/threading.py", line 902 in _bootstrap Thread 0x00007ff40239c700 (most recent call first): File "/home/vstinner/python/master/Lib/selectors.py", line 415 in select File "/home/vstinner/python/master/Lib/multiprocessing/connection.py", line 930 in wait File "/home/vstinner/python/master/Lib/multiprocessing/pool.py", line 499 in _wait_for_updates File "/home/vstinner/python/master/Lib/multiprocessing/pool.py", line 519 in _handle_workers File "/home/vstinner/python/master/Lib/threading.py", line 882 in run File "/home/vstinner/python/master/Lib/threading.py", line 944 in _bootstrap_inner File "/home/vstinner/python/master/Lib/threading.py", line 902 in _bootstrap Thread 0x00007ff4102cf740 (most recent call first): File "/home/vstinner/python/master/Lib/threading.py", line 303 in wait File "/home/vstinner/python/master/Lib/threading.py", line 565 in wait File "/home/vstinner/python/master/Lib/multiprocessing/pool.py", line 759 in wait File "/home/vstinner/python/master/Lib/multiprocessing/pool.py", line 762 in get File "/home/vstinner/python/master/Lib/multiprocessing/pool.py", line 364 in map File "/home/vstinner/mp_exit.py", line 12 in In the main process, Pool._handle_results() thread is blocked on os.read() which never completes, even if the child process died and so the other end of the pipe should be closed. ---------- Added file: https://bugs.python.org/file48603/mp_exit.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:31:41 2019 From: report at bugs.python.org (Eric Snow) Date: Tue, 10 Sep 2019 15:31:41 +0000 Subject: [issue36876] Global C variables are a problem. In-Reply-To: <1557514902.13.0.853517754348.issue36876@roundup.psfhosted.org> Message-ID: <1568129501.14.0.238912965319.issue36876@roundup.psfhosted.org> Change by Eric Snow : ---------- pull_requests: +15518 pull_request: https://github.com/python/cpython/pull/15877 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:32:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Sep 2019 15:32:12 +0000 Subject: [issue38084] multiprocessing cannot recover from crashed worker In-Reply-To: <1568105909.03.0.686404819271.issue38084@roundup.psfhosted.org> Message-ID: <1568129532.54.0.992745037589.issue38084@roundup.psfhosted.org> STINNER Victor added the comment: > Windows is definitely affected, and you can run the repro in my first post to check other platforms. Oh right, I can also reproduce the issue on Linux. But I don't understand why test_multiprocessing_spawn works on all platforms, but only fails on macOS when run on Azure Pipelines. Aaaaah, multiprocesing mysteries... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:37:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Sep 2019 15:37:57 +0000 Subject: [issue38090] test_ctypes is leaking references In-Reply-To: <1568120765.1.0.320006339983.issue38090@roundup.psfhosted.org> Message-ID: <1568129877.08.0.747378111807.issue38090@roundup.psfhosted.org> STINNER Victor added the comment: > hmm I assume _PyDict_GetItemId has different reference semantics? PyDict_GetItem() and _PyDict_GetItemId() return a borrowed reference. PyObject_GetAttr() and _PyObject_GetAttrId() return a strong reference. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:38:20 2019 From: report at bugs.python.org (Davin Potts) Date: Tue, 10 Sep 2019 15:38:20 +0000 Subject: [issue38084] multiprocessing cannot recover from crashed worker In-Reply-To: <1568105909.03.0.686404819271.issue38084@roundup.psfhosted.org> Message-ID: <1568129900.43.0.99791768828.issue38084@roundup.psfhosted.org> Davin Potts added the comment: Sharing for the sake of documenting a few things going on in this particular example: * When a PoolWorker process exits in this way (os._exit(anything)), the PoolWorker never gets the chance to send a signal of failure (normally sent via the outqueue) to the MainProcess. * In the current logic of the MainProcess, Pool._maintain_pool() detects the termination of that PoolWorker process and starts a new PoolWorker process to replace it, maintaining the desired size of Pool. * The infinite hang observed in this example comes from the original p.map() call performing an unlimited-timeout wait for a result to appear on the outqueue, hence an infinite wait. This wait is performed in MapResult.get() which does expose a timeout parameter though it is not possible to control through Pool.map(). It is not at all a correct, general solution, but exposing the control on this timeout and setting it to 1.0 seconds permits Steve's repro code snippet to run to completion (no infinite hang, raises a multiprocessing.context.TimeoutError). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:41:09 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 10 Sep 2019 15:41:09 +0000 Subject: [issue37935] Improve performance of pathlib.scandir() In-Reply-To: <1566628301.14.0.386871182456.issue37935@roundup.psfhosted.org> Message-ID: <1568130069.84.0.663515890658.issue37935@roundup.psfhosted.org> Gregory P. Smith added the comment: Shai, please open the 'Your Details' link in the bugs.python.org sidebar and make sure you have your github username filled in. it needs to say ShaiAvr for our CLA automation to understand. Avoiding calling list() on the output of scandir() is always desirable. :) ---------- assignee: -> gregory.p.smith nosy: +gregory.p.smith versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:42:59 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 10 Sep 2019 15:42:59 +0000 Subject: [issue33602] Remove set and queue references from Data Types In-Reply-To: <1526999288.77.0.682650639539.issue33602@psf.upfronthosting.co.za> Message-ID: <1568130179.06.0.481250895939.issue33602@roundup.psfhosted.org> Julien Palard added the comment: New changeset 58ef7d341c79f649da275bb1d5c11f668d7bac9e by Julien Palard (Miss Islington (bot)) in branch '3.8': bpo-33602: Doc: Remove set and queue references from Data Types (GH-7055) (GH-15875) https://github.com/python/cpython/commit/58ef7d341c79f649da275bb1d5c11f668d7bac9e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:43:14 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 10 Sep 2019 15:43:14 +0000 Subject: [issue33602] Remove set and queue references from Data Types In-Reply-To: <1526999288.77.0.682650639539.issue33602@psf.upfronthosting.co.za> Message-ID: <1568130194.68.0.125740070452.issue33602@roundup.psfhosted.org> Julien Palard added the comment: New changeset 816825e192ed430438c613d52a58fb9e1a8d90f4 by Julien Palard (Miss Islington (bot)) in branch '3.7': bpo-33602: Doc: Remove set and queue references from Data Types (GH-7055) (GH-15876) https://github.com/python/cpython/commit/816825e192ed430438c613d52a58fb9e1a8d90f4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:43:55 2019 From: report at bugs.python.org (Julien Palard) Date: Tue, 10 Sep 2019 15:43:55 +0000 Subject: [issue33602] Remove set and queue references from Data Types In-Reply-To: <1526999288.77.0.682650639539.issue33602@psf.upfronthosting.co.za> Message-ID: <1568130235.86.0.0495003590157.issue33602@roundup.psfhosted.org> Change by Julien Palard : ---------- nosy: -mdk resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:49:30 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 10 Sep 2019 15:49:30 +0000 Subject: [issue32972] unittest.TestCase coroutine support In-Reply-To: <1519843317.02.0.467229070634.issue32972@psf.upfronthosting.co.za> Message-ID: <1568130570.46.0.129365317784.issue32972@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- pull_requests: +15519 pull_request: https://github.com/python/cpython/pull/15878 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:49:51 2019 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 10 Sep 2019 15:49:51 +0000 Subject: [issue10108] ExpatError not property wrapped In-Reply-To: <1287093270.3.0.510777453712.issue10108@psf.upfronthosting.co.za> Message-ID: <1568130591.67.0.404337199332.issue10108@roundup.psfhosted.org> Stefan Behnel added the comment: I agree that it's surprising to get a low-level parser error from a high-level library like xmlrpc. I think this can be changed without deprecation, because users must expect exceptions from the xmlrpc library in any case. Targeting to Py3.9, needs patch with tests. ---------- priority: normal -> low stage: -> needs patch versions: +Python 3.9 -Python 2.7, Python 3.2, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:50:24 2019 From: report at bugs.python.org (Davin Potts) Date: Tue, 10 Sep 2019 15:50:24 +0000 Subject: [issue38084] multiprocessing cannot recover from crashed worker In-Reply-To: <1568105909.03.0.686404819271.issue38084@roundup.psfhosted.org> Message-ID: <1568130624.24.0.262749580275.issue38084@roundup.psfhosted.org> Davin Potts added the comment: Thanks to Pablo's good work with implementing the use of multiprocessing's Process.sentinel, the logic for handling PoolWorkers that die has been centralized into Pool._maintain_pool(). If _maintain_pool() can also identify which job died with the dead PoolWorker, then it should be possible to put a corresponding message on the outqueue to indicate an exception occurred but pool can otherwise continue its work. The question of whether Pool.map() should expose a timeout parameter deserves a separate discussion and should not be considered a path forward on this issue as it would require that users always specify and somehow know beforehand how long it should take for results to be returned from workers. Exposing the timeout control may have other practical benefits elsewhere but not here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:52:15 2019 From: report at bugs.python.org (Pierre Glaser) Date: Tue, 10 Sep 2019 15:52:15 +0000 Subject: [issue38092] environment variables not passed correctly using new virtualenv launching in windows and python3.7+ In-Reply-To: <1568122359.92.0.800539114246.issue38092@roundup.psfhosted.org> Message-ID: <1568130735.67.0.34123651115.issue38092@roundup.psfhosted.org> Pierre Glaser added the comment: > Dropping this into Lib/multiprocessing/spawn.py should cause a repro: if WINSERVICE: _python_exe = os.path.join(sys.exec_prefix, 'python.exe') else: _python_exe = getattr(sys, '_base_executable', sys.executable) In this case, spawn.get_executable() will return (sys._base_executable), and `env` will be set to None anyways no? (see these lines: https://github.com/python/cpython/blob/9008be303a89bfab8c3314c6a42330b5523adc8b/Lib/multiprocessing/popen_spawn_win32.py#L59-L68) We need to trigger the if clause of these lines instead, which happens by default in a virtual env -- this is why it is so troubling: even though a very simple case (launching a new process from within a virtualenv) should trigger a bug, it does not. > And maybe submit a PR with the fix? Will do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:53:06 2019 From: report at bugs.python.org (Zachary Ware) Date: Tue, 10 Sep 2019 15:53:06 +0000 Subject: [issue38089] Make macOS tests optional on Azure Pipelines In-Reply-To: <1568120687.8.0.406819210697.issue38089@roundup.psfhosted.org> Message-ID: <1568130786.47.0.402304524191.issue38089@roundup.psfhosted.org> Zachary Ware added the comment: New changeset 801f925998cc393260f36f5ac77369fef2373ad1 by Zachary Ware (Steve Dower) in branch 'master': bpo-38089: Move Azure Pipelines to latest VM versions and make macOS tests optional (GH-15851) https://github.com/python/cpython/commit/801f925998cc393260f36f5ac77369fef2373ad1 ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:53:14 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 15:53:14 +0000 Subject: [issue38089] Make macOS tests optional on Azure Pipelines In-Reply-To: <1568120687.8.0.406819210697.issue38089@roundup.psfhosted.org> Message-ID: <1568130794.97.0.749278725124.issue38089@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15520 pull_request: https://github.com/python/cpython/pull/15879 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:53:21 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 15:53:21 +0000 Subject: [issue38089] Make macOS tests optional on Azure Pipelines In-Reply-To: <1568120687.8.0.406819210697.issue38089@roundup.psfhosted.org> Message-ID: <1568130801.44.0.073084938099.issue38089@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15521 pull_request: https://github.com/python/cpython/pull/15880 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:54:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Sep 2019 15:54:43 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568130883.56.0.523759481234.issue37531@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 494b61aeec8e583755c8ff3a147a58657353bbc3 by Victor Stinner in branch '3.7': [3.7] bpo-37531: Enhance regrtest multiprocess timeout (GH-15345) (GH-15874) https://github.com/python/cpython/commit/494b61aeec8e583755c8ff3a147a58657353bbc3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:54:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Sep 2019 15:54:54 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568130894.33.0.957234321081.issue37531@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d42a4fdc630c54352701a466a9e512bee68b5c48 by Victor Stinner in branch '3.8': bpo-37531: Enhance regrtest multiprocess timeout (GH-15345) (GH-15871) https://github.com/python/cpython/commit/d42a4fdc630c54352701a466a9e512bee68b5c48 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:55:42 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 10 Sep 2019 15:55:42 +0000 Subject: [issue32972] unittest.TestCase coroutine support In-Reply-To: <1519843317.02.0.467229070634.issue32972@psf.upfronthosting.co.za> Message-ID: <1568130942.11.0.595542325563.issue32972@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I did an initial try at the documentation. I think most of the functions are very similar to the TestCase API and I just copied them to add the async related information. I guess it could be improved to keep the length down with still retaining the link to synchronous API. I added an example of a coroutine test case with the order of setup and teardown calls. I also realized during the docs that there is no async versions of class level setup and teardown calls. They are executed in a slightly different manner in unittest.suite module unlike per test setup and teardown. Is this an explicit decision to not support them? Is it worth documenting them? Feedback welcome. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:56:56 2019 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 10 Sep 2019 15:56:56 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568131016.88.0.431599410671.issue37531@roundup.psfhosted.org> Jeremy Kloth added the comment: Another day, another stuck test_concurrent_futures... https://buildbot.python.org/all/#/builders/40/builds/3030 The test process is again killed (line 568) but the processes from the multiprocess pool are still alive. Once I manually kill those pool processes, regrtest resumes as it should. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:57:11 2019 From: report at bugs.python.org (Andrew Frost) Date: Tue, 10 Sep 2019 15:57:11 +0000 Subject: [issue7982] extend captured_output to simulate different stdout.encoding In-Reply-To: <1266844157.92.0.671833558035.issue7982@psf.upfronthosting.co.za> Message-ID: <1568131031.43.0.297068976528.issue7982@roundup.psfhosted.org> Change by Andrew Frost : ---------- pull_requests: +15522 pull_request: https://github.com/python/cpython/pull/15881 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 11:58:38 2019 From: report at bugs.python.org (Pierre Glaser) Date: Tue, 10 Sep 2019 15:58:38 +0000 Subject: [issue38082] datetime.time object incorrectly shows associated date in strftime() output In-Reply-To: <1568099033.84.0.293529557755.issue38082@roundup.psfhosted.org> Message-ID: <1568131118.66.0.0112583764477.issue38082@roundup.psfhosted.org> Change by Pierre Glaser : ---------- pull_requests: +15523 pull_request: https://github.com/python/cpython/pull/15882 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 12:04:11 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 16:04:11 +0000 Subject: [issue37752] Redundant Py_CHARMASK called in some files In-Reply-To: <1564834217.7.0.242563409504.issue37752@roundup.psfhosted.org> Message-ID: <1568131451.18.0.442893699331.issue37752@roundup.psfhosted.org> Steve Dower added the comment: New changeset 2ec70102066fe5534f1a62e8f496d2005e1697db by Steve Dower (Jordon Xu) in branch 'master': bpo-37752: Delete redundant Py_CHARMASK in normalizestring() (GH-15095) https://github.com/python/cpython/commit/2ec70102066fe5534f1a62e8f496d2005e1697db ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 12:04:27 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 16:04:27 +0000 Subject: [issue37752] Redundant Py_CHARMASK called in some files In-Reply-To: <1564834217.7.0.242563409504.issue37752@roundup.psfhosted.org> Message-ID: <1568131467.05.0.747270084587.issue37752@roundup.psfhosted.org> Steve Dower added the comment: Thanks for the patch! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 12:06:28 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 16:06:28 +0000 Subject: [issue37574] Mention spec_from_loader() in Finder.find_spec() docs. In-Reply-To: <1562955391.43.0.163221688475.issue37574@roundup.psfhosted.org> Message-ID: <1568131588.87.0.203219490851.issue37574@roundup.psfhosted.org> Steve Dower added the comment: New changeset 9cbb97b29eac4b23e916a3233f26b60ac69e335b by Steve Dower (jdkandersson) in branch 'master': bpo-37574: Mention helper functions for find_spec documentation (GH-14739) https://github.com/python/cpython/commit/9cbb97b29eac4b23e916a3233f26b60ac69e335b ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 12:06:27 2019 From: report at bugs.python.org (Pierre Glaser) Date: Tue, 10 Sep 2019 16:06:27 +0000 Subject: [issue38092] environment variables not passed correctly using new virtualenv launching in windows and python3.7+ In-Reply-To: <1568122359.92.0.800539114246.issue38092@roundup.psfhosted.org> Message-ID: <1568131587.49.0.671511070005.issue38092@roundup.psfhosted.org> Change by Pierre Glaser : ---------- keywords: +patch pull_requests: +15524 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15883 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 12:06:34 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 16:06:34 +0000 Subject: [issue37574] Mention spec_from_loader() in Finder.find_spec() docs. In-Reply-To: <1562955391.43.0.163221688475.issue37574@roundup.psfhosted.org> Message-ID: <1568131594.17.0.850509835832.issue37574@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15525 pull_request: https://github.com/python/cpython/pull/15884 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 12:06:40 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 16:06:40 +0000 Subject: [issue37574] Mention spec_from_loader() in Finder.find_spec() docs. In-Reply-To: <1562955391.43.0.163221688475.issue37574@roundup.psfhosted.org> Message-ID: <1568131600.27.0.535311941152.issue37574@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15526 pull_request: https://github.com/python/cpython/pull/15885 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 12:07:51 2019 From: report at bugs.python.org (Sangeeta M Chauhan) Date: Tue, 10 Sep 2019 16:07:51 +0000 Subject: [issue38060] precedence (relational, logical operator)not working with single value In-Reply-To: <1568041705.58.0.756090980018.issue38060@roundup.psfhosted.org> Message-ID: Sangeeta M Chauhan added the comment: Sir, I was expecting that the precedence should be given to relational operator ( 7>"str") and according to that instead of printing 9 it should give error. On Mon, Sep 9, 2019 at 8:38 PM Tim Peters wrote: > > Tim Peters added the comment: > > @sangeetamchauhan, the reply you got in the image you attached was in > error - kind of. Section "6.16. Operator precedence" defines Python's > operator precedence: > > https://docs.python.org/3/reference/expressions.html#index-92 > > """ > The following table summarizes the operator precedence in Python, from > lowest precedence (least binding) to highest precedence (most binding). > """ > > As you can see there, "and" and "or" are very near the top of the table, > so bind very weakly - almost anything else on either side gets evaluated > first. In particular, all comparison operators bind more tightly than > "and" and "or". > > It's the bitwise operators (| & ^) that bind more tightly than comparisons. > > I asked at the start "What do you expect?" but you never answered. You > just keep repeating that it's wrong. Sorry, but I still have no idea what > you think "should" happen instead. > > As I also said the start, > > 9 or 7 > "str" > > groups as > > 9 or (7 > "str") > > exactly as the operator precedence table says it should, and returns 9, > exactly as the docs for "or" say it should do. > > What about that do you think is wrong? Please be very specific, and back > your answer with a reference to what the docs actually say. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 12:09:54 2019 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 10 Sep 2019 16:09:54 +0000 Subject: [issue28237] In xml.etree.ElementTree bytes tag or attributes raises on serialization In-Reply-To: <1474460355.16.0.102193673343.issue28237@psf.upfronthosting.co.za> Message-ID: <1568131794.86.0.658384922702.issue28237@roundup.psfhosted.org> Stefan Behnel added the comment: Arguably, writing out "b'x'" as attribute name instead of raising an exception isn't ideal. However, OTOH, I think it's reasonable to accept anything that is serialisable as a string, not just strings. That makes it difficult to draw a line. In any case, it's ok for ElementTree to not allow bytes in general. I'll close this issue, because I don't think it's worth being called a bug. ---------- nosy: +scoder resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 12:12:31 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 16:12:31 +0000 Subject: [issue38094] unneeded assignment to wb.len in PyBytes_Concat using buffer protocol In-Reply-To: <1568129056.61.0.163100885596.issue38094@roundup.psfhosted.org> Message-ID: <1568131951.29.0.533896680382.issue38094@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15527 pull_request: https://github.com/python/cpython/pull/15886 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 12:13:26 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 16:13:26 +0000 Subject: [issue38092] environment variables not passed correctly using new virtualenv launching in windows and python3.7+ In-Reply-To: <1568122359.92.0.800539114246.issue38092@roundup.psfhosted.org> Message-ID: <1568132006.72.0.556997895631.issue38092@roundup.psfhosted.org> Steve Dower added the comment: The difference is that launching sys._base_executable *without* __PYVENV_LAUNCHER__ set (because env is not being passed) should lose you access to anything installed into the venv. You may also need to import something from the venv in order to see the issue. Launching sys.executable will hit the launcher that sets the environment variable. Setting the environment correctly and launching sys._base_executable will also load correctly. The latter is theoretically required for correct handle sharing, but that may depend on which Windows version you're running. I'd like to see both changes in the PR. Just setting the environment variable doesn't really improve the situation at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 12:14:14 2019 From: report at bugs.python.org (Thomas Wouters) Date: Tue, 10 Sep 2019 16:14:14 +0000 Subject: [issue28494] is_zipfile false positives In-Reply-To: <1476997729.0.0.643464084789.issue28494@psf.upfronthosting.co.za> Message-ID: <1568132054.7.0.0925489537759.issue28494@roundup.psfhosted.org> Thomas Wouters added the comment: New changeset 3f4db4a0bab073b768fae958e93288bd5d24eadd by T. Wouters (Gregory P. Smith) in branch 'master': bpo-28494: Test existing zipfile working behavior. (GH-15853) https://github.com/python/cpython/commit/3f4db4a0bab073b768fae958e93288bd5d24eadd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 12:14:23 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 16:14:23 +0000 Subject: [issue38094] unneeded assignment to wb.len in PyBytes_Concat using buffer protocol In-Reply-To: <1568129056.61.0.163100885596.issue38094@roundup.psfhosted.org> Message-ID: <1568132063.63.0.690941319676.issue38094@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15528 pull_request: https://github.com/python/cpython/pull/15887 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 12:19:47 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 16:19:47 +0000 Subject: [issue38089] Make macOS tests optional on Azure Pipelines In-Reply-To: <1568120687.8.0.406819210697.issue38089@roundup.psfhosted.org> Message-ID: <1568132387.17.0.829456605159.issue38089@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +15529 pull_request: https://github.com/python/cpython/pull/15888 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 12:20:19 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 16:20:19 +0000 Subject: [issue38089] Make macOS tests optional on Azure Pipelines In-Reply-To: <1568120687.8.0.406819210697.issue38089@roundup.psfhosted.org> Message-ID: <1568132419.25.0.756304605568.issue38089@roundup.psfhosted.org> Steve Dower added the comment: New changeset cdce233f61349d029640b2dd2c0403e502050e39 by Steve Dower (Miss Islington (bot)) in branch '3.8': bpo-38089: Move Azure Pipelines to latest VM versions and make macOS tests optional (GH-15851) https://github.com/python/cpython/commit/cdce233f61349d029640b2dd2c0403e502050e39 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 12:21:16 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 16:21:16 +0000 Subject: [issue37574] Mention spec_from_loader() in Finder.find_spec() docs. In-Reply-To: <1562955391.43.0.163221688475.issue37574@roundup.psfhosted.org> Message-ID: <1568132476.63.0.927308767151.issue37574@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 12:28:03 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 16:28:03 +0000 Subject: [issue38081] Different behavior of os.path.realpath('nul') in 3.7 and 3.8 In-Reply-To: <1568097037.9.0.584511449633.issue38081@roundup.psfhosted.org> Message-ID: <1568132883.59.0.886615163919.issue38081@roundup.psfhosted.org> Steve Dower added the comment: What does pip use it for? Applying the below change avoids the exception, but produces \\.\nul as the result, which may or may not be any better. diff --git a/Lib/ntpath.py b/Lib/ntpath.py index 1d22d5f1dc..becfa20a83 100644 --- a/Lib/ntpath.py +++ b/Lib/ntpath.py @@ -537,7 +537,7 @@ else: except OSError as ex: # Stop on file (2) or directory (3) not found, or # paths that are not reparse points (4390) - if ex.winerror in (2, 3, 4390): + if ex.winerror in (1, 2, 3, 4390): break raise except ValueError: @@ -555,7 +555,7 @@ else: # Allow file (2) or directory (3) not found, invalid syntax (123), # and symlinks that cannot be followed (1921) - allowed_winerror = 2, 3, 123, 1921 + allowed_winerror = 2, 3, 87, 123, 1921 # Non-strict algorithm is to find as much of the target directory # as we can and join the rest. ---------- assignee: -> steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 12:28:16 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 16:28:16 +0000 Subject: [issue38081] Different behavior of os.path.realpath('nul') in 3.7 and 3.8 In-Reply-To: <1568097037.9.0.584511449633.issue38081@roundup.psfhosted.org> Message-ID: <1568132896.41.0.874772769462.issue38081@roundup.psfhosted.org> Change by Steve Dower : ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 12:34:04 2019 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Tue, 10 Sep 2019 16:34:04 +0000 Subject: [issue36781] Optimize sum() for bools In-Reply-To: <1556876973.98.0.990157093134.issue36781@roundup.psfhosted.org> Message-ID: <1568133244.63.0.823446854684.issue36781@roundup.psfhosted.org> Vedran ?a?i? added the comment: I don't think anything _bad_ can happen with that optimization, if it's already written. And people (me included) do like to write shorter expressions instead of longer ones. ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 12:44:20 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 10 Sep 2019 16:44:20 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568133860.92.0.544110559816.issue36373@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- pull_requests: +15530 pull_request: https://github.com/python/cpython/pull/15889 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 12:49:39 2019 From: report at bugs.python.org (Tim Peters) Date: Tue, 10 Sep 2019 16:49:39 +0000 Subject: [issue38060] precedence (relational, logical operator)not working with single value In-Reply-To: <1568000145.4.0.491367390087.issue38060@roundup.psfhosted.org> Message-ID: <1568134179.42.0.739555265669.issue38060@roundup.psfhosted.org> Tim Peters added the comment: Ah, so you were expecting an error! That helps. But that's not how the language works, or how it's documented to work, as has been explained in quite some detail already. In general, precedence _constrains_ evaluation order, but does not _define_ it. In Python or any other language. In 9 or 7 > "str" the precedence rules say the expression groups as 9 or (7 > "str") rather than as, say, (9 or 7) > "str" but says nothing more than just that. It's a very intentional - and documented - feature of "and" and "or" that they do NOT evaluate their right-hand operands at all if the result of evaluating the left-hand operand first is enough to settle the issue. The precedence rules only define what the "left-hand" and "right-hand" operand expressions _are_. I don't think the docs could be materially clearer about this. For example, from section "6.11. Boolean operations": """ The expression `x or y` first evaluates x; if x is true, its value is returned; otherwise, y is evaluated and the resulting value is returned. """ Precedence rules alone are too feeble to capture that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 13:04:39 2019 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 10 Sep 2019 17:04:39 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568135079.33.0.850858595992.issue36373@roundup.psfhosted.org> Yury Selivanov added the comment: (copying my GitHub message on this topic from https://github.com/python/cpython/pull/15889#issuecomment-530030002) I thought we were going to be more subtle about this. We have two scenarios: Somebody creates an instance of asyncio.Lock outside of a coroutine, also manually creating the loop, etc. In this case the user has to pass the lock argument. Somebody creates an instance of asyncio.Lock in a coroutine (that is, wheh asyncio.get_running_loop() returns a loop). In this case passing the loop argument is an error. The (1) approach is how people were used to writing asyncio programs before asyncio.run() (that was the only way actually). The (2) approach is how we want people to write asyncio programs. There's a subtle difference between things like asyncio.gather() and asyncio.Lock. Passing loop to the former is just nonsensical. Passing loop to the latter can be a valid thing, it's the (1). If we remove the loop parameter entirely from classes like asyncio.Lock we're making (1) impossible. I'm not sure that is what we are ready to do now. @asvetlov thoughts? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 13:05:10 2019 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 10 Sep 2019 17:05:10 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568135110.05.0.441771352075.issue36373@roundup.psfhosted.org> Change by Yury Selivanov : ---------- Removed message: https://bugs.python.org/msg351728 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 13:05:26 2019 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 10 Sep 2019 17:05:26 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568135126.07.0.260714515504.issue36373@roundup.psfhosted.org> Yury Selivanov added the comment: (copying my GitHub message on this topic from https://github.com/python/cpython/pull/15889#issuecomment-530030002) I thought we were going to be more subtle about this. We have two scenarios: 1. Somebody creates an instance of asyncio.Lock outside of a coroutine, also manually creating the loop, etc. In this case the user has to pass the lock argument. 2. Somebody creates an instance of asyncio.Lock in a coroutine (that is, wheh asyncio.get_running_loop() returns a loop). In this case passing the loop argument is an error. The (1) approach is how people were used to writing asyncio programs before asyncio.run() (that was the only way actually). The (2) approach is how we want people to write asyncio programs. There's a subtle difference between things like asyncio.gather() and asyncio.Lock. Passing loop to the former is just nonsensical. Passing loop to the latter can be a valid thing, it's the (1). If we remove the loop parameter entirely from classes like asyncio.Lock we're making (1) impossible. I'm not sure that is what we are ready to do now. @asvetlov thoughts? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 13:06:41 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 10 Sep 2019 17:06:41 +0000 Subject: [issue38089] Make macOS tests optional on Azure Pipelines In-Reply-To: <1568120687.8.0.406819210697.issue38089@roundup.psfhosted.org> Message-ID: <1568135201.73.0.928806413384.issue38089@roundup.psfhosted.org> Steve Dower added the comment: New changeset 6a494e77fc20543dcc33c1299b46ee6433d80019 by Steve Dower in branch '3.7': bpo-38089: Move Azure Pipelines to latest VM versions and make macOS tests optional (GH-15851) https://github.com/python/cpython/commit/6a494e77fc20543dcc33c1299b46ee6433d80019 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 13:10:11 2019 From: report at bugs.python.org (Zachary Ware) Date: Tue, 10 Sep 2019 17:10:11 +0000 Subject: [issue36901] Fix leaks in /PC/bdist_wininst/install.c In-Reply-To: <1557748667.87.0.123726768405.issue36901@roundup.psfhosted.org> Message-ID: <1568135411.49.0.177140431188.issue36901@roundup.psfhosted.org> Zachary Ware added the comment: Closing as "won't fix"; bdist_wininst has been deprecated in 3.8. ---------- nosy: +zach.ware resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 13:13:58 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 17:13:58 +0000 Subject: [issue37574] Mention spec_from_loader() in Finder.find_spec() docs. In-Reply-To: <1562955391.43.0.163221688475.issue37574@roundup.psfhosted.org> Message-ID: <1568135638.06.0.563157935228.issue37574@roundup.psfhosted.org> miss-islington added the comment: New changeset 63909cdc2ff4eec58cc2b56426f2c725ccd4ba2b by Miss Islington (bot) in branch '3.8': bpo-37574: Mention helper functions for find_spec documentation (GH-14739) https://github.com/python/cpython/commit/63909cdc2ff4eec58cc2b56426f2c725ccd4ba2b ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 13:16:06 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 17:16:06 +0000 Subject: [issue37574] Mention spec_from_loader() in Finder.find_spec() docs. In-Reply-To: <1562955391.43.0.163221688475.issue37574@roundup.psfhosted.org> Message-ID: <1568135766.48.0.243123802539.issue37574@roundup.psfhosted.org> miss-islington added the comment: New changeset e0a1561f93545f38034d6c48f21e79acfd4db04b by Miss Islington (bot) in branch '3.7': bpo-37574: Mention helper functions for find_spec documentation (GH-14739) https://github.com/python/cpython/commit/e0a1561f93545f38034d6c48f21e79acfd4db04b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 14:11:47 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 Sep 2019 18:11:47 +0000 Subject: [issue36781] Optimize sum() for bools In-Reply-To: <1556876973.98.0.990157093134.issue36781@roundup.psfhosted.org> Message-ID: <1568139107.0.0.809997890134.issue36781@roundup.psfhosted.org> Serhiy Storchaka added the comment: Well, it is good for people who already sum bools. But if you are concerned about microoptimization, sum(1 for ... if ...) can be better variant. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 14:14:24 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 Sep 2019 18:14:24 +0000 Subject: [issue37935] Improve performance of pathlib.scandir() In-Reply-To: <1566628301.14.0.386871182456.issue37935@roundup.psfhosted.org> Message-ID: <1568139264.27.0.353238837609.issue37935@roundup.psfhosted.org> Serhiy Storchaka added the comment: The title is misleading. There is no pathlib.scandir(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 14:20:11 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 Sep 2019 18:20:11 +0000 Subject: [issue37935] Improve performance of pathlib.scandir() In-Reply-To: <1566628301.14.0.386871182456.issue37935@roundup.psfhosted.org> Message-ID: <1568139611.06.0.510037180703.issue37935@roundup.psfhosted.org> Serhiy Storchaka added the comment: Any optimization can be accepted only when we have any prove that the change actually has measurable effect, and that it is large enough. Avoiding calling list() on the output of scandir() may be not harmless. For example it will left open a file descriptor. This can cause issues if walk a deep tree, especially if do this in few threads simultaneously. list() guaranties that it is open in very limited time (although using a context manager is desirable). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 14:58:40 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Tue, 10 Sep 2019 18:58:40 +0000 Subject: [issue33418] Memory leaks in functions In-Reply-To: <1525370063.61.0.682650639539.issue33418@psf.upfronthosting.co.za> Message-ID: <1568141920.56.0.711190229317.issue33418@roundup.psfhosted.org> Jeroen Demeyer added the comment: > It looks like a bug triggered on purpose. Absolutely. It's one of the many small issues that I found while working on PEP 590 and related things. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 15:10:54 2019 From: report at bugs.python.org (Ronan Lamy) Date: Tue, 10 Sep 2019 19:10:54 +0000 Subject: [issue38095] Multi-threaded circular import fails with _DeadlockError when using importlib Message-ID: <1568142654.85.0.849631704923.issue38095@roundup.psfhosted.org> New submission from Ronan Lamy : The IMPORT_NAME bytecode has a fast path calling PyImport_ImportModuleLevelObject() that behaves differently from importlib. In particular, test_circular_imports() in test_threaded_import.py fails due to a _DeadlockError if you replace some import statements with importlib.import_module() as in diff --git a/Lib/test/test_importlib/test_threaded_import.py b/Lib/test/test_importlib/test_threaded_import.py index d1f64c7..243d2c1 100644 --- a/Lib/test/test_importlib/test_threaded_import.py +++ b/Lib/test/test_importlib/test_threaded_import.py @@ -60,8 +60,12 @@ circular_imports_modules = { x = 'b' import D """, - 'C': """import B""", - 'D': """import A""", + 'C': """if 1: + import importlib + B = importlib.import_module('B')""", + 'D': """if 1: + import importlib + A = importlib.import_module('A')""", } ---------- components: Library (Lib) messages: 351738 nosy: Ronan.Lamy priority: normal severity: normal status: open title: Multi-threaded circular import fails with _DeadlockError when using importlib type: behavior versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 15:30:59 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 10 Sep 2019 19:30:59 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568143859.94.0.984958699305.issue36373@roundup.psfhosted.org> Andrew Svetlov added the comment: Answered in https://github.com/python/cpython/pull/15889 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 15:31:45 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 10 Sep 2019 19:31:45 +0000 Subject: [issue38043] small cleanups in Unicode normalization code In-Reply-To: <1567745214.3.0.712701659381.issue38043@roundup.psfhosted.org> Message-ID: <1568143905.98.0.71913661352.issue38043@roundup.psfhosted.org> Raymond Hettinger added the comment: This is mostly harmless but I'm concerned that we're encouraging a new Python developer to: * churn code in mostly minor ways, irrelevant to users * altering code long known to be stable, increasing the risk of introducing new bugs or performance changes * altering code in ways that are atypical for our code base (i.e. the bool type isn't a norm in our code, we mostly use int for that) * altering code without communicating with the developer who originally wrote that code (if they are still active) * consuming the time of reviewers when they could be working on known bugs, legitimate feature requests, or documentation * one-off or drive-by code alterations rather that what Guido calls "holistic refactoring" where we do clean-ups while understanding and thinking about the module as a whole and focusing on the user experience. * unfortunately, making lots of random, minor changes to a code base in a major project is an addictive experience and IMO it would be best to re-channel it early, particularly if the changes are motivated by "I like my style of coding more than that of the original contributor". Style changes are highly subjective and usually we defer to the original contributor who was closest to the problem being solved. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 15:39:39 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 10 Sep 2019 19:39:39 +0000 Subject: [issue32972] unittest.TestCase coroutine support In-Reply-To: <1519843317.02.0.467229070634.issue32972@psf.upfronthosting.co.za> Message-ID: <1568144379.0.0.183860498033.issue32972@roundup.psfhosted.org> Andrew Svetlov added the comment: Thanks! The test case re-creates a loop per test for the sake of test isolation (scheduled activities from test_a() don't interleave with test_b()). Unfortunately, on the class level level (setUpClass()/tearDownClass()) the loop doesn't exits. There are other reasons that prevent adding them properly, at least not in 3.8. Maybe later we can provide more rich support. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 17:00:58 2019 From: report at bugs.python.org (Tahia K) Date: Tue, 10 Sep 2019 21:00:58 +0000 Subject: [issue11664] Add patch method to unittest.TestCase In-Reply-To: <1300999439.71.0.376555102459.issue11664@psf.upfronthosting.co.za> Message-ID: <1568149258.57.0.186779103459.issue11664@roundup.psfhosted.org> Change by Tahia K : ---------- nosy: +ta1hia _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 17:01:25 2019 From: report at bugs.python.org (Tahia K) Date: Tue, 10 Sep 2019 21:01:25 +0000 Subject: [issue5714] http.server._url_collapse_path should live elsewhere In-Reply-To: <1239063845.81.0.120232947257.issue5714@psf.upfronthosting.co.za> Message-ID: <1568149285.0.0.0283275719807.issue5714@roundup.psfhosted.org> Change by Tahia K : ---------- nosy: +ta1hia _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 18:05:24 2019 From: report at bugs.python.org (Tim Peters) Date: Tue, 10 Sep 2019 22:05:24 +0000 Subject: [issue38096] Clean up the "struct sequence" / "named tuple" docs Message-ID: <1568153124.61.0.864461609465.issue38096@roundup.psfhosted.org> New submission from Tim Peters : The Glossary has this entry: """ struct sequence A tuple with named elements. Struct sequences expose an interface similar to named tuple in that elements can be accessed either by index or as an attribute. However, they do not have any of the named tuple methods like _make() or _asdict(). Examples of struct sequences include sys.float_info and the return value of os.stat(). """ It's trying to document the internal CPython implementation `structseq` detail, a class of which can only be created from the C API (no Python interface is exposed). But the glossary _also_ has an entry for "named tuple", and the docs just above are confusing that for the related but distinct `collections.namedtuple` facility, which does allow creating a named tuple class from Python, but is NOT the only kind of "named tuple". This is a mess ;-) I suggest: - Throw away the "struct sequence" glossary entry, and remove all references to it from the docs. - Use "named tuple" everywhere instead. - Clarify the "named tuple" docs to make clear that it applies to any class that supports tuple methods and also named elements. - Make clear that `collections.namedtuple` classes are "named tuples" classes, but not the only kind, and support a number of methods beyond what's required for "named tuples". - Optionally, effectively expose `structseq` to Python code, so that users have one obvious way to create their own bare-bones named tuple types. - I'd prefer to insist that for any named tuple class C, issubclass(C, tuple) is True. That's true now of structseqs and collections.namedtuples, and is a sane way to make clear that they must support all tuple methods. I'd mark this as "newcomer friendly", except it's likely to become a bikeshedding nightmare ;-) ---------- assignee: docs at python components: Documentation messages: 351742 nosy: docs at python, tim.peters priority: normal severity: normal status: open title: Clean up the "struct sequence" / "named tuple" docs versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 18:19:04 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 10 Sep 2019 22:19:04 +0000 Subject: [issue7982] extend captured_output to simulate different stdout.encoding In-Reply-To: <1266844157.92.0.671833558035.issue7982@psf.upfronthosting.co.za> Message-ID: <1568153944.04.0.0948191910643.issue7982@roundup.psfhosted.org> Raymond Hettinger added the comment: This seems like a reasonable idea and the PR looks good as well. Can you provide some examples where we would have used this in the current test suite? ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 18:20:13 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 10 Sep 2019 22:20:13 +0000 Subject: [issue38096] Clean up the "struct sequence" / "named tuple" docs In-Reply-To: <1568153124.61.0.864461609465.issue38096@roundup.psfhosted.org> Message-ID: <1568154013.03.0.847842829119.issue38096@roundup.psfhosted.org> Raymond Hettinger added the comment: +1 from me. I'd be happy to get this cleaned-up. Will work on a PR shortly. ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 18:20:42 2019 From: report at bugs.python.org (Tahia K) Date: Tue, 10 Sep 2019 22:20:42 +0000 Subject: [issue35784] document that hashlib.new takes kwargs In-Reply-To: <1547891512.78.0.551625258156.issue35784@roundup.psfhosted.org> Message-ID: <1568154042.26.0.910902544116.issue35784@roundup.psfhosted.org> Change by Tahia K : ---------- keywords: +patch pull_requests: +15531 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15890 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 18:23:02 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 22:23:02 +0000 Subject: [issue28494] is_zipfile false positives In-Reply-To: <1476997729.0.0.643464084789.issue28494@psf.upfronthosting.co.za> Message-ID: <1568154182.5.0.120162832176.issue28494@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15532 pull_request: https://github.com/python/cpython/pull/15891 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 18:23:22 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 10 Sep 2019 22:23:22 +0000 Subject: [issue11664] Add patch method to unittest.TestCase In-Reply-To: <1300999439.71.0.376555102459.issue11664@psf.upfronthosting.co.za> Message-ID: <1568154202.9.0.25693060676.issue11664@roundup.psfhosted.org> Raymond Hettinger added the comment: -1 I think mocking should be kept orthogonal to the unittest module. A person is free to use mocking with different testing tools like py.test or nose. Likewise, they are free to use a different mocking/patching tool than our standard library mock. In my mind, they are separate tools that should remain loosely coupled and should not cross-import one another. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 18:24:25 2019 From: report at bugs.python.org (ppperry) Date: Tue, 10 Sep 2019 22:24:25 +0000 Subject: [issue38084] multiprocessing cannot recover from crashed worker In-Reply-To: <1568105909.03.0.686404819271.issue38084@roundup.psfhosted.org> Message-ID: <1568154265.71.0.694387740611.issue38084@roundup.psfhosted.org> ppperry added the comment: Is this not a duplicate of issue22393? ---------- nosy: +ppperry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 18:26:31 2019 From: report at bugs.python.org (Tahia K) Date: Tue, 10 Sep 2019 22:26:31 +0000 Subject: [issue35784] document that hashlib.new takes kwargs In-Reply-To: <1547891512.78.0.551625258156.issue35784@roundup.psfhosted.org> Message-ID: <1568154391.82.0.708895322778.issue35784@roundup.psfhosted.org> Tahia K added the comment: Hello, I just submitted a small PR for this doc change, including the example provided by J?rn (thanks J?rn). ---------- nosy: +ta1hia _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 18:27:54 2019 From: report at bugs.python.org (Mann Jani) Date: Tue, 10 Sep 2019 22:27:54 +0000 Subject: [issue38097] cmd.Cmd: Allow other readline completion methods Message-ID: <1568154474.22.0.125293373456.issue38097@roundup.psfhosted.org> New submission from Mann Jani : readline has completion methods other than `complete` such as `menu-complete` or `menu-complete-backward` which behave differently. Currently Cmd class has hardcoded `complete` method to the completion key which means trying to use other methods is not possible in a derived class without re-implementing cmdloop, or using some other crazy workarounds. IMO Cmd.__init__ should take another argument named completionmethod with the default value of "complete" so that existing usage is not broken but it is possible to pass other values. ---------- components: Library (Lib) messages: 351748 nosy: mannjani priority: normal severity: normal status: open title: cmd.Cmd: Allow other readline completion methods type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 18:29:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Sep 2019 22:29:13 +0000 Subject: [issue28494] is_zipfile false positives In-Reply-To: <1476997729.0.0.643464084789.issue28494@psf.upfronthosting.co.za> Message-ID: <1568154553.81.0.972491424203.issue28494@roundup.psfhosted.org> STINNER Victor added the comment: x86 Gentoo Installed with X 3.x buildbot is unhappy: https://buildbot.python.org/all/#/builders/103/builds/3051 ====================================================================== ERROR: test_execute_zip2 (test.test_zipfile.TestExecutablePrependedZip) ---------------------------------------------------------------------- Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.9/test/test_zipfile.py", line 2502, in test_execute_zip2 output = subprocess.check_output([self.exe_zip, sys.executable]) File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.9/subprocess.py", line 411, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.9/subprocess.py", line 489, in run with Popen(*popenargs, **kwargs) as process: File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.9/subprocess.py", line 845, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.9/subprocess.py", line 1689, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'ziptestdata/exe_with_zip' ====================================================================== ERROR: test_execute_zip64 (test.test_zipfile.TestExecutablePrependedZip) ---------------------------------------------------------------------- Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.9/test/test_zipfile.py", line 2509, in test_execute_zip64 output = subprocess.check_output([self.exe_zip64, sys.executable]) File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.9/subprocess.py", line 411, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.9/subprocess.py", line 489, in run with Popen(*popenargs, **kwargs) as process: File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.9/subprocess.py", line 845, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.9/subprocess.py", line 1689, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'ziptestdata/exe_with_z64' ====================================================================== FAIL: test_read_zip64_with_exe_prepended (test.test_zipfile.TestExecutablePrependedZip) ---------------------------------------------------------------------- Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.9/test/test_zipfile.py", line 2496, in test_read_zip64_with_exe_prepended self._test_zip_works(self.exe_zip64) File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.9/test/test_zipfile.py", line 2484, in _test_zip_works self.assertTrue(zipfile.is_zipfile(name), AssertionError: False is not true : is_zipfile failed on ziptestdata/exe_with_z64 ====================================================================== FAIL: test_read_zip_with_exe_prepended (test.test_zipfile.TestExecutablePrependedZip) ---------------------------------------------------------------------- Traceback (most recent call last): File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.9/test/test_zipfile.py", line 2493, in test_read_zip_with_exe_prepended self._test_zip_works(self.exe_zip) File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.9/test/test_zipfile.py", line 2484, in _test_zip_works self.assertTrue(zipfile.is_zipfile(name), AssertionError: False is not true : is_zipfile failed on ziptestdata/exe_with_zip ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 18:37:33 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 10 Sep 2019 22:37:33 +0000 Subject: [issue28494] is_zipfile false positives In-Reply-To: <1476997729.0.0.643464084789.issue28494@psf.upfronthosting.co.za> Message-ID: <1568155053.56.0.411807148553.issue28494@roundup.psfhosted.org> Gregory P. Smith added the comment: The new ziptestdata/ subdir appears to not be part of the install that make install does. :/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 18:44:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Sep 2019 22:44:59 +0000 Subject: [issue28494] is_zipfile false positives In-Reply-To: <1476997729.0.0.643464084789.issue28494@psf.upfronthosting.co.za> Message-ID: <1568155499.04.0.924167262873.issue28494@roundup.psfhosted.org> STINNER Victor added the comment: > The new ziptestdata/ subdir appears to not be part of the install that make install does. :/ It seems like Lib/test/eintrdata/ (for example) is installed using LIBSUBDIRS variable in Makefile.pre.in. Note: The Windows installer copies recursively Lib/test/ and subdirectories: see in Tools/msi/test/test.wixproj. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 18:45:53 2019 From: report at bugs.python.org (Davin Potts) Date: Tue, 10 Sep 2019 22:45:53 +0000 Subject: [issue38084] multiprocessing cannot recover from crashed worker In-Reply-To: <1568105909.03.0.686404819271.issue38084@roundup.psfhosted.org> Message-ID: <1568155553.82.0.333401953801.issue38084@roundup.psfhosted.org> Davin Potts added the comment: Agreed with @ppperry that this is a duplicate of issue22393. The proposed patch in issue22393 is, for the moment, out of sync with more recent changes. That patch's approach would result in the loss of all partial results from a Pool.map, but it may be faster to update and review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 18:49:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Sep 2019 22:49:35 +0000 Subject: [issue38084] multiprocessing cannot recover from crashed worker In-Reply-To: <1568105909.03.0.686404819271.issue38084@roundup.psfhosted.org> Message-ID: <1568155775.75.0.637666422782.issue38084@roundup.psfhosted.org> STINNER Victor added the comment: > Agreed with @ppperry that this is a duplicate of issue22393. Ok, in that case I close this issue as a duplicate of bpo-22393. There is no need to duplicate the discussion here :-) ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> multiprocessing.Pool shouldn't hang forever if a worker process dies unexpectedly _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 18:50:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 10 Sep 2019 22:50:04 +0000 Subject: [issue22393] multiprocessing.Pool shouldn't hang forever if a worker process dies unexpectedly In-Reply-To: <1410474786.78.0.264797717105.issue22393@psf.upfronthosting.co.za> Message-ID: <1568155804.1.0.87430737592.issue22393@roundup.psfhosted.org> STINNER Victor added the comment: I just marked bpo-38084 as duplicate of this issue. I manually merged the nosy lists. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 18:57:59 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 10 Sep 2019 22:57:59 +0000 Subject: [issue28494] is_zipfile false positives In-Reply-To: <1476997729.0.0.643464084789.issue28494@psf.upfronthosting.co.za> Message-ID: <1568156279.46.0.40407399158.issue28494@roundup.psfhosted.org> miss-islington added the comment: New changeset 74b0291b03db60dd244d31e9c97407cccb8d30dd by Miss Islington (bot) in branch '3.8': bpo-28494: Test existing zipfile working behavior. (GH-15853) https://github.com/python/cpython/commit/74b0291b03db60dd244d31e9c97407cccb8d30dd ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 19:03:27 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 10 Sep 2019 23:03:27 +0000 Subject: [issue37935] Improve performance of pathlib.scandir() In-Reply-To: <1566628301.14.0.386871182456.issue37935@roundup.psfhosted.org> Message-ID: <1568156607.65.0.470224335264.issue37935@roundup.psfhosted.org> Gregory P. Smith added the comment: For some context here, the pathlib scandir code was written by Serhiy in https://bugs.python.org/issue26032 and related commit https://github.com/python/cpython/commit/680cb152c5d220a74321fa905d4fc91bdec40fbb. > Any optimization can be accepted only when we have any prove that the change actually has measurable effect, and that it is large enough. While often good advice, there is no such blanket policy. Saying that comes across as dismissive. A better way to phrase such a statement is as a question: In what practical scenarios does this change provide a demonstrable benefit? The improvement in this case could be avoiding an explosion of memory use in some circumstances. Depending on the particular filesystem. (the original reason based on real world production experience that I pushed to have our os.scandir API created in the first place) > Avoiding calling list() on the output of scandir() may be not harmless. Keeping it may not be harmless either. :) One key point of os.scandir() is to be iterated over instead of turned into a list to avoid using too much memory. Code that requires a list could've just called listdir() (as the previous code did in both of these places) - if that is intentional, we should include an explicit comment stating why a preloaded list was intentional. Either these list calls go away as is natural with scandir, or comments should be added explaining why they are important (related: unittests exercising the situations they are important for would be ideal) As you're the original author of the pathlib scandir code, do you remember what the intent of these list(scandir) calls was? One potential difference without them: If someone is selecting via pathlib and modifying directory file contents while iterating over the results, the lists may be important. (what happens in this case presumably depends on the underlying os fs implementation) It sounds like we don't have test cases covering such scenarios. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 19:30:52 2019 From: report at bugs.python.org (Spandan Garg) Date: Tue, 10 Sep 2019 23:30:52 +0000 Subject: [issue38098] Special Characters Don't Work When Using Virtual Environment Message-ID: <1568158252.04.0.0991697281074.issue38098@roundup.psfhosted.org> New submission from Spandan Garg : Recently, I noticed that whenever I execute python from inside a virtual environment, I can't seem to write special characters into the shell. Although, when I exit the virtual environment, this issue no longer occurs. I've confirmed that the versions of python inside and outside the virtual environment are the same. For example, when I paste the string 'doesn?t' (with the Unicode apostrophe) into the shell without virtual environment, I get the following: >>> doesn?t # without virtual environment When I paste the same string into the shell with a virtual environment active (and the same version of python), I get the following: >>> doesnt # with virtual environment The version of python I am using is python 3.7.4 (though I have reproduced this on python 3.6.5 as well). I am creating the virtual environments using the venv module. Also, I think that this problem only happens on Windows as I couldn?t reproduce it on Linux. Does anyone know why this may be happening? Please let me know if I should provide any other details. ---------- components: Unicode messages: 351757 nosy: ezio.melotti, glGarg, vstinner priority: normal severity: normal status: open title: Special Characters Don't Work When Using Virtual Environment type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 19:54:36 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 10 Sep 2019 23:54:36 +0000 Subject: [issue38060] precedence (relational, logical operator)not working with single value In-Reply-To: <1568134179.42.0.739555265669.issue38060@roundup.psfhosted.org> Message-ID: <20190910235430.GU6274@ando.pearwood.info> Steven D'Aprano added the comment: I think that the problem is that the precedence table may be technically correct, but it doesn't describe the actual behaviour of expressions including the boolean operators ``or`` and ``and`` for exactly the reason Tim gives: > Precedence rules alone are too feeble to capture that. If I didn't know that boolean operators short-circuited, I too would have expected that an expression like ``9 or 7 < "str"`` would have raised an exception. The documentation (precedence table) isn't wrong, it's just incomplete. The information needed exists, but it is elsewhere, and if you don't already know it, you don't know that you need to look for it. I think that the precedence table could do with a footnote on the two boolean operators describing their interaction with short-circuiting behaviour and linking back to the relevant section 6.11. https://docs.python.org/3/reference/expressions.html#boolean-operations ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 21:32:47 2019 From: report at bugs.python.org (Anselmo Melo) Date: Wed, 11 Sep 2019 01:32:47 +0000 Subject: [issue34155] [CVE-2019-16056] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1568165567.35.0.797790522665.issue34155@roundup.psfhosted.org> Change by Anselmo Melo : ---------- nosy: +Anselmo Melo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 10 23:17:52 2019 From: report at bugs.python.org (Tim Peters) Date: Wed, 11 Sep 2019 03:17:52 +0000 Subject: [issue38060] precedence (relational, logical operator)not working with single value In-Reply-To: <1568000145.4.0.491367390087.issue38060@roundup.psfhosted.org> Message-ID: <1568171872.8.0.633185569877.issue38060@roundup.psfhosted.org> Tim Peters added the comment: I don't believe that would improve the docs, but suit yourself. This is hardly a FAQ, but instead a peculiar case where, for whatever reason, someone is saying "I'm puzzled by what `or` does, but didn't read the docs for `or`". Most people confused by `or` almost certainly _do_ read the docs for `or` ;-) As is, in the precedence table the word "or" is already a direct hyperlink to the section _about_ "or", and similarly for "and". It can't be made any easier than that to find the whole story. If you do want to pursue adding more cruft to the docs, note that the same would be needed for the `- if - else -` operator too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 01:12:51 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 11 Sep 2019 05:12:51 +0000 Subject: [issue37445] Some FormatMessageW() calls use FORMAT_MESSAGE_FROM_SYSTEM without FORMAT_MESSAGE_IGNORE_INSERTS In-Reply-To: <1561766338.66.0.394752973171.issue37445@roundup.psfhosted.org> Message-ID: <1568178771.04.0.469783463252.issue37445@roundup.psfhosted.org> Zackery Spytz added the comment: Hi, Steve. I've created a backport for 2.7 (PR 15822). Please take a look. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 01:16:25 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 11 Sep 2019 05:16:25 +0000 Subject: [issue29171] blake2: Remove unused function to avoid undefined references In-Reply-To: <1483655931.95.0.807787917048.issue29171@psf.upfronthosting.co.za> Message-ID: <1568178985.44.0.985996120111.issue29171@roundup.psfhosted.org> Zackery Spytz added the comment: It seems that this was fixed as part of bpo-37055 / b27cbec801e17a13d7fef49116a8fc279930d2b1. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 01:16:31 2019 From: report at bugs.python.org (Eddie Elizondo) Date: Wed, 11 Sep 2019 05:16:31 +0000 Subject: [issue35381] posixmodule: convert statically allocated types (DirEntryType & ScandirIteratorType) to heap-allocated types In-Reply-To: <1543818839.39.0.788709270274.issue35381@psf.upfronthosting.co.za> Message-ID: <1568178991.9.0.137578470664.issue35381@roundup.psfhosted.org> Change by Eddie Elizondo : ---------- pull_requests: +15533 pull_request: https://github.com/python/cpython/pull/15892 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 01:21:06 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 11 Sep 2019 05:21:06 +0000 Subject: [issue25753] Reference leaks in test_smtplib In-Reply-To: <1448660464.47.0.968238224363.issue25753@psf.upfronthosting.co.za> Message-ID: <1568179266.35.0.16581746167.issue25753@roundup.psfhosted.org> Zackery Spytz added the comment: I cannot reproduce these leaks. I think this issue should be closed. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 01:26:57 2019 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 11 Sep 2019 05:26:57 +0000 Subject: [issue36869] Avoid warning of unused variables In-Reply-To: <1557447073.75.0.208623856666.issue36869@roundup.psfhosted.org> Message-ID: <1568179617.5.0.951580980543.issue36869@roundup.psfhosted.org> Zackery Spytz added the comment: PR 13182 has been merged, so I think this issue should be closed. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 01:30:38 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 11 Sep 2019 05:30:38 +0000 Subject: [issue36869] Avoid warning of unused variables In-Reply-To: <1557447073.75.0.208623856666.issue36869@roundup.psfhosted.org> Message-ID: <1568179838.49.0.57326461278.issue36869@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 01:59:43 2019 From: report at bugs.python.org (=?utf-8?b?0JDQu9C10LrRgdCw0L3QtNGAINCh0LXQvNC10L3QvtCy?=) Date: Wed, 11 Sep 2019 05:59:43 +0000 Subject: [issue38081] Different behavior of os.path.realpath('nul') in 3.7 and 3.8 In-Reply-To: <1568097037.9.0.584511449633.issue38081@roundup.psfhosted.org> Message-ID: <1568181583.94.0.384008309421.issue38081@roundup.psfhosted.org> ????????? ??????? added the comment: setuptools/sandbox.py: class DirectorySandbox(AbstractSandbox): """Restrict operations to a single subdirectory - pseudo-chroot""" When running user scripts it uses os.path.realpath(os.devnull) to include 'normalized' devnull to the allowed list of files in pseudo-chroot. Yes, suggested patch returns realpath behavior from 3.7 and packages installs normally. C:\Users\User\Downloads>py -3.7 -c "import os.path;print(os.path.realpath('nul'))" \\.\nul C:\Users\User\Downloads>py -3.8 -c "import os.path;print(os.path.realpath('nul'))" \\.\nul I think it must be included in 3.8 or windows users will get installation problems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 02:13:07 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Wed, 11 Sep 2019 06:13:07 +0000 Subject: [issue37969] Correct urllib.parse functions dropping the delimiters of empty URI components In-Reply-To: <1567004091.58.0.0475239472757.issue37969@roundup.psfhosted.org> Message-ID: <1568182387.79.0.716565045357.issue37969@roundup.psfhosted.org> Change by G?ry : ---------- title: urllib.parse functions reporting false equivalent URIs -> Correct urllib.parse functions dropping the delimiters of empty URI components _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 02:21:11 2019 From: report at bugs.python.org (Reed) Date: Wed, 11 Sep 2019 06:21:11 +0000 Subject: [issue38099] __dict__ attribute is incorrectly stated to be read-only Message-ID: <1568182871.44.0.335247784266.issue38099@roundup.psfhosted.org> New submission from Reed : The documentation in this section (https://docs.python.org/3/library/stdtypes.html#special-attributes) states that the __dict__ attribute, and several others, are read-only. In particular, it states: "The implementation adds a few special read-only attributes to several object types, where they are relevant." Then it lists several attributes, including __dict__. However, __dict__ is writable. For example: class A: pass A().__dict__ = {'x': 1} Most other listed attributes, such as __class__ and __name__, are writable as well. They should not be documented as read-only. (Also, I'm not sure why the documentation lists object.__dict__ and instance.__class__. What is the difference between an object and an instance?) ---------- assignee: docs at python components: Documentation messages: 351765 nosy: docs at python, reed priority: normal severity: normal status: open title: __dict__ attribute is incorrectly stated to be read-only type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 02:44:42 2019 From: report at bugs.python.org (Carol Willing) Date: Wed, 11 Sep 2019 06:44:42 +0000 Subject: [issue38034] Typo on logging.handlers.QueueListener documentation In-Reply-To: <1567646582.17.0.242396034373.issue38034@roundup.psfhosted.org> Message-ID: <1568184282.57.0.482472184252.issue38034@roundup.psfhosted.org> Carol Willing added the comment: New changeset efd5741ae953e50a6654e04cf731da86a1307296 by Carol Willing (wwuck) in branch 'master': bpo-38034: Fix typo in logging.handlers.rst (GH-15708) https://github.com/python/cpython/commit/efd5741ae953e50a6654e04cf731da86a1307296 ---------- nosy: +willingc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 02:44:49 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 06:44:49 +0000 Subject: [issue38034] Typo on logging.handlers.QueueListener documentation In-Reply-To: <1567646582.17.0.242396034373.issue38034@roundup.psfhosted.org> Message-ID: <1568184289.3.0.995057308815.issue38034@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15534 pull_request: https://github.com/python/cpython/pull/15893 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 02:44:56 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 06:44:56 +0000 Subject: [issue38034] Typo on logging.handlers.QueueListener documentation In-Reply-To: <1567646582.17.0.242396034373.issue38034@roundup.psfhosted.org> Message-ID: <1568184296.02.0.573606886324.issue38034@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15535 pull_request: https://github.com/python/cpython/pull/15894 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 02:56:13 2019 From: report at bugs.python.org (Carol Willing) Date: Wed, 11 Sep 2019 06:56:13 +0000 Subject: [issue38034] Typo on logging.handlers.QueueListener documentation In-Reply-To: <1567646582.17.0.242396034373.issue38034@roundup.psfhosted.org> Message-ID: <1568184973.5.0.0194806690419.issue38034@roundup.psfhosted.org> Carol Willing added the comment: New changeset f357cd022ec82a4099ac7a09047d2b556a1c91ec by Carol Willing (Miss Islington (bot)) in branch '3.8': bpo-38034: Fix typo in logging.handlers.rst (GH-15708) (GH-15893) https://github.com/python/cpython/commit/f357cd022ec82a4099ac7a09047d2b556a1c91ec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 02:56:52 2019 From: report at bugs.python.org (Carol Willing) Date: Wed, 11 Sep 2019 06:56:52 +0000 Subject: [issue38034] Typo on logging.handlers.QueueListener documentation In-Reply-To: <1567646582.17.0.242396034373.issue38034@roundup.psfhosted.org> Message-ID: <1568185012.91.0.0886055754574.issue38034@roundup.psfhosted.org> Carol Willing added the comment: New changeset 2a8560ae99213954158789b9dd7275b8ffa2086a by Carol Willing (Miss Islington (bot)) in branch '3.7': bpo-38034: Fix typo in logging.handlers.rst (GH-15708) (GH-15894) https://github.com/python/cpython/commit/2a8560ae99213954158789b9dd7275b8ffa2086a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 03:15:58 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 11 Sep 2019 07:15:58 +0000 Subject: [issue38096] Clean up the "struct sequence" / "named tuple" docs In-Reply-To: <1568153124.61.0.864461609465.issue38096@roundup.psfhosted.org> Message-ID: <1568186158.84.0.0599298828649.issue38096@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +15536 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15895 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 04:12:03 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 11 Sep 2019 08:12:03 +0000 Subject: [issue11664] Add patch method to unittest.TestCase In-Reply-To: <1300999439.71.0.376555102459.issue11664@psf.upfronthosting.co.za> Message-ID: <1568189523.15.0.976405111623.issue11664@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I concur with Raymond here. Since mock is also part of stdlib and this issue predates mock being merged to stdlib. I think adding it to unittest sort of expands the unittest API being just an alias to mock.patch. mock.patch is used in lot of places and has a good adoption as plain function, decorator and context manager. This would also mean explaining people why there is mock.patch and TestCase.patch in docs too. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 04:20:27 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 08:20:27 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568190027.43.0.218561224136.issue36373@roundup.psfhosted.org> miss-islington added the comment: New changeset 7264e92b718d307cc499b2f10eab7644b00f0499 by Miss Islington (bot) (Andrew Svetlov) in branch 'master': bpo-36373: Fix deprecation warnings (GH-15889) https://github.com/python/cpython/commit/7264e92b718d307cc499b2f10eab7644b00f0499 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 04:20:54 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 08:20:54 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568190054.05.0.63264824989.issue36373@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15537 pull_request: https://github.com/python/cpython/pull/15896 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 04:57:58 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 11 Sep 2019 08:57:58 +0000 Subject: [issue38099] __dict__ attribute is incorrectly stated to be read-only In-Reply-To: <1568182871.44.0.335247784266.issue38099@roundup.psfhosted.org> Message-ID: <1568192278.26.0.984037092262.issue38099@roundup.psfhosted.org> Steven D'Aprano added the comment: "The implementation adds a few special read-only attributes to several object TYPES" [emphasis added] py> class MyType: ... pass ... py> MyType.__dict__ = {} Traceback (most recent call last): File "", line 1, in AttributeError: attribute '__dict__' of 'type' objects is not writable > What is the difference between an object and an instance? In general, nothing. But ``object.__dict__`` refers to the special builtin *class* called "object". In hindsight, we should have called it Object, so we could more easily distinguish between the *class* called "object" and *instances* of that class. py> print(object) # the class/type itself py> print(object()) # an instance of object The docs are correct here, but if you care to suggest some improvements, we will consider them. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:01:27 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 11 Sep 2019 09:01:27 +0000 Subject: [issue38034] Typo on logging.handlers.QueueListener documentation In-Reply-To: <1567646582.17.0.242396034373.issue38034@roundup.psfhosted.org> Message-ID: <1568192487.21.0.835995190691.issue38034@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:02:34 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 11 Sep 2019 09:02:34 +0000 Subject: [issue38099] __dict__ attribute is incorrectly stated to be read-only In-Reply-To: <1568182871.44.0.335247784266.issue38099@roundup.psfhosted.org> Message-ID: <1568192554.39.0.237753294228.issue38099@roundup.psfhosted.org> Steven D'Aprano added the comment: Oh, another point... Python is a little more complicated than some other languages, like Java, because Python classes (types) are themselves instances (objects) of yet another class (the so called "metaclass"). Ultimately, all classes are instances of the special metaclass called "type". So all instances are objects, and all classes are also objects. This is really powerful and useful, but it does sometimes make it hard to talk about things :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:09:57 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Sep 2019 09:09:57 +0000 Subject: [issue29171] blake2: Remove unused function to avoid undefined references In-Reply-To: <1483655931.95.0.807787917048.issue29171@psf.upfronthosting.co.za> Message-ID: <1568192997.0.0.102020579734.issue29171@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Numerous warnings with blake2 module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:16:07 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 09:16:07 +0000 Subject: [issue38089] Make macOS tests optional on Azure Pipelines In-Reply-To: <1568120687.8.0.406819210697.issue38089@roundup.psfhosted.org> Message-ID: <1568193367.13.0.246110893561.issue38089@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:17:17 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 11 Sep 2019 09:17:17 +0000 Subject: [issue37879] Segfaults in C heap type subclasses In-Reply-To: <1566074851.0.0.451710928537.issue37879@roundup.psfhosted.org> Message-ID: <1568193437.08.0.766173544983.issue37879@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset ff023ed36ea260ab64be5895f1f1f087c798987a by Petr Viktorin (Eddie Elizondo) in branch 'master': bpo-37879: Suppress subtype_dealloc decref when base type is a C heap type (GH-15323) https://github.com/python/cpython/commit/ff023ed36ea260ab64be5895f1f1f087c798987a ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:19:08 2019 From: report at bugs.python.org (Paul Ganssle) Date: Wed, 11 Sep 2019 09:19:08 +0000 Subject: [issue36960] Make datetime docs more user-friendly In-Reply-To: <1558210678.84.0.258939294256.issue36960@roundup.psfhosted.org> Message-ID: <1568193548.35.0.4956515155.issue36960@roundup.psfhosted.org> Paul Ganssle added the comment: New changeset 3fb1363fe87a24cdb2ee1dd9746f1c49046af958 by Paul Ganssle (Brad) in branch 'master': Overhaul datetime documentation (GH-13410) https://github.com/python/cpython/commit/3fb1363fe87a24cdb2ee1dd9746f1c49046af958 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:23:08 2019 From: report at bugs.python.org (Thomas Wouters) Date: Wed, 11 Sep 2019 09:23:08 +0000 Subject: [issue37424] subprocess.run timeout does not function if shell=True and capture_output=True In-Reply-To: <1561618790.88.0.611701645761.issue37424@roundup.psfhosted.org> Message-ID: <1568193788.18.0.256694403099.issue37424@roundup.psfhosted.org> Thomas Wouters added the comment: New changeset 580d2782f70f8e0bed7ec20abb03d740cb83b5da by T. Wouters (Gregory P. Smith) in branch 'master': bpo-37424: Avoid a hang in subprocess.run timeout output capture (GH-14490) https://github.com/python/cpython/commit/580d2782f70f8e0bed7ec20abb03d740cb83b5da ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:23:18 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 09:23:18 +0000 Subject: [issue37424] subprocess.run timeout does not function if shell=True and capture_output=True In-Reply-To: <1561618790.88.0.611701645761.issue37424@roundup.psfhosted.org> Message-ID: <1568193798.48.0.211312468778.issue37424@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch pull_requests: +15538 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15897 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:23:25 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 09:23:25 +0000 Subject: [issue37424] subprocess.run timeout does not function if shell=True and capture_output=True In-Reply-To: <1561618790.88.0.611701645761.issue37424@roundup.psfhosted.org> Message-ID: <1568193805.21.0.58831960957.issue37424@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15539 pull_request: https://github.com/python/cpython/pull/15898 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:24:48 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 09:24:48 +0000 Subject: [issue38081] Different behavior of os.path.realpath('nul') in 3.7 and 3.8 In-Reply-To: <1568097037.9.0.584511449633.issue38081@roundup.psfhosted.org> Message-ID: <1568193888.49.0.717655570142.issue38081@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +15540 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15899 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:25:16 2019 From: report at bugs.python.org (Paul Ganssle) Date: Wed, 11 Sep 2019 09:25:16 +0000 Subject: [issue36960] Make datetime docs more user-friendly In-Reply-To: <1558210678.84.0.258939294256.issue36960@roundup.psfhosted.org> Message-ID: <1568193916.3.0.331487158117.issue36960@roundup.psfhosted.org> Change by Paul Ganssle : ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:25:29 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 11 Sep 2019 09:25:29 +0000 Subject: [issue37936] gitignore file is too broad In-Reply-To: <1566630912.92.0.00349300289224.issue37936@roundup.psfhosted.org> Message-ID: <1568193929.81.0.675252367637.issue37936@roundup.psfhosted.org> Zachary Ware added the comment: New changeset 455122a0094c8cfdf7e062eccc5e5b5885c75e8b by Zachary Ware (Greg Price) in branch 'master': bpo-37936: Systematically distinguish rooted vs. unrooted in .gitignore (GH-15823) https://github.com/python/cpython/commit/455122a0094c8cfdf7e062eccc5e5b5885c75e8b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:29:23 2019 From: report at bugs.python.org (Christian Heimes) Date: Wed, 11 Sep 2019 09:29:23 +0000 Subject: [issue35784] document that hashlib.new takes kwargs In-Reply-To: <1547891512.78.0.551625258156.issue35784@roundup.psfhosted.org> Message-ID: <1568194163.53.0.502544128533.issue35784@roundup.psfhosted.org> Christian Heimes added the comment: Thanks for the bug report. While you are technically correct, I would like to hold off on this change for a bit more. I plan to replace our internal vendored copies of sha3 and blake2 with OpenSSL code. OpenSSL 1.1.1 has some of the new required APIs. OpenSSL 3.0.0-dev is currently adding more but with slightly different semantic. For example OpenSSL does not have blake2b, but blake2b512 for hashing and blake2bmac for keyed hashing with salting and personalization. I like to get integration with OpenSSL right until hashlib.new() is officially documented. ---------- assignee: docs at python -> christian.heimes versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:32:41 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 11 Sep 2019 09:32:41 +0000 Subject: [issue37936] gitignore file is too broad In-Reply-To: <1566630912.92.0.00349300289224.issue37936@roundup.psfhosted.org> Message-ID: <1568194361.98.0.183023270892.issue37936@roundup.psfhosted.org> Change by Zachary Ware : ---------- pull_requests: +15541 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/15900 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:34:36 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 11 Sep 2019 09:34:36 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568194476.77.0.966635202519.issue36373@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- pull_requests: +15542 pull_request: https://github.com/python/cpython/pull/15901 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:36:55 2019 From: report at bugs.python.org (Lisa Roach) Date: Wed, 11 Sep 2019 09:36:55 +0000 Subject: [issue38100] Spelling error in unittest.mock code Message-ID: <1568194615.26.0.336032437884.issue38100@roundup.psfhosted.org> New submission from Lisa Roach : Good first issue. There is a spelling error in the unittest.mock library, "return_calulator" should be "return_calculator". This is in the `_set_return_value` method in `Lib/unittest/mock.py`. ---------- components: Library (Lib) keywords: easy, newcomer friendly messages: 351778 nosy: lisroach priority: low severity: normal status: open title: Spelling error in unittest.mock code _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:38:15 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 11 Sep 2019 09:38:15 +0000 Subject: [issue37936] gitignore file is too broad In-Reply-To: <1566630912.92.0.00349300289224.issue37936@roundup.psfhosted.org> Message-ID: <1568194695.45.0.916939291817.issue37936@roundup.psfhosted.org> Zachary Ware added the comment: Ok, now it's done :) Thanks, Greg. ---------- stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:38:49 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 09:38:49 +0000 Subject: [issue37993] os.path.realpath on Windows resolves mapped network drives In-Reply-To: <1567238675.05.0.269696747191.issue37993@roundup.psfhosted.org> Message-ID: <1568194729.64.0.438168238588.issue37993@roundup.psfhosted.org> Steve Dower added the comment: I'm closing this as not a bug. It's a few steps deep, but DefineDosDeviceW() [1] specifies that it creates junctions, and while it's not necessarily obvious how to get from SUBST to that page, Wikipedia managed it [2]. And I don't think it's unreasonable to expect people to either think about this really shallowly ("realpath will find the real path") or really deeply ("let me research every aspect to find the true answer") and avoid over-specifying the behaviour in our own documentation. "MS-DOS device names are stored as junctions in the object namespace. The code that converts an MS-DOS path into a corresponding path uses these junctions to map MS-DOS devices and drive letters. The DefineDosDevice function enables an application to modify the junctions used to implement the MS-DOS device namespace." [1]: https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-definedosdevicew [2]: https://en.wikipedia.org/wiki/SUBST ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:39:29 2019 From: report at bugs.python.org (Lisa Roach) Date: Wed, 11 Sep 2019 09:39:29 +0000 Subject: [issue38101] Update devguide triaging keywords Message-ID: <1568194769.69.0.909868564617.issue38101@roundup.psfhosted.org> New submission from Lisa Roach : Currently the devguide triaging keywords page is out of date: https://devguide.python.org/triaging/#keywords It is missing keywords like "easy (C)", "security_issue", and "pep3121". ---------- assignee: docs at python components: Documentation keywords: easy messages: 351781 nosy: docs at python, lisroach priority: normal severity: normal status: open title: Update devguide triaging keywords _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:39:38 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 09:39:38 +0000 Subject: [issue37445] Some FormatMessageW() calls use FORMAT_MESSAGE_FROM_SYSTEM without FORMAT_MESSAGE_IGNORE_INSERTS In-Reply-To: <1561766338.66.0.394752973171.issue37445@roundup.psfhosted.org> Message-ID: <1568194778.18.0.750551106758.issue37445@roundup.psfhosted.org> Steve Dower added the comment: New changeset 289c5ea7737e44e3b150532b3498e3d3d4c70d99 by Steve Dower (Zackery Spytz) in branch '2.7': bpo-37445: Include FORMAT_MESSAGE_IGNORE_INSERTS in FormatMessageW() calls (GH-15822) https://github.com/python/cpython/commit/289c5ea7737e44e3b150532b3498e3d3d4c70d99 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:39:49 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 09:39:49 +0000 Subject: [issue37445] Some FormatMessageW() calls use FORMAT_MESSAGE_FROM_SYSTEM without FORMAT_MESSAGE_IGNORE_INSERTS In-Reply-To: <1561766338.66.0.394752973171.issue37445@roundup.psfhosted.org> Message-ID: <1568194789.72.0.356149484023.issue37445@roundup.psfhosted.org> Steve Dower added the comment: Thanks, Zackery! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:48:05 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 11 Sep 2019 09:48:05 +0000 Subject: [issue28494] is_zipfile false positives In-Reply-To: <1476997729.0.0.643464084789.issue28494@psf.upfronthosting.co.za> Message-ID: <1568195285.97.0.666046475683.issue28494@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +15543 pull_request: https://github.com/python/cpython/pull/15902 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:48:31 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 11 Sep 2019 09:48:31 +0000 Subject: [issue38102] Document importlib.machinery.WindowsRegistryFinder.DEBUG_BUILD Message-ID: <1568195311.03.0.46215825189.issue38102@roundup.psfhosted.org> New submission from Brett Cannon : importlib.machinery.WindowsRegistryFinder.DEBUG_BUILD has existed since Python 3.3 (https://hg.python.org/cpython/file/v3.3.0/Lib/importlib/_bootstrap.py#l1750). ---------- assignee: docs at python components: Documentation messages: 351784 nosy: brett.cannon, docs at python priority: normal severity: normal status: open title: Document importlib.machinery.WindowsRegistryFinder.DEBUG_BUILD versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:48:39 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 11 Sep 2019 09:48:39 +0000 Subject: [issue38081] Different behavior of os.path.realpath('nul') in 3.7 and 3.8 In-Reply-To: <1568097037.9.0.584511449633.issue38081@roundup.psfhosted.org> Message-ID: <1568195319.24.0.76225349556.issue38081@roundup.psfhosted.org> Zachary Ware added the comment: New changeset 92521fea5d0d4aeb9b6a3c3fdd4654af700ad5c8 by Zachary Ware (Steve Dower) in branch 'master': bpo-38081: Fixes ntpath.realpath('NUL') (GH-15899) https://github.com/python/cpython/commit/92521fea5d0d4aeb9b6a3c3fdd4654af700ad5c8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:49:22 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 09:49:22 +0000 Subject: [issue10466] locale.py resetlocale throws exception on Windows (getdefaultlocale returns value not usable in setlocale) In-Reply-To: <1290252967.41.0.731933480084.issue10466@psf.upfronthosting.co.za> Message-ID: <1568195362.62.0.0806714821445.issue10466@roundup.psfhosted.org> Steve Dower added the comment: issue37945 is a duplicate and has more up-to-date information on it, so I'm going to close this one even though it's older. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test_locale failing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:49:57 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 09:49:57 +0000 Subject: [issue38081] Different behavior of os.path.realpath('nul') in 3.7 and 3.8 In-Reply-To: <1568097037.9.0.584511449633.issue38081@roundup.psfhosted.org> Message-ID: <1568195397.66.0.855774868029.issue38081@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15544 pull_request: https://github.com/python/cpython/pull/15903 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:50:49 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 09:50:49 +0000 Subject: [issue38081] Different behavior of os.path.realpath('nul') in 3.7 and 3.8 In-Reply-To: <1568097037.9.0.584511449633.issue38081@roundup.psfhosted.org> Message-ID: <1568195449.51.0.90567751736.issue38081@roundup.psfhosted.org> Steve Dower added the comment: Thanks for the report! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:51:28 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 09:51:28 +0000 Subject: [issue37945] test_locale failing In-Reply-To: <1566754401.97.0.888593384986.issue37945@roundup.psfhosted.org> Message-ID: <1568195488.03.0.819751264787.issue37945@roundup.psfhosted.org> Steve Dower added the comment: FYI I just closed issue10466 as a duplicate (even though that one's been around longer, this issue has more relevant information on it). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:56:22 2019 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 11 Sep 2019 09:56:22 +0000 Subject: [issue38103] Duplicate label "examples" in the Docs Message-ID: <1568195782.91.0.281693262362.issue38103@roundup.psfhosted.org> New submission from Ezio Melotti : I just rebuilt the docs and got the following error: Warning, treated as error: Doc/c-api/typeobj.rst:2456:duplicate label examples, other instance in Doc/distutils/examples.rst Makefile:49: recipe for target 'build' failed make: *** [build] Error 2 ---------- assignee: ezio.melotti components: Documentation messages: 351789 nosy: ezio.melotti priority: normal severity: normal stage: needs patch status: open title: Duplicate label "examples" in the Docs type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:58:30 2019 From: report at bugs.python.org (Julien Palard) Date: Wed, 11 Sep 2019 09:58:30 +0000 Subject: [issue16438] Numeric operator predecence confusing In-Reply-To: <1352384371.29.0.086289583253.issue16438@psf.upfronthosting.co.za> Message-ID: <1568195910.61.0.479028843319.issue16438@roundup.psfhosted.org> Julien Palard added the comment: New changeset 4576b5431bd597df7581fe3c852b315e47e4b230 by Julien Palard (Anjali) in branch 'master': bpo-16438: Doc: confusing text regarding numeric precedence corrected (GH-10521) https://github.com/python/cpython/commit/4576b5431bd597df7581fe3c852b315e47e4b230 ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:58:40 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 09:58:40 +0000 Subject: [issue16438] Numeric operator predecence confusing In-Reply-To: <1352384371.29.0.086289583253.issue16438@psf.upfronthosting.co.za> Message-ID: <1568195920.69.0.336806988296.issue16438@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15545 pull_request: https://github.com/python/cpython/pull/15904 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:58:46 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 09:58:46 +0000 Subject: [issue16438] Numeric operator predecence confusing In-Reply-To: <1352384371.29.0.086289583253.issue16438@psf.upfronthosting.co.za> Message-ID: <1568195926.61.0.263369785314.issue16438@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15546 pull_request: https://github.com/python/cpython/pull/15905 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:58:57 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 11 Sep 2019 09:58:57 +0000 Subject: [issue35168] shlex punctuation_chars inconsistency In-Reply-To: <1541439134.06.0.788709270274.issue35168@psf.upfronthosting.co.za> Message-ID: <1568195937.73.0.987649372152.issue35168@roundup.psfhosted.org> Change by Vinay Sajip : ---------- pull_requests: -11403 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:59:07 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 11 Sep 2019 09:59:07 +0000 Subject: [issue35168] shlex punctuation_chars inconsistency In-Reply-To: <1541439134.06.0.788709270274.issue35168@psf.upfronthosting.co.za> Message-ID: <1568195947.98.0.975729520588.issue35168@roundup.psfhosted.org> Change by Vinay Sajip : ---------- pull_requests: -11402 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:59:17 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 11 Sep 2019 09:59:17 +0000 Subject: [issue35168] shlex punctuation_chars inconsistency In-Reply-To: <1541439134.06.0.788709270274.issue35168@psf.upfronthosting.co.za> Message-ID: <1568195957.84.0.156633597901.issue35168@roundup.psfhosted.org> Change by Vinay Sajip : ---------- pull_requests: -11401 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:59:26 2019 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 11 Sep 2019 09:59:26 +0000 Subject: [issue38103] Duplicate label "examples" in the Docs In-Reply-To: <1568195782.91.0.281693262362.issue38103@roundup.psfhosted.org> Message-ID: <1568195966.36.0.712240726619.issue38103@roundup.psfhosted.org> Change by Ezio Melotti : ---------- keywords: +patch pull_requests: +15547 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15906 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 05:59:30 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Sep 2019 09:59:30 +0000 Subject: [issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime() In-Reply-To: <1540478010.12.0.788709270274.issue35066@psf.upfronthosting.co.za> Message-ID: <1568195970.99.0.230906148075.issue35066@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- pull_requests: +15548 pull_request: https://github.com/python/cpython/pull/15907 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:01:45 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 11 Sep 2019 10:01:45 +0000 Subject: [issue37585] Comparing PyDictValues does not give expected results In-Reply-To: <1563019128.62.0.639495498673.issue37585@roundup.psfhosted.org> Message-ID: <1568196105.25.0.581764725164.issue37585@roundup.psfhosted.org> Brett Cannon added the comment: New changeset 6472ece5a0fe82809d3aa0ffb281796fcd252d76 by Brett Cannon (Kyle Stanley) in branch 'master': bpo-37585: Add clarification regarding comparing dict.values() (GH-14954) https://github.com/python/cpython/commit/6472ece5a0fe82809d3aa0ffb281796fcd252d76 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:01:53 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 10:01:53 +0000 Subject: [issue37585] Comparing PyDictValues does not give expected results In-Reply-To: <1563019128.62.0.639495498673.issue37585@roundup.psfhosted.org> Message-ID: <1568196113.05.0.500135018659.issue37585@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15549 pull_request: https://github.com/python/cpython/pull/15908 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:01:59 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 10:01:59 +0000 Subject: [issue37585] Comparing PyDictValues does not give expected results In-Reply-To: <1563019128.62.0.639495498673.issue37585@roundup.psfhosted.org> Message-ID: <1568196119.37.0.58600546227.issue37585@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15550 pull_request: https://github.com/python/cpython/pull/15909 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:03:37 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 11 Sep 2019 10:03:37 +0000 Subject: [issue37585] Comparing PyDictValues does not give expected results In-Reply-To: <1563019128.62.0.639495498673.issue37585@roundup.psfhosted.org> Message-ID: <1568196217.09.0.440339217253.issue37585@roundup.psfhosted.org> Change by Brett Cannon : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:05:17 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 10:05:17 +0000 Subject: [issue37424] subprocess.run timeout does not function if shell=True and capture_output=True In-Reply-To: <1561618790.88.0.611701645761.issue37424@roundup.psfhosted.org> Message-ID: <1568196317.59.0.216822617816.issue37424@roundup.psfhosted.org> miss-islington added the comment: New changeset 872c85a1796290baef89a20dbde819c4da45830c by Miss Islington (bot) in branch '3.8': bpo-37424: Avoid a hang in subprocess.run timeout output capture (GH-14490) https://github.com/python/cpython/commit/872c85a1796290baef89a20dbde819c4da45830c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:06:00 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 10:06:00 +0000 Subject: [issue37424] subprocess.run timeout does not function if shell=True and capture_output=True In-Reply-To: <1561618790.88.0.611701645761.issue37424@roundup.psfhosted.org> Message-ID: <1568196360.97.0.683141850074.issue37424@roundup.psfhosted.org> miss-islington added the comment: New changeset 5fe153c21de020f37712910b0dcce93341bba272 by Miss Islington (bot) in branch '3.7': bpo-37424: Avoid a hang in subprocess.run timeout output capture (GH-14490) https://github.com/python/cpython/commit/5fe153c21de020f37712910b0dcce93341bba272 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:09:52 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 11 Sep 2019 10:09:52 +0000 Subject: [issue37409] relative import without parent succeeds with builtins.__import__ In-Reply-To: <1561540286.77.0.471225789226.issue37409@roundup.psfhosted.org> Message-ID: <1568196592.46.0.725026926977.issue37409@roundup.psfhosted.org> Brett Cannon added the comment: New changeset 92420b3e679959a7d0ce875875601a4cee45231e by Brett Cannon (Ben Lewis) in branch 'master': bpo-37409: fix relative import with no parent (#14956) https://github.com/python/cpython/commit/92420b3e679959a7d0ce875875601a4cee45231e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:12:22 2019 From: report at bugs.python.org (Manoj C) Date: Wed, 11 Sep 2019 10:12:22 +0000 Subject: [issue38104] File descriptor error when subprocess call is used with event loop enabled in main thread Message-ID: <1568196742.14.0.919718116174.issue38104@roundup.psfhosted.org> New submission from Manoj C : I have been using asyncio to run subprocess calls in a separate thread. For this purpose I start an event loop in my main thread as per the recommendation - https://docs.python.org/3/library/asyncio-subprocess.html#subprocess-and-threads . Now when I use a normal subprocess call in the main thread, I start getting following file descriptor error after few iterations: ``` Exception ignored when trying to write to the signal wakeup fd: BlockingIOError: [Errno 11] Resource temporarily unavailable ``` I have reproduced the problem in a small script and am seeing that the error goes away if I do not start the even loop in the main thread. ``` import asyncio import subprocess import time def try_error(): for i in range(1,500): print(i) try: subprocess.run(["ls", "-l"], check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) except subprocess.CalledProcessError as e: print(f"Exception raised {e.stderr}\nOutput {e.stdout}") def definite_error(): w = asyncio.get_child_watcher() l = asyncio.get_event_loop() try_error() if __name__ == "__main__": definite_error() ``` This is the smallest subset of the code which can reproduce the error. In the original code, I run a asyncio.create_subprocess_exec in a parallel thread. The normal subprocess call is part of third party code which call from the main thread and hence cannot modify it. ---------- components: asyncio messages: 351795 nosy: Manoj C, asvetlov, yselivanov priority: normal severity: normal status: open title: File descriptor error when subprocess call is used with event loop enabled in main thread type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:15:17 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 11 Sep 2019 10:15:17 +0000 Subject: [issue33187] Document ElementInclude (XInclude) support in ElementTree In-Reply-To: <1522427694.7.0.467229070634.issue33187@psf.upfronthosting.co.za> Message-ID: <1568196917.51.0.0993320061762.issue33187@roundup.psfhosted.org> Change by Stefan Behnel : ---------- versions: +Python 3.9 -Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:18:49 2019 From: report at bugs.python.org (Leslie) Date: Wed, 11 Sep 2019 10:18:49 +0000 Subject: [issue38007] Regression: name of PyType_Spec::slots conflicts with Qt macro In-Reply-To: <1567419827.68.0.665093966998.issue38007@roundup.psfhosted.org> Message-ID: <1568197129.07.0.852072560067.issue38007@roundup.psfhosted.org> Leslie added the comment: Some history and explanation of this problem: - Qt extends C++ with the following keywords: "slots", "signals", "emit" - This extension is compiled with a Meta-Object-Compiler (MOC) into standard C++. - Since code using Qt extensions (i.e. headers) generally used "mixed" with standard C++ code, "standard" compiler must be able to compile the Qt specific part, too -> the extension keywords are declared as empty macros (i.e. #define slots) The consequence is that if Qt-based headers are used together with any 3rd party headers, the 3rd party code cannot contain the extension keywords (slots, signals, emit) as C/C++ tokens, because the preprocessor will "delete" them as a result of macro expansion, since the keywords are defined as empty macros. -> The code won't compile because of syntax errors. This caused bug https://bugs.python.org/issue1086854 , which was fixed in https://github.com/python/cpython/commit/c255c7bef7621596869f56d887ac3ccd5b536708 The fix renamed the "slots" struct member in Python, thus the conflict was resolved. Note: the Qt library is, like Python, old, and used in a huge number of projects and products. E.g. Qt is the base platform for KDE development. It's a matter of point of view, which of the two, Qt or Python should be "fixed". In my PR I used the same solution: renaming the conflicting member. ------------- Since this time this solution was not welcome, and obviously I'm not the first facing this issue, I was searching for another solutions. I found that Qt has already provided a solution for this problem. There are 2 macros: QT_NO_SIGNALS_SLOTS_KEYWORDS and QT_NO_KEYWORDS , which "turn off" defining the extension keywords as macros. Instead the QT_SLOTS, Q_SIGNALS macros should be used, which very likely do not interfere with any 3rd party library... Though, these are "official" Qt macros, not very well documented: https://bugreports.qt.io/browse/QTBUG-70564 :) So by defining QT_NO_KEYWORDS I could resolve this whole issue. Thanks guys for your patience and attetion! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:29:10 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Sep 2019 10:29:10 +0000 Subject: [issue38054] enhance pdb.set_trace() to run when the specified condition is true In-Reply-To: <1567939455.37.0.149072874331.issue38054@roundup.psfhosted.org> Message-ID: <1568197750.14.0.869044871534.issue38054@roundup.psfhosted.org> Jason R. Coombs added the comment: You could just do breakpoint() if trigger else None Concise, easy, and avoids complicating set_trace(). ---------- nosy: +jaraco _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:29:21 2019 From: report at bugs.python.org (Guido Imperiale) Date: Wed, 11 Sep 2019 10:29:21 +0000 Subject: [issue38105] hash collision when hash(x) == -2 causes many calls to __eq__ Message-ID: <1568197761.75.0.53300036491.issue38105@roundup.psfhosted.org> New submission from Guido Imperiale : Take two objects where hash(a) == hash(b) == -2 exactly, but a != b, When they are inserted in a dict or set, the __eq__ method is invoked a whopping 13 times. Does this have something to do with the special case of hash(-1) = -2? class C: def __init__(self, x, h): self.x = x self.h = h def __eq__(self, other): print(f"{self}.__eq__({other})") return self.x == other.x def __hash__(self): print(f"{self}.__hash__") return self.h def __repr__(self): return f"C({self.x, self.h})" >>> {C(1, -2), C(2, -2)} C((1, -2)).__hash__ C((2, -2)).__hash__ C((1, -2)).__eq__(C((2, -2))) C((1, -2)).__eq__(C((2, -2))) C((1, -2)).__eq__(C((2, -2))) C((1, -2)).__eq__(C((2, -2))) C((1, -2)).__eq__(C((2, -2))) C((1, -2)).__eq__(C((2, -2))) C((1, -2)).__eq__(C((2, -2))) C((1, -2)).__eq__(C((2, -2))) C((1, -2)).__eq__(C((2, -2))) C((1, -2)).__eq__(C((2, -2))) C((1, -2)).__eq__(C((2, -2))) C((1, -2)).__eq__(C((2, -2))) C((1, -2)).__eq__(C((2, -2))) {C((1, -2)), C((2, -2))} >>> {C(1, -3), C(1, -3)} C((1, -3)).__hash__ C((1, -3)).__hash__ C((1, -3)).__eq__(C((1, -3))) {C((1, -3))} >>> {C(1, -1), C(1, -1)} C((1, -1)).__hash__ C((1, -1)).__hash__ C((1, -1)).__eq__(C((1, -1))) >>> {C(1, -2), C(1, -2)} C((1, -2)).__hash__ C((1, -2)).__hash__ C((1, -2)).__eq__(C((1, -2))) {C((1, -2))} ---------- messages: 351798 nosy: crusaderky priority: normal severity: normal status: open title: hash collision when hash(x) == -2 causes many calls to __eq__ type: performance versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:30:08 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 11 Sep 2019 10:30:08 +0000 Subject: [issue25810] Python 3 documentation for eval is incorrect In-Reply-To: <1449346403.16.0.483198527619.issue25810@psf.upfronthosting.co.za> Message-ID: <1568197808.68.0.86667480374.issue25810@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 7a0023e8d17566eb32c836b65c33663303a2224f by Gregory P. Smith (smokephil) in branch 'master': bpo-25810: Clarify eval() docs, it does not keywords (GH-15173) https://github.com/python/cpython/commit/7a0023e8d17566eb32c836b65c33663303a2224f ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:30:15 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 10:30:15 +0000 Subject: [issue25810] Python 3 documentation for eval is incorrect In-Reply-To: <1449346403.16.0.483198527619.issue25810@psf.upfronthosting.co.za> Message-ID: <1568197815.43.0.253634272836.issue25810@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15551 pull_request: https://github.com/python/cpython/pull/15910 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:30:21 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 10:30:21 +0000 Subject: [issue25810] Python 3 documentation for eval is incorrect In-Reply-To: <1449346403.16.0.483198527619.issue25810@psf.upfronthosting.co.za> Message-ID: <1568197821.62.0.245945919819.issue25810@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15552 pull_request: https://github.com/python/cpython/pull/15911 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:31:05 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Sep 2019 10:31:05 +0000 Subject: [issue38054] enhance pdb.set_trace() to run when the specified condition is true In-Reply-To: <1567939455.37.0.149072874331.issue38054@roundup.psfhosted.org> Message-ID: <1568197865.26.0.860918789602.issue38054@roundup.psfhosted.org> Jason R. Coombs added the comment: Or even more concise: trigger and breakpoint() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:31:15 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 11 Sep 2019 10:31:15 +0000 Subject: [issue37936] gitignore file is too broad In-Reply-To: <1566630912.92.0.00349300289224.issue37936@roundup.psfhosted.org> Message-ID: <1568197875.07.0.474289039551.issue37936@roundup.psfhosted.org> Zachary Ware added the comment: New changeset df935b5f0bcc40522c7aac1e844aa176cd8bbdef by Zachary Ware in branch '3.8': [3.8] bpo-37936: Systematically distinguish rooted vs. unrooted in .gitignore (GH-15823) (GH-15900) https://github.com/python/cpython/commit/df935b5f0bcc40522c7aac1e844aa176cd8bbdef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:31:39 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 11 Sep 2019 10:31:39 +0000 Subject: [issue28494] is_zipfile false positives In-Reply-To: <1476997729.0.0.643464084789.issue28494@psf.upfronthosting.co.za> Message-ID: <1568197899.72.0.524767736179.issue28494@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset c37447481ec8f6d0e49d0587ec0de3f9e7d56b28 by Gregory P. Smith in branch 'master': bpo-28494: install ziptestdata to fix install bot (GH-15902) https://github.com/python/cpython/commit/c37447481ec8f6d0e49d0587ec0de3f9e7d56b28 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:31:48 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 10:31:48 +0000 Subject: [issue28494] is_zipfile false positives In-Reply-To: <1476997729.0.0.643464084789.issue28494@psf.upfronthosting.co.za> Message-ID: <1568197908.45.0.237990736461.issue28494@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15553 pull_request: https://github.com/python/cpython/pull/15912 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:31:58 2019 From: report at bugs.python.org (Guido Imperiale) Date: Wed, 11 Sep 2019 10:31:58 +0000 Subject: [issue38105] hash collision when hash(x) == -2 causes many calls to __eq__ In-Reply-To: <1568197761.75.0.53300036491.issue38105@roundup.psfhosted.org> Message-ID: <1568197918.73.0.444798788725.issue38105@roundup.psfhosted.org> Guido Imperiale added the comment: Forgot a counter-example: {C(1, 0), C(2, 0)} C((1, 0)).__hash__ C((2, 0)).__hash__ C((1, 0)).__eq__(C((2, 0))) {C((1, 0)), C((2, 0))} ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:39:39 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 10:39:39 +0000 Subject: [issue16438] Numeric operator predecence confusing In-Reply-To: <1352384371.29.0.086289583253.issue16438@psf.upfronthosting.co.za> Message-ID: <1568198379.76.0.579129043658.issue16438@roundup.psfhosted.org> miss-islington added the comment: New changeset 80db4b4be54ccdb5b67821506b6db2b27bd7c28a by Miss Islington (bot) in branch '3.8': bpo-16438: Doc: confusing text regarding numeric precedence corrected (GH-10521) https://github.com/python/cpython/commit/80db4b4be54ccdb5b67821506b6db2b27bd7c28a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:40:39 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 11 Sep 2019 10:40:39 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568198439.21.0.70389061614.issue36373@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 4601f7a49fe8ed00c4b6b70b0eda2b3922568e9b by Andrew Svetlov in branch '3.8': [3.8] bpo-36373: Fix deprecation warnings (GH-15889) (GH-15901) https://github.com/python/cpython/commit/4601f7a49fe8ed00c4b6b70b0eda2b3922568e9b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:40:54 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 11 Sep 2019 10:40:54 +0000 Subject: [issue37409] relative import without parent succeeds with builtins.__import__ In-Reply-To: <1561540286.77.0.471225789226.issue37409@roundup.psfhosted.org> Message-ID: <1568198454.39.0.974771584903.issue37409@roundup.psfhosted.org> Change by Brett Cannon : ---------- pull_requests: +15554 pull_request: https://github.com/python/cpython/pull/15913 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:41:30 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 10:41:30 +0000 Subject: [issue16438] Numeric operator predecence confusing In-Reply-To: <1352384371.29.0.086289583253.issue16438@psf.upfronthosting.co.za> Message-ID: <1568198490.84.0.844088631098.issue16438@roundup.psfhosted.org> miss-islington added the comment: New changeset 9210b5826fab5248ac28a15c1b8b39ae949d0ef8 by Miss Islington (bot) in branch '3.7': bpo-16438: Doc: confusing text regarding numeric precedence corrected (GH-10521) https://github.com/python/cpython/commit/9210b5826fab5248ac28a15c1b8b39ae949d0ef8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:41:52 2019 From: report at bugs.python.org (Julien Palard) Date: Wed, 11 Sep 2019 10:41:52 +0000 Subject: [issue16438] Numeric operator predecence confusing In-Reply-To: <1352384371.29.0.086289583253.issue16438@psf.upfronthosting.co.za> Message-ID: <1568198512.73.0.41920259787.issue16438@roundup.psfhosted.org> Change by Julien Palard : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:43:33 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 10:43:33 +0000 Subject: [issue38081] Different behavior of os.path.realpath('nul') in 3.7 and 3.8 In-Reply-To: <1568097037.9.0.584511449633.issue38081@roundup.psfhosted.org> Message-ID: <1568198613.45.0.0902739306972.issue38081@roundup.psfhosted.org> miss-islington added the comment: New changeset 57491de7c33c5886c4cae2f468b474d9b4e6fed2 by Miss Islington (bot) in branch '3.8': bpo-38081: Fixes ntpath.realpath('NUL') (GH-15899) https://github.com/python/cpython/commit/57491de7c33c5886c4cae2f468b474d9b4e6fed2 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:45:57 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 10:45:57 +0000 Subject: [issue37585] Comparing PyDictValues does not give expected results In-Reply-To: <1563019128.62.0.639495498673.issue37585@roundup.psfhosted.org> Message-ID: <1568198757.82.0.783167629483.issue37585@roundup.psfhosted.org> miss-islington added the comment: New changeset 3cd147bf599f116593dc06ed7dfe948b759aabd3 by Miss Islington (bot) in branch '3.7': bpo-37585: Add clarification regarding comparing dict.values() (GH-14954) https://github.com/python/cpython/commit/3cd147bf599f116593dc06ed7dfe948b759aabd3 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:46:56 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 10:46:56 +0000 Subject: [issue37585] Comparing PyDictValues does not give expected results In-Reply-To: <1563019128.62.0.639495498673.issue37585@roundup.psfhosted.org> Message-ID: <1568198816.0.0.840901651529.issue37585@roundup.psfhosted.org> miss-islington added the comment: New changeset 690a16d455603500a0c6df0bd87e49c9b37a6950 by Miss Islington (bot) in branch '3.8': bpo-37585: Add clarification regarding comparing dict.values() (GH-14954) https://github.com/python/cpython/commit/690a16d455603500a0c6df0bd87e49c9b37a6950 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:49:55 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 10:49:55 +0000 Subject: [issue37769] Windows Store installer should warn user about MAX_PATH In-Reply-To: <1565042568.26.0.835015396911.issue37769@roundup.psfhosted.org> Message-ID: <1568198995.36.0.882748027636.issue37769@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +15555 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15914 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:50:41 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Sep 2019 10:50:41 +0000 Subject: [issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime() In-Reply-To: <1540478010.12.0.788709270274.issue35066@psf.upfronthosting.co.za> Message-ID: <1568199041.58.0.0210826361265.issue35066@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset f2173ae38fa49235c3cdc28ae2ca2e19a375a596 by Benjamin Peterson in branch 'master': bpo-35066: Make trailing percent test more portable. (GH-15907) https://github.com/python/cpython/commit/f2173ae38fa49235c3cdc28ae2ca2e19a375a596 ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:50:49 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 10:50:49 +0000 Subject: [issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime() In-Reply-To: <1540478010.12.0.788709270274.issue35066@psf.upfronthosting.co.za> Message-ID: <1568199049.39.0.122213794494.issue35066@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15556 pull_request: https://github.com/python/cpython/pull/15915 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:50:55 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 10:50:55 +0000 Subject: [issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime() In-Reply-To: <1540478010.12.0.788709270274.issue35066@psf.upfronthosting.co.za> Message-ID: <1568199055.94.0.26165603506.issue35066@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15557 pull_request: https://github.com/python/cpython/pull/15916 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:51:04 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 10:51:04 +0000 Subject: [issue37769] Windows Store installer should warn user about MAX_PATH In-Reply-To: <1565042568.26.0.835015396911.issue37769@roundup.psfhosted.org> Message-ID: <1568199064.69.0.912366744319.issue37769@roundup.psfhosted.org> Steve Dower added the comment: I don't know that it's a great idea, but I did PR 15914 just to see how an additional message on OSError would look. ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:53:19 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 10:53:19 +0000 Subject: [issue25810] Python 3 documentation for eval is incorrect In-Reply-To: <1449346403.16.0.483198527619.issue25810@psf.upfronthosting.co.za> Message-ID: <1568199199.77.0.386302631382.issue25810@roundup.psfhosted.org> miss-islington added the comment: New changeset 4e914ab29f6d48a9fd045ea6a25dbf9e2fb603f9 by Miss Islington (bot) in branch '3.8': bpo-25810: Clarify eval() docs, it does not keywords (GH-15173) https://github.com/python/cpython/commit/4e914ab29f6d48a9fd045ea6a25dbf9e2fb603f9 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:55:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Sep 2019 10:55:18 +0000 Subject: [issue37424] subprocess.run timeout does not function if shell=True and capture_output=True In-Reply-To: <1561618790.88.0.611701645761.issue37424@roundup.psfhosted.org> Message-ID: <1568199318.57.0.189219775598.issue37424@roundup.psfhosted.org> STINNER Victor added the comment: On Windows, the following pattern _can_ hang: proc = subprocess.Popen(cmd, stdout=subprocess.PIPE) try: return proc.communicate(timeout=1.0) except TimeoutExpired: proc.kill() return proc.communicate() # <== HERE Even if the first child process is killed, communicate() waits until the pipe is closed. If the child process spawned a 3rd process before being killed, the second .communicate() calls hangs until the 3rd process exit or close its stdout. I'm not sure if subprocess.run() should do anything about this case, but it was at least for your information. I'm fighting against this issue in bpo-37531. IMHO it's an issue of the Windows implementation of Popen.communicate(): it's implemented with a blocking call to stdout.read() run in a thread. The thread cannot be interrupted in any way and will until complete once stdout is closed. Again, if the direct child process spawned other processes, stdout is only closed in the main parent process once all child processes exit or at least closed their stdout. Maybe another issue should be opened to avoid blocking with the following pattern on Windows: proc.kill() proc.communicate() ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:55:32 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 10:55:32 +0000 Subject: [issue25810] Python 3 documentation for eval is incorrect In-Reply-To: <1449346403.16.0.483198527619.issue25810@psf.upfronthosting.co.za> Message-ID: <1568199332.74.0.534380260614.issue25810@roundup.psfhosted.org> miss-islington added the comment: New changeset d378fdb10a5476b86b5a01d74c1bcc4e2f52e003 by Miss Islington (bot) in branch '3.7': bpo-25810: Clarify eval() docs, it does not keywords (GH-15173) https://github.com/python/cpython/commit/d378fdb10a5476b86b5a01d74c1bcc4e2f52e003 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:55:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Sep 2019 10:55:34 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568199334.33.0.0465990652077.issue37531@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-37424. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:58:02 2019 From: report at bugs.python.org (Lisa Roach) Date: Wed, 11 Sep 2019 10:58:02 +0000 Subject: [issue38103] Duplicate label "examples" in the Docs In-Reply-To: <1568195782.91.0.281693262362.issue38103@roundup.psfhosted.org> Message-ID: <1568199482.35.0.236881887557.issue38103@roundup.psfhosted.org> Lisa Roach added the comment: New changeset 2d8d597bb8f882a7677db5a2739df0e617098634 by Lisa Roach (Ezio Melotti) in branch 'master': bpo-38103: fix conflicting labels in the docs. (GH-15906) https://github.com/python/cpython/commit/2d8d597bb8f882a7677db5a2739df0e617098634 ---------- nosy: +lisroach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 06:58:09 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 10:58:09 +0000 Subject: [issue38103] Duplicate label "examples" in the Docs In-Reply-To: <1568195782.91.0.281693262362.issue38103@roundup.psfhosted.org> Message-ID: <1568199489.69.0.412157255304.issue38103@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15558 pull_request: https://github.com/python/cpython/pull/15917 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:00:14 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 11 Sep 2019 11:00:14 +0000 Subject: [issue38105] hash collision when hash(x) == -2 causes many calls to __eq__ In-Reply-To: <1568197761.75.0.53300036491.issue38105@roundup.psfhosted.org> Message-ID: <1568199614.31.0.52690475.issue38105@roundup.psfhosted.org> Steven D'Aprano added the comment: Here's a possibly simpler version which nevertheless still shows multiple calls to __eq__ (in this case, only 6, not 13): class C(object): def __eq__(self, other): print('eq') return super().__eq__(other) def __hash__(self): return -2 d = {-2, C()} which outputs: eq eq eq eq eq eq ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:01:04 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 11 Sep 2019 11:01:04 +0000 Subject: [issue37151] Calling code cleanup after PEP 590 In-Reply-To: <1559659244.35.0.514840211553.issue37151@roundup.psfhosted.org> Message-ID: <1568199664.24.0.290372057615.issue37151@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset 7a6873cdb1f496447ac5d57ae457eacbb56b7972 by Petr Viktorin (Jeroen Demeyer) in branch 'master': bpo-37151: remove special case for PyCFunction from PyObject_Call (GH-14684) https://github.com/python/cpython/commit/7a6873cdb1f496447ac5d57ae457eacbb56b7972 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:02:17 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 11:02:17 +0000 Subject: [issue32972] unittest.TestCase coroutine support In-Reply-To: <1519843317.02.0.467229070634.issue32972@psf.upfronthosting.co.za> Message-ID: <1568199737.77.0.749422706707.issue32972@roundup.psfhosted.org> miss-islington added the comment: New changeset 6a9fd66f6e4445a418c43c92585b9e06d76df4b1 by Miss Islington (bot) (Xtreak) in branch 'master': bpo-32972: Document IsolatedAsyncioTestCase of unittest module (GH-15878) https://github.com/python/cpython/commit/6a9fd66f6e4445a418c43c92585b9e06d76df4b1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:02:26 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 11:02:26 +0000 Subject: [issue32972] unittest.TestCase coroutine support In-Reply-To: <1519843317.02.0.467229070634.issue32972@psf.upfronthosting.co.za> Message-ID: <1568199745.99.0.19530424838.issue32972@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15559 pull_request: https://github.com/python/cpython/pull/15918 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:04:07 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 11 Sep 2019 11:04:07 +0000 Subject: [issue35168] shlex punctuation_chars inconsistency In-Reply-To: <1541439134.06.0.788709270274.issue35168@psf.upfronthosting.co.za> Message-ID: <1568199847.88.0.476300100447.issue35168@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 972cf5c06a5ba16ad243a442dbb9c15307fbed95 by Vinay Sajip (Alex) in branch 'master': bpo-35168: Make shlex.punctuation_chars read-only (#11631) https://github.com/python/cpython/commit/972cf5c06a5ba16ad243a442dbb9c15307fbed95 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:05:11 2019 From: report at bugs.python.org (ZW Test User) Date: Wed, 11 Sep 2019 11:05:11 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1568199911.07.0.577578600338.issue2771@roundup.psfhosted.org> Change by ZW Test User : ---------- components: +Tests -Documentation nosy: +zach.ware type: enhancement -> behavior versions: -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:05:42 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 11:05:42 +0000 Subject: [issue36518] Avoid conflicts when pass arbitrary keyword arguments to Python function In-Reply-To: <1554300842.91.0.496796216897.issue36518@roundup.psfhosted.org> Message-ID: <1568199942.08.0.895603144217.issue36518@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:05:56 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Sep 2019 11:05:56 +0000 Subject: [issue20504] cgi.FieldStorage, multipart, missing Content-Length In-Reply-To: <1391463199.17.0.394387661768.issue20504@psf.upfronthosting.co.za> Message-ID: <1568199956.16.0.907939261804.issue20504@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 2d7cacacc310b65b43e7e2de89e7722291dea6a4 by Benjamin Peterson (Pierre Quentel) in branch 'master': bpo-20504 : in cgi.py, fix bug when a multipart/form-data request has? (#10638) https://github.com/python/cpython/commit/2d7cacacc310b65b43e7e2de89e7722291dea6a4 ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:06:04 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 11:06:04 +0000 Subject: [issue20504] cgi.FieldStorage, multipart, missing Content-Length In-Reply-To: <1391463199.17.0.394387661768.issue20504@psf.upfronthosting.co.za> Message-ID: <1568199964.32.0.468997215437.issue20504@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15560 pull_request: https://github.com/python/cpython/pull/15919 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:06:10 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 11:06:10 +0000 Subject: [issue20504] cgi.FieldStorage, multipart, missing Content-Length In-Reply-To: <1391463199.17.0.394387661768.issue20504@psf.upfronthosting.co.za> Message-ID: <1568199970.05.0.14737137988.issue20504@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15561 pull_request: https://github.com/python/cpython/pull/15920 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:07:07 2019 From: report at bugs.python.org (Guido Imperiale) Date: Wed, 11 Sep 2019 11:07:07 +0000 Subject: [issue38105] hash collision when hash(x) == -2 causes many calls to __eq__ In-Reply-To: <1568197761.75.0.53300036491.issue38105@roundup.psfhosted.org> Message-ID: <1568200027.62.0.334336589892.issue38105@roundup.psfhosted.org> Guido Imperiale added the comment: Of course, the chances that in real life a custom object will have hash == -2 are very small. Different story however is for the actual numbers -1 and -2: In [2]: %timeit {-1, -3} 64.2 ns ? 1.41 ns per loop (mean ? std. dev. of 7 runs, 10000000 loops each) In [3]: %timeit {-1, -2} 238 ns ? 5.64 ns per loop (mean ? std. dev. of 7 runs, 1000000 loops each) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:09:56 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 11:09:56 +0000 Subject: [issue28494] is_zipfile false positives In-Reply-To: <1476997729.0.0.643464084789.issue28494@psf.upfronthosting.co.za> Message-ID: <1568200196.96.0.0661925068715.issue28494@roundup.psfhosted.org> miss-islington added the comment: New changeset 7acb22e6e9061f85988c0c6c5ee25ebdf2950841 by Miss Islington (bot) in branch '3.8': bpo-28494: install ziptestdata to fix install bot (GH-15902) https://github.com/python/cpython/commit/7acb22e6e9061f85988c0c6c5ee25ebdf2950841 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:15:38 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 11 Sep 2019 11:15:38 +0000 Subject: [issue25597] unittest.mock does not wrap dunder methods (__getitem__ etc) In-Reply-To: <1447174958.96.0.448093662654.issue25597@psf.upfronthosting.co.za> Message-ID: <1568200538.53.0.396207296825.issue25597@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Michael, any thoughts on this? This more feels like an enhancement to me and I have marked it as 3.9 since I am not sure someone might be depending on the behavior where they have used wraps but still expect default values for magicmethods as they do now. ---------- components: +Library (Lib) nosy: +lisroach versions: +Python 3.9 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:16:18 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Sep 2019 11:16:18 +0000 Subject: [issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime() In-Reply-To: <1540478010.12.0.788709270274.issue35066@psf.upfronthosting.co.za> Message-ID: <1568200578.33.0.714727394111.issue35066@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:17:07 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 11:17:07 +0000 Subject: [issue37326] Windows LICENSE.txt do not contain libffi license In-Reply-To: <1560825416.41.0.74258395972.issue37326@roundup.psfhosted.org> Message-ID: <1568200627.09.0.915451195275.issue37326@roundup.psfhosted.org> Change by Steve Dower : ---------- assignee: -> steve.dower versions: -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:17:18 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 11 Sep 2019 11:17:18 +0000 Subject: [issue32972] unittest.TestCase coroutine support In-Reply-To: <1519843317.02.0.467229070634.issue32972@psf.upfronthosting.co.za> Message-ID: <1568200638.45.0.56516962569.issue32972@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 0ba5dbd992d68d7df23396148ad55624200a1dbc by Andrew Svetlov (Miss Islington (bot)) in branch '3.8': bpo-32972: Document IsolatedAsyncioTestCase of unittest module (GH-15878) (GH-15918) https://github.com/python/cpython/commit/0ba5dbd992d68d7df23396148ad55624200a1dbc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:17:33 2019 From: report at bugs.python.org (Kirill Smelkov) Date: Wed, 11 Sep 2019 11:17:33 +0000 Subject: [issue38106] Race in PyThread_release_lock - can lead to MEMORY CORRUPTION and DEADLOCK Message-ID: <1568200653.3.0.865964137512.issue38106@roundup.psfhosted.org> New submission from Kirill Smelkov : Hello up there. I believe I've discovered a race in PyThread_release_lock on Python2.7 that, on systems where POSIX semaphores are not available and Python locks are implemented with mutexes and condition variables, can lead to MEMORY CORRUPTION and DEADLOCK. The particular system I've discovered the bug on is macOS Mojave 10.14.6. The bug is already fixed on Python3 and the fix for Python2 is easy: git cherry-pick 187aa545165d Thanks beforehand, Kirill Bug description ( Please see attached pylock_bug.pyx for the program that triggers the bug for real. ) On Darwin, even though this is considered as POSIX, Python uses mutex+condition variable to implement its lock, and, as of 20190828, Py2.7 implementation, even though similar issue was fixed for Py3 in 2012, contains synchronization bug: the condition is signalled after mutex unlock while the correct protocol is to signal condition from under mutex: https://github.com/python/cpython/blob/v2.7.16-127-g0229b56d8c0/Python/thread_pthread.h#L486-L506 https://github.com/python/cpython/commit/187aa545165d (py3 fix) PyPy has the same bug for both pypy2 and pypy3: https://bitbucket.org/pypy/pypy/src/578667b3fef9/rpython/translator/c/src/thread_pthread.c#lines-443:465 https://bitbucket.org/pypy/pypy/src/5b42890d48c3/rpython/translator/c/src/thread_pthread.c#lines-443:465 Signalling condition outside of corresponding mutex is considered OK by POSIX, but in Python context it can lead to at least memory corruption if we consider the whole lifetime of python level lock. For example the following logical scenario: T1 T2 sema = Lock() sema.acquire() sema.release() sema.acquire() free(sema) ... can translate to the next C-level calls: T1 T2 # sema = Lock() sema = malloc(...) sema.locked = 0 pthread_mutex_init(&sema.mut) pthread_cond_init (&sema.lock_released) # sema.acquire() pthread_mutex_lock(&sema.mut) # sees sema.locked == 0 sema.locked = 1 pthread_mutex_unlock(&sema.mut) # sema.release() pthread_mutex_lock(&sema.mut) sema.locked = 0 pthread_mutex_unlock(&sema.mut) # OS scheduler gets in and relinquishes control from T2 # to another process ... # second sema.acquire() pthread_mutex_lock(&sema.mut) # sees sema.locked == 0 sema.locked = 1 pthread_mutex_unlock(&sema.mut) # free(sema) pthread_mutex_destroy(&sema.mut) pthread_cond_destroy (&sema.lock_released) free(sema) # ... e.g. malloc() which returns memory where sema was ... # OS scheduler returns control to T2 # sema.release() continues # # BUT sema was already freed and writing to anywhere # inside sema block CORRUPTS MEMORY. In particular if # _another_ python-level lock was allocated where sema # block was, writing into the memory can have effect on # further synchronization correctness and in particular # lead to deadlock on lock that was next allocated. pthread_cond_signal(&sema.lock_released) Note that T2.pthread_cond_signal(&sema.lock_released) CORRUPTS MEMORY as it is called when sema memory was already freed and is potentially reallocated for another object. The fix is to move pthread_cond_signal to be done under corresponding mutex: # sema.release() pthread_mutex_lock(&sema.mut) sema.locked = 0 pthread_cond_signal(&sema.lock_released) pthread_mutex_unlock(&sema.mut) by cherry-picking commit 187aa545165d ("Signal condition variables with the mutex held. Destroy condition variables before their mutexes"). Bug history The bug was there since 1994 - since at least [1]. It was discussed in 2001 with original code author[2], but the code was still considered to be race-free. In 2010 the place where pthread_cond_signal should be - before or after pthread_mutex_unlock - was discussed with the rationale to avoid threads bouncing[3,4,5], and in 2012 pthread_cond_signal was moved to be called from under mutex, but only for CPython3[6,7]. In 2019 the bug was (re-)discovered while testing Pygolang[8] on macOS with CPython2 and PyPy2 and PyPy3. [1] https://github.com/python/cpython/commit/2c8cb9f3d240 [2] https://bugs.python.org/issue433625 [3] https://bugs.python.org/issue8299#msg103224 [4] https://bugs.python.org/issue8410#msg103313 [5] https://bugs.python.org/issue8411#msg113301 [6] https://bugs.python.org/issue15038#msg163187 [7] https://github.com/python/cpython/commit/187aa545165d [8] https://pypi.org/project/pygolang ---------- components: Interpreter Core, macOS files: pylock_bug.pyx messages: 351826 nosy: arigo, beazley, benjamin.peterson, brian.curtin, dabeaz, flox, gvanrossum, jyasskin, kristjan.jonsson, loewis, navytux, ned.deily, paul.moore, pitrou, python-dev, r.david.murray, rhettinger, ronaldoussoren, sbt, scoder, shihao, techtonik, terry.reedy, tim.golden, tim.peters, torsten, vstinner, ysj.ray priority: normal severity: normal status: open title: Race in PyThread_release_lock - can lead to MEMORY CORRUPTION and DEADLOCK type: behavior versions: Python 2.7 Added file: https://bugs.python.org/file48604/pylock_bug.pyx _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:18:03 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 11:18:03 +0000 Subject: [issue37326] Windows LICENSE.txt do not contain libffi license In-Reply-To: <1560825416.41.0.74258395972.issue37326@roundup.psfhosted.org> Message-ID: <1568200683.79.0.536259122126.issue37326@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +15562 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15921 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:18:08 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 11 Sep 2019 11:18:08 +0000 Subject: [issue32972] unittest.TestCase coroutine support In-Reply-To: <1519843317.02.0.467229070634.issue32972@psf.upfronthosting.co.za> Message-ID: <1568200688.79.0.323105782046.issue32972@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:21:33 2019 From: report at bugs.python.org (Julien Palard) Date: Wed, 11 Sep 2019 11:21:33 +0000 Subject: [issue35603] table header in output of difflib.HtmlDiff.make_table is not escaped and can be rendered as code in the browser In-Reply-To: <1545988680.87.0.068090288545.issue35603@roundup.psfhosted.org> Message-ID: <1568200893.8.0.465174368759.issue35603@roundup.psfhosted.org> Julien Palard added the comment: New changeset c78dae8d2b890d487e428dce00c7f600612cce7b by Julien Palard (Xtreak) in branch 'master': bpo-35603: Add a note on difflib table header interpreted as HTML (GH-11439) https://github.com/python/cpython/commit/c78dae8d2b890d487e428dce00c7f600612cce7b ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:21:43 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 11:21:43 +0000 Subject: [issue35603] table header in output of difflib.HtmlDiff.make_table is not escaped and can be rendered as code in the browser In-Reply-To: <1545988680.87.0.068090288545.issue35603@roundup.psfhosted.org> Message-ID: <1568200903.63.0.790476180869.issue35603@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15563 pull_request: https://github.com/python/cpython/pull/15922 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:23:16 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 11:23:16 +0000 Subject: [issue33010] os.path.isdir() returns True for broken directory symlinks or junctions In-Reply-To: <1520329654.61.0.467229070634.issue33010@psf.upfronthosting.co.za> Message-ID: <1568200996.48.0.604324483077.issue33010@roundup.psfhosted.org> Steve Dower added the comment: Fixed in 3.8 by changes to os.stat implementation. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:23:43 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 11:23:43 +0000 Subject: [issue36862] Add Visual Studio 2019 support to PCBuild/env.bat In-Reply-To: <1557376919.34.0.533849563508.issue36862@roundup.psfhosted.org> Message-ID: <1568201023.49.0.272061309357.issue36862@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:26:24 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 11:26:24 +0000 Subject: [issue36672] A compiler warning in winreg.SetValue() In-Reply-To: <1555744218.52.0.272239256481.issue36672@roundup.psfhosted.org> Message-ID: <1568201184.12.0.396963447403.issue36672@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:33:55 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 11:33:55 +0000 Subject: [issue36634] venv: activate.bat fails for venv with parentheses in PATH In-Reply-To: <1555337759.6.0.97149991925.issue36634@roundup.psfhosted.org> Message-ID: <1568201635.08.0.692392567977.issue36634@roundup.psfhosted.org> Change by Steve Dower : ---------- assignee: -> steve.dower versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:34:32 2019 From: report at bugs.python.org (Kirill Smelkov) Date: Wed, 11 Sep 2019 11:34:32 +0000 Subject: [issue433625] bug in PyThread_release_lock() Message-ID: <1568201672.05.0.324627265762.issue433625@roundup.psfhosted.org> Kirill Smelkov added the comment: I still believe there is a race here and it can lead to MEMORY CORRUPTION and DEADLOCK: https://bugs.python.org/issue38106. ---------- nosy: +navytux _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:34:48 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 11 Sep 2019 11:34:48 +0000 Subject: [issue37972] unittest.mock.call does not chain __getitem__ to another _Call object In-Reply-To: <1567024381.55.0.529292089661.issue37972@roundup.psfhosted.org> Message-ID: <1568201688.84.0.391637397708.issue37972@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: If we go ahead with this then we should also support other dunder methods of tuple like __setitem__ and so on. ---------- nosy: +cjw296, mariocj89, michael.foord versions: -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:35:26 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 11:35:26 +0000 Subject: [issue36634] venv: activate.bat fails for venv with parentheses in PATH In-Reply-To: <1555337759.6.0.97149991925.issue36634@roundup.psfhosted.org> Message-ID: <1568201726.06.0.859899088214.issue36634@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +15564 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15924 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:36:58 2019 From: report at bugs.python.org (Kirill Smelkov) Date: Wed, 11 Sep 2019 11:36:58 +0000 Subject: [issue8410] Fix emulated lock to be 'fair' In-Reply-To: <1271361646.51.0.206027864382.issue8410@psf.upfronthosting.co.za> Message-ID: <1568201818.43.0.382493355126.issue8410@roundup.psfhosted.org> Kirill Smelkov added the comment: At least condition variable signalling has to be moved to be done under mutex for correctness: https://bugs.python.org/issue38106. ---------- nosy: +navytux _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:38:25 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 11 Sep 2019 11:38:25 +0000 Subject: [issue37409] relative import without parent succeeds with builtins.__import__ In-Reply-To: <1561540286.77.0.471225789226.issue37409@roundup.psfhosted.org> Message-ID: <1568201905.01.0.610272542794.issue37409@roundup.psfhosted.org> Brett Cannon added the comment: New changeset 0a6693a469cfb1dd5c8048d8cb4231a7b5883251 by Brett Cannon in branch '3.8': [3.8] bpo-37409: fix relative import with no parent (GH-14956) (GH-15913) https://github.com/python/cpython/commit/0a6693a469cfb1dd5c8048d8cb4231a7b5883251 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:38:32 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 11:38:32 +0000 Subject: [issue37409] relative import without parent succeeds with builtins.__import__ In-Reply-To: <1561540286.77.0.471225789226.issue37409@roundup.psfhosted.org> Message-ID: <1568201912.61.0.64549775442.issue37409@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15565 pull_request: https://github.com/python/cpython/pull/15925 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:40:20 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Sep 2019 11:40:20 +0000 Subject: [issue38105] hash collision when hash(x) == -2 causes many calls to __eq__ In-Reply-To: <1568197761.75.0.53300036491.issue38105@roundup.psfhosted.org> Message-ID: <1568202020.07.0.188311914723.issue38105@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:47:19 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 11:47:19 +0000 Subject: [issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime() In-Reply-To: <1540478010.12.0.788709270274.issue35066@psf.upfronthosting.co.za> Message-ID: <1568202439.77.0.496890850228.issue35066@roundup.psfhosted.org> miss-islington added the comment: New changeset f3e430b07975c84cf34c927851df234d04d5753f by Miss Islington (bot) in branch '3.8': bpo-35066: Make trailing percent test more portable. (GH-15907) https://github.com/python/cpython/commit/f3e430b07975c84cf34c927851df234d04d5753f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:51:04 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 11:51:04 +0000 Subject: [issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime() In-Reply-To: <1540478010.12.0.788709270274.issue35066@psf.upfronthosting.co.za> Message-ID: <1568202664.65.0.624718113397.issue35066@roundup.psfhosted.org> miss-islington added the comment: New changeset 0553369b9827bb5497bb7a65f64dd259781ae792 by Miss Islington (bot) in branch '3.7': bpo-35066: Make trailing percent test more portable. (GH-15907) https://github.com/python/cpython/commit/0553369b9827bb5497bb7a65f64dd259781ae792 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:50:34 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Sep 2019 11:50:34 +0000 Subject: [issue36274] http.client cannot send non-ASCII request lines In-Reply-To: <1552422803.93.0.420596825145.issue36274@roundup.psfhosted.org> Message-ID: <1568202634.13.0.533153516387.issue36274@roundup.psfhosted.org> Jason R. Coombs added the comment: Thank you Tim for the reasoned issue and proposed solutions. After reviewing these proposals with @eric.snow, we've decided that this approach is dangerous in that the proposed approaches has the potential to expose users unexpectedly to non-compliant behavior, where as currently they are assured compliance. Instead, we would like to see a more explicit opt-in, such as through a separate method or through a setting on the call and/or client object. Consider instead a solution that implements both `.putrequest` and `.putrequest_raw` or `.putrequest_allow_invalid_bytes` that sends a clear signal to the user that they're bypassing the default protections. Or consider another approach where HTTPConnection implements an `_encode_request()` method that a subclass with a specialized need could override. Would either of those approaches suit your use-case? ---------- nosy: +eric.snow, jaraco _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 07:59:16 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 11 Sep 2019 11:59:16 +0000 Subject: [issue35168] shlex punctuation_chars inconsistency In-Reply-To: <1541439134.06.0.788709270274.issue35168@psf.upfronthosting.co.za> Message-ID: <1568203156.79.0.56939645933.issue35168@roundup.psfhosted.org> Change by Vinay Sajip : ---------- pull_requests: +15566 pull_request: https://github.com/python/cpython/pull/15926 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:06:42 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 11 Sep 2019 12:06:42 +0000 Subject: [issue35168] shlex punctuation_chars inconsistency In-Reply-To: <1541439134.06.0.788709270274.issue35168@psf.upfronthosting.co.za> Message-ID: <1568203602.19.0.262697714464.issue35168@roundup.psfhosted.org> Change by Vinay Sajip : ---------- pull_requests: +15567 pull_request: https://github.com/python/cpython/pull/15927 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:09:26 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 12:09:26 +0000 Subject: [issue20504] cgi.FieldStorage, multipart, missing Content-Length In-Reply-To: <1391463199.17.0.394387661768.issue20504@psf.upfronthosting.co.za> Message-ID: <1568203766.88.0.590681599665.issue20504@roundup.psfhosted.org> miss-islington added the comment: New changeset e3bd941e4e6f4465f17a0e5a4a6bdf4ea0afdd0d by Miss Islington (bot) in branch '3.8': bpo-20504 : in cgi.py, fix bug when a multipart/form-data request has? (GH-10638) https://github.com/python/cpython/commit/e3bd941e4e6f4465f17a0e5a4a6bdf4ea0afdd0d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:16:04 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 11 Sep 2019 12:16:04 +0000 Subject: [issue38107] Replace direct future and task contructor calls with factories in asyncio tests Message-ID: <1568204163.99.0.31241530598.issue38107@roundup.psfhosted.org> New submission from Andrew Svetlov : 1. Factories are recommended way for a task and a future creation. 2. Consider this task as asyncio tests tidy up. ---------- components: asyncio keywords: 3.3regression messages: 351837 nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Replace direct future and task contructor calls with factories in asyncio tests versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:17:19 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 11 Sep 2019 12:17:19 +0000 Subject: [issue38107] Replace direct future and task contructor calls with factories in asyncio tests In-Reply-To: <1568204163.99.0.31241530598.issue38107@roundup.psfhosted.org> Message-ID: <1568204239.2.0.196992097095.issue38107@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +15568 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15928 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:22:41 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 12:22:41 +0000 Subject: [issue20504] cgi.FieldStorage, multipart, missing Content-Length In-Reply-To: <1391463199.17.0.394387661768.issue20504@psf.upfronthosting.co.za> Message-ID: <1568204561.35.0.498925132705.issue20504@roundup.psfhosted.org> miss-islington added the comment: New changeset 99f0e81f43f64b83e18e8cb2a0b66c53a81a74ab by Miss Islington (bot) in branch '3.7': bpo-20504 : in cgi.py, fix bug when a multipart/form-data request has? (GH-10638) https://github.com/python/cpython/commit/99f0e81f43f64b83e18e8cb2a0b66c53a81a74ab ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:23:14 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 11 Sep 2019 12:23:14 +0000 Subject: [issue38107] Replace direct future and task contructor calls with factories in asyncio tests In-Reply-To: <1568204163.99.0.31241530598.issue38107@roundup.psfhosted.org> Message-ID: <1568204594.57.0.798175024025.issue38107@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- keywords: -3.3regression, patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:23:34 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 11 Sep 2019 12:23:34 +0000 Subject: [issue38107] Replace direct future and task contructor calls with factories in asyncio tests In-Reply-To: <1568204163.99.0.31241530598.issue38107@roundup.psfhosted.org> Message-ID: <1568204614.26.0.352965454026.issue38107@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- keywords: +patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:24:57 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 12:24:57 +0000 Subject: [issue35603] table header in output of difflib.HtmlDiff.make_table is not escaped and can be rendered as code in the browser In-Reply-To: <1545988680.87.0.068090288545.issue35603@roundup.psfhosted.org> Message-ID: <1568204697.97.0.320295407902.issue35603@roundup.psfhosted.org> miss-islington added the comment: New changeset 44e36e80456dabaeb59c6e2a93e0c1322bfeb179 by Miss Islington (bot) in branch '3.8': bpo-35603: Add a note on difflib table header interpreted as HTML (GH-11439) https://github.com/python/cpython/commit/44e36e80456dabaeb59c6e2a93e0c1322bfeb179 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:28:10 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 12:28:10 +0000 Subject: [issue38103] Duplicate label "examples" in the Docs In-Reply-To: <1568195782.91.0.281693262362.issue38103@roundup.psfhosted.org> Message-ID: <1568204890.66.0.921822687047.issue38103@roundup.psfhosted.org> miss-islington added the comment: New changeset e0dd713370f94d0f4a59604cc769e0cc643b7740 by Miss Islington (bot) in branch '3.8': bpo-38103: fix conflicting labels in the docs. (GH-15906) https://github.com/python/cpython/commit/e0dd713370f94d0f4a59604cc769e0cc643b7740 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:39:11 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 11 Sep 2019 12:39:11 +0000 Subject: [issue35168] shlex punctuation_chars inconsistency In-Reply-To: <1541439134.06.0.788709270274.issue35168@psf.upfronthosting.co.za> Message-ID: <1568205551.34.0.87093348722.issue35168@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset aca878ecf18b9e915e9b551f095a550b5c6e9bc5 by Vinay Sajip in branch '3.7': [3.7] bpo-35168: Make shlex.punctuation_chars read-only (GH-11631) (GH-15926) https://github.com/python/cpython/commit/aca878ecf18b9e915e9b551f095a550b5c6e9bc5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:39:55 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 11 Sep 2019 12:39:55 +0000 Subject: [issue35168] shlex punctuation_chars inconsistency In-Reply-To: <1541439134.06.0.788709270274.issue35168@psf.upfronthosting.co.za> Message-ID: <1568205595.43.0.883157300195.issue35168@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 3b92ddb7612fd8fe2be95ff3d8022ed18335b13f by Vinay Sajip in branch '3.8': [3.8] bpo-35168: Make shlex.punctuation_chars read-only (GH-11631) (GH-15927) https://github.com/python/cpython/commit/3b92ddb7612fd8fe2be95ff3d8022ed18335b13f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:41:57 2019 From: report at bugs.python.org (Julien Palard) Date: Wed, 11 Sep 2019 12:41:57 +0000 Subject: [issue35649] http.client doesn't close. Infinite loop In-Reply-To: <1546533708.33.0.81545579375.issue35649@roundup.psfhosted.org> Message-ID: <1568205717.02.0.871725125246.issue35649@roundup.psfhosted.org> Julien Palard added the comment: New changeset 62cf6981425c6a6b136c5e2abef853364f535e9d by Julien Palard (Ashwin Ramaswami) in branch 'master': bpo-35649: update http client example (GH-11441) https://github.com/python/cpython/commit/62cf6981425c6a6b136c5e2abef853364f535e9d ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:42:09 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 12:42:09 +0000 Subject: [issue35649] http.client doesn't close. Infinite loop In-Reply-To: <1546533708.33.0.81545579375.issue35649@roundup.psfhosted.org> Message-ID: <1568205729.78.0.0946650944787.issue35649@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15569 pull_request: https://github.com/python/cpython/pull/15930 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:42:16 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 12:42:16 +0000 Subject: [issue35649] http.client doesn't close. Infinite loop In-Reply-To: <1546533708.33.0.81545579375.issue35649@roundup.psfhosted.org> Message-ID: <1568205736.73.0.837364153272.issue35649@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15570 pull_request: https://github.com/python/cpython/pull/15931 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:43:04 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 11 Sep 2019 12:43:04 +0000 Subject: [issue37326] Windows LICENSE.txt do not contain libffi license In-Reply-To: <1560825416.41.0.74258395972.issue37326@roundup.psfhosted.org> Message-ID: <1568205784.7.0.916581041848.issue37326@roundup.psfhosted.org> Zachary Ware added the comment: New changeset 8fcaffb048d2359a4c06ed5d8fbbf46d3ae1a472 by Zachary Ware (Steve Dower) in branch 'master': bpo-37326: Include libffi license when available (GH-15921) https://github.com/python/cpython/commit/8fcaffb048d2359a4c06ed5d8fbbf46d3ae1a472 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:43:12 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 12:43:12 +0000 Subject: [issue37326] Windows LICENSE.txt do not contain libffi license In-Reply-To: <1560825416.41.0.74258395972.issue37326@roundup.psfhosted.org> Message-ID: <1568205792.53.0.317226338028.issue37326@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15571 pull_request: https://github.com/python/cpython/pull/15932 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:44:37 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Sep 2019 12:44:37 +0000 Subject: [issue34519] Add additional aliases for HP Roman 8 In-Reply-To: <1535377191.85.0.56676864532.issue34519@psf.upfronthosting.co.za> Message-ID: <1568205877.69.0.610777933647.issue34519@roundup.psfhosted.org> Jason R. Coombs added the comment: As an enhancement, this change should not be backported. ---------- nosy: +jaraco versions: +Python 3.9 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:45:03 2019 From: report at bugs.python.org (Ben Hsing) Date: Wed, 11 Sep 2019 12:45:03 +0000 Subject: [issue37972] unittest.mock.call does not chain __getitem__ to another _Call object In-Reply-To: <1567024381.55.0.529292089661.issue37972@roundup.psfhosted.org> Message-ID: <1568205903.3.0.0374282833318.issue37972@roundup.psfhosted.org> Ben Hsing added the comment: Agreed. I've submitted a new commit with the call chaining behavior now generalized for all dunder methods by delegating the resolution of all attributes not directly in the _Call object's __dict__ keys to the getattr method. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:47:41 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 11 Sep 2019 12:47:41 +0000 Subject: [issue35168] shlex punctuation_chars inconsistency In-Reply-To: <1541439134.06.0.788709270274.issue35168@psf.upfronthosting.co.za> Message-ID: <1568206061.85.0.545870823014.issue35168@roundup.psfhosted.org> Change by Vinay Sajip : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:47:42 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 11 Sep 2019 12:47:42 +0000 Subject: [issue35943] PyImport_GetModule() can return partially-initialized module In-Reply-To: <1549646017.22.0.395154635441.issue35943@roundup.psfhosted.org> Message-ID: <1568206062.91.0.268075542094.issue35943@roundup.psfhosted.org> Brett Cannon added the comment: New changeset 37c22206981f52ae35c28b39f7530f8438afbfdb by Brett Cannon (Joannah Nanjekye) in branch 'master': bpo-35943: Prevent PyImport_GetModule() from returning a partially-initialized module (GH-15057) https://github.com/python/cpython/commit/37c22206981f52ae35c28b39f7530f8438afbfdb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:48:02 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 11 Sep 2019 12:48:02 +0000 Subject: [issue35943] PyImport_GetModule() can return partially-initialized module In-Reply-To: <1549646017.22.0.395154635441.issue35943@roundup.psfhosted.org> Message-ID: <1568206082.25.0.424484617136.issue35943@roundup.psfhosted.org> Change by Brett Cannon : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:50:18 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 12:50:18 +0000 Subject: [issue37409] relative import without parent succeeds with builtins.__import__ In-Reply-To: <1561540286.77.0.471225789226.issue37409@roundup.psfhosted.org> Message-ID: <1568206218.19.0.400958154365.issue37409@roundup.psfhosted.org> miss-islington added the comment: New changeset f3480ad08823a9bc7df490bb5b54593d9483be70 by Miss Islington (bot) in branch '3.7': [3.8] bpo-37409: fix relative import with no parent (GH-14956) (GH-15913) https://github.com/python/cpython/commit/f3480ad08823a9bc7df490bb5b54593d9483be70 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:51:19 2019 From: report at bugs.python.org (=?utf-8?b?TMOhc3psw7MgS2lzcyBLb2xsw6Fy?=) Date: Wed, 11 Sep 2019 12:51:19 +0000 Subject: [issue37967] release candidate is not gpg signed (and missing release workflow)? In-Reply-To: <1566977917.52.0.520116504637.issue37967@roundup.psfhosted.org> Message-ID: <1568206279.35.0.240879439266.issue37967@roundup.psfhosted.org> L?szl? Kiss Koll?r added the comment: We are seeing the same issue with 3.8b4: + curl -fsSLO https://www.python.org/ftp/python/3.8.0/Python-3.8.0b4.tgz + curl -fsSLO https://www.python.org/ftp/python/3.8.0/Python-3.8.0b4.tgz.asc + gpg --verify Python-3.8.0b4.tgz.asc gpg: Signature made Thu 29 Aug 2019 10:43:07 PM UTC using RSA key ID 10250568 gpg: Can't check signature: No public key See https://github.com/pypa/manylinux/pull/344. ---------- nosy: +lkollar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:55:11 2019 From: report at bugs.python.org (=?utf-8?b?TMOhc3psw7MgS2lzcyBLb2xsw6Fy?=) Date: Wed, 11 Sep 2019 12:55:11 +0000 Subject: [issue37967] Beta GPG signature check failing In-Reply-To: <1566977917.52.0.520116504637.issue37967@roundup.psfhosted.org> Message-ID: <1568206511.41.0.899399974643.issue37967@roundup.psfhosted.org> Change by L?szl? Kiss Koll?r : ---------- title: release candidate is not gpg signed (and missing release workflow)? -> Beta GPG signature check failing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:55:44 2019 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 11 Sep 2019 12:55:44 +0000 Subject: [issue38106] Race in PyThread_release_lock - can lead to memory corruption and deadlock In-Reply-To: <1568200653.3.0.865964137512.issue38106@roundup.psfhosted.org> Message-ID: <1568206544.91.0.345001247523.issue38106@roundup.psfhosted.org> Change by Guido van Rossum : ---------- assignee: -> benjamin.peterson nosy: -gvanrossum title: Race in PyThread_release_lock - can lead to MEMORY CORRUPTION and DEADLOCK -> Race in PyThread_release_lock - can lead to memory corruption and deadlock _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 08:59:00 2019 From: report at bugs.python.org (Ben Hsing) Date: Wed, 11 Sep 2019 12:59:00 +0000 Subject: [issue37972] unittest.mock.call does not chain __getitem__ to another _Call object In-Reply-To: <1567024381.55.0.529292089661.issue37972@roundup.psfhosted.org> Message-ID: <1568206740.95.0.842246973169.issue37972@roundup.psfhosted.org> Change by Ben Hsing : ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:01:58 2019 From: report at bugs.python.org (Christian Heimes) Date: Wed, 11 Sep 2019 13:01:58 +0000 Subject: [issue37967] Beta GPG signature check failing In-Reply-To: <1566977917.52.0.520116504637.issue37967@roundup.psfhosted.org> Message-ID: <1568206918.0.0.679581367365.issue37967@roundup.psfhosted.org> Christian Heimes added the comment: It looks like you don't have ?ukasz key and your GnuPG is not configured for automatic key download. Automatic key download works for me: $ gpg --verify Python-3.8.0b4.tgz.asc gpg: assuming signed data in 'Python-3.8.0b4.tgz' gpg: Signature made 2019-08-30T00:43:07 CEST gpg: using RSA key E3FF2839C048B25C084DEBE9B26995E310250568 gpg: requesting key 0xB26995E310250568 from hkp server keys.fedoraproject.org gpg: key 0xB26995E310250568: public key "?ukasz Langa (GPG langa.pl) " imported gpg: Total number processed: 1 gpg: imported: 1 gpg: Good signature from "?ukasz Langa (GPG langa.pl) " [undefined] gpg: aka "?ukasz Langa " [unknown] gpg: aka "?ukasz Langa (Work e-mail account) " [undefined] gpg: aka "[jpeg image of size 24479]" [unknown] You could also download the key from keybase: $ gpg --fetch-keys "https://keybase.io/ambv/pgp_keys.asc?fingerprint=e3ff2839c048b25c084debe9b26995e310250568" gpg: requesting key from 'https://keybase.io/ambv/pgp_keys.asc?fingerprint=e3ff2839c048b25c084debe9b26995e310250568' gpg: key 0xB26995E310250568: "?ukasz Langa (GPG langa.pl) " not changed gpg: Total number processed: 1 gpg: unchanged: 1 ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:02:01 2019 From: report at bugs.python.org (Emily Morehouse) Date: Wed, 11 Sep 2019 13:02:01 +0000 Subject: [issue35224] PEP 572: Assignment Expressions In-Reply-To: <1542070337.94.0.788709270274.issue35224@psf.upfronthosting.co.za> Message-ID: <1568206921.84.0.0388985355149.issue35224@roundup.psfhosted.org> Change by Emily Morehouse : ---------- pull_requests: +15572 pull_request: https://github.com/python/cpython/pull/15935 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:02:28 2019 From: report at bugs.python.org (Julien Palard) Date: Wed, 11 Sep 2019 13:02:28 +0000 Subject: [issue35649] http.client doesn't close. Infinite loop In-Reply-To: <1546533708.33.0.81545579375.issue35649@roundup.psfhosted.org> Message-ID: <1568206948.05.0.192307083339.issue35649@roundup.psfhosted.org> Julien Palard added the comment: New changeset 43fb3bb223338511a7aee9b55d75af4a415134dc by Julien Palard (Miss Islington (bot)) in branch '3.8': bpo-35649: update http client example (GH-11441) (GH-15930) https://github.com/python/cpython/commit/43fb3bb223338511a7aee9b55d75af4a415134dc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:03:35 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 13:03:35 +0000 Subject: [issue37326] Windows LICENSE.txt do not contain libffi license In-Reply-To: <1560825416.41.0.74258395972.issue37326@roundup.psfhosted.org> Message-ID: <1568207015.96.0.388036930782.issue37326@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:03:49 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 11 Sep 2019 13:03:49 +0000 Subject: [issue35640] Allow passing PathLike arguments to SimpleHTTPRequestHandler In-Reply-To: <1546433621.79.0.480952807407.issue35640@roundup.psfhosted.org> Message-ID: <1568207029.73.0.764307015354.issue35640@roundup.psfhosted.org> Zachary Ware added the comment: New changeset 781266ebb60e7ac781a3e07030d92275721ff3cf by Zachary Ware (G?ry Ogam) in branch 'master': bpo-35640: Allow passing PathLike arguments to SimpleHTTPRequestHandler (GH-11398) https://github.com/python/cpython/commit/781266ebb60e7ac781a3e07030d92275721ff3cf ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:04:21 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 13:04:21 +0000 Subject: [issue36315] Unable to install Python 3.7.2 In-Reply-To: <1552741064.95.0.392565036476.issue36315@roundup.psfhosted.org> Message-ID: <1568207061.38.0.229142960645.issue36315@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:04:52 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 11 Sep 2019 13:04:52 +0000 Subject: [issue37409] relative import without parent succeeds with builtins.__import__ In-Reply-To: <1561540286.77.0.471225789226.issue37409@roundup.psfhosted.org> Message-ID: <1568207092.84.0.654676530318.issue37409@roundup.psfhosted.org> Change by Brett Cannon : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:07:39 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 11 Sep 2019 13:07:39 +0000 Subject: [issue38107] Replace direct future and task contructor calls with factories in asyncio tests In-Reply-To: <1568204163.99.0.31241530598.issue38107@roundup.psfhosted.org> Message-ID: <1568207259.76.0.536238660295.issue38107@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 9aee90018a5213e3529768e0b873955d23f5e50b by Andrew Svetlov in branch 'master': bpo-38107: Replace direct future and task contructor calls with factories in asyncio tests (GH-15928) https://github.com/python/cpython/commit/9aee90018a5213e3529768e0b873955d23f5e50b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:07:44 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 11 Sep 2019 13:07:44 +0000 Subject: [issue35640] Allow passing PathLike arguments to SimpleHTTPRequestHandler In-Reply-To: <1546433621.79.0.480952807407.issue35640@roundup.psfhosted.org> Message-ID: <1568207264.33.0.0779348941671.issue35640@roundup.psfhosted.org> Change by Zachary Ware : ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:07:48 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 13:07:48 +0000 Subject: [issue38107] Replace direct future and task contructor calls with factories in asyncio tests In-Reply-To: <1568204163.99.0.31241530598.issue38107@roundup.psfhosted.org> Message-ID: <1568207268.47.0.674863245594.issue38107@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15573 pull_request: https://github.com/python/cpython/pull/15937 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:08:09 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Sep 2019 13:08:09 +0000 Subject: [issue37305] Add MIME type for Web App Manifest In-Reply-To: <1560681661.87.0.393263592015.issue37305@roundup.psfhosted.org> Message-ID: <1568207289.86.0.811761052352.issue37305@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:08:44 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Sep 2019 13:08:44 +0000 Subject: [issue34519] Add additional aliases for HP Roman 8 In-Reply-To: <1535377191.85.0.56676864532.issue34519@psf.upfronthosting.co.za> Message-ID: <1568207324.46.0.928941794321.issue34519@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset a828514cc3715ebbc700fefa41c0ef044cbd6741 by Jason R. Coombs (Michael Osipov) in branch 'master': bpo-34519: Add additional aliases for HP Roman 8 (GH-8956) https://github.com/python/cpython/commit/a828514cc3715ebbc700fefa41c0ef044cbd6741 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:08:53 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 13:08:53 +0000 Subject: [issue34519] Add additional aliases for HP Roman 8 In-Reply-To: <1535377191.85.0.56676864532.issue34519@psf.upfronthosting.co.za> Message-ID: <1568207333.22.0.243156959016.issue34519@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15574 pull_request: https://github.com/python/cpython/pull/15938 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:09:26 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 11 Sep 2019 13:09:26 +0000 Subject: [issue38102] Document importlib.machinery.WindowsRegistryFinder.DEBUG_BUILD In-Reply-To: <1568195311.03.0.46215825189.issue38102@roundup.psfhosted.org> Message-ID: <1568207366.99.0.412691852362.issue38102@roundup.psfhosted.org> Brett Cannon added the comment: Forgot that this class is deprecated. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:09:37 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 13:09:37 +0000 Subject: [issue16296] Patch to fix building on Win32/64 under VS 2010 In-Reply-To: <1350842175.59.0.919553926658.issue16296@psf.upfronthosting.co.za> Message-ID: <1568207377.38.0.149902721511.issue16296@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:10:12 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 13:10:12 +0000 Subject: [issue9782] _multiprocessing.c warnings under 64-bit Windows In-Reply-To: <1283776985.14.0.464453735202.issue9782@psf.upfronthosting.co.za> Message-ID: <1568207412.97.0.122138146456.issue9782@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:10:14 2019 From: report at bugs.python.org (Eric Snow) Date: Wed, 11 Sep 2019 13:10:14 +0000 Subject: [issue38091] Import deadlock detection causes deadlock In-Reply-To: <1568122000.74.0.240735069302.issue38091@roundup.psfhosted.org> Message-ID: <1568207414.06.0.613532592703.issue38091@roundup.psfhosted.org> Change by Eric Snow : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:11:53 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 13:11:53 +0000 Subject: [issue9784] _msi.c warnings under 64-bit Windows In-Reply-To: <1283777742.83.0.840213462008.issue9784@psf.upfronthosting.co.za> Message-ID: <1568207513.7.0.665873457761.issue9784@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:12:25 2019 From: report at bugs.python.org (Davin Potts) Date: Wed, 11 Sep 2019 13:12:25 +0000 Subject: [issue35267] reproducible deadlock with multiprocessing.Pool In-Reply-To: <1542416799.14.0.788709270274.issue35267@psf.upfronthosting.co.za> Message-ID: <1568207545.83.0.165845417737.issue35267@roundup.psfhosted.org> Davin Potts added the comment: I second what @vstinner already said in the comments for PR11143, that this should not merely be documented. ---------- nosy: +davin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:12:30 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 13:12:30 +0000 Subject: [issue1559298] test_popen fails on Windows if installed to "Program Files" Message-ID: <1568207550.8.0.149801162519.issue1559298@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:13:11 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 13:13:11 +0000 Subject: [issue14094] ntpath.realpath() should use GetFinalPathNameByHandle() In-Reply-To: <1329954470.08.0.180096078595.issue14094@psf.upfronthosting.co.za> Message-ID: <1568207591.8.0.991523929074.issue14094@roundup.psfhosted.org> Steve Dower added the comment: As of 3.8, it (sort of) does. ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:13:57 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 13:13:57 +0000 Subject: [issue35898] The TARGETDIR variable must be provided when invoking this installer In-Reply-To: <1549369147.85.0.114900737559.issue35898@roundup.psfhosted.org> Message-ID: <1568207637.9.0.879492221339.issue35898@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:13:59 2019 From: report at bugs.python.org (Julien Palard) Date: Wed, 11 Sep 2019 13:13:59 +0000 Subject: [issue35649] http.client doesn't close. Infinite loop In-Reply-To: <1546533708.33.0.81545579375.issue35649@roundup.psfhosted.org> Message-ID: <1568207639.67.0.654471231839.issue35649@roundup.psfhosted.org> Julien Palard added the comment: New changeset 0fd8c0560b2099d2c976b17cf01cb596badc1ec6 by Julien Palard (Miss Islington (bot)) in branch '3.7': bpo-35649: update http client example (GH-11441) (GH-15931) https://github.com/python/cpython/commit/0fd8c0560b2099d2c976b17cf01cb596badc1ec6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:14:18 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 13:14:18 +0000 Subject: [issue35705] libffi support is not there for windows on ARM64 In-Reply-To: <1547121550.49.0.236282242813.issue35705@roundup.psfhosted.org> Message-ID: <1568207658.99.0.233025733001.issue35705@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:14:19 2019 From: report at bugs.python.org (Julien Palard) Date: Wed, 11 Sep 2019 13:14:19 +0000 Subject: [issue35649] http.client doesn't close. Infinite loop In-Reply-To: <1546533708.33.0.81545579375.issue35649@roundup.psfhosted.org> Message-ID: <1568207659.62.0.206914271322.issue35649@roundup.psfhosted.org> Change by Julien Palard : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:16:14 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 13:16:14 +0000 Subject: [issue33459] Fix "tuple display" mention in Expressions In-Reply-To: <1525994212.08.0.682650639539.issue33459@psf.upfronthosting.co.za> Message-ID: <1568207774.89.0.732138470625.issue33459@roundup.psfhosted.org> miss-islington added the comment: New changeset dc269971091710563a0d730a0d4b084901826c15 by Miss Islington (bot) (Andre Delfino) in branch 'master': bpo-33459: Fix "tuple displays" term in Expressions.rst (GH-6760) https://github.com/python/cpython/commit/dc269971091710563a0d730a0d4b084901826c15 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:16:23 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 13:16:23 +0000 Subject: [issue33459] Fix "tuple display" mention in Expressions In-Reply-To: <1525994212.08.0.682650639539.issue33459@psf.upfronthosting.co.za> Message-ID: <1568207783.23.0.0658480012006.issue33459@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15575 pull_request: https://github.com/python/cpython/pull/15939 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:16:30 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 13:16:30 +0000 Subject: [issue33459] Fix "tuple display" mention in Expressions In-Reply-To: <1525994212.08.0.682650639539.issue33459@psf.upfronthosting.co.za> Message-ID: <1568207790.33.0.497770380487.issue33459@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15576 pull_request: https://github.com/python/cpython/pull/15940 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:17:15 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 13:17:15 +0000 Subject: [issue35981] shutil make_archive create wrong file when base name contains dots at end In-Reply-To: <1550042124.47.0.589800343777.issue35981@roundup.psfhosted.org> Message-ID: <1568207835.76.0.680614932504.issue35981@roundup.psfhosted.org> Steve Dower added the comment: We can fix this - trailing dots before an extension are supported. Probably the best fix is to defer the "abspath" call until after the extension has been added (or apply "abspath" to the directory and then put the base name back on). ---------- versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:21:07 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 13:21:07 +0000 Subject: [issue33944] Deprecate and remove pth files In-Reply-To: <1529688140.44.0.56676864532.issue33944@psf.upfronthosting.co.za> Message-ID: <1568208067.52.0.621312935846.issue33944@roundup.psfhosted.org> miss-islington added the comment: New changeset f9b5840fb4497a9e2ba2c1f01ad0dafba04c8496 by Miss Islington (bot) (native-api) in branch 'master': bpo-33944: note about the intended use of code in .pth files (GH-10131) https://github.com/python/cpython/commit/f9b5840fb4497a9e2ba2c1f01ad0dafba04c8496 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:21:17 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 13:21:17 +0000 Subject: [issue33944] Deprecate and remove pth files In-Reply-To: <1529688140.44.0.56676864532.issue33944@psf.upfronthosting.co.za> Message-ID: <1568208077.33.0.665648523678.issue33944@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15577 pull_request: https://github.com/python/cpython/pull/15942 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:22:11 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Sep 2019 13:22:11 +0000 Subject: [issue36711] duplicate method definition in Lib/email/feedparser.py In-Reply-To: <1556118864.95.0.640018454718.issue36711@roundup.psfhosted.org> Message-ID: <1568208131.46.0.301086679665.issue36711@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset b239ab9107cd5bcbfbfa3b46290191298718ced3 by Benjamin Peterson (Zackery Spytz) in branch '2.7': closes bpo-36711: Remove duplicate method in Lib/email/feedparser.py. (GH-14801) https://github.com/python/cpython/commit/b239ab9107cd5bcbfbfa3b46290191298718ced3 ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:24:30 2019 From: report at bugs.python.org (Lisa Roach) Date: Wed, 11 Sep 2019 13:24:30 +0000 Subject: [issue38108] Everything in Mock should inherit from Base Message-ID: <1568208270.51.0.869895956527.issue38108@roundup.psfhosted.org> New submission from Lisa Roach : Everything within Mock should be inheriting from the top-level parent class, Base (and properly call super). For multiple inheritance to work correctly they all should be inheriting from the same parent class ultimately. Classes that need update: MagicMixin AsyncMagicMixin NonCallableMock (instance = object.__new__(new) should be switched to a super call here) ---------- assignee: lisroach messages: 351863 nosy: ezio.melotti, lisroach, michael.foord, xtreak priority: normal severity: normal status: open title: Everything in Mock should inherit from Base versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:26:10 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Sep 2019 13:26:10 +0000 Subject: [issue36712] duplicate method definition in Lib/email/test/test_email_renamed.py In-Reply-To: <1556119037.17.0.0080436933891.issue36712@roundup.psfhosted.org> Message-ID: <1568208370.6.0.113330398826.issue36712@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset f9db011c323556ec68761263c6b91b2f75ca95ba by Benjamin Peterson (Zackery Spytz) in branch '2.7': closes bpo-36712: Fix duplicate method in Lib/email/test/test_email_renamed.py. (GH-14800) https://github.com/python/cpython/commit/f9db011c323556ec68761263c6b91b2f75ca95ba ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:26:52 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Sep 2019 13:26:52 +0000 Subject: [issue31163] Return destination path in Path.rename and Path.replace In-Reply-To: <1502292744.48.0.627996317333.issue31163@psf.upfronthosting.co.za> Message-ID: <1568208412.47.0.402436129769.issue31163@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset 088a09af4bdeff52b9dedeb7acd1e82069f37d98 by Jason R. Coombs (hui shang) in branch 'master': bpo-31163: Added return values to pathlib.Path instance's rename and replace methods. (GH-13582) https://github.com/python/cpython/commit/088a09af4bdeff52b9dedeb7acd1e82069f37d98 ---------- nosy: +jaraco _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:27:02 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 13:27:02 +0000 Subject: [issue31163] Return destination path in Path.rename and Path.replace In-Reply-To: <1502292744.48.0.627996317333.issue31163@psf.upfronthosting.co.za> Message-ID: <1568208422.99.0.368050097269.issue31163@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15578 pull_request: https://github.com/python/cpython/pull/15944 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:29:42 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 11 Sep 2019 13:29:42 +0000 Subject: [issue18697] Unify arguments names in Unicode object C API documentation In-Reply-To: <1376074126.58.0.40251146149.issue18697@psf.upfronthosting.co.za> Message-ID: <1568208582.24.0.136158521519.issue18697@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- versions: +Python 3.8, Python 3.9 -Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:31:14 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 13:31:14 +0000 Subject: [issue34519] Add additional aliases for HP Roman 8 In-Reply-To: <1535377191.85.0.56676864532.issue34519@psf.upfronthosting.co.za> Message-ID: <1568208674.16.0.367736614024.issue34519@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15579 pull_request: https://github.com/python/cpython/pull/15945 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:31:30 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 13:31:30 +0000 Subject: [issue37326] Windows LICENSE.txt do not contain libffi license In-Reply-To: <1560825416.41.0.74258395972.issue37326@roundup.psfhosted.org> Message-ID: <1568208690.31.0.388789613206.issue37326@roundup.psfhosted.org> miss-islington added the comment: New changeset da38ec1d4862ffb58faec41ed367719e81801766 by Miss Islington (bot) in branch '3.8': bpo-37326: Include libffi license when available (GH-15921) https://github.com/python/cpython/commit/da38ec1d4862ffb58faec41ed367719e81801766 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:32:07 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Sep 2019 13:32:07 +0000 Subject: [issue37305] Add MIME type for Web App Manifest In-Reply-To: <1560681661.87.0.393263592015.issue37305@roundup.psfhosted.org> Message-ID: <1568208727.6.0.319618806099.issue37305@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset 4b41745b3c65ef4807cd1108dce12d3e0c173f20 by Jason R. Coombs (Filip ?) in branch 'master': bpo-37305: add MIME type for Web App Manifest (#14199) https://github.com/python/cpython/commit/4b41745b3c65ef4807cd1108dce12d3e0c173f20 ---------- nosy: +jaraco _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:32:19 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 13:32:19 +0000 Subject: [issue37305] Add MIME type for Web App Manifest In-Reply-To: <1560681661.87.0.393263592015.issue37305@roundup.psfhosted.org> Message-ID: <1568208739.91.0.396443849253.issue37305@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15580 pull_request: https://github.com/python/cpython/pull/15946 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:33:09 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 11 Sep 2019 13:33:09 +0000 Subject: [issue38054] enhance pdb.set_trace() to run when the specified condition is true In-Reply-To: <1567939455.37.0.149072874331.issue38054@roundup.psfhosted.org> Message-ID: <1568208789.67.0.22938459258.issue38054@roundup.psfhosted.org> Zachary Ware added the comment: I was actually leaning in favor of this, but Jason's examples are very compelling and require no changes to other `breakpoint()`-compatible debuggers to work as expected. Thanks for the idea, though! ---------- nosy: +zach.ware resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:35:40 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 11 Sep 2019 13:35:40 +0000 Subject: [issue37151] Calling code cleanup after PEP 590 In-Reply-To: <1559659244.35.0.514840211553.issue37151@roundup.psfhosted.org> Message-ID: <1568208940.93.0.741281837305.issue37151@roundup.psfhosted.org> Petr Viktorin added the comment: All linked PRs are merged, so I'm closing this. Feel free to reopen if there's more! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:35:59 2019 From: report at bugs.python.org (Ronan Lamy) Date: Wed, 11 Sep 2019 13:35:59 +0000 Subject: [issue38109] Missing constants in Lib/stat.py Message-ID: <1568208959.37.0.605416078815.issue38109@roundup.psfhosted.org> New submission from Ronan Lamy : According to the docs, stat should include constants S_IFDOOR, S_IFPORT, S_IFWHT as well as the related S_IS... functions. However, these are only defined in _stat. I know that stat is a bit special (see bpo-11016), but that goes against PEP 399. ---------- components: Library (Lib) messages: 351870 nosy: Ronan.Lamy priority: normal severity: normal status: open title: Missing constants in Lib/stat.py versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:36:25 2019 From: report at bugs.python.org (Eric Snow) Date: Wed, 11 Sep 2019 13:36:25 +0000 Subject: [issue12128] Allow an abc.abstractproperty to be overridden by an instance data attribute In-Reply-To: <1305911703.09.0.134249941544.issue12128@psf.upfronthosting.co.za> Message-ID: <1568208985.87.0.0191347946259.issue12128@roundup.psfhosted.org> Eric Snow added the comment: I'm guessing it should have been https://mail.python.org/pipermail/python-list/2011-May/604497.html. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:36:53 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 11 Sep 2019 13:36:53 +0000 Subject: [issue33944] Deprecate and remove pth files In-Reply-To: <1529688140.44.0.56676864532.issue33944@psf.upfronthosting.co.za> Message-ID: <1568209013.53.0.31046046118.issue33944@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset d1d968d45df1a900b0600c4d296b180aa978336d by St?phane Wirtel (Miss Islington (bot)) in branch '3.8': bpo-33944: note about the intended use of code in .pth files (GH-10131) (GH-15942) https://github.com/python/cpython/commit/d1d968d45df1a900b0600c4d296b180aa978336d ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:37:52 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 11 Sep 2019 13:37:52 +0000 Subject: [issue33459] Fix "tuple display" mention in Expressions In-Reply-To: <1525994212.08.0.682650639539.issue33459@psf.upfronthosting.co.za> Message-ID: <1568209072.2.0.699574074429.issue33459@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 4c2fa5c474af81487c7a8d4188f9afd80d4d769b by St?phane Wirtel (Miss Islington (bot)) in branch '3.7': bpo-33459: Fix "tuple displays" term in Expressions.rst (GH-6760) (GH-15939) https://github.com/python/cpython/commit/4c2fa5c474af81487c7a8d4188f9afd80d4d769b ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:38:20 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 11 Sep 2019 13:38:20 +0000 Subject: [issue33459] Fix "tuple display" mention in Expressions In-Reply-To: <1525994212.08.0.682650639539.issue33459@psf.upfronthosting.co.za> Message-ID: <1568209100.88.0.403395950885.issue33459@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 4d2babd99022bf43dc659d9fe5700c1fc13808c4 by St?phane Wirtel (Miss Islington (bot)) in branch '3.8': bpo-33459: Fix "tuple displays" term in Expressions.rst (GH-6760) (GH-15940) https://github.com/python/cpython/commit/4d2babd99022bf43dc659d9fe5700c1fc13808c4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:40:01 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 11 Sep 2019 13:40:01 +0000 Subject: [issue38110] Use fdwalk() within os.closerange() impl if available Message-ID: <1568209201.53.0.0873310068645.issue38110@roundup.psfhosted.org> New submission from Gregory P. Smith : On POSIX platforms that support the fdwalk() API, use it within the os.closerange() implementation. ---------- components: Demos and Tools messages: 351875 nosy: gregory.p.smith priority: normal severity: normal stage: patch review status: open title: Use fdwalk() within os.closerange() impl if available type: performance versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:40:16 2019 From: report at bugs.python.org (Jakub Kulik) Date: Wed, 11 Sep 2019 13:40:16 +0000 Subject: [issue38110] Use fdwalk() within os.closerange() impl if available In-Reply-To: <1568209201.53.0.0873310068645.issue38110@roundup.psfhosted.org> Message-ID: <1568209216.3.0.286248309119.issue38110@roundup.psfhosted.org> Change by Jakub Kulik : ---------- keywords: +patch pull_requests: +15581 pull_request: https://github.com/python/cpython/pull/15224 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:42:00 2019 From: report at bugs.python.org (Lisa Roach) Date: Wed, 11 Sep 2019 13:42:00 +0000 Subject: [issue38093] Update MagicMock __aenter__ and __aexit__ to return AsyncMock's In-Reply-To: <1568126561.19.0.234964443085.issue38093@roundup.psfhosted.org> Message-ID: <1568209320.63.0.883566617005.issue38093@roundup.psfhosted.org> Change by Lisa Roach : ---------- keywords: +patch pull_requests: +15582 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/15947 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:42:08 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Sep 2019 13:42:08 +0000 Subject: [issue37252] devpoll test failures on Solaris In-Reply-To: <1560349214.7.0.192767880732.issue37252@roundup.psfhosted.org> Message-ID: <1568209328.56.0.058398234736.issue37252@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 95da826db9ed4acbc81f32296f14429c06bd2124 by Benjamin Peterson (Jakub Kul?k) in branch 'master': closes bpo-37252: Fix devpoll tests. (GH-14017) https://github.com/python/cpython/commit/95da826db9ed4acbc81f32296f14429c06bd2124 ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:42:18 2019 From: report at bugs.python.org (Ben Hsing) Date: Wed, 11 Sep 2019 13:42:18 +0000 Subject: [issue37972] unittest.mock.call does not chain __getitem__ to another _Call object In-Reply-To: <1567024381.55.0.529292089661.issue37972@roundup.psfhosted.org> Message-ID: <1568209338.43.0.764432400252.issue37972@roundup.psfhosted.org> Ben Hsing added the comment: Correction. I've now done this by delegating the resolution of attributes belonging to the tuple class to _Call.__getattr__ instead. Passed all build tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:42:21 2019 From: report at bugs.python.org (Eric Snow) Date: Wed, 11 Sep 2019 13:42:21 +0000 Subject: [issue37888] Sub-interpreters : Confusing docs about state after calling Py_NewInterpreter() In-Reply-To: <1566241522.51.0.41054137805.issue37888@roundup.psfhosted.org> Message-ID: <1568209341.18.0.29891175204.issue37888@roundup.psfhosted.org> Change by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:42:25 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 13:42:25 +0000 Subject: [issue37252] devpoll test failures on Solaris In-Reply-To: <1560349214.7.0.192767880732.issue37252@roundup.psfhosted.org> Message-ID: <1568209345.19.0.352404345078.issue37252@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15583 pull_request: https://github.com/python/cpython/pull/15948 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:44:16 2019 From: report at bugs.python.org (Eric Snow) Date: Wed, 11 Sep 2019 13:44:16 +0000 Subject: [issue37872] Move _Py_IDENTIFIER statics in Python/import.c to top of the file In-Reply-To: <1565961670.68.0.815730473417.issue37872@roundup.psfhosted.org> Message-ID: <1568209456.44.0.444005008573.issue37872@roundup.psfhosted.org> Eric Snow added the comment: Yeah, I'm fine with dropping this. In the file we have some global and some local, so my suggestion was to consolidate a little. However, it mostly doesn't matter. :) ---------- resolution: -> rejected stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:44:44 2019 From: report at bugs.python.org (Eryk Sun) Date: Wed, 11 Sep 2019 13:44:44 +0000 Subject: [issue37993] os.path.realpath on Windows resolves mapped network drives In-Reply-To: <1567238675.05.0.269696747191.issue37993@roundup.psfhosted.org> Message-ID: <1568209484.28.0.370094339457.issue37993@roundup.psfhosted.org> Eryk Sun added the comment: > It's a few steps deep, but DefineDosDeviceW() [1] specifies that it > creates junctions, and while it's not necessarily obvious how to get > from SUBST to that page, Wikipedia managed it [2]. Take care to not conflate device junctions with the file-system reparse point that we commonly call a junction (aka a "mount point"). The term "junction" is used generically in the DefineDosDeviceW docs as well as in "Defining an MS-DOS Device Name". It's not supporting your earlier statement: "If we can easily tell the difference between directory junctions and mapped drives, given that they are both identical types of reparse points". Junctions in the object namespace have nothing to do with file-system reparse points. A junction is a joining between two things -- in this case between two names in the object namespace. We can explore the NT object namespace via Sysinternals WinObj. The Object Manager maintains this namespace as a nested tree of Directory objects that contain other named kernel objects (e.g. an I/O Manager "Device", a Configuration Manager "Key", a Memory Manager "Section", a Process Manager "Job"). It also implements a named SymbolicLink object type, which is the basis for device junctions. SymbolicLink objects get reparsed by the Object Manager. The target path is a new absolute path in the object namespace. The system calls for working with SymbolicLink objects are as follows: NtCreateSymbolicLinkObject - Create a SymbolicLink object with the provided name, attributes and target path, and return a handle for it. NtOpenSymbolicLinkObject - Return a handle for an existing SymbolicLink object. NtQuerySymbolicLinkObject - Get the target path of a SymbolicLink object. NtMakeTemporaryObject - Make a SymbolicLink object temporary, so that it's automatically unlinked from its parent Directory when no longer referenced. They can be created with any name in any object directory. But specifically for device junctions they get created in particular object directories (discussed below) and often with DOS drive names "A:" - "Z:". Of course, other names are also used such as "CON" -> "\Device\ConDrv\Console", "NUL" -> "\Device\Null", "PIPE" -> "\Device\NamedPipe", and "PhysicalDrive0" -> "\Device\Harddisk0\DR0". The target path isn't limited to just an object in the object namespace. It can include a remaining path that's parsed by the object. For example, the target could be "\Device\HarddiskVolume2\Windows\System32", where the object is "\Device\HarddiskVolume2" and the remaining path is "\Windows\System32". (It could just as well target a file-system file such as "kernel32.dll" in that directory.) The drives created by subst.exe take advantage of this capability to link directly to file-system directories. But it's noteworthy that this is a weird sort of drive that causes bugs in some API functions such as GetVolumePathNameW, which assumes a DOS drive is a junction to a volume device, not a file-system directory. Each logon session has a local object Directory for its device junctions (AKA "DOS devices"). It makes sense for local devices to be associated with a logon session because credentials for mapped drives are associated with the user's logon session. The local Directory is located at "\Sessions\0\DosDevices\". It's in desktop session 0 (non-interactive services) because logon sessions aren't necessarily limited to a single desktop session. The local directory shadows the system global directory, "\Global??". Name lookup first checks the local directory and then the global one. The SYSTEM logon uses "\Global??" as its local directory, so defining a device junction in a SYSTEM context always creates a global junction. A user's local directory is typically used just for mapped and subst drives. The local device directory for the current user is accessible as "\??\", which the Object Manager reserves for this case. So native code doesn't need to look up the logon-session ID and create the "\Session\0\DosDevices\" path. Neither does the Object Manager itself because the local and global directories are cached per process and per logon session. The local directory also contains a "Global" SymbolicLink to the global directory. The equivalent of NT "\??\" in the Windows API is either "\\?\" (non-normalized path) or "\\.\" (normalized path). For example, we can access r"\\?\Global\Z:", which may not be the same device as "\\?\Z:". DefineDosDeviceW sends an LPC request to the desktop session server, csrss.exe, in order to define a device junction. This request is handled by basesrv!BaseSrvDefineDosDevice. As necessary, BaseSrvDefineDosDevice impersonates the caller to ensure it creates a local junction in the right directory. BaseSrvDefineDosDevice either redefines or creates a new SymbolicLink object. If the device junction already exists, it tries to redefine the target. First it queries the existing SymbolicLink to read its target. This allows a trick that takes advantage of NT counted strings. The buffer is made large enough for the new target path and the old path, separated by a NUL. The string's length includes only the new target path, but its maximum length includes all previous target paths. Thus we can "push" a new mapping for a junction (e.g. drive "Z:") and "pop" it off to restore the previous mapping when it's no longer needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:47:16 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 13:47:16 +0000 Subject: [issue33166] os.cpu_count() returns wrong number of processors on specific systems Message-ID: <1568209636.26.0.757310487962.issue33166@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +15584 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15949 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:47:43 2019 From: report at bugs.python.org (Redcxx) Date: Wed, 11 Sep 2019 13:47:43 +0000 Subject: [issue38111] Error while building Python from source Message-ID: <1568209663.11.0.274214516349.issue38111@roundup.psfhosted.org> New submission from Redcxx : Python failed `make` when building from source if `--enabled-share` is pass in when running `./configure`. ```` ...(some output which seem irrevelent) /bin/ld: /home/e38160wl/Python3.7.4/local/lib/libssl.a(s3_meth.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC /home/e38160wl/Python3.7.4/local/lib/libssl.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status ln: failed to access ?libpython3.7m.so.1.0?: No such file or directory make: *** [libpython3.7m.so] Error 1 ```` I tried adding `CFLAGS="-fPIC"` as parameter of `./configure` but it does not make any changes ---------- components: Build messages: 351880 nosy: Redcxx priority: normal severity: normal status: open title: Error while building Python from source type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:49:34 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 11 Sep 2019 13:49:34 +0000 Subject: [issue37651] Change of inheritance of asyncio.CancelledError needs documentation In-Reply-To: <1563802582.63.0.387759445278.issue37651@roundup.psfhosted.org> Message-ID: <1568209774.49.0.610932689863.issue37651@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks for the report. I think this documentation part is missed in the linked PR. I will prepare a PR that adds the versionchanged directive. Perhaps we can also remove the important section or perhaps just keep the try..except example to ensure users are aware of this. I will prepare a PR for this change. ---------- components: +asyncio nosy: +asvetlov, lisroach, xtreak, yselivanov versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:49:43 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 11 Sep 2019 13:49:43 +0000 Subject: [issue37651] Change of inheritance of asyncio.CancelledError needs documentation In-Reply-To: <1563802582.63.0.387759445278.issue37651@roundup.psfhosted.org> Message-ID: <1568209783.14.0.733174582284.issue37651@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +15585 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15950 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:52:54 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 13:52:54 +0000 Subject: [issue32592] Drop support of Windows Vista in Python 3.8 In-Reply-To: <1516268238.05.0.467229070634.issue32592@psf.upfronthosting.co.za> Message-ID: <1568209974.0.0.0277631509083.issue32592@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +15586 pull_request: https://github.com/python/cpython/pull/15951 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:54:37 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 13:54:37 +0000 Subject: [issue33166] os.cpu_count() returns wrong number of processors on specific systems Message-ID: <1568210077.95.0.259294403707.issue33166@roundup.psfhosted.org> Change by Steve Dower : ---------- versions: +Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:55:16 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 13:55:16 +0000 Subject: [issue32592] Drop support of Windows Vista and 7 in Python 3.9 In-Reply-To: <1516268238.05.0.467229070634.issue32592@psf.upfronthosting.co.za> Message-ID: <1568210116.62.0.892814423653.issue32592@roundup.psfhosted.org> Steve Dower added the comment: I'll at least make a start by updating the minimum API version. ---------- title: Drop support of Windows Vista in Python 3.8 -> Drop support of Windows Vista and 7 in Python 3.9 versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:56:06 2019 From: report at bugs.python.org (Caleb Hattingh) Date: Wed, 11 Sep 2019 13:56:06 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1568210166.76.0.363661129752.issue34037@roundup.psfhosted.org> Change by Caleb Hattingh : ---------- nosy: +cjrh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:56:19 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Sep 2019 13:56:19 +0000 Subject: [issue36919] Exception from 'compile' reports a newline char not present in input In-Reply-To: <1557865717.35.0.0613603941425.issue36919@roundup.psfhosted.org> Message-ID: <1568210179.04.0.288888058363.issue36919@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:57:35 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Sep 2019 13:57:35 +0000 Subject: [issue36919] Exception from 'compile' reports a newline char not present in input In-Reply-To: <1557865717.35.0.0613603941425.issue36919@roundup.psfhosted.org> Message-ID: <1568210255.84.0.874568230801.issue36919@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset b6643dcfc26859f935e4b3a6a2a203e8ef5320e2 by Jason R. Coombs (Pavel Koneski) in branch 'master': bpo-36919: make test_source_encoding.test_issue2301 implementation-independent (#13639) https://github.com/python/cpython/commit/b6643dcfc26859f935e4b3a6a2a203e8ef5320e2 ---------- nosy: +jaraco _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:57:44 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 13:57:44 +0000 Subject: [issue36919] Exception from 'compile' reports a newline char not present in input In-Reply-To: <1557865717.35.0.0613603941425.issue36919@roundup.psfhosted.org> Message-ID: <1568210264.01.0.294610309196.issue36919@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15587 pull_request: https://github.com/python/cpython/pull/15952 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:57:50 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 13:57:50 +0000 Subject: [issue36919] Exception from 'compile' reports a newline char not present in input In-Reply-To: <1557865717.35.0.0613603941425.issue36919@roundup.psfhosted.org> Message-ID: <1568210270.57.0.373129302371.issue36919@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15588 pull_request: https://github.com/python/cpython/pull/15953 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:58:45 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 13:58:45 +0000 Subject: [issue37488] Document the "gotcha" behaviors in utcnow() and utcfromtimestamp() In-Reply-To: <1562083298.89.0.799843667155.issue37488@roundup.psfhosted.org> Message-ID: <1568210325.08.0.33689176443.issue37488@roundup.psfhosted.org> miss-islington added the comment: New changeset 1a53c785e62e00bad87ae19466c3a32ebcebb915 by Miss Islington (bot) (Joannah Nanjekye) in branch 'master': bpo-37488 : Document a warning for datetime.utcnow() and utcfromtimestamp() (GH-15773) https://github.com/python/cpython/commit/1a53c785e62e00bad87ae19466c3a32ebcebb915 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:59:40 2019 From: report at bugs.python.org (Julien Palard) Date: Wed, 11 Sep 2019 13:59:40 +0000 Subject: [issue23460] Decimals do not obey ':g' exponential notation formatting rules In-Reply-To: <1423847721.13.0.666007782647.issue23460@psf.upfronthosting.co.za> Message-ID: <1568210380.56.0.966509880772.issue23460@roundup.psfhosted.org> Julien Palard added the comment: New changeset 1660a61a105bcd62e2dfa77885959a8992e9f14e by Julien Palard (Brennan D Baraban) in branch 'master': bpo-23460: Fix documentation for decimal string :g formatting (GH-11850) https://github.com/python/cpython/commit/1660a61a105bcd62e2dfa77885959a8992e9f14e ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 09:59:48 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 13:59:48 +0000 Subject: [issue23460] Decimals do not obey ':g' exponential notation formatting rules In-Reply-To: <1423847721.13.0.666007782647.issue23460@psf.upfronthosting.co.za> Message-ID: <1568210388.98.0.82146109367.issue23460@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15589 pull_request: https://github.com/python/cpython/pull/15954 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:00:00 2019 From: report at bugs.python.org (Lisa Roach) Date: Wed, 11 Sep 2019 14:00:00 +0000 Subject: [issue38108] Everything in Mock should inherit from Base In-Reply-To: <1568208270.51.0.869895956527.issue38108@roundup.psfhosted.org> Message-ID: <1568210400.16.0.567840038934.issue38108@roundup.psfhosted.org> Lisa Roach added the comment: Also: _AsyncIterator _AwaitEvent Some of the code in AsyncMagicMixin might be able to be simplified if we inherit from MagicMixin instead, right now we might be duplicating work. In general we have to watch out for duplication/overwriting of attributes with this change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:00:27 2019 From: report at bugs.python.org (Roundup Robot) Date: Wed, 11 Sep 2019 14:00:27 +0000 Subject: [issue37629] Imghdr doesnt recognise some jpeg In-Reply-To: <1563529828.49.0.547849955653.issue37629@roundup.psfhosted.org> Message-ID: <1568210427.54.0.62092947949.issue37629@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +15590 pull_request: https://github.com/python/cpython/pull/15955 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:01:19 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 11 Sep 2019 14:01:19 +0000 Subject: [issue38112] Compileall improvements Message-ID: <1568210479.53.0.901531773072.issue38112@roundup.psfhosted.org> New submission from Petr Viktorin : Hello, In Fedora, we've long used a Bash script to compile modules to bytecode, as the compileall module was historically unsuitable. Recently, Lum?r re-wrote our enhancements to compileall, and published the result as compileall2 on PyPI. We'd like to get the improvements back into the standard library so everyone can benefit. The improvements are: - Raise the default recursion limit - Control of the path baked into the *.pyc file (`-s` to strip a prefix; `-p` to prepend a new one) to support different build/install locations. - Compiling for multiple optimization levels at once (by specifying -o multiple times) A PR should follow shortly. ---------- components: Installation messages: 351887 nosy: petr.viktorin priority: normal severity: normal status: open title: Compileall improvements _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:04:05 2019 From: report at bugs.python.org (Eric Snow) Date: Wed, 11 Sep 2019 14:04:05 +0000 Subject: [issue38091] Import deadlock detection causes deadlock In-Reply-To: <1568122000.74.0.240735069302.issue38091@roundup.psfhosted.org> Message-ID: <1568210645.75.0.376269282114.issue38091@roundup.psfhosted.org> Change by Eric Snow : ---------- nosy: +brett.cannon, eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:04:37 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Sep 2019 14:04:37 +0000 Subject: [issue37935] Improve performance of pathlib.scandir() In-Reply-To: <1566628301.14.0.386871182456.issue37935@roundup.psfhosted.org> Message-ID: <1568210677.92.0.553854684113.issue37935@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +15591 pull_request: https://github.com/python/cpython/pull/15956 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:05:11 2019 From: report at bugs.python.org (Dino Viehland) Date: Wed, 11 Sep 2019 14:05:11 +0000 Subject: [issue38113] Make ast module PEP-384 compatible Message-ID: <1568210711.23.0.951109613555.issue38113@roundup.psfhosted.org> New submission from Dino Viehland : Remove various static state from the ast module and make it PEP-384 compatible. This will help make it be more compatible w/ subinterpreters and make it re-usable by 3rd party implementations. ---------- assignee: dino.viehland components: Extension Modules messages: 351888 nosy: dino.viehland priority: normal severity: normal status: open title: Make ast module PEP-384 compatible versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:06:52 2019 From: report at bugs.python.org (Dino Viehland) Date: Wed, 11 Sep 2019 14:06:52 +0000 Subject: [issue38113] Make ast module PEP-384 compatible In-Reply-To: <1568210711.23.0.951109613555.issue38113@roundup.psfhosted.org> Message-ID: <1568210812.1.0.173713049252.issue38113@roundup.psfhosted.org> Change by Dino Viehland : ---------- keywords: +patch pull_requests: +15592 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15957 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:07:17 2019 From: report at bugs.python.org (Dino Viehland) Date: Wed, 11 Sep 2019 14:07:17 +0000 Subject: [issue38113] Make ast module PEP-384 compatible In-Reply-To: <1568210711.23.0.951109613555.issue38113@roundup.psfhosted.org> Message-ID: <1568210837.09.0.82457390295.issue38113@roundup.psfhosted.org> Change by Dino Viehland : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:08:59 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 11 Sep 2019 14:08:59 +0000 Subject: [issue33187] Document ElementInclude (XInclude) support in ElementTree In-Reply-To: <1522427694.7.0.467229070634.issue33187@psf.upfronthosting.co.za> Message-ID: <1568210939.93.0.0160168669918.issue33187@roundup.psfhosted.org> Change by Stefan Behnel : ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:09:56 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 11 Sep 2019 14:09:56 +0000 Subject: [issue33187] Document ElementInclude (XInclude) support in ElementTree In-Reply-To: <1522427694.7.0.467229070634.issue33187@psf.upfronthosting.co.za> Message-ID: <1568210996.14.0.73450701983.issue33187@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset 97b817eae34b77be1ced382e15098a112f547848 by Stefan Behnel (Anjali Bansal) in branch 'master': bpo-33187: Document ElementInclude (XInclude) support in ElementTree (GH-8861) https://github.com/python/cpython/commit/97b817eae34b77be1ced382e15098a112f547848 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:10:06 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 11 Sep 2019 14:10:06 +0000 Subject: [issue38110] Use fdwalk() within os.closerange() impl if available In-Reply-To: <1568209201.53.0.0873310068645.issue38110@roundup.psfhosted.org> Message-ID: <1568211006.86.0.496264422616.issue38110@roundup.psfhosted.org> Gregory P. Smith added the comment: contribution from Jakub Kul?k (see the PR) ---------- assignee: -> gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:11:22 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 14:11:22 +0000 Subject: [issue33187] Document ElementInclude (XInclude) support in ElementTree In-Reply-To: <1522427694.7.0.467229070634.issue33187@psf.upfronthosting.co.za> Message-ID: <1568211082.34.0.514543281904.issue33187@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15593 pull_request: https://github.com/python/cpython/pull/15958 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:12:54 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 14:12:54 +0000 Subject: [issue37651] Change of inheritance of asyncio.CancelledError needs documentation In-Reply-To: <1563802582.63.0.387759445278.issue37651@roundup.psfhosted.org> Message-ID: <1568211174.67.0.436550439841.issue37651@roundup.psfhosted.org> miss-islington added the comment: New changeset 7b69069e9aa0047a0dbe8af1a67aa2b355dc68d8 by Miss Islington (bot) (Xtreak) in branch 'master': bpo-37651: Document CancelledError is now a subclass of BaseException (GH-15950) https://github.com/python/cpython/commit/7b69069e9aa0047a0dbe8af1a67aa2b355dc68d8 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:12:57 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Sep 2019 14:12:57 +0000 Subject: [issue31163] Return destination path in Path.rename and Path.replace In-Reply-To: <1502292744.48.0.627996317333.issue31163@psf.upfronthosting.co.za> Message-ID: <1568211177.0.0.939044587364.issue31163@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset cbd7b2a399a8ff2ed9994c380b07ef598892b6b1 by Jason R. Coombs (Miss Islington (bot)) in branch '3.8': bpo-31163: Added return values to pathlib.Path instance's rename and replace methods. (GH-13582) (GH-15944) https://github.com/python/cpython/commit/cbd7b2a399a8ff2ed9994c380b07ef598892b6b1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:13:03 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 14:13:03 +0000 Subject: [issue37651] Change of inheritance of asyncio.CancelledError needs documentation In-Reply-To: <1563802582.63.0.387759445278.issue37651@roundup.psfhosted.org> Message-ID: <1568211183.13.0.28362431167.issue37651@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15594 pull_request: https://github.com/python/cpython/pull/15959 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:13:34 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Sep 2019 14:13:34 +0000 Subject: [issue37305] Add MIME type for Web App Manifest In-Reply-To: <1560681661.87.0.393263592015.issue37305@roundup.psfhosted.org> Message-ID: <1568211214.33.0.482600033228.issue37305@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset 35d0934040223f1360b2b343005fcc8ebbc65c1a by Jason R. Coombs (Miss Islington (bot)) in branch '3.8': bpo-37305: add MIME type for Web App Manifest (GH-14199) (#15946) https://github.com/python/cpython/commit/35d0934040223f1360b2b343005fcc8ebbc65c1a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:13:57 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Sep 2019 14:13:57 +0000 Subject: [issue34519] Add additional aliases for HP Roman 8 In-Reply-To: <1535377191.85.0.56676864532.issue34519@psf.upfronthosting.co.za> Message-ID: <1568211237.71.0.504370886327.issue34519@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset fef5bdc645bc5d037505e3da2965dfabb73f58eb by Jason R. Coombs (Miss Islington (bot)) in branch '3.8': bpo-34519: Add additional aliases for HP Roman 8 (GH-8956) (GH-15945) https://github.com/python/cpython/commit/fef5bdc645bc5d037505e3da2965dfabb73f58eb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:16:42 2019 From: report at bugs.python.org (Eric Snow) Date: Wed, 11 Sep 2019 14:16:42 +0000 Subject: [issue35381] posixmodule: convert statically allocated types (DirEntryType & ScandirIteratorType) to heap-allocated types In-Reply-To: <1543818839.39.0.788709270274.issue35381@psf.upfronthosting.co.za> Message-ID: <1568211402.91.0.742609277958.issue35381@roundup.psfhosted.org> Eric Snow added the comment: @Jeroen, see Dino's expalantion in https://bugs.python.org/issue38075#msg351627 (relative to the "random" module). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:17:35 2019 From: report at bugs.python.org (Paul Ganssle) Date: Wed, 11 Sep 2019 14:17:35 +0000 Subject: [issue38096] Clean up the "struct sequence" / "named tuple" docs In-Reply-To: <1568153124.61.0.864461609465.issue38096@roundup.psfhosted.org> Message-ID: <1568211455.86.0.106189209947.issue38096@roundup.psfhosted.org> Paul Ganssle added the comment: New changeset 7117074410118086938044c7a4ef6846ec1662b2 by Paul Ganssle (Raymond Hettinger) in branch 'master': bpo-38096: Clean up the "struct sequence" / "named tuple" docs (GH-15895) https://github.com/python/cpython/commit/7117074410118086938044c7a4ef6846ec1662b2 ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:18:25 2019 From: report at bugs.python.org (Paul Ganssle) Date: Wed, 11 Sep 2019 14:18:25 +0000 Subject: [issue38096] Clean up the "struct sequence" / "named tuple" docs In-Reply-To: <1568153124.61.0.864461609465.issue38096@roundup.psfhosted.org> Message-ID: <1568211505.15.0.99922633537.issue38096@roundup.psfhosted.org> Change by Paul Ganssle : ---------- resolution: -> fixed stage: patch review -> backport needed status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:21:09 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 11 Sep 2019 14:21:09 +0000 Subject: [issue38111] Error while building Python from source In-Reply-To: <1568209663.11.0.274214516349.issue38111@roundup.psfhosted.org> Message-ID: <1568211669.59.0.0152557793356.issue38111@roundup.psfhosted.org> Zachary Ware added the comment: Could you add some more details about what you're doing here, such as OS, OS version, compiler and compiler version, etc.? We routinely test `--enable-shared` builds on both Linux and FreeBSD in our post-merge buildbot setup, and have not had any issues with this. I also note that the error mentions `libssl.a`; what version of which SSL library are you using? ---------- nosy: +zach.ware type: crash -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:21:44 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Sep 2019 14:21:44 +0000 Subject: [issue34519] Add additional aliases for HP Roman 8 In-Reply-To: <1535377191.85.0.56676864532.issue34519@psf.upfronthosting.co.za> Message-ID: <1568211704.73.0.685180415947.issue34519@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:21:56 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 14:21:56 +0000 Subject: [issue38107] Replace direct future and task contructor calls with factories in asyncio tests In-Reply-To: <1568204163.99.0.31241530598.issue38107@roundup.psfhosted.org> Message-ID: <1568211716.36.0.424160486251.issue38107@roundup.psfhosted.org> miss-islington added the comment: New changeset b18b19809d24182e9837b27b1c0af65458dff3ba by Miss Islington (bot) in branch '3.8': bpo-38107: Replace direct future and task contructor calls with factories in asyncio tests (GH-15928) https://github.com/python/cpython/commit/b18b19809d24182e9837b27b1c0af65458dff3ba ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:22:25 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Sep 2019 14:22:25 +0000 Subject: [issue37305] Add MIME type for Web App Manifest In-Reply-To: <1560681661.87.0.393263592015.issue37305@roundup.psfhosted.org> Message-ID: <1568211745.55.0.127599258265.issue37305@roundup.psfhosted.org> Jason R. Coombs added the comment: Thanks for the contrib. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:23:09 2019 From: report at bugs.python.org (Paul Ganssle) Date: Wed, 11 Sep 2019 14:23:09 +0000 Subject: [issue38096] Clean up the "struct sequence" / "named tuple" docs In-Reply-To: <1568153124.61.0.864461609465.issue38096@roundup.psfhosted.org> Message-ID: <1568211789.96.0.241486350641.issue38096@roundup.psfhosted.org> Change by Paul Ganssle : ---------- pull_requests: +15595 status: pending -> open pull_request: https://github.com/python/cpython/pull/15961 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:23:08 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Sep 2019 14:23:08 +0000 Subject: [issue31163] Return destination path in Path.rename and Path.replace In-Reply-To: <1502292744.48.0.627996317333.issue31163@psf.upfronthosting.co.za> Message-ID: <1568211788.02.0.96623651484.issue31163@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:23:28 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 14:23:28 +0000 Subject: [issue38114] Exclude pip.ini from Nuget package Message-ID: <1568211808.23.0.234312966832.issue38114@roundup.psfhosted.org> New submission from Steve Dower : The pip.ini intended for store packages is being included in the nuget package. We should not do that. ---------- assignee: steve.dower components: Windows keywords: 3.8regression messages: 351900 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Exclude pip.ini from Nuget package versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:25:24 2019 From: report at bugs.python.org (Paul Ganssle) Date: Wed, 11 Sep 2019 14:25:24 +0000 Subject: [issue38096] Clean up the "struct sequence" / "named tuple" docs In-Reply-To: <1568153124.61.0.864461609465.issue38096@roundup.psfhosted.org> Message-ID: <1568211924.95.0.314168122243.issue38096@roundup.psfhosted.org> Change by Paul Ganssle : ---------- pull_requests: +15596 stage: backport needed -> patch review pull_request: https://github.com/python/cpython/pull/15962 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:25:37 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Sep 2019 14:25:37 +0000 Subject: [issue37935] Improve performance of pathlib.scandir() In-Reply-To: <1566628301.14.0.386871182456.issue37935@roundup.psfhosted.org> Message-ID: <1568211937.05.0.211996807985.issue37935@roundup.psfhosted.org> Serhiy Storchaka added the comment: Yes, I am the author of the code that uses os.scandir() in os.walk(), os.fwalk(), glob.iglob() and Path.glob() (see issue23605, issue25996, issue25596, issue26032). And it was always in mind to not keep many file descriptors open when traverse directories recursively. It was also a reason of rejecting my earlier patch for speeding up os.walk() by using os.fwalk() (see issue15200). It is safe to iterated over os.scandir() without turning it into a list if we do not do this recursively. Unfortunately there were no special tests for this. PR 15956 adds them. You can easily break tests for pathlib if remove any of list(). It is harder to break tests for glob, because fnmatch.filter() consumes the iterator and implicitly closes the scandir iterator. You need to replace it with a generator and fnmatch.fnmatch() called in a loop. Breaking the tests for os.walk() is difficult. The code of os.walk() is so complex because it needs to return lists of files and subdirectories, and therefore it consumes the scandir iterator and closes it. But with some tricks it is possible to break tests for os.walk(). It is unlikely somebody will do this unintentionally. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:27:20 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 14:27:20 +0000 Subject: [issue38114] Exclude pip.ini from Nuget package In-Reply-To: <1568211808.23.0.234312966832.issue38114@roundup.psfhosted.org> Message-ID: <1568212040.06.0.690839643112.issue38114@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +15597 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15964 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:27:50 2019 From: report at bugs.python.org (Thomas Wouters) Date: Wed, 11 Sep 2019 14:27:50 +0000 Subject: [issue38115] Invalid bytecode offsets in co_lnotab Message-ID: <1568212070.98.0.977590744203.issue38115@roundup.psfhosted.org> New submission from Thomas Wouters : The peephole optimizer in Python 2.7 and later (and probably a *lot* earlier) has a bug where if the optimizer entirely optimizes away the last line(s) of a function, the lnotab references invalid bytecode offsets: >>> def f(cond1, cond2): ... while 1: ... return 3 ... while 1: ... return 5 ... return 6 ... >>> list(dis.findlinestarts(f.__code__)) [(0, 3), (4, 5), (8, 6)] >>> len(f.__code__.co_code) 8 >>> f.__code__.co_code[8] Traceback (most recent call last): File "", line 1, in IndexError: index out of range The problem is that the lnotab-readjustment in Python/peephole.c doesn't account for trailing NOPs in a bytecode string. I haven't been able to reproduce this before Python 3.8, probably because the optimizer wasn't capable of optimizing things aggressively enough to end a bytecode string with NOPs. I have a fix for this bug already. ---------- assignee: twouters components: Interpreter Core keywords: patch messages: 351902 nosy: lukasz.langa, pablogsal, twouters priority: release blocker severity: normal status: open title: Invalid bytecode offsets in co_lnotab type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:28:09 2019 From: report at bugs.python.org (Roundup Robot) Date: Wed, 11 Sep 2019 14:28:09 +0000 Subject: [issue37972] unittest.mock.call does not chain __getitem__ to another _Call object In-Reply-To: <1567024381.55.0.529292089661.issue37972@roundup.psfhosted.org> Message-ID: <1568212089.58.0.128617815586.issue37972@roundup.psfhosted.org> Roundup Robot added the comment: New changeset 72c359912d36705a94fca8b63d80451905a14ae4 by Michael Foord (blhsing) in branch 'master': bpo-37972: unittest.mock._Call now passes on __getitem__ to the __getattr__ chaining so that call() can be subscriptable (GH-15565) https://github.com/python/cpython/commit/72c359912d36705a94fca8b63d80451905a14ae4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:28:20 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 14:28:20 +0000 Subject: [issue37972] unittest.mock.call does not chain __getitem__ to another _Call object In-Reply-To: <1567024381.55.0.529292089661.issue37972@roundup.psfhosted.org> Message-ID: <1568212100.18.0.692818053062.issue37972@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15598 pull_request: https://github.com/python/cpython/pull/15965 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:30:47 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 11 Sep 2019 14:30:47 +0000 Subject: [issue37879] Segfaults in C heap type subclasses In-Reply-To: <1566074851.0.0.451710928537.issue37879@roundup.psfhosted.org> Message-ID: <1568212247.79.0.653581184282.issue37879@roundup.psfhosted.org> Change by Petr Viktorin : ---------- pull_requests: +15599 pull_request: https://github.com/python/cpython/pull/15966 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:36:38 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Sep 2019 14:36:38 +0000 Subject: [issue36919] Exception from 'compile' reports a newline char not present in input In-Reply-To: <1557865717.35.0.0613603941425.issue36919@roundup.psfhosted.org> Message-ID: <1568212598.85.0.348023322771.issue36919@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset c2119399488a297275db7f0590cff957b6ce8a2e by Jason R. Coombs (Miss Islington (bot)) in branch '3.7': bpo-36919: make test_source_encoding.test_issue2301 implementation-independent (GH-13639) (GH-15953) https://github.com/python/cpython/commit/c2119399488a297275db7f0590cff957b6ce8a2e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:37:21 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Sep 2019 14:37:21 +0000 Subject: [issue36919] Exception from 'compile' reports a newline char not present in input In-Reply-To: <1557865717.35.0.0613603941425.issue36919@roundup.psfhosted.org> Message-ID: <1568212641.67.0.644557455154.issue36919@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset 42edfcfd129c7ac4842b9e0cd453bbe3ff006669 by Jason R. Coombs (Miss Islington (bot)) in branch '3.8': bpo-36919: make test_source_encoding.test_issue2301 implementation-independent (GH-13639) (GH-15952) https://github.com/python/cpython/commit/42edfcfd129c7ac4842b9e0cd453bbe3ff006669 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:37:15 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 14:37:15 +0000 Subject: [issue35224] PEP 572: Assignment Expressions In-Reply-To: <1542070337.94.0.788709270274.issue35224@psf.upfronthosting.co.za> Message-ID: <1568212635.23.0.781020511454.issue35224@roundup.psfhosted.org> miss-islington added the comment: New changeset 6357c95716d89ac1f80587fbc4133df8d2e8396c by Miss Islington (bot) (Emily Morehouse) in branch 'master': bpo-35224: Additional documentation for Assignment Expressions (GH-15935) https://github.com/python/cpython/commit/6357c95716d89ac1f80587fbc4133df8d2e8396c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:37:23 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 14:37:23 +0000 Subject: [issue35224] PEP 572: Assignment Expressions In-Reply-To: <1542070337.94.0.788709270274.issue35224@psf.upfronthosting.co.za> Message-ID: <1568212643.51.0.924950545722.issue35224@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15600 pull_request: https://github.com/python/cpython/pull/15967 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:37:37 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Sep 2019 14:37:37 +0000 Subject: [issue36919] Exception from 'compile' reports a newline char not present in input In-Reply-To: <1557865717.35.0.0613603941425.issue36919@roundup.psfhosted.org> Message-ID: <1568212657.58.0.451590570534.issue36919@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:37:41 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 11 Sep 2019 14:37:41 +0000 Subject: [issue37252] devpoll test failures on Solaris In-Reply-To: <1560349214.7.0.192767880732.issue37252@roundup.psfhosted.org> Message-ID: <1568212661.25.0.388986171291.issue37252@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset b4808c1265722b8a03ab436e37c7c337074acb15 by St?phane Wirtel (Miss Islington (bot)) in branch '3.8': closes bpo-37252: Fix devpoll tests. (GH-14017) (GH-15948) https://github.com/python/cpython/commit/b4808c1265722b8a03ab436e37c7c337074acb15 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:35:56 2019 From: report at bugs.python.org (Thomas Wouters) Date: Wed, 11 Sep 2019 14:35:56 +0000 Subject: [issue38115] Invalid bytecode offsets in co_lnotab In-Reply-To: <1568212070.98.0.977590744203.issue38115@roundup.psfhosted.org> Message-ID: <1568212556.58.0.680657590647.issue38115@roundup.psfhosted.org> Thomas Wouters added the comment: There's also a bug where the optimizer may bail out on optimizing a code object *after* updating the lnotab (the last 'goto exitUnchanged' in Python/peephole.c). That bug has existed since Python 3.6, but it's not clear to me how much this actually affects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:38:28 2019 From: report at bugs.python.org (Julien Palard) Date: Wed, 11 Sep 2019 14:38:28 +0000 Subject: [issue23460] Decimals do not obey ':g' exponential notation formatting rules In-Reply-To: <1423847721.13.0.666007782647.issue23460@psf.upfronthosting.co.za> Message-ID: <1568212708.25.0.376635020335.issue23460@roundup.psfhosted.org> Julien Palard added the comment: New changeset 629f1f87e9b0bfd9f1dc3d02f966decde5c65201 by Julien Palard (Miss Islington (bot)) in branch '3.8': bpo-23460: Fix documentation for decimal string :g formatting (GH-11850) (GH-15954) https://github.com/python/cpython/commit/629f1f87e9b0bfd9f1dc3d02f966decde5c65201 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:38:47 2019 From: report at bugs.python.org (Julien Palard) Date: Wed, 11 Sep 2019 14:38:47 +0000 Subject: [issue23460] Decimals do not obey ':g' exponential notation formatting rules In-Reply-To: <1423847721.13.0.666007782647.issue23460@psf.upfronthosting.co.za> Message-ID: <1568212727.05.0.327186573592.issue23460@roundup.psfhosted.org> Change by Julien Palard : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:40:59 2019 From: report at bugs.python.org (Redcxx) Date: Wed, 11 Sep 2019 14:40:59 +0000 Subject: [issue38111] Error while building Python from source In-Reply-To: <1568209663.11.0.274214516349.issue38111@roundup.psfhosted.org> Message-ID: <1568212859.13.0.222309943207.issue38111@roundup.psfhosted.org> Redcxx added the comment: Sorry for that, Heres are my os infomation: LSB Version: :core-4.1-amd64:core-4.1-ia32:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-ia32:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-ia32:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch Distributor ID: Scientific Description: Scientific Linux release 7.3 (Nitrogen) Release: 7.3 Codename: Nitrogen I am using Linux as follows: Linux e-c07kilf3145.it.manchester.ac.uk 3.10.0-514.el7.x86_64 #1 SMP Thu Nov 3 15:10:49 CDT 2016 x86_64 x86_64 x86_64 GNU/Linux I am using the latest openssl release: 2019-Sep-10 13:53:14 openssl-1.0.2t.tar.gz *I made a change in the Modules/Setup.dist as my openssl is not in the default location: # Socket module helper for SSL support; you must comment out the other # socket line above, and possibly edit the SSL variable: SSL=/home/e38160wl/local/openssl ssl_path=/home/e38160wl/local _ssl _ssl.c \ -DUSE_SSL -I$(ssl_path)/include -I$(ssl_path)/include/openssl \ -L$(ssl_path)/lib -lssl -lcrypto ---------- type: compile error -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:41:24 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 11 Sep 2019 14:41:24 +0000 Subject: [issue36634] venv: activate.bat fails for venv with parentheses in PATH In-Reply-To: <1555337759.6.0.97149991925.issue36634@roundup.psfhosted.org> Message-ID: <1568212884.06.0.814750772342.issue36634@roundup.psfhosted.org> Zachary Ware added the comment: New changeset 574b324bdc9a126b5a4488c3613f11ad2555415e by Zachary Ware (Steve Dower) in branch 'master': bpo-36634: Fixes activate.bat when existing values contain double quotes (GH-15924) https://github.com/python/cpython/commit/574b324bdc9a126b5a4488c3613f11ad2555415e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:41:32 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 14:41:32 +0000 Subject: [issue36634] venv: activate.bat fails for venv with parentheses in PATH In-Reply-To: <1555337759.6.0.97149991925.issue36634@roundup.psfhosted.org> Message-ID: <1568212892.73.0.368641361745.issue36634@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15601 pull_request: https://github.com/python/cpython/pull/15968 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:41:38 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 14:41:38 +0000 Subject: [issue36634] venv: activate.bat fails for venv with parentheses in PATH In-Reply-To: <1555337759.6.0.97149991925.issue36634@roundup.psfhosted.org> Message-ID: <1568212898.38.0.741659298918.issue36634@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15602 pull_request: https://github.com/python/cpython/pull/15969 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:42:27 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 11 Sep 2019 14:42:27 +0000 Subject: [issue37424] subprocess.run timeout does not function if shell=True and capture_output=True In-Reply-To: <1561618790.88.0.611701645761.issue37424@roundup.psfhosted.org> Message-ID: <1568212947.93.0.694491678609.issue37424@roundup.psfhosted.org> Gregory P. Smith added the comment: Thanks. I believe this issue is fixed but you've identified follow-on issues. lets follow up on those in their own bugs. ---------- resolution: -> fixed stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:42:29 2019 From: report at bugs.python.org (Redcxx) Date: Wed, 11 Sep 2019 14:42:29 +0000 Subject: [issue38111] Error while building Python from source In-Reply-To: <1568209663.11.0.274214516349.issue38111@roundup.psfhosted.org> Message-ID: <1568212949.86.0.0319554054532.issue38111@roundup.psfhosted.org> Change by Redcxx : ---------- type: crash -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:44:55 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 11 Sep 2019 14:44:55 +0000 Subject: [issue37091] subprocess - uncaught PermissionError in send_signal can cause hang In-Reply-To: <1559170322.53.0.309237543574.issue37091@roundup.psfhosted.org> Message-ID: <1568213095.99.0.875431733386.issue37091@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:48:15 2019 From: report at bugs.python.org (Dino Viehland) Date: Wed, 11 Sep 2019 14:48:15 +0000 Subject: [issue38116] Make select module PEP-384 compatible Message-ID: <1568213295.38.0.552886185542.issue38116@roundup.psfhosted.org> New submission from Dino Viehland : Remove static PyTypeObject* definitions and move static data to _selectstate to help improve compatibility w/ subinterpreters and re-use by alternate implementations. ---------- assignee: dino.viehland components: Extension Modules messages: 351913 nosy: dino.viehland, eric.snow priority: normal severity: normal status: open title: Make select module PEP-384 compatible versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:48:37 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 11 Sep 2019 14:48:37 +0000 Subject: [issue33187] Document ElementInclude (XInclude) support in ElementTree In-Reply-To: <1522427694.7.0.467229070634.issue33187@psf.upfronthosting.co.za> Message-ID: <1568213317.24.0.159351039773.issue33187@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset 6cf0ba8a632b1c0bd3576ed33c971ca3778000de by Stefan Behnel (Miss Islington (bot)) in branch '3.8': bpo-33187: Document ElementInclude (XInclude) support in ElementTree (GH-8861) (GH-15958) https://github.com/python/cpython/commit/6cf0ba8a632b1c0bd3576ed33c971ca3778000de ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:48:56 2019 From: report at bugs.python.org (Thomas Wouters) Date: Wed, 11 Sep 2019 14:48:56 +0000 Subject: [issue38115] Invalid bytecode offsets in co_lnotab In-Reply-To: <1568212070.98.0.977590744203.issue38115@roundup.psfhosted.org> Message-ID: <1568213336.97.0.546357105059.issue38115@roundup.psfhosted.org> Change by Thomas Wouters : ---------- pull_requests: +15603 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15970 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:49:01 2019 From: report at bugs.python.org (Dino Viehland) Date: Wed, 11 Sep 2019 14:49:01 +0000 Subject: [issue38116] Make select module PEP-384 compatible In-Reply-To: <1568213295.38.0.552886185542.issue38116@roundup.psfhosted.org> Message-ID: <1568213341.82.0.716942079429.issue38116@roundup.psfhosted.org> Change by Dino Viehland : ---------- keywords: +patch pull_requests: +15604 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15971 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:52:43 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 11 Sep 2019 14:52:43 +0000 Subject: [issue33187] Document ElementInclude (XInclude) support in ElementTree In-Reply-To: <1522427694.7.0.467229070634.issue33187@psf.upfronthosting.co.za> Message-ID: <1568213563.35.0.819278209523.issue33187@roundup.psfhosted.org> Change by Stefan Behnel : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:53:00 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 14:53:00 +0000 Subject: [issue33187] Document ElementInclude (XInclude) support in ElementTree In-Reply-To: <1522427694.7.0.467229070634.issue33187@psf.upfronthosting.co.za> Message-ID: <1568213580.93.0.262722122857.issue33187@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15605 pull_request: https://github.com/python/cpython/pull/15972 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:54:23 2019 From: report at bugs.python.org (Redcxx) Date: Wed, 11 Sep 2019 14:54:23 +0000 Subject: [issue38111] Error while building Python from source In-Reply-To: <1568209663.11.0.274214516349.issue38111@roundup.psfhosted.org> Message-ID: <1568213663.76.0.00247371838744.issue38111@roundup.psfhosted.org> Redcxx added the comment: Sorry I mistype the changes I made in Modules/Setup.dist, this is the correct one: # Socket module helper for SSL support; you must comment out the other # socket line above, and possibly edit the SSL variable: SSL=/home/e38160wl/Python3.7.4/local/openssl ssl_path=/home/e38160wl/Python3.7.4/local _ssl _ssl.c \ -DUSE_SSL -I$(ssl_path)/include -I$(ssl_path)/include/openssl \ -L$(ssl_path)/lib -lssl -lcrypto ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:56:19 2019 From: report at bugs.python.org (Dino Viehland) Date: Wed, 11 Sep 2019 14:56:19 +0000 Subject: [issue38113] Remove statics from ast.c In-Reply-To: <1568210711.23.0.951109613555.issue38113@roundup.psfhosted.org> Message-ID: <1568213779.34.0.834408802778.issue38113@roundup.psfhosted.org> Dino Viehland added the comment: Remove statics to make more compatible with subinterpreters. ---------- components: +Interpreter Core -Extension Modules title: Make ast module PEP-384 compatible -> Remove statics from ast.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:57:08 2019 From: report at bugs.python.org (Armin Rigo) Date: Wed, 11 Sep 2019 14:57:08 +0000 Subject: [issue38106] Race in PyThread_release_lock - can lead to memory corruption and deadlock In-Reply-To: <1568200653.3.0.865964137512.issue38106@roundup.psfhosted.org> Message-ID: <1568213828.91.0.92668672123.issue38106@roundup.psfhosted.org> Armin Rigo added the comment: I may be wrong, but I believe that the bug requires using the C API (not just pure Python code). This is because Python-level lock objects have their own lifetime, and should never be freed while another thread is in PyThread_release_lock() with them. Nevertheless, the example shows that using this C API "correctly" is very hard. Most direct users of the C API could run into the same problem in theory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 10:58:59 2019 From: report at bugs.python.org (Thomas Wouters) Date: Wed, 11 Sep 2019 14:58:59 +0000 Subject: [issue37885] venv: Don't produce unbound variable warning on deactivate In-Reply-To: <1566204609.23.0.435399494767.issue37885@roundup.psfhosted.org> Message-ID: <1568213939.4.0.889326100097.issue37885@roundup.psfhosted.org> Thomas Wouters added the comment: New changeset 5209e586b7cac9a43b2c44349a26b1b0af06ead3 by T. Wouters (Daniel Abrahamsson) in branch 'master': bpo-37885: venv: Don't produce unbound variable warning on deactivate (GH-15330) https://github.com/python/cpython/commit/5209e586b7cac9a43b2c44349a26b1b0af06ead3 ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:00:10 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 15:00:10 +0000 Subject: [issue37885] venv: Don't produce unbound variable warning on deactivate In-Reply-To: <1566204609.23.0.435399494767.issue37885@roundup.psfhosted.org> Message-ID: <1568214010.34.0.541808963084.issue37885@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15606 pull_request: https://github.com/python/cpython/pull/15973 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:00:33 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 15:00:33 +0000 Subject: [issue36634] venv: activate.bat fails for venv with parentheses in PATH In-Reply-To: <1555337759.6.0.97149991925.issue36634@roundup.psfhosted.org> Message-ID: <1568214033.94.0.82981541154.issue36634@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:00:17 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 15:00:17 +0000 Subject: [issue37885] venv: Don't produce unbound variable warning on deactivate In-Reply-To: <1566204609.23.0.435399494767.issue37885@roundup.psfhosted.org> Message-ID: <1568214017.22.0.051787627626.issue37885@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15607 pull_request: https://github.com/python/cpython/pull/15974 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:01:12 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 11 Sep 2019 15:01:12 +0000 Subject: [issue38111] Error while building Python from source In-Reply-To: <1568209663.11.0.274214516349.issue38111@roundup.psfhosted.org> Message-ID: <1568214072.43.0.906931796932.issue38111@roundup.psfhosted.org> Zachary Ware added the comment: I believe the better option would be to pass `CPPFLAGS=-I/home/e38160wl/local/openssl/include LDFLAGS=-L/home/e38160wl/local/openssl/lib` instead of editing Setup[.dist]. Could you give that a try? Otherwise, this may be an issue with the way OpenSSL was built; you could try leaving out all SSL-related changes and see if everything but `_ssl` and `_hashlib` builds correctly. ---------- stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:02:52 2019 From: report at bugs.python.org (Dino Viehland) Date: Wed, 11 Sep 2019 15:02:52 +0000 Subject: [issue38113] Remove statics from ast.c In-Reply-To: <1568210711.23.0.951109613555.issue38113@roundup.psfhosted.org> Message-ID: <1568214172.09.0.853004691534.issue38113@roundup.psfhosted.org> Change by Dino Viehland : ---------- pull_requests: +15608 pull_request: https://github.com/python/cpython/pull/15975 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:03:36 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Sep 2019 15:03:36 +0000 Subject: [issue36998] distutils sdist command fails to create MANIFEST if any filenames are undecodable In-Reply-To: <1558459986.87.0.362886106344.issue36998@roundup.psfhosted.org> Message-ID: <1568214216.1.0.528077194077.issue36998@roundup.psfhosted.org> Jason R. Coombs added the comment: Thanks all for investigating and discussing this issue. I'm reviewing the PR, and I can't help but wonder, does this same issue exist when building with setuptools? Do you care about older Python versions? Would addressing these issues in setuptools address your needs? Additionally, the main use-case you describe is someone wishes to create an sdist referencing invalid filenames. That seems like an undesirable case. Could such a project not instead generate these invalid filenames on demand rather than materializing them in a distribution package? I'm also concerned that by altering `write_file`, we're applying a change for a specific use-case to a utility probably shared by several use-cases. Overall, I'm leaning -1 on this right now. Can you convince me this change is the best thing for the system? ---------- nosy: +jaraco type: -> enhancement versions: -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:04:14 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Sep 2019 15:04:14 +0000 Subject: [issue36260] [security] CVE-2019-9674: Zip Bomb vulnerability In-Reply-To: <1552288618.75.0.236192047967.issue36260@roundup.psfhosted.org> Message-ID: <1568214254.89.0.969253212762.issue36260@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset 3ba51d587f6897a45301ce9126300c14fcd4eba2 by Jason R. Coombs (JunWei Song) in branch 'master': bpo-36260: Add pitfalls to zipfile module documentation (#13378) https://github.com/python/cpython/commit/3ba51d587f6897a45301ce9126300c14fcd4eba2 ---------- nosy: +jaraco _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:04:37 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 15:04:37 +0000 Subject: [issue36260] [security] CVE-2019-9674: Zip Bomb vulnerability In-Reply-To: <1552288618.75.0.236192047967.issue36260@roundup.psfhosted.org> Message-ID: <1568214277.94.0.419496115526.issue36260@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15609 pull_request: https://github.com/python/cpython/pull/15976 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:04:49 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Sep 2019 15:04:49 +0000 Subject: [issue36260] [security] CVE-2019-9674: Zip Bomb vulnerability In-Reply-To: <1552288618.75.0.236192047967.issue36260@roundup.psfhosted.org> Message-ID: <1568214289.61.0.74254051369.issue36260@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- nosy: -jaraco resolution: remind -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:06:43 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 15:06:43 +0000 Subject: [issue35592] Not able to use Python 3.7.2 due to SSL issue In-Reply-To: <1545862916.5.0.100281497043.issue35592@roundup.psfhosted.org> Message-ID: <1568214403.08.0.776858261864.issue35592@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:08:06 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 15:08:06 +0000 Subject: [issue35795] test_pkgutil test_zipapp fail in AMD64 Windows7 SP1 3.x and AMD64 Windows7 SP1 3.7 buildbots In-Reply-To: <1548068055.8.0.250041418477.issue35795@roundup.psfhosted.org> Message-ID: <1568214486.64.0.725593879186.issue35795@roundup.psfhosted.org> Steve Dower added the comment: Have we seen this recently? Should we just close this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:08:13 2019 From: report at bugs.python.org (Julien Palard) Date: Wed, 11 Sep 2019 15:08:13 +0000 Subject: [issue36182] Path.write_text() docs do not include the case that a file exists In-Reply-To: <1551703881.69.0.0731434428442.issue36182@roundup.psfhosted.org> Message-ID: <1568214493.76.0.52802597053.issue36182@roundup.psfhosted.org> Julien Palard added the comment: New changeset af636f4f91b8289b6dad95cb84123f6e22fd7f4f by Julien Palard (Lysandros Nikolaou) in branch 'master': bpo-36182: Update pathlib.Path.write_text() docs (GH-12161) https://github.com/python/cpython/commit/af636f4f91b8289b6dad95cb84123f6e22fd7f4f ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:08:21 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 15:08:21 +0000 Subject: [issue36182] Path.write_text() docs do not include the case that a file exists In-Reply-To: <1551703881.69.0.0731434428442.issue36182@roundup.psfhosted.org> Message-ID: <1568214501.66.0.216003722563.issue36182@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15610 pull_request: https://github.com/python/cpython/pull/15977 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:08:50 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 15:08:50 +0000 Subject: [issue37651] Change of inheritance of asyncio.CancelledError needs documentation In-Reply-To: <1563802582.63.0.387759445278.issue37651@roundup.psfhosted.org> Message-ID: <1568214530.4.0.579277444732.issue37651@roundup.psfhosted.org> miss-islington added the comment: New changeset e784bb7c6b2a52e80d7c03cb85e5faab11a1ccbd by Miss Islington (bot) in branch '3.8': bpo-37651: Document CancelledError is now a subclass of BaseException (GH-15950) https://github.com/python/cpython/commit/e784bb7c6b2a52e80d7c03cb85e5faab11a1ccbd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:09:17 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 11 Sep 2019 15:09:17 +0000 Subject: [issue37651] Change of inheritance of asyncio.CancelledError needs documentation In-Reply-To: <1563802582.63.0.387759445278.issue37651@roundup.psfhosted.org> Message-ID: <1568214557.49.0.886984115499.issue37651@roundup.psfhosted.org> Andrew Svetlov added the comment: Done, thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:10:11 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 15:10:11 +0000 Subject: [issue35253] Linker warning LNK4281 In-Reply-To: <1542246646.48.0.788709270274.issue35253@psf.upfronthosting.co.za> Message-ID: <1568214611.63.0.86280599545.issue35253@roundup.psfhosted.org> Steve Dower added the comment: I don't remember exactly when, but this is fixed. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:11:10 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 11 Sep 2019 15:11:10 +0000 Subject: [issue38110] Use fdwalk() within os.closerange() impl if available In-Reply-To: <1568209201.53.0.0873310068645.issue38110@roundup.psfhosted.org> Message-ID: <1568214670.34.0.0687017633916.issue38110@roundup.psfhosted.org> Gregory P. Smith added the comment: """On Solaris, we are patching (for many years now) `posix_closerange` function to use `fdwalk` to close file descriptors instead of a for loop. While for a long time only Solaris had `fdwalk`, but if I am not mistaken, some other OSes implement it today as well and as such others might be interested in this as well. If you will like it, I can create an issue for that. Also, I am not sure whether `_fdwalk_close_func` needs a clinic part or if configure detection is sufficient this way - I am open to all comments and ideas and can rewrite it as needed ;). """ - Jakub ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:12:01 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 11 Sep 2019 15:12:01 +0000 Subject: [issue38110] Use fdwalk() within os.closerange() impl if available In-Reply-To: <1568209201.53.0.0873310068645.issue38110@roundup.psfhosted.org> Message-ID: <1568214721.67.0.314926987535.issue38110@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset e20134f889a0cfcc37a46979f31a1c98b800de07 by Gregory P. Smith (Jakub Kul?k) in branch 'master': bpo-38110: Use fdwalk for os.closerange() when available. (GH-15224) https://github.com/python/cpython/commit/e20134f889a0cfcc37a46979f31a1c98b800de07 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:12:08 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 15:12:08 +0000 Subject: [issue38110] Use fdwalk() within os.closerange() impl if available In-Reply-To: <1568209201.53.0.0873310068645.issue38110@roundup.psfhosted.org> Message-ID: <1568214728.73.0.767363373391.issue38110@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15611 pull_request: https://github.com/python/cpython/pull/15978 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:12:13 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 11 Sep 2019 15:12:13 +0000 Subject: [issue35224] PEP 572: Assignment Expressions In-Reply-To: <1542070337.94.0.788709270274.issue35224@psf.upfronthosting.co.za> Message-ID: <1568214733.26.0.972837785738.issue35224@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset be2aa58fdc29cf13aabff6d6712e7853e94e88f8 by St?phane Wirtel (Miss Islington (bot)) in branch '3.8': bpo-35224: Additional documentation for Assignment Expressions (GH-15935) (GH-15967) https://github.com/python/cpython/commit/be2aa58fdc29cf13aabff6d6712e7853e94e88f8 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:14:03 2019 From: report at bugs.python.org (Eryk Sun) Date: Wed, 11 Sep 2019 15:14:03 +0000 Subject: [issue38081] Different behavior of os.path.realpath('nul') in 3.7 and 3.8 In-Reply-To: <1568097037.9.0.584511449633.issue38081@roundup.psfhosted.org> Message-ID: <1568214843.49.0.109428427705.issue38081@roundup.psfhosted.org> Eryk Sun added the comment: We should allow ERROR_INVALID_FUNCTION (1), ERROR_INVALID_PARAMETER (87), and ERROR_NOT_SUPPORTED (50) for readlink and _getfinalpathname, which can indicate a device that does not implement or is not mounted by a file system. We should also allow ERROR_BAD_NET_NAME (67, "the network name cannot be found"), which indicates that a server or share isn't found when opening a UNC path. I don't know whether ERROR_INVALID_NAME (123) should be allowed. Also, it hasn't been added already, but I'd be equally unsure about adding ERROR_BAD_PATHNAME (161). These aren't like a missing file, path, or server, or an unsupported device. I know Python's realpath() is supposed to be permissive, but that's going too far I think. Returning r"\\.\nul" is fine. I'd prefer to change os.devnull to match it. Scripts should be able to handle this since already abspath(os.devnull) is r"\\.\nul". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:15:42 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 11 Sep 2019 15:15:42 +0000 Subject: [issue33166] os.cpu_count() returns wrong number of processors on specific systems Message-ID: <1568214942.19.0.253350872152.issue33166@roundup.psfhosted.org> Zachary Ware added the comment: New changeset aa929273caca2f4e24e3aa9e790272fd4458ad35 by Zachary Ware (Steve Dower) in branch 'master': bpo-33166: Change os.cpu_count to return active (real) processors (GH-15949) https://github.com/python/cpython/commit/aa929273caca2f4e24e3aa9e790272fd4458ad35 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:15:52 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 15:15:52 +0000 Subject: [issue33166] os.cpu_count() returns wrong number of processors on specific systems Message-ID: <1568214952.48.0.579593195774.issue33166@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15612 pull_request: https://github.com/python/cpython/pull/15979 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:16:30 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 11 Sep 2019 15:16:30 +0000 Subject: [issue38114] Exclude pip.ini from Nuget package In-Reply-To: <1568211808.23.0.234312966832.issue38114@roundup.psfhosted.org> Message-ID: <1568214990.35.0.829446717128.issue38114@roundup.psfhosted.org> Zachary Ware added the comment: New changeset 19f6940cd7fb91246b88e1fbdbce97a02e7f3fa1 by Zachary Ware (Steve Dower) in branch 'master': bpo-38114: Do not include pip.ini in Nuget package (GH-15964) https://github.com/python/cpython/commit/19f6940cd7fb91246b88e1fbdbce97a02e7f3fa1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:16:40 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 15:16:40 +0000 Subject: [issue38114] Exclude pip.ini from Nuget package In-Reply-To: <1568211808.23.0.234312966832.issue38114@roundup.psfhosted.org> Message-ID: <1568215000.11.0.651080318433.issue38114@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15613 pull_request: https://github.com/python/cpython/pull/15980 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:16:49 2019 From: report at bugs.python.org (Emily Morehouse) Date: Wed, 11 Sep 2019 15:16:49 +0000 Subject: [issue35224] PEP 572: Assignment Expressions In-Reply-To: <1542070337.94.0.788709270274.issue35224@psf.upfronthosting.co.za> Message-ID: <1568215009.06.0.539336667063.issue35224@roundup.psfhosted.org> Emily Morehouse added the comment: All areas that were identified for additional work have been addressed. If there is anything else that needs to be improved or updated, please create a new issue. Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:17:36 2019 From: report at bugs.python.org (Eryk Sun) Date: Wed, 11 Sep 2019 15:17:36 +0000 Subject: [issue38081] Different behavior of os.path.realpath('nul') in 3.7 and 3.8 In-Reply-To: <1568097037.9.0.584511449633.issue38081@roundup.psfhosted.org> Message-ID: <1568215056.93.0.650109227162.issue38081@roundup.psfhosted.org> Change by Eryk Sun : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:18:48 2019 From: report at bugs.python.org (Christian Heimes) Date: Wed, 11 Sep 2019 15:18:48 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t Message-ID: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> New submission from Christian Heimes : OpenSSL versions 1.1.1d, 1.1.0l, and 1.0.2t were released yesterday. They contain a low priority security fix. ---------- components: Extension Modules messages: 351934 nosy: christian.heimes priority: normal severity: normal status: open title: Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t type: security versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:20:05 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 15:20:05 +0000 Subject: [issue38114] Exclude pip.ini from Nuget package In-Reply-To: <1568211808.23.0.234312966832.issue38114@roundup.psfhosted.org> Message-ID: <1568215205.99.0.0233455629697.issue38114@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:20:09 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 11 Sep 2019 15:20:09 +0000 Subject: [issue33166] os.cpu_count() returns wrong number of processors on specific systems Message-ID: <1568215209.38.0.0941962861434.issue33166@roundup.psfhosted.org> Zachary Ware added the comment: Thank you for clarifying this muddy topic, Eryk! (Dropping bpo-32592 dependency; we've done the update in a basically-compatible way.) ---------- dependencies: -Drop support of Windows Vista and 7 in Python 3.9 resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:22:01 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 15:22:01 +0000 Subject: [issue36634] venv: activate.bat fails for venv with parentheses in PATH In-Reply-To: <1555337759.6.0.97149991925.issue36634@roundup.psfhosted.org> Message-ID: <1568215321.54.0.15145752095.issue36634@roundup.psfhosted.org> miss-islington added the comment: New changeset 20f80bfc83506037e40d918fcac887cee9093c93 by Miss Islington (bot) in branch '3.8': bpo-36634: Fixes activate.bat when existing values contain double quotes (GH-15924) https://github.com/python/cpython/commit/20f80bfc83506037e40d918fcac887cee9093c93 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:22:49 2019 From: report at bugs.python.org (Steve Dower) Date: Wed, 11 Sep 2019 15:22:49 +0000 Subject: [issue38081] Different behavior of os.path.realpath('nul') in 3.7 and 3.8 In-Reply-To: <1568097037.9.0.584511449633.issue38081@roundup.psfhosted.org> Message-ID: <1568215369.43.0.930733847692.issue38081@roundup.psfhosted.org> Change by Steve Dower : ---------- assignee: steve.dower -> stage: resolved -> needs patch versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:23:10 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 15:23:10 +0000 Subject: [issue36634] venv: activate.bat fails for venv with parentheses in PATH In-Reply-To: <1555337759.6.0.97149991925.issue36634@roundup.psfhosted.org> Message-ID: <1568215390.37.0.856813368743.issue36634@roundup.psfhosted.org> miss-islington added the comment: New changeset 8a19a91e28b86592ee1ad9d1761e59b30d8511b9 by Miss Islington (bot) in branch '3.7': bpo-36634: Fixes activate.bat when existing values contain double quotes (GH-15924) https://github.com/python/cpython/commit/8a19a91e28b86592ee1ad9d1761e59b30d8511b9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:28:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Sep 2019 15:28:57 +0000 Subject: [issue38118] Valgrind warnings when running tokenize.py Message-ID: <1568215737.14.0.192001407155.issue38118@roundup.psfhosted.org> New submission from STINNER Victor : Running tokenize.py in Valgrind emits 2 warnings: $ ./configure --with-valgrind $ make $ echo|PYTHONMALLOC=malloc valgrind ./python Lib/tokenize.py (A) ==30746== Conditional jump or move depends on uninitialised value(s) ==30746== at 0x4A01F7: PyUnicode_Decode (unicodeobject.c:3395) ==30746== by 0x4A01F7: PyUnicode_Decode (unicodeobject.c:3350) ==30746== by 0x4A062E: PyUnicode_FromEncodedObject (unicodeobject.c:3268) ==30746== by 0x4A090D: unicode_new (unicodeobject.c:15125) ==30746== by 0x46F515: type_call (typeobject.c:969) ==30746== by 0x435F82: _PyObject_MakeTpCall (call.c:167) ==30746== by 0x422B3A: _PyObject_Vectorcall (abstract.h:104) ==30746== by 0x422B3A: _PyObject_Vectorcall (abstract.h:96) ==30746== by 0x422B3A: call_function (ceval.c:4984) ==30746== by 0x423C26: _PyEval_EvalFrameDefault (ceval.c:3496) ==30746== by 0x4217D2: function_code_fastcall (call.c:292) ==30746== by 0x4360FC: _PyObject_FastCallDict (call.c:109) ==30746== by 0x436309: _PyObject_Call_Prepend (call.c:447) ==30746== by 0x4731F0: slot_tp_init (typeobject.c:6767) ==30746== by 0x46F562: type_call (typeobject.c:989) (B) ==30746== Conditional jump or move depends on uninitialised value(s) ==30746== at 0x4DC8FF: PyState_AddModule (pystate.c:707) ==30746== by 0x485A5E1: PyInit_zlib (zlibmodule.c:1472) ==30746== by 0x4CA49C: _PyImport_LoadDynamicModuleWithSpec (importdl.c:164) ==30746== by 0x4C8462: _imp_create_dynamic_impl (import.c:2292) ==30746== by 0x4C8462: _imp_create_dynamic (import.c.h:330) ==30746== by 0x570783: cfunction_vectorcall_FASTCALL (methodobject.c:382) ==30746== by 0x435ACD: PyVectorcall_Call (call.c:203) ==30746== by 0x42424F: do_call_core (ceval.c:5031) ==30746== by 0x42424F: _PyEval_EvalFrameDefault (ceval.c:3557) ==30746== by 0x4AF4CF: _PyEval_EvalCodeWithName (ceval.c:4296) ==30746== by 0x435D3F: _PyFunction_Vectorcall (call.c:355) ==30746== by 0x422AA8: _PyObject_Vectorcall (abstract.h:106) ==30746== by 0x422AA8: call_function (ceval.c:4984) ==30746== by 0x428E51: _PyEval_EvalFrameDefault (ceval.c:3465) ==30746== by 0x4217D2: function_code_fastcall (call.c:292) Warning (A) goes away when Python is compiled with gcc -O1. Warning (B) is still present when Python is compiled with gcc -O0. It's unclear to me if it's a false alarm or a real issue. On Fedora, the issue can be seen with: echo|valgrind python3 /usr/lib64/python3.7/tokenize.py On Fedora 30, python3 is Python 3.7.4. Downstream Fedora issue: https://bugzilla.redhat.com/show_bug.cgi?id=1751208 ---------- components: Interpreter Core messages: 351939 nosy: vstinner priority: normal severity: normal status: open title: Valgrind warnings when running tokenize.py versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:29:33 2019 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 11 Sep 2019 15:29:33 +0000 Subject: [issue35224] PEP 572: Assignment Expressions In-Reply-To: <1568215009.06.0.539336667063.issue35224@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: Congrats! Let's party. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:29:36 2019 From: report at bugs.python.org (mattip) Date: Wed, 11 Sep 2019 15:29:36 +0000 Subject: [issue37967] Beta GPG signature check failing In-Reply-To: <1566977917.52.0.520116504637.issue37967@roundup.psfhosted.org> Message-ID: <1568215776.45.0.322574567837.issue37967@roundup.psfhosted.org> mattip added the comment: Is automatic download really the best solution? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:29:47 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 11 Sep 2019 15:29:47 +0000 Subject: [issue34331] Incorrectly pluralized abstract class error message In-Reply-To: <1533311791.76.0.56676864532.issue34331@psf.upfronthosting.co.za> Message-ID: <1568215787.56.0.111230021533.issue34331@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 4a12a178f4a6b9a59d97fecc727f2b6b28dfc85f by St?phane Wirtel (Daniel Andrade) in branch 'master': bpo-34331: Fix incorrectly pluralized abstract class error message. (GH-8670) https://github.com/python/cpython/commit/4a12a178f4a6b9a59d97fecc727f2b6b28dfc85f ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:30:36 2019 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 11 Sep 2019 15:30:36 +0000 Subject: [issue38106] Race in PyThread_release_lock - can lead to memory corruption and deadlock In-Reply-To: <1568200653.3.0.865964137512.issue38106@roundup.psfhosted.org> Message-ID: <1568215836.42.0.887266076272.issue38106@roundup.psfhosted.org> Kristj?n Valur J?nsson added the comment: Interesting. Yet another reason to always do condition signalling with the lock held, such as is good practice to avoid race conditions. That's the whole point of condition variables. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:30:39 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 11 Sep 2019 15:30:39 +0000 Subject: [issue34331] Incorrectly pluralized abstract class error message In-Reply-To: <1533311791.76.0.56676864532.issue34331@psf.upfronthosting.co.za> Message-ID: <1568215839.22.0.532792431191.issue34331@roundup.psfhosted.org> St?phane Wirtel added the comment: Thank you for your contribution ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:31:51 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 11 Sep 2019 15:31:51 +0000 Subject: [issue38096] Clean up the "struct sequence" / "named tuple" docs In-Reply-To: <1568153124.61.0.864461609465.issue38096@roundup.psfhosted.org> Message-ID: <1568215911.11.0.210946273226.issue38096@roundup.psfhosted.org> Raymond Hettinger added the comment: Paul, the usual procedure is for you to mark the PR as approved and leave the commit step for the core developer who created the patch. Also, Tim filed this issue and had put thought into it. The commit shouldn't have occurred until he had a chance to make review comments. Tim, did the proposed (and prematurely committed) PR fully address your concerns? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:32:36 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 11 Sep 2019 15:32:36 +0000 Subject: [issue37645] Replace PyEval_GetFuncName/PyEval_GetFuncDesc In-Reply-To: <1563731175.2.0.136240000148.issue37645@roundup.psfhosted.org> Message-ID: <1568215956.35.0.252394503702.issue37645@roundup.psfhosted.org> Petr Viktorin added the comment: I like PR 14890 better. I like the separation of representation for error messages (where it's clearer that this is a callable) and for __str__. Also, changing the __str__ of functions would need much wider discussion than on issues/PRs. I left some comments on the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:34:12 2019 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 11 Sep 2019 15:34:12 +0000 Subject: [issue8410] Fix emulated lock to be 'fair' In-Reply-To: <1271361646.51.0.206027864382.issue8410@psf.upfronthosting.co.za> Message-ID: <1568216052.9.0.818030897748.issue8410@roundup.psfhosted.org> Kristj?n Valur J?nsson added the comment: super, good catch! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:35:04 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 11 Sep 2019 15:35:04 +0000 Subject: [issue37409] relative import without parent succeeds with builtins.__import__ In-Reply-To: <1561540286.77.0.471225789226.issue37409@roundup.psfhosted.org> Message-ID: <1568216104.89.0.614962911575.issue37409@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: The test added seems to have created an ImportWarning in test_builtin.BuiltinTest.test_import . ./python.exe -Wall -m unittest -v test.test_builtin.BuiltinTest.test_import test_import (test.test_builtin.BuiltinTest) ... /Users/karthikeyansingaravelan/stuff/python/cpython/Lib/unittest/case.py:202: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__ callable_obj(*args, **kwargs) ok ---------------------------------------------------------------------- Ran 1 test in 0.002s OK ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:36:44 2019 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 11 Sep 2019 15:36:44 +0000 Subject: [issue33187] Document ElementInclude (XInclude) support in ElementTree In-Reply-To: <1522427694.7.0.467229070634.issue33187@psf.upfronthosting.co.za> Message-ID: <1568216204.83.0.952587007112.issue33187@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset 195dc142f84804ad9c8ce91414ab4a0bf9615f09 by Stefan Behnel (Miss Islington (bot)) in branch '3.7': bpo-33187: Document ElementInclude (XInclude) support in ElementTree (GH-8861) (GH-15972) https://github.com/python/cpython/commit/195dc142f84804ad9c8ce91414ab4a0bf9615f09 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:39:36 2019 From: report at bugs.python.org (Redcxx) Date: Wed, 11 Sep 2019 15:39:36 +0000 Subject: [issue38111] Error while building Python from source In-Reply-To: <1568209663.11.0.274214516349.issue38111@roundup.psfhosted.org> Message-ID: <1568216376.57.0.274164644889.issue38111@roundup.psfhosted.org> Redcxx added the comment: That works, but I notice some message somewhere near the end of running `make`: running build running build_ext INFO: Can't locate Tcl/Tk libs and/or headers Python build finished successfully! The necessary bits to build these optional modules were not found: _bz2 _hashlib _lzma _sqlite3 _ssl _tkinter _uuid readline To find the necessary bits, look in setup.py in detect_modules() for the module's name. The following modules found by detect_modules() in setup.py, have been built by the Makefile instead, as configured by the Setup files: _abc atexit pwd time Could not build the ssl module! Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_PARAM_set1_host(). LibreSSL 2.6.4 and earlier do not provide the necessary APIs, https://github.com/libressl-portable/portable/issues/381 And after `make install`, python is not running as expected: $ python3 python3: error while loading shared libraries: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:40:29 2019 From: report at bugs.python.org (Christian Heimes) Date: Wed, 11 Sep 2019 15:40:29 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568216429.48.0.265060614785.issue38117@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +15614 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15983 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:44:18 2019 From: report at bugs.python.org (Christian Heimes) Date: Wed, 11 Sep 2019 15:44:18 +0000 Subject: [issue37967] Beta GPG signature check failing In-Reply-To: <1566977917.52.0.520116504637.issue37967@roundup.psfhosted.org> Message-ID: <1568216658.94.0.918376438042.issue37967@roundup.psfhosted.org> Christian Heimes added the comment: This is GPG. You have to download and verify the signature somehow. That's how GPG works. You can either let GPG do it automatically or you can do it manually. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:47:19 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 15:47:19 +0000 Subject: [issue38113] Remove statics from ast.c In-Reply-To: <1568210711.23.0.951109613555.issue38113@roundup.psfhosted.org> Message-ID: <1568216839.79.0.793493148669.issue38113@roundup.psfhosted.org> miss-islington added the comment: New changeset 5b172c27f760dc5437e37dd8f1540eb76440e9a7 by Miss Islington (bot) (Dino Viehland) in branch 'master': bpo-38113: Update Python/ast.c to PEP-384 (GH-15975) https://github.com/python/cpython/commit/5b172c27f760dc5437e37dd8f1540eb76440e9a7 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:47:24 2019 From: report at bugs.python.org (Redcxx) Date: Wed, 11 Sep 2019 15:47:24 +0000 Subject: [issue38111] Error while building Python from source In-Reply-To: <1568209663.11.0.274214516349.issue38111@roundup.psfhosted.org> Message-ID: <1568216844.54.0.516983302835.issue38111@roundup.psfhosted.org> Redcxx added the comment: not sure if it is related but I am installing Python in a different directory and I have added that to the prefix option when runnning configure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:55:34 2019 From: report at bugs.python.org (Julien Palard) Date: Wed, 11 Sep 2019 15:55:34 +0000 Subject: [issue36182] Path.write_text() docs do not include the case that a file exists In-Reply-To: <1551703881.69.0.0731434428442.issue36182@roundup.psfhosted.org> Message-ID: <1568217334.9.0.743647247904.issue36182@roundup.psfhosted.org> Julien Palard added the comment: New changeset 893653357cc83d49049debfeb9074a4ce99cd478 by Julien Palard (Miss Islington (bot)) in branch '3.8': bpo-36182: Update pathlib.Path.write_text() docs (GH-12161) (GH-15977) https://github.com/python/cpython/commit/893653357cc83d49049debfeb9074a4ce99cd478 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:55:57 2019 From: report at bugs.python.org (Julien Palard) Date: Wed, 11 Sep 2019 15:55:57 +0000 Subject: [issue36182] Path.write_text() docs do not include the case that a file exists In-Reply-To: <1551703881.69.0.0731434428442.issue36182@roundup.psfhosted.org> Message-ID: <1568217357.82.0.699375672341.issue36182@roundup.psfhosted.org> Change by Julien Palard : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:56:00 2019 From: report at bugs.python.org (Thomas Wouters) Date: Wed, 11 Sep 2019 15:56:00 +0000 Subject: [issue37885] venv: Don't produce unbound variable warning on deactivate In-Reply-To: <1566204609.23.0.435399494767.issue37885@roundup.psfhosted.org> Message-ID: <1568217360.16.0.745384517272.issue37885@roundup.psfhosted.org> Thomas Wouters added the comment: New changeset 63eefc35674ec12ab4d00af4feaf21de4cb1c91c by T. Wouters (Miss Islington (bot)) in branch '3.8': bpo-37885: venv: Don't produce unbound variable warning on deactivate (GH-15973) https://github.com/python/cpython/commit/63eefc35674ec12ab4d00af4feaf21de4cb1c91c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:56:16 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 15:56:16 +0000 Subject: [issue33166] os.cpu_count() returns wrong number of processors on specific systems Message-ID: <1568217376.06.0.010715562991.issue33166@roundup.psfhosted.org> miss-islington added the comment: New changeset 43ee0e2ca33ae28d37a3dddf10a648895cd46bda by Miss Islington (bot) in branch '3.8': bpo-33166: Change os.cpu_count to return active (real) processors (GH-15949) https://github.com/python/cpython/commit/43ee0e2ca33ae28d37a3dddf10a648895cd46bda ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:56:31 2019 From: report at bugs.python.org (Thomas Wouters) Date: Wed, 11 Sep 2019 15:56:31 +0000 Subject: [issue37885] venv: Don't produce unbound variable warning on deactivate In-Reply-To: <1566204609.23.0.435399494767.issue37885@roundup.psfhosted.org> Message-ID: <1568217391.14.0.0941086784593.issue37885@roundup.psfhosted.org> Thomas Wouters added the comment: New changeset d126fbddc960afd93ff070bc34209be256152943 by T. Wouters (Miss Islington (bot)) in branch '3.7': bpo-37885: venv: Don't produce unbound variable warning on deactivate (GH-15974) https://github.com/python/cpython/commit/d126fbddc960afd93ff070bc34209be256152943 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:57:27 2019 From: report at bugs.python.org (Thomas Wouters) Date: Wed, 11 Sep 2019 15:57:27 +0000 Subject: [issue37885] venv: Don't produce unbound variable warning on deactivate In-Reply-To: <1566204609.23.0.435399494767.issue37885@roundup.psfhosted.org> Message-ID: <1568217447.13.0.0119752275464.issue37885@roundup.psfhosted.org> Thomas Wouters added the comment: Thanks, fix merged. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:57:58 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 15:57:58 +0000 Subject: [issue38114] Exclude pip.ini from Nuget package In-Reply-To: <1568211808.23.0.234312966832.issue38114@roundup.psfhosted.org> Message-ID: <1568217478.12.0.776442066825.issue38114@roundup.psfhosted.org> miss-islington added the comment: New changeset 436cd2c20b1d7c86be1c53a3ba3bceefcaff2b73 by Miss Islington (bot) in branch '3.8': bpo-38114: Do not include pip.ini in Nuget package (GH-15964) https://github.com/python/cpython/commit/436cd2c20b1d7c86be1c53a3ba3bceefcaff2b73 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 11:58:26 2019 From: report at bugs.python.org (Davin Potts) Date: Wed, 11 Sep 2019 15:58:26 +0000 Subject: [issue38119] resource tracker destroys shared memory segments when other processes should still have valid access Message-ID: <1568217506.85.0.770661201111.issue38119@roundup.psfhosted.org> New submission from Davin Potts : The resource tracker currently destroys (via _posixshmem.shm_unlink) shared memory segments on posix systems when any independently created Python process with a handle on a shared memory segment exits (gracefully or otherwise). This breaks the expected cross-platform behavior that a shared memory segment persists at least as long as any running process has a handle on that segment. As described with an example scenario in issue37754: Let's say a three processes P1, P2 and P3 are trying to communicate using shared memory. --> P1 creates the shared memory block, and waits for P2 and P3 to access it. --> P2 starts and attaches this shared memory segment, writes some data to it and exits. --> Now in case of Unix, shm_unlink is called as soon as P2 exits. (This is by action of the resource tracker.) --> Now, P3 starts and tries to attach the shared memory segment. --> P3 will not be able to attach the shared memory segment in Unix, because shm_unlink has been called on that segment. --> Whereas, P3 will be able to attach to the shared memory segment in Windows. Another key scenario we expect to work but does not currently: 1. A multiprocessing.managers.SharedMemoryManager is instantiated and started in process A. 2. A shared memory segment is created using that manager in process A. 3. A serialized representation of that shared memory segment is deserialized in process B. 4. Process B does work with the shared memory segment that is also still visible to process A. 5. Process B exits cleanly. 6. Process A reads data from the shared memory segment after process B is gone. (This currently fails.) The SharedMemoryManager provides a flexible means for ensuring cleanup of shared memory segments. The current resource tracker attempts to treat shared memory segments as equivalent to semaphore references, which is too narrow of an interpretation. As such, the current resource tracker should not be attempting to enforce cleanup of shared memory segments because it breaks expected behavior and significantly limits functionality. ---------- assignee: davin components: Library (Lib) messages: 351960 nosy: davin, pablogsal, pitrou, vinay0410, vstinner priority: normal severity: normal status: open title: resource tracker destroys shared memory segments when other processes should still have valid access type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:00:04 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 11 Sep 2019 16:00:04 +0000 Subject: [issue35923] Update the BuiltinImporter in importlib to use loader._ORIGIN instead of a hardcoded value In-Reply-To: <1549490401.35.0.0798819591421.issue35923@roundup.psfhosted.org> Message-ID: <1568217604.91.0.0912686330771.issue35923@roundup.psfhosted.org> Brett Cannon added the comment: New changeset 145cf1f50c8a8e8233e641f345cd5e25ee69190a by Brett Cannon (Dong-hee Na) in branch 'master': bpo-35923: Update the BuiltinImporter to use loader._ORIGIN instead of a hard-coded value (GH-15651) https://github.com/python/cpython/commit/145cf1f50c8a8e8233e641f345cd5e25ee69190a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:00:52 2019 From: report at bugs.python.org (Davin Potts) Date: Wed, 11 Sep 2019 16:00:52 +0000 Subject: [issue37754] Consistency of Unix's shared_memory implementation with windows In-Reply-To: <1564914758.61.0.506857998168.issue37754@roundup.psfhosted.org> Message-ID: <1568217652.32.0.760464376457.issue37754@roundup.psfhosted.org> Davin Potts added the comment: I have created issue38119 to track a fix to the inappropriate use of resource tracker with shared memory segments, but this does not replace or supersede what is discussed here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:02:38 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Sep 2019 16:02:38 +0000 Subject: [issue36528] Remove duplicate tests in Lib/tests/re_tests.py In-Reply-To: <1554398942.85.0.973114316102.issue36528@roundup.psfhosted.org> Message-ID: <1568217757.99.0.42662338571.issue36528@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset e6557d3c62800f51ee6530c94a10b93d725504fa by Benjamin Peterson (Xtreak) in branch 'master': bpo-36528: Remove duplicate re tests. (GH-2689) https://github.com/python/cpython/commit/e6557d3c62800f51ee6530c94a10b93d725504fa ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:02:49 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 16:02:49 +0000 Subject: [issue36528] Remove duplicate tests in Lib/tests/re_tests.py In-Reply-To: <1554398942.85.0.973114316102.issue36528@roundup.psfhosted.org> Message-ID: <1568217769.17.0.585144868619.issue36528@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15615 pull_request: https://github.com/python/cpython/pull/15986 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:03:21 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Sep 2019 16:03:21 +0000 Subject: [issue36260] [security] CVE-2019-9674: Zip Bomb vulnerability In-Reply-To: <1552288618.75.0.236192047967.issue36260@roundup.psfhosted.org> Message-ID: <1568217801.62.0.746149269573.issue36260@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset c5a672315dffbc95acc1ca28584ec84ddb56626f by Jason R. Coombs (Miss Islington (bot)) in branch '3.8': bpo-36260: Add pitfalls to zipfile module documentation (GH-13378) (GH-15976) https://github.com/python/cpython/commit/c5a672315dffbc95acc1ca28584ec84ddb56626f ---------- nosy: +jaraco _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:03:39 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 11 Sep 2019 16:03:39 +0000 Subject: [issue32592] Drop support of Windows Vista and 7 in Python 3.9 In-Reply-To: <1516268238.05.0.467229070634.issue32592@psf.upfronthosting.co.za> Message-ID: <1568217819.84.0.168378305804.issue32592@roundup.psfhosted.org> Zachary Ware added the comment: New changeset 0b72ccff56fb47e14f7b1f6590eafff8d104c229 by Zachary Ware (Steve Dower) in branch 'master': bpo-32592: Set Windows 8 as the minimum required version for API support (GH-15951) https://github.com/python/cpython/commit/0b72ccff56fb47e14f7b1f6590eafff8d104c229 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:05:25 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Sep 2019 16:05:25 +0000 Subject: [issue36528] Remove duplicate tests in Lib/tests/re_tests.py In-Reply-To: <1554398942.85.0.973114316102.issue36528@roundup.psfhosted.org> Message-ID: <1568217925.17.0.289797528425.issue36528@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:06:48 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 11 Sep 2019 16:06:48 +0000 Subject: [issue38120] DeprecationWarning in test_random due to invalid seed arguments Message-ID: <1568218008.0.0.38131396656.issue38120@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : Since d0cdeaab76fef8a6e5a04665df226b6659111e4e (bpo-32554) using random.seed raises DeprecationWarning for some types. This is not handled in test_random causing DeprecationWarnings. I will raise a PR for this. commit d0cdeaab76fef8a6e5a04665df226b6659111e4e Author: Raymond Hettinger Date: Thu Aug 22 09:19:36 2019 -0700 bpo-32554: Deprecate hashing arbitrary types in random.seed() (GH-15382) ---------- components: Tests messages: 351966 nosy: pablogsal, rhettinger, vstinner, xtreak priority: normal severity: normal status: open title: DeprecationWarning in test_random due to invalid seed arguments type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:10:11 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 11 Sep 2019 16:10:11 +0000 Subject: [issue38120] DeprecationWarning in test_random due to invalid seed arguments In-Reply-To: <1568218008.0.0.38131396656.issue38120@roundup.psfhosted.org> Message-ID: <1568218211.59.0.774014465546.issue38120@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +15616 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15987 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:13:31 2019 From: report at bugs.python.org (hai shi) Date: Wed, 11 Sep 2019 16:13:31 +0000 Subject: [issue37750] PyBuffer_FromContiguous not documented In-Reply-To: <1564822618.55.0.397769114373.issue37750@roundup.psfhosted.org> Message-ID: <1568218411.27.0.383485517742.issue37750@roundup.psfhosted.org> Change by hai shi : ---------- pull_requests: +15617 pull_request: https://github.com/python/cpython/pull/15988 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:14:00 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 11 Sep 2019 16:14:00 +0000 Subject: [issue38111] Error while building Python from source In-Reply-To: <1568209663.11.0.274214516349.issue38111@roundup.psfhosted.org> Message-ID: <1568218440.2.0.322474387925.issue38111@roundup.psfhosted.org> Zachary Ware added the comment: Ok, that shows that the issue is not actually with the Python build, but with trying to find the right incantation for both OpenSSL and Python to get what you want :). As such I'm going to go ahead and close the issue. As for getting you going, there is a bit of headache involved in getting the dynamic library search path correct; if you're installing in exotic locations, you may need to add entries in `/etc/ld.conf.d/` (and run `ldconfig`). Hopefully this gives you enough hints to search for to get you to where you want! ---------- resolution: -> not a bug stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:20:54 2019 From: report at bugs.python.org (Davin Potts) Date: Wed, 11 Sep 2019 16:20:54 +0000 Subject: [issue38119] resource tracker destroys shared memory segments when other processes should still have valid access In-Reply-To: <1568217506.85.0.770661201111.issue38119@roundup.psfhosted.org> Message-ID: <1568218854.03.0.338441595737.issue38119@roundup.psfhosted.org> Change by Davin Potts : ---------- keywords: +patch pull_requests: +15618 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15989 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:25:49 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Sep 2019 16:25:49 +0000 Subject: [issue31639] http.server and SimpleHTTPServer hang after a few requests In-Reply-To: <1506701944.65.0.213398074469.issue31639@psf.upfronthosting.co.za> Message-ID: <1568219149.64.0.60055398599.issue31639@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:34:20 2019 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 11 Sep 2019 16:34:20 +0000 Subject: [issue35923] Update the BuiltinImporter in importlib to use loader._ORIGIN instead of a hardcoded value In-Reply-To: <1549490401.35.0.0798819591421.issue35923@roundup.psfhosted.org> Message-ID: <1568219660.66.0.336808437288.issue35923@roundup.psfhosted.org> Change by Dong-hee Na : ---------- assignee: nnja -> corona10 resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:35:21 2019 From: report at bugs.python.org (mattip) Date: Wed, 11 Sep 2019 16:35:21 +0000 Subject: [issue37967] Beta GPG signature check failing In-Reply-To: <1566977917.52.0.520116504637.issue37967@roundup.psfhosted.org> Message-ID: <1568219721.5.0.281487196206.issue37967@roundup.psfhosted.org> mattip added the comment: I am not a gpg expert, but I think the proper solution is to add the release manager's key to the official Python GPG public key list. What would it take for that to happen? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:38:49 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 16:38:49 +0000 Subject: [issue37750] PyBuffer_FromContiguous not documented In-Reply-To: <1564822618.55.0.397769114373.issue37750@roundup.psfhosted.org> Message-ID: <1568219929.87.0.33740366273.issue37750@roundup.psfhosted.org> miss-islington added the comment: New changeset 5a56ce4a0e820fefcd598b94715a7ff7e199858d by Miss Islington (bot) (Hai Shi) in branch 'master': bpo-37750: Add doc of PyBuffer_FromContiguous (GH-15988) https://github.com/python/cpython/commit/5a56ce4a0e820fefcd598b94715a7ff7e199858d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:39:03 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 16:39:03 +0000 Subject: [issue37750] PyBuffer_FromContiguous not documented In-Reply-To: <1564822618.55.0.397769114373.issue37750@roundup.psfhosted.org> Message-ID: <1568219943.0.0.809978326986.issue37750@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15619 pull_request: https://github.com/python/cpython/pull/15990 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:39:10 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 16:39:10 +0000 Subject: [issue37750] PyBuffer_FromContiguous not documented In-Reply-To: <1564822618.55.0.397769114373.issue37750@roundup.psfhosted.org> Message-ID: <1568219950.0.0.0912441918521.issue37750@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15620 pull_request: https://github.com/python/cpython/pull/15991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:39:28 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 11 Sep 2019 16:39:28 +0000 Subject: [issue37750] PyBuffer_FromContiguous not documented In-Reply-To: <1564822618.55.0.397769114373.issue37750@roundup.psfhosted.org> Message-ID: <1568219968.32.0.695502239675.issue37750@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- versions: +Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:39:46 2019 From: report at bugs.python.org (Kirill Smelkov) Date: Wed, 11 Sep 2019 16:39:46 +0000 Subject: [issue38106] Race in PyThread_release_lock - can lead to memory corruption and deadlock In-Reply-To: <1568200653.3.0.865964137512.issue38106@roundup.psfhosted.org> Message-ID: <1568219986.67.0.423356853296.issue38106@roundup.psfhosted.org> Kirill Smelkov added the comment: Thanks for feedback. Yes, since for Python-level lock, PyThread_release_lock() is called with GIL held: https://github.com/python/cpython/blob/v2.7.16-129-g58d61efd4cd/Modules/threadmodule.c#L69-L82 the GIL effectively serves as the synchronization device in between T2 releasing the lock, and T1 proceeding after second sema.acquire() when it gets to execute python-level code with `del sema`. However a) there is no sign that this aspect - that release must be called under GIL - is being explicitly relied upon by PyThread_release_lock() code, and b) e.g. _testcapimodule.c already has a test which calls PyThread_release_lock() with GIL released: https://github.com/python/cpython/blob/v2.7.16-129-g58d61efd4cd/Modules/_testcapimodule.c#L1972-L2053 https://github.com/python/cpython/blob/v2.7.16-129-g58d61efd4cd/Modules/_testcapimodule.c#L1998-L2002 Thus, I believe, there is a bug in PyThread_release_lock() and we were just lucky not to hit it due to GIL and Python-level usage. For the reference, I indeed started to observe the problem when I moved locks and other code that implement channels in Pygolang from Python to C level: https://lab.nexedi.com/kirr/pygolang/commit/69db91bf https://lab.nexedi.com/kirr/pygolang/commit/3b241983?expand_all_diffs=1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:41:22 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Sep 2019 16:41:22 +0000 Subject: [issue38121] Synchronize importlib.metadata with importlib_metadata 0.22 Message-ID: <1568220082.72.0.518622909571.issue38121@roundup.psfhosted.org> New submission from Jason R. Coombs : Incorporate the changes from the 0.22 release (https://gitlab.com/python-devs/importlib_metadata/blob/0.22/importlib_metadata/docs/changelog.rst) including the new lightweight shim from PathFinder into importlib.metadata.MetadataPathFinder. ---------- assignee: jaraco messages: 351971 nosy: jaraco priority: normal severity: normal status: open title: Synchronize importlib.metadata with importlib_metadata 0.22 type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:41:30 2019 From: report at bugs.python.org (Kirill Smelkov) Date: Wed, 11 Sep 2019 16:41:30 +0000 Subject: [issue38106] Race in PyThread_release_lock - can lead to memory corruption and deadlock In-Reply-To: <1568200653.3.0.865964137512.issue38106@roundup.psfhosted.org> Message-ID: <1568220090.19.0.849076062831.issue38106@roundup.psfhosted.org> Kirill Smelkov added the comment: And it is indeed better to always do pthread_cond_signal() from under mutex. Many pthread libraries delay the signalling to associated mutex unlock, so there should be no performance penalty here and the correctness is much more easier to reason about. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:42:28 2019 From: report at bugs.python.org (Kirill Smelkov) Date: Wed, 11 Sep 2019 16:42:28 +0000 Subject: [issue8410] Fix emulated lock to be 'fair' In-Reply-To: <1271361646.51.0.206027864382.issue8410@psf.upfronthosting.co.za> Message-ID: <1568220148.08.0.445141681194.issue8410@roundup.psfhosted.org> Kirill Smelkov added the comment: Thanks for feedback. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:44:36 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 11 Sep 2019 16:44:36 +0000 Subject: [issue34634] New asyncio streams API In-Reply-To: <1536700682.14.0.0269046726804.issue34634@psf.upfronthosting.co.za> Message-ID: <1568220276.46.0.92208127732.issue34634@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Streams API is implemented as part of issue36889 in 3.8. I think we can close this as a duplicate. Thanks. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:45:55 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 11 Sep 2019 16:45:55 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568220355.09.0.676646142974.issue38117@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 58ab13479d854491ac9207bacfae25e8b18b044a by St?phane Wirtel (Christian Heimes) in branch 'master': bpo-38117: Test with OpenSSL 1.1.1d (GH-15983) https://github.com/python/cpython/commit/58ab13479d854491ac9207bacfae25e8b18b044a ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:46:05 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 16:46:05 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568220365.32.0.257589372517.issue38117@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15621 pull_request: https://github.com/python/cpython/pull/15992 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:46:31 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 16:46:31 +0000 Subject: [issue36528] Remove duplicate tests in Lib/tests/re_tests.py In-Reply-To: <1554398942.85.0.973114316102.issue36528@roundup.psfhosted.org> Message-ID: <1568220391.74.0.739765359776.issue36528@roundup.psfhosted.org> miss-islington added the comment: New changeset f90cbcbfe318fc4f0107bfad3cfc653ad1501c58 by Miss Islington (bot) in branch '3.8': bpo-36528: Remove duplicate re tests. (GH-2689) https://github.com/python/cpython/commit/f90cbcbfe318fc4f0107bfad3cfc653ad1501c58 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:46:33 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 11 Sep 2019 16:46:33 +0000 Subject: [issue30105] Duplicated connection_made() call for some SSL connections In-Reply-To: <1492641406.9.0.0965010091679.issue30105@psf.upfronthosting.co.za> Message-ID: <1568220393.97.0.238347135816.issue30105@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Closing as per OPs last message. Feel free to reopen if needed. Thanks. ---------- nosy: +xtreak resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:48:23 2019 From: report at bugs.python.org (Davin Potts) Date: Wed, 11 Sep 2019 16:48:23 +0000 Subject: [issue37637] multiprocessing numpy.ndarray not transmitted properly In-Reply-To: <1563646298.52.0.224679939244.issue37637@roundup.psfhosted.org> Message-ID: <1568220503.6.0.36960390914.issue37637@roundup.psfhosted.org> Davin Potts added the comment: Marking as closed after providing an example of how to send NumPy arrays as bytes with the send_bytes() function. ---------- resolution: -> not a bug stage: -> resolved status: -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:49:27 2019 From: report at bugs.python.org (Christian Heimes) Date: Wed, 11 Sep 2019 16:49:27 +0000 Subject: [issue37967] Beta GPG signature check failing In-Reply-To: <1566977917.52.0.520116504637.issue37967@roundup.psfhosted.org> Message-ID: <1568220567.52.0.655316245532.issue37967@roundup.psfhosted.org> Christian Heimes added the comment: If you use pubkeys.txt from https://www.python.org/static/files/pubkeys.txt, then GPG verification gives you no additional security. An attack with write access to www.python.org or access to the private key of www.python.org can easily replace the pubkeys.txt with a key file under his control. You only get additional security if you retrieve the key from a different location *and* verify that the key owned by ?ukasz. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:51:58 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 11 Sep 2019 16:51:58 +0000 Subject: [issue34709] Suggestion: make getuser.getpass() also look at SUDO_USER environment variable In-Reply-To: <1537160258.21.0.956365154283.issue34709@psf.upfronthosting.co.za> Message-ID: <1568220718.95.0.94293150878.issue34709@roundup.psfhosted.org> Zachary Ware added the comment: I agree with Steven in that I'm not quite sure this is a good change, but I also see that it would be useful in some cases. Perhaps either a `check_sudo_user=False` keyword-only parameter, or a `vars_to_check=()` parameter would be better? Adding Gregory P. Smith as the last person to have added their name to getpass.py :) ---------- nosy: +gregory.p.smith, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:53:54 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 11 Sep 2019 16:53:54 +0000 Subject: [issue38121] Synchronize importlib.metadata with importlib_metadata 0.22 In-Reply-To: <1568220082.72.0.518622909571.issue38121@roundup.psfhosted.org> Message-ID: <1568220834.51.0.0251479797699.issue38121@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- keywords: +patch pull_requests: +15622 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15993 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:54:37 2019 From: report at bugs.python.org (Christian Heimes) Date: Wed, 11 Sep 2019 16:54:37 +0000 Subject: [issue36161] Use thread-safe functions instead of unsafe ones (crypt, ttyname) In-Reply-To: <1551475826.18.0.295115684796.issue36161@roundup.psfhosted.org> Message-ID: <1568220877.46.0.0577317424699.issue36161@roundup.psfhosted.org> Christian Heimes added the comment: Does it make sense to modify crypt at all? PEP 594 is going to deprecate and remove crypt soon. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 12:58:58 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 11 Sep 2019 16:58:58 +0000 Subject: [issue35282] Add a return value to lib2to3.refactor.refactor_file and refactor_dir In-Reply-To: <1542742451.18.0.788709270274.issue35282@psf.upfronthosting.co.za> Message-ID: <1568221138.46.0.18169264391.issue35282@roundup.psfhosted.org> Change by Zachary Ware : ---------- nosy: +benjamin.peterson, zach.ware versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:09:31 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 17:09:31 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568221771.48.0.683747491243.issue38117@roundup.psfhosted.org> miss-islington added the comment: New changeset 0b7f3706e6a4d72f7e9988cebc4826ad2c4c4753 by Miss Islington (bot) in branch '3.8': bpo-38117: Test with OpenSSL 1.1.1d (GH-15983) https://github.com/python/cpython/commit/0b7f3706e6a4d72f7e9988cebc4826ad2c4c4753 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:10:00 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 11 Sep 2019 17:10:00 +0000 Subject: [issue37750] PyBuffer_FromContiguous not documented In-Reply-To: <1564822618.55.0.397769114373.issue37750@roundup.psfhosted.org> Message-ID: <1568221800.01.0.102341284475.issue37750@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 4cab7eb9e1f4afc44bac4889de034e031d462e7a by St?phane Wirtel (Miss Islington (bot)) in branch '3.8': bpo-37750: Add doc of PyBuffer_FromContiguous (GH-15988) (GH-15990) https://github.com/python/cpython/commit/4cab7eb9e1f4afc44bac4889de034e031d462e7a ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:10:26 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 11 Sep 2019 17:10:26 +0000 Subject: [issue37750] PyBuffer_FromContiguous not documented In-Reply-To: <1564822618.55.0.397769114373.issue37750@roundup.psfhosted.org> Message-ID: <1568221826.11.0.11918085644.issue37750@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset c112faff158a05c1e71f9e1957364ed756efbcde by St?phane Wirtel (Miss Islington (bot)) in branch '3.7': bpo-37750: Add doc of PyBuffer_FromContiguous (GH-15988) (GH-15991) https://github.com/python/cpython/commit/c112faff158a05c1e71f9e1957364ed756efbcde ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:10:54 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 11 Sep 2019 17:10:54 +0000 Subject: [issue37750] PyBuffer_FromContiguous not documented In-Reply-To: <1564822618.55.0.397769114373.issue37750@roundup.psfhosted.org> Message-ID: <1568221854.99.0.0439392637895.issue37750@roundup.psfhosted.org> St?phane Wirtel added the comment: Thank you for your contribution ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:12:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Sep 2019 17:12:24 +0000 Subject: [issue28724] Add method send_io, recv_io to the socket module. In-Reply-To: <1479395133.65.0.0720889900419.issue28724@psf.upfronthosting.co.za> Message-ID: <1568221944.13.0.518640514206.issue28724@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 8d120f75fb8c8731464b5f7531d74cdbb897d924 by Victor Stinner (Joannah Nanjekye) in branch 'master': bpo-28724: Add methods send_fds and recv_fds to the socket module (GH-12889) https://github.com/python/cpython/commit/8d120f75fb8c8731464b5f7531d74cdbb897d924 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:14:44 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 11 Sep 2019 17:14:44 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568222084.82.0.76574427795.issue38117@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- pull_requests: +15623 pull_request: https://github.com/python/cpython/pull/15994 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:16:37 2019 From: report at bugs.python.org (Eric Snow) Date: Wed, 11 Sep 2019 17:16:37 +0000 Subject: [issue38113] Remove statics from ast.c In-Reply-To: <1568210711.23.0.951109613555.issue38113@roundup.psfhosted.org> Message-ID: <1568222197.68.0.986027744911.issue38113@roundup.psfhosted.org> Eric Snow added the comment: New changeset ac46eb4ad6662cf6d771b20d8963658b2186c48c by Eric Snow (Dino Viehland) in branch 'master': bpo-38113: Update the Python-ast.c generator to PEP384 (gh-15957) https://github.com/python/cpython/commit/ac46eb4ad6662cf6d771b20d8963658b2186c48c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:18:00 2019 From: report at bugs.python.org (Eric Snow) Date: Wed, 11 Sep 2019 17:18:00 +0000 Subject: [issue38113] Remove statics from ast.c In-Reply-To: <1568210711.23.0.951109613555.issue38113@roundup.psfhosted.org> Message-ID: <1568222280.19.0.878297288081.issue38113@roundup.psfhosted.org> Change by Eric Snow : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:18:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Sep 2019 17:18:17 +0000 Subject: [issue28724] Add method send_io, recv_io to the socket module. In-Reply-To: <1479395133.65.0.0720889900419.issue28724@psf.upfronthosting.co.za> Message-ID: <1568222297.44.0.191499362831.issue28724@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Shinya Okano for the original patch. Well done Joannah! Thanks for your tenacity :-) This PR has 100 comments and 27 commits which shows the complexity of the feature. Honestly, I'm not 100% happy with current documentation, but I chose to merge the PR anyway. Please leave this issue open until the documentation is completed to mention corner cases like partial send (similar to sock.send vs sock.sendall). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:23:31 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 17:23:31 +0000 Subject: [issue35264] SSL Module build fails with OpenSSL 1.1.0 for Python 2.7 In-Reply-To: <1542373844.15.0.788709270274.issue35264@psf.upfronthosting.co.za> Message-ID: <1568222611.11.0.781894931533.issue35264@roundup.psfhosted.org> miss-islington added the comment: New changeset 0d63669e52dd7e95708ec14e9e3e07d7dc9cd913 by Miss Islington (bot) (Alexandru Ardelean) in branch '2.7': [2.7] bpo-35264: Modules/_ssl.c: fix build with OpenSSL 1.1.0 (GH-10570) https://github.com/python/cpython/commit/0d63669e52dd7e95708ec14e9e3e07d7dc9cd913 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:24:50 2019 From: report at bugs.python.org (Thomas Wouters) Date: Wed, 11 Sep 2019 17:24:50 +0000 Subject: [issue34001] LibreSSL does not tolerate setting minimum_version greater than maximum_version In-Reply-To: <1530288553.74.0.56676864532.issue34001@psf.upfronthosting.co.za> Message-ID: <1568222690.67.0.321320425853.issue34001@roundup.psfhosted.org> Thomas Wouters added the comment: New changeset c9bc49c5f6e26a7c958307c2ac338951a7534d9a by T. Wouters (Christian Heimes) in branch 'master': bpo-34001: Fix test_ssl with LibreSSL (GH-13783) https://github.com/python/cpython/commit/c9bc49c5f6e26a7c958307c2ac338951a7534d9a ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:24:54 2019 From: report at bugs.python.org (Lisa Roach) Date: Wed, 11 Sep 2019 17:24:54 +0000 Subject: [issue38122] AsyncMock force always creating an AsyncMock for child mocks Message-ID: <1568222694.73.0.217906468671.issue38122@roundup.psfhosted.org> New submission from Lisa Roach : This idea has been brought up in person before and also discussed on AsyncTest: https://github.com/Martiusweb/asynctest/issues/100 It could be useful if someone has a lot of attributes that are also async that need to be mocked. It could probably be done with a flag that gets passed on to _get_child_mock and overrides the if statement to always return an AsyncMock. Looking mostly for if people think this is a good idea/bad idea and help see around any corners that may be there. ---------- assignee: lisroach components: Library (Lib) messages: 351991 nosy: cjw296, ezio.melotti, lisroach, michael.foord, xtreak priority: low severity: normal status: open title: AsyncMock force always creating an AsyncMock for child mocks type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:25:01 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 17:25:01 +0000 Subject: [issue34001] LibreSSL does not tolerate setting minimum_version greater than maximum_version In-Reply-To: <1530288553.74.0.56676864532.issue34001@psf.upfronthosting.co.za> Message-ID: <1568222701.06.0.922356044684.issue34001@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15624 pull_request: https://github.com/python/cpython/pull/15997 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:25:57 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 17:25:57 +0000 Subject: [issue37698] Update doc of PyBuffer_ToContiguous In-Reply-To: <1564334680.0.0.401210106575.issue37698@roundup.psfhosted.org> Message-ID: <1568222757.94.0.0889753369648.issue37698@roundup.psfhosted.org> miss-islington added the comment: New changeset 15f5a7527b87e11fcf23069c147fd4cb7d42cfb0 by Miss Islington (bot) (Hai Shi) in branch 'master': bpo-37698: Update doc of PyBuffer_ToContiguous (GH-14992) https://github.com/python/cpython/commit/15f5a7527b87e11fcf23069c147fd4cb7d42cfb0 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:26:08 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 17:26:08 +0000 Subject: [issue37698] Update doc of PyBuffer_ToContiguous In-Reply-To: <1564334680.0.0.401210106575.issue37698@roundup.psfhosted.org> Message-ID: <1568222768.95.0.101241511325.issue37698@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15625 pull_request: https://github.com/python/cpython/pull/15998 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:26:56 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 11 Sep 2019 17:26:56 +0000 Subject: [issue37698] Update doc of PyBuffer_ToContiguous In-Reply-To: <1564334680.0.0.401210106575.issue37698@roundup.psfhosted.org> Message-ID: <1568222816.84.0.86787957577.issue37698@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- pull_requests: +15626 pull_request: https://github.com/python/cpython/pull/15999 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:34:21 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 11 Sep 2019 17:34:21 +0000 Subject: [issue37698] Update doc of PyBuffer_ToContiguous In-Reply-To: <1564334680.0.0.401210106575.issue37698@roundup.psfhosted.org> Message-ID: <1568223261.79.0.436127689423.issue37698@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset c62da14776d12276ed8f6ecbc74c0db8243b4260 by St?phane Wirtel (Miss Islington (bot)) in branch '3.7': bpo-37698: Update doc of PyBuffer_ToContiguous (GH-14992) (GH-15998) https://github.com/python/cpython/commit/c62da14776d12276ed8f6ecbc74c0db8243b4260 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:36:03 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 11 Sep 2019 17:36:03 +0000 Subject: [issue37698] Update doc of PyBuffer_ToContiguous In-Reply-To: <1564334680.0.0.401210106575.issue37698@roundup.psfhosted.org> Message-ID: <1568223363.53.0.52758974721.issue37698@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 965e53a9deb1c7f02c68dee119eae94c3be8af15 by St?phane Wirtel in branch '3.8': [3.8] bpo-37698: Update doc of PyBuffer_ToContiguous (GH-14992) (GH-15999) https://github.com/python/cpython/commit/965e53a9deb1c7f02c68dee119eae94c3be8af15 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:36:09 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 17:36:09 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568223369.62.0.582146916045.issue38117@roundup.psfhosted.org> miss-islington added the comment: New changeset cec68c31e8507159534b6eec3fb5d801cd3dbf8c by Miss Islington (bot) (St?phane Wirtel) in branch '3.7': [3.7] bpo-38117: Test with OpenSSL 1.1.1d (GH-15983) (GH-15994) https://github.com/python/cpython/commit/cec68c31e8507159534b6eec3fb5d801cd3dbf8c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:36:40 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 11 Sep 2019 17:36:40 +0000 Subject: [issue37698] Update doc of PyBuffer_ToContiguous In-Reply-To: <1564334680.0.0.401210106575.issue37698@roundup.psfhosted.org> Message-ID: <1568223400.33.0.275290667058.issue37698@roundup.psfhosted.org> St?phane Wirtel added the comment: Thank you for your contribution ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:37:37 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 11 Sep 2019 17:37:37 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568223457.83.0.482494676213.issue38117@roundup.psfhosted.org> St?phane Wirtel added the comment: Thank you for your contribution Christian ;-) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:38:50 2019 From: report at bugs.python.org (Davin Potts) Date: Wed, 11 Sep 2019 17:38:50 +0000 Subject: [issue37652] Multiprocessing shared_memory ValueError on race with ShareableList In-Reply-To: <1563808398.25.0.353016896189.issue37652@roundup.psfhosted.org> Message-ID: <1568223530.18.0.886153034509.issue37652@roundup.psfhosted.org> Davin Potts added the comment: Short responses to questions/comments from @bjs, followed by hopefully helpful further comments: > Are you supposed to ever use a raw SharedMemory buffer directly? Yes. > What atomicity guarantees are there for ShareableList operations and read/write to the SharedMemory buffer? None. > I've had a fix spinning for about a day now, it introduced a `multiprocessing.Lock` and it was simply wrapped around any struct packing and unpacking calls. That sounds like a nice general-purpose fix for situations where it is impossible to plan ahead to know when one or more processes will need to modify the ShareableList/SharedMemory.buf. When it is possible to design code to ensure, because of the execution flow through the code, no two processes/threads will attempt to modify and access/modify the same location in memory at the same time, locks become unnecessary. Locks are great tools but they generally result in slower executing code. > What are the use cases for SharedMemory and ShareableList? Speed. If we don't care about speed, we can use distributed shared memory through the SyncManager -- this keeps one copy of a dict/list/whatever in the process memory space of a single process and all other processes may modify or access it through two-sided communication with that "owner" process. If we do care about speed, we use SharedMemory and ShareableList and other things created on top of SharedMemory -- this effectively gives us fast, communal memory access where we avoid the cost of communication except for when we truly need to synchronize (where multiprocessing.Lock can help). Reduced memory footprint. If I have a "very large" amount of data consuming a significant percentage of the available memory on my system, I can make it available to multiple processes without duplication. This provides processes with fast access to that data, as fast as if each were accessing data in its own process memory space. It is one thing to imagine using this in parallel-executing code, but this can be just as useful in the Python interactive shell. One such scenario: after starting a time-consuming, non-parallel calculation in one Python shell, it is possible to open a new Python shell in another window and attach to the data through shared memory to continue work while the calculation runs in the first window. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:41:08 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Sep 2019 17:41:08 +0000 Subject: [issue33983] unify types for lib2to3.pytree.Base.children In-Reply-To: <1530131899.35.0.56676864532.issue33983@psf.upfronthosting.co.za> Message-ID: <1568223668.18.0.821592257574.issue33983@roundup.psfhosted.org> Benjamin Peterson added the comment: Isn't children annotated as List in typeshed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:41:45 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 11 Sep 2019 17:41:45 +0000 Subject: [issue38122] AsyncMock force always creating an AsyncMock for child mocks In-Reply-To: <1568222694.73.0.217906468671.issue38122@roundup.psfhosted.org> Message-ID: <1568223705.27.0.765248304995.issue38122@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Sorry, is there an example of this use case. I went through the issue but have trouble understanding it since there are different suggestions. I guess child mock is always an AsyncMock irrespective of sync/async as I understand. We already had some reports over detecting async while patching to return AsyncMock and also had to document it to the users along with covering different ways of async functions. from unittest.mock import AsyncMock class Foo: def foo(self): pass async def bar(self): pass m = AsyncMock(Foo) f = m() print(m.foo) print(m.bar) $ python3.8 /tmp/bar.py sys:1: RuntimeWarning: coroutine 'AsyncMockMixin._mock_call' was never awaited ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:44:09 2019 From: report at bugs.python.org (Davin Potts) Date: Wed, 11 Sep 2019 17:44:09 +0000 Subject: [issue37652] Multiprocessing shared_memory ValueError on race with ShareableList In-Reply-To: <1563808398.25.0.353016896189.issue37652@roundup.psfhosted.org> Message-ID: <1568223849.6.0.716152601708.issue37652@roundup.psfhosted.org> Davin Potts added the comment: Apologies, one of the quotes in my previous response should have been attributed to @mental. I think @pierreglaser phrased it very nicely: > shared_memory is a low level python module. Precautions should be made when handling concurrently the shared_memory objects using synchronization primitives for example. I'm not sure this should be done internally in the SharedMemory class -- especially, we don't want to slow down concurrent READ access. Per the further suggestion: > +1 For a documentation addition. I can take a crack at adding something more along the lines of this discussion, but I would very much welcome suggestions (@bjs, @mental, @pierreglaser)... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:45:33 2019 From: report at bugs.python.org (Kirill Smelkov) Date: Wed, 11 Sep 2019 17:45:33 +0000 Subject: [issue26360] Deadlock in thread.join on Python 2.7/Mac OS X 10.9, 10.10 In-Reply-To: <1455449924.98.0.400633064774.issue26360@psf.upfronthosting.co.za> Message-ID: <1568223933.77.0.549998417491.issue26360@roundup.psfhosted.org> Kirill Smelkov added the comment: Maybe issue38106 related. ---------- nosy: +navytux _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:47:44 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 11 Sep 2019 17:47:44 +0000 Subject: [issue34634] New asyncio streams API In-Reply-To: <1536700682.14.0.0269046726804.issue34634@psf.upfronthosting.co.za> Message-ID: <1568224064.7.0.0596925916487.issue34634@roundup.psfhosted.org> Andrew Svetlov added the comment: Yes, please do ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:53:18 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 11 Sep 2019 17:53:18 +0000 Subject: [issue37409] relative import without parent succeeds with builtins.__import__ In-Reply-To: <1561540286.77.0.471225789226.issue37409@roundup.psfhosted.org> Message-ID: <1568224398.53.0.652891856751.issue37409@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: The test is same as below and given that __spec__ an __name__ are passed as None where ImportWarning is raised in Lib/importlib/_bootstrap.py 1074 . can we just use self.assertWarns(ImportWarning) in the test? >>> __import__('', {'__package__': None, '__spec__': None, '__name__': '__main__'}, locals={}, fromlist=('foo',), level=1) :1: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__ Traceback (most recent call last): File "", line 1, in ImportError: attempted relative import with no known parent package ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:54:00 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 11 Sep 2019 17:54:00 +0000 Subject: [issue34634] New asyncio streams API In-Reply-To: <1536700682.14.0.0269046726804.issue34634@psf.upfronthosting.co.za> Message-ID: <1568224440.96.0.771309819416.issue34634@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Merge StreamWriter and StreamReader into just asyncio.Stream _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:55:04 2019 From: report at bugs.python.org (Julien Palard) Date: Wed, 11 Sep 2019 17:55:04 +0000 Subject: [issue36270] DOC: Add link to sys.exc_info for "Reference Manual" In-Reply-To: <1552400076.95.0.491371003303.issue36270@roundup.psfhosted.org> Message-ID: <1568224504.9.0.872131639188.issue36270@roundup.psfhosted.org> Julien Palard added the comment: New changeset 9936371af298d465095ae70bc9c2943b4b16eac4 by Julien Palard (Bj?rn Meier) in branch 'master': bpo-36270: Doc: add link to traceback object reference (GH-13119) https://github.com/python/cpython/commit/9936371af298d465095ae70bc9c2943b4b16eac4 ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:55:13 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 17:55:13 +0000 Subject: [issue36270] DOC: Add link to sys.exc_info for "Reference Manual" In-Reply-To: <1552400076.95.0.491371003303.issue36270@roundup.psfhosted.org> Message-ID: <1568224513.35.0.901157673233.issue36270@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15627 pull_request: https://github.com/python/cpython/pull/16002 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 13:59:15 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 11 Sep 2019 17:59:15 +0000 Subject: [issue34001] LibreSSL does not tolerate setting minimum_version greater than maximum_version In-Reply-To: <1530288553.74.0.56676864532.issue34001@psf.upfronthosting.co.za> Message-ID: <1568224755.82.0.558448241336.issue34001@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset d6ac67f48f5079efc3fa4be3316a9578edb56e0d by St?phane Wirtel (Miss Islington (bot)) in branch '3.8': bpo-34001: Fix test_ssl with LibreSSL (GH-13783) (#15997) https://github.com/python/cpython/commit/d6ac67f48f5079efc3fa4be3316a9578edb56e0d ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 14:00:44 2019 From: report at bugs.python.org (Christian Heimes) Date: Wed, 11 Sep 2019 18:00:44 +0000 Subject: [issue38116] Make select module PEP-384 compatible In-Reply-To: <1568213295.38.0.552886185542.issue38116@roundup.psfhosted.org> Message-ID: <1568224844.11.0.720290250717.issue38116@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: +christian.heimes type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 14:04:04 2019 From: report at bugs.python.org (Reed) Date: Wed, 11 Sep 2019 18:04:04 +0000 Subject: [issue38099] __dict__ attribute is incorrectly stated to be read-only In-Reply-To: <1568182871.44.0.335247784266.issue38099@roundup.psfhosted.org> Message-ID: <1568225044.96.0.260253439582.issue38099@roundup.psfhosted.org> Reed added the comment: Thank you for the clarification. I didn't realize the section only referred to types, but it makes sense now that I read the documentation more carefully. The documentation is still incorrect for certain attributes (e.g. __bases__ and __name__) as they can be mutated. For example: class A: pass A.__name__ = 'AA' class B(A): pass class C(B): pass C.__bases__ = (A,) Also, this documentation is incorrectly linked to by other parts of the documentation. For example, in https://docs.python.org/3/reference/datamodel.html#the-standard-type-hierarchy, there is the sentence: "Special attributes: __dict__ is the attribute dictionary; __class__ is the instance?s class." __dict__ and __class__ link to the documentation about types, and yet that sentence is referring to all instances of any class (such as `A()`), not just type objects (such as `A`). In terms of concrete improves, I would suggest: * Adding a section somewhere describing __dict__ and __class__ for all instances, not just types. Or change the original section to refer to all instances. Assuming the original section is not changed to refer to all instances: * In the sentence "The implementation adds a few special read-only attributes to several object types", replace "object types" with "types" or "instances whose class subclasses from `type`" * Replace `instance.class` with `class.class`. The phrase `instance` is confusing, as it then describes `class.__bases__`, which does explicitly use the word "class" to indicate it only applies to classes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 14:12:38 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 18:12:38 +0000 Subject: [issue36270] DOC: Add link to sys.exc_info for "Reference Manual" In-Reply-To: <1552400076.95.0.491371003303.issue36270@roundup.psfhosted.org> Message-ID: <1568225558.92.0.408243677458.issue36270@roundup.psfhosted.org> miss-islington added the comment: New changeset f79a022d762edc749d0fecdc50c567d2bb910c53 by Miss Islington (bot) in branch '3.8': bpo-36270: Doc: add link to traceback object reference (GH-13119) https://github.com/python/cpython/commit/f79a022d762edc749d0fecdc50c567d2bb910c53 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 14:16:28 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Wed, 11 Sep 2019 18:16:28 +0000 Subject: [issue38109] Missing constants in Lib/stat.py In-Reply-To: <1568208959.37.0.605416078815.issue38109@roundup.psfhosted.org> Message-ID: <1568225788.29.0.662181529526.issue38109@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: +pitrou, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 14:28:35 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 11 Sep 2019 18:28:35 +0000 Subject: [issue37409] relative import without parent succeeds with builtins.__import__ In-Reply-To: <1561540286.77.0.471225789226.issue37409@roundup.psfhosted.org> Message-ID: <1568226515.96.0.366363791345.issue37409@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- pull_requests: +15628 pull_request: https://github.com/python/cpython/pull/16003 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 14:28:37 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 11 Sep 2019 18:28:37 +0000 Subject: [issue12707] Deprecate addinfourl getters In-Reply-To: <1312760770.57.0.2285900636.issue12707@psf.upfronthosting.co.za> Message-ID: <1568226517.15.0.892721037794.issue12707@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- versions: +Python 3.9 -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 14:31:22 2019 From: report at bugs.python.org (Jonathan Gossage) Date: Wed, 11 Sep 2019 18:31:22 +0000 Subject: [issue38123] Unable to find Python3.8.0b4 on Ubuntu 19004 desktop Message-ID: <1568226682.04.0.539752167504.issue38123@roundup.psfhosted.org> New submission from Jonathan Gossage : I installed Python 3.8.0b4 manually on Ubuntu 19.04 desktop. After the installation that appeared to run OK, I was unable to find python3.8, even though it had been installed in /usr/local/bin and that directory was on the path. I got the result: jgossage at jgossage-XPS-8700:~$ python3.8 --version bash: /usr/bin/python3.8: No such file or directory There was no sign of Python in /etc/alternatives so, I assume that Linux alternatives were not part of the problem. I had no problem finding other files such as pip3.8. ---------- components: Installation messages: 352009 nosy: Jonathan.Gossage priority: normal severity: normal status: open title: Unable to find Python3.8.0b4 on Ubuntu 19004 desktop versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 14:35:21 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Sep 2019 18:35:21 +0000 Subject: [issue38115] Invalid bytecode offsets in co_lnotab In-Reply-To: <1568212070.98.0.977590744203.issue38115@roundup.psfhosted.org> Message-ID: <1568226921.78.0.307685084642.issue38115@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 14:39:13 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Sep 2019 18:39:13 +0000 Subject: [issue38083] Minor improvements in asdl_c.py and Python-ast.c In-Reply-To: <1568100116.88.0.525709025274.issue38083@roundup.psfhosted.org> Message-ID: <1568227153.07.0.689000561682.issue38083@roundup.psfhosted.org> Serhiy Storchaka added the comment: Agree. The third item is actually a bug fix, but it is unlikely that such bug can be exposed in real code. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 14:41:17 2019 From: report at bugs.python.org (Christian Heimes) Date: Wed, 11 Sep 2019 18:41:17 +0000 Subject: [issue38123] Unable to find Python3.8.0b4 on Ubuntu 19004 desktop In-Reply-To: <1568226682.04.0.539752167504.issue38123@roundup.psfhosted.org> Message-ID: <1568227277.67.0.502492873246.issue38123@roundup.psfhosted.org> Christian Heimes added the comment: Please try a new shell or refresh the PATH look cache with "hash -r". ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 14:47:19 2019 From: report at bugs.python.org (Tim Peters) Date: Wed, 11 Sep 2019 18:47:19 +0000 Subject: [issue38096] Clean up the "struct sequence" / "named tuple" docs In-Reply-To: <1568153124.61.0.864461609465.issue38096@roundup.psfhosted.org> Message-ID: <1568227639.43.0.277079789209.issue38096@roundup.psfhosted.org> Tim Peters added the comment: Paul, please heed what Raymond said: it's not good to merge another core dev's PR unless they ask you to. Besides what Raymond said, a core dev may well check in incomplete work for any number of reasons (e.g., to see how the automated test runs turn out). When I do that, I add a "DO NOT MERGE" label just to be sure, but that really shouldn't be necessary. Raymond, I added a review anyway, despite that it's already been merged. One comment suggests repairing an obvious trivial typo. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 14:49:48 2019 From: report at bugs.python.org (Eric Snow) Date: Wed, 11 Sep 2019 18:49:48 +0000 Subject: [issue36876] Global C variables are a problem. In-Reply-To: <1557514902.13.0.853517754348.issue36876@roundup.psfhosted.org> Message-ID: <1568227788.36.0.704216541611.issue36876@roundup.psfhosted.org> Eric Snow added the comment: New changeset ee536b2020b1f0baad1286dbd4345e13870324af by Eric Snow in branch 'master': bpo-36876: Add a tool that identifies unsupported global C variables. (#15877) https://github.com/python/cpython/commit/ee536b2020b1f0baad1286dbd4345e13870324af ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 14:50:02 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 11 Sep 2019 18:50:02 +0000 Subject: [issue37879] Segfaults in C heap type subclasses In-Reply-To: <1566074851.0.0.451710928537.issue37879@roundup.psfhosted.org> Message-ID: <1568227802.6.0.302276543722.issue37879@roundup.psfhosted.org> Change by Petr Viktorin : ---------- pull_requests: +15629 pull_request: https://github.com/python/cpython/pull/16004 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 14:51:11 2019 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 11 Sep 2019 18:51:11 +0000 Subject: [issue38103] Duplicate label "examples" in the Docs In-Reply-To: <1568195782.91.0.281693262362.issue38103@roundup.psfhosted.org> Message-ID: <1568227871.58.0.767407394388.issue38103@roundup.psfhosted.org> Change by Ezio Melotti : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 14:55:02 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 11 Sep 2019 18:55:02 +0000 Subject: [issue38120] DeprecationWarning in test_random due to invalid seed arguments In-Reply-To: <1568218008.0.0.38131396656.issue38120@roundup.psfhosted.org> Message-ID: <1568228102.69.0.159613957837.issue38120@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks for doing this. If you don't mind, let's hold off one day so I can take a closer look at this when I get home tonight. ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 15:02:56 2019 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 11 Sep 2019 19:02:56 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1568228576.48.0.530211721386.issue2771@roundup.psfhosted.org> Ezio Melotti added the comment: test comment ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 15:07:16 2019 From: report at bugs.python.org (Samuel Freilich) Date: Wed, 11 Sep 2019 19:07:16 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls In-Reply-To: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> Message-ID: <1568228836.89.0.806339542426.issue36871@roundup.psfhosted.org> Samuel Freilich added the comment: This is still not totally fixed. This solves the underlying error with method specs, but not the bug that was causing the error-swallowing in assert_has_calls: https://github.com/python/cpython/blob/ee536b2020b1f0baad1286dbd4345e13870324af/Lib/unittest/mock.py#L2216 expected = [self._call_matcher(c) for c in calls] cause = expected if isinstance(expected, Exception) else None isinstance(expected, Exception) is never true, because expected is always a list. It should instead be: cause = next((e for e in expected if isinstance(e, Exception)), None) ---------- nosy: +sfreilich _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 15:09:45 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 11 Sep 2019 19:09:45 +0000 Subject: [issue38116] Make select module PEP-384 compatible In-Reply-To: <1568213295.38.0.552886185542.issue38116@roundup.psfhosted.org> Message-ID: <1568228985.38.0.863866542046.issue38116@roundup.psfhosted.org> Josh Rosenberg added the comment: Why do you describe these issues (this one, #38069, #38071-#38076, maybe more) as making the module PEP 384 compatible? There is no reason to make the built-in modules stick to the limited API, and it doesn't look like you're doing that in any event (among other things, pretty sure Argument Clinic generated code isn't limited API compatible yet, though that might be changing?). Seems like the main (only?) change you're making is to convert all static types to dynamic types. Which is fine, if it's necessary for PEP 554, but it seems only loosely related to PEP 384 (which defined mechanisms for "statically" defining dynamic heap types, but that wasn't the main thrust). ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 15:23:59 2019 From: report at bugs.python.org (Samuel Freilich) Date: Wed, 11 Sep 2019 19:23:59 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls In-Reply-To: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> Message-ID: <1568229839.29.0.126155120276.issue36871@roundup.psfhosted.org> Change by Samuel Freilich : ---------- pull_requests: +15630 pull_request: https://github.com/python/cpython/pull/16005 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 15:24:14 2019 From: report at bugs.python.org (mattip) Date: Wed, 11 Sep 2019 19:24:14 +0000 Subject: [issue37967] Beta GPG signature check failing In-Reply-To: <1566977917.52.0.520116504637.issue37967@roundup.psfhosted.org> Message-ID: <1568229854.74.0.428856951685.issue37967@roundup.psfhosted.org> mattip added the comment: > If you use pubkeys.txt from https://www.python.org/static/files/pubkeys.txt, then GPG verification gives you no additional security I am confused. If the pubkeys.txt on python.org has no benefit, why does it exist? What is considered best practices for people wanting to verify the download from https://www.python.org/ftp ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 15:40:00 2019 From: report at bugs.python.org (Jeroen Demeyer) Date: Wed, 11 Sep 2019 19:40:00 +0000 Subject: [issue37645] Replace PyEval_GetFuncName/PyEval_GetFuncDesc In-Reply-To: <1563731175.2.0.136240000148.issue37645@roundup.psfhosted.org> Message-ID: <1568230800.24.0.699967823869.issue37645@roundup.psfhosted.org> Jeroen Demeyer added the comment: > I left some comments on the PR. I don't see anything. Either I'm doing something wrong or GitHub is messed up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 16:02:36 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 11 Sep 2019 20:02:36 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls In-Reply-To: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> Message-ID: <1568232156.29.0.701569707024.issue36871@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: It was a conscious decision over not to do the proposed change in the issue. There are other issues over signature difference during construction of mock and in the call_matcher over presence/absence of self. It needs a more careful fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 16:05:01 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 11 Sep 2019 20:05:01 +0000 Subject: [issue38120] DeprecationWarning in test_random due to invalid seed arguments In-Reply-To: <1568218008.0.0.38131396656.issue38120@roundup.psfhosted.org> Message-ID: <1568232301.97.0.733798536549.issue38120@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Sure, I think these were not caught since deprecation warnings are not shown as part of CI as failure. I just caught them at the sprint running with -Wall. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 16:41:35 2019 From: report at bugs.python.org (Samuel Freilich) Date: Wed, 11 Sep 2019 20:41:35 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls In-Reply-To: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> Message-ID: <1568234495.83.0.000820321076429.issue36871@roundup.psfhosted.org> Samuel Freilich added the comment: Sure, but the bug in error-handling should still be fixed. Currently, if _call_matcher returns an exception, that's ignored by assert_has_calls, and the error message generated as a result is extremely misleading! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 16:55:44 2019 From: report at bugs.python.org (Tim Burke) Date: Wed, 11 Sep 2019 20:55:44 +0000 Subject: [issue36274] http.client cannot send non-ASCII request lines In-Reply-To: <1552422803.93.0.420596825145.issue36274@roundup.psfhosted.org> Message-ID: <1568235344.46.0.575730483421.issue36274@roundup.psfhosted.org> Tim Burke added the comment: Fair enough. Seems kinda related to https://bugs.python.org/issue30458 -- looks like it was a fun one ;-) I think either approach would work for me; my existing work-around doesn't preclude either, particularly since I want it purely for testing purposes. For a bit of context, I work on a large-ish project (few hundred kloc if you include tests) that recently finished porting from python 2.7 to 3.6 & 3.7. As part of that process I discovered https://bugs.python.org/issue33973 and worked around it in https://github.com/openstack/swift/commit/93b49c5. That was a prerequisite for running tests under py2 against a server running py3, but this bug complicated us running the *tests* under py3 as well. I eventually landed on https://github.com/openstack/swift/commit/c0ae48b as a work-around. I could probably take another stab at a fix if you like, though I'm not entirely sure when I'll get to it at the moment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 16:55:53 2019 From: report at bugs.python.org (Tim Lyons) Date: Wed, 11 Sep 2019 20:55:53 +0000 Subject: [issue37945] test_locale failing In-Reply-To: <1566754401.97.0.888593384986.issue37945@roundup.psfhosted.org> Message-ID: <1568235353.69.0.665208080384.issue37945@roundup.psfhosted.org> Change by Tim Lyons : ---------- nosy: +guy.linton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 17:10:36 2019 From: report at bugs.python.org (Roundup Robot) Date: Wed, 11 Sep 2019 21:10:36 +0000 Subject: [issue34155] [CVE-2019-16056] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1568236236.43.0.820298010341.issue34155@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +15632 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/16006 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 17:40:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Sep 2019 21:40:03 +0000 Subject: [issue35795] test_pkgutil test_zipapp fail in AMD64 Windows7 SP1 3.x and AMD64 Windows7 SP1 3.7 buildbots In-Reply-To: <1548068055.8.0.250041418477.issue35795@roundup.psfhosted.org> Message-ID: <1568238003.58.0.116113426482.issue35795@roundup.psfhosted.org> STINNER Victor added the comment: > Have we seen this recently? Should we just close this? I'm fine with closing an issue which was a failure on a buildbot which was not seen in the last 3 months. I close the issue as out of date. Moreover, since January, I enhanced regrtest to ensure that temporary directories created by child processes are removed, especially when they crash. See bpo-36915: ommit 3c93153f7db5dd9b06f229e61978fd9199b3c097 Author: Victor Stinner Date: Tue May 14 15:49:16 2019 +0200 bpo-36915: regrtest always remove tempdir of worker processes (GH-13312) When using multiprocessing (-jN option), worker processes now create their temporary directory inside the temporary directory of the main process. So the main process is able to remove temporary directories of worker processes even if they crash or when they are killed by regrtest on KeyboardInterrupt (CTRL+c). Rework also how multiprocessing arguments are parsed in main.py. It's not perfect yet, but it's better than previously :-) See bpo-37531 for a follow-up issue. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 17:57:19 2019 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 11 Sep 2019 21:57:19 +0000 Subject: [issue38106] Race in PyThread_release_lock - can lead to memory corruption and deadlock In-Reply-To: <1568200653.3.0.865964137512.issue38106@roundup.psfhosted.org> Message-ID: <1568239039.21.0.483755212818.issue38106@roundup.psfhosted.org> Kristj?n Valur J?nsson added the comment: imho posix made a mistake in allowing signal/broadcast outside the mutex. Otherwise an implementation could rely on the mutex for internal state manipulation. I have my own fast condition variable lib implemented using semaphores and it is simple to do if one requires the mutex to be held for the signal event. Condition variables semantics are otherwise quite brilliant. For example, allowing for spurious wakeups to occur allows, again, for much simpler implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 18:09:28 2019 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 11 Sep 2019 22:09:28 +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: <1568239768.25.0.534084152863.issue29988@roundup.psfhosted.org> Nick Coghlan added the comment: There is also the draft test case at https://github.com/ncoghlan/cpython/pull/2 That needs updating to account for the eval loop changes since I last worked on it, though. (I think that conflict may also be keeping the bots from running, even after I updated the issue title to use the modern convention) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 18:32:30 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 11 Sep 2019 22:32:30 +0000 Subject: [issue9938] Add optional keyword argument exit_on_error to argparse.ArgumentParser In-Reply-To: <1285338690.84.0.283413950067.issue9938@psf.upfronthosting.co.za> Message-ID: <1568241150.4.0.147326052151.issue9938@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- title: Add optional kwargs to argparse -> Add optional keyword argument exit_on_error to argparse.ArgumentParser _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 18:35:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 11 Sep 2019 22:35:11 +0000 Subject: [issue38120] DeprecationWarning in test_random due to invalid seed arguments In-Reply-To: <1568218008.0.0.38131396656.issue38120@roundup.psfhosted.org> Message-ID: <1568241311.63.0.171694063149.issue38120@roundup.psfhosted.org> STINNER Victor added the comment: I confirm that test_random currently fails using -Werror: $ ./python -W error -m test -v test_random ====================================================================== ERROR: test_seed_when_randomness_source_not_found (test.test_random.MersenneTwister_TestBasicOps) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/vstinner/python/master/Lib/unittest/mock.py", line 1319, in patched return func(*newargs, **newkeywargs) File "/home/vstinner/python/master/Lib/test/test_random.py", line 60, in test_seed_when_randomness_source_not_found self.test_seedargs() File "/home/vstinner/python/master/Lib/test/test_random.py", line 46, in test_seedargs self.gen.seed(arg) File "/home/vstinner/python/master/Lib/random.py", line 156, in seed _warn('Seeding based on hashing is deprecated\n' DeprecationWarning: Seeding based on hashing is deprecated since Python 3.9 and will be removed in a subsequent version. The only supported seed types are: None, int, float, str, bytes, and bytearray. ====================================================================== ERROR: test_seedargs (test.test_random.MersenneTwister_TestBasicOps) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/vstinner/python/master/Lib/test/test_random.py", line 46, in test_seedargs self.gen.seed(arg) File "/home/vstinner/python/master/Lib/random.py", line 156, in seed _warn('Seeding based on hashing is deprecated\n' DeprecationWarning: Seeding based on hashing is deprecated since Python 3.9 and will be removed in a subsequent version. The only supported seed types are: None, int, float, str, bytes, and bytearray. I also confirm that PR 15987 fix the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 18:44:36 2019 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 11 Sep 2019 22:44:36 +0000 Subject: [issue37645] Replace PyEval_GetFuncName/PyEval_GetFuncDesc In-Reply-To: <1563731175.2.0.136240000148.issue37645@roundup.psfhosted.org> Message-ID: <1568241876.77.0.591709750673.issue37645@roundup.psfhosted.org> Petr Viktorin added the comment: My bad, I didn't publish the comments. They should be there now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 18:54:39 2019 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 11 Sep 2019 22:54:39 +0000 Subject: [issue30076] Opcode names BUILD_MAP_UNPACK_WITH_CALL and BUILD_TUPLE_UNPACK_WITH_CALL are too long In-Reply-To: <1492277239.5.0.348724747458.issue30076@psf.upfronthosting.co.za> Message-ID: <1568242479.81.0.844396318999.issue30076@roundup.psfhosted.org> Nick Coghlan added the comment: So we'd be going with a naming convention where "VAR" corresponds to the star syntax, and whether it means packing or unpacking, or refers to arguments or parameters is context dependent? I could definitely support that, given that the ambiguity already exists at the Python syntax level. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 19:03:31 2019 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 11 Sep 2019 23:03:31 +0000 Subject: [issue37941] python -m and runpy.run_module set different __name__ by default In-Reply-To: <1566669555.03.0.62423685183.issue37941@roundup.psfhosted.org> Message-ID: <1568243011.89.0.742903731038.issue37941@roundup.psfhosted.org> Nick Coghlan added the comment: There is one, it just isn't public: runpy._run_module_as_main. It's a private API that the -m switch implementation calls, and was introduced after the original runpy.run_module was found not to offer everything the switch needed. It isn't possible to fully emulate -m from Python code though, as the lifecycle of the real main module is intertwined with the lifecycle of the underlying interpreter. So if folks really want to try to do this, the source code is there to look at, but we're not giving the false impression that it's easy to do correctly with no unintended consequences. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 19:08:38 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Sep 2019 23:08:38 +0000 Subject: [issue38124] off-by-one error in PyState_GetModule Message-ID: <1568243318.53.0.112380405251.issue38124@roundup.psfhosted.org> New submission from Benjamin Peterson : https://github.com/python/cpython/blob/3f4db4a0bab073b768fae958e93288bd5d24eadd/Python/pystate.c#L707 should be using > not >=. ---------- components: Interpreter Core messages: 352031 nosy: benjamin.peterson priority: normal severity: normal status: open title: off-by-one error in PyState_GetModule type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 19:10:13 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Sep 2019 23:10:13 +0000 Subject: [issue38124] off-by-one error in PyState_AddModule In-Reply-To: <1568243318.53.0.112380405251.issue38124@roundup.psfhosted.org> Message-ID: <1568243413.55.0.133239329572.issue38124@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- title: off-by-one error in PyState_GetModule -> off-by-one error in PyState_AddModule _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 19:14:28 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Sep 2019 23:14:28 +0000 Subject: [issue38124] off-by-one error in PyState_AddModule In-Reply-To: <1568243318.53.0.112380405251.issue38124@roundup.psfhosted.org> Message-ID: <1568243668.97.0.131769673726.issue38124@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- keywords: +patch pull_requests: +15633 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16007 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 19:37:17 2019 From: report at bugs.python.org (David Bolen) Date: Wed, 11 Sep 2019 23:37:17 +0000 Subject: [issue36876] Global C variables are a problem. In-Reply-To: <1557514902.13.0.853517754348.issue36876@roundup.psfhosted.org> Message-ID: <1568245037.02.0.615327830613.issue36876@roundup.psfhosted.org> David Bolen added the comment: The new test_check_c_globals.ActualChecks test is failing with an "unexpected success" on the bolen-ubuntu buildbot (under Ubuntu 18.04.3). I can reproduce the failure in a manually built tree. ---------- nosy: +db3l _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 19:43:25 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 11 Sep 2019 23:43:25 +0000 Subject: [issue38124] off-by-one error in PyState_AddModule In-Reply-To: <1568243318.53.0.112380405251.issue38124@roundup.psfhosted.org> Message-ID: <1568245405.6.0.770690569584.issue38124@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 39de95b746c990e6a2fe9af5fad01747f58b2e5f by Benjamin Peterson in branch 'master': closes bpo-38124: Fix bounds check in PyState_AddModule. (GH-16007) https://github.com/python/cpython/commit/39de95b746c990e6a2fe9af5fad01747f58b2e5f ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 19:43:34 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 23:43:34 +0000 Subject: [issue38124] off-by-one error in PyState_AddModule In-Reply-To: <1568243318.53.0.112380405251.issue38124@roundup.psfhosted.org> Message-ID: <1568245414.42.0.771224677712.issue38124@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15634 pull_request: https://github.com/python/cpython/pull/16008 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 19:43:40 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 11 Sep 2019 23:43:40 +0000 Subject: [issue38124] off-by-one error in PyState_AddModule In-Reply-To: <1568243318.53.0.112380405251.issue38124@roundup.psfhosted.org> Message-ID: <1568245420.18.0.608645571746.issue38124@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15635 pull_request: https://github.com/python/cpython/pull/16009 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 19:58:32 2019 From: report at bugs.python.org (Windson Yang) Date: Wed, 11 Sep 2019 23:58:32 +0000 Subject: [issue38125] Can' build document in Sphinx v2.2.0 Message-ID: <1568246312.85.0.271143869481.issue38125@roundup.psfhosted.org> New submission from Windson Yang : I got two errors when I try to build python document with make venv make html The first one is > Since v2.0, Sphinx uses "index" as master_doc by default. Please add "master_doc = 'contents'" to your conf.py. After fixing this one, the second one is > /Users/windson/learn/cpython/Doc/library/email.message.rst:4:duplicate object description of email.message, other instance in library/email.compat32-message, use :noindex: for one of them ---------- assignee: docs at python components: Documentation messages: 352034 nosy: Windson Yang, docs at python priority: normal severity: normal status: open title: Can' build document in Sphinx v2.2.0 type: crash versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 20:02:53 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 00:02:53 +0000 Subject: [issue38124] off-by-one error in PyState_AddModule In-Reply-To: <1568243318.53.0.112380405251.issue38124@roundup.psfhosted.org> Message-ID: <1568246573.76.0.745491356889.issue38124@roundup.psfhosted.org> miss-islington added the comment: New changeset 8892a1d685e4898b28961308b3c1447fe9ad3269 by Miss Islington (bot) in branch '3.7': closes bpo-38124: Fix bounds check in PyState_AddModule. (GH-16007) https://github.com/python/cpython/commit/8892a1d685e4898b28961308b3c1447fe9ad3269 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 20:04:30 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 00:04:30 +0000 Subject: [issue38124] off-by-one error in PyState_AddModule In-Reply-To: <1568243318.53.0.112380405251.issue38124@roundup.psfhosted.org> Message-ID: <1568246670.24.0.442212108839.issue38124@roundup.psfhosted.org> miss-islington added the comment: New changeset a5a7102636de82e0687af7131357762337d49c7c by Miss Islington (bot) in branch '3.8': closes bpo-38124: Fix bounds check in PyState_AddModule. (GH-16007) https://github.com/python/cpython/commit/a5a7102636de82e0687af7131357762337d49c7c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 20:11:26 2019 From: report at bugs.python.org (Ammar Askar) Date: Thu, 12 Sep 2019 00:11:26 +0000 Subject: [issue38125] Can' build document in Sphinx v2.2.0 In-Reply-To: <1568246312.85.0.271143869481.issue38125@roundup.psfhosted.org> Message-ID: <1568247086.22.0.355098938318.issue38125@roundup.psfhosted.org> Ammar Askar added the comment: When did you try this? For reference, Doc/conf.py on master currently has `master_doc = 'contents'` and I performed a successful build with Sphinx 2.2.0 a few days ago. ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 22:18:26 2019 From: report at bugs.python.org (pacien) Date: Thu, 12 Sep 2019 02:18:26 +0000 Subject: [issue38126] mailcap top level wildcard support Message-ID: <1568254706.48.0.577471820986.issue38126@roundup.psfhosted.org> New submission from pacien : given ~/.mailcap containing: */*; xdg-open "%s" >>> mailcap.findmatch(mailcap.getcaps(), 'application/pdf', filename='thing.pdf') returns: (None, None) instead of: ('xdg-open "thing.pdf"', {'view': 'xdg-open "%s"', 'lineno': 0}) --- While top-level wildcards aren't defined in RFC1524, most other tools and programs (including mutt for example) handle them properly. Entries of the form of "*; someprogram" or "*/*; someprogram" are useful for fallbacks when no other more precise type can be found. ---------- components: email messages: 352038 nosy: barry, pacien, r.david.murray priority: normal severity: normal status: open title: mailcap top level wildcard support type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 22:46:52 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Sep 2019 02:46:52 +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: <1568256412.17.0.696066797071.issue29988@roundup.psfhosted.org> Raymond Hettinger added the comment: Is there a chance this will get resolved for 3.8? This is an important guarantee. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 22:50:32 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Sep 2019 02:50:32 +0000 Subject: [issue38096] Clean up the "struct sequence" / "named tuple" docs In-Reply-To: <1568153124.61.0.864461609465.issue38096@roundup.psfhosted.org> Message-ID: <1568256632.71.0.13690476942.issue38096@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 2bb6bf0c8cf863c057027b10751c0fb74189871f by Raymond Hettinger (Paul Ganssle) in branch '3.8': bpo-38096: Clean up the "struct sequence" / "named tuple" docs (GH-15895) (GH-15961) https://github.com/python/cpython/commit/2bb6bf0c8cf863c057027b10751c0fb74189871f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 22:50:54 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Sep 2019 02:50:54 +0000 Subject: [issue38096] Clean up the "struct sequence" / "named tuple" docs In-Reply-To: <1568153124.61.0.864461609465.issue38096@roundup.psfhosted.org> Message-ID: <1568256654.89.0.708427687247.issue38096@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset b7a310d865347eabc60d387dbec82ee408315050 by Raymond Hettinger (Paul Ganssle) in branch '3.7': bpo-38096: Clean up the "struct sequence" / "named tuple" docs (GH-15895) (GH-15962) https://github.com/python/cpython/commit/b7a310d865347eabc60d387dbec82ee408315050 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 22:51:56 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Sep 2019 02:51:56 +0000 Subject: [issue38096] Clean up the "struct sequence" / "named tuple" docs In-Reply-To: <1568153124.61.0.864461609465.issue38096@roundup.psfhosted.org> Message-ID: <1568256716.28.0.0327532438024.issue38096@roundup.psfhosted.org> Raymond Hettinger added the comment: Tim, I'll make the fix-ups in a separate PR. There wasn't a clear workflow for reverting, adding fixes, re-applying, and backporting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 23:03:09 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Sep 2019 03:03:09 +0000 Subject: [issue38096] Clean up the "struct sequence" / "named tuple" docs In-Reply-To: <1568153124.61.0.864461609465.issue38096@roundup.psfhosted.org> Message-ID: <1568257389.16.0.724449041335.issue38096@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +15636 pull_request: https://github.com/python/cpython/pull/16010 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 23:14:33 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Sep 2019 03:14:33 +0000 Subject: [issue38120] DeprecationWarning in test_random due to invalid seed arguments In-Reply-To: <1568218008.0.0.38131396656.issue38120@roundup.psfhosted.org> Message-ID: <1568258073.63.0.965289235979.issue38120@roundup.psfhosted.org> Raymond Hettinger added the comment: Okay. This looks good to go. I don't remember why the original test repeated some of the seeds -- that would normally only be done if caching was present. ---------- assignee: rhettinger -> xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 23:18:54 2019 From: report at bugs.python.org (Eryk Sun) Date: Thu, 12 Sep 2019 03:18:54 +0000 Subject: [issue38081] Different behavior of os.path.realpath('nul') in 3.7 and 3.8 In-Reply-To: <1568097037.9.0.584511449633.issue38081@roundup.psfhosted.org> Message-ID: <1568258334.58.0.0713573562105.issue38081@roundup.psfhosted.org> Eryk Sun added the comment: In addition to ERROR_INVALID_FUNCTION (1), ERROR_INVALID_PARAMETER (87), and ERROR_NOT_SUPPORTED (50) for an unsupported device, and ERROR_BAD_NET_NAME (67) for a missing server or share, it should also allow common permission errors: ERROR_ACCESS_DENIED (5) C:/Users/someone_else C:/Temp/deleted_but_still_linked_file E:/locked_volume ERROR_NOT_READY (21) D:/no_media ERROR_SHARING_VIOLATION (32) C:/pagefile.sys ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 23:37:56 2019 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 12 Sep 2019 03:37:56 +0000 Subject: [issue38127] A fatal error when running test_ctypes Message-ID: <1568259476.22.0.837518009168.issue38127@roundup.psfhosted.org> New submission from Zackery Spytz : When running test_ctypes, I encountered a fatal error. ./python -m test test_ctypes Run tests sequentially 0:00:00 load avg: 0.13 [1/1] test_ctypes Fatal Python error: a function returned a result with an error set MemoryError The above exception was the direct cause of the following exception: SystemError: returned a result with an error set Current thread 0x00007f80d7417140 (most recent call first): File "/home/lubuntu2/cpython/Lib/ctypes/test/test_as_parameter.py", line 41 in test_pointers File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 616 in _callTestMethod File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 659 in run File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 719 in __call__ File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/home/lubuntu2/cpython/Lib/test/support/testresult.py", line 162 in run File "/home/lubuntu2/cpython/Lib/test/support/__init__.py", line 1996 in _run_suite File "/home/lubuntu2/cpython/Lib/test/support/__init__.py", line 2092 in run_unittest File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 209 in _test_module File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 234 in _runtest_inner2 File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 270 in _runtest_inner File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 153 in _runtest File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 193 in runtest File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 409 in run_tests_sequential File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 507 in run_tests File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 674 in _main File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 628 in main File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 695 in main File "/home/lubuntu2/cpython/Lib/test/__main__.py", line 2 in File "/home/lubuntu2/cpython/Lib/runpy.py", line 85 in _run_code File "/home/lubuntu2/cpython/Lib/runpy.py", line 192 in _run_module_as_main Aborted (core dumped) It seems that this is because the PyObject_IsSubclass() call in PyCPointerType_from_param() is not checked for failure. ---------- components: Extension Modules, ctypes messages: 352045 nosy: ZackerySpytz priority: normal severity: normal status: open title: A fatal error when running test_ctypes type: crash versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 23:40:10 2019 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 12 Sep 2019 03:40:10 +0000 Subject: [issue38127] A fatal error when running test_ctypes In-Reply-To: <1568259476.22.0.837518009168.issue38127@roundup.psfhosted.org> Message-ID: <1568259610.4.0.0753463735358.issue38127@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +15637 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16011 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 23:43:33 2019 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Thu, 12 Sep 2019 03:43:33 +0000 Subject: [issue36876] Global C variables are a problem. In-Reply-To: <1557514902.13.0.853517754348.issue36876@roundup.psfhosted.org> Message-ID: <1568259813.91.0.812634230471.issue36876@roundup.psfhosted.org> Change by Chih-Hsuan Yen : ---------- nosy: +yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 23:50:19 2019 From: report at bugs.python.org (hongweipeng) Date: Thu, 12 Sep 2019 03:50:19 +0000 Subject: [issue38105] hash collision when hash(x) == -2 causes many calls to __eq__ In-Reply-To: <1568197761.75.0.53300036491.issue38105@roundup.psfhosted.org> Message-ID: <1568260219.76.0.652546275298.issue38105@roundup.psfhosted.org> hongweipeng added the comment: More than -2, -1 -4 -8 -16 and -32 will cause many calls to __eq__.In `set_add_entry` use ``` perturb >>= PERTURB_SHIFT; i = (i * 5 + 1 + perturb) & mask; ``` get the next index.In the example,mask is 7,perturb is -2. If i = 6, after execution, the value of i has not changed.We can do one more verification like: ``` do { perturb >>= PERTURB_SHIFT; } while (i == ((i * 5 + 1 + perturb) & mask)); i = (i * 5 + 1 + perturb) & mask; ``` Of course this requires tests. ---------- nosy: +hongweipeng _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 23:53:29 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Sep 2019 03:53:29 +0000 Subject: [issue38128] IDLE undo calls get_saved() when set to None Message-ID: <1568260409.36.0.994615457064.issue38128@roundup.psfhosted.org> New submission from Raymond Hettinger : Terry, I don't know if these exception reports are useful to you. If not, feel free to close this. I run IDLE in day long sessions and only see these tracebacks when I'm exiting, so I don't know the proximate trigger event. Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/tkinter/__init__.py", line 1883, in __call__ return self.func(*args) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/multicall.py", line 176, in handler r = l[i](event) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/filelist.py", line 54, in close_all_callback reply = edit.close() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/pyshell.py", line 1008, in close return EditorWindow.close(self) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/editor.py", line 1077, in close reply = self.maybesave() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/outwin.py", line 94, in maybesave return 'yes' if self.get_saved() else 'no' File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/editor.py", line 1010, in get_saved return self.undo.get_saved() AttributeError: 'NoneType' object has no attribute 'get_saved' ---------- assignee: terry.reedy components: IDLE messages: 352047 nosy: rhettinger, terry.reedy priority: normal severity: normal status: open title: IDLE undo calls get_saved() when set to None type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 11 23:56:59 2019 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 12 Sep 2019 03:56:59 +0000 Subject: [issue38128] IDLE undo calls get_saved() when set to None In-Reply-To: <1568260409.36.0.994615457064.issue38128@roundup.psfhosted.org> Message-ID: <1568260619.67.0.775460879663.issue38128@roundup.psfhosted.org> Zackery Spytz added the comment: This seems like a duplicate of bpo-35263. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 00:54:12 2019 From: report at bugs.python.org (=?utf-8?q?Lum=C3=ADr_Balhar?=) Date: Thu, 12 Sep 2019 04:54:12 +0000 Subject: [issue38112] Compileall improvements In-Reply-To: <1568210479.53.0.901531773072.issue38112@roundup.psfhosted.org> Message-ID: <1568264052.62.0.562925285384.issue38112@roundup.psfhosted.org> Change by Lum?r Balhar : ---------- keywords: +patch pull_requests: +15638 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16012 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 00:54:08 2019 From: report at bugs.python.org (Tim Peters) Date: Thu, 12 Sep 2019 04:54:08 +0000 Subject: [issue38105] hash collision when hash(x) == -2 causes many calls to __eq__ In-Reply-To: <1568197761.75.0.53300036491.issue38105@roundup.psfhosted.org> Message-ID: <1568264048.18.0.834573276733.issue38105@roundup.psfhosted.org> Tim Peters added the comment: Note that you can contrive similar cases with positive hash codes too. For example, force both hash codes to 2**60 - 2. The salient points are that 0 * 5 is congruent to 0 mod any power of 2, while -2 * 5 = -10 is congruent to -2 mod 8, so they're fixed points of the `i = 5*i + 1 + perturb` iteration _given that_ perturb is congruent to -1 (so cancels out the +1) until enough shifts have been done to get 0 bits into the lowermost bits retained by the mask (in which case perturb is no longer congruent to -1, and so no longer cancels out the +1). Since PERTURB_SHIFT is 5, on a 64-bit box it can take 13 shifts before `perturb` is entirely cleared. As internal comments note, it's only _then_ that the recurrence is guaranteed to visit every slot exactly once. I don't care. It would be nice if it could guarantee to visit every slot exactly once from the start - which it _would_ do if we didn't use `perturb` at all. But using `perturb` is extremely valuable for avoiding quadratic-time behavior in large tables in bad real cases. The drawback is that it can stick in a fixed point for 13 shifts on a 64-bit box (7 shifts on a 32-bit box). But that's the worst it can do, and it's rare. I don't believe it's worth a single cycle, overall, to avoid it. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 01:11:37 2019 From: report at bugs.python.org (Vinay Sharma) Date: Thu, 12 Sep 2019 05:11:37 +0000 Subject: [issue38119] resource tracker destroys shared memory segments when other processes should still have valid access In-Reply-To: <1568217506.85.0.770661201111.issue38119@roundup.psfhosted.org> Message-ID: <1568265097.25.0.491057280162.issue38119@roundup.psfhosted.org> Vinay Sharma added the comment: Hi Davin, This PR would fix the issues mentioned by you, by not prematurely unlinking the shared memory segment. And, therefore it would make shared memory useful in a lot of use cases. But, this would still not make Unix's implementation consistent with Windows. Windows uses a reference counting mechanism to count the number of processes using a shared memory segment. When all of them are done using it, Windows simply unlinks and frees the memory allocated to the shared memory segment. I know that you already know this. I am commenting to find out, that what would be the next steps to fix the above inconsistency. You could see my last comment(msg351445) in issue37754, where I have listed some ways to implement the above reference counting mechanism. If you could have a look and see which one would be the best way, I would be happy to make a PR for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 01:26:40 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Sep 2019 05:26:40 +0000 Subject: [issue38105] hash collision when hash(x) == -2 causes many calls to __eq__ In-Reply-To: <1568197761.75.0.53300036491.issue38105@roundup.psfhosted.org> Message-ID: <1568266000.13.0.0244218151514.issue38105@roundup.psfhosted.org> Raymond Hettinger added the comment: [Tim Peters] > I don't believe it's worth a single cycle, overall, to avoid it. That makes complete sense. Marking this one as closed. Guido, thank for the high quality, reproducible report. hongweipeng, thank you for the casual analysis. ---------- nosy: +rhettinger resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 02:34:11 2019 From: report at bugs.python.org (Nathaniel Smith) Date: Thu, 12 Sep 2019 06:34:11 +0000 Subject: [issue30491] Add a lightweight mechanism for detecting un-awaited coroutine objects In-Reply-To: <1495867380.86.0.533205071954.issue30491@psf.upfronthosting.co.za> Message-ID: <1568270051.46.0.603941609335.issue30491@roundup.psfhosted.org> Nathaniel Smith added the comment: It's something I'm still interested in, but I'm not actively working on it (as you noticed :-)), and there are some other CPython changes that I'll probably prioritize first. Do you want to close this and I can re-open it when I do get back to it, or...? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 03:06:41 2019 From: report at bugs.python.org (Situs Judi Online Terpercaya) Date: Thu, 12 Sep 2019 07:06:41 +0000 Subject: [issue38129] Situs Judi Online Terpercaya Message-ID: <1568272001.65.0.873223588746.issue38129@roundup.psfhosted.org> New submission from Situs Judi Online Terpercaya : Situs https://sukabet.co/ adalah situs judi online terpercaya Indonesia yang menyediakan permainan judi online dan memberikan jaminan 100% menang tanpa kekalahan ---------- components: Distutils files: images (3).jpg messages: 352053 nosy: dstufft, eric.araujo, situsjudionlineterpercaya priority: normal severity: normal status: open title: Situs Judi Online Terpercaya type: compile error versions: Python 3.6 Added file: https://bugs.python.org/file48605/images (3).jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 03:18:49 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 12 Sep 2019 07:18:49 +0000 Subject: [issue38129] Spam In-Reply-To: <1568272001.65.0.873223588746.issue38129@roundup.psfhosted.org> Message-ID: <1568272729.62.0.959176629181.issue38129@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed title: Situs Judi Online Terpercaya -> Spam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 03:19:03 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 12 Sep 2019 07:19:03 +0000 Subject: [issue38129] Spam In-Reply-To: <1568272001.65.0.873223588746.issue38129@roundup.psfhosted.org> Message-ID: <1568272743.76.0.957855764742.issue38129@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : Removed file: https://bugs.python.org/file48605/images (3).jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 03:19:17 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 12 Sep 2019 07:19:17 +0000 Subject: [issue38129] Spam Message-ID: <1568272757.14.0.0299717730541.issue38129@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- Removed message: https://bugs.python.org/msg352053 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 03:44:52 2019 From: report at bugs.python.org (Kirill Smelkov) Date: Thu, 12 Sep 2019 07:44:52 +0000 Subject: [issue38106] Race in PyThread_release_lock - can lead to memory corruption and deadlock In-Reply-To: <1568200653.3.0.865964137512.issue38106@roundup.psfhosted.org> Message-ID: <1568274292.08.0.732074300099.issue38106@roundup.psfhosted.org> Kirill Smelkov added the comment: I agree it seems like a design mistake. Not only it leads to suboptimal implementations, but what is more important, it throws misuse risks onto the user. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 04:03:57 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 12 Sep 2019 08:03:57 +0000 Subject: [issue18578] Rename and document test.bytecode_helper as test.support.bytecode_helper In-Reply-To: <1375014946.89.0.0130176350727.issue18578@psf.upfronthosting.co.za> Message-ID: <1568275437.62.0.175611104222.issue18578@roundup.psfhosted.org> St?phane Wirtel added the comment: I wanted to merge the PR of Joannah but I have a question, are you sure that there is nobody using this module. Maybe we could add a warning when a user tries to use the module/function with a DeprecationWarning. Could we have a wrapper raising the warning when we call it and redirect to the new function? Thank you ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 04:13:05 2019 From: report at bugs.python.org (Mohammad Dehghan) Date: Thu, 12 Sep 2019 08:13:05 +0000 Subject: [issue38130] Error in section 8.6 of the tutorials (Errors and Exceptions, `finally` bullet points)) Message-ID: <1568275985.44.0.899489125827.issue38130@roundup.psfhosted.org> Change by Mohammad Dehghan : ---------- assignee: docs at python components: Documentation nosy: Mohammad Dehghan, docs at python priority: normal severity: normal status: open title: Error in section 8.6 of the tutorials (Errors and Exceptions, `finally` bullet points)) type: behavior versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 04:13:25 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 12 Sep 2019 08:13:25 +0000 Subject: [issue38120] DeprecationWarning in test_random due to invalid seed arguments In-Reply-To: <1568218008.0.0.38131396656.issue38120@roundup.psfhosted.org> Message-ID: <1568276005.87.0.942591510163.issue38120@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset a06d683d7fd88721eaf59abcf5b02eb82045c7b1 by Serhiy Storchaka (Xtreak) in branch 'master': bpo-38120: Fix DeprecationWarning in test_random for invalid type of arguments to random.seed. (GH-15987) https://github.com/python/cpython/commit/a06d683d7fd88721eaf59abcf5b02eb82045c7b1 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 04:13:56 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 12 Sep 2019 08:13:56 +0000 Subject: [issue38120] DeprecationWarning in test_random due to invalid seed arguments In-Reply-To: <1568218008.0.0.38131396656.issue38120@roundup.psfhosted.org> Message-ID: <1568276036.61.0.357912107905.issue38120@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 04:27:19 2019 From: report at bugs.python.org (Mohammad Dehghan) Date: Thu, 12 Sep 2019 08:27:19 +0000 Subject: [issue38130] Error in section 8.6 of the tutorials (Errors and Exceptions, `finally` bullet points)) Message-ID: <1568276839.54.0.276254362522.issue38130@roundup.psfhosted.org> New submission from Mohammad Dehghan : In section 8.6 of the tutorials page (https://docs.python.org/3/tutorial/errors.html#defining-clean-up-actions), the first item of the bullet points explaining some situations about finally clause, states that > If an exception occurs during execution of the try clause, the exception may be handled by an except clause. **In all cases, the exception is re-raised after the finally clause has been executed.** This is wrong, since the exception is not re-raised if an `except` clause handles the exception. ---------- nosy: -docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 04:52:12 2019 From: report at bugs.python.org (Armin Rigo) Date: Thu, 12 Sep 2019 08:52:12 +0000 Subject: [issue38106] Race in PyThread_release_lock - can lead to memory corruption and deadlock In-Reply-To: <1568200653.3.0.865964137512.issue38106@roundup.psfhosted.org> Message-ID: <1568278332.29.0.554293234454.issue38106@roundup.psfhosted.org> Armin Rigo added the comment: I agree with your analysis. I guess you (or someone) needs to write an explicit pull request, even if it just contains 187aa545165d cherry-picked. (I'm not a core dev any more nowadays) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 04:56:33 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 12 Sep 2019 08:56:33 +0000 Subject: [issue30491] Add a lightweight mechanism for detecting un-awaited coroutine objects In-Reply-To: <1495867380.86.0.533205071954.issue30491@psf.upfronthosting.co.za> Message-ID: <1568278593.84.0.724004379805.issue30491@roundup.psfhosted.org> Andrew Svetlov added the comment: Let's keep it open if you don't give up the issue entirely. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 04:57:45 2019 From: report at bugs.python.org (Roundup Robot) Date: Thu, 12 Sep 2019 08:57:45 +0000 Subject: [issue38130] Error in section 8.6 of the tutorials (Errors and Exceptions, `finally` bullet points)) In-Reply-To: <1568276839.54.0.276254362522.issue38130@roundup.psfhosted.org> Message-ID: <1568278665.66.0.226091849249.issue38130@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +15639 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16016 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 04:58:21 2019 From: report at bugs.python.org (Zachary Ware) Date: Thu, 12 Sep 2019 08:58:21 +0000 Subject: [issue38129] Spam Message-ID: <1568278701.13.0.295899774345.issue38129@roundup.psfhosted.org> Change by Zachary Ware : ---------- components: -Distutils nosy: -dstufft, eric.araujo, situsjudionlineterpercaya type: compile error -> versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 04:58:48 2019 From: report at bugs.python.org (Mohammad Dehghan) Date: Thu, 12 Sep 2019 08:58:48 +0000 Subject: [issue38130] Error in section 8.6 of the tutorials (Errors and Exceptions, `finally` bullet points)) In-Reply-To: <1568276839.54.0.276254362522.issue38130@roundup.psfhosted.org> Message-ID: <1568278728.43.0.855205571108.issue38130@roundup.psfhosted.org> Mohammad Dehghan added the comment: I submitted a PR for this: https://github.com/python/cpython/pull/16016 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:01:10 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 12 Sep 2019 09:01:10 +0000 Subject: [issue18578] Rename and document test.bytecode_helper as test.support.bytecode_helper In-Reply-To: <1375014946.89.0.0130176350727.issue18578@psf.upfronthosting.co.za> Message-ID: <1568278870.9.0.919057720783.issue18578@roundup.psfhosted.org> St?phane Wirtel added the comment: Other discussion with Zach, and at the end, there is no problem to merge your PR. Thank you for your contribution ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:02:52 2019 From: report at bugs.python.org (Christian Heimes) Date: Thu, 12 Sep 2019 09:02:52 +0000 Subject: [issue35264] SSL Module build fails with OpenSSL 1.1.0 for Python 2.7 In-Reply-To: <1542373844.15.0.788709270274.issue35264@psf.upfronthosting.co.za> Message-ID: <1568278972.88.0.170373265962.issue35264@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:03:02 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 12 Sep 2019 09:03:02 +0000 Subject: [issue18578] Rename and document test.bytecode_helper as test.support.bytecode_helper In-Reply-To: <1375014946.89.0.0130176350727.issue18578@psf.upfronthosting.co.za> Message-ID: <1568278982.62.0.429096672861.issue18578@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 92777d5e5aed1753bafe07265dbe98b2d271815b by St?phane Wirtel (Joannah Nanjekye) in branch 'master': bpo-18578: Rename and document test.bytecode_helper as test.support.bytecode_helper (GH-15168) https://github.com/python/cpython/commit/92777d5e5aed1753bafe07265dbe98b2d271815b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:03:11 2019 From: report at bugs.python.org (Eric Snow) Date: Thu, 12 Sep 2019 09:03:11 +0000 Subject: [issue36876] Global C variables are a problem. In-Reply-To: <1557514902.13.0.853517754348.issue36876@roundup.psfhosted.org> Message-ID: <1568278991.75.0.687999431002.issue36876@roundup.psfhosted.org> Eric Snow added the comment: @db3l, I'll take a look right away. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:03:34 2019 From: report at bugs.python.org (Zachary Ware) Date: Thu, 12 Sep 2019 09:03:34 +0000 Subject: [issue32820] Add __format__ method to ipaddress In-Reply-To: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: <1568279014.26.0.920478447744.issue32820@roundup.psfhosted.org> Zachary Ware added the comment: New changeset f9c95a4ba24c52eb1c052e3052d677e90a429a9a by Zachary Ware (ewosborne) in branch 'master': bpo-32820: __format__ method for ipaddress (#5627) https://github.com/python/cpython/commit/f9c95a4ba24c52eb1c052e3052d677e90a429a9a ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:04:50 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 12 Sep 2019 09:04:50 +0000 Subject: [issue18578] Rename and document test.bytecode_helper as test.support.bytecode_helper In-Reply-To: <1375014946.89.0.0130176350727.issue18578@psf.upfronthosting.co.za> Message-ID: <1568279090.98.0.563866876886.issue18578@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:08:53 2019 From: report at bugs.python.org (Zachary Ware) Date: Thu, 12 Sep 2019 09:08:53 +0000 Subject: [issue32820] Add and document __format__ method for IPv[46]Address In-Reply-To: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: <1568279333.5.0.315056732963.issue32820@roundup.psfhosted.org> Zachary Ware added the comment: The enhancement patch is merged, but it occurs to me after the fact that this could use some documentation, and possibly a mention in whatsnew. I'll leave this open as a documentation issue. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python stage: patch review -> needs patch title: Add __format__ method to ipaddress -> Add and document __format__ method for IPv[46]Address versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:12:43 2019 From: report at bugs.python.org (Zachary Ware) Date: Thu, 12 Sep 2019 09:12:43 +0000 Subject: [issue38123] Unable to find Python3.8.0b4 on Ubuntu 19004 desktop In-Reply-To: <1568226682.04.0.539752167504.issue38123@roundup.psfhosted.org> Message-ID: <1568279563.63.0.22084908689.issue38123@roundup.psfhosted.org> Zachary Ware added the comment: If calling /usr/local/bin/python3.8 directly works as expected, there's nothing for us to do here so I'm going to go ahead and close the issue. Please reopen if you can demonstrate a real bug in the installation code, though! ---------- nosy: +zach.ware resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:12:56 2019 From: report at bugs.python.org (Petr Viktorin) Date: Thu, 12 Sep 2019 09:12:56 +0000 Subject: [issue37879] Segfaults in C heap type subclasses In-Reply-To: <1566074851.0.0.451710928537.issue37879@roundup.psfhosted.org> Message-ID: <1568279576.52.0.994403669784.issue37879@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset 5e9caeec76119a0d61c25f1466c27b7dbd5115bd by Petr Viktorin in branch 'master': bpo-37879: Fix warnings in _testcapimodule (GH-16004) https://github.com/python/cpython/commit/5e9caeec76119a0d61c25f1466c27b7dbd5115bd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:23:14 2019 From: report at bugs.python.org (Eric Snow) Date: Thu, 12 Sep 2019 09:23:14 +0000 Subject: [issue36876] Global C variables are a problem. In-Reply-To: <1557514902.13.0.853517754348.issue36876@roundup.psfhosted.org> Message-ID: <1568280194.91.0.639022471181.issue36876@roundup.psfhosted.org> Change by Eric Snow : ---------- pull_requests: +15640 pull_request: https://github.com/python/cpython/pull/16017 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:23:46 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 12 Sep 2019 09:23:46 +0000 Subject: [issue37760] Refactor makeunicodedata.py: dedupe parsing, use dataclass In-Reply-To: <1564977335.6.0.0909548880632.issue37760@roundup.psfhosted.org> Message-ID: <1568280226.43.0.751157146096.issue37760@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset a65678c5c90002c5e40fa82746de07e6217df625 by Benjamin Peterson (Greg Price) in branch 'master': bpo-37760: Convert from length-18 lists to a dataclass, in makeunicodedata. (GH-15265) https://github.com/python/cpython/commit/a65678c5c90002c5e40fa82746de07e6217df625 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:24:26 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 12 Sep 2019 09:24:26 +0000 Subject: [issue37760] Refactor makeunicodedata.py: dedupe parsing, use dataclass In-Reply-To: <1564977335.6.0.0909548880632.issue37760@roundup.psfhosted.org> Message-ID: <1568280266.13.0.350849516469.issue37760@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:25:28 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 12 Sep 2019 09:25:28 +0000 Subject: [issue37758] unicodedata checksum-tests only test 1/17th of Unicode's codepoints In-Reply-To: <1564967162.48.0.525882022653.issue37758@roundup.psfhosted.org> Message-ID: <1568280328.57.0.565248906651.issue37758@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 6954be815a16fad11d1d66be576865bbbeb2b97d by Benjamin Peterson (Greg Price) in branch 'master': closes bpo-37758: Extend unicodedata checksum tests to cover all of Unicode. (GH-15125) https://github.com/python/cpython/commit/6954be815a16fad11d1d66be576865bbbeb2b97d ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:27:14 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 12 Sep 2019 09:27:14 +0000 Subject: [issue38130] Error in section 8.6 of the tutorials (Errors and Exceptions, `finally` bullet points)) In-Reply-To: <1568276839.54.0.276254362522.issue38130@roundup.psfhosted.org> Message-ID: <1568280434.74.0.932228637957.issue38130@roundup.psfhosted.org> St?phane Wirtel added the comment: Hi Mohammad, Could you sign the CLA? Thank you ---------- nosy: +matrixise versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:27:17 2019 From: report at bugs.python.org (Mark Shannon) Date: Thu, 12 Sep 2019 09:27:17 +0000 Subject: [issue21120] PyArena type is used in headers from the limited API In-Reply-To: <1396339821.73.0.473299529971.issue21120@psf.upfronthosting.co.za> Message-ID: <1568280437.9.0.335908353658.issue21120@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 421a72af4deaec96a49a79951b9c2546a2faa13d by Mark Shannon (Zackery Spytz) in branch 'master': bpo-21120: Exclude Python-ast.h, ast.h and asdl.h from the limited API (#14634) https://github.com/python/cpython/commit/421a72af4deaec96a49a79951b9c2546a2faa13d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:27:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Sep 2019 09:27:32 +0000 Subject: [issue32312] Create Py_AtExitRegister C API In-Reply-To: <1513197920.45.0.213398074469.issue32312@psf.upfronthosting.co.za> Message-ID: <1568280452.15.0.878770501973.issue32312@roundup.psfhosted.org> STINNER Victor added the comment: Joannah Nanjekye asked me to have a look at this issue. The existing Py_AtExit() C function is very low-level: it's called very late in Py_Finalize(), when the Python runtime is already destroyed. I understand that the need here is to call C code which would still like to access the Python C API. I propose the following C API: void Py_AtExitRegister(PyObject* (*func) (void *data), void *data) which would call func(data). The return type is void since I don't see any practical way to log an useful warning if a function fails: we only gets its memory address, we cannot log that. The callback function ('func') should be responsible to log errors itself (ex: using PySys_WriteStderr which writes into sys.stderr). Neil: > It would be handy to have a C API that registered an atexit function, similar to what calling atexit.register does. This API could be used by C extension modules to register atexit functions. The PyModuleDef already has 2 slots to call code at Python exit: void m_clear(PyObject *module) and: void m_free(void *data). But these callbacks can be late in Py_Finalize(), while Python runtime is being destroyed: when all modules are unloaded. atexit.register() callbacks are different: they are called "early" in Py_Finalize(), when Python is still fully working. I guess that Py_AtExitRegister() callbacks should also be called when Python is still fully working, right? Apart C extensions, Py_AtExitRegister() also sounds interesting when Python is embedded in an application. For example, if you call Py_Main() or Py_RunMain(), you cannot easily execute arbitrary C code just before Py_Finalize(). Antoine: > Calling "atexit.register" using the C API isn't very difficult. The annoying part is to wrap a simple C function pointer in a callable PyObject (I don't think there is a simple C API for that). We could store C callbacks as C function pointers. We can have 2 lists of functions in the atexit module: one for Python function, one for C functions (registered using the C API). I would suggest to call Python functions first, and then call C functions. -- I changed my mind, and I now consider that adding a public function would be useful. Sorry, first I misunderstood the use cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:29:14 2019 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 12 Sep 2019 09:29:14 +0000 Subject: [issue38121] Synchronize importlib.metadata with importlib_metadata 0.22 In-Reply-To: <1568220082.72.0.518622909571.issue38121@roundup.psfhosted.org> Message-ID: <1568280554.6.0.404112098142.issue38121@roundup.psfhosted.org> Paul Ganssle added the comment: New changeset 8ed6503eca4e3ea4949479d8d7fd9ffd54f81038 by Paul Ganssle (Jason R. Coombs) in branch 'master': bpo-38121: Sync importlib.metadata with 0.22 backport (GH-15993) https://github.com/python/cpython/commit/8ed6503eca4e3ea4949479d8d7fd9ffd54f81038 ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:29:37 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 12 Sep 2019 09:29:37 +0000 Subject: [issue26050] Add new StreamReader.readuntil() method In-Reply-To: <1452285476.14.0.419432816204.issue26050@psf.upfronthosting.co.za> Message-ID: <1568280577.1.0.632618197881.issue26050@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: StreamReader and StreamWriter were merged to Stream with issue36889 and there were also docs added for it along with asyncio docs rewritten. I am closing this as fixed. Feel free to reopen if needed. Thanks. ---------- nosy: +xtreak resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:30:08 2019 From: report at bugs.python.org (Mark Shannon) Date: Thu, 12 Sep 2019 09:30:08 +0000 Subject: [issue21120] PyArena type is used in headers from the limited API In-Reply-To: <1396339821.73.0.473299529971.issue21120@psf.upfronthosting.co.za> Message-ID: <1568280608.9.0.258323156985.issue21120@roundup.psfhosted.org> Change by Mark Shannon : ---------- stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:30:33 2019 From: report at bugs.python.org (Mark Shannon) Date: Thu, 12 Sep 2019 09:30:33 +0000 Subject: [issue21120] PyArena type is used in headers from the limited API In-Reply-To: <1396339821.73.0.473299529971.issue21120@psf.upfronthosting.co.za> Message-ID: <1568280633.04.0.694239260971.issue21120@roundup.psfhosted.org> Change by Mark Shannon : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:31:18 2019 From: report at bugs.python.org (Brett Cannon) Date: Thu, 12 Sep 2019 09:31:18 +0000 Subject: [issue37409] relative import without parent succeeds with builtins.__import__ In-Reply-To: <1561540286.77.0.471225789226.issue37409@roundup.psfhosted.org> Message-ID: <1568280678.06.0.23741802047.issue37409@roundup.psfhosted.org> Brett Cannon added the comment: Thanks for catching the warning and the fix, Karthikeyan! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:32:19 2019 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 12 Sep 2019 09:32:19 +0000 Subject: [issue38096] Clean up the "struct sequence" / "named tuple" docs In-Reply-To: <1568153124.61.0.864461609465.issue38096@roundup.psfhosted.org> Message-ID: <1568280739.76.0.526097787319.issue38096@roundup.psfhosted.org> Paul Ganssle added the comment: Sorry guys, my mistake. I think I was a bit caught up in the workflow at the sprint where I've been going through the review-cleanup-merge process a lot faster than I usually do (partially since I have the time and partially since the huge number of PRs getting merged is requiring a lot of rebases, so it's better to get them in quicker). No need to worry, I will not merge any of your PRs in the future unless you request it for some reason. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:34:23 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 12 Sep 2019 09:34:23 +0000 Subject: [issue27589] asyncio doc: issue in as_completed() doc In-Reply-To: <1469182105.52.0.303554063448.issue27589@psf.upfronthosting.co.za> Message-ID: <1568280863.01.0.797593922672.issue27589@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Current docs read as below with an example to show that earliest future is returned. I guess this can be closed. https://docs.python.org/dev/library/asyncio-task.html#asyncio.as_completed Run awaitable objects in the aws set concurrently. Return an iterator of Future objects. Each Future object returned represents the earliest result from the set of the remaining awaitables. ---------- nosy: +asvetlov, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:36:56 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Sep 2019 09:36:56 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls In-Reply-To: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> Message-ID: <1568281016.99.0.469102070017.issue36871@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- resolution: fixed -> stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:37:07 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Sep 2019 09:37:07 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls In-Reply-To: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> Message-ID: <1568281027.6.0.372369203013.issue36871@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- assignee: -> michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:37:13 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 12 Sep 2019 09:37:13 +0000 Subject: [issue32395] asyncio.StreamReader.readuntil is not general enough In-Reply-To: <1513835574.11.0.213398074469.issue32395@psf.upfronthosting.co.za> Message-ID: <1568281033.9.0.761027406226.issue32395@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I think this is a duplicate of issue37141 where multiple separators are requested for readuntil. I guess we can close one of them as duplicates. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:37:47 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 12 Sep 2019 09:37:47 +0000 Subject: [issue27589] asyncio doc: issue in as_completed() doc In-Reply-To: <1469182105.52.0.303554063448.issue27589@psf.upfronthosting.co.za> Message-ID: <1568281067.4.0.225526610882.issue27589@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:39:26 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Sep 2019 09:39:26 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls In-Reply-To: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> Message-ID: <1568281166.42.0.125458994418.issue36871@roundup.psfhosted.org> Gregory P. Smith added the comment: i reopened this without diving into the code to better understand based on Samuels comment. We could really do with a testcase that demonstrates the misleading error message problem for some test driven development here. ---------- keywords: -patch stage: needs patch -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:39:28 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 12 Sep 2019 09:39:28 +0000 Subject: [issue32395] asyncio.StreamReader.readuntil is not general enough In-Reply-To: <1513835574.11.0.213398074469.issue32395@psf.upfronthosting.co.za> Message-ID: <1568281168.4.0.484329851752.issue32395@roundup.psfhosted.org> Andrew Svetlov added the comment: Agree ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Allow multiple separators in Stream.readuntil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:42:25 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 12 Sep 2019 09:42:25 +0000 Subject: [issue37829] Documentation of stdlib: add example of mixed arguments to dict() In-Reply-To: <1565598359.42.0.652909866188.issue37829@roundup.psfhosted.org> Message-ID: <1568281345.72.0.49732557715.issue37829@roundup.psfhosted.org> St?phane Wirtel added the comment: Thank you for your contribution, merged into master. ---------- nosy: +matrixise resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:44:49 2019 From: report at bugs.python.org (Petr Viktorin) Date: Thu, 12 Sep 2019 09:44:49 +0000 Subject: [issue37879] Segfaults in C heap type subclasses In-Reply-To: <1566074851.0.0.451710928537.issue37879@roundup.psfhosted.org> Message-ID: <1568281489.78.0.649171997694.issue37879@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset 3562ae25402aad36583bc27d4d82c67554323d5e by Petr Viktorin in branch '3.8': [3.8] bpo-37879: Suppress subtype_dealloc decref when base type is a C heap type (GH-15323, GH-16004) (GH-15966) https://github.com/python/cpython/commit/3562ae25402aad36583bc27d4d82c67554323d5e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:49:49 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Sep 2019 09:49:49 +0000 Subject: [issue32847] Add DirectoryNotEmptyError subclass of OSError In-Reply-To: <1518664317.8.0.467229070634.issue32847@psf.upfronthosting.co.za> Message-ID: <1568281789.69.0.469693213778.issue32847@roundup.psfhosted.org> STINNER Victor added the comment: Copy of my comment on the review: https://github.com/python/cpython/pull/15496#pullrequestreview-287311626 I'm not excited by adding a new builtin symbol: IMHO this module already exists too many symbols. I'm not convinced that it's worth it. There is exactly 0 line of code in CPython code base which expects ENOTEMPTY errno. So it looks like an artifical use case. I recall that when PEP 3151 was implemented, the implementation replaced a lot of code using "except OSError as exc: if exc.errno == XXX: ... else: raise" with "except : ..." which was neat. But again, I don't see any usage of ENOTEMPTY in the Python stdlib. Are you aware of 3rd party code expecting ENOTEMPTY? How many projects? Adding a builtin symbol is a significant change, it should be well motived. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:50:46 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Sep 2019 09:50:46 +0000 Subject: [issue32847] Add DirectoryNotEmptyError subclass of OSError In-Reply-To: <1518664317.8.0.467229070634.issue32847@psf.upfronthosting.co.za> Message-ID: <1568281846.37.0.13968232377.issue32847@roundup.psfhosted.org> STINNER Victor added the comment: > Python's code base never specifically handles ENOTEMPTY. Right, so this use case looks artificial to me. > On the other hand, in terms of basic operations on files and directories, I think implementing DirectoryNotEmptyError follows naturally from the existing set: FileNotFoundError, FileExistsError, NotADirectoryError, and IsADirectoryError. Again, I consider that we must not add one exception per errno, since the Python errno module contains 133 error codes on Linux. Many are very rare and don't deserve to add a new symbol to the builtins module. I suggest to close this issue. If later someone wants to get DirectoryNotEmptyError, please open a new issue with statistics of how many 3rd party projects use ENOTEMPTY. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 05:51:03 2019 From: report at bugs.python.org (Eric Snow) Date: Thu, 12 Sep 2019 09:51:03 +0000 Subject: [issue36876] Global C variables are a problem. In-Reply-To: <1557514902.13.0.853517754348.issue36876@roundup.psfhosted.org> Message-ID: <1568281863.63.0.05831852399.issue36876@roundup.psfhosted.org> Eric Snow added the comment: New changeset 64535fc6c0712caef0bc46be30e661f7ccf8280e by Eric Snow in branch 'master': bpo-36876: Skip test_check_c_globals for now. (gh-16017) https://github.com/python/cpython/commit/64535fc6c0712caef0bc46be30e661f7ccf8280e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:02:52 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 12 Sep 2019 10:02:52 +0000 Subject: [issue37405] socket.getsockname() returns string instead of tuple In-Reply-To: <1561496477.42.0.179203753139.issue37405@roundup.psfhosted.org> Message-ID: <1568282572.35.0.968382465012.issue37405@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 954900a3f98a8c0dea14dd575490237f3f8626b3 by Benjamin Peterson (bggardner) in branch 'master': closes bpo-37405: Make socket.getsockname() always return a tuple for AF_CAN. (GH-14392) https://github.com/python/cpython/commit/954900a3f98a8c0dea14dd575490237f3f8626b3 ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:03:09 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 10:03:09 +0000 Subject: [issue37405] socket.getsockname() returns string instead of tuple In-Reply-To: <1561496477.42.0.179203753139.issue37405@roundup.psfhosted.org> Message-ID: <1568282589.4.0.125918437752.issue37405@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15641 pull_request: https://github.com/python/cpython/pull/16018 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:09:35 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 12 Sep 2019 10:09:35 +0000 Subject: [issue38127] A fatal error when running test_ctypes In-Reply-To: <1568259476.22.0.837518009168.issue38127@roundup.psfhosted.org> Message-ID: <1568282975.54.0.601157721388.issue38127@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset ea683deccc505a78bbbb1eb8c6a88b0835ad5151 by Benjamin Peterson (Zackery Spytz) in branch 'master': closes bpo-38127: _ctypes: PyObject_IsSubclass() should be checked for failure. (GH-16011) https://github.com/python/cpython/commit/ea683deccc505a78bbbb1eb8c6a88b0835ad5151 ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:09:47 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 10:09:47 +0000 Subject: [issue38127] A fatal error when running test_ctypes In-Reply-To: <1568259476.22.0.837518009168.issue38127@roundup.psfhosted.org> Message-ID: <1568282987.2.0.219686754886.issue38127@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15642 pull_request: https://github.com/python/cpython/pull/16019 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:09:54 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 10:09:54 +0000 Subject: [issue38127] A fatal error when running test_ctypes In-Reply-To: <1568259476.22.0.837518009168.issue38127@roundup.psfhosted.org> Message-ID: <1568282994.24.0.108326253343.issue38127@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15643 pull_request: https://github.com/python/cpython/pull/16020 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:13:54 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 12 Sep 2019 10:13:54 +0000 Subject: [issue38008] ContextManager and AsyncContextManager protocols can't be subclassed In-Reply-To: <1567424849.42.0.765242467495.issue38008@roundup.psfhosted.org> Message-ID: <1568283234.36.0.416388336131.issue38008@roundup.psfhosted.org> Ivan Levkivskyi added the comment: New changeset 692a0dc91597b7fb350383b633dc4d044cbd360e by Ivan Levkivskyi (Divij Rajkumar) in branch 'master': bpo-38008: Move builtin protocol whitelist to mapping instead of list (GH-15647) https://github.com/python/cpython/commit/692a0dc91597b7fb350383b633dc4d044cbd360e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:14:03 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 10:14:03 +0000 Subject: [issue38008] ContextManager and AsyncContextManager protocols can't be subclassed In-Reply-To: <1567424849.42.0.765242467495.issue38008@roundup.psfhosted.org> Message-ID: <1568283243.36.0.603906339831.issue38008@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15644 pull_request: https://github.com/python/cpython/pull/16021 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:20:43 2019 From: report at bugs.python.org (Bruce Merry) Date: Thu, 12 Sep 2019 10:20:43 +0000 Subject: [issue37141] Allow multiple separators in Stream.readuntil In-Reply-To: <1559554350.7.0.981137522594.issue37141@roundup.psfhosted.org> Message-ID: <1568283643.4.0.144905681053.issue37141@roundup.psfhosted.org> Bruce Merry added the comment: I finally have permission from my employer to sign the contributors agreement, so I'll take a stab at this when I have some free time (unless nobody else gets to it first). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:21:59 2019 From: report at bugs.python.org (Ilya Kamenshchikov) Date: Thu, 12 Sep 2019 10:21:59 +0000 Subject: [issue38131] compile(mode='eval') uninformative error message Message-ID: <1568283719.06.0.851695472479.issue38131@roundup.psfhosted.org> New submission from Ilya Kamenshchikov : While trying to construct a valid ast node programmatically, I have tried following: import ast tree = ast.BinOp(left=ast.Num(n=2), right=ast.Num(n=2), op=ast.Add()) expr = ast.Expression(body=[tree]) ast.fix_missing_locations(expr) exe = compile(expr, filename="", mode="eval") print(eval(exe)) Unfortunately this gives unhelpful error message: >>> exe = compile(expr, filename="", mode="eval") TypeError: required field "lineno" missing from expr Turns out I need to make body of ast.Expression not a list, but a node: expr = ast.Expression(body=tree) # works Confusion also comes from naming the field "body", which takes value of a list for ast.Module and some others. ---------- components: Library (Lib) messages: 352090 nosy: Ilya Kamenshchikov priority: normal severity: normal status: open title: compile(mode='eval') uninformative error message versions: Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:22:33 2019 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 12 Sep 2019 10:22:33 +0000 Subject: [issue13927] Document time.ctime format In-Reply-To: <1328215776.48.0.974828105123.issue13927@psf.upfronthosting.co.za> Message-ID: <1568283753.28.0.678386493405.issue13927@roundup.psfhosted.org> Paul Ganssle added the comment: New changeset 2d32bf1ef23c9e468b2e8afab3c24e7a2047ac36 by Paul Ganssle (Harmandeep Singh) in branch 'master': bpo-13927: time.ctime and time.asctime return string explantion (GH-11303) https://github.com/python/cpython/commit/2d32bf1ef23c9e468b2e8afab3c24e7a2047ac36 ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:24:53 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 10:24:53 +0000 Subject: [issue13927] Document time.ctime format In-Reply-To: <1328215776.48.0.974828105123.issue13927@psf.upfronthosting.co.za> Message-ID: <1568283893.63.0.4956248838.issue13927@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15645 pull_request: https://github.com/python/cpython/pull/16022 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:28:08 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 10:28:08 +0000 Subject: [issue38127] A fatal error when running test_ctypes In-Reply-To: <1568259476.22.0.837518009168.issue38127@roundup.psfhosted.org> Message-ID: <1568284088.87.0.90116493143.issue38127@roundup.psfhosted.org> miss-islington added the comment: New changeset 79cbaf50ac9530d507149402de5c84fa590d9cfb by Miss Islington (bot) in branch '3.8': closes bpo-38127: _ctypes: PyObject_IsSubclass() should be checked for failure. (GH-16011) https://github.com/python/cpython/commit/79cbaf50ac9530d507149402de5c84fa590d9cfb ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:28:39 2019 From: report at bugs.python.org (Julien Palard) Date: Thu, 12 Sep 2019 10:28:39 +0000 Subject: [issue36675] Doctest directives and comments missing from code samples In-Reply-To: <1555757030.56.0.8094269644.issue36675@roundup.psfhosted.org> Message-ID: <1568284119.98.0.429488846409.issue36675@roundup.psfhosted.org> Julien Palard added the comment: I opened an issue on the sphinx-doc repo [1] to check if it would be possible to have an option in doctest blocks to not trim them. We previously had a hack in Doc/tools/extensions/pyspecific.py to patch sphinx to not trim them for the doctest.rst file. But sphinx deprecated the hack we used :( [1]: https://github.com/sphinx-doc/sphinx/issues/6698 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:30:57 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 10:30:57 +0000 Subject: [issue38127] A fatal error when running test_ctypes In-Reply-To: <1568259476.22.0.837518009168.issue38127@roundup.psfhosted.org> Message-ID: <1568284257.8.0.0812251807392.issue38127@roundup.psfhosted.org> miss-islington added the comment: New changeset 197ac1ad1c03243c647aa9100edbaa16bebbb7e9 by Miss Islington (bot) in branch '3.7': closes bpo-38127: _ctypes: PyObject_IsSubclass() should be checked for failure. (GH-16011) https://github.com/python/cpython/commit/197ac1ad1c03243c647aa9100edbaa16bebbb7e9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:31:46 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 10:31:46 +0000 Subject: [issue13927] Document time.ctime format In-Reply-To: <1328215776.48.0.974828105123.issue13927@psf.upfronthosting.co.za> Message-ID: <1568284306.45.0.224570728608.issue13927@roundup.psfhosted.org> miss-islington added the comment: New changeset 1e17c4d414049ad2b5b6a0a53685efc7a550c5c5 by Miss Islington (bot) in branch '3.8': bpo-13927: time.ctime and time.asctime return string explantion (GH-11303) https://github.com/python/cpython/commit/1e17c4d414049ad2b5b6a0a53685efc7a550c5c5 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:32:40 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 10:32:40 +0000 Subject: [issue38008] ContextManager and AsyncContextManager protocols can't be subclassed In-Reply-To: <1567424849.42.0.765242467495.issue38008@roundup.psfhosted.org> Message-ID: <1568284360.08.0.225792861781.issue38008@roundup.psfhosted.org> miss-islington added the comment: New changeset 52baf90a74f3a4573f4266bb4ca8569534db42a9 by Miss Islington (bot) in branch '3.8': bpo-38008: Move builtin protocol whitelist to mapping instead of list (GH-15647) https://github.com/python/cpython/commit/52baf90a74f3a4573f4266bb4ca8569534db42a9 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:34:31 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 12 Sep 2019 10:34:31 +0000 Subject: [issue37405] socket.getsockname() returns string instead of tuple In-Reply-To: <1561496477.42.0.179203753139.issue37405@roundup.psfhosted.org> Message-ID: <1568284471.2.0.831774764096.issue37405@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset f60fd95dcc189ace8c0a2177a394b9cc20389a1e by Benjamin Peterson (Miss Islington (bot)) in branch '3.8': closes bpo-37405: Make socket.getsockname() always return a tuple for AF_CAN. (GH-14392) (GH-16018) https://github.com/python/cpython/commit/f60fd95dcc189ace8c0a2177a394b9cc20389a1e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:35:48 2019 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 12 Sep 2019 10:35:48 +0000 Subject: [issue13927] Document time.ctime format In-Reply-To: <1328215776.48.0.974828105123.issue13927@psf.upfronthosting.co.za> Message-ID: <1568284548.25.0.0835428361036.issue13927@roundup.psfhosted.org> Paul Ganssle added the comment: We've merged the PR and I think it resolves this issue, so we can close this issue now. Please let me know if it's not fully resolved and we can re-open. Thanks Roger for reporting this and Harmandeep for making the PR and requested changes. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:44:02 2019 From: report at bugs.python.org (Christian Heimes) Date: Thu, 12 Sep 2019 10:44:02 +0000 Subject: [issue38132] Simplify hashlib implementation Message-ID: <1568285042.8.0.241070384019.issue38132@roundup.psfhosted.org> New submission from Christian Heimes : The hashlib module uses complicated macros and some pointless optimization. The code can be simplified to make maintenance easier. Cleanup also makes it easier to get rid of static global state and to add "usedforsecurity" feature. * The EVPobject contains a PyObject* with the name of the hashing algorithm as PyUnicode object. The name is rarely used and can be efficiently calculated from a const char* of the EVP_MD_CTX. * The module caches pre-generated EVP_MD_CTX objects for commonly used hashes like sha256. Tests with timeit has shown that generating a EVP_MD_CTX from a EVP constructor is as fast as copying and reinitializing a EVP_MD_CTX. * The pre-calculated constructs can be replaced with argument clinic to make the code more readable. ---------- assignee: christian.heimes components: Extension Modules messages: 352099 nosy: christian.heimes, gregory.p.smith priority: normal severity: normal status: open title: Simplify hashlib implementation type: enhancement versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:49:45 2019 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 12 Sep 2019 10:49:45 +0000 Subject: [issue38132] Simplify hashlib implementation In-Reply-To: <1568285042.8.0.241070384019.issue38132@roundup.psfhosted.org> Message-ID: <1568285385.96.0.0774259574645.issue38132@roundup.psfhosted.org> Charalampos Stratakis added the comment: Yes that would be awesome! Indeed hashlib has been a bit of a pain to work with especially with FIPS related modifications, simplifying it would help a ton. ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:51:41 2019 From: report at bugs.python.org (Michael Foord) Date: Thu, 12 Sep 2019 10:51:41 +0000 Subject: [issue38122] AsyncMock force always creating an AsyncMock for child mocks In-Reply-To: <1568222694.73.0.217906468671.issue38122@roundup.psfhosted.org> Message-ID: <1568285501.55.0.945465281232.issue38122@roundup.psfhosted.org> Michael Foord added the comment: That may change though, right? In general I dislike the proliferation of keyword arguments if it's at all possible to avoid. I added way too many of them originally and the mock API is really big. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:52:52 2019 From: report at bugs.python.org (Roundup Robot) Date: Thu, 12 Sep 2019 10:52:52 +0000 Subject: [issue37972] unittest.mock.call does not chain __getitem__ to another _Call object In-Reply-To: <1567024381.55.0.529292089661.issue37972@roundup.psfhosted.org> Message-ID: <1568285572.72.0.181710687155.issue37972@roundup.psfhosted.org> Roundup Robot added the comment: New changeset db0d8a5b2c803d30d9df436e00b6627ec8e09a13 by Michael Foord (Miss Islington (bot)) in branch '3.8': bpo-37972: unittest.mock._Call now passes on __getitem__ to the __getattr__ chaining so that call() can be subscriptable (GH-15565) (GH-15965) https://github.com/python/cpython/commit/db0d8a5b2c803d30d9df436e00b6627ec8e09a13 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:52:58 2019 From: report at bugs.python.org (Christian Heimes) Date: Thu, 12 Sep 2019 10:52:58 +0000 Subject: [issue38132] Simplify hashlib implementation In-Reply-To: <1568285042.8.0.241070384019.issue38132@roundup.psfhosted.org> Message-ID: <1568285578.12.0.423299692813.issue38132@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +15646 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16023 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:53:25 2019 From: report at bugs.python.org (Julien Palard) Date: Thu, 12 Sep 2019 10:53:25 +0000 Subject: [issue36675] Doctest directives and comments missing from code samples In-Reply-To: <1555757030.56.0.8094269644.issue36675@roundup.psfhosted.org> Message-ID: <1568285605.62.0.206394053367.issue36675@roundup.psfhosted.org> Change by Julien Palard : ---------- pull_requests: +15647 pull_request: https://github.com/python/cpython/pull/16024 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:56:08 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 10:56:08 +0000 Subject: [issue9938] Add optional keyword argument exit_on_error to argparse.ArgumentParser In-Reply-To: <1285338690.84.0.283413950067.issue9938@psf.upfronthosting.co.za> Message-ID: <1568285768.06.0.996936272729.issue9938@roundup.psfhosted.org> miss-islington added the comment: New changeset f545638b5701652ffbe1774989533cdf5bc6631e by Miss Islington (bot) (Hai Shi) in branch 'master': bpo-9938: Add optional keyword argument exit_on_error to argparse.ArgumentParser (GH-15362) https://github.com/python/cpython/commit/f545638b5701652ffbe1774989533cdf5bc6631e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 06:57:30 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 12 Sep 2019 10:57:30 +0000 Subject: [issue9938] Add optional keyword argument exit_on_error to argparse.ArgumentParser In-Reply-To: <1285338690.84.0.283413950067.issue9938@psf.upfronthosting.co.za> Message-ID: <1568285850.27.0.658963154496.issue9938@roundup.psfhosted.org> St?phane Wirtel added the comment: Thank you for your PR and for your time, I have merged the PR into master. ---------- nosy: +matrixise resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:00:18 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 12 Sep 2019 11:00:18 +0000 Subject: [issue34632] Port importlib_metadata to Python 3.8 In-Reply-To: <1536689803.48.0.0269046726804.issue34632@psf.upfronthosting.co.za> Message-ID: <1568286018.44.0.104094204542.issue34632@roundup.psfhosted.org> Jason R. Coombs added the comment: I've addressed the requests made by rhettinger in issue38086 and issue38121. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:00:36 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 12 Sep 2019 11:00:36 +0000 Subject: [issue38086] Synchronize importlib.metadata with importlib_metadata 0.21 In-Reply-To: <1568115394.78.0.274032945021.issue38086@roundup.psfhosted.org> Message-ID: <1568286036.09.0.0971496385345.issue38086@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:04:18 2019 From: report at bugs.python.org (Michael Foord) Date: Thu, 12 Sep 2019 11:04:18 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls In-Reply-To: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> Message-ID: <1568286258.46.0.778939671021.issue36871@roundup.psfhosted.org> Michael Foord added the comment: The code around whether or not to swallow self is hairy. Even if the original spec object is a class we may still be mocking an instance of the class (we don't want users to have to create an instance just to be able to use it as a spec). So we have to carry metadata about whether or not we're mocking an instance. But we also have to support the use case of when users are mocking an actual class object. This gets potentially recursive in the case of autospec and has to apply to the class object itself. If we're mocking an instance that is callable then the signature on the top level mock should be taken from __call__. If we're mocking the constructor the signature comes from __init__. So it's all complicated. And when I originally wrote the code it was worse as it predated inspect.Signature (and was one of the driving use cases for it) and created functions with the right signature by exec'ing code. So it's better code than it used to be, but I'm still scared of it and that particular bug came in the switch to use sig.bind which I didn't write. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:05:13 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 12 Sep 2019 11:05:13 +0000 Subject: [issue38133] py.exe cannot locate Store package Message-ID: <1568286313.97.0.196410705778.issue38133@roundup.psfhosted.org> New submission from Steve Dower : The py.exe launcher cannot locate installations from the Store (unless you have no other installations on your machine, which is unlikely). ---------- assignee: steve.dower components: Windows messages: 352107 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: py.exe cannot locate Store package type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:07:02 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 12 Sep 2019 11:07:02 +0000 Subject: [issue38133] py.exe cannot locate Store package In-Reply-To: <1568286313.97.0.196410705778.issue38133@roundup.psfhosted.org> Message-ID: <1568286422.81.0.78246341522.issue38133@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +15648 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/16025 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:09:55 2019 From: report at bugs.python.org (Samuel Freilich) Date: Thu, 12 Sep 2019 11:09:55 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls In-Reply-To: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> Message-ID: <1568286595.95.0.38887079226.issue36871@roundup.psfhosted.org> Samuel Freilich added the comment: Check out my PR, which solves a much smaller issue: It fixes a bug in the exception raising logic in assert_has_calls (and _awaits) which makes complicated problems like the one you mention much harder to debug. Also it has tests! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:10:07 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 12 Sep 2019 11:10: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: <1568286607.73.0.392322185399.issue32008@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 894d0f7d5542ee04556ec1bee8c58506f7c916d4 by St?phane Wirtel (Christian Heimes) in branch 'master': bpo-32008: Prefer client or TLSv1_2 in examples (GH-5797) https://github.com/python/cpython/commit/894d0f7d5542ee04556ec1bee8c58506f7c916d4 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:10:22 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 11:10:22 +0000 Subject: [issue32008] Example suggest to use a TLSv1 socket In-Reply-To: <1510428965.62.0.213398074469.issue32008@psf.upfronthosting.co.za> Message-ID: <1568286622.96.0.738483678047.issue32008@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15649 pull_request: https://github.com/python/cpython/pull/16026 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:11:37 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 12 Sep 2019 11:11:37 +0000 Subject: [issue32008] Example suggest to use a TLSv1 socket In-Reply-To: <1510428965.62.0.213398074469.issue32008@psf.upfronthosting.co.za> Message-ID: <1568286697.03.0.701581917217.issue32008@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- pull_requests: +15650 pull_request: https://github.com/python/cpython/pull/16027 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:12:25 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 12 Sep 2019 11:12:25 +0000 Subject: [issue37609] support "UNC" device paths in ntpath.splitdrive In-Reply-To: <1563362794.09.0.456380769613.issue37609@roundup.psfhosted.org> Message-ID: <1568286745.0.0.126507903153.issue37609@roundup.psfhosted.org> Steve Dower added the comment: For clarity, given Eryk's examples above, both "\\?\UNC\" and "//?/UNC/" are okay (as are any combination of forward and backslashes in the prefix, as normalization will be applied for any except the "\\?\" version). "UNC" is also case-insensitive. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:13:37 2019 From: report at bugs.python.org (Christian Heimes) Date: Thu, 12 Sep 2019 11:13:37 +0000 Subject: [issue38134] Remove copy of fast PBKDF2 algorithm Message-ID: <1568286817.02.0.48627400928.issue38134@roundup.psfhosted.org> New submission from Christian Heimes : bpo #18582 added a C implementation of PBKDF2 algorithm. Back then Python still supported OpenSSL versions with a slow version of PBKDF2-HMAC. Nowadays all supported OpenSSL versions contain an optimized version of the password derivation algorithm. ---------- assignee: christian.heimes components: Extension Modules messages: 352111 nosy: christian.heimes priority: normal severity: normal stage: needs patch status: open title: Remove copy of fast PBKDF2 algorithm type: enhancement versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:15:29 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 12 Sep 2019 11:15:29 +0000 Subject: [issue38133] py.exe cannot locate Store package In-Reply-To: <1568286313.97.0.196410705778.issue38133@roundup.psfhosted.org> Message-ID: <1568286929.32.0.459309048972.issue38133@roundup.psfhosted.org> Steve Dower added the comment: I added an "exe_display" override for listing paths, since the full path to the store app is not supposed to be used by users (it's different from sys.executable) and is only going to work when the shorter name is on PATH anyway (due to a limitation in Windows that I'm still trying to get fixed). I also enabled support for the ExecutablePath key, which has the added benefit of making the debug py_d.exe able to find release Python 3.5+ installs (as well as finding the Store install at all, which is now using python3.8.exe as the main file because of the limitation I mentioned above). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:19:24 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 11:19:24 +0000 Subject: [issue38110] Use fdwalk() within os.closerange() impl if available In-Reply-To: <1568209201.53.0.0873310068645.issue38110@roundup.psfhosted.org> Message-ID: <1568287164.37.0.455093070633.issue38110@roundup.psfhosted.org> miss-islington added the comment: New changeset 84eb42e3c90c03f13262f19185b14566e10941ac by Miss Islington (bot) in branch '3.8': bpo-38110: Use fdwalk for os.closerange() when available. (GH-15224) https://github.com/python/cpython/commit/84eb42e3c90c03f13262f19185b14566e10941ac ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:19:40 2019 From: report at bugs.python.org (Mark Shannon) Date: Thu, 12 Sep 2019 11:19:40 +0000 Subject: [issue38135] Depth first search in compile.c creates wrong BB order for certain CFG. Message-ID: <1568287180.55.0.964846639884.issue38135@roundup.psfhosted.org> New submission from Mark Shannon : Consider a flow graph of four nodes, A, B, C, D where the A, B, C are "next" successors of each other (in order) and C branches to B and B branches to D. Note that there is no "next" link to the D block. The correct order is A, B, C, D but the 'dfs' function in compile.c produces the order A, B, D, C. This is not an issue with the current compiler as it always add the "next" link from C to D, but this will become an issue when we use a more powerful CFG based optimizer than the current "peephole" optimizer. ---------- assignee: Mark.Shannon components: Interpreter Core messages: 352114 nosy: Mark.Shannon priority: normal severity: normal status: open title: Depth first search in compile.c creates wrong BB order for certain CFG. versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:19:53 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 12 Sep 2019 11:19:53 +0000 Subject: [issue37967] Beta GPG signature check failing In-Reply-To: <1566977917.52.0.520116504637.issue37967@roundup.psfhosted.org> Message-ID: <1568287193.13.0.902724384679.issue37967@roundup.psfhosted.org> Ned Deily added the comment: > If the pubkeys.txt on python.org has no benefit, why does it exist? That's an excellent question! Based on the points raised here and elsewhere, we discussed this more off-line and decided that we should remove the pubkeys.txt file from the website since, as noted here, it encourages a false sense of security and has proven difficult to keep up-to-date. I have submitted a request to have the file removed from the website (it may take some time for the URL to disappear) and have already updated the wording in the OpenPGP section of the Downloads page of the website. If anyone has suggestions for improvements to the wording, feel free to submit them on the pythondotorg issue tracker. Thanks all for bringing this up and helping to come to a resolution. https://www.python.org/downloads/ https://github.com/python/pythondotorg/pull/1509 https://github.com/python/pythondotorg/issues ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:20:09 2019 From: report at bugs.python.org (Julien Palard) Date: Thu, 12 Sep 2019 11:20:09 +0000 Subject: [issue35685] Add samples on patch.dict of the use of decorator and in class In-Reply-To: <1546951077.39.0.591357222806.issue35685@roundup.psfhosted.org> Message-ID: <1568287209.55.0.410624124504.issue35685@roundup.psfhosted.org> Julien Palard added the comment: We're using assert instead of assertEqual to denote that we're not "testing unittest" but asserting that unittest work as documented. Whch is semantically a bit different. Unittesting unittest using unittest works, but using unittest test to test unittest as documentation example could lead the reader to having hard time figuring what's what. I think using assert here disambiguate the whole thing. ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:20:09 2019 From: report at bugs.python.org (Christian Heimes) Date: Thu, 12 Sep 2019 11:20:09 +0000 Subject: [issue38134] Remove copy of fast PBKDF2 algorithm In-Reply-To: <1568286817.02.0.48627400928.issue38134@roundup.psfhosted.org> Message-ID: <1568287209.44.0.163937567393.issue38134@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +15651 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/16028 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:20:11 2019 From: report at bugs.python.org (Mark Shannon) Date: Thu, 12 Sep 2019 11:20:11 +0000 Subject: [issue38135] Depth first search in compile.c creates wrong BB order for certain CFG. In-Reply-To: <1568287180.55.0.964846639884.issue38135@roundup.psfhosted.org> Message-ID: <1568287211.89.0.25914023569.issue38135@roundup.psfhosted.org> Change by Mark Shannon : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:20:44 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 12 Sep 2019 11:20:44 +0000 Subject: [issue32008] Example suggest to use a TLSv1 socket In-Reply-To: <1510428965.62.0.213398074469.issue32008@psf.upfronthosting.co.za> Message-ID: <1568287244.59.0.289272138882.issue32008@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 07b4148f3932ed22f9cd8476f49bd0079d093590 by St?phane Wirtel (Miss Islington (bot)) in branch '3.7': bpo-32008: Prefer client or TLSv1_2 in examples (GH-5797) (GH-16026) https://github.com/python/cpython/commit/07b4148f3932ed22f9cd8476f49bd0079d093590 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:21:54 2019 From: report at bugs.python.org (hai shi) Date: Thu, 12 Sep 2019 11:21:54 +0000 Subject: [issue9938] Add optional keyword argument exit_on_error to argparse.ArgumentParser In-Reply-To: <1285338690.84.0.283413950067.issue9938@psf.upfronthosting.co.za> Message-ID: <1568287314.02.0.453020349464.issue9938@roundup.psfhosted.org> hai shi added the comment: St?phane, thanks for your good comment. Some argparse's bpo is too old ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:23:24 2019 From: report at bugs.python.org (Michael Foord) Date: Thu, 12 Sep 2019 11:23:24 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls In-Reply-To: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> Message-ID: <1568287404.62.0.325148608007.issue36871@roundup.psfhosted.org> Michael Foord added the comment: (The code that generated functions was originally borrowed from the decorator module by Michele Simionato. When I first started in Python, around 2002, I was impressed by the Python community as it had two very prominent women amongst the part of the community I inhabited. Nicola Larosa and Michele Simionato. It turned out they were both Italian men.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:23:57 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Sep 2019 11:23:57 +0000 Subject: [issue36675] Doctest directives and comments missing from code samples In-Reply-To: <1555757030.56.0.8094269644.issue36675@roundup.psfhosted.org> Message-ID: <1568287437.15.0.431262994316.issue36675@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 2c910c1e732c9a3ec4c67a7c43d789d6c729304a by Gregory P. Smith (Julien Palard) in branch 'master': bpo-36675: Remove obsolete code. (GH-16024) https://github.com/python/cpython/commit/2c910c1e732c9a3ec4c67a7c43d789d6c729304a ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:23:57 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 12 Sep 2019 11:23:57 +0000 Subject: [issue25597] unittest.mock does not wrap dunder methods (__getitem__ etc) In-Reply-To: <1447174958.96.0.448093662654.issue25597@psf.upfronthosting.co.za> Message-ID: <1568287437.29.0.604616138257.issue25597@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +15652 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/16029 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:24:07 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 11:24:07 +0000 Subject: [issue36675] Doctest directives and comments missing from code samples In-Reply-To: <1555757030.56.0.8094269644.issue36675@roundup.psfhosted.org> Message-ID: <1568287447.39.0.70258881741.issue36675@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15653 pull_request: https://github.com/python/cpython/pull/16030 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:24:42 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 12 Sep 2019 11:24:42 +0000 Subject: [issue38133] py.exe cannot locate Store package In-Reply-To: <1568286313.97.0.196410705778.issue38133@roundup.psfhosted.org> Message-ID: <1568287482.08.0.931515777897.issue38133@roundup.psfhosted.org> Steve Dower added the comment: Sample output after this change (some paths elided): Installed Pythons found by ...\py.exe Launcher for Windows (venv) C:\...\env\Scripts\python.exe * -3.8-64 python3.8.exe -3.7-32-32 C:\Python37_x86\python.exe -3.7-64 C:\Python37_x64\python.exe -3.6-32-32 C:\Python36_x86\python.exe -3.6-64 C:\Users\...\AppData\Local\Programs\Python\Python36\python.exe -3.5-32-32 C:\Python35_x86\python.exe -3.5-64 C:\Python35_x64\python.exe -3.4-64 C:\Python34_x64\python.exe -3.3-64 C:\Python33_x64\python.exe -3.3-32 C:\Python33_x86\python.exe -3.2-64 C:\Python32_x64\python.exe -3.2-32 C:\Python32_x86\python.exe -3.1-64 C:\Python31_x64\python.exe -3.1-32 C:\Python31_x86\python.exe -3.0-32 C:\Python30_x86\python.exe -2.7-64 C:\Python27_x64\python.exe -2.7-32 C:\Python27_x86\python.exe -2.6-32 C:\Python26_x86\python.exe -2.5-32 C:\Python25_x86\python.exe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:25:04 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 12 Sep 2019 11:25:04 +0000 Subject: [issue32008] Example suggest to use a TLSv1 socket In-Reply-To: <1510428965.62.0.213398074469.issue32008@psf.upfronthosting.co.za> Message-ID: <1568287504.95.0.484755412818.issue32008@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 1fc84b64f9f740f2dc089da1d061dfdd5b438d3c by St?phane Wirtel in branch '3.8': [3.8] bpo-32008: Prefer client or TLSv1_2 in examples (GH-5797) (GH-16027) https://github.com/python/cpython/commit/1fc84b64f9f740f2dc089da1d061dfdd5b438d3c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:25:55 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 12 Sep 2019 11:25: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: <1568287555.63.0.480342353734.issue32008@roundup.psfhosted.org> St?phane Wirtel added the comment: Hi, I have merged the PR of Christian for master, 3.8 & 3.7 Thank you so much, ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:28:18 2019 From: report at bugs.python.org (Michael Foord) Date: Thu, 12 Sep 2019 11:28:18 +0000 Subject: [issue25597] unittest.mock does not wrap dunder methods (__getitem__ etc) In-Reply-To: <1447174958.96.0.448093662654.issue25597@psf.upfronthosting.co.za> Message-ID: <1568287698.49.0.645289711608.issue25597@roundup.psfhosted.org> Michael Foord added the comment: As discussed with Karthik, I think this is a nice feature enhancement for the wraps functionality and worth fixing. It has the great advantage that the fix is nice and isolated and simple. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:29:41 2019 From: report at bugs.python.org (Michael Foord) Date: Thu, 12 Sep 2019 11:29:41 +0000 Subject: [issue25597] unittest.mock does not wrap dunder methods (__getitem__ etc) In-Reply-To: <1447174958.96.0.448093662654.issue25597@psf.upfronthosting.co.za> Message-ID: <1568287781.17.0.638542873107.issue25597@roundup.psfhosted.org> Michael Foord added the comment: The previous behaviour was unspecified and clearly due to missing functionality, so the advantages of fixing it outweigh any potential compatibility issues. But I'd see it as a feature enhancement for 3.9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:29:48 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 12 Sep 2019 11:29:48 +0000 Subject: [issue37669] Make mock_open return per-file content In-Reply-To: <1563972418.64.0.300779941937.issue37669@roundup.psfhosted.org> Message-ID: <1568287788.99.0.90803584525.issue37669@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Given that the enhancement can only land on 3.9 I guess it will be a good recipe on returning mock_open data for per file to be added to the unittest examples page. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:29:57 2019 From: report at bugs.python.org (Julien Palard) Date: Thu, 12 Sep 2019 11:29:57 +0000 Subject: [issue35685] Add samples on patch.dict of the use of decorator and in class In-Reply-To: <1546951077.39.0.591357222806.issue35685@roundup.psfhosted.org> Message-ID: <1568287797.65.0.863618409456.issue35685@roundup.psfhosted.org> Julien Palard added the comment: New changeset 31a82e25b6044a5b5ee25246bad3eb7b873cf5ec by Julien Palard (Emmanuel Arias) in branch 'master': bpo-35685: Add examples of unittest.mock.patch.dict usage (GH-11456) https://github.com/python/cpython/commit/31a82e25b6044a5b5ee25246bad3eb7b873cf5ec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:30:07 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 11:30:07 +0000 Subject: [issue35685] Add samples on patch.dict of the use of decorator and in class In-Reply-To: <1546951077.39.0.591357222806.issue35685@roundup.psfhosted.org> Message-ID: <1568287807.59.0.297019911634.issue35685@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15654 pull_request: https://github.com/python/cpython/pull/16031 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:31:20 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 11:31:20 +0000 Subject: [issue36675] Doctest directives and comments missing from code samples In-Reply-To: <1555757030.56.0.8094269644.issue36675@roundup.psfhosted.org> Message-ID: <1568287880.63.0.907970750681.issue36675@roundup.psfhosted.org> miss-islington added the comment: New changeset 94a684734f669eab02b5c915394b749ccf936449 by Miss Islington (bot) in branch '3.8': bpo-36675: Remove obsolete code. (GH-16024) https://github.com/python/cpython/commit/94a684734f669eab02b5c915394b749ccf936449 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:33:33 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 12 Sep 2019 11:33:33 +0000 Subject: [issue36191] pubkeys.txt contains bogus keys In-Reply-To: <1551739151.95.0.42643346766.issue36191@roundup.psfhosted.org> Message-ID: <1568288013.5.0.458835089219.issue36191@roundup.psfhosted.org> Ned Deily added the comment: (See later discussion and resolution in Issue37967.) ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:37:08 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 11:37:08 +0000 Subject: [issue35685] Add samples on patch.dict of the use of decorator and in class In-Reply-To: <1546951077.39.0.591357222806.issue35685@roundup.psfhosted.org> Message-ID: <1568288228.6.0.650013595336.issue35685@roundup.psfhosted.org> miss-islington added the comment: New changeset 648494b44aad273590382c8db5a9d1a6c96ee67a by Miss Islington (bot) in branch '3.8': bpo-35685: Add examples of unittest.mock.patch.dict usage (GH-11456) https://github.com/python/cpython/commit/648494b44aad273590382c8db5a9d1a6c96ee67a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:37:38 2019 From: report at bugs.python.org (Julien Palard) Date: Thu, 12 Sep 2019 11:37:38 +0000 Subject: [issue35685] Add samples on patch.dict of the use of decorator and in class In-Reply-To: <1546951077.39.0.591357222806.issue35685@roundup.psfhosted.org> Message-ID: <1568288258.69.0.865516549605.issue35685@roundup.psfhosted.org> Change by Julien Palard : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:39:32 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 12 Sep 2019 11:39:32 +0000 Subject: [issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop In-Reply-To: <1533549887.39.0.56676864532.issue34344@psf.upfronthosting.co.za> Message-ID: <1568288372.14.0.15084571934.issue34344@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks for the report. This looks like a valid change to me as I can see from the docstring it says it can be None but in the source code there is an explicit check that if self._local._loop which is returned is None then raise a RuntimeError. I would propose removing the docstring in the example. # Docstring says can be None ./python.exe -m pydoc asyncio.events.BaseDefaultEventLoopPolicy.get_event_loop | cat Help on function get_event_loop in asyncio.events.BaseDefaultEventLoopPolicy: asyncio.events.BaseDefaultEventLoopPolicy.get_event_loop = get_event_loop(self) Get the event loop. This may be None or an instance of EventLoop. # RuntimeError is raised for None ./python.exe -m inspect asyncio.events:BaseDefaultEventLoopPolicy.get_event_loop def get_event_loop(self): """Get the event loop. This may be None or an instance of EventLoop. """ if (self._local._loop is None and not self._local._set_called and isinstance(threading.current_thread(), threading._MainThread)): self.set_event_loop(self.new_event_loop()) if self._local._loop is None: raise RuntimeError('There is no current event loop in thread %r.' % threading.current_thread().name) return self._local._loop ---------- versions: +Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:44:58 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 12 Sep 2019 11:44:58 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568288698.62.0.92386028831.issue36373@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- pull_requests: +15655 pull_request: https://github.com/python/cpython/pull/16033 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:46:40 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Sep 2019 11:46:40 +0000 Subject: [issue38134] Remove copy of fast PBKDF2 algorithm In-Reply-To: <1568286817.02.0.48627400928.issue38134@roundup.psfhosted.org> Message-ID: <1568288800.73.0.860710796735.issue38134@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 64117e059b79236c7345bc9afc1cc707162411de by Gregory P. Smith (Christian Heimes) in branch 'master': bpo-38134: Remove PKBDF2_HMAC_fast from _hashopenssl (GH-16028) https://github.com/python/cpython/commit/64117e059b79236c7345bc9afc1cc707162411de ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:46:49 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 11:46:49 +0000 Subject: [issue38134] Remove copy of fast PBKDF2 algorithm In-Reply-To: <1568286817.02.0.48627400928.issue38134@roundup.psfhosted.org> Message-ID: <1568288809.08.0.495831830628.issue38134@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15656 pull_request: https://github.com/python/cpython/pull/16034 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:48:13 2019 From: report at bugs.python.org (Inada Naoki) Date: Thu, 12 Sep 2019 11:48:13 +0000 Subject: [issue37207] Use PEP 590 vectorcall to speed up calls to range(), list() and dict() In-Reply-To: <1560072227.25.0.180298594259.issue37207@roundup.psfhosted.org> Message-ID: <1568288893.26.0.441205689079.issue37207@roundup.psfhosted.org> Inada Naoki added the comment: $ ./python -m pyperf timeit --compare-to ./python-master 'dict()' python-master: ..................... 89.9 ns +- 1.2 ns python: ..................... 72.5 ns +- 1.6 ns Mean +- std dev: [python-master] 89.9 ns +- 1.2 ns -> [python] 72.5 ns +- 1.6 ns: 1.24x faster (-19%) $ ./python -m pyperf timeit --compare-to ./python-master -s 'import string; a=dict.fromkeys(string.ascii_lowercase); b=dict.fromkeys(string.ascii_uppercase)' -- 'dict(a, **b)' python-master: ..................... 1.41 us +- 0.04 us python: ..................... 1.53 us +- 0.04 us Mean +- std dev: [python-master] 1.41 us +- 0.04 us -> [python] 1.53 us +- 0.04 us: 1.09x slower (+9%) --- There is some overhead in old dict merging idiom. But it seems reasonable compared to the benefit. LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 07:59:49 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 12 Sep 2019 11:59:49 +0000 Subject: [issue38008] ContextManager and AsyncContextManager protocols can't be subclassed In-Reply-To: <1567424849.42.0.765242467495.issue38008@roundup.psfhosted.org> Message-ID: <1568289589.59.0.96849239066.issue38008@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- components: +Library (Lib) resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:10:53 2019 From: report at bugs.python.org (Julien Palard) Date: Thu, 12 Sep 2019 12:10:53 +0000 Subject: [issue35325] imp.find_module() return value documentation discrepancy In-Reply-To: <1543303624.81.0.788709270274.issue35325@psf.upfronthosting.co.za> Message-ID: <1568290253.26.0.228177153512.issue35325@roundup.psfhosted.org> Julien Palard added the comment: New changeset 967b84c913c7b09ae2fc86272cb9373415e2beaf by Julien Palard (Windson yang) in branch 'master': bpo-35325: Doc: imp.find_module() return value documentation discrepancy (GH-11040) https://github.com/python/cpython/commit/967b84c913c7b09ae2fc86272cb9373415e2beaf ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:11:01 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 12:11:01 +0000 Subject: [issue35325] imp.find_module() return value documentation discrepancy In-Reply-To: <1543303624.81.0.788709270274.issue35325@psf.upfronthosting.co.za> Message-ID: <1568290261.53.0.622812654287.issue35325@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15657 pull_request: https://github.com/python/cpython/pull/16035 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:11:08 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 12:11:08 +0000 Subject: [issue35325] imp.find_module() return value documentation discrepancy In-Reply-To: <1543303624.81.0.788709270274.issue35325@psf.upfronthosting.co.za> Message-ID: <1568290268.92.0.568633525706.issue35325@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15658 pull_request: https://github.com/python/cpython/pull/16036 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:11:23 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 12 Sep 2019 12:11:23 +0000 Subject: [issue26868] Document PyModule_AddObject's behavior on error In-Reply-To: <1461735404.8.0.653639688918.issue26868@psf.upfronthosting.co.za> Message-ID: <1568290283.17.0.6909785022.issue26868@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 224b8aaa7e8f67f748e8b7b6a4a77a25f6554651 by St?phane Wirtel (Brandt Bucher) in branch 'master': bpo-26868: Fix example usage of PyModule_AddObject. (#15725) https://github.com/python/cpython/commit/224b8aaa7e8f67f748e8b7b6a4a77a25f6554651 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:11:32 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 12:11:32 +0000 Subject: [issue26868] Document PyModule_AddObject's behavior on error In-Reply-To: <1461735404.8.0.653639688918.issue26868@psf.upfronthosting.co.za> Message-ID: <1568290292.38.0.544041443836.issue26868@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15659 pull_request: https://github.com/python/cpython/pull/16037 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:11:39 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 12:11:39 +0000 Subject: [issue26868] Document PyModule_AddObject's behavior on error In-Reply-To: <1461735404.8.0.653639688918.issue26868@psf.upfronthosting.co.za> Message-ID: <1568290299.21.0.309645175927.issue26868@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15660 pull_request: https://github.com/python/cpython/pull/16038 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:18:43 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 12:18:43 +0000 Subject: [issue38134] Remove copy of fast PBKDF2 algorithm In-Reply-To: <1568286817.02.0.48627400928.issue38134@roundup.psfhosted.org> Message-ID: <1568290723.37.0.481381351773.issue38134@roundup.psfhosted.org> miss-islington added the comment: New changeset 80e33655a264d75f9a6ffedfc60697c30f92bdfe by Miss Islington (bot) in branch '3.8': bpo-38134: Remove PKBDF2_HMAC_fast from _hashopenssl (GH-16028) https://github.com/python/cpython/commit/80e33655a264d75f9a6ffedfc60697c30f92bdfe ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:24:06 2019 From: report at bugs.python.org (Eryk Sun) Date: Thu, 12 Sep 2019 12:24:06 +0000 Subject: [issue38133] py.exe cannot locate Store package In-Reply-To: <1568286313.97.0.196410705778.issue38133@roundup.psfhosted.org> Message-ID: <1568291046.56.0.882287024552.issue38133@roundup.psfhosted.org> Eryk Sun added the comment: > -3.7-32-32 C:\Python37_x86\python.exe > -3.6-32-32 C:\Python36_x86\python.exe > -3.5-32-32 C:\Python35_x86\python.exe MAX_VERSION_SIZE was increased, so the INSTALLED_PYTHON version string is now the full registry key name with the "-32" suffix. If that's intentional, you'll have to account for it in show_python_list. But I don't think the "-32" suffix belongs in the version string. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:24:59 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 12:24:59 +0000 Subject: [issue35325] imp.find_module() return value documentation discrepancy In-Reply-To: <1543303624.81.0.788709270274.issue35325@psf.upfronthosting.co.za> Message-ID: <1568291099.36.0.155187220584.issue35325@roundup.psfhosted.org> miss-islington added the comment: New changeset 01b47c94ca8ef89c5ac5fda0ab1074e73234a738 by Miss Islington (bot) in branch '3.7': bpo-35325: Doc: imp.find_module() return value documentation discrepancy (GH-11040) https://github.com/python/cpython/commit/01b47c94ca8ef89c5ac5fda0ab1074e73234a738 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:25:32 2019 From: report at bugs.python.org (Christian Heimes) Date: Thu, 12 Sep 2019 12:25:32 +0000 Subject: [issue38134] Remove copy of fast PBKDF2 algorithm In-Reply-To: <1568286817.02.0.48627400928.issue38134@roundup.psfhosted.org> Message-ID: <1568291132.52.0.974431548667.issue38134@roundup.psfhosted.org> Change by Christian Heimes : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:25:57 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 12:25:57 +0000 Subject: [issue35325] imp.find_module() return value documentation discrepancy In-Reply-To: <1543303624.81.0.788709270274.issue35325@psf.upfronthosting.co.za> Message-ID: <1568291157.71.0.158325517131.issue35325@roundup.psfhosted.org> miss-islington added the comment: New changeset 14afe203d6937069c66b7e9c4a9fc0db49b32c19 by Miss Islington (bot) in branch '3.8': bpo-35325: Doc: imp.find_module() return value documentation discrepancy (GH-11040) https://github.com/python/cpython/commit/14afe203d6937069c66b7e9c4a9fc0db49b32c19 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:26:49 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 12:26:49 +0000 Subject: [issue26868] Document PyModule_AddObject's behavior on error In-Reply-To: <1461735404.8.0.653639688918.issue26868@psf.upfronthosting.co.za> Message-ID: <1568291209.42.0.19022894962.issue26868@roundup.psfhosted.org> miss-islington added the comment: New changeset 535863e3f599a6ad829204d83f144c91e44de443 by Miss Islington (bot) in branch '3.8': bpo-26868: Fix example usage of PyModule_AddObject. (GH-15725) https://github.com/python/cpython/commit/535863e3f599a6ad829204d83f144c91e44de443 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:29:12 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 12:29:12 +0000 Subject: [issue26868] Document PyModule_AddObject's behavior on error In-Reply-To: <1461735404.8.0.653639688918.issue26868@psf.upfronthosting.co.za> Message-ID: <1568291352.79.0.523268790332.issue26868@roundup.psfhosted.org> miss-islington added the comment: New changeset c8d1338441114fbc504625bc66607e7996018a5d by Miss Islington (bot) in branch '3.7': bpo-26868: Fix example usage of PyModule_AddObject. (GH-15725) https://github.com/python/cpython/commit/c8d1338441114fbc504625bc66607e7996018a5d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:36:35 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 12 Sep 2019 12:36:35 +0000 Subject: [issue38133] py.exe cannot locate Store package In-Reply-To: <1568286313.97.0.196410705778.issue38133@roundup.psfhosted.org> Message-ID: <1568291795.06.0.333791028427.issue38133@roundup.psfhosted.org> Steve Dower added the comment: Ah, good catch, I didn't notice that. Because those are special cases, we should strip it off the version string. One day when we implement PEP 514 properly then they'll come back (and we'll probably drop the -64 suffix for consistency with the PEP). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:40:20 2019 From: report at bugs.python.org (Lisa Roach) Date: Thu, 12 Sep 2019 12:40:20 +0000 Subject: [issue38136] Remove AsyncMock.assert_awaited_* Message-ID: <1568292020.39.0.826451235958.issue38136@roundup.psfhosted.org> New submission from Lisa Roach : After some discussion about call_count vs await_count, I believe call_count should be counting when things are *awaited* (await foo()), not when they are *called* (foo()). I think people expect "calling" to execute the code and give them a return_value, which for asyncio is what happens when you await, not when you call with (). If people disagree about this I am open to discussion, we can change the current functionality and leave in the assert_awaited_* calls. Currently the code does count asyncio calls when they are awaited, but this makes the assert_awaited_* calls redundant. We should remove these in favor of the call_count_* functions. ---------- assignee: lisroach components: Library (Lib) messages: 352144 nosy: cjw296, ezio.melotti, lisroach, michael.foord, xtreak priority: normal severity: normal status: open title: Remove AsyncMock.assert_awaited_* type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:40:44 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 12 Sep 2019 12:40:44 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568292044.4.0.92269035067.issue36373@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset a488879cbaf4b8b52699cadccf73bb4c271bcb29 by Andrew Svetlov in branch 'master': bpo-36373: Deprecate explicit loop in task and subprocess API (GH-16033) https://github.com/python/cpython/commit/a488879cbaf4b8b52699cadccf73bb4c271bcb29 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:40:55 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 12:40:55 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568292055.35.0.240180096206.issue36373@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15661 pull_request: https://github.com/python/cpython/pull/16039 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:42:10 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 12 Sep 2019 12:42:10 +0000 Subject: [issue38132] Simplify hashlib implementation In-Reply-To: <1568285042.8.0.241070384019.issue38132@roundup.psfhosted.org> Message-ID: <1568292130.6.0.520519139494.issue38132@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 5a4f82f457049b5b07b6fba4ca42bc1ecf597976 by St?phane Wirtel (Christian Heimes) in branch 'master': bpo-38132: Simplify _hashopenssl code (GH-16023) https://github.com/python/cpython/commit/5a4f82f457049b5b07b6fba4ca42bc1ecf597976 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:42:19 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 12:42:19 +0000 Subject: [issue38132] Simplify hashlib implementation In-Reply-To: <1568285042.8.0.241070384019.issue38132@roundup.psfhosted.org> Message-ID: <1568292139.36.0.84709124038.issue38132@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15662 pull_request: https://github.com/python/cpython/pull/16040 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:45:24 2019 From: report at bugs.python.org (Christian Heimes) Date: Thu, 12 Sep 2019 12:45:24 +0000 Subject: [issue38132] Simplify hashlib implementation In-Reply-To: <1568285042.8.0.241070384019.issue38132@roundup.psfhosted.org> Message-ID: <1568292324.47.0.206642495708.issue38132@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +15663 pull_request: https://github.com/python/cpython/pull/16041 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:51:13 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 12 Sep 2019 12:51:13 +0000 Subject: [issue38136] Remove AsyncMock.assert_awaited_* In-Reply-To: <1568292020.39.0.826451235958.issue38136@roundup.psfhosted.org> Message-ID: <1568292673.86.0.956789404132.issue38136@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: IMO it gives a good segregation between other mocks and AsyncMock that using assert_awaited_* makes it explicit and to cause less confusion over whether this is an awaitable or a synchronous mock. I would favor in keeping the API. I also found it to better in conceptualizing while writing tests for other PRs over having assert_call_* and assert_await_*. ---------- nosy: +asvetlov, mariocj89, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:53:19 2019 From: report at bugs.python.org (Mark Shannon) Date: Thu, 12 Sep 2019 12:53:19 +0000 Subject: [issue38135] Depth first search in compile.c creates wrong BB order for certain CFG. In-Reply-To: <1568287180.55.0.964846639884.issue38135@roundup.psfhosted.org> Message-ID: <1568292799.97.0.752575547806.issue38135@roundup.psfhosted.org> Change by Mark Shannon : ---------- keywords: +patch pull_requests: +15664 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16042 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:54:51 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Sep 2019 12:54:51 +0000 Subject: [issue37935] Improve performance of pathlib.scandir() In-Reply-To: <1566628301.14.0.386871182456.issue37935@roundup.psfhosted.org> Message-ID: <1568292891.34.0.199260878011.issue37935@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset f9dc2ad89032201427ed5f08061c703794627ad9 by Gregory P. Smith (Serhiy Storchaka) in branch 'master': bpo-37935: Added tests for os.walk(), glob.iglob() and Path.glob() (GH-15956) https://github.com/python/cpython/commit/f9dc2ad89032201427ed5f08061c703794627ad9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:54:59 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 12:54:59 +0000 Subject: [issue37935] Improve performance of pathlib.scandir() In-Reply-To: <1566628301.14.0.386871182456.issue37935@roundup.psfhosted.org> Message-ID: <1568292899.69.0.379994082594.issue37935@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15665 pull_request: https://github.com/python/cpython/pull/16043 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:55:25 2019 From: report at bugs.python.org (Thomas Wouters) Date: Thu, 12 Sep 2019 12:55:25 +0000 Subject: [issue38115] Invalid bytecode offsets in co_lnotab In-Reply-To: <1568212070.98.0.977590744203.issue38115@roundup.psfhosted.org> Message-ID: <1568292925.42.0.0225742597397.issue38115@roundup.psfhosted.org> Thomas Wouters added the comment: As mentioned in the PR (GH-15970), I don't think we should fix this bug. We can, but it involves replacing PyCode_Optimize() (which is public but undocumented, with confusing refcount effects) with a stub, and very careful surgery on the code of the peephole optimizer. I tried three different ways and I keep running into unexpected side-effects of my changes, because of how the optimizer is called by the compiler. It is the case that other changes in 3.8 make this bug more apparent, but it's always been around (at least since lnotab was introduced). At this point I think the best thing to do is to document that lnotab can have invalid bytecode offsets, and then reconsider serious refactoring and redesign of the peephole optimizer if it's going to be kept around in 3.9. (Right now there's talk about replacing it with a more sensible CFG-based optimizer.) ---------- keywords: -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:55:32 2019 From: report at bugs.python.org (Christian Heimes) Date: Thu, 12 Sep 2019 12:55:32 +0000 Subject: [issue9216] FIPS support for hashlib In-Reply-To: <1278721335.16.0.522410247151.issue9216@psf.upfronthosting.co.za> Message-ID: <1568292932.03.0.0112107529504.issue9216@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +15666 pull_request: https://github.com/python/cpython/pull/16044 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:59:05 2019 From: report at bugs.python.org (Julien Palard) Date: Thu, 12 Sep 2019 12:59:05 +0000 Subject: [issue35325] imp.find_module() return value documentation discrepancy In-Reply-To: <1543303624.81.0.788709270274.issue35325@psf.upfronthosting.co.za> Message-ID: <1568293145.79.0.0684428601282.issue35325@roundup.psfhosted.org> Change by Julien Palard : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 08:59:53 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 12:59:53 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568293193.19.0.763290102274.issue36373@roundup.psfhosted.org> miss-islington added the comment: New changeset 345bfc990f5f3e873774051d43136b06bfed82cb by Miss Islington (bot) in branch '3.8': bpo-36373: Deprecate explicit loop in task and subprocess API (GH-16033) https://github.com/python/cpython/commit/345bfc990f5f3e873774051d43136b06bfed82cb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 09:03:53 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 12 Sep 2019 13:03:53 +0000 Subject: [issue38132] Simplify hashlib implementation In-Reply-To: <1568285042.8.0.241070384019.issue38132@roundup.psfhosted.org> Message-ID: <1568293433.71.0.777138075332.issue38132@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 67b90a079c39066aa9d51690fe5678c36ccbc258 by St?phane Wirtel (Miss Islington (bot)) in branch '3.8': bpo-38132: Simplify _hashopenssl code (GH-16023) (#16040) https://github.com/python/cpython/commit/67b90a079c39066aa9d51690fe5678c36ccbc258 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 09:06:38 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 12 Sep 2019 13:06:38 +0000 Subject: [issue35620] asyncio test failure on appveyor In-Reply-To: <1546199237.74.0.757790156934.issue35620@roundup.psfhosted.org> Message-ID: <1568293597.97.0.0937928813795.issue35620@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: asyncio tests are stable now and I couldn't find related reports. I guess it's fixed in one of the commits and also AppVeyor is not used anymore. I guess this can be closed as outdated. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 09:07:29 2019 From: report at bugs.python.org (Tahia K) Date: Thu, 12 Sep 2019 13:07:29 +0000 Subject: [issue23019] pyexpat.errors wrongly bound to message strings instead of message codes In-Reply-To: <1418111127.16.0.333870475533.issue23019@psf.upfronthosting.co.za> Message-ID: <1568293649.8.0.719832395348.issue23019@roundup.psfhosted.org> Tahia K added the comment: Hi guys, Is this issue still free to pick up? ---------- nosy: +ta1hia _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 09:10:26 2019 From: report at bugs.python.org (Julien Palard) Date: Thu, 12 Sep 2019 13:10:26 +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: <1568293826.4.0.804385737254.issue13474@roundup.psfhosted.org> Change by Julien Palard : ---------- pull_requests: +15667 pull_request: https://github.com/python/cpython/pull/16045 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 09:13:04 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 13:13:04 +0000 Subject: [issue37363] Additional PEP578 hooks In-Reply-To: <1561131749.05.0.996884755083.issue37363@roundup.psfhosted.org> Message-ID: <1568293984.88.0.133714796875.issue37363@roundup.psfhosted.org> miss-islington added the comment: New changeset ed4b3216e59df4806e5ef63b3357fc577a9443d7 by Miss Islington (bot) (Christian Heimes) in branch 'master': bpo-37363: Document internal audit events (GH-14663) https://github.com/python/cpython/commit/ed4b3216e59df4806e5ef63b3357fc577a9443d7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 09:13:16 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 13:13:16 +0000 Subject: [issue37363] Additional PEP578 hooks In-Reply-To: <1561131749.05.0.996884755083.issue37363@roundup.psfhosted.org> Message-ID: <1568293996.26.0.81175250937.issue37363@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15668 pull_request: https://github.com/python/cpython/pull/16046 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 09:14:43 2019 From: report at bugs.python.org (Michael Foord) Date: Thu, 12 Sep 2019 13:14:43 +0000 Subject: [issue38136] Remove AsyncMock.assert_awaited_* In-Reply-To: <1568292020.39.0.826451235958.issue38136@roundup.psfhosted.org> Message-ID: <1568294083.92.0.62815295748.issue38136@roundup.psfhosted.org> Michael Foord added the comment: I'm particularly concerned that we have call_count "sane" for AsyncMock and avoid adding "await_count" if possible. I think we've decided on that. I'm more agnostic on the assert_await* methods. I agree they're a nice API. I don't mind those staying but I also don't mind them going. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 09:20:28 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 13:20:28 +0000 Subject: [issue37363] Additional PEP578 hooks In-Reply-To: <1561131749.05.0.996884755083.issue37363@roundup.psfhosted.org> Message-ID: <1568294428.98.0.123468520471.issue37363@roundup.psfhosted.org> miss-islington added the comment: New changeset 2f01cf61874aa42eeb9999e49d51d4881792d9c4 by Miss Islington (bot) in branch '3.8': bpo-37363: Document internal audit events (GH-14663) https://github.com/python/cpython/commit/2f01cf61874aa42eeb9999e49d51d4881792d9c4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 09:21:38 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 12 Sep 2019 13:21:38 +0000 Subject: [issue37363] Additional PEP578 hooks In-Reply-To: <1561131749.05.0.996884755083.issue37363@roundup.psfhosted.org> Message-ID: <1568294498.45.0.311819336816.issue37363@roundup.psfhosted.org> St?phane Wirtel added the comment: @Christian, I have merged your PR for the audit events, but I have not closed this issue, I suppose there will be other PRs for this issue. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 09:24:05 2019 From: report at bugs.python.org (Kirill Smelkov) Date: Thu, 12 Sep 2019 13:24:05 +0000 Subject: [issue38106] Race in PyThread_release_lock - can lead to memory corruption and deadlock In-Reply-To: <1568200653.3.0.865964137512.issue38106@roundup.psfhosted.org> Message-ID: <1568294645.5.0.0604365833272.issue38106@roundup.psfhosted.org> Change by Kirill Smelkov : ---------- keywords: +patch pull_requests: +15669 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16047 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 09:25:09 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 12 Sep 2019 13:25:09 +0000 Subject: [issue37480] add ptpython to list of alternate interpreters In-Reply-To: <1562036636.74.0.198372246702.issue37480@roundup.psfhosted.org> Message-ID: <1568294709.93.0.827915893611.issue37480@roundup.psfhosted.org> St?phane Wirtel added the comment: In this case, maybe you could change the name of the PR and of this issue. Thank you ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 09:26:45 2019 From: report at bugs.python.org (Kirill Smelkov) Date: Thu, 12 Sep 2019 13:26:45 +0000 Subject: [issue38106] Race in PyThread_release_lock - can lead to memory corruption and deadlock In-Reply-To: <1568200653.3.0.865964137512.issue38106@roundup.psfhosted.org> Message-ID: <1568294805.85.0.0872499468444.issue38106@roundup.psfhosted.org> Kirill Smelkov added the comment: Ok, I did https://github.com/python/cpython/pull/16047. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 09:27:20 2019 From: report at bugs.python.org (Petr Viktorin) Date: Thu, 12 Sep 2019 13:27:20 +0000 Subject: [issue37879] Segfaults in C heap type subclasses In-Reply-To: <1566074851.0.0.451710928537.issue37879@roundup.psfhosted.org> Message-ID: <1568294840.47.0.797215031468.issue37879@roundup.psfhosted.org> Change by Petr Viktorin : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 09:30:51 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 12 Sep 2019 13:30:51 +0000 Subject: [issue38132] Simplify hashlib implementation In-Reply-To: <1568285042.8.0.241070384019.issue38132@roundup.psfhosted.org> Message-ID: <1568295051.04.0.259014390156.issue38132@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 8c74574e0aaf1a00719fbc9acbdc27a3923520aa by St?phane Wirtel (Christian Heimes) in branch 'master': bpo-38132: Check EVP_DigestUpdate for error (GH-16041) https://github.com/python/cpython/commit/8c74574e0aaf1a00719fbc9acbdc27a3923520aa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 09:31:00 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 13:31:00 +0000 Subject: [issue38132] Simplify hashlib implementation In-Reply-To: <1568285042.8.0.241070384019.issue38132@roundup.psfhosted.org> Message-ID: <1568295060.3.0.780522208813.issue38132@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15670 pull_request: https://github.com/python/cpython/pull/16048 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 09:36:09 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 12 Sep 2019 13:36:09 +0000 Subject: [issue38137] hashopenssl fails to compile on MacOS Message-ID: <1568295369.63.0.535075391802.issue38137@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : I get this when compiling CPython master Users/pgalindo3/github/cpython/Modules/_hashopenssl.c:89:19: error: implicit declaration of function 'EVP_MD_CTX_new' is invalid in C99 [-Werror,-Wimplicit-function-declaration] retval->ctx = EVP_MD_CTX_new(); ^ /Users/pgalindo3/github/cpython/Modules/_hashopenssl.c:89:19: warning: this function declaration is not a prototype [-Wstrict-prototypes] /Users/pgalindo3/github/cpython/Modules/_hashopenssl.c:89:17: warning: incompatible integer to pointer conversion assigning to 'EVP_MD_CTX *' (aka 'struct env_md_ctx_st *') from 'int' [-Wint-conversion] retval->ctx = EVP_MD_CTX_new(); ^ ~~~~~~~~~~~~~~~~ /Users/pgalindo3/github/cpython/Modules/_hashopenssl.c:126:5: error: implicit declaration of function 'EVP_MD_CTX_free' is invalid in C99 [-Werror,-Wimplicit-function-declaration] EVP_MD_CTX_free(self->ctx); ^ /Users/pgalindo3/github/cpython/Modules/_hashopenssl.c:126:5: note: did you mean 'EVP_MD_CTX_create'? /usr/local/opt/openssl/include/openssl/evp.h:588:13: note: 'EVP_MD_CTX_create' declared here EVP_MD_CTX *EVP_MD_CTX_create(void); ^ /Users/pgalindo3/github/cpython/Modules/_hashopenssl.c:126:5: warning: this function declaration is not a prototype [-Wstrict-prototypes] EVP_MD_CTX_free(self->ctx); ^ /Users/pgalindo3/github/cpython/Modules/_hashopenssl.c:179:16: error: implicit declaration of function 'EVP_MD_CTX_new' is invalid in C99 [-Werror,-Wimplicit-function-declaration] temp_ctx = EVP_MD_CTX_new(); ^ /Users/pgalindo3/github/cpython/Modules/_hashopenssl.c:179:14: warning: incompatible integer to pointer conversion assigning to 'EVP_MD_CTX *' (aka 'struct env_md_ctx_st *') from 'int' [-Wint-conversion] temp_ctx = EVP_MD_CTX_new(); ^ ~~~~~~~~~~~~~~~~ /Users/pgalindo3/github/cpython/Modules/_hashopenssl.c:195:5: error: implicit declaration of function 'EVP_MD_CTX_free' is invalid in C99 [-Werror,-Wimplicit-function-declaration] EVP_MD_CTX_free(temp_ctx); ^ /Users/pgalindo3/github/cpython/Modules/_hashopenssl.c:213:16: error: implicit declaration of function 'EVP_MD_CTX_new' is invalid in C99 [-Werror,-Wimplicit-function-declaration] temp_ctx = EVP_MD_CTX_new(); ^ /Users/pgalindo3/github/cpython/Modules/_hashopenssl.c:213:14: warning: incompatible integer to pointer conversion assigning to 'EVP_MD_CTX *' (aka 'struct env_md_ctx_st *') from 'int' [-Wint-conversion] temp_ctx = EVP_MD_CTX_new(); ^ ~~~~~~~~~~~~~~~~ /Users/pgalindo3/github/cpython/Modules/_hashopenssl.c:229:5: error: implicit declaration of function 'EVP_MD_CTX_free' is invalid in C99 [-Werror,-Wimplicit-function-declaration] EVP_MD_CTX_free(temp_ctx); ? openssl version LibreSSL 2.6.5 ---------- components: Build messages: 352161 nosy: christian.heimes, pablogsal priority: normal severity: normal status: open title: hashopenssl fails to compile on MacOS versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 09:37:39 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 12 Sep 2019 13:37:39 +0000 Subject: [issue38138] test_importleak is leaking references Message-ID: <1568295459.95.0.00413440178424.issue38138@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : ? ./python.exe -m test test_importlib -R 3:3 Run tests sequentially 0:00:00 load avg: 1.45 [1/1] test_importlib beginning 6 repetitions 123456 ...... test_importlib leaked [20, 20, 20] references, sum=60 test_importlib failed == Tests result: FAILURE == 1 test failed: test_importlib Total duration: 23 sec 179 m ---------- components: Tests messages: 352162 nosy: brett.cannon, pablogsal priority: normal severity: normal status: open title: test_importleak is leaking references versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 09:42:29 2019 From: report at bugs.python.org (Christian Heimes) Date: Thu, 12 Sep 2019 13:42:29 +0000 Subject: [issue37630] Investigate replacing SHA3 code with OpenSSL In-Reply-To: <1563535856.49.0.726904541971.issue37630@roundup.psfhosted.org> Message-ID: <1568295749.15.0.70611771158.issue37630@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +15671 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16049 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 09:44:35 2019 From: report at bugs.python.org (Julien Palard) Date: Thu, 12 Sep 2019 13:44:35 +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: <1568295875.0.0.273117619732.issue13474@roundup.psfhosted.org> Change by Julien Palard : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 09:47:00 2019 From: report at bugs.python.org (Thomas Wouters) Date: Thu, 12 Sep 2019 13:47:00 +0000 Subject: [issue38135] Depth first search in compile.c creates wrong BB order for certain CFG. In-Reply-To: <1568287180.55.0.964846639884.issue38135@roundup.psfhosted.org> Message-ID: <1568296020.34.0.998475780735.issue38135@roundup.psfhosted.org> Change by Thomas Wouters : ---------- pull_requests: +15672 pull_request: https://github.com/python/cpython/pull/16050 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 09:48:05 2019 From: report at bugs.python.org (Yixing Jiang) Date: Thu, 12 Sep 2019 13:48:05 +0000 Subject: [issue38139] [BUG] datetime.strptime could not handle timezone Message-ID: <1568296085.75.0.40792729081.issue38139@roundup.psfhosted.org> New submission from Yixing Jiang : datetime.datetime.strptime throws out an error for me, to reproduce, use the following block: ``` >>> import datetime >>> import pytz >>> d2 = datetime.datetime(2019, 9, 11, 18, 35, 17, 334000, tzinfo=pytz.timezone('CET')) >>> d2.strftime('%Y%m%d%H%M%S%f%Z') '20190911183517334000CET' >>> datetime.datetime.strptime('20190911183517334000CET', '%Y%m%d%H%M%S%f%Z') Traceback (most recent call last): File "", line 1, in File "/opt/conda/envs/lab42/lib/python3.6/_strptime.py", line 565, in _strptime_datetime tt, fraction = _strptime(data_string, format) File "/opt/conda/envs/lab42/lib/python3.6/_strptime.py", line 362, in _strptime (data_string, format)) ValueError: time data '20190911183517334000CET' does not match format '%Y%m%d%H%M%S%f%Z' >>> datetime.datetime.strptime('20190911183517334000', '%Y%m%d%H%M%S%f') datetime.datetime(2019, 9, 11, 18, 35, 17, 334000) ``` so strptime could only handle the format without %Z. ---------- components: Library (Lib) messages: 352163 nosy: Yixing Jiang priority: normal severity: normal status: open title: [BUG] datetime.strptime could not handle timezone type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 09:48:59 2019 From: report at bugs.python.org (Julien Palard) Date: Thu, 12 Sep 2019 13:48:59 +0000 Subject: [issue36270] DOC: Add link to sys.exc_info for "Reference Manual" In-Reply-To: <1552400076.95.0.491371003303.issue36270@roundup.psfhosted.org> Message-ID: <1568296139.27.0.495024887976.issue36270@roundup.psfhosted.org> Change by Julien Palard : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 09:50:49 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 13:50:49 +0000 Subject: [issue38132] Simplify hashlib implementation In-Reply-To: <1568285042.8.0.241070384019.issue38132@roundup.psfhosted.org> Message-ID: <1568296249.86.0.659127768309.issue38132@roundup.psfhosted.org> miss-islington added the comment: New changeset 0d7cb5bb291d8645824581ae570a394e3d221e5e by Miss Islington (bot) in branch '3.8': bpo-38132: Check EVP_DigestUpdate for error (GH-16041) https://github.com/python/cpython/commit/0d7cb5bb291d8645824581ae570a394e3d221e5e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:00:12 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 12 Sep 2019 14:00:12 +0000 Subject: [issue38138] test_importleak is leaking references In-Reply-To: <1568295459.95.0.00413440178424.issue38138@roundup.psfhosted.org> Message-ID: <1568296812.36.0.368529730278.issue38138@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Bisecting points to commit 5b172c27f760dc5437e37dd8f1540eb76440e9a7 Author: Dino Viehland Date: Wed Sep 11 08:47:17 2019 -0700 bpo-38113: Update Python/ast.c to PEP-384 (GH-15975) Removes statics for better subinterpreter support and moves to _PyType_Name https://bugs.python.org/issue38113 Automerge-Triggered-By: @tiran ---------- nosy: +christian.heimes, dino.viehland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:03:02 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 12 Sep 2019 14:03:02 +0000 Subject: [issue38138] test_importleak is leaking references In-Reply-To: <1568295459.95.0.00413440178424.issue38138@roundup.psfhosted.org> Message-ID: <1568296982.04.0.427016607296.issue38138@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Using test.bisect_cmd gets me to below test case test_importlib leaked [1, 1, 1] references, sum=3 test_importlib failed == Tests result: FAILURE == 1 test failed: test_importlib Total duration: 3 sec 582 ms Tests result: FAILURE ran 1 tests/2 exit 2 Tests failed: continuing with this subtest Tests (1): * test.test_importlib.source.test_source_encoding.Source_EncodingTestPEP451.test_default_encoding Bisection completed in 17 iterations and 0:01:51 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:04:20 2019 From: report at bugs.python.org (Dino Viehland) Date: Thu, 12 Sep 2019 14:04:20 +0000 Subject: [issue38140] Py_tp_dictoffset / Py_tp_finalize are unsettable in stable API Message-ID: <1568297060.68.0.400472303762.issue38140@roundup.psfhosted.org> New submission from Dino Viehland : This makes it impossible to port certain types to the stable ABI and remove statics from the interpreter. ---------- assignee: dino.viehland components: Interpreter Core messages: 352167 nosy: dino.viehland, eric.snow priority: normal severity: normal status: open title: Py_tp_dictoffset / Py_tp_finalize are unsettable in stable API versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:04:31 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 12 Sep 2019 14:04:31 +0000 Subject: [issue38139] [BUG] datetime.strptime could not handle timezone In-Reply-To: <1568296085.75.0.40792729081.issue38139@roundup.psfhosted.org> Message-ID: <1568297071.67.0.203867178166.issue38139@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +belopolsky, p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:04:34 2019 From: report at bugs.python.org (Lisa Roach) Date: Thu, 12 Sep 2019 14:04:34 +0000 Subject: [issue38136] Remove AsyncMock.assert_awaited_* In-Reply-To: <1568292020.39.0.826451235958.issue38136@roundup.psfhosted.org> Message-ID: <1568297074.48.0.423650643303.issue38136@roundup.psfhosted.org> Lisa Roach added the comment: Going to try to recap an in-person conversation: There are some cases where calls are made separate from when they are awaited, for example: >>> call = foo() >>> await call This would be 1 call and 1 await: Call List Await List --------- ---------- [foo] [call] Calls like: >>> await foo() Should also be counted as 1 call and 1 await, there is no difference between this call and the call above (expect for slight differences in when the lists are updated): Call List Await List --------- ---------- [foo] [call] If someone were to do this: >>>call_1 = foo() >>>call_2 = foo() >>> await call_1 >>> await foo(x) We should see 2 calls added to the call list, then 1 await added to the await list, then 1 call added to the call list and 1 await added to the await list. We would end up with 3 calls and 2 awaits. Call List Await List --------- ---------- [foo, foo, foo] [call_1, foo] And a call without an await: >>> call = foo() Call List Await List --------- ---------- [foo] [] With a setup like this, we would keep the API the same (leaving in the assert_await*). There is some risk that users will incorrectly be using assert_call* when they really want to test awaits, but we can try to make to docs as clear as possible around this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:05:29 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 12 Sep 2019 14:05:29 +0000 Subject: [issue38139] [BUG] datetime.strptime could not handle timezone In-Reply-To: <1568296085.75.0.40792729081.issue38139@roundup.psfhosted.org> Message-ID: <1568297129.2.0.533111902762.issue38139@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:05:36 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Sep 2019 14:05:36 +0000 Subject: [issue38135] Depth first search in compile.c creates wrong BB order for certain CFG. In-Reply-To: <1568287180.55.0.964846639884.issue38135@roundup.psfhosted.org> Message-ID: <1568297136.33.0.704609848144.issue38135@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 99b54d68172ad64ba3d0fdc0137f0df88c28ea2b by Gregory P. Smith (T. Wouters) in branch 'master': Revert "Fix depth-first-search computation in compile.c (GH-16042)" (GH-16050) https://github.com/python/cpython/commit/99b54d68172ad64ba3d0fdc0137f0df88c28ea2b ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:07:08 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Sep 2019 14:07:08 +0000 Subject: [issue36991] zipfile: AttributeError on extract In-Reply-To: <1558441602.37.0.911226270551.issue36991@roundup.psfhosted.org> Message-ID: <1568297228.59.0.791224514645.issue36991@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- assignee: -> gregory.p.smith nosy: +gregory.p.smith versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:10:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Sep 2019 14:10:51 +0000 Subject: [issue38118] Valgrind warnings when running tokenize.py In-Reply-To: <1568215737.14.0.192001407155.issue38118@roundup.psfhosted.org> Message-ID: <1568297451.75.0.921053562496.issue38118@roundup.psfhosted.org> STINNER Victor added the comment: ==30746== Conditional jump or move depends on uninitialised value(s) ==30746== at 0x4DC8FF: PyState_AddModule (pystate.c:707) Oh, this issue looks like a duplicate of bpo-38124 which has just been fixed by: New changeset 39de95b746c990e6a2fe9af5fad01747f58b2e5f by Benjamin Peterson in branch 'master': closes bpo-38124: Fix bounds check in PyState_AddModule. (GH-16007) https://github.com/python/cpython/commit/39de95b746c990e6a2fe9af5fad01747f58b2e5f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:11:46 2019 From: report at bugs.python.org (Julien Palard) Date: Thu, 12 Sep 2019 14:11:46 +0000 Subject: [issue33459] Fix "tuple display" mention in Expressions In-Reply-To: <1525994212.08.0.682650639539.issue33459@psf.upfronthosting.co.za> Message-ID: <1568297506.81.0.38914367907.issue33459@roundup.psfhosted.org> Change by Julien Palard : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:12:11 2019 From: report at bugs.python.org (Christian Heimes) Date: Thu, 12 Sep 2019 14:12:11 +0000 Subject: [issue38134] Remove copy of fast PBKDF2 algorithm In-Reply-To: <1568286817.02.0.48627400928.issue38134@roundup.psfhosted.org> Message-ID: <1568297531.55.0.543287915395.issue38134@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +15673 pull_request: https://github.com/python/cpython/pull/16051 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:13:18 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Sep 2019 14:13:18 +0000 Subject: [issue33312] ubsan undefined behavior sanitizer flags struct _dictkeysobject (PyDictKeysObj) In-Reply-To: <1524088779.29.0.682650639539.issue33312@psf.upfronthosting.co.za> Message-ID: <1568297598.04.0.01337514738.issue33312@roundup.psfhosted.org> Gregory P. Smith added the comment: automated backport of the gdb/libpython change fails on 3.6, if this is needed there (I haven't looked into the code on that branch), it's a tiny change to apply. i'll leave that to the 3.6 RM to decide if at all. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:13:33 2019 From: report at bugs.python.org (Dino Viehland) Date: Thu, 12 Sep 2019 14:13:33 +0000 Subject: [issue38138] test_importleak is leaking references In-Reply-To: <1568295459.95.0.00413440178424.issue38138@roundup.psfhosted.org> Message-ID: <1568297613.92.0.137487416963.issue38138@roundup.psfhosted.org> Change by Dino Viehland : ---------- assignee: -> dino.viehland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:13:47 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Sep 2019 14:13:47 +0000 Subject: [issue36991] zipfile: AttributeError on extract In-Reply-To: <1558441602.37.0.911226270551.issue36991@roundup.psfhosted.org> Message-ID: <1568297627.45.0.234208468555.issue36991@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 2f1b857562b0f1601c9019db74c29b7d7e21ac9f by Gregory P. Smith (Berker Peksag) in branch 'master': bpo-36991: Fix incorrect exception escaping ZipFile.extract() (GH-13632) https://github.com/python/cpython/commit/2f1b857562b0f1601c9019db74c29b7d7e21ac9f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:13:56 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 14:13:56 +0000 Subject: [issue36991] zipfile: AttributeError on extract In-Reply-To: <1558441602.37.0.911226270551.issue36991@roundup.psfhosted.org> Message-ID: <1568297636.4.0.274352681659.issue36991@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch pull_requests: +15674 pull_request: https://github.com/python/cpython/pull/16052 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:14:48 2019 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 12 Sep 2019 14:14:48 +0000 Subject: [issue22377] %Z in strptime doesn't match EST and others In-Reply-To: <1410301455.57.0.912701656833.issue22377@psf.upfronthosting.co.za> Message-ID: <1568297688.34.0.890690126434.issue22377@roundup.psfhosted.org> Change by Paul Ganssle : ---------- stage: -> needs patch versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:16:00 2019 From: report at bugs.python.org (Christian Heimes) Date: Thu, 12 Sep 2019 14:16:00 +0000 Subject: [issue38137] hashopenssl fails to compile on MacOS In-Reply-To: <1568295369.63.0.535075391802.issue38137@roundup.psfhosted.org> Message-ID: <1568297760.21.0.595437324844.issue38137@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +15675 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16051 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:16:22 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 12 Sep 2019 14:16:22 +0000 Subject: [issue38139] [BUG] datetime.strptime could not handle timezone In-Reply-To: <1568296085.75.0.40792729081.issue38139@roundup.psfhosted.org> Message-ID: <1568297782.44.0.596981850416.issue38139@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This seems to be same as issue22377 where UTC, GMT and value time.tzname in the machine are the supported values. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:18:36 2019 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 12 Sep 2019 14:18:36 +0000 Subject: [issue38139] [BUG] datetime.strptime could not handle timezone In-Reply-To: <1568296085.75.0.40792729081.issue38139@roundup.psfhosted.org> Message-ID: <1568297916.65.0.134755711282.issue38139@roundup.psfhosted.org> Paul Ganssle added the comment: Hi Yixing, thank you for your bug report. This issue has already been reported, and the discussion is in issue #22377. In the short term I believe the solution will be to document the current behavior. In the long term there are some solutions, though I imagine none of them will be amazingly satisfying, because the output of %Z is basically freeform and doesn't necessarily match to an unambiguous offset. The best you'd be able to do would be %Z%z or %z%Z, but there will be many implementation challenges there. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> %Z in strptime doesn't match EST and others _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:19:26 2019 From: report at bugs.python.org (Dino Viehland) Date: Thu, 12 Sep 2019 14:19:26 +0000 Subject: [issue38138] test_importleak is leaking references In-Reply-To: <1568295459.95.0.00413440178424.issue38138@roundup.psfhosted.org> Message-ID: <1568297966.76.0.512941578518.issue38138@roundup.psfhosted.org> Change by Dino Viehland : ---------- keywords: +patch pull_requests: +15676 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16053 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:19:58 2019 From: report at bugs.python.org (Julian Berman) Date: Thu, 12 Sep 2019 14:19:58 +0000 Subject: [issue37941] python -m and runpy.run_module set different __name__ by default In-Reply-To: <1568243011.89.0.742903731038.issue37941@roundup.psfhosted.org> Message-ID: Julian Berman added the comment: That all makes sense, I understand that in the general case you can't really promise someone that if you mutate global state in-process that the runpy module has any way of preventing that. Except IMO, the module gives exactly the impression you're saying is bad (that you want to use it if you need to do what -m does from Python, assuming you are OK with the constraints there). And then runpy.run_module is a footgun, because it does not in fact do what -m does, so it's hard to imagine the kind of person who *does* want to use runpy -- it's basically "try it on your specific -m, and possibly it works, and then possibly it will continue to work" (to be slightly but hopefully not overwhelmingly facetious). Quoting the docs for it themselves: See also The -m option offering equivalent functionality from the command line. >From an external developer's perspective, if some other thing would be necessary tomorrow that would only be for -m, could one rely on it being added to any or all of the functions in the runpy module? That sounds unclear if there isn't a function that represents what -m does and promises to stay that way. It seems to me that either exposing a public API that promises to be -m as much as possible (which means at least if an end-user knows they're just as "clean" as the process that -m will run, you're probably good), or otherwise deprecating the functions in here entirely as public, and just making them all private, would be improvements to being able to understand if someone wants to use this module or not, but I do appreciate you explaining how things got here. -J On Wed, Sep 11, 2019 at 7:03 PM Nick Coghlan wrote: > > Nick Coghlan added the comment: > > There is one, it just isn't public: runpy._run_module_as_main. > > It's a private API that the -m switch implementation calls, and was > introduced after the original runpy.run_module was found not to offer > everything the switch needed. > > It isn't possible to fully emulate -m from Python code though, as the > lifecycle of the real main module is intertwined with the lifecycle of the > underlying interpreter. > > So if folks really want to try to do this, the source code is there to > look at, but we're not giving the false impression that it's easy to do > correctly with no unintended consequences. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:20:41 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Sep 2019 14:20:41 +0000 Subject: [issue21872] LZMA library sometimes fails to decompress a file In-Reply-To: <1403720935.87.0.990494824612.issue21872@psf.upfronthosting.co.za> Message-ID: <1568298041.72.0.982443316779.issue21872@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 4ffd05d7ec47cfd0d7fc95dce851633be9663255 by Gregory P. Smith (animalize) in branch 'master': bpo-21872: fix lzma library decompresses data incompletely (GH-14048) https://github.com/python/cpython/commit/4ffd05d7ec47cfd0d7fc95dce851633be9663255 ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:20:51 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 14:20:51 +0000 Subject: [issue21872] LZMA library sometimes fails to decompress a file In-Reply-To: <1403720935.87.0.990494824612.issue21872@psf.upfronthosting.co.za> Message-ID: <1568298051.27.0.732838092808.issue21872@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15677 pull_request: https://github.com/python/cpython/pull/16054 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:20:56 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 12 Sep 2019 14:20:56 +0000 Subject: [issue38051] time.strftime handling %z/%Z badly In-Reply-To: <1567877409.54.0.490954987769.issue38051@roundup.psfhosted.org> Message-ID: <1568298056.27.0.373834272008.issue38051@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +belopolsky, p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:21:01 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 14:21:01 +0000 Subject: [issue21872] LZMA library sometimes fails to decompress a file In-Reply-To: <1403720935.87.0.990494824612.issue21872@psf.upfronthosting.co.za> Message-ID: <1568298061.12.0.142166484666.issue21872@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15678 pull_request: https://github.com/python/cpython/pull/16055 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:21:56 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 12 Sep 2019 14:21:56 +0000 Subject: [issue35620] asyncio test failure on appveyor In-Reply-To: <1546199237.74.0.757790156934.issue35620@roundup.psfhosted.org> Message-ID: <1568298116.57.0.0277581519052.issue35620@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:22:26 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 12 Sep 2019 14:22:26 +0000 Subject: [issue36373] Deprecate explicit loop parameter in all public asyncio APIs In-Reply-To: <1553025335.55.0.640410639085.issue36373@roundup.psfhosted.org> Message-ID: <1568298146.98.0.473995066225.issue36373@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:22:37 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 14:22:37 +0000 Subject: [issue36960] Make datetime docs more user-friendly In-Reply-To: <1558210678.84.0.258939294256.issue36960@roundup.psfhosted.org> Message-ID: <1568298157.82.0.416644477675.issue36960@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15679 pull_request: https://github.com/python/cpython/pull/16056 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:33:30 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 14:33:30 +0000 Subject: [issue38137] hashopenssl fails to compile on MacOS In-Reply-To: <1568295369.63.0.535075391802.issue38137@roundup.psfhosted.org> Message-ID: <1568298810.06.0.384345170905.issue38137@roundup.psfhosted.org> miss-islington added the comment: New changeset 9a4963b932a087b78596cca0b8394ac898faa490 by Miss Islington (bot) (Christian Heimes) in branch 'master': bpo-38137: Re-add OpenSSL 1.0.2 compat (GH-16051) https://github.com/python/cpython/commit/9a4963b932a087b78596cca0b8394ac898faa490 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:33:56 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 14:33:56 +0000 Subject: [issue36991] zipfile: AttributeError on extract In-Reply-To: <1558441602.37.0.911226270551.issue36991@roundup.psfhosted.org> Message-ID: <1568298836.87.0.14282897147.issue36991@roundup.psfhosted.org> miss-islington added the comment: New changeset 717cc61ed103684b8c73e0e8af10ace345f39f16 by Miss Islington (bot) in branch '3.8': bpo-36991: Fix incorrect exception escaping ZipFile.extract() (GH-13632) https://github.com/python/cpython/commit/717cc61ed103684b8c73e0e8af10ace345f39f16 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:34:45 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 12 Sep 2019 14:34:45 +0000 Subject: [issue37141] Allow multiple separators in Stream.readuntil In-Reply-To: <1559554350.7.0.981137522594.issue37141@roundup.psfhosted.org> Message-ID: <1568298885.17.0.37326459885.issue37141@roundup.psfhosted.org> Andrew Svetlov added the comment: please do ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:37:39 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 14:37:39 +0000 Subject: [issue36960] Make datetime docs more user-friendly In-Reply-To: <1558210678.84.0.258939294256.issue36960@roundup.psfhosted.org> Message-ID: <1568299059.47.0.614193044794.issue36960@roundup.psfhosted.org> miss-islington added the comment: New changeset 8976359c598f56825648f4e5397b78c5d14ea13c by Miss Islington (bot) in branch '3.8': Overhaul datetime documentation (GH-13410) https://github.com/python/cpython/commit/8976359c598f56825648f4e5397b78c5d14ea13c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:38:12 2019 From: report at bugs.python.org (Petr Viktorin) Date: Thu, 12 Sep 2019 14:38:12 +0000 Subject: [issue37090] test_gdb's test_pycfunction should test all calling conventions In-Reply-To: <1559165915.61.0.362997663954.issue37090@roundup.psfhosted.org> Message-ID: <1568299092.03.0.417989230234.issue37090@roundup.psfhosted.org> Petr Viktorin added the comment: Fixed here and in https://bugs.python.org/issue37499 ( https://github.com/python/cpython/pull/15776 ) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:38:11 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 12 Sep 2019 14:38:11 +0000 Subject: [issue38137] hashopenssl fails to compile on MacOS In-Reply-To: <1568295369.63.0.535075391802.issue38137@roundup.psfhosted.org> Message-ID: <1568299091.91.0.925177938407.issue38137@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- pull_requests: +15680 pull_request: https://github.com/python/cpython/pull/16057 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:38:17 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 14:38:17 +0000 Subject: [issue38138] test_importleak is leaking references In-Reply-To: <1568295459.95.0.00413440178424.issue38138@roundup.psfhosted.org> Message-ID: <1568299097.23.0.717333605536.issue38138@roundup.psfhosted.org> miss-islington added the comment: New changeset 8d88e8c662a80c186c7a0e67f1c1f3d4010276f8 by Miss Islington (bot) (Dino Viehland) in branch 'master': bpo-38138: Fix memory leak introduced by interned strings (GH-16053) https://github.com/python/cpython/commit/8d88e8c662a80c186c7a0e67f1c1f3d4010276f8 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:40:06 2019 From: report at bugs.python.org (Petr Viktorin) Date: Thu, 12 Sep 2019 14:40:06 +0000 Subject: [issue37012] Possible crash due to PyType_FromSpecWithBases() In-Reply-To: <1558533850.59.0.459054292807.issue37012@roundup.psfhosted.org> Message-ID: <1568299206.31.0.02738122797.issue37012@roundup.psfhosted.org> Change by Petr Viktorin : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:41:00 2019 From: report at bugs.python.org (Eric Snow) Date: Thu, 12 Sep 2019 14:41:00 +0000 Subject: [issue36876] Global C variables are a problem. In-Reply-To: <1557514902.13.0.853517754348.issue36876@roundup.psfhosted.org> Message-ID: <1568299260.11.0.678189941761.issue36876@roundup.psfhosted.org> Change by Eric Snow : ---------- pull_requests: +15681 pull_request: https://github.com/python/cpython/pull/16058 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:41:14 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 14:41:14 +0000 Subject: [issue21872] LZMA library sometimes fails to decompress a file In-Reply-To: <1403720935.87.0.990494824612.issue21872@psf.upfronthosting.co.za> Message-ID: <1568299274.55.0.0263645682139.issue21872@roundup.psfhosted.org> miss-islington added the comment: New changeset 824407f76e211a2a19c94d5cb1f39fc422ab62ee by Miss Islington (bot) in branch '3.8': bpo-21872: fix lzma library decompresses data incompletely (GH-14048) https://github.com/python/cpython/commit/824407f76e211a2a19c94d5cb1f39fc422ab62ee ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:41:17 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Sep 2019 14:41:17 +0000 Subject: [issue37802] micro-optimization of PyLong_FromSize_t() In-Reply-To: <1565357260.71.0.37857302813.issue37802@roundup.psfhosted.org> Message-ID: <1568299277.85.0.788223901045.issue37802@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset c6734ee7c55add5fdc2c821729ed5f67e237a096 by Gregory P. Smith (Sergey Fedoseev) in branch 'master': bpo-37802: Slightly improve perfomance of PyLong_FromUnsigned*() (GH-15192) https://github.com/python/cpython/commit/c6734ee7c55add5fdc2c821729ed5f67e237a096 ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:41:33 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 14:41:33 +0000 Subject: [issue21872] LZMA library sometimes fails to decompress a file In-Reply-To: <1403720935.87.0.990494824612.issue21872@psf.upfronthosting.co.za> Message-ID: <1568299293.07.0.0667068791593.issue21872@roundup.psfhosted.org> miss-islington added the comment: New changeset a3c53a1b45b05bcb69660eac5a271443b37ecc42 by Miss Islington (bot) in branch '3.7': bpo-21872: fix lzma library decompresses data incompletely (GH-14048) https://github.com/python/cpython/commit/a3c53a1b45b05bcb69660eac5a271443b37ecc42 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:41:40 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 12 Sep 2019 14:41:40 +0000 Subject: [issue38138] test_importleak is leaking references In-Reply-To: <1568295459.95.0.00413440178424.issue38138@roundup.psfhosted.org> Message-ID: <1568299300.84.0.113307206652.issue38138@roundup.psfhosted.org> St?phane Wirtel added the comment: I close the issue, I have tested with 3.8, there is no leaks with test_importlib, nice ;-) Thanks Dino ---------- nosy: +matrixise resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:42:39 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Sep 2019 14:42:39 +0000 Subject: [issue37802] micro-optimization of PyLong_FromSize_t() In-Reply-To: <1565357260.71.0.37857302813.issue37802@roundup.psfhosted.org> Message-ID: <1568299359.85.0.321252823588.issue37802@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- resolution: -> fixed stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:43:33 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 12 Sep 2019 14:43:33 +0000 Subject: [issue38118] Valgrind warnings when running tokenize.py In-Reply-To: <1568215737.14.0.192001407155.issue38118@roundup.psfhosted.org> Message-ID: <1568299413.61.0.825249175321.issue38118@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> off-by-one error in PyState_AddModule _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:43:43 2019 From: report at bugs.python.org (Petr Viktorin) Date: Thu, 12 Sep 2019 14:43:43 +0000 Subject: [issue16690] Reference leak with custom tp_dealloc in PyType_FromSpec In-Reply-To: <1355535565.73.0.312355807055.issue16690@psf.upfronthosting.co.za> Message-ID: <1568299423.61.0.00134627211795.issue16690@roundup.psfhosted.org> Petr Viktorin added the comment: This is fixed in Python 3.5+. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:43:57 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 14:43:57 +0000 Subject: [issue37488] Document the "gotcha" behaviors in utcnow() and utcfromtimestamp() In-Reply-To: <1562083298.89.0.799843667155.issue37488@roundup.psfhosted.org> Message-ID: <1568299437.73.0.148172862868.issue37488@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15682 pull_request: https://github.com/python/cpython/pull/16059 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:48:33 2019 From: report at bugs.python.org (Lisa Roach) Date: Thu, 12 Sep 2019 14:48:33 +0000 Subject: [issue38108] Everything in Mock should inherit from Base In-Reply-To: <1568208270.51.0.869895956527.issue38108@roundup.psfhosted.org> Message-ID: <1568299713.39.0.262239588619.issue38108@roundup.psfhosted.org> Change by Lisa Roach : ---------- keywords: +patch pull_requests: +15683 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16060 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:48:49 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 12 Sep 2019 14:48:49 +0000 Subject: [issue38138] test_importlib is leaking references In-Reply-To: <1568295459.95.0.00413440178424.issue38138@roundup.psfhosted.org> Message-ID: <1568299729.42.0.42029636643.issue38138@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- title: test_importleak is leaking references -> test_importlib is leaking references _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:52:47 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 12 Sep 2019 14:52:47 +0000 Subject: [issue38013] AsyncGenerator breaks when not iterated fully with RuntimeError("can't send non-None value to a just-started coroutine") In-Reply-To: <1567469623.0.0.944759957345.issue38013@roundup.psfhosted.org> Message-ID: <1568299967.75.0.78075617916.issue38013@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +15684 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16061 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:54:59 2019 From: report at bugs.python.org (Ned Deily) Date: Thu, 12 Sep 2019 14:54:59 +0000 Subject: [issue33312] ubsan undefined behavior sanitizer flags struct _dictkeysobject (PyDictKeysObj) In-Reply-To: <1524088779.29.0.682650639539.issue33312@psf.upfronthosting.co.za> Message-ID: <1568300099.92.0.567744442701.issue33312@roundup.psfhosted.org> Ned Deily added the comment: This issue does not seem to me to be a security issue so would not meet the criteria for backporting to 3.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:55:51 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 14:55:51 +0000 Subject: [issue37488] Document the "gotcha" behaviors in utcnow() and utcfromtimestamp() In-Reply-To: <1562083298.89.0.799843667155.issue37488@roundup.psfhosted.org> Message-ID: <1568300151.21.0.827864190896.issue37488@roundup.psfhosted.org> miss-islington added the comment: New changeset 307c5fe9428b175ff3871a1fdc19bdd7562cfee5 by Miss Islington (bot) in branch '3.8': bpo-37488 : Document a warning for datetime.utcnow() and utcfromtimestamp() (GH-15773) https://github.com/python/cpython/commit/307c5fe9428b175ff3871a1fdc19bdd7562cfee5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:56:30 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Sep 2019 14:56:30 +0000 Subject: [issue38096] Clean up the "struct sequence" / "named tuple" docs In-Reply-To: <1568153124.61.0.864461609465.issue38096@roundup.psfhosted.org> Message-ID: <1568300190.84.0.900402655751.issue38096@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 4210ad5ebd5769f585035e022876e161cd0e9a3e by Raymond Hettinger in branch 'master': bpo-38096: Complete the "structseq" and "named tuple" cleanup (GH-16010) https://github.com/python/cpython/commit/4210ad5ebd5769f585035e022876e161cd0e9a3e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:56:39 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 14:56:39 +0000 Subject: [issue38096] Clean up the "struct sequence" / "named tuple" docs In-Reply-To: <1568153124.61.0.864461609465.issue38096@roundup.psfhosted.org> Message-ID: <1568300199.03.0.953504006538.issue38096@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15685 pull_request: https://github.com/python/cpython/pull/16062 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:56:45 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 14:56:45 +0000 Subject: [issue38096] Clean up the "struct sequence" / "named tuple" docs In-Reply-To: <1568153124.61.0.864461609465.issue38096@roundup.psfhosted.org> Message-ID: <1568300205.34.0.388691208669.issue38096@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15686 pull_request: https://github.com/python/cpython/pull/16063 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:57:06 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 14:57:06 +0000 Subject: [issue38137] hashopenssl fails to compile on MacOS In-Reply-To: <1568295369.63.0.535075391802.issue38137@roundup.psfhosted.org> Message-ID: <1568300226.01.0.767088981677.issue38137@roundup.psfhosted.org> miss-islington added the comment: New changeset 36c29e444d6bc0e31b46509610d3fb7cff74f2c2 by Miss Islington (bot) (St?phane Wirtel) in branch '3.8': [3.8] bpo-38137: Re-add OpenSSL 1.0.2 compat (GH-16051) (GH-16057) https://github.com/python/cpython/commit/36c29e444d6bc0e31b46509610d3fb7cff74f2c2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:59:27 2019 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 12 Sep 2019 14:59:27 +0000 Subject: [issue37488] Document the "gotcha" behaviors in utcnow() and utcfromtimestamp() In-Reply-To: <1562083298.89.0.799843667155.issue37488@roundup.psfhosted.org> Message-ID: <1568300367.11.0.69415110993.issue37488@roundup.psfhosted.org> Paul Ganssle added the comment: Thanks Joannah! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 10:59:42 2019 From: report at bugs.python.org (Eric Snow) Date: Thu, 12 Sep 2019 14:59:42 +0000 Subject: [issue38141] Use less statics in Argument Clinic. Message-ID: <1568300382.39.0.517598151629.issue38141@roundup.psfhosted.org> New submission from Eric Snow : (This is a sub-task of bpo-36876, "Global C variables are a problem.".) Currently Argument Clinic generates "_PyArg_Parser _parser" as a static variable. Dropping "static" solves the problem of thread safety (e.g. for subinterpreters not sharing the GIL). ---------- assignee: eric.snow components: Argument Clinic messages: 352193 nosy: eric.snow, larry priority: normal severity: normal stage: needs patch status: open title: Use less statics in Argument Clinic. versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 11:07:49 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Sep 2019 15:07:49 +0000 Subject: [issue37935] Improve performance of pathlib.scandir() In-Reply-To: <1566628301.14.0.386871182456.issue37935@roundup.psfhosted.org> Message-ID: <1568300869.89.0.76962116836.issue37935@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 98a4a713d001cf2dfb04a9e318e4aea899bc8fbd by Gregory P. Smith (Miss Islington (bot)) in branch '3.8': bpo-37935: Added tests for os.walk(), glob.iglob() and Path.glob() (GH-15956) (GH-16043) https://github.com/python/cpython/commit/98a4a713d001cf2dfb04a9e318e4aea899bc8fbd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 11:08:27 2019 From: report at bugs.python.org (Jonathan Gossage) Date: Thu, 12 Sep 2019 15:08:27 +0000 Subject: [issue38123] Unable to find Python3.8.0b4 on Ubuntu 19004 desktop In-Reply-To: <1568279563.63.0.22084908689.issue38123@roundup.psfhosted.org> Message-ID: Jonathan Gossage added the comment: I now do not think that it is a Python problem. It only appears when Ubuntu 18.04 is upgraded to 19.04 by the upgrade process. The problem does not show up on a fresh install of Ubuntu 19.04 followed by a source install of Python 3.8.0b4 only if the install is preceded by a software upgrade of Ubuntu. On Thu, Sep 12, 2019 at 5:12 AM Zachary Ware wrote: > > Zachary Ware added the comment: > > If calling /usr/local/bin/python3.8 directly works as expected, there's > nothing for us to do here so I'm going to go ahead and close the issue. > Please reopen if you can demonstrate a real bug in the installation code, > though! > > ---------- > nosy: +zach.ware > resolution: -> not a bug > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 11:10:02 2019 From: report at bugs.python.org (Larry Hastings) Date: Thu, 12 Sep 2019 15:10:02 +0000 Subject: [issue38141] Use fewer statics in Argument Clinic. In-Reply-To: <1568300382.39.0.517598151629.issue38141@roundup.psfhosted.org> Message-ID: <1568301002.4.0.970287901853.issue38141@roundup.psfhosted.org> Change by Larry Hastings : ---------- title: Use less statics in Argument Clinic. -> Use fewer statics in Argument Clinic. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 11:14:42 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 12 Sep 2019 15:14:42 +0000 Subject: [issue38121] Synchronize importlib.metadata with importlib_metadata 0.22 In-Reply-To: <1568220082.72.0.518622909571.issue38121@roundup.psfhosted.org> Message-ID: <1568301282.89.0.907977499337.issue38121@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- pull_requests: +15687 pull_request: https://github.com/python/cpython/pull/16064 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 11:17:37 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Sep 2019 15:17:37 +0000 Subject: [issue38096] Clean up the "struct sequence" / "named tuple" docs In-Reply-To: <1568153124.61.0.864461609465.issue38096@roundup.psfhosted.org> Message-ID: <1568301457.19.0.760076600417.issue38096@roundup.psfhosted.org> Raymond Hettinger added the comment: Paul, no worries. Welcome to the team. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 11:20:03 2019 From: report at bugs.python.org (Lisa Roach) Date: Thu, 12 Sep 2019 15:20:03 +0000 Subject: [issue17013] Allow waiting on a mock In-Reply-To: <1358856947.82.0.71016271567.issue17013@psf.upfronthosting.co.za> Message-ID: <1568301603.24.0.601252863187.issue17013@roundup.psfhosted.org> Change by Lisa Roach : ---------- nosy: +lisroach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 11:20:10 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Sep 2019 15:20:10 +0000 Subject: [issue38096] Clean up the "struct sequence" / "named tuple" docs In-Reply-To: <1568153124.61.0.864461609465.issue38096@roundup.psfhosted.org> Message-ID: <1568301610.06.0.0384348534394.issue38096@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset e3c25fc902eedcd5c593fac58f35645961f55bf4 by Raymond Hettinger (Miss Islington (bot)) in branch '3.7': bpo-38096: Complete the "structseq" and "named tuple" cleanup (GH-16010) (GH-16063) https://github.com/python/cpython/commit/e3c25fc902eedcd5c593fac58f35645961f55bf4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 11:20:34 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Sep 2019 15:20:34 +0000 Subject: [issue38096] Clean up the "struct sequence" / "named tuple" docs In-Reply-To: <1568153124.61.0.864461609465.issue38096@roundup.psfhosted.org> Message-ID: <1568301634.33.0.941979604475.issue38096@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset d04c85f5a74e61637ee17e8d4870c6a1d3b07d3e by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-38096: Complete the "structseq" and "named tuple" cleanup (GH-16010) (GH-16062) https://github.com/python/cpython/commit/d04c85f5a74e61637ee17e8d4870c6a1d3b07d3e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 11:24:21 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Sep 2019 15:24:21 +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: <1568301861.73.0.120266843165.issue29988@roundup.psfhosted.org> Gregory P. Smith added the comment: While there is technically still time, it'd take people spending dedicated time on it before the 3.8 release. I won't be. Important? Sure. But not urgent; this bug is not new. We've lived with it for many releases already. I believe it has been around since 2.5 when with statements were introduced. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 11:25:19 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Sep 2019 15:25:19 +0000 Subject: [issue21872] LZMA library sometimes fails to decompress a file In-Reply-To: <1403720935.87.0.990494824612.issue21872@psf.upfronthosting.co.za> Message-ID: <1568301919.62.0.995872518759.issue21872@roundup.psfhosted.org> Gregory P. Smith added the comment: thanks! ---------- resolution: -> fixed stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 11:33:49 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Sep 2019 15:33:49 +0000 Subject: [issue34709] Suggestion: make getpass.getuser() also look at SUDO_USER environment variable In-Reply-To: <1537160258.21.0.956365154283.issue34709@psf.upfronthosting.co.za> Message-ID: <1568302429.88.0.650993008718.issue34709@roundup.psfhosted.org> Gregory P. Smith added the comment: Adding a check for SUDO_USER would break existing uses as it would no longer be reporting the user the process is running as. ---------- assignee: -> gregory.p.smith resolution: -> rejected stage: patch review -> resolved status: open -> closed title: Suggestion: make getuser.getpass() also look at SUDO_USER environment variable -> Suggestion: make getpass.getuser() also look at SUDO_USER environment variable _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 11:34:27 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 12 Sep 2019 15:34:27 +0000 Subject: [issue37908] Add an example of ArgumentParser.exit() In-Reply-To: <1566407493.49.0.869927821626.issue37908@roundup.psfhosted.org> Message-ID: <1568302467.06.0.961984461085.issue37908@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset b1a2abdb06408ffc4f13d6ff50351ad49c99afc0 by St?phane Wirtel (Hai Shi) in branch 'master': bpo-37908: Add an example of ArgumentParser.exit() (GH-15455) https://github.com/python/cpython/commit/b1a2abdb06408ffc4f13d6ff50351ad49c99afc0 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 11:34:36 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 15:34:36 +0000 Subject: [issue37908] Add an example of ArgumentParser.exit() In-Reply-To: <1566407493.49.0.869927821626.issue37908@roundup.psfhosted.org> Message-ID: <1568302476.13.0.157267725058.issue37908@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15688 pull_request: https://github.com/python/cpython/pull/16065 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 11:41:34 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 12 Sep 2019 15:41:34 +0000 Subject: [issue38121] Synchronize importlib.metadata with importlib_metadata 0.22 In-Reply-To: <1568220082.72.0.518622909571.issue38121@roundup.psfhosted.org> Message-ID: <1568302894.54.0.260587222457.issue38121@roundup.psfhosted.org> Jason R. Coombs added the comment: New changeset a0d4aac50b362f4c33594a86e0e299d3f812e7b1 by Jason R. Coombs in branch '3.8': [3.8] bpo-38121: Sync importlib.metadata with 0.22 backport (GH-15993) (GH-16064) https://github.com/python/cpython/commit/a0d4aac50b362f4c33594a86e0e299d3f812e7b1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 11:42:29 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 12 Sep 2019 15:42:29 +0000 Subject: [issue38121] Synchronize importlib.metadata with importlib_metadata 0.22 In-Reply-To: <1568220082.72.0.518622909571.issue38121@roundup.psfhosted.org> Message-ID: <1568302949.51.0.938369943913.issue38121@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 11:43:17 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 15:43:17 +0000 Subject: [issue37908] Add an example of ArgumentParser.exit() In-Reply-To: <1566407493.49.0.869927821626.issue37908@roundup.psfhosted.org> Message-ID: <1568302997.18.0.31678643959.issue37908@roundup.psfhosted.org> miss-islington added the comment: New changeset 6dc3e61c511d3e13ce4eac86c8b6abdff58e3617 by Miss Islington (bot) in branch '3.8': bpo-37908: Add an example of ArgumentParser.exit() (GH-15455) https://github.com/python/cpython/commit/6dc3e61c511d3e13ce4eac86c8b6abdff58e3617 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 11:46:40 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 12 Sep 2019 15:46:40 +0000 Subject: [issue37803] "python -m pdb --help" does not work In-Reply-To: <1565362372.8.0.519393722004.issue37803@roundup.psfhosted.org> Message-ID: <1568303200.25.0.510656661291.issue37803@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 855df7f273c3988c72f01e51ba57091887ec38b2 by Benjamin Peterson (Daniel Hahler) in branch 'master': closes bpo-37803: pdb: fix handling of options (--help / --version) (GH-15193) https://github.com/python/cpython/commit/855df7f273c3988c72f01e51ba57091887ec38b2 ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 11:46:50 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 15:46:50 +0000 Subject: [issue37803] "python -m pdb --help" does not work In-Reply-To: <1565362372.8.0.519393722004.issue37803@roundup.psfhosted.org> Message-ID: <1568303210.37.0.383582455573.issue37803@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15689 pull_request: https://github.com/python/cpython/pull/16066 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 11:46:57 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 15:46:57 +0000 Subject: [issue37803] "python -m pdb --help" does not work In-Reply-To: <1565362372.8.0.519393722004.issue37803@roundup.psfhosted.org> Message-ID: <1568303217.8.0.451321503649.issue37803@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15690 pull_request: https://github.com/python/cpython/pull/16067 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 11:49:14 2019 From: report at bugs.python.org (Tim Peters) Date: Thu, 12 Sep 2019 15:49:14 +0000 Subject: [issue38105] hash collision when hash(x) == -2 causes many calls to __eq__ In-Reply-To: <1568197761.75.0.53300036491.issue38105@roundup.psfhosted.org> Message-ID: <1568303354.27.0.614001580805.issue38105@roundup.psfhosted.org> Tim Peters added the comment: Something that may be slightly worth pursuing: in j = (5*j + 1) % 2**power to get a full-period sequence hitting every integer in range(2**power) exactly once, the multiplier (5) is a bit delicate (it has to be congruent to 1 mod 4), but the addend (1) only needs to be odd. When the hash code has a long string of high-order 1 bits, the lower bits of `perturb` are all ones repeatedly across iterations, and a string of `power` one bits is congruent to -1 mod 2**power, cancelling out the +1. Which people stumbled into here: all negative ints with small absolute value _do_ have a long string of high-order 1 bits (as did also my contrived 2**60 - 2). If we changed the addend to, say, +3 instead, it would still be possible to contrive cases as bad, but you'd be unlikely to stumble into them by accident, and they would be sensitive to the value of `power` (the table's current size). For example, for a table size of 8 (the smallest we use), only ints ending with bits 101 are congruent to -3 mod 8. So maximally "bad" hash codes would be of the form (bits, where "x" is "doesn't matter", and grouped into chunks of PERTURB_SHIFT (5) bits from the right): ... xx101 xx101 ... xx101 xx101 xxxxx Provided changing +1 to +3 didn't slow anything down (you never know until you try!), that would be fine by me. But I'm not bothered by the current behavior, so I won't be pursuing it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 11:56:25 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 12 Sep 2019 15:56:25 +0000 Subject: [issue37908] Add an example of ArgumentParser.exit() In-Reply-To: <1566407493.49.0.869927821626.issue37908@roundup.psfhosted.org> Message-ID: <1568303785.83.0.382071970058.issue37908@roundup.psfhosted.org> St?phane Wirtel added the comment: Thank you ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 11:59:41 2019 From: report at bugs.python.org (Eric Snow) Date: Thu, 12 Sep 2019 15:59:41 +0000 Subject: [issue36876] Global C variables are a problem. In-Reply-To: <1557514902.13.0.853517754348.issue36876@roundup.psfhosted.org> Message-ID: <1568303981.23.0.552743262654.issue36876@roundup.psfhosted.org> Eric Snow added the comment: New changeset 088b63ea7a8331a3e34bc93c3b873c60354b4fad by Eric Snow in branch 'master': bpo-36876: Fix the globals checker tool. (gh-16058) https://github.com/python/cpython/commit/088b63ea7a8331a3e34bc93c3b873c60354b4fad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 12:04:36 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 16:04:36 +0000 Subject: [issue37803] "python -m pdb --help" does not work In-Reply-To: <1565362372.8.0.519393722004.issue37803@roundup.psfhosted.org> Message-ID: <1568304276.96.0.800139576727.issue37803@roundup.psfhosted.org> miss-islington added the comment: New changeset 7da8c0aee2039685f3eff878610684f94f7f7873 by Miss Islington (bot) in branch '3.7': closes bpo-37803: pdb: fix handling of options (--help / --version) (GH-15193) https://github.com/python/cpython/commit/7da8c0aee2039685f3eff878610684f94f7f7873 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 12:05:55 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 16:05:55 +0000 Subject: [issue37803] "python -m pdb --help" does not work In-Reply-To: <1565362372.8.0.519393722004.issue37803@roundup.psfhosted.org> Message-ID: <1568304355.13.0.411808838347.issue37803@roundup.psfhosted.org> miss-islington added the comment: New changeset 21bfff9a5a766acfbdd899687850f563893a0f9e by Miss Islington (bot) in branch '3.8': closes bpo-37803: pdb: fix handling of options (--help / --version) (GH-15193) https://github.com/python/cpython/commit/21bfff9a5a766acfbdd899687850f563893a0f9e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 12:11:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 12 Sep 2019 16:11:12 +0000 Subject: [issue37760] Refactor makeunicodedata.py: dedupe parsing, use dataclass In-Reply-To: <1564977335.6.0.0909548880632.issue37760@roundup.psfhosted.org> Message-ID: <1568304672.15.0.593257743359.issue37760@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 12:15:16 2019 From: report at bugs.python.org (Mario Corchero) Date: Thu, 12 Sep 2019 16:15:16 +0000 Subject: [issue17013] Allow waiting on a mock In-Reply-To: <1358856947.82.0.71016271567.issue17013@psf.upfronthosting.co.za> Message-ID: <1568304916.01.0.43511086352.issue17013@roundup.psfhosted.org> Mario Corchero added the comment: Spoke offline with @xtreak, I'll be sending a PR for this to take over the existing one. @lisroach proposed a new name, EventMock to differentiate it from any awaitable async notation. @michael.foord suggested using `mock_timeout` as the argument. Discussed also to change the naming of the method to `await_until_any_call` to make the semantics similar to the one that `Mock` provides. As `await_until_called_with` might mislead the user that it applies only to the last call. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 12:21:35 2019 From: report at bugs.python.org (Mark Shannon) Date: Thu, 12 Sep 2019 16:21:35 +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: <1568305295.04.0.837093465941.issue29988@roundup.psfhosted.org> Mark Shannon added the comment: I expect to fix this is as part of the general improvements I am making to the bytecode, interpreter and compiler. So it should be fixed for 3.9 but not for 3.8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 12:24:30 2019 From: report at bugs.python.org (Paul) Date: Thu, 12 Sep 2019 16:24:30 +0000 Subject: [issue5396] os.read not handling O_DIRECT flag In-Reply-To: <1235847751.77.0.558509867366.issue5396@psf.upfronthosting.co.za> Message-ID: <1568305470.36.0.459643517128.issue5396@roundup.psfhosted.org> Paul added the comment: Michael, I ran into the same issue as you. I got it to work by changing the mmap size to 8K. d = os.open(disk_file_path, os.O_RDWR | os.O_DIRECT | os.O_SYNC | os.O_DSYNC) readbuf = mmap.mmap(-1, 8192) os.lseek(d, 0, os.SEEK_SET) fo = os.fdopen(d, 'rb') fo.readinto(readbuf) Should work. What's strange is that further multiples of 4K seem to work OK. readbuf = mmap.mmap(-1, 4096 * 3) Also works... So what's going on with 4K? ---------- nosy: +yoyoyopcp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 12:34:14 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 12 Sep 2019 16:34:14 +0000 Subject: [issue38013] AsyncGenerator breaks when not iterated fully with RuntimeError("can't send non-None value to a just-started coroutine") In-Reply-To: <1567469623.0.0.944759957345.issue38013@roundup.psfhosted.org> Message-ID: <1568306054.47.0.96382891977.issue38013@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- pull_requests: +15691 pull_request: https://github.com/python/cpython/pull/16070 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 12:40:03 2019 From: report at bugs.python.org (Christian Heimes) Date: Thu, 12 Sep 2019 16:40:03 +0000 Subject: [issue38142] Make _hashlib extension module PEP-384 compatible Message-ID: <1568306402.98.0.457651944962.issue38142@roundup.psfhosted.org> New submission from Christian Heimes : Updated _hashopenssl.c to be PEP 384 compliant. ---------- assignee: christian.heimes components: Extension Modules messages: 352214 nosy: christian.heimes priority: normal severity: normal status: open title: Make _hashlib extension module PEP-384 compatible type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 12:41:13 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 12 Sep 2019 16:41:13 +0000 Subject: [issue38013] AsyncGenerator breaks when not iterated fully with RuntimeError("can't send non-None value to a just-started coroutine") In-Reply-To: <1567469623.0.0.944759957345.issue38013@roundup.psfhosted.org> Message-ID: <1568306473.27.0.208910937397.issue38013@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 12:43:28 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 12 Sep 2019 16:43:28 +0000 Subject: [issue37455] asyncio.run() error related to finalizing async generators In-Reply-To: <1561938788.3.0.655729732728.issue37455@roundup.psfhosted.org> Message-ID: <1568306608.52.0.693824368926.issue37455@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I think this would be fixed by issue38013. Andrew I feel these are the same issues here and can be closed. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 12:44:31 2019 From: report at bugs.python.org (Christian Heimes) Date: Thu, 12 Sep 2019 16:44:31 +0000 Subject: [issue38142] Make _hashlib extension module PEP-384 compatible In-Reply-To: <1568306402.98.0.457651944962.issue38142@roundup.psfhosted.org> Message-ID: <1568306671.44.0.239790032658.issue38142@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +15692 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16071 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 13:15:47 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Sep 2019 17:15:47 +0000 Subject: [issue36046] support dropping privileges when running subprocesses In-Reply-To: <1550625858.55.0.53498127684.issue36046@roundup.psfhosted.org> Message-ID: <1568308547.23.0.0966714259319.issue36046@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 2b2ead74382513d0bb9ef34504e283a71e6a706f by Gregory P. Smith (Patrick McLean) in branch 'master': bpo-36046: Add user and group parameters to subprocess (GH-11950) https://github.com/python/cpython/commit/2b2ead74382513d0bb9ef34504e283a71e6a706f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 13:16:19 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 12 Sep 2019 17:16:19 +0000 Subject: [issue36046] support dropping privileges when running subprocesses In-Reply-To: <1550625858.55.0.53498127684.issue36046@roundup.psfhosted.org> Message-ID: <1568308579.2.0.894738251841.issue36046@roundup.psfhosted.org> Gregory P. Smith added the comment: I'm curious to see what weird things the various buildbot platforms find for this one. crossing my fingers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 13:16:53 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 12 Sep 2019 17:16:53 +0000 Subject: [issue38133] py.exe cannot locate Store package In-Reply-To: <1568286313.97.0.196410705778.issue38133@roundup.psfhosted.org> Message-ID: <1568308613.25.0.246863231297.issue38133@roundup.psfhosted.org> Steve Dower added the comment: New changeset ed93a8852d120c5a3606720edc723bf5aa6a1fc2 by Steve Dower in branch 'master': bpo-38133: Allow py.exe launcher to locate installations from the Microsoft Store (GH-16025) https://github.com/python/cpython/commit/ed93a8852d120c5a3606720edc723bf5aa6a1fc2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 13:18:42 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 17:18:42 +0000 Subject: [issue38133] py.exe cannot locate Store package In-Reply-To: <1568286313.97.0.196410705778.issue38133@roundup.psfhosted.org> Message-ID: <1568308722.36.0.284501556224.issue38133@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15693 pull_request: https://github.com/python/cpython/pull/16073 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 13:19:24 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 12 Sep 2019 17:19:24 +0000 Subject: [issue38133] py.exe cannot locate Store package In-Reply-To: <1568286313.97.0.196410705778.issue38133@roundup.psfhosted.org> Message-ID: <1568308764.5.0.610631050906.issue38133@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 13:36:09 2019 From: report at bugs.python.org (Trishank Kuppusamy) Date: Thu, 12 Sep 2019 17:36:09 +0000 Subject: [issue37967] Beta GPG signature check failing In-Reply-To: <1566977917.52.0.520116504637.issue37967@roundup.psfhosted.org> Message-ID: <1568309769.09.0.714629631453.issue37967@roundup.psfhosted.org> Trishank Kuppusamy added the comment: The problem with not authoritatively publishing one or more public keys for the Python tarballs is that no one will know for sure which key to trust. If you naively download the public key associated with a malicious tarball, you would trust it w/o realizing that it's malicious (assuming that the tarball developers themselves have not gone rogue). I strongly urge the Python developers to use at least one official GPG key to sign all tarballs, and publish that on its web site (perhaps indirectly using Keybase). ---------- nosy: +Trishank Kuppusamy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 13:36:17 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 12 Sep 2019 17:36:17 +0000 Subject: [issue38133] py.exe cannot locate Store package In-Reply-To: <1568286313.97.0.196410705778.issue38133@roundup.psfhosted.org> Message-ID: <1568309777.77.0.66780002627.issue38133@roundup.psfhosted.org> miss-islington added the comment: New changeset 664d56a52eb5b98ac24b2d0cd4a080ffd49fd93d by Miss Islington (bot) in branch '3.8': bpo-38133: Allow py.exe launcher to locate installations from the Microsoft Store (GH-16025) https://github.com/python/cpython/commit/664d56a52eb5b98ac24b2d0cd4a080ffd49fd93d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 13:40:30 2019 From: report at bugs.python.org (Jon Janzen) Date: Thu, 12 Sep 2019 17:40:30 +0000 Subject: [issue38143] plistlib: cleanup PEP8 violations Message-ID: <1568310030.71.0.660066153188.issue38143@roundup.psfhosted.org> New submission from Jon Janzen : There are a series of PEP8 violations in plistlib. Most of them are spacing issues, a few naming issues, and also some unused function parameters and unused imports that can be done away with. ---------- components: Library (Lib) messages: 352221 nosy: bigfootjon, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: plistlib: cleanup PEP8 violations type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 13:41:04 2019 From: report at bugs.python.org (Jon Janzen) Date: Thu, 12 Sep 2019 17:41:04 +0000 Subject: [issue38143] plistlib: cleanup PEP8 violations In-Reply-To: <1568310030.71.0.660066153188.issue38143@roundup.psfhosted.org> Message-ID: <1568310064.94.0.0759742639966.issue38143@roundup.psfhosted.org> Change by Jon Janzen : ---------- keywords: +patch pull_requests: +15694 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16074 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 13:46:52 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 12 Sep 2019 17:46:52 +0000 Subject: [issue37455] asyncio.run() error related to finalizing async generators In-Reply-To: <1561938788.3.0.655729732728.issue37455@roundup.psfhosted.org> Message-ID: <1568310412.39.0.832624966611.issue37455@roundup.psfhosted.org> Andrew Svetlov added the comment: Yes, please close as a duplicate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 14:31:01 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 12 Sep 2019 18:31:01 +0000 Subject: [issue38144] Add the root_dir and dir_fd parameters in glob.glob() Message-ID: <1568313061.34.0.998675763501.issue38144@roundup.psfhosted.org> New submission from Serhiy Storchaka : The pattern for the glob() function can be relative and absolute. If it is relative, paths are searched from the current directory. If you want to search them in other directory, you need either change the current directory (which affects other parts of your program) or pass a concatenation of the escaped root directory and a pattern: glob.glob(os.path.join(glob.escape(root_dir), pattern)) Most code (even in the stdlib and tools) forget to escape the root directory. It works only until it does not contain metacharacters ('*?['). When you need paths relative to the root directory, you need to "remove" the root_dir prefix from results (using os.path.relpath() at best). The proposed PR adds two new parameters in glob.glob() and glob.iglob(): root_dir and dir_fd. root_dir specifies the root directory for relative pattern. Its effect is the same as chdir before calling glob(). It is similar to the root_dir parameter of shutil.make_archive. For example, you can add py-files in the specified directory to the ZIP archive by: with zipfile.ZipFile(archive, 'w') as zf: for filename in glob.glob('**/*.py', recursive=True, root_dir=root_dir): zf.write(os.path.join(root_dir, filename), arcname=filename) Adding to archive and copying are simpler if you have paths relative to the specified directory. The dir_fd parameter is similar to root_dir, but it specifies the root directory as an open directory descriptor instead of a path (as in many os functions). It adds security (nobody can rename and replace the root directory in process) and performance (because of shorter paths). root_dir and dir_fd can be combined. root_dir is relative to dir_fd and the pattern is relative to root_dir. If root_dir is absolute, dir_fd is ignored. If the pattern is absolute, root_dir and dir_fd are ignored. ---------- components: Library (Lib) messages: 352223 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Add the root_dir and dir_fd parameters in glob.glob() type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 14:32:03 2019 From: report at bugs.python.org (sinoroc) Date: Thu, 12 Sep 2019 18:32:03 +0000 Subject: [issue38145] Fix short option 'd' in 'scommand 'bdist_dumb' Message-ID: <1568313123.54.0.58284352566.issue38145@roundup.psfhosted.org> New submission from sinoroc : In the 'distutils' command 'bdist_dumb', the short option 'd' is used for both the 'bdist-dir' and 'dist-dir' options. The bdist-dir option appeared first on 2000-05-13 in commit: ba0506b The dist-dir option appeared then on 2000-07-05 in commit: c4eb84a There appears to have been no version released between these two commits, so most likely the global behaviour of the command has stayed consistent. The short option d actually triggers the dist-dir option, not the bdist-dir option. It is therefore safe to change the short option for bdist-dir. A choice consistent with other similar distutils commands is 'b'. ---------- components: Distutils messages: 352224 nosy: dstufft, eric.araujo, sinoroc priority: normal pull_requests: 15695 severity: normal status: open title: Fix short option 'd' in 'scommand 'bdist_dumb' versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 14:32:20 2019 From: report at bugs.python.org (sinoroc) Date: Thu, 12 Sep 2019 18:32:20 +0000 Subject: [issue38145] Fix short option 'd' in 'distutils' command 'bdist_dumb' In-Reply-To: <1568313123.54.0.58284352566.issue38145@roundup.psfhosted.org> Message-ID: <1568313140.05.0.137023756628.issue38145@roundup.psfhosted.org> Change by sinoroc : ---------- title: Fix short option 'd' in 'scommand 'bdist_dumb' -> Fix short option 'd' in 'distutils' command 'bdist_dumb' _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 14:35:09 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 12 Sep 2019 18:35:09 +0000 Subject: [issue38144] Add the root_dir and dir_fd parameters in glob.glob() In-Reply-To: <1568313061.34.0.998675763501.issue38144@roundup.psfhosted.org> Message-ID: <1568313309.23.0.97710270702.issue38144@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +15696 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16075 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 15:09:14 2019 From: report at bugs.python.org (Julien Palard) Date: Thu, 12 Sep 2019 19:09:14 +0000 Subject: [issue38143] plistlib: cleanup PEP8 violations In-Reply-To: <1568310030.71.0.660066153188.issue38143@roundup.psfhosted.org> Message-ID: <1568315354.98.0.460420664251.issue38143@roundup.psfhosted.org> Julien Palard added the comment: Hi Jon, thanks for trying to enhance Python. You should start by reading the devguide [1]. We'd like to enhance the style and may or may not do it in the future, but if we do I'll be all in the single conmit, and I bet using black. We do not accept such small changes because they mess with got history (blame mainly). [1]: https://devguide.python.org Excuse my short message, sent from my phone. ---------- nosy: +mdk resolution: -> later stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 15:10:24 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 12 Sep 2019 19:10:24 +0000 Subject: [issue38141] Use fewer statics in Argument Clinic. In-Reply-To: <1568300382.39.0.517598151629.issue38141@roundup.psfhosted.org> Message-ID: <1568315424.53.0.324671995459.issue38141@roundup.psfhosted.org> Serhiy Storchaka added the comment: Dropping "static" will hit performance. _PyArg_Parser is used at first place because it can cache some data between calls. If drop static, you should drop also _PyArg_Parser and return to old slow arguments parsing. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 15:25:44 2019 From: report at bugs.python.org (John Midgett) Date: Thu, 12 Sep 2019 19:25:44 +0000 Subject: [issue38146] QVariant NULL returns anomalous values in equality statements Message-ID: <1568316344.45.0.265967787088.issue38146@roundup.psfhosted.org> New submission from John Midgett : Per PEP 8, equality comparisons to None should use the "is" or "is not" keywords. However, if x is a {QVariant}NULL, the equality statement with the "is" keyword returns FALSE whereas the "==" comparison returns TRUE. Hence where cond = {QVariant}NULL: if cond is None # Returns False if cond == None # Returns True This can cause some unexpected code anomalies (as it did for me) when adjusting code for PEP 8 compliance. ---------- components: Interpreter Core messages: 352227 nosy: John Midgett priority: normal severity: normal status: open title: QVariant NULL returns anomalous values in equality statements type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 15:34:23 2019 From: report at bugs.python.org (Sergey Fedoseev) Date: Thu, 12 Sep 2019 19:34:23 +0000 Subject: [issue38147] add macro for __builtin_unreachable Message-ID: <1568316863.5.0.507617055887.issue38147@roundup.psfhosted.org> New submission from Sergey Fedoseev : GCC (along with Clang and ICC) has __builtin_unreachable() and MSVC has __assume() builtins, that can be used to optimize out unreachable conditions. So we could add macro like this: #ifdef Py_DEBUG # define Py_ASSUME(cond) (assert(cond)) #else # if defined(_MSC_VER) # define Py_ASSUME(cond) (__assume(cond)) # elif defined(__GNUC__) # define Py_ASSUME(cond) (cond? (void)0: __builtin_unreachable()) # else # define Py_ASSUME(cond) ((void)0); # endif #endif Here's a pair of really simple examples showing how it can optimize code: https://godbolt.org/z/g9LYXF. Real world example. _PyLong_Copy() [1] calls _PyLong_New() [2]. _PyLong_New() checks the size, so that overflow does not occur. This check is redundant when _PyLong_New() is called from _PyLong_Copy(). We could add a function that bypass that check, but in LTO build PyObject_MALLOC() is inlined into _PyLong_New() and it also checks the size. Adding Py_ASSUME((size_t)size <= MAX_LONG_DIGITS) allows to bypass both checks. [1] https://github.com/python/cpython/blob/3a4f66707e824ef3a8384827590ebaa6ca463dc0/Objects/longobject.c#L287-L309 [2] https://github.com/python/cpython/blob/3a4f66707e824ef3a8384827590ebaa6ca463dc0/Objects/longobject.c#L264-L283 ---------- messages: 352228 nosy: sir-sigurd priority: normal severity: normal status: open title: add macro for __builtin_unreachable _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 16:14:30 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 12 Sep 2019 20:14:30 +0000 Subject: [issue38096] Clean up the "struct sequence" / "named tuple" docs In-Reply-To: <1568153124.61.0.864461609465.issue38096@roundup.psfhosted.org> Message-ID: <1568319270.81.0.68433484422.issue38096@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 17:35:01 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 12 Sep 2019 21:35:01 +0000 Subject: [issue37455] asyncio.run() error related to finalizing async generators In-Reply-To: <1561938788.3.0.655729732728.issue37455@roundup.psfhosted.org> Message-ID: <1568324101.52.0.686764156075.issue37455@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> AsyncGenerator breaks when not iterated fully with RuntimeError("can't send non-None value to a just-started coroutine") _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 18:23:23 2019 From: report at bugs.python.org (Tim Peters) Date: Thu, 12 Sep 2019 22:23:23 +0000 Subject: [issue38105] hash collision when hash(x) == -2 causes many calls to __eq__ In-Reply-To: <1568197761.75.0.53300036491.issue38105@roundup.psfhosted.org> Message-ID: <1568327003.55.0.246162760027.issue38105@roundup.psfhosted.org> Tim Peters added the comment: A more principled change would be to replace instances of this: i = (i*5 + perturb + 1) & mask; with this: i = (i*5 + (perturb << 1) + 1) & mask; The latter spelling has no fixed points. That's easy to see: `(perturb << 1) + 1` is necessarily odd, and then `i*5 + ODD` is even when `i` is odd, and vice versa. I had hoped that the time for a new shift could overlap with the multiply latency, but no such luck. At least Visual Studio didn't multiply to begin with: it first computes `i*4 + perturb` cheaply with a single LEA instruction, then adds 1 (INC), then adds in `i` again. I expect it would be able to fold in a "free" shifted add of perturb with another LEA, so the latter spelling isn't necessarily more expensive. But I'm generally loathe to increase operation counts relying on clever compilers to exploit processor-specific tricks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 19:06:37 2019 From: report at bugs.python.org (=?utf-8?q?Roberto_C=2E_S=C3=A1nchez?=) Date: Thu, 12 Sep 2019 23:06:37 +0000 Subject: [issue34155] [CVE-2019-16056] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1568329597.53.0.0415249116187.issue34155@roundup.psfhosted.org> Roberto C. S?nchez added the comment: I am working on Debian LTS support. I have submitted a PR that contains the necessary adjustments to implement the fix in 2.7. ---------- nosy: +rcsanchez97 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 20:30:17 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 13 Sep 2019 00:30:17 +0000 Subject: [issue9216] FIPS support for hashlib In-Reply-To: <1278721335.16.0.522410247151.issue9216@psf.upfronthosting.co.za> Message-ID: <1568334617.78.0.00255794171777.issue9216@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 7cad53e6b084435a220e6604010f1fa5778bd0b1 by Gregory P. Smith (Christian Heimes) in branch 'master': bpo-9216: Add usedforsecurity to hashlib constructors (GH-16044) https://github.com/python/cpython/commit/7cad53e6b084435a220e6604010f1fa5778bd0b1 ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 20:47:58 2019 From: report at bugs.python.org (Tim Peters) Date: Fri, 13 Sep 2019 00:47:58 +0000 Subject: [issue38105] hash collision when hash(x) == -2 causes many calls to __eq__ In-Reply-To: <1568197761.75.0.53300036491.issue38105@roundup.psfhosted.org> Message-ID: <1568335678.18.0.0410200191576.issue38105@roundup.psfhosted.org> Tim Peters added the comment: Following up, at least under Visual Studio for x86 "it's free" to change the code to add in `perturb` shifted left. The C source: perturb >>= PERTURB_SHIFT; i = (i*5 + (perturb << 1) + 1) & mask; compiles to this, where I added comments relating the instructions to the source code: lea rax,[r14+r14*4] # rax = i*5 shr r12,5 # r12(perturb) >>= 5 lea r14,[r12*2+1] # r14(i) = (perturb << 1) + 1 add r14,rax # r14(i) += i*5 and r14,rbx # r14(i) &= mask Good job! There are actually fewer machine instructions than C operators. As noted, this change would eliminate the possibility of fixed points from the start, so would eliminate the symptoms in this specific bug report. Which I don't much care about ;-) But I _do_ care about that, in general, the early stages of collision resolution for small tables can "frequently" visit slots more than once. This is true even if the hashes aren't identical. And it would remain true even with the change (cycles can still exist - that there are no fixed points just means there are no more cycles of the minimum possible length 1). Improving that is worth some effort, but not much. In general, hash codes aren't identical, and in small tables redundant slot visits just cost the time to read the hash code from cache and re-deduce that it's not equal to what we're looking for (__eq__ isn't typically called). In larger tables redundant slot visits in the early stages are too rare to care about. In small tables, it's worth something to guarantee that the first probe after a collision can't hit exactly the same slot again (in a random model, there's a 12.5% chance of that happening now in the smallest tables - 12.5% is 1 in 8 - and this bug report contrived cases where the chance is 100% across a dozen iterations). Anyone up a for a world of tedious benchmarking? ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 21:20:06 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 13 Sep 2019 01:20:06 +0000 Subject: [issue36046] support dropping privileges when running subprocesses In-Reply-To: <1550625858.55.0.53498127684.issue36046@roundup.psfhosted.org> Message-ID: <1568337606.16.0.955261859565.issue36046@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks for working on this. Least privilege is an important security consideration. The world will be a better place if we limit harm from bad or broken actors. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 21:22:05 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 13 Sep 2019 01:22:05 +0000 Subject: [issue38128] IDLE undo calls get_saved() when set to None In-Reply-To: <1568260409.36.0.994615457064.issue38128@roundup.psfhosted.org> Message-ID: <1568337725.61.0.271963102859.issue38128@roundup.psfhosted.org> Raymond Hettinger added the comment: Here's one more: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/tkinter/__init__.py", line 1883, in __call__ return self.func(*args) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/multicall.py", line 176, in handler r = l[i](event) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/filelist.py", line 54, in close_all_callback reply = edit.close() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/editor.py", line 1079, in close self._close() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/pyshell.py", line 312, in _close EditorWindow._close(self) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/editor.py", line 1083, in _close if self.io.filename: AttributeError: 'NoneType' object has no attribute 'filename' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 21:57:03 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 13 Sep 2019 01:57:03 +0000 Subject: [issue36046] support dropping privileges when running subprocesses In-Reply-To: <1550625858.55.0.53498127684.issue36046@roundup.psfhosted.org> Message-ID: <1568339823.1.0.247194023067.issue36046@roundup.psfhosted.org> Gregory P. Smith added the comment: The 'Debian root' buildbot exposed a unittest issue to deal with: https://buildbot.python.org/all/#/builders/27/builds/3702/steps/5/logs/stdio ====================================================================== ERROR: test_user (test.test_subprocess.POSIXProcessTestCase) (user=65534) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_subprocess.py", line 1761, in test_user output = subprocess.check_output( File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/subprocess.py", line 419, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/subprocess.py", line 497, in run with Popen(*popenargs, **kwargs) as process: File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/subprocess.py", line 941, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/subprocess.py", line 1797, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) PermissionError: [Errno 13] Permission denied: '/root/buildarea/3.x.angelico-debian-amd64/build/python' ====================================================================== ERROR: test_user (test.test_subprocess.POSIXProcessTestCase) (user='nobody') ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_subprocess.py", line 1761, in test_user output = subprocess.check_output( File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/subprocess.py", line 419, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/subprocess.py", line 497, in run with Popen(*popenargs, **kwargs) as process: File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/subprocess.py", line 941, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/subprocess.py", line 1797, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) PermissionError: [Errno 13] Permission denied: '/root/buildarea/3.x.angelico-debian-amd64/build/python' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 21:58:58 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 13 Sep 2019 01:58:58 +0000 Subject: [issue36046] support dropping privileges when running subprocesses In-Reply-To: <1550625858.55.0.53498127684.issue36046@roundup.psfhosted.org> Message-ID: <1568339938.09.0.564614456345.issue36046@roundup.psfhosted.org> Gregory P. Smith added the comment: and some Fedora and RHEL bots are failing with: ====================================================================== ERROR: test_extra_groups (test.test_subprocess.POSIXProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/test/test_subprocess.py", line 1840, in test_extra_groups output = subprocess.check_output( File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/subprocess.py", line 419, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/subprocess.py", line 497, in run with Popen(*popenargs, **kwargs) as process: File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/subprocess.py", line 889, in __init__ gids.append(grp.getgrnam(extra_group).gr_gid) KeyError: "getgrnam(): name not found: 'nogroup'" ====================================================================== ERROR: test_group (test.test_subprocess.POSIXProcessTestCase) (group='nogroup') ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/test/test_subprocess.py", line 1800, in test_group output = subprocess.check_output( File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/subprocess.py", line 419, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/subprocess.py", line 497, in run with Popen(*popenargs, **kwargs) as process: File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/subprocess.py", line 862, in __init__ gid = grp.getgrnam(group).gr_gid KeyError: "getgrnam(): name not found: 'nogroup'" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 22:01:09 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 13 Sep 2019 02:01:09 +0000 Subject: [issue36046] support dropping privileges when running subprocesses In-Reply-To: <1550625858.55.0.53498127684.issue36046@roundup.psfhosted.org> Message-ID: <1568340069.69.0.968326124973.issue36046@roundup.psfhosted.org> Gregory P. Smith added the comment: AIX has the same error as RHEL and Fedora https://buildbot.python.org/all/#/builders/161/builds/1615/steps/5/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 22:01:22 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 13 Sep 2019 02:01:22 +0000 Subject: [issue36046] support dropping privileges when running subprocesses In-Reply-To: <1550625858.55.0.53498127684.issue36046@roundup.psfhosted.org> Message-ID: <1568340082.17.0.448323097281.issue36046@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 12 23:27:38 2019 From: report at bugs.python.org (Tim Bell) Date: Fri, 13 Sep 2019 03:27:38 +0000 Subject: [issue30701] Exception parsing certain invalid email address headers In-Reply-To: <1497864347.44.0.160991763633.issue30701@psf.upfronthosting.co.za> Message-ID: <1568345258.83.0.76592967141.issue30701@roundup.psfhosted.org> Tim Bell added the comment: This appears to be the same issue as subsequently reported in #34155. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 01:16:29 2019 From: report at bugs.python.org (Eddie Elizondo) Date: Fri, 13 Sep 2019 05:16:29 +0000 Subject: [issue38140] Py_tp_dictoffset / Py_tp_finalize are unsettable in stable API In-Reply-To: <1568297060.68.0.400472303762.issue38140@roundup.psfhosted.org> Message-ID: <1568351789.12.0.45065862865.issue38140@roundup.psfhosted.org> Change by Eddie Elizondo : ---------- keywords: +patch pull_requests: +15697 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16076 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 01:37:34 2019 From: report at bugs.python.org (Christian Heimes) Date: Fri, 13 Sep 2019 05:37:34 +0000 Subject: [issue35810] Object Initialization does not incref Heap-allocated Types In-Reply-To: <1548275752.94.0.463880453345.issue35810@roundup.psfhosted.org> Message-ID: <1568353054.62.0.0587583810391.issue35810@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +15698 pull_request: https://github.com/python/cpython/pull/16071 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 01:50:50 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 13 Sep 2019 05:50:50 +0000 Subject: [issue38107] Replace direct future and task contructor calls with factories in asyncio tests In-Reply-To: <1568204163.99.0.31241530598.issue38107@roundup.psfhosted.org> Message-ID: <1568353850.71.0.921102788447.issue38107@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 01:54:41 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 13 Sep 2019 05:54:41 +0000 Subject: [issue38148] Add slots to asyncio transports Message-ID: <1568354081.06.0.30849196857.issue38148@roundup.psfhosted.org> New submission from Andrew Svetlov : Transports are abstract interfaces. Adding slots allows using slots in transport implementations as well. If the implementation doesn't use slots -- everything keeps working. Slots can help with saving a memory footprint a little. ---------- components: asyncio messages: 352239 nosy: asvetlov, yselivanov priority: normal severity: normal status: open title: Add slots to asyncio transports versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 01:56:31 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 13 Sep 2019 05:56:31 +0000 Subject: [issue38148] Add slots to asyncio transports In-Reply-To: <1568354081.06.0.30849196857.issue38148@roundup.psfhosted.org> Message-ID: <1568354191.23.0.196874089793.issue38148@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +15699 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16077 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 01:57:21 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 13 Sep 2019 05:57:21 +0000 Subject: [issue38148] Add slots to asyncio transports In-Reply-To: <1568354081.06.0.30849196857.issue38148@roundup.psfhosted.org> Message-ID: <1568354241.6.0.815074766688.issue38148@roundup.psfhosted.org> Andrew Svetlov added the comment: Note, slots for protocols are provided by 3.8 already. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 02:03:04 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 13 Sep 2019 06:03:04 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1568354584.98.0.624221554332.issue24416@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 02:25:43 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 13 Sep 2019 06:25:43 +0000 Subject: [issue34805] Explicitly specify `MyClass.__subclasses__()` returns classes in definition order In-Reply-To: <1537942683.07.0.545547206417.issue34805@psf.upfronthosting.co.za> Message-ID: <1568355943.53.0.588985037349.issue34805@roundup.psfhosted.org> Raymond Hettinger added the comment: If there are no objections, I would like to revive this. All we need to do is add a one-line guarantee to the docs and a test to back it up. Except for the aberration on Py3.5, add_subclass() tracks new subclasses in the order created. This behavior is intuitive and potentially useful. Unless there is a compelling reason to switch the underlying container to a set object, no other reasonable implementation choice would upset the current behavior. I think the OP's request was reasonable. For us, guaranteeing the current behavior is not a difficult thing to do. If we don't, the alternative for the user isn't reasonable. They would need to write a new metaclass that does almost exactly what we already do, except that they can guarantee the use of an ordered collection. This seems silly when we already use an ordered collection but haven't made it a promise. ---------- nosy: +rhettinger resolution: wont fix -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 02:26:08 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 13 Sep 2019 06:26:08 +0000 Subject: [issue34805] Explicitly specify `MyClass.__subclasses__()` returns classes in definition order In-Reply-To: <1537942683.07.0.545547206417.issue34805@psf.upfronthosting.co.za> Message-ID: <1568355968.83.0.774168863574.issue34805@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 02:28:48 2019 From: report at bugs.python.org (Eddie Elizondo) Date: Fri, 13 Sep 2019 06:28:48 +0000 Subject: [issue34533] Apply PEP384 to _csv module In-Reply-To: <1535478304.23.0.56676864532.issue34533@psf.upfronthosting.co.za> Message-ID: <1568356128.61.0.141983273657.issue34533@roundup.psfhosted.org> Change by Eddie Elizondo : ---------- pull_requests: +15700 pull_request: https://github.com/python/cpython/pull/16078 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 03:06:51 2019 From: report at bugs.python.org (pmp-p) Date: Fri, 13 Sep 2019 07:06:51 +0000 Subject: [issue35243] readline timeout too long for async gfx use In-Reply-To: <1542182908.62.0.788709270274.issue35243@psf.upfronthosting.co.za> Message-ID: <1568358411.96.0.339177801815.issue35243@roundup.psfhosted.org> Change by pmp-p : ---------- nosy: +twouters -pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 03:26:31 2019 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 13 Sep 2019 07:26:31 +0000 Subject: [issue34805] Explicitly specify `MyClass.__subclasses__()` returns classes in definition order In-Reply-To: <1537942683.07.0.545547206417.issue34805@psf.upfronthosting.co.za> Message-ID: <1568359591.46.0.207073234549.issue34805@roundup.psfhosted.org> Guido van Rossum added the comment: Thank you Raymond. Luna, are you still interested? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 03:35:02 2019 From: report at bugs.python.org (Luna Chen) Date: Fri, 13 Sep 2019 07:35:02 +0000 Subject: [issue34805] Explicitly specify `MyClass.__subclasses__()` returns classes in definition order In-Reply-To: <1537942683.07.0.545547206417.issue34805@psf.upfronthosting.co.za> Message-ID: <1568360102.27.0.536163739196.issue34805@roundup.psfhosted.org> Luna Chen added the comment: Yes I am! :) Should I start looking into this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 03:57:27 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 13 Sep 2019 07:57:27 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1568361447.52.0.0646804509575.issue24416@roundup.psfhosted.org> Serhiy Storchaka added the comment: namedtuple is much faster now that four years ago. New namedtuple type creation, instantiating a namedtuple object, access to its members -- all this is times faster. It is still slower than tuple in some aspects, because tuples are everywere and the interpreter has special optimizations for tuples. But date.isocalendar() is not used in such performance critical code. The size of pickles will grow, the time of pickling and unpickling will increase, and old Python versions will not be able to unpickle a new type by default. But I do not think that instances of this type will be pickled in large numbers so it will has a global effect, and the problem with compatibility can be solved with some hacks. If anybody pickles them at all. It was not clear whether adding a new type will give any benefit in real code. Thanks to Paul for his investigations. The only thing that makes this case unique is that we have two implementations of the datetime module. Therefore we will need either add two implementation of a new named tuple type (which are different in details) or import the Python implementation into the C code. This increases the cost of the implementation and maintaining. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 04:09:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Sep 2019 08:09:02 +0000 Subject: [issue38118] Valgrind warnings when running tokenize.py In-Reply-To: <1568215737.14.0.192001407155.issue38118@roundup.psfhosted.org> Message-ID: <1568362142.7.0.387166212358.issue38118@roundup.psfhosted.org> STINNER Victor added the comment: I reopen the issue, the PyUnicode_Decode warning is not fixed yet. vstinner at apu$ echo|PYTHONMALLOC=malloc valgrind ./python Lib/tokenize.py ==6832== Memcheck, a memory error detector ==6832== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==6832== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info ==6832== Command: ./python Lib/tokenize.py ==6832== ==6832== Conditional jump or move depends on uninitialised value(s) ==6832== at 0x4D87E9: PyUnicode_Decode (unicodeobject.c:3395) ==6832== by 0x4D8E6E: PyUnicode_FromEncodedObject (unicodeobject.c:3268) ==6832== by 0x4D9283: unicode_new (unicodeobject.c:15125) ==6832== by 0x49271B: type_call (typeobject.c:969) ==6832== by 0x440E97: _PyObject_MakeTpCall (call.c:167) ==6832== by 0x42D6D3: _PyObject_Vectorcall (abstract.h:104) ==6832== by 0x42D6D3: call_function (ceval.c:4984) ==6832== by 0x42D6D3: _PyEval_EvalFrameDefault (ceval.c:3496) ==6832== by 0x4216CA: function_code_fastcall (call.c:292) ==6832== by 0x4411B5: _PyObject_FastCallDict (call.c:109) ==6832== by 0x441413: _PyObject_Call_Prepend (call.c:447) ==6832== by 0x497320: slot_tp_init (typeobject.c:6772) ==6832== by 0x492767: type_call (typeobject.c:989) ==6832== by 0x440E97: _PyObject_MakeTpCall (call.c:167) ==6832== 1,0-1,1: NL '\n' 2,0-2,0: ENDMARKER '' ==6832== ==6832== HEAP SUMMARY: ==6832== in use at exit: 1,179,135 bytes in 8,467 blocks ==6832== total heap usage: 93,677 allocs, 85,210 frees, 12,109,969 bytes allocated ==6832== ==6832== LEAK SUMMARY: ==6832== definitely lost: 0 bytes in 0 blocks ==6832== indirectly lost: 0 bytes in 0 blocks ==6832== possibly lost: 454,934 bytes in 1,972 blocks ==6832== still reachable: 724,201 bytes in 6,495 blocks ==6832== suppressed: 0 bytes in 0 blocks ==6832== Rerun with --leak-check=full to see details of leaked memory ==6832== ==6832== Use --track-origins=yes to see where uninitialised values come from ==6832== For lists of detected and suppressed errors, rerun with: -s ==6832== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) ---------- resolution: duplicate -> status: closed -> open superseder: off-by-one error in PyState_AddModule -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 04:32:46 2019 From: report at bugs.python.org (Pierre Quentel) Date: Fri, 13 Sep 2019 08:32:46 +0000 Subject: [issue21705] cgi.py: Multipart with more than one file is misparsed In-Reply-To: <1402401424.17.0.414317354507.issue21705@psf.upfronthosting.co.za> Message-ID: <1568363566.05.0.265998912198.issue21705@roundup.psfhosted.org> Pierre Quentel added the comment: The patch has been applied some time ago (I couldn't find the exact commit), cf. https://github.com/python/cpython/blob/master/Lib/cgi.py#L750 I think we can close the issue. ---------- nosy: +quentel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:03:17 2019 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 13 Sep 2019 09:03:17 +0000 Subject: [issue34805] Explicitly specify `MyClass.__subclasses__()` returns classes in definition order In-Reply-To: <1568360102.27.0.536163739196.issue34805@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: It's just a small doc change right? I'd just makle a PR and see if Raymond accepts it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:07:51 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 13 Sep 2019 09:07:51 +0000 Subject: [issue38149] sys.audit() is called multiple times for glob.glob() Message-ID: <1568365671.05.0.0499818085141.issue38149@roundup.psfhosted.org> New submission from Serhiy Storchaka : sys.audit() for "glob.glob" is called in a recursive function _iglob(). So in process of executing glob.glob() it can be called multiple times, with the original pattern and with patterns for parent directories, while there are metacharacters in them. I do not think it was intentional. ---------- components: Library (Lib) messages: 352248 nosy: serhiy.storchaka, steve.dower priority: normal severity: normal status: open title: sys.audit() is called multiple times for glob.glob() versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:14:49 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 13 Sep 2019 09:14:49 +0000 Subject: [issue38149] sys.audit() is called multiple times for glob.glob() In-Reply-To: <1568365671.05.0.0499818085141.issue38149@roundup.psfhosted.org> Message-ID: <1568366089.62.0.263247741422.issue38149@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:15:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Sep 2019 09:15:22 +0000 Subject: [issue38150] test_capi: test_c_subclass_of_heap_ctype_with_del_modifying_dunder_class_only_decrefs_once() leaks Message-ID: <1568366122.45.0.513132018706.issue38150@roundup.psfhosted.org> New submission from STINNER Victor : vstinner at apu$ ./python -m test test_capi -R 3:3 -m test.test_capi.CAPITest.test_c_subclass_of_heap_ctype_with_del_modifying_dunder_class_only_decrefs_once Run tests sequentially 0:00:00 load avg: 0.57 [1/1] test_capi beginning 6 repetitions 123456 ...... test_capi leaked [2, 2, 2] references, sum=6 test_capi failed == Tests result: FAILURE == 1 test failed: test_capi Total duration: 153 ms Tests result: FAILURE Note: Can't we find a shorter test name please? ---------- components: Tests messages: 352249 nosy: vstinner priority: normal severity: normal status: open title: test_capi: test_c_subclass_of_heap_ctype_with_del_modifying_dunder_class_only_decrefs_once() leaks versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:20:56 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 13 Sep 2019 09:20:56 +0000 Subject: [issue8538] Add FlagAction to argparse In-Reply-To: <1272303487.22.0.380388489779.issue8538@psf.upfronthosting.co.za> Message-ID: <1568366456.89.0.89713848353.issue8538@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- versions: +Python 3.9 -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:22:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Sep 2019 09:22:43 +0000 Subject: [issue38151] test_types: test_duck_gen() leaks reference Message-ID: <1568366563.55.0.281787409342.issue38151@roundup.psfhosted.org> New submission from STINNER Victor : https://buildbot.python.org/all/#/builders/1/builds/712 Python 3.8 is not affected, only the master branch. See also bpo-38150. vstinner at apu$ ./python -m test test_types -R 3:3 -m test.test_types.CoroutineTests.test_duck_gen Run tests sequentially 0:00:00 load avg: 0.89 [1/1] test_types beginning 6 repetitions 123456 ...... test_types leaked [7, 7, 7] references, sum=21 test_types failed == Tests result: FAILURE == 1 test failed: test_types Total duration: 472 ms Tests result: FAILURE ---------- components: Tests messages: 352250 nosy: vstinner priority: normal severity: normal status: open title: test_types: test_duck_gen() leaks reference versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:24:38 2019 From: report at bugs.python.org (Thomas Wouters) Date: Fri, 13 Sep 2019 09:24:38 +0000 Subject: [issue38115] Invalid bytecode offsets in co_lnotab In-Reply-To: <1568212070.98.0.977590744203.issue38115@roundup.psfhosted.org> Message-ID: <1568366678.43.0.114622551589.issue38115@roundup.psfhosted.org> Change by Thomas Wouters : ---------- keywords: +patch pull_requests: +15701 pull_request: https://github.com/python/cpython/pull/16079 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:25:35 2019 From: report at bugs.python.org (Julien Palard) Date: Fri, 13 Sep 2019 09:25:35 +0000 Subject: [issue37785] argparse uses %s in gettext calls causing xgettext warnings In-Reply-To: <1565182156.22.0.512922989842.issue37785@roundup.psfhosted.org> Message-ID: <1568366735.13.0.162204165604.issue37785@roundup.psfhosted.org> Julien Palard added the comment: New changeset 42671aea2db6cbc54369617da0fd3545048e0a45 by Julien Palard (Jakub Kul?k) in branch 'master': bpo-37785: Fix xgettext warning in argparse (GH-15161) https://github.com/python/cpython/commit/42671aea2db6cbc54369617da0fd3545048e0a45 ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:25:56 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 09:25:56 +0000 Subject: [issue37785] argparse uses %s in gettext calls causing xgettext warnings In-Reply-To: <1565182156.22.0.512922989842.issue37785@roundup.psfhosted.org> Message-ID: <1568366756.31.0.924083876601.issue37785@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15702 pull_request: https://github.com/python/cpython/pull/16080 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:26:02 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 09:26:02 +0000 Subject: [issue37785] argparse uses %s in gettext calls causing xgettext warnings In-Reply-To: <1565182156.22.0.512922989842.issue37785@roundup.psfhosted.org> Message-ID: <1568366762.92.0.500121503311.issue37785@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15703 pull_request: https://github.com/python/cpython/pull/16081 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:28:11 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 13 Sep 2019 09:28:11 +0000 Subject: [issue38149] sys.audit() is called multiple times for glob.glob() In-Reply-To: <1568365671.05.0.0499818085141.issue38149@roundup.psfhosted.org> Message-ID: <1568366891.18.0.0480987956024.issue38149@roundup.psfhosted.org> Steve Dower added the comment: Provided it's called with different arguments each time (which it is), there isn't a problem here. Audit hooks are supposed to be informative, not definitive (that is, you almost always need to take the surrounding context into consideration, which is why they are better for logging actions rather than blocking actions). Though it might be unintentional that glob.glob() recursively handles each path segment when it could more efficiently work forward resolving each wildcard segment as it goes. Is that what you mean? ---------- nosy: -xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:28:23 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 13 Sep 2019 09:28:23 +0000 Subject: [issue38149] sys.audit() is called multiple times for glob.glob() In-Reply-To: <1568365671.05.0.0499818085141.issue38149@roundup.psfhosted.org> Message-ID: <1568366903.7.0.744229442679.issue38149@roundup.psfhosted.org> Change by Steve Dower : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:28:25 2019 From: report at bugs.python.org (Christian Heimes) Date: Fri, 13 Sep 2019 09:28:25 +0000 Subject: [issue9216] FIPS support for hashlib In-Reply-To: <1278721335.16.0.522410247151.issue9216@psf.upfronthosting.co.za> Message-ID: <1568366905.35.0.744006241713.issue9216@roundup.psfhosted.org> Christian Heimes added the comment: > FYI the multiprocessing module uses hmac.new(authkey, message, 'md5').digest(). I don't think that using MD5 even for HMAC is allowed in FIPS mode. MD5 us especially not allowed in FIPS mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:28:37 2019 From: report at bugs.python.org (=?utf-8?q?Pekka_Kl=C3=A4rck?=) Date: Fri, 13 Sep 2019 09:28:37 +0000 Subject: [issue34805] Explicitly specify `MyClass.__subclasses__()` returns classes in definition order In-Reply-To: <1537942683.07.0.545547206417.issue34805@psf.upfronthosting.co.za> Message-ID: <1568366917.2.0.0882450034214.issue34805@roundup.psfhosted.org> Pekka Kl?rck added the comment: First of all, thanks Raymond for the revival. Secondly, I agree with Josh that there are better ways to handle my original use case (e.g. `functools.singledispatch`) but `__subclasses__()` preserving the definition order could nevertheless be useful in other cases. The main reason I proposed this issue was to get the behavior documented one way or the other. I'd prefer the current behavior if it doesn't cause any/much extra work nor or later. It's hard for me to see why subclasses weren't stored in a dict in the future, but problem assigning to `__bases__` pointed out by Josh might be worth a though. Not sure is it OK to just consider this kind of side effects OK in such a niche case, should the related code be changed, or is this big enough problem to prevent preserving subclass order in the first place. Anyway, if the decision is to preserve the order, I'd say a test making sure the order is actually preserved would be needed in addition to the doc change. If the decision is to keep the order undefined, then the docs should preferably be updated anyway to make the situation clear. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:28:53 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 13 Sep 2019 09:28:53 +0000 Subject: [issue38115] Invalid bytecode offsets in co_lnotab In-Reply-To: <1568212070.98.0.977590744203.issue38115@roundup.psfhosted.org> Message-ID: <1568366933.37.0.307661825362.issue38115@roundup.psfhosted.org> Serhiy Storchaka added the comment: Since we modify the content of the bytes object in any case, we can shrink it in-place by setting its Py_SIZE(). But it would be better to fill the end of it with "no-op" fillers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:32:52 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 13 Sep 2019 09:32:52 +0000 Subject: [issue37785] argparse uses %s in gettext calls causing xgettext warnings In-Reply-To: <1565182156.22.0.512922989842.issue37785@roundup.psfhosted.org> Message-ID: <1568367172.58.0.00641551627442.issue37785@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is a backward incompatible change. It will break existing translations. It should not be backported. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:35:08 2019 From: report at bugs.python.org (Thomas Wouters) Date: Fri, 13 Sep 2019 09:35:08 +0000 Subject: [issue38115] Invalid bytecode offsets in co_lnotab In-Reply-To: <1568212070.98.0.977590744203.issue38115@roundup.psfhosted.org> Message-ID: <1568367308.43.0.741143832204.issue38115@roundup.psfhosted.org> Thomas Wouters added the comment: Setting Py_SIZE of the bytes object is possible, but gross and not how you're supposed to operate on bytes. I'm also not entirely convinced lnotab isn't reused in ways it shouldn't. The peephole optimizer already does gross things and is tied very intimately into the compiler and assembler structs, and any change I tried caused weird side-effects. I'm not comfortable making these changes without extensive rewrites of those bits of the code, which Mark Shannon is already working on for different reasons. The current lnotab format doesn't really have the concept of 'no-op fillers', because zero-increment entries are used to add to previous entries. Adding the concept could mean breaking third-party consumers of lnotab. Of all the uses of lnotab that I could find, dis.findlinestarts() was the only one that didn't ignore the invalid entries. I think just documenting the current behaviour (which, just as a reminder, has been around forever, but is just more obvious in Python 3.8) and fixing dis.findlinestarts() is enough of a fix for the foreseeable future. See GH-16079. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:37:08 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Sep 2019 09:37:08 +0000 Subject: [issue38152] AST change introduced tons of reference leaks Message-ID: <1568367428.12.0.614565351268.issue38152@roundup.psfhosted.org> New submission from STINNER Victor : The following change introduced tons of reference leaks: commit ac46eb4ad6662cf6d771b20d8963658b2186c48c Author: Dino Viehland Date: Wed Sep 11 10:16:34 2019 -0700 bpo-38113: Update the Python-ast.c generator to PEP384 (gh-15957) Summary: This mostly migrates Python-ast.c to PEP384 and removes all statics from the whole file. This modifies the generator itself that generates the Python-ast.c. It leaves in the usage of _PyObject_LookupAttr even though it's not fully PEP384 compatible (this could always be shimmed in by anyone who needs it). Full list of tests which leaked in build: https://buildbot.python.org/all/#/builders/1/builds/712 test_ast test_asyncio test_builtin test_capi test_check_c_globals test_clinic test_compile test_dataclasses test_dbm test_dbm_dumb test_decimal test_fstring test_getpass test_idle test_importlib test_inspect test_pydoc test_source_encoding test_symtable test_sys test_type_comments test_types test_unittest vstinner at apu$ ./python -m test -j0 -R 3:3 --fromfile=leak (...) test_dbm_dumb leaked [938, 896, 908] references, sum=2742 test_dbm leaked [144, 144, 144] references, sum=432 test_builtin leaked [128, 128, 128] references, sum=384 test_clinic leaked [1935, 1933, 1935] references, sum=5803 test_getpass leaked [21, 21, 21] references, sum=63 test_dataclasses leaked [8, 8, 8] references, sum=24 test_idle leaked [69, 69, 69] references, sum=207 test_inspect leaked [539, 539, 539] references, sum=1617 test_fstring leaked [104, 104, 104] references, sum=312 test_type_comments leaked [1337, 1335, 1337] references, sum=4009 test_types leaked [7, 7, 7] references, sum=21 test_compile leaked [3690, 3688, 3690] references, sum=11068 test_sys leaked [1, 1, 1] references, sum=3 test_pydoc leaked [1504, 1502, 1504] references, sum=4510 test_ast leaked [357792, 357790, 357792] references, sum=1073374 test_ast leaked [12, 11, 12] memory blocks, sum=35 test_unittest leaked [3803, 3801, 3803] references, sum=11407 test_decimal leaked [841, 841, 841] references, sum=2523 test_capi leaked [2, 2, 2] references, sum=6 I interrupted test_asyncio test: it's too slow. Reverting the commit ac46eb4ad6662cf6d771b20d8963658b2186c48c fix most reference leaks, except of test_capi: bpo-38150. ---------- components: Interpreter Core messages: 352258 nosy: vstinner priority: normal severity: normal status: open title: AST change introduced tons of reference leaks versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:37:55 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 13 Sep 2019 09:37:55 +0000 Subject: [issue8538] Add FlagAction to argparse In-Reply-To: <1272303487.22.0.380388489779.issue8538@psf.upfronthosting.co.za> Message-ID: <1568367475.31.0.247979079935.issue8538@roundup.psfhosted.org> St?phane Wirtel added the comment: I am also interested by this feature. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:38:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Sep 2019 09:38:56 +0000 Subject: [issue38151] test_types: test_duck_gen() leaks reference In-Reply-To: <1568366563.55.0.281787409342.issue38151@roundup.psfhosted.org> Message-ID: <1568367536.87.0.370235689648.issue38151@roundup.psfhosted.org> STINNER Victor added the comment: I opened bpo-38152 since much more tests are affected, not only test_types. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> AST change introduced tons of reference leaks _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:41:14 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Sep 2019 09:41:14 +0000 Subject: [issue38113] Remove statics from ast.c In-Reply-To: <1568210711.23.0.951109613555.issue38113@roundup.psfhosted.org> Message-ID: <1568367674.67.0.76312671998.issue38113@roundup.psfhosted.org> STINNER Victor added the comment: This change introduced tons of reference leaks, more than 21 test files leak references: see bpo-38152. Please fix these leaks, or I will have to revert the change: https://pythondev.readthedocs.io/ci.html#revert-on-fail ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:43:23 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 13 Sep 2019 09:43:23 +0000 Subject: [issue37648] Fix minor inconsistency in the order of == operands In-Reply-To: <1563782337.34.0.926786223428.issue37648@roundup.psfhosted.org> Message-ID: <1568367803.22.0.501746227718.issue37648@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Just to add list.__contains__ and others might cause subtle changes as noted. One example is around discussion at https://github.com/python/cpython/pull/14700#discussion_r324054193 where my code to fix mock.ANY was depending on this behavior to work on master and didn't work with 3.8 since it's not backported. mock.ANY depends on the order of operands. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:44:07 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 09:44:07 +0000 Subject: [issue37785] argparse uses %s in gettext calls causing xgettext warnings In-Reply-To: <1565182156.22.0.512922989842.issue37785@roundup.psfhosted.org> Message-ID: <1568367847.41.0.0293077224173.issue37785@roundup.psfhosted.org> miss-islington added the comment: New changeset b50eff65906f8e9b4597cb0128ea1729341346fc by Miss Islington (bot) in branch '3.7': bpo-37785: Fix xgettext warning in argparse (GH-15161) https://github.com/python/cpython/commit/b50eff65906f8e9b4597cb0128ea1729341346fc ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:44:53 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 13 Sep 2019 09:44:53 +0000 Subject: [issue38149] sys.audit() is called multiple times for glob.glob() In-Reply-To: <1568365671.05.0.0499818085141.issue38149@roundup.psfhosted.org> Message-ID: <1568367893.76.0.911816187485.issue38149@roundup.psfhosted.org> Serhiy Storchaka added the comment: Using recursion is rather an implementation detail, because splitpath() splits a path from the end (Path.glob() does it from other side). Also, it may be a tiny bit more efficient if the pattern contains a long literal prefix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:45:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Sep 2019 09:45:07 +0000 Subject: [issue36046] support dropping privileges when running subprocesses In-Reply-To: <1550625858.55.0.53498127684.issue36046@roundup.psfhosted.org> Message-ID: <1568367907.65.0.752879853204.issue36046@roundup.psfhosted.org> STINNER Victor added the comment: The test fails on Fedora: https://buildbot.python.org/all/#/builders/185/builds/1028 vstinner at apu$ ./python -m test test_subprocess -m test_extra_groups -m test_group -v == CPython 3.9.0a0 (heads/master:7cad53e6b0, Sep 13 2019, 11:42:25) [GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] == Linux-5.2.9-200.fc30.x86_64-x86_64-with-glibc2.29 little-endian == cwd: /home/vstinner/python/master/build/test_python_14292 == CPU count: 8 == encodings: locale=UTF-8, FS=utf-8 Run tests sequentially 0:00:00 load avg: 0.38 [1/1] test_subprocess test_extra_groups (test.test_subprocess.POSIXProcessTestCase) ... ERROR test_group (test.test_subprocess.POSIXProcessTestCase) ... ====================================================================== ERROR: test_extra_groups (test.test_subprocess.POSIXProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/vstinner/python/master/Lib/test/test_subprocess.py", line 1840, in test_extra_groups output = subprocess.check_output( File "/home/vstinner/python/master/Lib/subprocess.py", line 419, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/home/vstinner/python/master/Lib/subprocess.py", line 497, in run with Popen(*popenargs, **kwargs) as process: File "/home/vstinner/python/master/Lib/subprocess.py", line 889, in __init__ gids.append(grp.getgrnam(extra_group).gr_gid) KeyError: "getgrnam(): name not found: 'nogroup'" ====================================================================== ERROR: test_group (test.test_subprocess.POSIXProcessTestCase) (group='nogroup') ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/vstinner/python/master/Lib/test/test_subprocess.py", line 1800, in test_group output = subprocess.check_output( File "/home/vstinner/python/master/Lib/subprocess.py", line 419, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/home/vstinner/python/master/Lib/subprocess.py", line 497, in run with Popen(*popenargs, **kwargs) as process: File "/home/vstinner/python/master/Lib/subprocess.py", line 862, in __init__ gid = grp.getgrnam(group).gr_gid KeyError: "getgrnam(): name not found: 'nogroup'" ---------------------------------------------------------------------- Ran 2 tests in 0.046s FAILED (errors=2) test test_subprocess failed test_subprocess failed == Tests result: FAILURE == 1 test failed: test_subprocess Total duration: 175 ms Tests result: FAILURE ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:45:12 2019 From: report at bugs.python.org (Julien Palard) Date: Fri, 13 Sep 2019 09:45:12 +0000 Subject: [issue31040] mimetypes.add_type should complain when you give it an undotted ext In-Reply-To: <1501010741.93.0.952054126016.issue31040@psf.upfronthosting.co.za> Message-ID: <1568367912.81.0.106484128321.issue31040@roundup.psfhosted.org> Julien Palard added the comment: I think we should deprecate calling `add_type` with an empty `ext`, as I don't think it's a feature, more a side effect of the current implementation. But as some may use it like a feature, I asked the current PR to emit a warning, to not break the current implementations. To be able to simplify in the future, why not deprecating empty `ext` so we can remove it in a few versions? ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:45:30 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 09:45:30 +0000 Subject: [issue37785] argparse uses %s in gettext calls causing xgettext warnings In-Reply-To: <1565182156.22.0.512922989842.issue37785@roundup.psfhosted.org> Message-ID: <1568367930.78.0.904799137056.issue37785@roundup.psfhosted.org> miss-islington added the comment: New changeset 8750dfe09eaec24231e19962d17d171c323794ad by Miss Islington (bot) in branch '3.8': bpo-37785: Fix xgettext warning in argparse (GH-15161) https://github.com/python/cpython/commit/8750dfe09eaec24231e19962d17d171c323794ad ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:45:54 2019 From: report at bugs.python.org (Julien Palard) Date: Fri, 13 Sep 2019 09:45:54 +0000 Subject: [issue37785] argparse uses %s in gettext calls causing xgettext warnings In-Reply-To: <1565182156.22.0.512922989842.issue37785@roundup.psfhosted.org> Message-ID: <1568367954.62.0.373097160563.issue37785@roundup.psfhosted.org> Change by Julien Palard : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:46:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Sep 2019 09:46:52 +0000 Subject: [issue36046] support dropping privileges when running subprocesses In-Reply-To: <1550625858.55.0.53498127684.issue36046@roundup.psfhosted.org> Message-ID: <1568368012.38.0.991685498948.issue36046@roundup.psfhosted.org> STINNER Victor added the comment: Failures on Debian: https://buildbot.python.org/all/#/builders/27/builds/3699 ====================================================================== ERROR: test_user (test.test_subprocess.POSIXProcessTestCase) (user=65534) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_subprocess.py", line 1761, in test_user output = subprocess.check_output( File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/subprocess.py", line 419, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/subprocess.py", line 497, in run with Popen(*popenargs, **kwargs) as process: File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/subprocess.py", line 941, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/subprocess.py", line 1797, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) PermissionError: [Errno 13] Permission denied: '/root/buildarea/3.x.angelico-debian-amd64/build/python' ====================================================================== ERROR: test_user (test.test_subprocess.POSIXProcessTestCase) (user='nobody') ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_subprocess.py", line 1761, in test_user output = subprocess.check_output( File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/subprocess.py", line 419, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/subprocess.py", line 497, in run with Popen(*popenargs, **kwargs) as process: File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/subprocess.py", line 941, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/subprocess.py", line 1797, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) PermissionError: [Errno 13] Permission denied: '/root/buildarea/3.x.angelico-debian-amd64/build/python' ---------------------------------------------------------------------- Ran 306 tests in 35.920s FAILED (errors=2, skipped=32) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:48:04 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 13 Sep 2019 09:48:04 +0000 Subject: [issue38149] sys.audit() is called multiple times for glob.glob() In-Reply-To: <1568365671.05.0.0499818085141.issue38149@roundup.psfhosted.org> Message-ID: <1568368084.31.0.365481666215.issue38149@roundup.psfhosted.org> Serhiy Storchaka added the comment: Ah, and when added sys.audit() for glob.glob(), should not it be added for Path.glob() too? And for os.walk()? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:50:32 2019 From: report at bugs.python.org (Christian Heimes) Date: Fri, 13 Sep 2019 09:50:32 +0000 Subject: [issue38153] Normalize hashing algorithm names Message-ID: <1568368232.54.0.0384008471773.issue38153@roundup.psfhosted.org> New submission from Christian Heimes : The hashlib module / PEP 452 and OpenSSL use slightly different conventions for hashing algorithm names. The old and common algorithms like md5 to sha512 use the same strings (all lower case, no dashes or underscores). But new algorithms like sha3_512, shake, sha512_256, and blake2 use different conventions. The inconsistency bloats the list of available algorithms. Also the builtin OpenSSL constructor does not support Python's preferred names. >>> import hashlib, _hashlib >>> sorted(hashlib.algorithms_available) ['blake2b', 'blake2b512', 'blake2s', 'blake2s256', 'md4', 'md5', 'md5-sha1', 'ripemd160', 'sha1', 'sha224', 'sha256', 'sha3-224', 'sha3-256', 'sha3-384', 'sha3-512', 'sha384', 'sha3_224', 'sha3_256', 'sha3_384', 'sha3_512', 'sha512', 'sha512-224', 'sha512-256', 'shake128', 'shake256', 'shake_128', 'shake_256', 'sm3', 'whirlpool'] >>> _hashlib.new("sha3_512") Traceback (most recent call last): File "", line 1, in ValueError: unsupported hash type >>> _hashlib.new("sha3-512") I propose to normalize names to Python standard names for HASH.name, repr, list of available algorithms, and for the new() constructor. ---------- assignee: christian.heimes components: Extension Modules messages: 352270 nosy: christian.heimes, gregory.p.smith priority: normal severity: normal status: open title: Normalize hashing algorithm names type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:50:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Sep 2019 09:50:39 +0000 Subject: [issue38154] test__xxsubinterpreters: random failures on AMD64 FreeBSD CURRENT Shared 3.x Message-ID: <1568368239.98.0.217777678278.issue38154@roundup.psfhosted.org> New submission from STINNER Victor : It seems like test__xxsubinterpreters still has race conditions. See also bpo-37224 and bpo-33356. AMD64 FreeBSD CURRENT Shared 3.x: https://buildbot.python.org/all/#/builders/168/builds/1428 FAIL: test_subinterpreter (test.test__xxsubinterpreters.IsRunningTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test__xxsubinterpreters.py", line 492, in test_subinterpreter self.assertTrue(interpreters.is_running(interp)) AssertionError: False is not true Later, when test__xxsubinterpreters is re-run in verbose mode: FAIL: test_still_running (test.test__xxsubinterpreters.DestroyTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test__xxsubinterpreters.py", line 765, in test_still_running interpreters.destroy(interp) AssertionError: RuntimeError not raised ---------- components: Tests messages: 352271 nosy: eric.snow, vstinner priority: normal severity: normal status: open title: test__xxsubinterpreters: random failures on AMD64 FreeBSD CURRENT Shared 3.x versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:51:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Sep 2019 09:51:01 +0000 Subject: [issue38154] test__xxsubinterpreters: random failures on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1568368239.98.0.217777678278.issue38154@roundup.psfhosted.org> Message-ID: <1568368261.02.0.89120885754.issue38154@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:54:31 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 13 Sep 2019 09:54:31 +0000 Subject: [issue37785] argparse uses %s in gettext calls causing xgettext warnings In-Reply-To: <1565182156.22.0.512922989842.issue37785@roundup.psfhosted.org> Message-ID: <1568368471.85.0.154884918392.issue37785@roundup.psfhosted.org> Serhiy Storchaka added the comment: I think it would be safer to revert changes in maintained versions. At least in 3.7. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:54:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Sep 2019 09:54:35 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568368475.4.0.392787820912.issue37531@roundup.psfhosted.org> STINNER Victor added the comment: https://buildbot.python.org/all/#/builders/58/builds/2987 1:06:55 load avg: 3.39 [343/419/1] test_regrtest crashed (Exit code 1) Timeout (0:35:00)! Thread 0x00000cdc (most recent call first): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 1366 in _readerthread File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 882 in run File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 944 in _bootstrap_inner File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 902 in _bootstrap Thread 0x00000b24 (most recent call first): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 1039 in _wait_for_tstate_lock File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\threading.py", line 1023 in join File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 1395 in _communicate File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 1024 in communicate File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\subprocess.py", line 491 in run File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_regrtest.py", line 504 in run_command File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_regrtest.py", line 529 in run_python File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_regrtest.py", line 680 in run_tests File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_regrtest.py", line 1178 in test_multiprocessing_timeout ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:55:53 2019 From: report at bugs.python.org (Julien Palard) Date: Fri, 13 Sep 2019 09:55:53 +0000 Subject: [issue37785] argparse uses %s in gettext calls causing xgettext warnings In-Reply-To: <1565182156.22.0.512922989842.issue37785@roundup.psfhosted.org> Message-ID: <1568368553.76.0.320840306886.issue37785@roundup.psfhosted.org> Julien Palard added the comment: OK to revert in 3.7, got your point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:59:19 2019 From: report at bugs.python.org (Julien Palard) Date: Fri, 13 Sep 2019 09:59:19 +0000 Subject: [issue37785] argparse uses %s in gettext calls causing xgettext warnings In-Reply-To: <1565182156.22.0.512922989842.issue37785@roundup.psfhosted.org> Message-ID: <1568368759.56.0.770611976679.issue37785@roundup.psfhosted.org> Julien Palard added the comment: Thanks for noticing Serhiy! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 05:59:54 2019 From: report at bugs.python.org (Julien Palard) Date: Fri, 13 Sep 2019 09:59:54 +0000 Subject: [issue37785] argparse uses %s in gettext calls causing xgettext warnings In-Reply-To: <1565182156.22.0.512922989842.issue37785@roundup.psfhosted.org> Message-ID: <1568368794.61.0.627446244236.issue37785@roundup.psfhosted.org> Change by Julien Palard : ---------- pull_requests: +15704 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/16082 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 06:12:31 2019 From: report at bugs.python.org (Thomas Wouters) Date: Fri, 13 Sep 2019 10:12:31 +0000 Subject: [issue38075] Make random module PEP-384 compatible In-Reply-To: <1568044678.81.0.091085634764.issue38075@roundup.psfhosted.org> Message-ID: <1568369551.01.0.179583746529.issue38075@roundup.psfhosted.org> Thomas Wouters added the comment: New changeset 04f0bbfbedf8d2bb69b012f853de6648b1a9f27f by T. Wouters (Dino Viehland) in branch 'master': bpo-38075: Port _randommodule.c to PEP-384 (GH-15798) https://github.com/python/cpython/commit/04f0bbfbedf8d2bb69b012f853de6648b1a9f27f ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 06:17:46 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 13 Sep 2019 10:17:46 +0000 Subject: [issue8538] Add FlagAction to argparse In-Reply-To: <1272303487.22.0.380388489779.issue8538@psf.upfronthosting.co.za> Message-ID: <1568369866.63.0.276872477214.issue8538@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 6a517c674907c195660fa9178a7b561de49cc721 by St?phane Wirtel (R?mi Lapeyre) in branch 'master': bpo-8538: Add support for boolean actions to argparse (GH-11478) https://github.com/python/cpython/commit/6a517c674907c195660fa9178a7b561de49cc721 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 06:19:40 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 13 Sep 2019 10:19:40 +0000 Subject: [issue8538] Add FlagAction to argparse In-Reply-To: <1272303487.22.0.380388489779.issue8538@psf.upfronthosting.co.za> Message-ID: <1568369980.82.0.363939341158.issue8538@roundup.psfhosted.org> St?phane Wirtel added the comment: I have merged the PR 11478 and this feature will be included into 3.9. Thank you for your proposal of Remi and thank you to Eric for the idea of this feature. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 06:20:17 2019 From: report at bugs.python.org (Julien Palard) Date: Fri, 13 Sep 2019 10:20:17 +0000 Subject: [issue37785] argparse uses %s in gettext calls causing xgettext warnings In-Reply-To: <1565182156.22.0.512922989842.issue37785@roundup.psfhosted.org> Message-ID: <1568370017.2.0.750886599265.issue37785@roundup.psfhosted.org> Julien Palard added the comment: New changeset f14fcbf2995b43c8607a1448402633ac558a745f by Julien Palard in branch '3.7': Revert "bpo-37785: Fix xgettext warning in argparse (GH-15161)" (GH-16082) https://github.com/python/cpython/commit/f14fcbf2995b43c8607a1448402633ac558a745f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 06:21:06 2019 From: report at bugs.python.org (Christian Heimes) Date: Fri, 13 Sep 2019 10:21:06 +0000 Subject: [issue38153] Normalize hashing algorithm names In-Reply-To: <1568368232.54.0.0384008471773.issue38153@roundup.psfhosted.org> Message-ID: <1568370066.48.0.696962295436.issue38153@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +15705 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16083 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 06:23:10 2019 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 13 Sep 2019 10:23:10 +0000 Subject: [issue38155] Add __all__ to the datetime module Message-ID: <1568370190.96.0.124167415349.issue38155@roundup.psfhosted.org> New submission from Paul Ganssle : Currently the datetime module has no __all__, which means we only advertise what is public and private based on leading underscores. Additionally, because there are two implementations (Python and C), you actually get different things when you do `from datetime import *` depending on whether you have the C module installed or not. The "easy" part is to add an __all__ variable to Lib/datetime.py for all the documented attributes: __all__ = ["date", "datetime", "time", "timedelta", "timezone", "tzinfo", "MINYEAR", "MAXYEAR"] A "stretch goal" would be to add a test to ensure that `from datetime import *` imports the same set of symbols from the pure python module that it does from the C module. I haven't quite thought through how this would be achieved, probably something in test_datetime (https://github.com/python/cpython/blob/6a517c674907c195660fa9178a7b561de49cc721/Lib/test/test_datetime.py#L1), where we need to import both modules anyway. I think we can accept an "add __all__" PR without tests, though. ---------- components: Library (Lib) keywords: newcomer friendly messages: 352280 nosy: belopolsky, p-ganssle priority: normal severity: normal stage: needs patch status: open title: Add __all__ to the datetime module type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 06:30:40 2019 From: report at bugs.python.org (Julien Palard) Date: Fri, 13 Sep 2019 10:30:40 +0000 Subject: [issue21041] pathlib.PurePath.parents rejects negative indexes In-Reply-To: <1395613011.22.0.29152070109.issue21041@psf.upfronthosting.co.za> Message-ID: <1568370640.98.0.798830331069.issue21041@roundup.psfhosted.org> Julien Palard added the comment: I checked conversation in #7951, tells about an ambiguity because it could be an index from a sequence or a key for a dict, like {-1: "foo"}. Here there is no such confusion. Confusion *may* arrise from the fact that it's not composed of parts, but more like it's already sliced, I mean it does NOT look like: ['/', 'home', 'mdk', 'clones', 'python'] It's more like: ['/home/mdk/clones/python', '/home/mdk/clones', '/home/mdk', '/home', '/'] In fact I'd say it behave more like a function call than a sequence access, I read: pathlib.Path.cwd().parents[1] a bit like: pathlib.Path.cwd().parents(go_down=1) It may explain why negative indices or slices were initially not implemented: It already looks like the result of a slice. ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 06:31:38 2019 From: report at bugs.python.org (Amiy Kumar) Date: Fri, 13 Sep 2019 10:31:38 +0000 Subject: [issue38156] input fucntion raises SystemError after specific input. Message-ID: <1568370698.83.0.595206707223.issue38156@roundup.psfhosted.org> New submission from Amiy Kumar : input function raises a SystemError in bash(similar shells) when given inputs follow a certain pattern, doesn't happen in python interactive shell. It causes crash in python scripts even if KeyboardInterrupt and EOFError are handeled. No EOFError or KeyboardInterrupt error is raised in such cases. Tested with python script: (file input-test.py) and command: python -c 'input()' both yield same result. Inputs are represented as: ^D :- CTRL+d, ^C :- CTRL+c eg: input: sometext^D^D^C Traceback: [182]$ python -c 'input()' sometext^CKeyboardInterrupt The above exception was the direct cause of the following exception: Traceback (most recent call last): File "", line 1, in SystemError: returned a result with an error set ----- inputs: sometext^D^C^C [or even] sometext^Dsome-more^C^C Traceback: [191]$ python input-test.py sometext^C^CKeyboardInterrupt The above exception was the direct cause of the following exception: Traceback (most recent call last): File "input-test.py", line 2, in tmp = input() SystemError: returned a result with an error set Python version: 3.7 Bash version: 5.0.11 ---------- components: IO files: input-test.py messages: 352282 nosy: Amiy Kumar priority: normal severity: normal status: open title: input fucntion raises SystemError after specific input. type: crash versions: Python 3.7 Added file: https://bugs.python.org/file48606/input-test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 06:32:10 2019 From: report at bugs.python.org (Julien Palard) Date: Fri, 13 Sep 2019 10:32:10 +0000 Subject: [issue35498] Parents objects in pathlib.Path don't support slices as __getitem__ arguments In-Reply-To: <1544806517.4.0.788709270274.issue35498@psf.upfronthosting.co.za> Message-ID: <1568370730.55.0.57445154385.issue35498@roundup.psfhosted.org> Julien Palard added the comment: Just commented on the related issue: https://bugs.python.org/issue21041#msg352281 My question is: Why would you need to slice parents? parents already looks like the result of some slice. ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 06:33:59 2019 From: report at bugs.python.org (Julien Palard) Date: Fri, 13 Sep 2019 10:33:59 +0000 Subject: [issue37785] argparse uses %s in gettext calls causing xgettext warnings In-Reply-To: <1565182156.22.0.512922989842.issue37785@roundup.psfhosted.org> Message-ID: <1568370839.35.0.0621235674047.issue37785@roundup.psfhosted.org> Change by Julien Palard : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 06:49:33 2019 From: report at bugs.python.org (sinoroc) Date: Fri, 13 Sep 2019 10:49:33 +0000 Subject: [issue38145] Fix short option 'd' in 'distutils' command 'bdist_dumb' In-Reply-To: <1568313123.54.0.58284352566.issue38145@roundup.psfhosted.org> Message-ID: <1568371773.9.0.744994207167.issue38145@roundup.psfhosted.org> Change by sinoroc : ---------- keywords: +patch pull_requests: +15706 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16086 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 06:52:41 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 10:52:41 +0000 Subject: [issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream In-Reply-To: <1557598514.53.0.379470651864.issue36889@roundup.psfhosted.org> Message-ID: <1568371961.32.0.663749116528.issue36889@roundup.psfhosted.org> miss-islington added the comment: New changeset d31b31516c71890e8735606aec1dbf2bfb8fd6be by Miss Islington (bot) (Xtreak) in branch 'master': bpo-36889: Document Stream class and add docstrings (GH-14488) https://github.com/python/cpython/commit/d31b31516c71890e8735606aec1dbf2bfb8fd6be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 06:54:43 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 13 Sep 2019 10:54:43 +0000 Subject: [issue38157] Add a recipe in unittest.mock examples about mock_open per file Message-ID: <1568372083.76.0.737420692229.issue38157@roundup.psfhosted.org> New submission from Karthikeyan Singaravelan : With issue37669 it was proposed to refactor out the mock_open handler to return different mocks per file and an API change to make sure read_data accepts a dictionary of file and return values it can only land on master if accepter. It's already possible now with using side_effect to return per file content. Adding it would be a good example like below so that users can know this usage. I can prepare a PR for this. from unittest.mock import mock_open, patch DEFAULT_MOCK_DATA = "default mock data" data_dict = {"file1": "data1", "file2": "data2"} def open_side_effect(name): return mock_open(read_data=data_dict.get(name, DEFAULT_MOCK_DATA))() with patch(f"{__name__}.open", side_effect=open_side_effect): with open("file1") as file1: assert file1.read() == "data1" with open("file2") as file2: assert file2.read() == "data2" with open("file1") as file3: assert file3.read(1) == "d" assert file1.read() == "" with open("defaultfile") as file4: assert file4.read() == "default mock data" ---------- assignee: docs at python components: Documentation messages: 352285 nosy: cjw296, docs at python, lisroach, mariocj89, michael.foord, xtreak priority: normal severity: normal status: open title: Add a recipe in unittest.mock examples about mock_open per file type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 06:55:51 2019 From: report at bugs.python.org (sinoroc) Date: Fri, 13 Sep 2019 10:55:51 +0000 Subject: [issue38145] Fix short option 'd' in 'distutils' command 'bdist_dumb' In-Reply-To: <1568313123.54.0.58284352566.issue38145@roundup.psfhosted.org> Message-ID: <1568372151.24.0.500491116148.issue38145@roundup.psfhosted.org> Change by sinoroc : ---------- pull_requests: -15695 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 06:59:42 2019 From: report at bugs.python.org (Julien Palard) Date: Fri, 13 Sep 2019 10:59:42 +0000 Subject: [issue31040] mimetypes.add_type should complain when you give it an undotted ext In-Reply-To: <1501010741.93.0.952054126016.issue31040@psf.upfronthosting.co.za> Message-ID: <1568372382.03.0.0269291951835.issue31040@roundup.psfhosted.org> Julien Palard added the comment: I just found a case where the empty mime type is actually usefull, it's in Lib/http/server.py: extensions_map = mimetypes.types_map.copy() extensions_map.update({ '': 'application/octet-stream', # Default '.py': 'text/plain', '.c': 'text/plain', '.h': 'text/plain', }) It does *not* uses add_type, but demos the fact that the empty type may be usefull from time to time, maybe don't warn and don't deprecate it at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 07:00:15 2019 From: report at bugs.python.org (Lukas Anzinger) Date: Fri, 13 Sep 2019 11:00:15 +0000 Subject: [issue31807] unitest.mock: Using autospec=True conflicts with 'wraps' In-Reply-To: <1508287695.22.0.213398074469.issue31807@psf.upfronthosting.co.za> Message-ID: <1568372415.84.0.659722433339.issue31807@roundup.psfhosted.org> Lukas Anzinger added the comment: Hi, I just wanted to ask what the status for this bug is. I'm still interested in getting this merged and would be happy to help. Lukas ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 07:03:18 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 11:03:18 +0000 Subject: [issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream In-Reply-To: <1557598514.53.0.379470651864.issue36889@roundup.psfhosted.org> Message-ID: <1568372598.76.0.57689212984.issue36889@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15708 pull_request: https://github.com/python/cpython/pull/16087 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 07:06:00 2019 From: report at bugs.python.org (Amiy Kumar) Date: Fri, 13 Sep 2019 11:06:00 +0000 Subject: [issue38156] input fucntion raises SystemError after specific input. In-Reply-To: <1568370698.83.0.595206707223.issue38156@roundup.psfhosted.org> Message-ID: <1568372760.62.0.5797977118.issue38156@roundup.psfhosted.org> Change by Amiy Kumar : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 07:06:37 2019 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 13 Sep 2019 11:06:37 +0000 Subject: [issue38158] PyType_Spec docs list non-existant field "doc" Message-ID: <1568372797.52.0.257422503496.issue38158@roundup.psfhosted.org> New submission from Stefan Behnel : The current documentation of the PyType_Spec struct lists a "doc" member which does not exist. It should be removed from the docs. https://docs.python.org/3.8/c-api/type.html#c.PyType_Spec ---------- assignee: docs at python components: Documentation keywords: easy, newcomer friendly messages: 352288 nosy: docs at python, scoder priority: normal severity: normal status: open title: PyType_Spec docs list non-existant field "doc" type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 07:07:01 2019 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 13 Sep 2019 11:07:01 +0000 Subject: [issue38158] PyType_Spec docs list non-existant field "doc" In-Reply-To: <1568372797.52.0.257422503496.issue38158@roundup.psfhosted.org> Message-ID: <1568372821.21.0.832996324644.issue38158@roundup.psfhosted.org> Change by Stefan Behnel : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 07:23:51 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 11:23:51 +0000 Subject: [issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream In-Reply-To: <1557598514.53.0.379470651864.issue36889@roundup.psfhosted.org> Message-ID: <1568373831.56.0.0232002330596.issue36889@roundup.psfhosted.org> miss-islington added the comment: New changeset b9bfe143d151d184615fa3890f78874c5d4ed4c6 by Miss Islington (bot) in branch '3.8': bpo-36889: Document Stream class and add docstrings (GH-14488) https://github.com/python/cpython/commit/b9bfe143d151d184615fa3890f78874c5d4ed4c6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 07:29:03 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 11:29:03 +0000 Subject: [issue12144] cookielib.CookieJar.make_cookies fails for cookies with 'expires' set In-Reply-To: <1306033124.86.0.836605602237.issue12144@psf.upfronthosting.co.za> Message-ID: <1568374143.07.0.0794686012498.issue12144@roundup.psfhosted.org> miss-islington added the comment: New changeset bb41147eab15a2958f4ad38261e5bf608f6ace1b by Miss Islington (bot) (Xtreak) in branch 'master': bpo-12144: Handle cookies with expires attribute in CookieJar.make_cookies (GH-13921) https://github.com/python/cpython/commit/bb41147eab15a2958f4ad38261e5bf608f6ace1b ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 07:29:11 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 11:29:11 +0000 Subject: [issue12144] cookielib.CookieJar.make_cookies fails for cookies with 'expires' set In-Reply-To: <1306033124.86.0.836605602237.issue12144@psf.upfronthosting.co.za> Message-ID: <1568374151.83.0.781785157237.issue12144@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15709 pull_request: https://github.com/python/cpython/pull/16088 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 07:29:18 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 11:29:18 +0000 Subject: [issue12144] cookielib.CookieJar.make_cookies fails for cookies with 'expires' set In-Reply-To: <1306033124.86.0.836605602237.issue12144@psf.upfronthosting.co.za> Message-ID: <1568374158.99.0.426012192423.issue12144@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15710 pull_request: https://github.com/python/cpython/pull/16089 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 07:32:11 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 13 Sep 2019 11:32:11 +0000 Subject: [issue36889] Merge StreamWriter and StreamReader into just asyncio.Stream In-Reply-To: <1557598514.53.0.379470651864.issue36889@roundup.psfhosted.org> Message-ID: <1568374331.53.0.798097544827.issue36889@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 07:33:11 2019 From: report at bugs.python.org (Tahia K) Date: Fri, 13 Sep 2019 11:33:11 +0000 Subject: [issue38158] PyType_Spec docs list non-existant field "doc" In-Reply-To: <1568372797.52.0.257422503496.issue38158@roundup.psfhosted.org> Message-ID: <1568374391.13.0.115227749082.issue38158@roundup.psfhosted.org> Tahia K added the comment: Is it okay for me to grab this one? ---------- nosy: +ta1hia _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 07:38:50 2019 From: report at bugs.python.org (Julien Palard) Date: Fri, 13 Sep 2019 11:38:50 +0000 Subject: [issue5430] imaplib: must not replace LF or CR by CRLF in literals In-Reply-To: <1236325877.36.0.637700625895.issue5430@psf.upfronthosting.co.za> Message-ID: <1568374730.68.0.241542718941.issue5430@roundup.psfhosted.org> Julien Palard added the comment: It looks like a revert of 47404fffff3e36699786082d0ee6565872d627e1 Which is the fix for https://bugs.python.org/issue723962 which I'm currently reading. ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 07:40:10 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 13 Sep 2019 11:40:10 +0000 Subject: [issue12707] Deprecate addinfourl getters In-Reply-To: <1312760770.57.0.2285900636.issue12707@psf.upfronthosting.co.za> Message-ID: <1568374810.76.0.0392784777936.issue12707@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset ff2e18286560e981f4e09afb0d2448ea994414d8 by St?phane Wirtel (Ashwin Ramaswami) in branch 'master': bpo-12707: deprecate info(), geturl(), getcode() methods in favor of headers, url, and status properties for HTTPResponse and addinfourl (GH-11447) https://github.com/python/cpython/commit/ff2e18286560e981f4e09afb0d2448ea994414d8 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 07:40:45 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 13 Sep 2019 11:40:45 +0000 Subject: [issue12707] Deprecate addinfourl getters In-Reply-To: <1312760770.57.0.2285900636.issue12707@psf.upfronthosting.co.za> Message-ID: <1568374845.22.0.712688375699.issue12707@roundup.psfhosted.org> St?phane Wirtel added the comment: Thank you so much for your contribution, I close this issue and have merged the PR. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 07:41:24 2019 From: report at bugs.python.org (Tahia K) Date: Fri, 13 Sep 2019 11:41:24 +0000 Subject: [issue38155] Add __all__ to the datetime module In-Reply-To: <1568370190.96.0.124167415349.issue38155@roundup.psfhosted.org> Message-ID: <1568374884.55.0.832431745393.issue38155@roundup.psfhosted.org> Tahia K added the comment: Hello! I'm interested in picking up this task. Is it okay if I grab it? The import test bit seems tricky, since (from what I understand) inspecting on an "import *" statement might conflict against other global imports in that test file. I'm a new contributor and open to suggestions on that bit :) ---------- nosy: +ta1hia _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 07:43:02 2019 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 13 Sep 2019 11:43:02 +0000 Subject: [issue38158] PyType_Spec docs list non-existant field "doc" In-Reply-To: <1568372797.52.0.257422503496.issue38158@roundup.psfhosted.org> Message-ID: <1568374982.54.0.672801426707.issue38158@roundup.psfhosted.org> Stefan Behnel added the comment: Absolutely, Tahia. It just needs a PR with a doc update. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 07:44:22 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 13 Sep 2019 11:44:22 +0000 Subject: [issue38157] Add a recipe in unittest.mock examples about mock_open per file In-Reply-To: <1568372083.76.0.737420692229.issue38157@roundup.psfhosted.org> Message-ID: <1568375062.37.0.204445610843.issue38157@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- keywords: +patch pull_requests: +15711 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16090 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 07:44:29 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 13 Sep 2019 11:44:29 +0000 Subject: [issue38149] sys.audit() is called multiple times for glob.glob() In-Reply-To: <1568365671.05.0.0499818085141.issue38149@roundup.psfhosted.org> Message-ID: <1568375069.92.0.420389722717.issue38149@roundup.psfhosted.org> Steve Dower added the comment: > when added sys.audit() for glob.glob(), should not it be added for Path.glob() too? And for os.walk()? Sure, those would make sense. They all go via scandir() which has its own event too (and will do for each directory), but being able to see that it came from a glob or walk call could be useful information. Maybe moving the sys.audit call in glob.glob further down in the function would avoid some of the recursion? I don't want to duplicate where it's raised too much, as that provides opportunities to bypass it, but this one is only slightly informative - os.scandir is the real one that you'd worry about seeing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 07:47:09 2019 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 13 Sep 2019 11:47:09 +0000 Subject: [issue38155] Add __all__ to the datetime module In-Reply-To: <1568370190.96.0.124167415349.issue38155@roundup.psfhosted.org> Message-ID: <1568375229.24.0.58642971441.issue38155@roundup.psfhosted.org> Paul Ganssle added the comment: Hi Tahia: Go ahead and make a PR, no need to worry about the test. I mainly put in the bit about tests because I was hoping to nerd-snipe someone into figuring out how to do it for me ;) It's not a particularly important test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 07:47:54 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 11:47:54 +0000 Subject: [issue12144] cookielib.CookieJar.make_cookies fails for cookies with 'expires' set In-Reply-To: <1306033124.86.0.836605602237.issue12144@psf.upfronthosting.co.za> Message-ID: <1568375274.57.0.999910798984.issue12144@roundup.psfhosted.org> miss-islington added the comment: New changeset 44cb89a78a308b7a613bdd01539ec84be914d693 by Miss Islington (bot) in branch '3.8': bpo-12144: Handle cookies with expires attribute in CookieJar.make_cookies (GH-13921) https://github.com/python/cpython/commit/44cb89a78a308b7a613bdd01539ec84be914d693 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 07:52:04 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 13 Sep 2019 11:52:04 +0000 Subject: [issue38145] Fix short option 'd' in 'distutils' command 'bdist_dumb' In-Reply-To: <1568313123.54.0.58284352566.issue38145@roundup.psfhosted.org> Message-ID: <1568375524.6.0.770724054467.issue38145@roundup.psfhosted.org> St?phane Wirtel added the comment: +1 for the fix. ---------- nosy: +matrixise versions: -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 07:56:17 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 13 Sep 2019 11:56:17 +0000 Subject: [issue36046] support dropping privileges when running subprocesses In-Reply-To: <1550625858.55.0.53498127684.issue36046@roundup.psfhosted.org> Message-ID: <1568375777.63.0.330726080581.issue36046@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +15712 pull_request: https://github.com/python/cpython/pull/16091 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 07:57:12 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 13 Sep 2019 11:57:12 +0000 Subject: [issue38104] File descriptor error when subprocess call is used with event loop enabled in main thread In-Reply-To: <1568196742.14.0.919718116174.issue38104@roundup.psfhosted.org> Message-ID: <1568375832.84.0.944369337406.issue38104@roundup.psfhosted.org> Andrew Svetlov added the comment: You spawn too many subprocesses that finish virtually at the same time. It leads to wakeup_fd overrun. Python 3.6 is in security mode, sorry (and the fix is impossible). Python 3.7 has warn_on_full_buffer=False flag for https://docs.python.org/3/library/signal.html#signal.set_wakeup_fd but asyncio doesn't use it for reasons. Python 3.8 doesn't subscribe for SIGCHLD by default, thus the provided example finishes without any warning. I'm going to closing the issue as won't fix. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 07:58:22 2019 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 13 Sep 2019 11:58:22 +0000 Subject: [issue38155] Add __all__ to the datetime module In-Reply-To: <1568370190.96.0.124167415349.issue38155@roundup.psfhosted.org> Message-ID: <1568375902.61.0.419726640404.issue38155@roundup.psfhosted.org> Paul Ganssle added the comment: Actually, how about adding this simpler test into `Lib/test/datetimetester.py`, right above test_name_cleanup (https://github.com/python/cpython/blob/ff2e18286560e981f4e09afb0d2448ea994414d8/Lib/test/datetimetester.py#L65): def test_all(self): """Test that __all__ only points to valid attributes.""" all_attrs = dir(datetime_module) for attr in datetime_module.__all__: self.assertIn(attr, all_attrs) This will at least test that __all__ only contains valid attributes on the module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 08:01:30 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 13 Sep 2019 12:01:30 +0000 Subject: [issue12144] cookielib.CookieJar.make_cookies fails for cookies with 'expires' set In-Reply-To: <1306033124.86.0.836605602237.issue12144@psf.upfronthosting.co.za> Message-ID: <1568376090.02.0.756451480634.issue12144@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- versions: +Python 3.9 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 08:02:44 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 13 Sep 2019 12:02:44 +0000 Subject: [issue12144] cookielib.CookieJar.make_cookies fails for cookies with 'expires' set In-Reply-To: <1306033124.86.0.836605602237.issue12144@psf.upfronthosting.co.za> Message-ID: <1568376164.58.0.488785757095.issue12144@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- pull_requests: +15713 pull_request: https://github.com/python/cpython/pull/16092 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 08:04:12 2019 From: report at bugs.python.org (Dino Viehland) Date: Fri, 13 Sep 2019 12:04:12 +0000 Subject: [issue38152] AST change introduced tons of reference leaks In-Reply-To: <1568367428.12.0.614565351268.issue38152@roundup.psfhosted.org> Message-ID: <1568376252.16.0.602753620757.issue38152@roundup.psfhosted.org> Change by Dino Viehland : ---------- assignee: -> dino.viehland nosy: +dino.viehland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 08:07:55 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 13 Sep 2019 12:07:55 +0000 Subject: [issue38149] sys.audit() is called multiple times for glob.glob() In-Reply-To: <1568365671.05.0.0499818085141.issue38149@roundup.psfhosted.org> Message-ID: <1568376475.32.0.303559936814.issue38149@roundup.psfhosted.org> Serhiy Storchaka added the comment: I think it would be better to call sys.audit() in glob.iglob(), before calling the top-level _iglob(). It will give you a general context, and at every recursion level sys.audit() will be called for os.scandir(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 08:11:00 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 13 Sep 2019 12:11:00 +0000 Subject: [issue38149] sys.audit() is called multiple times for glob.glob() In-Reply-To: <1568365671.05.0.0499818085141.issue38149@roundup.psfhosted.org> Message-ID: <1568376660.92.0.173120414619.issue38149@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is harder to avoid repeating calls in os.walk(), because it is recursive itself. But you can introduce a recursive helper _walk() and make os.walk() just calling sys.audit() and _walk(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 08:15:15 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 13 Sep 2019 12:15:15 +0000 Subject: [issue23837] asyncio: read pipe transport tries to resume reading after loop is gone In-Reply-To: <1427882762.68.0.794378524046.issue23837@psf.upfronthosting.co.za> Message-ID: <1568376915.05.0.872531690545.issue23837@roundup.psfhosted.org> Andrew Svetlov added the comment: The issue can be closed, loop.add_reader() / loop.remove_reader() calls correctly handle closed loop now ---------- nosy: +asvetlov resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 08:15:27 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 13 Sep 2019 12:15:27 +0000 Subject: [issue38141] Use fewer statics in Argument Clinic. In-Reply-To: <1568300382.39.0.517598151629.issue38141@roundup.psfhosted.org> Message-ID: <1568376927.22.0.0542519122013.issue38141@roundup.psfhosted.org> Serhiy Storchaka added the comment: Would adding a mutex for thread-safe initialization of _Py_Identifier and _PyArg_Parser solve the problem with subinterpreters? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 08:18:51 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 13 Sep 2019 12:18:51 +0000 Subject: [issue38148] Add slots to asyncio transports In-Reply-To: <1568354081.06.0.30849196857.issue38148@roundup.psfhosted.org> Message-ID: <1568377131.3.0.0135658238896.issue38148@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 9eb35ab0d71a6bd680e84fa0f828cb634e72b681 by Andrew Svetlov in branch 'master': bpo-38148: Add slots to asyncio transports (GH-16077) https://github.com/python/cpython/commit/9eb35ab0d71a6bd680e84fa0f828cb634e72b681 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 08:19:21 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 13 Sep 2019 12:19:21 +0000 Subject: [issue37564] ArgumentParser should support bool type according to truth values In-Reply-To: <1562857832.91.0.995710130518.issue37564@roundup.psfhosted.org> Message-ID: <1568377161.62.0.0243992133224.issue37564@roundup.psfhosted.org> St?phane Wirtel added the comment: What will happen if we want to translate "true", "yes", ...? -1 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 08:21:20 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 13 Sep 2019 12:21:20 +0000 Subject: [issue38148] Add slots to asyncio transports In-Reply-To: <1568354081.06.0.30849196857.issue38148@roundup.psfhosted.org> Message-ID: <1568377280.62.0.476082823225.issue38148@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- pull_requests: +15714 pull_request: https://github.com/python/cpython/pull/16093 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 08:22:15 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 13 Sep 2019 12:22:15 +0000 Subject: [issue12144] cookielib.CookieJar.make_cookies fails for cookies with 'expires' set In-Reply-To: <1306033124.86.0.836605602237.issue12144@psf.upfronthosting.co.za> Message-ID: <1568377335.73.0.426554895206.issue12144@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset e7b7edf5ebaed14dc68c841a8a98260f1330ef9a by Andrew Svetlov (Xtreak) in branch '3.7': [3.7] bpo-12144: Handle cookies with expires attribute in CookieJar.make_cookies (GH-13921) (GH-16092) https://github.com/python/cpython/commit/e7b7edf5ebaed14dc68c841a8a98260f1330ef9a ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 08:22:28 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 13 Sep 2019 12:22:28 +0000 Subject: [issue12144] cookielib.CookieJar.make_cookies fails for cookies with 'expires' set In-Reply-To: <1306033124.86.0.836605602237.issue12144@psf.upfronthosting.co.za> Message-ID: <1568377348.95.0.882904427882.issue12144@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 08:26:00 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 13 Sep 2019 12:26:00 +0000 Subject: [issue37404] asyncio sock_recv blocks on ssl sockets. In-Reply-To: <1561491381.97.0.0488150062245.issue37404@roundup.psfhosted.org> Message-ID: <1568377560.86.0.812663353463.issue37404@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- keywords: +easy, newcomer friendly _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 08:33:18 2019 From: report at bugs.python.org (Mario Corchero) Date: Fri, 13 Sep 2019 12:33:18 +0000 Subject: [issue17013] Allow waiting on a mock In-Reply-To: <1358856947.82.0.71016271567.issue17013@psf.upfronthosting.co.za> Message-ID: <1568377998.53.0.913909204324.issue17013@roundup.psfhosted.org> Change by Mario Corchero : ---------- pull_requests: +15715 pull_request: https://github.com/python/cpython/pull/16094 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 08:36:01 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 13 Sep 2019 12:36:01 +0000 Subject: [issue38141] Use fewer statics in Argument Clinic. In-Reply-To: <1568300382.39.0.517598151629.issue38141@roundup.psfhosted.org> Message-ID: <1568378161.93.0.670410855411.issue38141@roundup.psfhosted.org> Eric Snow added the comment: That might work. :) There are two key problems under subinterpreters that do not share the GIL: * races on refcount operations * cache thrashing due to refcount operations (under multi-core threads) A lock would certainly mitigate the first problem. I'm not sure how much the second would actually be a problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 08:48:28 2019 From: report at bugs.python.org (Larry Hastings) Date: Fri, 13 Sep 2019 12:48:28 +0000 Subject: [issue38141] Use fewer statics in Argument Clinic. In-Reply-To: <1568300382.39.0.517598151629.issue38141@roundup.psfhosted.org> Message-ID: <1568378908.73.0.699308069646.issue38141@roundup.psfhosted.org> Larry Hastings added the comment: shared objects x threads = contention for notification of invalidated cache lines If you're not running multiple threads, there's no problem. If it's only a few shared objects, it probably wouldn't be a big deal. As they say in medicine: "the dose makes the poison." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 08:51:22 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 13 Sep 2019 12:51:22 +0000 Subject: [issue38098] Special Characters Don't Work When Using Virtual Environment In-Reply-To: <1568158252.04.0.0991697281074.issue38098@roundup.psfhosted.org> Message-ID: <1568379082.94.0.337812143726.issue38098@roundup.psfhosted.org> Change by Steve Dower : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 08:52:16 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 13 Sep 2019 12:52:16 +0000 Subject: [issue37480] add ptpython to list of alternate interpreters In-Reply-To: <1562036636.74.0.198372246702.issue37480@roundup.psfhosted.org> Message-ID: <1568379136.38.0.197945050377.issue37480@roundup.psfhosted.org> St?phane Wirtel added the comment: Thank you for the proposal but I close this issue because I think the wiki is a better place. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 08:53:24 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 13 Sep 2019 12:53:24 +0000 Subject: [issue38098] Special Characters Don't Work When Using Virtual Environment In-Reply-To: <1568158252.04.0.0991697281074.issue38098@roundup.psfhosted.org> Message-ID: <1568379204.42.0.687154202028.issue38098@roundup.psfhosted.org> Steve Dower added the comment: Thanks Spandan This doesn't reproduce trivially for me, so I suspect there is some difference in the venv. Could you run "pip list" in both the venv and with it deactivated and share the output? There are some packages that modify how console input works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 08:54:50 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 13 Sep 2019 12:54:50 +0000 Subject: [issue38153] Normalize hashing algorithm names In-Reply-To: <1568368232.54.0.0384008471773.issue38153@roundup.psfhosted.org> Message-ID: <1568379290.98.0.681594831989.issue38153@roundup.psfhosted.org> Gregory P. Smith added the comment: as discussed, not pushing this back into 3.7 as we aren't hearing users call this a problem. ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 08:57:15 2019 From: report at bugs.python.org (Julien Palard) Date: Fri, 13 Sep 2019 12:57:15 +0000 Subject: [issue29986] Documentation recommends raising TypeError from tp_richcompare In-Reply-To: <1491346313.99.0.131506773991.issue29986@psf.upfronthosting.co.za> Message-ID: <1568379435.44.0.555827824436.issue29986@roundup.psfhosted.org> Change by Julien Palard : ---------- keywords: +patch pull_requests: +15716 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16095 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:07:40 2019 From: report at bugs.python.org (Julien Palard) Date: Fri, 13 Sep 2019 13:07:40 +0000 Subject: [issue29986] Documentation recommends raising TypeError from tp_richcompare In-Reply-To: <1491346313.99.0.131506773991.issue29986@psf.upfronthosting.co.za> Message-ID: <1568380060.56.0.52839012629.issue29986@roundup.psfhosted.org> Julien Palard added the comment: New changeset 375a3e2bdbeb4dce69aba4b5bc90f55fe27e81b4 by Julien Palard in branch 'master': bpo-29986: Doc: Delete tip to raise TypeError from tp_richcompare. (GH-16095) https://github.com/python/cpython/commit/375a3e2bdbeb4dce69aba4b5bc90f55fe27e81b4 ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:07:49 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 13:07:49 +0000 Subject: [issue29986] Documentation recommends raising TypeError from tp_richcompare In-Reply-To: <1491346313.99.0.131506773991.issue29986@psf.upfronthosting.co.za> Message-ID: <1568380069.12.0.698862190189.issue29986@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15717 pull_request: https://github.com/python/cpython/pull/16097 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:12:34 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 13 Sep 2019 13:12:34 +0000 Subject: [issue38092] environment variables not passed correctly using new virtualenv launching in windows and python3.7+ In-Reply-To: <1568122359.92.0.800539114246.issue38092@roundup.psfhosted.org> Message-ID: <1568380354.85.0.731237967265.issue38092@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +15718 pull_request: https://github.com/python/cpython/pull/16098 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:14:22 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 13 Sep 2019 13:14:22 +0000 Subject: [issue38092] environment variables not passed correctly using new virtualenv launching in windows and python3.7+ In-Reply-To: <1568122359.92.0.800539114246.issue38092@roundup.psfhosted.org> Message-ID: <1568380462.61.0.478701808976.issue38092@roundup.psfhosted.org> Steve Dower added the comment: I posted a second PR with the rest of the change, as it'd be good to get this in before the next 3.8 release. ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:14:45 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 13:14:45 +0000 Subject: [issue29986] Documentation recommends raising TypeError from tp_richcompare In-Reply-To: <1491346313.99.0.131506773991.issue29986@psf.upfronthosting.co.za> Message-ID: <1568380485.68.0.770260337216.issue29986@roundup.psfhosted.org> miss-islington added the comment: New changeset 4556b1d35c352c975f3cf066362cb6e24efe0668 by Miss Islington (bot) in branch '3.8': bpo-29986: Doc: Delete tip to raise TypeError from tp_richcompare. (GH-16095) https://github.com/python/cpython/commit/4556b1d35c352c975f3cf066362cb6e24efe0668 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:14:58 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 13 Sep 2019 13:14:58 +0000 Subject: [issue38148] Add slots to asyncio transports In-Reply-To: <1568354081.06.0.30849196857.issue38148@roundup.psfhosted.org> Message-ID: <1568380498.71.0.541769049828.issue38148@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 6638c9226066205a646e18da95b33e619d784b0b by Andrew Svetlov in branch '3.8': [3.8] bpo-38148: Add slots to asyncio transports (GH-16077) (GH-16093) https://github.com/python/cpython/commit/6638c9226066205a646e18da95b33e619d784b0b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:15:15 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 13 Sep 2019 13:15:15 +0000 Subject: [issue38148] Add slots to asyncio transports In-Reply-To: <1568354081.06.0.30849196857.issue38148@roundup.psfhosted.org> Message-ID: <1568380515.68.0.718055614988.issue38148@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:15:30 2019 From: report at bugs.python.org (Roundup Robot) Date: Fri, 13 Sep 2019 13:15:30 +0000 Subject: [issue38122] AsyncMock force always creating an AsyncMock for child mocks In-Reply-To: <1568222694.73.0.217906468671.issue38122@roundup.psfhosted.org> Message-ID: <1568380530.78.0.0958614354717.issue38122@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +15719 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16099 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:24:04 2019 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 13 Sep 2019 13:24:04 +0000 Subject: [issue18710] Add PyState_GetModuleAttr In-Reply-To: <1376311241.36.0.528101018546.issue18710@psf.upfronthosting.co.za> Message-ID: <1568381044.82.0.870042023993.issue18710@roundup.psfhosted.org> Petr Viktorin added the comment: PEP 573 proposes an alternative to PyState_FindModule. ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:25:39 2019 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 13 Sep 2019 13:25:39 +0000 Subject: [issue38159] PyState_AddModule docs should say that it's not necessary to call it. Message-ID: <1568381139.47.0.152206625825.issue38159@roundup.psfhosted.org> New submission from Petr Viktorin : I've seen extension modules calling PyState_AddModule on init, despite Python doing this automatically. It should be clarified that PyState_AddModule is for people who are writing alternative ways of creating/registering module objects. ---------- messages: 352320 nosy: petr.viktorin priority: normal severity: normal status: open title: PyState_AddModule docs should say that it's not necessary to call it. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:26:12 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 13 Sep 2019 13:26:12 +0000 Subject: [issue34344] Fix the docstring for AbstractEventLoopPolicy.get_event_loop In-Reply-To: <1533549887.39.0.56676864532.issue34344@psf.upfronthosting.co.za> Message-ID: <1568381172.61.0.506373449079.issue34344@roundup.psfhosted.org> Andrew Svetlov added the comment: Vlad, the PR is very welcome! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:26:15 2019 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 13 Sep 2019 13:26:15 +0000 Subject: [issue38159] PyState_AddModule docs should say that it's not necessary to call it. In-Reply-To: <1568381139.47.0.152206625825.issue38159@roundup.psfhosted.org> Message-ID: <1568381175.6.0.950012984812.issue38159@roundup.psfhosted.org> Change by Petr Viktorin : ---------- keywords: +patch pull_requests: +15720 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16101 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:26:18 2019 From: report at bugs.python.org (Joshua Cannon) Date: Fri, 13 Sep 2019 13:26:18 +0000 Subject: [issue21041] pathlib.PurePath.parents rejects negative indexes In-Reply-To: <1395613011.22.0.29152070109.issue21041@psf.upfronthosting.co.za> Message-ID: <1568381178.6.0.698003277985.issue21041@roundup.psfhosted.org> Joshua Cannon added the comment: > it may explain why negative indices or slices were initially not implemented: It already looks like the result of a slice. Sure the values of the sequence could be thought of as being increasingly smaller slices of some other sequence, however I don't think it changes the fact that "parents" is a sequence, and sequences have well-defined semantics for negative indices and slices. Semantics which people expect, and have to find smelly workarounds for. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:29:04 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 13 Sep 2019 13:29:04 +0000 Subject: [issue26140] inspect.iscoroutinefunction raises TypeError when checks Mock of function or coroutinefunction In-Reply-To: <1453030972.84.0.0646105171888.issue26140@psf.upfronthosting.co.za> Message-ID: <1568381344.86.0.589467548752.issue26140@roundup.psfhosted.org> Andrew Svetlov added the comment: I believe after implementing AsyncMock we can close the issue ---------- nosy: +asvetlov resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:31:23 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 13 Sep 2019 13:31:23 +0000 Subject: [issue38153] Normalize hashing algorithm names In-Reply-To: <1568368232.54.0.0384008471773.issue38153@roundup.psfhosted.org> Message-ID: <1568381483.64.0.145621932895.issue38153@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 995b5d38e7cc24cac3de8dfd516115f86b0bcf80 by Gregory P. Smith (Christian Heimes) in branch 'master': bpo-38153: Normalize hashlib algorithm names (GH-16083) https://github.com/python/cpython/commit/995b5d38e7cc24cac3de8dfd516115f86b0bcf80 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:33:29 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 13 Sep 2019 13:33:29 +0000 Subject: [issue38160] Add a "PyInterpreterState *" field to PyTypeObject. Message-ID: <1568381609.99.0.399978002813.issue38160@roundup.psfhosted.org> New submission from Eric Snow : A "PyInterpreterState *interp" field on PyTypeObject would allow us to quickly access the originating interpreter from any object. This will help us avoid more costly lookups. The additional pointer used for this should not have a significant impact on the memory usage of CPython. ---------- components: Interpreter Core messages: 352325 nosy: eric.snow, petr.viktorin, scoder, steve.dower priority: normal severity: normal stage: needs patch status: open title: Add a "PyInterpreterState *" field to PyTypeObject. type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:36:12 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 13 Sep 2019 13:36:12 +0000 Subject: [issue26468] shutil.copy2 raises OSError if filesystem doesn't support chmod In-Reply-To: <1456910519.95.0.44073308632.issue26468@psf.upfronthosting.co.za> Message-ID: <1568381772.86.0.152581440012.issue26468@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 9585f46b97931d2640c3343dfe03aed15beb9fea by St?phane Wirtel (Windson yang) in branch 'master': bpo-26468: Doc: improve the documentation of shutil.copy2 when it can fail. (GH-13765) https://github.com/python/cpython/commit/9585f46b97931d2640c3343dfe03aed15beb9fea ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:36:25 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 13:36:25 +0000 Subject: [issue26468] shutil.copy2 raises OSError if filesystem doesn't support chmod In-Reply-To: <1456910519.95.0.44073308632.issue26468@psf.upfronthosting.co.za> Message-ID: <1568381785.74.0.311567759948.issue26468@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15721 pull_request: https://github.com/python/cpython/pull/16102 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:38:06 2019 From: report at bugs.python.org (Davin Potts) Date: Fri, 13 Sep 2019 13:38:06 +0000 Subject: [issue22393] multiprocessing.Pool shouldn't hang forever if a worker process dies unexpectedly In-Reply-To: <1410474786.78.0.264797717105.issue22393@psf.upfronthosting.co.za> Message-ID: <1568381886.16.0.538725282769.issue22393@roundup.psfhosted.org> Change by Davin Potts : ---------- pull_requests: +15722 pull_request: https://github.com/python/cpython/pull/16103 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:38:10 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 13 Sep 2019 13:38:10 +0000 Subject: [issue36002] configure --enable-optimizations with clang fails to detect llvm-profdata In-Reply-To: <1550237355.31.0.735770966924.issue36002@roundup.psfhosted.org> Message-ID: <1568381890.7.0.0236300088912.issue36002@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 0519d497b04b252f50dfff9101fb7f4b9e33f1c4 by Benjamin Peterson (Doyle Rowland) in branch 'master': closes bpo-36002: Use AC_PATH_TOOL to find llvm-profdata and llvm-ar. (GH-14998) https://github.com/python/cpython/commit/0519d497b04b252f50dfff9101fb7f4b9e33f1c4 ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:38:21 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 13:38:21 +0000 Subject: [issue36002] configure --enable-optimizations with clang fails to detect llvm-profdata In-Reply-To: <1550237355.31.0.735770966924.issue36002@roundup.psfhosted.org> Message-ID: <1568381901.83.0.775622887305.issue36002@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15723 pull_request: https://github.com/python/cpython/pull/16104 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:38:28 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 13 Sep 2019 13:38:28 +0000 Subject: [issue26468] shutil.copy2 raises OSError if filesystem doesn't support chmod In-Reply-To: <1456910519.95.0.44073308632.issue26468@psf.upfronthosting.co.za> Message-ID: <1568381908.01.0.833015967816.issue26468@roundup.psfhosted.org> St?phane Wirtel added the comment: I have merged the PR with the change in the documentation, feel free to open a new PR for the other part of this issue. ---------- versions: +Python 3.8, Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:38:31 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 13:38:31 +0000 Subject: [issue36002] configure --enable-optimizations with clang fails to detect llvm-profdata In-Reply-To: <1550237355.31.0.735770966924.issue36002@roundup.psfhosted.org> Message-ID: <1568381911.46.0.386510657356.issue36002@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15724 pull_request: https://github.com/python/cpython/pull/16105 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:38:49 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 13 Sep 2019 13:38:49 +0000 Subject: [issue26140] inspect.iscoroutinefunction raises TypeError when checks Mock of function or coroutinefunction In-Reply-To: <1453030972.84.0.0646105171888.issue26140@psf.upfronthosting.co.za> Message-ID: <1568381929.61.0.153245422318.issue26140@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I believe it's still a problem with Mock though MagicMock and AsyncMock work but I am not sure what would be the correct behavior that whether Mock should behave like a coroutine or not as per the discussion here. ./python.exe Python 3.9.0a0 (heads/master:375a3e2bdb, Sep 13 2019, 14:18:36) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from unittest.mock import Mock, MagicMock, AsyncMock >>> import inspect >>> def f(): pass ... >>> for m in MagicMock, AsyncMock : print(inspect.iscoroutinefunction(m(f))) ... True True >>> for m in Mock, MagicMock, AsyncMock : print(inspect.iscoroutinefunction(m(f))) ... Traceback (most recent call last): File "", line 1, in File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/inspect.py", line 194, in iscoroutinefunction return _has_code_flag(obj, CO_COROUTINE) File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/inspect.py", line 180, in _has_code_flag return bool(f.__code__.co_flags & flag) TypeError: unsupported operand type(s) for &: 'Mock' and 'int' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:41:06 2019 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 13 Sep 2019 13:41:06 +0000 Subject: [issue38160] Add a "PyInterpreterState *" field to PyTypeObject. In-Reply-To: <1568381609.99.0.399978002813.issue38160@roundup.psfhosted.org> Message-ID: <1568382066.13.0.705348880841.issue38160@roundup.psfhosted.org> Petr Viktorin added the comment: PEP 573 already proposes adding a pointer to the *module* to heap types (well, those that opt in). We should rather add a pointer from *modules* to the interpreter state. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:43:13 2019 From: report at bugs.python.org (Joshua Cannon) Date: Fri, 13 Sep 2019 13:43:13 +0000 Subject: [issue35498] Parents objects in pathlib.Path don't support slices as __getitem__ arguments In-Reply-To: <1544806517.4.0.788709270274.issue35498@psf.upfronthosting.co.za> Message-ID: <1568382193.3.0.814035018161.issue35498@roundup.psfhosted.org> Joshua Cannon added the comment: Pretty much the same reason you would want to slice any other sequence. You want some range of values. top_most_3_dirs = myPath.parents[-3:] grandparents_and_beyond = myPath.parents[1:] The same goes for negative indexes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:43:37 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 13:43:37 +0000 Subject: [issue26468] shutil.copy2 raises OSError if filesystem doesn't support chmod In-Reply-To: <1456910519.95.0.44073308632.issue26468@psf.upfronthosting.co.za> Message-ID: <1568382217.53.0.0562872764514.issue26468@roundup.psfhosted.org> miss-islington added the comment: New changeset c27bcc3b476bbda7958724376189816c4e9d19c4 by Miss Islington (bot) in branch '3.8': bpo-26468: Doc: improve the documentation of shutil.copy2 when it can fail. (GH-13765) https://github.com/python/cpython/commit/c27bcc3b476bbda7958724376189816c4e9d19c4 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:43:38 2019 From: report at bugs.python.org (Thomas Wouters) Date: Fri, 13 Sep 2019 13:43:38 +0000 Subject: [issue36046] support dropping privileges when running subprocesses In-Reply-To: <1550625858.55.0.53498127684.issue36046@roundup.psfhosted.org> Message-ID: <1568382218.29.0.449363547535.issue36046@roundup.psfhosted.org> Thomas Wouters added the comment: New changeset 693aa80a434590ea7dcd35c000209e53d01b9425 by T. Wouters (Gregory P. Smith) in branch 'master': bpo-36046: Fix buildbot failures (GH-16091) https://github.com/python/cpython/commit/693aa80a434590ea7dcd35c000209e53d01b9425 ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:55:15 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 13:55:15 +0000 Subject: [issue36002] configure --enable-optimizations with clang fails to detect llvm-profdata In-Reply-To: <1550237355.31.0.735770966924.issue36002@roundup.psfhosted.org> Message-ID: <1568382915.12.0.712424415847.issue36002@roundup.psfhosted.org> miss-islington added the comment: New changeset d112ea66b003deb7a4f222e47a552ac79098f4df by Miss Islington (bot) in branch '3.7': closes bpo-36002: Use AC_PATH_TOOL to find llvm-profdata and llvm-ar. (GH-14998) https://github.com/python/cpython/commit/d112ea66b003deb7a4f222e47a552ac79098f4df ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 09:57:49 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 13:57:49 +0000 Subject: [issue36002] configure --enable-optimizations with clang fails to detect llvm-profdata In-Reply-To: <1550237355.31.0.735770966924.issue36002@roundup.psfhosted.org> Message-ID: <1568383069.22.0.166002609428.issue36002@roundup.psfhosted.org> miss-islington added the comment: New changeset bd2e7cc3af26fdd8bb86009048533e2000c0a490 by Miss Islington (bot) in branch '3.8': closes bpo-36002: Use AC_PATH_TOOL to find llvm-profdata and llvm-ar. (GH-14998) https://github.com/python/cpython/commit/bd2e7cc3af26fdd8bb86009048533e2000c0a490 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 10:07:10 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 13 Sep 2019 14:07:10 +0000 Subject: [issue25068] The proxy key's string should ignore case. In-Reply-To: <1441961173.2.0.654001525277.issue25068@psf.upfronthosting.co.za> Message-ID: <1568383630.02.0.618533831913.issue25068@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset b761e3aed1fbada4572a776f6a0d3c4be491d595 by St?phane Wirtel (Zackery Spytz) in branch 'master': bpo-25068: urllib.request.ProxyHandler now lowercases the dict keys (GH-13489) https://github.com/python/cpython/commit/b761e3aed1fbada4572a776f6a0d3c4be491d595 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 10:07:19 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 14:07:19 +0000 Subject: [issue25068] The proxy key's string should ignore case. In-Reply-To: <1441961173.2.0.654001525277.issue25068@psf.upfronthosting.co.za> Message-ID: <1568383639.09.0.437870974394.issue25068@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15725 pull_request: https://github.com/python/cpython/pull/16107 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 10:11:41 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 13 Sep 2019 14:11:41 +0000 Subject: [issue34706] Signature.from_callable sometimes drops subclassing In-Reply-To: <1537132321.64.0.956365154283.issue34706@psf.upfronthosting.co.za> Message-ID: <1568383900.99.0.603022789806.issue34706@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +15726 pull_request: https://github.com/python/cpython/pull/16108 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 10:12:02 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 13 Sep 2019 14:12:02 +0000 Subject: [issue34706] Signature.from_callable sometimes drops subclassing In-Reply-To: <1537132321.64.0.956365154283.issue34706@psf.upfronthosting.co.za> Message-ID: <1568383922.58.0.319031012318.issue34706@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 10:12:08 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 13 Sep 2019 14:12:08 +0000 Subject: [issue25068] The proxy key's string should ignore case. In-Reply-To: <1441961173.2.0.654001525277.issue25068@psf.upfronthosting.co.za> Message-ID: <1568383928.12.0.477673347027.issue25068@roundup.psfhosted.org> St?phane Wirtel added the comment: Thank you for your contribution, your PR has been merged into master but not in 3.8. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 10:12:56 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 13 Sep 2019 14:12:56 +0000 Subject: [issue34706] Signature.from_callable sometimes drops subclassing In-Reply-To: <1537132321.64.0.956365154283.issue34706@psf.upfronthosting.co.za> Message-ID: <1568383976.29.0.870181630185.issue34706@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- assignee: -> gregory.p.smith nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 10:17:01 2019 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 13 Sep 2019 14:17:01 +0000 Subject: [issue38155] Add __all__ to the datetime module In-Reply-To: <1568370190.96.0.124167415349.issue38155@roundup.psfhosted.org> Message-ID: <1568384221.0.0.402352661689.issue38155@roundup.psfhosted.org> Dong-hee Na added the comment: Good news, When this issue is solved. Can we solve the issue from https://github.com/python/cpython/pull/15633 ? ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 10:26:03 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 14:26:03 +0000 Subject: [issue25068] The proxy key's string should ignore case. In-Reply-To: <1441961173.2.0.654001525277.issue25068@psf.upfronthosting.co.za> Message-ID: <1568384763.25.0.429352944904.issue25068@roundup.psfhosted.org> miss-islington added the comment: New changeset 590ed09a5b422d59cc1f049c64ac30733545eef0 by Miss Islington (bot) in branch '3.8': bpo-25068: urllib.request.ProxyHandler now lowercases the dict keys (GH-13489) https://github.com/python/cpython/commit/590ed09a5b422d59cc1f049c64ac30733545eef0 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 10:26:06 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 13 Sep 2019 14:26:06 +0000 Subject: [issue36274] http.client cannot send non-ASCII request lines In-Reply-To: <1552422803.93.0.420596825145.issue36274@roundup.psfhosted.org> Message-ID: <1568384766.95.0.733728735671.issue36274@roundup.psfhosted.org> Jason R. Coombs added the comment: I believe this issue is more recent and widespread than I originally thought. I realized today that CherryPy is affected by this issue and [disabled nightly tests](https://github.com/cherrypy/cherrypy/issues/1781#issuecomment-507836873) as a result. It looks like the changed behavior was introduced in Python 3.7.4, so I expect stable releases to start failing also now. In that case, the web framework wishes to test that a null byte transmitted by the client is handled properly in the server, and without a patch, it's not possible for a project like cherrypy to transmit the invalid request to ensure a proper invalid response. I see now that the previously proposed solution wouldn't even address this use-case, as the null byte would still have been excluded. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 10:26:16 2019 From: report at bugs.python.org (Marat Sharafutdinov) Date: Fri, 13 Sep 2019 14:26:16 +0000 Subject: [issue38019] asyncio subprocess AttributeError: 'NoneType' object has no attribute '_add_reader' / '_remove_reader' In-Reply-To: <1567529709.4.0.805713285268.issue38019@roundup.psfhosted.org> Message-ID: <1568384776.81.0.854043435569.issue38019@roundup.psfhosted.org> Change by Marat Sharafutdinov : ---------- title: AttributeError: 'NoneType' object has no attribute '_add_reader' / '_remove_reader' -> asyncio subprocess AttributeError: 'NoneType' object has no attribute '_add_reader' / '_remove_reader' versions: +Python 3.6, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 10:29:34 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 13 Sep 2019 14:29:34 +0000 Subject: [issue26140] inspect.iscoroutinefunction raises TypeError when checks Mock of function or coroutinefunction In-Reply-To: <1453030972.84.0.0646105171888.issue26140@psf.upfronthosting.co.za> Message-ID: <1568384974.77.0.390178008757.issue26140@roundup.psfhosted.org> Andrew Svetlov added the comment: I believe with AsyncMock implemented we can close the issue ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 10:56:40 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 13 Sep 2019 14:56:40 +0000 Subject: [issue36274] http.client cannot send non-ASCII request lines In-Reply-To: <1552422803.93.0.420596825145.issue36274@roundup.psfhosted.org> Message-ID: <1568386600.05.0.255473513505.issue36274@roundup.psfhosted.org> Jason R. Coombs added the comment: I've started drafting a patch at https://github.com/python/cpython/tree/feature/putrequest-hooks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 11:11:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Sep 2019 15:11:10 +0000 Subject: [issue38150] test_capi: test_c_subclass_of_heap_ctype_with_del_modifying_dunder_class_only_decrefs_once() leaks In-Reply-To: <1568366122.45.0.513132018706.issue38150@roundup.psfhosted.org> Message-ID: <1568387470.57.0.65560219621.issue38150@roundup.psfhosted.org> STINNER Victor added the comment: The new test was added by: commit ff023ed36ea260ab64be5895f1f1f087c798987a Author: Eddie Elizondo Date: Wed Sep 11 05:17:13 2019 -0400 bpo-37879: Suppress subtype_dealloc decref when base type is a C heap type (GH-15323) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 11:11:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Sep 2019 15:11:41 +0000 Subject: [issue37879] Segfaults in C heap type subclasses In-Reply-To: <1566074851.0.0.451710928537.issue37879@roundup.psfhosted.org> Message-ID: <1568387501.62.0.569033238982.issue37879@roundup.psfhosted.org> STINNER Victor added the comment: I reopen the issue: the change caused a regression on the Refleak buildbot workers: bpo-38150. ---------- nosy: +vstinner resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 11:49:28 2019 From: report at bugs.python.org (Lisa Roach) Date: Fri, 13 Sep 2019 15:49:28 +0000 Subject: [issue38161] AsyncMock add `.awaited` like `.called` Message-ID: <1568389768.59.0.850541174467.issue38161@roundup.psfhosted.org> New submission from Lisa Roach : Currently Mock has a `.called` attribute, we could add an equivalent `.awaited` that returns True or False if the object has been awaited on. ---------- messages: 352345 nosy: lisroach priority: normal severity: normal status: open title: AsyncMock add `.awaited` like `.called` _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 11:51:13 2019 From: report at bugs.python.org (Eddie Elizondo) Date: Fri, 13 Sep 2019 15:51:13 +0000 Subject: [issue38150] test_capi: test_c_subclass_of_heap_ctype_with_del_modifying_dunder_class_only_decrefs_once() leaks In-Reply-To: <1568366122.45.0.513132018706.issue38150@roundup.psfhosted.org> Message-ID: <1568389873.48.0.534064787338.issue38150@roundup.psfhosted.org> Eddie Elizondo added the comment: On it. Also, I thought that the PR build bots already ran refleak tests by default? Do you know why this it's not integrated to the PR flow? ---------- nosy: +eelizondo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 11:52:08 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 13 Sep 2019 15:52:08 +0000 Subject: [issue38150] test_capi: test_c_subclass_of_heap_ctype_with_del_modifying_dunder_class_only_decrefs_once() leaks In-Reply-To: <1568366122.45.0.513132018706.issue38150@roundup.psfhosted.org> Message-ID: <1568389928.16.0.766237190965.issue38150@roundup.psfhosted.org> STINNER Victor added the comment: > Also, I thought that the PR build bots already ran refleak tests by default? Do you know why this it's not integrated to the PR flow? Checking for refleak takes between 2 and 6 hours. We would like to keep our pre-commit CI fast enough (less than 30 minutes). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 11:52:52 2019 From: report at bugs.python.org (Spandan Garg) Date: Fri, 13 Sep 2019 15:52:52 +0000 Subject: [issue38098] Special Characters Don't Work When Using Virtual Environment In-Reply-To: <1568158252.04.0.0991697281074.issue38098@roundup.psfhosted.org> Message-ID: <1568389972.41.0.89894137134.issue38098@roundup.psfhosted.org> Spandan Garg added the comment: This is the output of pip list with venv active: (aladdin_windows_env) C:\Users\t-spga\Documents\workspace\aladdin_windows_env>pip list DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning. adal (1.2.2) antlr4-python3-runtime (4.7.2) applicationinsights (0.11.9) argcomplete (1.10.0) asn1crypto (0.24.0) azure-batch (7.0.0) azure-cli (2.0.72) azure-cli-command-modules-nspkg (2.0.3) azure-cli-core (2.0.72) azure-cli-nspkg (3.0.4) azure-cli-telemetry (1.0.3) azure-common (1.1.23) azure-cosmos (3.1.1) azure-datalake-store (0.0.47) azure-functions-devops-build (0.0.22) azure-graphrbac (0.60.0) azure-keyvault (1.1.0) azure-kusto-data (0.0.33) azure-mgmt-advisor (2.0.1) azure-mgmt-apimanagement (0.1.0) azure-mgmt-appconfiguration (0.1.0) azure-mgmt-applicationinsights (0.1.1) azure-mgmt-authorization (0.52.0) azure-mgmt-batch (6.0.0) azure-mgmt-batchai (2.0.0) azure-mgmt-billing (0.2.0) azure-mgmt-botservice (0.2.0) azure-mgmt-cdn (3.1.0) azure-mgmt-cognitiveservices (5.0.0) azure-mgmt-compute (6.0.0) azure-mgmt-consumption (2.0.0) azure-mgmt-containerinstance (1.5.0) azure-mgmt-containerregistry (3.0.0rc5) azure-mgmt-containerservice (5.3.0) azure-mgmt-cosmosdb (0.7.0) azure-mgmt-datalake-analytics (0.2.1) azure-mgmt-datalake-nspkg (3.0.1) azure-mgmt-datalake-store (0.5.0) azure-mgmt-datamigration (0.1.0) azure-mgmt-deploymentmanager (0.1.0) azure-mgmt-devtestlabs (2.2.0) azure-mgmt-dns (2.1.0) azure-mgmt-eventgrid (2.2.0) azure-mgmt-eventhub (2.6.0) azure-mgmt-hdinsight (1.1.0) azure-mgmt-imagebuilder (0.2.1) azure-mgmt-iotcentral (1.0.0) azure-mgmt-iothub (0.8.2) azure-mgmt-iothubprovisioningservices (0.2.0) azure-mgmt-keyvault (1.1.0) azure-mgmt-kusto (0.3.0) azure-mgmt-loganalytics (0.2.0) azure-mgmt-managedservices (1.0.0) azure-mgmt-managementgroups (0.2.0) azure-mgmt-maps (0.1.0) azure-mgmt-marketplaceordering (0.2.1) azure-mgmt-media (1.1.1) azure-mgmt-monitor (0.5.2) azure-mgmt-msi (0.2.0) azure-mgmt-netapp (0.5.0) azure-mgmt-network (4.0.0) azure-mgmt-nspkg (3.0.2) azure-mgmt-policyinsights (0.3.1) azure-mgmt-privatedns (0.1.0) azure-mgmt-rdbms (1.9.0) azure-mgmt-recoveryservices (0.4.0) azure-mgmt-recoveryservicesbackup (0.4.0) azure-mgmt-redis (6.0.0) azure-mgmt-relay (0.1.0) azure-mgmt-reservations (0.3.1) azure-mgmt-resource (2.2.0) azure-mgmt-search (2.1.0) azure-mgmt-security (0.1.0) azure-mgmt-servicebus (0.6.0) azure-mgmt-servicefabric (0.2.0) azure-mgmt-signalr (0.3.0) azure-mgmt-sql (0.13.0) azure-mgmt-sqlvirtualmachine (0.4.0) azure-mgmt-storage (4.0.0) azure-mgmt-trafficmanager (0.51.0) azure-mgmt-web (0.42.0) azure-multiapi-storage (0.2.4) azure-nspkg (3.0.2) azure-storage-blob (1.5.0) azure-storage-common (1.4.2) bcrypt (3.1.7) certifi (2019.6.16) cffi (1.12.3) chardet (3.0.4) colorama (0.4.1) cryptography (2.7) fabric (2.5.0) gitdb2 (2.0.5) GitPython (2.1.11) humanfriendly (4.18) idna (2.8) invoke (1.3.0) isodate (0.6.0) javaproperties (0.5.1) Jinja2 (2.10.1) jmespath (0.9.4) jsondiff (1.2.0) knack (0.6.3) MarkupSafe (1.1.1) mock (2.0.0) msrest (0.6.10) msrestazure (0.6.1) oauthlib (3.1.0) paramiko (2.6.0) pbr (5.4.3) pip (9.0.3) portalocker (1.5.1) psutil (5.6.3) pycparser (2.19) pydocumentdb (2.3.3) Pygments (2.4.2) PyJWT (1.7.1) PyNaCl (1.3.0) pyOpenSSL (19.0.0) pypiwin32 (223) pyreadline (2.1) python-dateutil (2.8.0) python-git (2018.2.1) pytz (2019.1) pywin32 (224) PyYAML (5.1.2) requests (2.22.0) requests-oauthlib (1.2.0) ruamel.yaml (0.16.5) ruamel.yaml.clib (0.1.2) scp (0.13.2) Send2Trash (1.5.0) setuptools (39.0.1) six (1.12.0) smmap2 (2.0.5) sshtunnel (0.1.5) tabulate (0.8.3) urllib3 (1.25.3) vsts (0.1.25) vsts-cd-manager (1.0.2) websocket-client (0.56.0) wheel (0.30.0) xmltodict (0.12.0) You are using pip version 9.0.3, however version 19.2.3 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command. This is the output of pip list with venv deactivated: C:\Users\t-spga\Documents\workspace\aladdin_windows_env>pip list DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning. pip (9.0.3) setuptools (39.0.1) You are using pip version 9.0.3, however version 19.2.3 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command. Thanks! Spandan ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 11:53:15 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 13 Sep 2019 15:53:15 +0000 Subject: [issue37199] Test suite fails when Ipv6 is unavailable In-Reply-To: <1559926830.72.0.215725323123.issue37199@roundup.psfhosted.org> Message-ID: <1568389995.71.0.358631200656.issue37199@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 81319a81b2a3f42fe1047c2e6f5fd958faab6cdb by Benjamin Peterson (Zackery Spytz) in branch 'master': bpo-37199: Replace the early returns added in c2cda63. (GH-14535) https://github.com/python/cpython/commit/81319a81b2a3f42fe1047c2e6f5fd958faab6cdb ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 11:54:07 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 13 Sep 2019 15:54:07 +0000 Subject: [issue38150] test_capi: test_c_subclass_of_heap_ctype_with_del_modifying_dunder_class_only_decrefs_once() leaks In-Reply-To: <1568366122.45.0.513132018706.issue38150@roundup.psfhosted.org> Message-ID: <1568390047.66.0.3034225178.issue38150@roundup.psfhosted.org> St?phane Wirtel added the comment: Eddie, For the next time, when you change something in the C part, you could run the tests with this command: ./python -m test test_capi -R 3:3 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 11:54:08 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 15:54:08 +0000 Subject: [issue37199] Test suite fails when Ipv6 is unavailable In-Reply-To: <1559926830.72.0.215725323123.issue37199@roundup.psfhosted.org> Message-ID: <1568390048.46.0.428048668703.issue37199@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15727 pull_request: https://github.com/python/cpython/pull/16112 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 11:54:35 2019 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 13 Sep 2019 15:54:35 +0000 Subject: [issue37555] _CallList.__contains__ doesn't always respect ANY. In-Reply-To: <1562821924.84.0.134272462767.issue37555@roundup.psfhosted.org> Message-ID: <1568390075.73.0.123337512491.issue37555@roundup.psfhosted.org> Paul Ganssle added the comment: New changeset d6a9d17d8b6c68073931dd8ffa213b4ac351a4ab by Paul Ganssle (Elizabeth Uselton) in branch 'master': bpo-37555: Update _CallList.__contains__ to respect ANY (#14700) https://github.com/python/cpython/commit/d6a9d17d8b6c68073931dd8ffa213b4ac351a4ab ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 11:56:49 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 13 Sep 2019 15:56:49 +0000 Subject: [issue38161] AsyncMock add `.awaited` like `.called` In-Reply-To: <1568389768.59.0.850541174467.issue38161@roundup.psfhosted.org> Message-ID: <1568390209.24.0.310199673143.issue38161@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: awaited is now initialized with an Event object. Do you had any use case in mind while designing it? I think it's a good choice to have True/False instead of being used to give an Event object that is not used. ---------- nosy: +xtreak type: -> enhancement versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 12:01:23 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 16:01:23 +0000 Subject: [issue37449] Move ensurepip off of pkgutil and to importlib.resources In-Reply-To: <1561860772.49.0.185483718697.issue37449@roundup.psfhosted.org> Message-ID: <1568390483.39.0.46754570154.issue37449@roundup.psfhosted.org> miss-islington added the comment: New changeset 2ccb50cf773881255c5669942a093eb68ad042f6 by Miss Islington (bot) (Joannah Nanjekye) in branch 'master': bpo-37449: Move ensurepip off of pkgutil and to importlib.resources (GH-15109) https://github.com/python/cpython/commit/2ccb50cf773881255c5669942a093eb68ad042f6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 12:04:06 2019 From: report at bugs.python.org (Eddie Elizondo) Date: Fri, 13 Sep 2019 16:04:06 +0000 Subject: [issue38150] test_capi: test_c_subclass_of_heap_ctype_with_del_modifying_dunder_class_only_decrefs_once() leaks In-Reply-To: <1568366122.45.0.513132018706.issue38150@roundup.psfhosted.org> Message-ID: <1568390646.59.0.137203546159.issue38150@roundup.psfhosted.org> Eddie Elizondo added the comment: > Checking for refleak takes between 2 and 6 hours. Ouch! Makes sense then. We could potentially add a `pre-merge` job that only runs once the merge starts to get executed. Anyways, that's a conversation for another time :-) --- Thanks Stephane I'm very aware of that, I just thought that the build bots did that automatically at PR time. I rather have those drive the signal and letting my slow machine run for hours! Anyways, I'll just have to slightly change my workflow now ---------- nosy: -matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 12:05:15 2019 From: report at bugs.python.org (Eryk Sun) Date: Fri, 13 Sep 2019 16:05:15 +0000 Subject: [issue37609] support "UNC" device paths in ntpath.splitdrive In-Reply-To: <1563362794.09.0.456380769613.issue37609@roundup.psfhosted.org> Message-ID: <1568390715.47.0.96004958982.issue37609@roundup.psfhosted.org> Eryk Sun added the comment: Please consult the attached file "splitdrive.py". I redesigned splitdrive() to support "UNC" and "GLOBAL" junctions in device paths. I relaxed the design to allow repeated separators everywhere except for the UNC root. IIRC, Windows has supported this since XP. For example: >>> print(nt._getfullpathname('//server///share')) \\server\share >>> print(nt._getfullpathname(r'\\server\\\share')) \\server\share There are also a couple of minor behavior changes in the new implementation. The old implementation would split "//server/" as ('//server/', ''). Since there's no share, this should not count as a drive. The new implementation splits it as ('', '//server/'). Similarly it splits '//?/UNC/server/' as ('', '//?/UNC/server/'). The old implementation also allowed any character as a drive 'letter'. For example, it would split '/:/spam' as ('/:', '/spam'). The new implementation ensures that the drive letter in a DOS drive is alphabetic. I also extended test_splitdrive to use a list of test cases in order to avoid having to define each case twice. It calls tester() a second time for each case, with slash and backslash swapped. ---------- Added file: https://bugs.python.org/file48607/splitdrive.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 12:12:36 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 16:12:36 +0000 Subject: [issue37199] Test suite fails when Ipv6 is unavailable In-Reply-To: <1559926830.72.0.215725323123.issue37199@roundup.psfhosted.org> Message-ID: <1568391156.03.0.364963949157.issue37199@roundup.psfhosted.org> miss-islington added the comment: New changeset 83c21fdc36070f9fa3eb3b68181630e2cc6480fe by Miss Islington (bot) in branch '3.8': bpo-37199: Replace the early returns added in c2cda63. (GH-14535) https://github.com/python/cpython/commit/83c21fdc36070f9fa3eb3b68181630e2cc6480fe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 12:13:54 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 13 Sep 2019 16:13:54 +0000 Subject: [issue34706] Signature.from_callable sometimes drops subclassing In-Reply-To: <1537132321.64.0.956365154283.issue34706@psf.upfronthosting.co.za> Message-ID: <1568391234.51.0.440737708551.issue34706@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 5b9ff7a0dcb16d6f5c3cd4f1f52e0ca6a4bde586 by Gregory P. Smith in branch 'master': bpo-34706: Preserve subclassing in inspect.Signature.from_callable (GH-16108) https://github.com/python/cpython/commit/5b9ff7a0dcb16d6f5c3cd4f1f52e0ca6a4bde586 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 12:14:05 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 16:14:05 +0000 Subject: [issue34706] Signature.from_callable sometimes drops subclassing In-Reply-To: <1537132321.64.0.956365154283.issue34706@psf.upfronthosting.co.za> Message-ID: <1568391245.6.0.675196617129.issue34706@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15728 pull_request: https://github.com/python/cpython/pull/16113 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 12:14:12 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 16:14:12 +0000 Subject: [issue34706] Signature.from_callable sometimes drops subclassing In-Reply-To: <1537132321.64.0.956365154283.issue34706@psf.upfronthosting.co.za> Message-ID: <1568391252.75.0.573518944693.issue34706@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15729 pull_request: https://github.com/python/cpython/pull/16114 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 12:30:00 2019 From: report at bugs.python.org (Eddie Elizondo) Date: Fri, 13 Sep 2019 16:30:00 +0000 Subject: [issue38150] test_capi: test_c_subclass_of_heap_ctype_with_del_modifying_dunder_class_only_decrefs_once() leaks In-Reply-To: <1568366122.45.0.513132018706.issue38150@roundup.psfhosted.org> Message-ID: <1568392200.8.0.374681316964.issue38150@roundup.psfhosted.org> Change by Eddie Elizondo : ---------- keywords: +patch pull_requests: +15730 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16115 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 12:40:28 2019 From: report at bugs.python.org (Paul) Date: Fri, 13 Sep 2019 16:40:28 +0000 Subject: [issue5396] os.read not handling O_DIRECT flag In-Reply-To: <1235847751.77.0.558509867366.issue5396@psf.upfronthosting.co.za> Message-ID: <1568392828.38.0.720033215046.issue5396@roundup.psfhosted.org> Paul added the comment: I've dug into stracing this python program in 2.7 vs. 3.7. directread.py import mmap import os fd = os.open('/dev/dm-2', os.O_DIRECT | os.O_RDWR) # mapped block device fo = os.fdopen(fd, 'rb+') m = mmap.mmap(-1, 4096) fo.readinto(m) Python 2.7 result: ... open("/dev/dm-2", O_RDWR|O_DIRECT) = 3 ... mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0x7f743db31000 ... read(0x3, 0x7f743db31000, 0x1000) = 0x1000 ... Python 3.7 result: ... open("/dev/dm-2", O_RDWR|O_DIRECT|O_CLOEXEC) = 3 ... mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, -1, 0) = 0x7f5e087ee000 ... read(0x3, 0x256c8a0, 0x1000) = -1 (errno 22) Notice that Python 3 isn't using the mmap buffer for the read. Why is it using a stack buffer? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 12:40:23 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 16:40:23 +0000 Subject: [issue38092] environment variables not passed correctly using new virtualenv launching in windows and python3.7+ In-Reply-To: <1568122359.92.0.800539114246.issue38092@roundup.psfhosted.org> Message-ID: <1568392823.52.0.542793739125.issue38092@roundup.psfhosted.org> miss-islington added the comment: New changeset f2b7556ef851ac85e7cbf189d1b29fdeb9539b88 by Miss Islington (bot) (Steve Dower) in branch 'master': bpo-38092: Reduce overhead when using multiprocessing in a Windows virtual environment (GH-16098) https://github.com/python/cpython/commit/f2b7556ef851ac85e7cbf189d1b29fdeb9539b88 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 12:40:30 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 16:40:30 +0000 Subject: [issue38092] environment variables not passed correctly using new virtualenv launching in windows and python3.7+ In-Reply-To: <1568122359.92.0.800539114246.issue38092@roundup.psfhosted.org> Message-ID: <1568392830.85.0.345782257755.issue38092@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15731 pull_request: https://github.com/python/cpython/pull/16116 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 12:40:59 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 13 Sep 2019 16:40:59 +0000 Subject: [issue38122] AsyncMock force always creating an AsyncMock for child mocks In-Reply-To: <1568222694.73.0.217906468671.issue38122@roundup.psfhosted.org> Message-ID: <1568392859.12.0.203258060642.issue38122@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 14fd925a18fe3db0922a7d798e373102fe7a8a9c by St?phane Wirtel (Michael Foord) in branch 'master': bpo-38122: minor fixes to AsyncMock spec handling (GH-16099) https://github.com/python/cpython/commit/14fd925a18fe3db0922a7d798e373102fe7a8a9c ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 12:41:04 2019 From: report at bugs.python.org (Vinay Sharma) Date: Fri, 13 Sep 2019 16:41:04 +0000 Subject: [issue38035] shared_semaphores cannot be shared across unrelated processes In-Reply-To: <1567659668.43.0.186142682202.issue38035@roundup.psfhosted.org> Message-ID: <1568392864.54.0.469444523254.issue38035@roundup.psfhosted.org> Vinay Sharma added the comment: A common use for the same can be shared memory. Currently shared memory can be used by unrelated processes, but there is no mechanism as such to synchronise them at the moment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 12:41:20 2019 From: report at bugs.python.org (Davin Potts) Date: Fri, 13 Sep 2019 16:41:20 +0000 Subject: [issue35727] sys.exit() in a multiprocessing.Process does not align with Python behavior In-Reply-To: <1547321617.14.0.566390882886.issue35727@roundup.psfhosted.org> Message-ID: <1568392880.14.0.0579567388548.issue35727@roundup.psfhosted.org> Davin Potts added the comment: I believe the mentality behind multiprocessing.Process triggering an exit code of 1 when sys.exit() is invoked inside its process is to indicate a non-standard exit out of its execution. There may yet be other side effects that could be triggered by having a sys.exit(0) translate into an exit code of 0 from the Process's process -- and we might not notice them with the current tests. Was there a particular use case that motivates this suggested change? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 12:43:35 2019 From: report at bugs.python.org (Steve Dower) Date: Fri, 13 Sep 2019 16:43:35 +0000 Subject: [issue38092] environment variables not passed correctly using new virtualenv launching in windows and python3.7+ In-Reply-To: <1568122359.92.0.800539114246.issue38092@roundup.psfhosted.org> Message-ID: <1568393015.45.0.11517742596.issue38092@roundup.psfhosted.org> Steve Dower added the comment: Thanks for the report and partial patch! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 12:48:07 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 16:48:07 +0000 Subject: [issue38150] test_capi: test_c_subclass_of_heap_ctype_with_del_modifying_dunder_class_only_decrefs_once() leaks In-Reply-To: <1568366122.45.0.513132018706.issue38150@roundup.psfhosted.org> Message-ID: <1568393287.79.0.953497481094.issue38150@roundup.psfhosted.org> miss-islington added the comment: New changeset a67ac2f2d9550e5a36d28f9b6eeacf6575dda2d5 by Miss Islington (bot) (Eddie Elizondo) in branch 'master': bpo-38150 Fix refleak in the finalizer of a _testcapimodule type (GH-16115) https://github.com/python/cpython/commit/a67ac2f2d9550e5a36d28f9b6eeacf6575dda2d5 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 12:49:20 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 13 Sep 2019 16:49:20 +0000 Subject: [issue38150] test_capi: test_c_subclass_of_heap_ctype_with_del_modifying_dunder_class_only_decrefs_once() leaks In-Reply-To: <1568366122.45.0.513132018706.issue38150@roundup.psfhosted.org> Message-ID: <1568393360.18.0.65999169102.issue38150@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- pull_requests: +15732 pull_request: https://github.com/python/cpython/pull/16118 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 12:53:57 2019 From: report at bugs.python.org (Evgeniy Mischuk) Date: Fri, 13 Sep 2019 16:53:57 +0000 Subject: [issue38162] Import Long Load Message-ID: <1568393637.17.0.162733973896.issue38162@roundup.psfhosted.org> New submission from Evgeniy Mischuk : for in TMP_MAX dont break and always continue ---------- components: Windows messages: 352365 nosy: Evgeniy Mischuk, paul.moore, steve.dower, tim.golden, zach.ware priority: normal pull_requests: 15733 severity: normal status: open title: Import Long Load type: performance versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 12:55:25 2019 From: report at bugs.python.org (Julien Palard) Date: Fri, 13 Sep 2019 16:55:25 +0000 Subject: [issue33082] multiprocessing docs bury very important 'callback=' args In-Reply-To: <1521139850.07.0.467229070634.issue33082@psf.upfronthosting.co.za> Message-ID: <1568393725.44.0.88739522668.issue33082@roundup.psfhosted.org> Julien Palard added the comment: I agree Antoine on this one, if one want the result, It'll get it from the returned value (.get method in the example), or simply by using the not-async versions and directly get the results as a return value of the call. Also the given example in the documentation won't work as the result is never waited for, the pool gets destroyed before the sleep have the time to sleep. ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 12:55:59 2019 From: report at bugs.python.org (Julien Palard) Date: Fri, 13 Sep 2019 16:55:59 +0000 Subject: [issue33082] multiprocessing docs bury very important 'callback=' args In-Reply-To: <1521139850.07.0.467229070634.issue33082@psf.upfronthosting.co.za> Message-ID: <1568393759.93.0.406630086915.issue33082@roundup.psfhosted.org> Julien Palard added the comment: I'd wait for Davin's review, but I'd keep the documentation as they are. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 12:59:14 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 16:59:14 +0000 Subject: [issue38092] environment variables not passed correctly using new virtualenv launching in windows and python3.7+ In-Reply-To: <1568122359.92.0.800539114246.issue38092@roundup.psfhosted.org> Message-ID: <1568393954.28.0.506496972151.issue38092@roundup.psfhosted.org> miss-islington added the comment: New changeset 436b429ade87b10879b3f944e99a515478e86e5e by Miss Islington (bot) in branch '3.8': bpo-38092: Reduce overhead when using multiprocessing in a Windows virtual environment (GH-16098) https://github.com/python/cpython/commit/436b429ade87b10879b3f944e99a515478e86e5e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 13:04:23 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 13 Sep 2019 17:04:23 +0000 Subject: [issue32092] mock.patch with autospec does not consume self / cls argument In-Reply-To: <1511193021.31.0.213398074469.issue32092@psf.upfronthosting.co.za> Message-ID: <1568394263.15.0.862209286194.issue32092@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +cjw296, lisroach, mariocj89, xtreak versions: +Python 3.9 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 13:05:04 2019 From: report at bugs.python.org (Lisa Roach) Date: Fri, 13 Sep 2019 17:05:04 +0000 Subject: [issue38163] AsyncMock child mocks should detect their type Message-ID: <1568394304.53.0.898247355535.issue38163@roundup.psfhosted.org> New submission from Lisa Roach : We want child mocks to match their "type" (async or sync). Ex: class Prod: async def foo(): pass def bar(): pass a_mock = AsyncMock(Prod) isinstance(a_mock.foo(), AsyncMock) == True isinstance(a_mock.bar(), MagicMock) == True Also this should include magic methods: int(a_mock) should work and return 1 like MagicMocks do. a_mock.__enter__ should exist and be a MagicMock, just as a_mock.__aenter__ exists and is an AsyncMock. ---------- messages: 352369 nosy: lisroach priority: normal severity: normal status: open title: AsyncMock child mocks should detect their type _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 13:06:07 2019 From: report at bugs.python.org (Eryk Sun) Date: Fri, 13 Sep 2019 17:06:07 +0000 Subject: [issue38098] Special Characters Don't Work When Using Virtual Environment In-Reply-To: <1568158252.04.0.0991697281074.issue38098@roundup.psfhosted.org> Message-ID: <1568394367.71.0.0759969139887.issue38098@roundup.psfhosted.org> Eryk Sun added the comment: > pyreadline (2.1) The problem is pyreadline. It uses a low-level console read, but it fails to account for the Alt+Numpad sequence of input records that the console uses for non-OEM characters. IIRC, the Unicode character is only sent in the final input record of the sequence. ---------- nosy: +eryksun resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 13:10:56 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 13 Sep 2019 17:10:56 +0000 Subject: [issue38150] test_capi: test_c_subclass_of_heap_ctype_with_del_modifying_dunder_class_only_decrefs_once() leaks In-Reply-To: <1568366122.45.0.513132018706.issue38150@roundup.psfhosted.org> Message-ID: <1568394656.97.0.239022457419.issue38150@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 53ff2ca89feb90c1fbf2605321bcef35b457f16f by St?phane Wirtel in branch '3.8': [3.8] bpo-38150: Fix refleak in the finalizer of a _testcapimodule type (GH-16115) (GH-16118) https://github.com/python/cpython/commit/53ff2ca89feb90c1fbf2605321bcef35b457f16f ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 13:11:32 2019 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 13 Sep 2019 17:11:32 +0000 Subject: [issue38164] poloshing asyncio Streams API Message-ID: <1568394692.95.0.46825100333.issue38164@roundup.psfhosted.org> New submission from Yury Selivanov : Summary of discussion at https://github.com/python-trio/trio/issues/1208: * `asyncio.Stream.write()` will start throwing a `DeprecationWarning` asking people to add an `await` if they didn't; * `asyncio.Stream.close()` will start throwing a `DeprecationWarning` asking people to add an `await` if they didn't; * `asyncio.Stream.drain()` & `asyncio.Stream.wait_closed()` will start throwing a `DeprecationWarning` telling about a scheduled removal (in Python 3.12) when used on `Process.std*` streams; * `asyncio.Stream.drain()` & `asyncio.Stream.wait_closed()` will not work at all on Streams created via new 3.8 APIs: `connect()` & `StreamServer`. ---------- assignee: asvetlov components: asyncio messages: 352372 nosy: asvetlov, lukasz.langa, yselivanov priority: release blocker severity: normal stage: needs patch status: open title: poloshing asyncio Streams API type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 13:11:51 2019 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 13 Sep 2019 17:11:51 +0000 Subject: [issue38164] polishing asyncio Streams API In-Reply-To: <1568394692.95.0.46825100333.issue38164@roundup.psfhosted.org> Message-ID: <1568394711.48.0.204275428129.issue38164@roundup.psfhosted.org> Change by Yury Selivanov : ---------- title: poloshing asyncio Streams API -> polishing asyncio Streams API _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 13:12:29 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 13 Sep 2019 17:12:29 +0000 Subject: [issue38164] polishing asyncio Streams API In-Reply-To: <1568394692.95.0.46825100333.issue38164@roundup.psfhosted.org> Message-ID: <1568394749.73.0.796407001607.issue38164@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 13:12:39 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 13 Sep 2019 17:12:39 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1568394759.35.0.853594037924.issue24416@roundup.psfhosted.org> Raymond Hettinger added the comment: It's okay for the pure python equivalent to use collections.namedtuple so long as the C code uses structseq. As Serhiy points out, there is no need to reinvent the wheel. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 13:13:43 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 13 Sep 2019 17:13:43 +0000 Subject: [issue38163] AsyncMock child mocks should detect their type In-Reply-To: <1568394304.53.0.898247355535.issue38163@roundup.psfhosted.org> Message-ID: <1568394823.76.0.587441416769.issue38163@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 13:16:28 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 13 Sep 2019 17:16:28 +0000 Subject: [issue38150] test_capi: test_c_subclass_of_heap_ctype_with_del_modifying_dunder_class_only_decrefs_once() leaks In-Reply-To: <1568366122.45.0.513132018706.issue38150@roundup.psfhosted.org> Message-ID: <1568394988.68.0.895947956144.issue38150@roundup.psfhosted.org> St?phane Wirtel added the comment: Thank you, I close this issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 13:16:38 2019 From: report at bugs.python.org (Davin Potts) Date: Fri, 13 Sep 2019 17:16:38 +0000 Subject: [issue33082] multiprocessing docs bury very important 'callback=' args In-Reply-To: <1521139850.07.0.467229070634.issue33082@psf.upfronthosting.co.za> Message-ID: <1568394998.33.0.530705421936.issue33082@roundup.psfhosted.org> Davin Potts added the comment: I appreciate the functionality offered by the callbacks and have found good uses for them, as Chad clearly does/has. That said, the thought of expanding the documentation on the callbacks had not come up for me. Reading through the proposed changes to the prose explanations, the choice of words has changed but not significantly and virtually no new concepts are being explained. I agree with Julien that the docs should stay as they are. Chad: Thank you for advocating for things you think more people need to know about even if we do not update the docs this time. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 13:20:25 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 13 Sep 2019 17:20:25 +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: <1568395225.06.0.814253700254.issue32790@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset d44542f9a231bf725ecd82eb640a672c759a8227 by St?phane Wirtel (bchhabra2490) in branch 'master': bpo-32790: Add info about alt format using # for 'g' in chart (GH-6624) https://github.com/python/cpython/commit/d44542f9a231bf725ecd82eb640a672c759a8227 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 13:20:33 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 17:20:33 +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: <1568395233.81.0.57118595443.issue32790@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15734 pull_request: https://github.com/python/cpython/pull/16121 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 13:20:40 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 17:20:40 +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: <1568395240.69.0.463948048231.issue32790@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15735 pull_request: https://github.com/python/cpython/pull/16122 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 13:26:11 2019 From: report at bugs.python.org (Tim Peters) Date: Fri, 13 Sep 2019 17:26:11 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1568395571.85.0.184833107628.issue24416@roundup.psfhosted.org> Tim Peters added the comment: I agree with Raymond here: using collections.namedtuple is fine in the pure Python version. Since Raymond checked in doc changes to purge the phrase "struct sequences" (thanks again for that!), it's consistent with everything else now for the new datetime docs to say that this function returns a "named tuple" (the docs are now clear that there may be more than one implementation of such a thing, and that the only things you can _rely_ on are that they support named element access in addition to tuple methods). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 13:26:53 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 17:26:53 +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: <1568395613.96.0.487275643126.issue32790@roundup.psfhosted.org> miss-islington added the comment: New changeset 77878cadc58aaca234482dffbb5fe89c74c026fa by Miss Islington (bot) in branch '3.7': bpo-32790: Add info about alt format using GH- for 'g' in chart (GH-6624) https://github.com/python/cpython/commit/77878cadc58aaca234482dffbb5fe89c74c026fa ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 13:27:33 2019 From: report at bugs.python.org (Roundup Robot) Date: Fri, 13 Sep 2019 17:27:33 +0000 Subject: [issue38162] Import Long Load In-Reply-To: <1568393637.17.0.162733973896.issue38162@roundup.psfhosted.org> Message-ID: <1568395653.96.0.112604563636.issue38162@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +15736 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16120 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 13:28:49 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 17:28:49 +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: <1568395729.19.0.124102690847.issue32790@roundup.psfhosted.org> miss-islington added the comment: New changeset e6b14c026fd9045a0d460b62dbcb512fca4c64ec by Miss Islington (bot) in branch '3.8': bpo-32790: Add info about alt format using GH- for 'g' in chart (GH-6624) https://github.com/python/cpython/commit/e6b14c026fd9045a0d460b62dbcb512fca4c64ec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 13:29:44 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 13 Sep 2019 17:29:44 +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: <1568395784.22.0.616259688111.issue32790@roundup.psfhosted.org> St?phane Wirtel added the comment: Thank you for your PR and this issue, the PR is merged into master, 3.8 and 3.7. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 13:33:43 2019 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 13 Sep 2019 17:33:43 +0000 Subject: [issue24416] Have date.isocalendar() return a structseq instance In-Reply-To: <1433853440.83.0.506944331138.issue24416@psf.upfronthosting.co.za> Message-ID: <1568396023.3.0.945543720908.issue24416@roundup.psfhosted.org> Paul Ganssle added the comment: The current state of the PR doesn't hinge on the pure Python implementation, we went with a very simple tuple subclass to keep the two more closely in sync and because we don't need any of the additional functionality that namedtuple brings, but if it were any more complicated than what we did we probably would have just gone with a namedtuple. The only thing that's holding things up now is that we're working out a way to maintain the ability to pickle the object without making the class public. This is not really a hard requirement, but I'd like to give it an honest effort before calling it a day and just relying on "it's not in __all__, therefore it's not public." (I should note that we can only take that approach after issue #38155 is resolved, which is another reason for the delay). In any case, the bulk of the conversation on the implementation has been taking place on GH-15633, sorry for the split discussion location, folks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 13:42:38 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 13 Sep 2019 17:42:38 +0000 Subject: [issue34706] Signature.from_callable sometimes drops subclassing In-Reply-To: <1537132321.64.0.956365154283.issue34706@psf.upfronthosting.co.za> Message-ID: <1568396558.16.0.0715155502756.issue34706@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset cf25765cf79a5bd19ba90a535a51367d6177f2bc by St?phane Wirtel (Miss Islington (bot)) in branch '3.8': bpo-34706: Preserve subclassing in inspect.Signature.from_callable (GH-16108) (GH-16113) https://github.com/python/cpython/commit/cf25765cf79a5bd19ba90a535a51367d6177f2bc ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 13:42:56 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 13 Sep 2019 17:42:56 +0000 Subject: [issue34706] Signature.from_callable sometimes drops subclassing In-Reply-To: <1537132321.64.0.956365154283.issue34706@psf.upfronthosting.co.za> Message-ID: <1568396576.1.0.252635134889.issue34706@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 3906920cfecba83d529f8755f5ec2e53e49f9e90 by St?phane Wirtel (Miss Islington (bot)) in branch '3.7': bpo-34706: Preserve subclassing in inspect.Signature.from_callable (GH-16108) (GH-16114) https://github.com/python/cpython/commit/3906920cfecba83d529f8755f5ec2e53e49f9e90 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 13:50:05 2019 From: report at bugs.python.org (Evgeniy Mischuk) Date: Fri, 13 Sep 2019 17:50:05 +0000 Subject: [issue38165] freezes when loading a program on imports Message-ID: <1568397005.25.0.136695117075.issue38165@roundup.psfhosted.org> New submission from Evgeniy Mischuk : freezes when loading a program on imports because user rights are insufficient python installed on c:/ and requires administrator rights when run program from not root user ---------- components: Windows messages: 352384 nosy: Evgeniy Mischuk, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: freezes when loading a program on imports type: performance versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 13:54:13 2019 From: report at bugs.python.org (Evgeniy Mischuk) Date: Fri, 13 Sep 2019 17:54:13 +0000 Subject: [issue38165] freezes when loading a program on imports In-Reply-To: <1568397005.25.0.136695117075.issue38165@roundup.psfhosted.org> Message-ID: <1568397253.41.0.333853249981.issue38165@roundup.psfhosted.org> Change by Evgeniy Mischuk : ---------- keywords: +patch pull_requests: +15737 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16126 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 14:02:21 2019 From: report at bugs.python.org (Evgeniy Mischuk) Date: Fri, 13 Sep 2019 18:02:21 +0000 Subject: [issue38165] freezes when loading a program on imports In-Reply-To: <1568397005.25.0.136695117075.issue38165@roundup.psfhosted.org> Message-ID: <1568397741.2.0.583944594869.issue38165@roundup.psfhosted.org> Evgeniy Mischuk added the comment: https://drive.google.com/file/d/1tJhgN9mwyPrgQc2YCmuwKioH-65Y42l-/view?usp=sharing ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 14:03:09 2019 From: report at bugs.python.org (Evgeniy Mischuk) Date: Fri, 13 Sep 2019 18:03:09 +0000 Subject: [issue38165] freezes when loading a program on imports In-Reply-To: <1568397005.25.0.136695117075.issue38165@roundup.psfhosted.org> Message-ID: <1568397789.27.0.437533111715.issue38165@roundup.psfhosted.org> Evgeniy Mischuk added the comment: best interface site dont care about my eyes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 14:35:07 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 13 Sep 2019 18:35:07 +0000 Subject: [issue33214] join method for list and tuple In-Reply-To: <1522766033.22.0.467229070634.issue33214@psf.upfronthosting.co.za> Message-ID: <1568399707.75.0.577639475261.issue33214@roundup.psfhosted.org> Josh Rosenberg added the comment: Note that all of Serhiy's examples are for a known, fixed number of things to concatenate/union/merge. str.join's API can be used for that by wrapping the arguments in an anonymous tuple/list, but it's more naturally for a variable number of things, and the unpacking generalizations haven't reached the point where: [*seq for seq in allsequences] is allowed. list(itertools.chain.from_iterable(allsequences)) handles that just fine, but I could definitely see it being convenient to be able to do: [].join(allsequences) That said, a big reason str provides .join is because it's not uncommon to want to join strings with a repeated separator, e.g.: # For not-really-csv-but-people-do-it-anyway ','.join(row_strings) # Separate words with spaces ' '.join(words) # Separate lines with newlines '\n'.join(lines) I'm not seeing even one motivating use case for list.join/tuple.join that would actually join on a non-empty list or tuple ([None, 'STOP', None] being rather contrived). If that's not needed, it might make more sense to do this with an alternate constructor (a classmethod), e.g.: list.concat(allsequences) which would avoid the cost of creating an otherwise unused empty list (the empty tuple is a singleton, so no cost is avoided there). It would also work equally well with both tuple and list (where making list.extend take varargs wouldn't help tuple, though it's a perfectly worthy idea on its own). Personally, I don't find using itertools.chain (or its from_iterable alternate constructor) all that problematic (though I almost always import it with from itertools import chain to reduce the verbosity, especially when using chain.from_iterable). I think promoting itertools more is a good idea; right now, the notes on concatenation for sequence types mention str.join, bytes.join, and replacing tuple concatenation with a list that you call extend on, but doesn't mention itertools.chain at all, which seems like a failure to make the best solution the discoverable/obvious solution. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 14:37:05 2019 From: report at bugs.python.org (Eddie Elizondo) Date: Fri, 13 Sep 2019 18:37:05 +0000 Subject: [issue38152] AST change introduced tons of reference leaks In-Reply-To: <1568367428.12.0.614565351268.issue38152@roundup.psfhosted.org> Message-ID: <1568399825.75.0.728956783769.issue38152@roundup.psfhosted.org> Eddie Elizondo added the comment: I have a fix for this coming up. ---------- nosy: +eelizondo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 14:54:51 2019 From: report at bugs.python.org (Eddie Elizondo) Date: Fri, 13 Sep 2019 18:54:51 +0000 Subject: [issue38152] AST change introduced tons of reference leaks In-Reply-To: <1568367428.12.0.614565351268.issue38152@roundup.psfhosted.org> Message-ID: <1568400891.66.0.0747057557019.issue38152@roundup.psfhosted.org> Change by Eddie Elizondo : ---------- keywords: +patch pull_requests: +15738 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16127 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 15:41:01 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 13 Sep 2019 19:41:01 +0000 Subject: [issue37953] Fix ForwardRef equality checks In-Reply-To: <1566828364.46.0.753751170409.issue37953@roundup.psfhosted.org> Message-ID: <1568403661.13.0.913696808461.issue37953@roundup.psfhosted.org> Ivan Levkivskyi added the comment: New changeset e082e7cbe4a934b86f7a07354d97d4e14a9dd46a by Ivan Levkivskyi (plokmijnuhby) in branch 'master': bpo-37953: Fix ForwardRef hash and equality checks (GH-15400) https://github.com/python/cpython/commit/e082e7cbe4a934b86f7a07354d97d4e14a9dd46a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 15:41:06 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 19:41:06 +0000 Subject: [issue37953] Fix ForwardRef equality checks In-Reply-To: <1566828364.46.0.753751170409.issue37953@roundup.psfhosted.org> Message-ID: <1568403666.0.0.78636757064.issue37953@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15739 pull_request: https://github.com/python/cpython/pull/16128 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 15:50:32 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 13 Sep 2019 19:50:32 +0000 Subject: [issue38005] Coercing strings and non-integer numbers to interpreter ID and channel ID In-Reply-To: <1567415474.91.0.412541266394.issue38005@roundup.psfhosted.org> Message-ID: <1568404232.61.0.216118019816.issue38005@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset bf169915ecdd42329726104278eb723a7dda2736 by Serhiy Storchaka in branch 'master': bpo-38005: Fixed comparing and creating of InterpreterID and ChannelID. (GH-15652) https://github.com/python/cpython/commit/bf169915ecdd42329726104278eb723a7dda2736 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 15:50:38 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 19:50:38 +0000 Subject: [issue38005] Coercing strings and non-integer numbers to interpreter ID and channel ID In-Reply-To: <1567415474.91.0.412541266394.issue38005@roundup.psfhosted.org> Message-ID: <1568404238.72.0.35910819911.issue38005@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15740 pull_request: https://github.com/python/cpython/pull/16129 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 16:00:42 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 13 Sep 2019 20:00:42 +0000 Subject: [issue37953] Fix ForwardRef equality checks In-Reply-To: <1566828364.46.0.753751170409.issue37953@roundup.psfhosted.org> Message-ID: <1568404842.71.0.780788058814.issue37953@roundup.psfhosted.org> miss-islington added the comment: New changeset e91edfed4214dbae17b8906b5dc7778769aac620 by Miss Islington (bot) in branch '3.8': bpo-37953: Fix ForwardRef hash and equality checks (GH-15400) https://github.com/python/cpython/commit/e91edfed4214dbae17b8906b5dc7778769aac620 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 16:05:54 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 13 Sep 2019 20:05:54 +0000 Subject: [issue37953] Fix ForwardRef equality checks In-Reply-To: <1566828364.46.0.753751170409.issue37953@roundup.psfhosted.org> Message-ID: <1568405154.66.0.307490028744.issue37953@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 16:34:32 2019 From: report at bugs.python.org (Michael Mol) Date: Fri, 13 Sep 2019 20:34:32 +0000 Subject: [issue5396] os.read not handling O_DIRECT flag In-Reply-To: <1235847751.77.0.558509867366.issue5396@psf.upfronthosting.co.za> Message-ID: <1568406872.32.0.773189594457.issue5396@roundup.psfhosted.org> Michael Mol added the comment: I wound up writing it in C++ instead, and my then-employer eventually opened my code. https://github.com/VirtualInterconnect/diskstress ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 17:37:27 2019 From: report at bugs.python.org (Matej Cepl) Date: Fri, 13 Sep 2019 21:37:27 +0000 Subject: [issue36274] http.client cannot send non-ASCII request lines In-Reply-To: <1552422803.93.0.420596825145.issue36274@roundup.psfhosted.org> Message-ID: <1568410647.99.0.57384727261.issue36274@roundup.psfhosted.org> Change by Matej Cepl : ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 17:48:54 2019 From: report at bugs.python.org (Justin McCann) Date: Fri, 13 Sep 2019 21:48:54 +0000 Subject: [issue38166] ast identifies incorrect column for compound attribute lookups Message-ID: <1568411334.98.0.109884794691.issue38166@roundup.psfhosted.org> New submission from Justin McCann : This issue is related to https://github.com/microsoft/vscode-python/issues/7327 and https://github.com/PyCQA/pylint/issues/3103 For compound attribute access in variable references like a.b.c.d, the AST reports the column of the first variable/attribute in the sequence instead of the specific attribute location. For example, the location of c is reported as column 0 (a) and not column 4 (c). Here's the AST test case provided by a pylint developer in a comment on pylint issue 3103; I confirmed the behavior is the same in python 3.8.0b4. ``` $ python3.8 Python 3.8.0b4 (v3.8.0b4:d93605de72, Aug 29 2019, 21:47:47) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import ast >>> body = ast.parse(''' ... print(x.item.akey > 2) ... ''') >>> # x.item ... x_item = body.body[0].value.args[0].left.value >>> print(x_item, x_item.attr, x_item.col_offset) <_ast.Attribute object at 0x10a7751f0> item 6 >>> # x.item.akey ... print(x_item.value, x_item.value.col_offset) . ### probably should be 8 <_ast.Name object at 0x10a775280> 6 ``` Related issues: * https://bugs.python.org/issue1440601 Add col information to parse & ast nodes * https://bugs.python.org/issue10769 ast: provide more useful range information Here is the resulting confusion when you use this output in pylint (and then VSCode highlights only "x" since it's the variable that starts in column 0): Original pylint/vscode testcase: ``` class TestMe: def __init__(self): self.item = {'akey': 42} self.again = self x = TestMe() ### pylint error message here is ### testme.py:11:6: E1101: Instance of 'dict' has no 'akey' member (no-member) ### The problem is with `x.item`, but pylint shows the column for `x` print(x.item.akey > 2) print(x.again.item.doesnotexist) ``` Current behavior $ pylint testme.py -rn -sn ************* Module testme testme.py:10:6: E1101: Instance of 'dict' has no 'akey' member (no-member) testme.py:12:6: E1101: Instance of 'dict' has no 'doesnotexist' member (no-member) Expected behavior $ pylint testme.py -rn -sn ************* Module testme testme.py:10:8: E1101: Instance of 'dict' has no 'akey' member (no-member) testme.py:12:14: E1101: Instance of 'dict' has no 'doesnotexist' member (no-member) $ pylint --version output pylint 2.3.1 astroid 2.2.5 Python 3.7.4 (default, Jul 9 2019, 18:13:23) [Clang 10.0.1 (clang-1001.0.46.4)] ---------- components: Library (Lib) messages: 352393 nosy: Justin McCann priority: normal severity: normal status: open title: ast identifies incorrect column for compound attribute lookups type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 17:52:45 2019 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 13 Sep 2019 21:52:45 +0000 Subject: [issue38052] Include sspipe Module with Core Python In-Reply-To: <1567878619.06.0.744538231736.issue38052@roundup.psfhosted.org> Message-ID: <1568411565.67.0.929606616522.issue38052@roundup.psfhosted.org> Guido van Rossum added the comment: Sorry to burst your bubble, but I don't see a reason to include this in the stdlib. Is there any reason why it can't be a dependency living on PyPI just like the packages you used in the example (numpy, pandas)? Surely this isn't a category killer? You have *53* stars on GitHub. I think you're misunderstanding the purpose of the stdlib. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 19:09:17 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 13 Sep 2019 23:09:17 +0000 Subject: [issue38035] shared_semaphores cannot be shared across unrelated processes In-Reply-To: <1567659668.43.0.186142682202.issue38035@roundup.psfhosted.org> Message-ID: <1568416157.84.0.799014181073.issue38035@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: -ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 19:13:24 2019 From: report at bugs.python.org (Juan Telleria) Date: Fri, 13 Sep 2019 23:13:24 +0000 Subject: [issue38052] Include sspipe Module with Core Python In-Reply-To: <1567878619.06.0.744538231736.issue38052@roundup.psfhosted.org> Message-ID: <1568416404.38.0.993205650506.issue38052@roundup.psfhosted.org> Juan Telleria added the comment: Even if it is not currently mainstream, piping (tidy and readable code, left to right), should be a foundation, not just a module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 19:17:26 2019 From: report at bugs.python.org (Christopher Hunt) Date: Fri, 13 Sep 2019 23:17:26 +0000 Subject: [issue35727] sys.exit() in a multiprocessing.Process does not align with Python behavior In-Reply-To: <1547321617.14.0.566390882886.issue35727@roundup.psfhosted.org> Message-ID: <1568416646.43.0.38554699783.issue35727@roundup.psfhosted.org> Christopher Hunt added the comment: > I believe the mentality behind multiprocessing.Process triggering an exit code of 1 when sys.exit() is invoked inside its process is to indicate a non-standard exit out of its execution. Can I ask what this is based on? I did a pretty good amount of digging but didn't find any justification for it. It just seems like a simple oversight to me. > There may yet be other side effects that could be triggered by having a sys.exit(0) translate into an exit code of 0 from the Process's process -- and we might not notice them with the current tests. This is definitely a behavior change and will break any code that currently relies on `sys.exit(None)` or `sys.exit()` exiting with a non-zero exit code from a multiprocessing.Process. The fact that all documentation indicates that `sys.exit(None)` or `sys.exit()` results in a 0 exit code in normal Python (with no documentation on it related to multiprocessing) makes me think that any code relying on this behavior is subtly broken, however. Any impacted user can update their code and explicitly pass 1 to `sys.exit`, which should be forward and backwards compatible. > Was there a particular use case that motivates this suggested change? I have a wrapper library that invokes arbitrary user code and attempts to behave as if that code was executed in a vanilla Python process, to include propagating the correct exit code. Currently I have a workaround here: https://github.com/chrahunt/quicken/blob/2dd00a5f024d7b114b211aad8a2618ec8f101956/quicken/_internal/server.py#L344-L353, but it would be nice to get rid of it in 5-6 years if this fix gets in and the non-conformant Python versions fall out of support. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 19:28:40 2019 From: report at bugs.python.org (Paul) Date: Fri, 13 Sep 2019 23:28:40 +0000 Subject: [issue38167] O_DIRECT read fails with 4K mmap buffer Message-ID: <1568417320.49.0.42295605579.issue38167@roundup.psfhosted.org> New submission from Paul : The following Python3 script fails. import mmap import os fd = os.open(path_to_file, os.O_DIRECT | os.O_RDWR) fo = os.fdopen(fd, 'rb+') m = mmap.mmap(-1, 4096) fo.readinto(m) But it worked for Python2. It also works for any other multiple of 4K. For example: m = mmap.mmap(-1, 8192) fo.readinto(m) Is fine! ---------- components: IO messages: 352397 nosy: yoyoyopcp priority: normal severity: normal status: open title: O_DIRECT read fails with 4K mmap buffer type: behavior versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 19:46:01 2019 From: report at bugs.python.org (Paul) Date: Fri, 13 Sep 2019 23:46:01 +0000 Subject: [issue38167] O_DIRECT read fails with 4K mmap buffer In-Reply-To: <1568417320.49.0.42295605579.issue38167@roundup.psfhosted.org> Message-ID: <1568418361.92.0.609226786416.issue38167@roundup.psfhosted.org> Change by Paul : ---------- keywords: +patch pull_requests: +15741 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16130 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 19:58:56 2019 From: report at bugs.python.org (Paul) Date: Fri, 13 Sep 2019 23:58:56 +0000 Subject: [issue38167] O_DIRECT read fails with 4K mmap buffer In-Reply-To: <1568417320.49.0.42295605579.issue38167@roundup.psfhosted.org> Message-ID: <1568419136.19.0.801446131202.issue38167@roundup.psfhosted.org> Change by Paul : ---------- pull_requests: +15742 pull_request: https://github.com/python/cpython/pull/16131 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 20:14:39 2019 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 14 Sep 2019 00:14:39 +0000 Subject: [issue38052] Include sspipe Module with Core Python In-Reply-To: <1567878619.06.0.744538231736.issue38052@roundup.psfhosted.org> Message-ID: <1568420079.44.0.200986978712.issue38052@roundup.psfhosted.org> Guido van Rossum added the comment: I'm going to close this. I find your example hard to understand. If you want to discuss this on python-ideas or discourse, go ahead, but this is not ready for a PEP or for stdlib inclusion. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 20:35:48 2019 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 14 Sep 2019 00:35:48 +0000 Subject: [issue33095] Cross-reference isolated mode from relevant locations In-Reply-To: <1521352636.34.0.467229070634.issue33095@psf.upfronthosting.co.za> Message-ID: <1568421348.32.0.458239421742.issue33095@roundup.psfhosted.org> Nick Coghlan added the comment: New changeset bdd6945d4dbd1fe6a7fcff95f7d6908db7d791a1 by Nick Coghlan (Xtreak) in branch 'master': bpo-33095: Add reference to isolated mode in -m and script option (GH-7764) https://github.com/python/cpython/commit/bdd6945d4dbd1fe6a7fcff95f7d6908db7d791a1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 23:08:51 2019 From: report at bugs.python.org (hongweipeng) Date: Sat, 14 Sep 2019 03:08:51 +0000 Subject: [issue37806] Infinite recursion with typing.get_type_hints In-Reply-To: <1565414817.02.0.248356075738.issue37806@roundup.psfhosted.org> Message-ID: <1568430531.68.0.820116726913.issue37806@roundup.psfhosted.org> hongweipeng added the comment: This report can be closed, PR #15400 has solved this issue. ---------- nosy: +hongweipeng _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 23:10:38 2019 From: report at bugs.python.org (hongweipeng) Date: Sat, 14 Sep 2019 03:10:38 +0000 Subject: [issue37806] Infinite recursion with typing.get_type_hints In-Reply-To: <1565414817.02.0.248356075738.issue37806@roundup.psfhosted.org> Message-ID: <1568430638.05.0.703103816213.issue37806@roundup.psfhosted.org> hongweipeng added the comment: Sorry, the link is https://github.com/python/cpython/pull/15400 . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 23:20:15 2019 From: report at bugs.python.org (Tim Peters) Date: Sat, 14 Sep 2019 03:20:15 +0000 Subject: [issue38105] hash collision when hash(x) == -2 causes many calls to __eq__ In-Reply-To: <1568197761.75.0.53300036491.issue38105@roundup.psfhosted.org> Message-ID: <1568431215.45.0.233115141099.issue38105@roundup.psfhosted.org> Tim Peters added the comment: Some results of the "add perturb shifted left 1 instead" approach. These come from using an old pile of Python code I have that allows for easy investigation of different collision probe strategies. - As expected, because it has no fixed points, there are no bad cases in a dict/set with only two elements, _unless_ you're searching for a third distinct element. Ironically, if they all, e.g., have hash code -2, no problem at all: then 3 probes settle it. But if they're "random" hash codes (hashes of strings are good enough for testing this), then every now and again it can take up to 10 probes. It all depends on accidents of how the various bits get fed in across perturb shifts. However, with random hashes, searching for an element that's there never takes more than 2 probes in the new way (again because there's never a fixed point). Under the current way I've seen it take as many as 6. - On average, with random hashes and 2 elements in an 8-slot table, the average number of probes with a successful search fall from 1.07 to 1.06, and on an unsuccessful search from 1.33 to 1.30. Theoretically ideal ("uniform hashing" - each object visits the slots in its own random permutation of slot order) are 1.06/1.29. - Random hashes in an 8-slot table: average # probes for successful and failing searches 1 entry current 1.00 1.14 new 1.00 1.12 ideal 1.00 1.12 2 entries current 1.07 1.33 new 1.06 1.30 ideal 1.06 1.29 3 entries current 1.16 1.60 new 1.14 1.56 ideal 1.14 1.50 4 entries current 1.27 2.00 new 1.25 1.93 ideal 1.23 1.80 5 entries current 1.42 2.66 new 1.38 2.56 ideal 1.34 2.25 Note: those aren't typos ;-) For example, if there's only 1 entry, how can it take more than one probe for a failing search? Easy! The first probe hits the only entry, it doesn't match, and so it takes a second probe to be sure the new element isn't present. In a perfect world, that would happen 12.5% of the time (1 in 8). But in the presence of fixed points ("current"), it can take _more_ than 2. The most probes I saw in "current" was 6 (it hit the only entry 5 times in a row). - That account ends at 5 entries because we don't let an 8-slot table contain more than 5 entries. - Small as those differences are, they get smaller for larger tables. By the time we get to 1024 slots, three digits aren't enough to distinguish "current" from "ideal". Even at 256 slots, it's just 1-or-2 ULP wobble. So that's the good side: - Eliminates the "surprises" in this bug report. - For more realistic ordinary cases ("random" hashes), for small tables it buys small but very consistent reductions in average probes needed for both successful and failing searches. It also, in general (but not spelled out above), cuts the rare longest probe chains. The bad side: - For small tables we're talking about nanoseconds regardless. - That adding a new shift is "free" relies on that x86's LEA instruction supports implicitly shifting an addend, and on compilers exploiting that. - Some cases will get worse. That's just pragmatic fact. The intuition here is that `perturb` is _trying_ to get high-order hash bits into play, and "current" gets 5 more into play on each iteration. But "new" shifts perturb left 1 before adding, preventing them from having any effect at all on the last new bit. This can have seemingly chaotic effects. For example, with entries of the form i*1024 in a table with 2**13 slots and 5,461 entries ("full" - the most we allow), current 3.09 5.52 new 3.22 4.78 ideal 1.65 3.00 So the change hurts successful lookups but helps failing ones. For a full table with 16 slots, the reverse. For a full table with 2**10 slots, it hurts both. Bottom line? You tell me :-) It's just not compelling to me either way. If I were writing the code from scratch, I'd do it. But because of seemingly chaotic effects talked about near the end above, there's always a danger _some_ code important to someone will take a hit. It's just as true that their code will enjoy an unexpected speed boost, but nobody screams about those ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 23:33:08 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Sat, 14 Sep 2019 03:33:08 +0000 Subject: [issue38167] O_DIRECT read fails with 4K mmap buffer In-Reply-To: <1568417320.49.0.42295605579.issue38167@roundup.psfhosted.org> Message-ID: <1568431988.94.0.623370112424.issue38167@roundup.psfhosted.org> Josh Rosenberg added the comment: Works just fine for me on 3.7.3 on Ubuntu, reading 4096 bytes. How is it failing for you? Is an exception raised? It does seem faintly dangerous to explicitly use O_DIRECT when you're wrapping it in a buffered reader that doesn't know it has to read in units matching the minimum block size (file system dependent on older kernels, 512 bytes in Linux kernel 2.6+); BufferedIOBase.readinto is explicitly documented to potentially issue multiple read calls (readinto1 guarantees it won't do that at least). ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 13 23:47:59 2019 From: report at bugs.python.org (Paul) Date: Sat, 14 Sep 2019 03:47:59 +0000 Subject: [issue38167] O_DIRECT read fails with 4K mmap buffer In-Reply-To: <1568417320.49.0.42295605579.issue38167@roundup.psfhosted.org> Message-ID: <1568432879.17.0.20235694782.issue38167@roundup.psfhosted.org> Paul added the comment: This is the platform that I'm working on as well as the failure. I have a review out for a fix. # uname -a Linux init129-13 3.10.0-957.el7.x86_64 x86_64 x86_64 x86_64 GNU/Linux # python3.7 directread.py Traceback (most recent call last): File "small.py", line 7, in fo.readinto(m) OSError: [Errno 22] Invalid argument ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 00:31:45 2019 From: report at bugs.python.org (Ma Lin) Date: Sat, 14 Sep 2019 04:31:45 +0000 Subject: [issue21872] LZMA library sometimes fails to decompress a file In-Reply-To: <1403720935.87.0.990494824612.issue21872@psf.upfronthosting.co.za> Message-ID: <1568435505.34.0.581997018173.issue21872@roundup.psfhosted.org> Ma Lin added the comment: Some memos: 1, In liblzma, these missing bytes were copied inside `dict_repeat` function: 788 case SEQ_COPY: 789 // Repeat len bytes from distance of rep0. 790 if (unlikely(dict_repeat(&dict, rep0, &len))) { See liblzma's source code (xz-5.2 branch): https://git.tukaani.org/?p=xz.git;a=blob;f=src/liblzma/lzma/lzma_decoder.c 2, Above replies said xz's command line tools can extract the problematic files successfully. This is because xz checks `if (avail_out == 0)` first, then checks `if (avail_in == 0)` See `uncompress` function in this source code (xz-5.2 branch): https://git.tukaani.org/?p=xz.git;a=blob;f=src/xzdec/xzdec.c;hb=refs/heads/v5.2 This check order just avoids the problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 00:55:07 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Sep 2019 04:55:07 +0000 Subject: [issue35379] IDLE's close fails when io.filename set to None In-Reply-To: <1543775410.03.0.788709270274.issue35379@psf.upfronthosting.co.za> Message-ID: <1568436907.47.0.194094353721.issue35379@roundup.psfhosted.org> Terry J. Reedy added the comment: The get_saved tracebacks reported in #35263 and #38128 are the same except for line numbers. The more recent, from 3 days ago on Mac. Exception in Tkinter callback Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/tkinter/__init__.py", line 1883, in __call__ return self.func(*args) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/multicall.py", line 176, in handler r = l[i](event) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/filelist.py", line 54, in close_all_callback reply = edit.close() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/pyshell.py", line 1008, in close return EditorWindow.close(self) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/editor.py", line 1077, in close reply = self.maybesave() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/outwin.py", line 94, in maybesave return 'yes' if self.get_saved() else 'no' File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/idlelib/editor.py", line 1010, in get_saved return self.undo.get_saved() AttributeError: 'NoneType' object has no attribute 'get_saved' None.filename from a day ago is also the same except for line numbers. pyshell line 1008 is in PyShell(OutputWindow(EditorWindow)) so get_saved must result from closing Shell. pyshell line 309 is in PyShellEditorWindow(EditorWindow) so must come from closing an editor window. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 01:07:37 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 14 Sep 2019 05:07:37 +0000 Subject: [issue37806] Infinite recursion with typing.get_type_hints In-Reply-To: <1565414817.02.0.248356075738.issue37806@roundup.psfhosted.org> Message-ID: <1568437657.95.0.0107426092397.issue37806@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 01:27:22 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Sep 2019 05:27:22 +0000 Subject: [issue38128] IDLE undo calls get_saved() when set to None In-Reply-To: <1568260409.36.0.994615457064.issue38128@roundup.psfhosted.org> Message-ID: <1568438842.15.0.796224753302.issue38128@roundup.psfhosted.org> Terry J. Reedy added the comment: None.get_saved (closing shell) was reported in #35263. None.filename (closing editor) was reported in #35379. Up-to-date reports in one page were a bit helpful. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> IDLE's close fails when io.filename set to None _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 01:27:34 2019 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 14 Sep 2019 05:27:34 +0000 Subject: [issue38160] Add a "PyInterpreterState *" field to PyTypeObject. In-Reply-To: <1568382066.13.0.705348880841.issue38160@roundup.psfhosted.org> Message-ID: <1CE7B619-19A7-45F6-9DCF-D72D19F36CCD@behnel.de> Stefan Behnel added the comment: I think access to the global module state is the most critical for an extension, probably by far. A direct pointer to the interpreter state from every type feels like an optimisation that may be premature at this point. Modules should have that reference, though, as long as we assume a unique interpreter for each module instance (which we currently do). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 01:40:15 2019 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Sat, 14 Sep 2019 05:40:15 +0000 Subject: [issue35379] IDLE's close fails when io.filename set to None In-Reply-To: <1543775410.03.0.788709270274.issue35379@psf.upfronthosting.co.za> Message-ID: <1568439615.88.0.692648804475.issue35379@roundup.psfhosted.org> Change by Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) : ---------- keywords: +patch pull_requests: +15743 stage: -> patch review pull_request: https://github.com/python/cpython/pull/10564 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 01:40:45 2019 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Sat, 14 Sep 2019 05:40:45 +0000 Subject: [issue35479] multiprocessing.Pool.join() always takes at least 100 ms In-Reply-To: <1544661414.71.0.788709270274.issue35479@psf.upfronthosting.co.za> Message-ID: <1568439645.47.0.799441433672.issue35479@roundup.psfhosted.org> Change by Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) : ---------- pull_requests: +15744 pull_request: https://github.com/python/cpython/pull/10564 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 01:52:18 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Sep 2019 05:52:18 +0000 Subject: [issue35263] Add None handling for get_saved() in IDLE In-Reply-To: <1542349566.92.0.788709270274.issue35263@psf.upfronthosting.co.za> Message-ID: <1568440338.49.0.935958221177.issue35263@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> IDLE's close fails when io.filename set to None _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 02:07:17 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Sep 2019 06:07:17 +0000 Subject: [issue35379] IDLE's close fails io is set to None on Mac In-Reply-To: <1543775410.03.0.788709270274.issue35379@psf.upfronthosting.co.za> Message-ID: <1568441237.97.0.107967129325.issue35379@roundup.psfhosted.org> Terry J. Reedy added the comment: Raymond, I presume 1. your tracebacks are on macOS. 2. They occur with installed, not repository Python. 3. The missing attribute depends on whether Shell or an editor window is closed either only or last. Please verify. What macOS version? python.org installer? I cannot, at least now, reproduce this on my Macbook with macOS Mohave (? the latest version) running 3.7.4 ('python3') from Terminal. What could be different your system. The macOS version? Were your 3.8 reports based on the last beta (.0b4)? I also cannot reproduce on Win10 running installed 3.7.4 or 3.8.0b4 from Command Prompt with the py launcher, I do not have any problems when closing. --- When running from repository 3.8 or 3.9 (master), but not 3.7, is see the following if a Shell is closed, last or not. Exception ignored in: Traceback (most recent call last): File "f:\dev\38\lib\idlelib\run.py", line 488, in close File "f:\dev\38\lib\idlelib\pyshell.py", line 1020, in close File "f:\dev\38\lib\idlelib\editor.py", line 1062, in close File "f:\dev\38\lib\idlelib\outwin.py", line 94, in maybesave File "f:\dev\38\lib\idlelib\editor.py", line 995, in get_saved AttributeError: 'NoneType' object has no attribute 'get_saved' The get_saved fix proposed in PR 10564 (object.method() => object and object.method()) will fix this also. But I want to try changing the closing order first. Tal and Cheryl, other people testing might be helpful. ---------- nosy: +cheryl.sabella, taleinat -ronaldoussoren stage: patch review -> title: IDLE's close fails when io.filename set to None -> IDLE's close fails io is set to None on Mac _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 02:12:05 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 14 Sep 2019 06:12:05 +0000 Subject: [issue37953] Fix ForwardRef equality checks In-Reply-To: <1566828364.46.0.753751170409.issue37953@roundup.psfhosted.org> Message-ID: <1568441525.85.0.119828113481.issue37953@roundup.psfhosted.org> Change by Zackery Spytz : ---------- pull_requests: +15745 pull_request: https://github.com/python/cpython/pull/16133 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 02:12:11 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 14 Sep 2019 06:12:11 +0000 Subject: [issue35379] IDLE's close fails io is set to None on Mac In-Reply-To: <1543775410.03.0.788709270274.issue35379@psf.upfronthosting.co.za> Message-ID: <1568441531.64.0.31583694881.issue35379@roundup.psfhosted.org> Raymond Hettinger added the comment: 1. your tracebacks are on macOS. Yes 2. They occur with installed, not repository Python. python installer 3. The missing attribute depends on whether Shell or an editor window is closed either only or last. I don't know the trigger event What macOS version? Mojave 10.14.6 python.org installer? https://www.python.org/ftp/python/3.8.0/python-3.8.0b4-macosx10.9.pkg Thanks for looking at this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 02:13:42 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 14 Sep 2019 06:13:42 +0000 Subject: [issue35379] IDLE's close fails io is set to None on Mac In-Reply-To: <1543775410.03.0.788709270274.issue35379@psf.upfronthosting.co.za> Message-ID: <1568441622.23.0.426895876377.issue35379@roundup.psfhosted.org> Raymond Hettinger added the comment: Also, the way I start IDLE is from a terminal session: $ python3.8 -m idlelib.idle ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 02:17:23 2019 From: report at bugs.python.org (hai shi) Date: Sat, 14 Sep 2019 06:17:23 +0000 Subject: [issue38168] Reflaks in setint() of mmapmodule.c Message-ID: <1568441843.93.0.712377390707.issue38168@roundup.psfhosted.org> New submission from hai shi : As the title said, in `setint` function, the refcount of `o` should decreased all the time. ---------- components: Interpreter Core messages: 352412 nosy: shihai1991 priority: normal severity: normal status: open title: Reflaks in setint() of mmapmodule.c type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 02:18:26 2019 From: report at bugs.python.org (Zackery Spytz) Date: Sat, 14 Sep 2019 06:18:26 +0000 Subject: [issue37953] Fix ForwardRef equality checks In-Reply-To: <1566828364.46.0.753751170409.issue37953@roundup.psfhosted.org> Message-ID: <1568441906.71.0.992325859381.issue37953@roundup.psfhosted.org> Zackery Spytz added the comment: There are deprecation warnings in test_typing. ./python -m test test_typing Run tests sequentially 0:00:00 load avg: 0.16 [1/1] test_typing /home/lubuntu2/cpython/Lib/test/test_typing.py:2382: DeprecationWarning: Please use assertEqual instead. self.assertEquals(Union[c1, c1_gth], Union[c1]) /home/lubuntu2/cpython/Lib/test/test_typing.py:2383: DeprecationWarning: Please use assertEqual instead. self.assertEquals(Union[c1, c1_gth, int], Union[c1, int]) == Tests result: SUCCESS == 1 test OK. Total duration: 215 ms Tests result: SUCCESS I've created PR 16133 to fix them. ---------- nosy: +ZackerySpytz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 02:18:47 2019 From: report at bugs.python.org (hai shi) Date: Sat, 14 Sep 2019 06:18:47 +0000 Subject: [issue38168] Refleaks in setint() of mmapmodule.c In-Reply-To: <1568441843.93.0.712377390707.issue38168@roundup.psfhosted.org> Message-ID: <1568441927.76.0.123049611933.issue38168@roundup.psfhosted.org> Change by hai shi : ---------- title: Reflaks in setint() of mmapmodule.c -> Refleaks in setint() of mmapmodule.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 02:21:12 2019 From: report at bugs.python.org (hai shi) Date: Sat, 14 Sep 2019 06:21:12 +0000 Subject: [issue38168] Refleaks in setint() of mmapmodule.c In-Reply-To: <1568441843.93.0.712377390707.issue38168@roundup.psfhosted.org> Message-ID: <1568442072.1.0.439249891029.issue38168@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +15746 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16136 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 02:23:07 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Sep 2019 06:23:07 +0000 Subject: [issue38050] open('file.txt') path not found In-Reply-To: <1567853158.61.0.971448699802.issue38050@roundup.psfhosted.org> Message-ID: <1568442187.37.0.992216839769.issue38050@roundup.psfhosted.org> Terry J. Reedy added the comment: I strongly doubt that IDLE crashed, as opposed to showing a traceback generated by Python. If Python crashes, IDLE restarts instead of crashing. I am closing this because all the essential information is still missing a week after it was requested. There is currently nothing to be done. If and when there is, we can reopen. Sean, see https://stackoverflow.com/help/minimal-reproducible-example for instance, on how to report a possible bug. ---------- assignee: terry.reedy -> stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 02:28:09 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Sep 2019 06:28:09 +0000 Subject: [issue38057] Docs: source code don't can be translate In-Reply-To: <1567954703.31.0.993707976717.issue38057@roundup.psfhosted.org> Message-ID: <1568442489.88.0.346657136372.issue38057@roundup.psfhosted.org> Terry J. Reedy added the comment: This tracker is for issues possibly leading to patches for the CPython repository. Translations are not part of this repository and I am pretty sure that .po files are not either. ---------- nosy: +terry.reedy resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 02:42:34 2019 From: report at bugs.python.org (Maria Alguea) Date: Sat, 14 Sep 2019 06:42:34 +0000 Subject: [issue38052] Include sspipe Module with Core Python In-Reply-To: <1567878619.06.0.744538231736.issue38052@roundup.psfhosted.org> Message-ID: <1568443354.71.0.45395543895.issue38052@roundup.psfhosted.org> Maria Alguea added the comment: Will discuss it on the Mailing Lists. Thank you. Yet is important it is important to understand this powerful concept, based on R's pipe: https://magrittr.tidyverse.org Eg: MyObj = Class \ .method1() %>% f_function1() \ # Obj is 1st argument .method2() %>% f_function2(param1 = "ABC", param2 = .) And in the last function, the the previous object is saved named as a for "." ---------- nosy: +Maria Alguea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 02:48:56 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 14 Sep 2019 06:48:56 +0000 Subject: [issue35379] IDLE's close fails io is set to None on Mac In-Reply-To: <1543775410.03.0.788709270274.issue35379@psf.upfronthosting.co.za> Message-ID: <1568443736.36.0.293347289189.issue35379@roundup.psfhosted.org> Terry J. Reedy added the comment: What happens if you immediately close the Shell window? Perhaps your bug only appears after some amount of activity. (This is not true of the one I see with repository python.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 03:07:30 2019 From: report at bugs.python.org (Juan Telleria) Date: Sat, 14 Sep 2019 07:07:30 +0000 Subject: [issue38052] Include sspipe Module with Core Python In-Reply-To: <1567878619.06.0.744538231736.issue38052@roundup.psfhosted.org> Message-ID: <1568444850.99.0.00933109608858.issue38052@roundup.psfhosted.org> Juan Telleria added the comment: And based on previous example, a more "pythonic" syntax would: MyObj = Class \ .method1() \ .f_function1() \ .method2() \ .f_function2(param1 = "A", param2 = .) So that any function preceded by a dot "." becomes a forward-pipe function (Object reference is passed forward). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 03:22:33 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 14 Sep 2019 07:22:33 +0000 Subject: [issue38122] AsyncMock force always creating an AsyncMock for child mocks In-Reply-To: <1568222694.73.0.217906468671.issue38122@roundup.psfhosted.org> Message-ID: <1568445753.37.0.959400816373.issue38122@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- pull_requests: +15747 pull_request: https://github.com/python/cpython/pull/16137 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 03:43:02 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 14 Sep 2019 07:43:02 +0000 Subject: [issue37953] Fix ForwardRef equality checks In-Reply-To: <1566828364.46.0.753751170409.issue37953@roundup.psfhosted.org> Message-ID: <1568446982.07.0.692632239131.issue37953@roundup.psfhosted.org> miss-islington added the comment: New changeset d057b896f97e6d7447b9bf9246770c41cf205299 by Miss Islington (bot) (Zackery Spytz) in branch 'master': bpo-37953: Fix deprecation warnings in test_typing (GH-16133) https://github.com/python/cpython/commit/d057b896f97e6d7447b9bf9246770c41cf205299 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 03:44:27 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 14 Sep 2019 07:44:27 +0000 Subject: [issue37953] Fix ForwardRef equality checks In-Reply-To: <1566828364.46.0.753751170409.issue37953@roundup.psfhosted.org> Message-ID: <1568447067.97.0.32277127854.issue37953@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15748 pull_request: https://github.com/python/cpython/pull/16138 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 03:44:31 2019 From: report at bugs.python.org (Vinay Sharma) Date: Sat, 14 Sep 2019 07:44:31 +0000 Subject: [issue38169] Increase Code Coverage for SharedMemory and ShareableListe Message-ID: <1568447071.93.0.822548908149.issue38169@roundup.psfhosted.org> New submission from Vinay Sharma : Add Tests for SharedMemory and ShareableList. I have also added a check to prevent users from creating shared memory of size 0, because after creating mmap will throw error while memory mapping she of size 0. ---------- components: Tests messages: 352420 nosy: vinay0410 priority: normal severity: normal status: open title: Increase Code Coverage for SharedMemory and ShareableListe versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 03:54:50 2019 From: report at bugs.python.org (Vinay Sharma) Date: Sat, 14 Sep 2019 07:54:50 +0000 Subject: [issue38169] Increase Code Coverage for SharedMemory and ShareableListe In-Reply-To: <1568447071.93.0.822548908149.issue38169@roundup.psfhosted.org> Message-ID: <1568447690.17.0.0104746144477.issue38169@roundup.psfhosted.org> Change by Vinay Sharma : ---------- keywords: +patch pull_requests: +15749 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16139 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 04:02:23 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 14 Sep 2019 08:02:23 +0000 Subject: [issue37953] Fix ForwardRef equality checks In-Reply-To: <1566828364.46.0.753751170409.issue37953@roundup.psfhosted.org> Message-ID: <1568448143.99.0.814144839447.issue37953@roundup.psfhosted.org> miss-islington added the comment: New changeset 66da347ef0034ad9bddc7fad112025c886249f0d by Miss Islington (bot) in branch '3.8': bpo-37953: Fix deprecation warnings in test_typing (GH-16133) https://github.com/python/cpython/commit/66da347ef0034ad9bddc7fad112025c886249f0d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 04:38:00 2019 From: report at bugs.python.org (Christian Heimes) Date: Sat, 14 Sep 2019 08:38:00 +0000 Subject: [issue33936] OPENSSL_VERSION_1_1 never defined in _hashopenssl.c In-Reply-To: <1529635821.29.0.56676864532.issue33936@psf.upfronthosting.co.za> Message-ID: <1568450280.99.0.302725352735.issue33936@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +15750 pull_request: https://github.com/python/cpython/pull/16140 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 04:40:46 2019 From: report at bugs.python.org (Christian Heimes) Date: Sat, 14 Sep 2019 08:40:46 +0000 Subject: [issue33936] OPENSSL_VERSION_1_1 never defined in _hashopenssl.c In-Reply-To: <1529635821.29.0.56676864532.issue33936@psf.upfronthosting.co.za> Message-ID: <1568450446.26.0.99720201987.issue33936@roundup.psfhosted.org> Change by Christian Heimes : ---------- nosy: +gregory.p.smith versions: +Python 2.7, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 05:01:05 2019 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 14 Sep 2019 09:01:05 +0000 Subject: [issue21705] cgi.py: Multipart with more than one file is misparsed In-Reply-To: <1402401424.17.0.414317354507.issue21705@psf.upfronthosting.co.za> Message-ID: <1568451665.89.0.174536573865.issue21705@roundup.psfhosted.org> Change by Dong-hee Na : ---------- resolution: -> fixed stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 05:24:09 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 14 Sep 2019 09:24:09 +0000 Subject: [issue37206] Incorrect application of Argument Clinic to dict.pop() In-Reply-To: <1560019685.35.0.640301237908.issue37206@roundup.psfhosted.org> Message-ID: <1568453049.59.0.229404818271.issue37206@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 279f44678c8b84a183f9eeb85e0b086228154497 by Serhiy Storchaka in branch 'master': bpo-37206: Unrepresentable default values no longer represented as None. (GH-13933) https://github.com/python/cpython/commit/279f44678c8b84a183f9eeb85e0b086228154497 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 05:32:08 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 14 Sep 2019 09:32:08 +0000 Subject: [issue37206] Incorrect application of Argument Clinic to dict.pop() In-Reply-To: <1560019685.35.0.640301237908.issue37206@roundup.psfhosted.org> Message-ID: <1568453528.78.0.495104687402.issue37206@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +15751 pull_request: https://github.com/python/cpython/pull/16141 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 05:37:11 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 14 Sep 2019 09:37:11 +0000 Subject: [issue26360] Deadlock in thread.join on Python 2.7/Mac OS X 10.9, 10.10 In-Reply-To: <1455449924.98.0.400633064774.issue26360@psf.upfronthosting.co.za> Message-ID: <1568453831.84.0.308565835999.issue26360@roundup.psfhosted.org> Mark Dickinson added the comment: > Maybe issue38106 related. That looks plausible, but unfortunately I'm still able to reproduce the hang with your PR (commit 9b135c02aa1edab4c99c915c43cd62d988f1f9c1, macOS 10.14.6). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 05:46:29 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 14 Sep 2019 09:46:29 +0000 Subject: [issue26360] Deadlock in thread.join on Python 2.7/macOS In-Reply-To: <1455449924.98.0.400633064774.issue26360@psf.upfronthosting.co.za> Message-ID: <1568454389.77.0.241164637351.issue26360@roundup.psfhosted.org> Change by Mark Dickinson : ---------- title: Deadlock in thread.join on Python 2.7/Mac OS X 10.9, 10.10 -> Deadlock in thread.join on Python 2.7/macOS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 05:57:36 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 14 Sep 2019 09:57:36 +0000 Subject: [issue37168] Decimal divisions sometimes 10x or 100x too large In-Reply-To: <1559772321.45.0.42770583159.issue37168@roundup.psfhosted.org> Message-ID: <1568455056.65.0.097817464093.issue37168@roundup.psfhosted.org> Change by Steven D'Aprano : ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 06:01:08 2019 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 14 Sep 2019 10:01:08 +0000 Subject: [issue33282] Subprocess Popen communicate hung if stdin not given to Popen, even though script not expecting any input In-Reply-To: <1523791534.02.0.682650639539.issue33282@psf.upfronthosting.co.za> Message-ID: <1568455268.63.0.666691563866.issue33282@roundup.psfhosted.org> Dong-hee Na added the comment: I would like to recommend this kind of question should be discussed at comp.lang.python mailing list. If cpython bug is detected from this issue. Please reopen this issue. Thanks! ---------- nosy: +corona10 resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 06:31:53 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 14 Sep 2019 10:31:53 +0000 Subject: [issue37206] Incorrect application of Argument Clinic to dict.pop() In-Reply-To: <1560019685.35.0.640301237908.issue37206@roundup.psfhosted.org> Message-ID: <1568457113.74.0.654539226498.issue37206@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset d322abbb83eb751045246a70f39d040d13a6108b by Serhiy Storchaka in branch '3.8': [3.8] bpo-37206: Unrepresentable default values no longer represented as None. (GH-13933) (GH-16141) https://github.com/python/cpython/commit/d322abbb83eb751045246a70f39d040d13a6108b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 07:56:51 2019 From: report at bugs.python.org (Tahia K) Date: Sat, 14 Sep 2019 11:56:51 +0000 Subject: [issue38158] PyType_Spec docs list non-existant field "doc" In-Reply-To: <1568372797.52.0.257422503496.issue38158@roundup.psfhosted.org> Message-ID: <1568462211.51.0.222032372903.issue38158@roundup.psfhosted.org> Change by Tahia K : ---------- keywords: +patch pull_requests: +15752 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/16142 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 07:59:17 2019 From: report at bugs.python.org (Tahia K) Date: Sat, 14 Sep 2019 11:59:17 +0000 Subject: [issue38158] PyType_Spec docs list non-existant field "doc" In-Reply-To: <1568372797.52.0.257422503496.issue38158@roundup.psfhosted.org> Message-ID: <1568462357.9.0.247872575004.issue38158@roundup.psfhosted.org> Tahia K added the comment: Awesome - just posted the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 08:46:46 2019 From: report at bugs.python.org (Tal Einat) Date: Sat, 14 Sep 2019 12:46:46 +0000 Subject: [issue35379] IDLE's close fails io is set to None on Mac In-Reply-To: <1543775410.03.0.788709270274.issue35379@psf.upfronthosting.co.za> Message-ID: <1568465206.57.0.527932993958.issue35379@roundup.psfhosted.org> Tal Einat added the comment: I've also seen these occasionally, but I haven't yet found a way to reproduce consistently. Regardless, IMO the shutdown close() and _close() should be the places handling shutdown-related exceptions if possible. In all of the tracebacks posted here, as well as those in #35263 and #17822, one such method is in the call chain, and it could simply catch and handle the raised exception. I also think these are clear improvements that are safe to include, even without understanding the full details of the sequences of events leading to the errors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 09:19:47 2019 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 14 Sep 2019 13:19:47 +0000 Subject: [issue38170] imghdr: Support detecting heif Message-ID: <1568467187.41.0.178563820912.issue38170@roundup.psfhosted.org> New submission from Dong-hee Na : I've found that imghdr does not detect HEIF type yet. I'd like to propose adding to detect HEIF type. There's already real-life usage within HEIF (https://help.dropbox.com/en-es/installs-integrations/mobile/ios-formats) And also we can find a bunch of HEIF related programming issue such as Stack Overflow. IMHO, supporting the detecting HEIF type is not a bad idea. I want to hear core developers' opinion about this issue. reference: https://github.com/strukturag/libheif/issues/83#issuecomment-421427091 ---------- messages: 352428 nosy: corona10, rhettinger priority: low severity: normal status: open title: imghdr: Support detecting heif versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 09:35:27 2019 From: report at bugs.python.org (Patrick Monnerat) Date: Sat, 14 Sep 2019 13:35:27 +0000 Subject: [issue38171] super() is passing wrong parameters while handling diamond inheritance Message-ID: <1568468127.45.0.322825823369.issue38171@roundup.psfhosted.org> New submission from Patrick Monnerat : Running the attached program outputs: -------- top.__init__(<__main__.top object at 0x7fc1dea24048>,) called i1.__init__(<__main__.top object at 0x7fc1dea24048>, 'arg from top') called i2.__init__(<__main__.top object at 0x7fc1dea24048>, 'arg from i1') called base.__init__(<__main__.top object at 0x7fc1dea24048>, 'arg from i2') called base.__init__ returns None i2.__init__ returns None i1.__init__ returns None top.__init__ returns None -------- i2.__init__() argument is wrong: since it is is not a parent class of i1, it should be "arg from top". I can understand i2.__init__() is called after i1.__init__() and before base.__init__() but arguments given to super(i1, self).__init__() should not be substituted for calling i2.__init__(). ---------- files: super.py messages: 352429 nosy: monnerat priority: normal severity: normal status: open title: super() is passing wrong parameters while handling diamond inheritance type: behavior Added file: https://bugs.python.org/file48608/super.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 09:37:39 2019 From: report at bugs.python.org (Dino Viehland) Date: Sat, 14 Sep 2019 13:37:39 +0000 Subject: [issue38140] Py_tp_dictoffset / Py_tp_finalize are unsettable in stable API In-Reply-To: <1568297060.68.0.400472303762.issue38140@roundup.psfhosted.org> Message-ID: <1568468259.16.0.0721405546471.issue38140@roundup.psfhosted.org> Change by Dino Viehland : ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 09:38:37 2019 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 14 Sep 2019 13:38:37 +0000 Subject: [issue38170] imghdr: Support detecting heif In-Reply-To: <1568467187.41.0.178563820912.issue38170@roundup.psfhosted.org> Message-ID: <1568468317.56.0.576818530047.issue38170@roundup.psfhosted.org> Dong-hee Na added the comment: https://mpeg.chiariglione.org/standards/mpeg-h/image-file-format ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 09:44:48 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 14 Sep 2019 13:44:48 +0000 Subject: [issue38171] super() is passing wrong parameters while handling diamond inheritance In-Reply-To: <1568468127.45.0.322825823369.issue38171@roundup.psfhosted.org> Message-ID: <1568468688.95.0.508198607907.issue38171@roundup.psfhosted.org> Change by Steven D'Aprano : ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 10:11:18 2019 From: report at bugs.python.org (Christian Heimes) Date: Sat, 14 Sep 2019 14:11:18 +0000 Subject: [issue38153] Normalize hashing algorithm names In-Reply-To: <1568368232.54.0.0384008471773.issue38153@roundup.psfhosted.org> Message-ID: <1568470278.42.0.869708686177.issue38153@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +15753 pull_request: https://github.com/python/cpython/pull/16143 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 10:12:47 2019 From: report at bugs.python.org (Christian Heimes) Date: Sat, 14 Sep 2019 14:12:47 +0000 Subject: [issue38153] Normalize hashing algorithm names In-Reply-To: <1568368232.54.0.0384008471773.issue38153@roundup.psfhosted.org> Message-ID: <1568470367.72.0.554950643331.issue38153@roundup.psfhosted.org> Change by Christian Heimes : ---------- pull_requests: +15754 pull_request: https://github.com/python/cpython/pull/16144 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 10:20:30 2019 From: report at bugs.python.org (Dino Viehland) Date: Sat, 14 Sep 2019 14:20:30 +0000 Subject: [issue38116] Make select module PEP-384 compatible In-Reply-To: <1568213295.38.0.552886185542.issue38116@roundup.psfhosted.org> Message-ID: <1568470830.56.0.0993758182014.issue38116@roundup.psfhosted.org> Dino Viehland added the comment: New changeset f919054e539a5c1afde1b31c9fd7a8f5b2313311 by Dino Viehland in branch 'master': bpo-38116: Convert select module to PEP-384 (#15971) https://github.com/python/cpython/commit/f919054e539a5c1afde1b31c9fd7a8f5b2313311 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 10:47:40 2019 From: report at bugs.python.org (Cooper Lees) Date: Sat, 14 Sep 2019 14:47:40 +0000 Subject: [issue38172] Python 3.8 Segfult with Bandersnatch pytest Suite Message-ID: <1568472460.87.0.817204992487.issue38172@roundup.psfhosted.org> New submission from Cooper Lees : Haven't done research but bandersnatch's (https://github.com/pypa/bandersnatch) Unit tests pass in 3.7 and cause Python to Segmentation Fault in Python 3.8.0b4+. ``` py38 run-test: commands[0] | coverage run -m pytest ============================= test session starts ============================== platform linux -- Python 3.8.0b4+, pytest-5.1.2, py-1.8.0, pluggy-0.13.0 cachedir: .tox/py38/.pytest_cache rootdir: /home/travis/build/pypa/bandersnatch, inifile: pytest.ini plugins: timeout-1.3.3 Fatal Python error: Segmentation fault ``` Full failure on Travis CI: https://travis-ci.org/pypa/bandersnatch/jobs/584973434 ---------- messages: 352432 nosy: cooperlees priority: normal severity: normal status: open title: Python 3.8 Segfult with Bandersnatch pytest Suite type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 10:48:53 2019 From: report at bugs.python.org (Cooper Lees) Date: Sat, 14 Sep 2019 14:48:53 +0000 Subject: [issue38172] Python 3.8 Segfult with Bandersnatch pytest Suite In-Reply-To: <1568472460.87.0.817204992487.issue38172@roundup.psfhosted.org> Message-ID: <1568472533.93.0.443968025313.issue38172@roundup.psfhosted.org> Cooper Lees added the comment: Seems to be with coverage actually. ``` ERROR: InvocationError for command /home/travis/build/pypa/bandersnatch/.tox/py38/bin/coverage run -m pytest (exited with code -11) ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 10:58:37 2019 From: report at bugs.python.org (Cooper Lees) Date: Sat, 14 Sep 2019 14:58:37 +0000 Subject: [issue38172] Python 3.8 Segfult with Bandersnatch pytest Suite In-Reply-To: <1568472460.87.0.817204992487.issue38172@roundup.psfhosted.org> Message-ID: <1568473117.4.0.506389964503.issue38172@roundup.psfhosted.org> Cooper Lees added the comment: Adding in Nightly Passed: https://travis-ci.org/pypa/bandersnatch/jobs/584977510 Current 3.8 beta still failing: https://travis-ci.org/pypa/bandersnatch/builds/584977503 So please just close if the bug was known etc. and I'll just live with the failing test until the next 3.8 comes out. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 11:01:49 2019 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 14 Sep 2019 15:01:49 +0000 Subject: [issue38170] imghdr: Support detecting heif In-Reply-To: <1568467187.41.0.178563820912.issue38170@roundup.psfhosted.org> Message-ID: <1568473309.72.0.89719870921.issue38170@roundup.psfhosted.org> Dong-hee Na added the comment: Oh.. but PEP 594 is planning to remove imghdr. (https://www.python.org/dev/peps/pep-0594) It looks like that adding a new feature is not proper. I close this issue because of PEP 594 ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 11:29:58 2019 From: report at bugs.python.org (Christian Heimes) Date: Sat, 14 Sep 2019 15:29:58 +0000 Subject: [issue38153] Normalize hashing algorithm names In-Reply-To: <1568368232.54.0.0384008471773.issue38153@roundup.psfhosted.org> Message-ID: <1568474998.25.0.883505897146.issue38153@roundup.psfhosted.org> Christian Heimes added the comment: New changeset eb2b0c694aef6122fdf95015abb24e0d095b6401 by Christian Heimes in branch 'master': bpo-38153: detect shake independently from sha3 (GH-16143) https://github.com/python/cpython/commit/eb2b0c694aef6122fdf95015abb24e0d095b6401 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 11:33:28 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 14 Sep 2019 15:33:28 +0000 Subject: [issue38171] super() is passing wrong parameters while handling diamond inheritance In-Reply-To: <1568468127.45.0.322825823369.issue38171@roundup.psfhosted.org> Message-ID: <1568475208.09.0.235746661065.issue38171@roundup.psfhosted.org> Mark Dickinson added the comment: This isn't a bug: super is behaving as designed and as intended here, and indeed with a diamond inheritance structure you'll see super calling "across" from one class to its sibling. That's part of how it works. There's lots of thoughtful writing out there about super; try the following for starters. - https://fuhm.net/super-harmful/ - https://rhettinger.wordpress.com/2011/05/26/super-considered-super/ - https://www.artima.com/weblogs/viewpost.jsp?thread=236275 ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 11:34:56 2019 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 14 Sep 2019 15:34:56 +0000 Subject: [issue38173] [EASY] tkinter.filedialog.askopenfilenames should follow PEP8 Message-ID: <1568475296.23.0.464650205482.issue38173@roundup.psfhosted.org> New submission from Dong-hee Na : https://github.com/python/cpython/blob/39d87b54715197ca9dcb6902bb43461c0ed701a2/Lib/tkinter/filedialog.py#L397 This should be options["multiple"]=1 -> options["multiple"] = 1 ---------- components: Tkinter messages: 352438 nosy: corona10, taleinat priority: low severity: normal status: open title: [EASY] tkinter.filedialog.askopenfilenames should follow PEP8 versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 11:35:15 2019 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 14 Sep 2019 15:35:15 +0000 Subject: [issue38173] [EASY] tkinter.filedialog.askopenfilenames should follow PEP8 In-Reply-To: <1568475296.23.0.464650205482.issue38173@roundup.psfhosted.org> Message-ID: <1568475315.03.0.00812206632587.issue38173@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +newcomer friendly _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 11:41:26 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 14 Sep 2019 15:41:26 +0000 Subject: [issue38171] super() is passing wrong parameters while handling diamond inheritance In-Reply-To: <1568468127.45.0.322825823369.issue38171@roundup.psfhosted.org> Message-ID: <1568475686.81.0.927108862554.issue38171@roundup.psfhosted.org> Change by Mark Dickinson : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 12:01:02 2019 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 14 Sep 2019 16:01:02 +0000 Subject: [issue26360] Deadlock in thread.join on Python 2.7/macOS In-Reply-To: <1455449924.98.0.400633064774.issue26360@psf.upfronthosting.co.za> Message-ID: <1568476861.99.0.121653932499.issue26360@roundup.psfhosted.org> Mark Dickinson added the comment: FWIW, I've confirmed again that the exact same script on the same machine seems fine under Python 3.x. Given the imminent demise of Python 2, perhaps this issue is just destined to be an unsolved historical oddity. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 12:02:06 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 14 Sep 2019 16:02:06 +0000 Subject: [issue38173] [EASY] tkinter.filedialog.askopenfilenames should follow PEP8 In-Reply-To: <1568475296.23.0.464650205482.issue38173@roundup.psfhosted.org> Message-ID: <1568476926.92.0.880375759022.issue38173@roundup.psfhosted.org> Serhiy Storchaka added the comment: We usually do not accept pure cosmetic changes. >From PEP 8: Some other good reasons to ignore a particular guideline: 3. Because the code in question predates the introduction of the guideline and there is no other reason to be modifying that code. ---------- nosy: +serhiy.storchaka resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 12:09:32 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 14 Sep 2019 16:09:32 +0000 Subject: [issue38005] Coercing strings and non-integer numbers to interpreter ID and channel ID In-Reply-To: <1567415474.91.0.412541266394.issue38005@roundup.psfhosted.org> Message-ID: <1568477372.49.0.856955536556.issue38005@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +15755 pull_request: https://github.com/python/cpython/pull/16145 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 12:23:08 2019 From: report at bugs.python.org (Eddie Elizondo) Date: Sat, 14 Sep 2019 16:23:08 +0000 Subject: [issue38152] AST change introduced tons of reference leaks In-Reply-To: <1568367428.12.0.614565351268.issue38152@roundup.psfhosted.org> Message-ID: <1568478188.06.0.536232016579.issue38152@roundup.psfhosted.org> Eddie Elizondo added the comment: The PR has been merged so the issue can be closed now ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 12:36:22 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 14 Sep 2019 16:36:22 +0000 Subject: [issue38005] Coercing strings and non-integer numbers to interpreter ID and channel ID In-Reply-To: <1567415474.91.0.412541266394.issue38005@roundup.psfhosted.org> Message-ID: <1568478982.83.0.60443590036.issue38005@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset f37a9831027ecfe948697cdb5e35b417805d94e5 by Serhiy Storchaka in branch '3.8': [3.8] bpo-38005: Fixed comparing and creating of InterpreterID and ChannelID. (GH-15652) (GH-16145) https://github.com/python/cpython/commit/f37a9831027ecfe948697cdb5e35b417805d94e5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 12:40:54 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 14 Sep 2019 16:40:54 +0000 Subject: [issue38005] Coercing strings and non-integer numbers to interpreter ID and channel ID In-Reply-To: <1567415474.91.0.412541266394.issue38005@roundup.psfhosted.org> Message-ID: <1568479254.35.0.408004074229.issue38005@roundup.psfhosted.org> Serhiy Storchaka added the comment: I would remove also converting a string to InterpreterID. The code would be simpler without it. I left it because there was explicit tests for it, but what is a use case for InterpreterID(string)? ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 12:46:31 2019 From: report at bugs.python.org (Ammar Askar) Date: Sat, 14 Sep 2019 16:46:31 +0000 Subject: [issue38152] AST change introduced tons of reference leaks In-Reply-To: <1568367428.12.0.614565351268.issue38152@roundup.psfhosted.org> Message-ID: <1568479591.21.0.801723229233.issue38152@roundup.psfhosted.org> Change by Ammar Askar : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 13:26:40 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 14 Sep 2019 17:26:40 +0000 Subject: [issue34155] [CVE-2019-16056] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1568482000.98.0.0409088043018.issue34155@roundup.psfhosted.org> miss-islington added the comment: New changeset 4cbcd2f8c4e12b912e4d21fd892eedf7a3813d8e by Miss Islington (bot) (Roberto C. S?nchez) in branch '2.7': [2.7] bpo-34155: Dont parse domains containing @ (GH-13079) (GH-16006) https://github.com/python/cpython/commit/4cbcd2f8c4e12b912e4d21fd892eedf7a3813d8e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 13:36:08 2019 From: report at bugs.python.org (hongweipeng) Date: Sat, 14 Sep 2019 17:36:08 +0000 Subject: [issue35696] remove unnecessary operation in long_compare() In-Reply-To: <1547025999.59.0.0318422017652.issue35696@roundup.psfhosted.org> Message-ID: <1568482568.3.0.409391422752.issue35696@roundup.psfhosted.org> Change by hongweipeng : ---------- pull_requests: +15756 pull_request: https://github.com/python/cpython/pull/16146 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 13:43:40 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 14 Sep 2019 17:43:40 +0000 Subject: [issue34155] [CVE-2019-16056] email.utils.parseaddr mistakenly parse an email In-Reply-To: <1532012023.85.0.56676864532.issue34155@psf.upfronthosting.co.za> Message-ID: <1568483020.62.0.865283862254.issue34155@roundup.psfhosted.org> Abhilash Raj added the comment: Merged in 2.7, closing this one finally! Thanks to everyone who helped with this :) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 14:11:02 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 14 Sep 2019 18:11:02 +0000 Subject: [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1568484662.28.0.378970671111.issue37635@roundup.psfhosted.org> Change by Kyle Stanley : ---------- keywords: +patch pull_requests: +15757 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16147 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 14:17:57 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 14 Sep 2019 18:17:57 +0000 Subject: [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1568485077.23.0.38840218161.issue37635@roundup.psfhosted.org> Kyle Stanley added the comment: Created GH-16147 for replacing the *from_what* argument with *whence* in the IO tutorial. I would like to consider following up on this with another PR that adds the IO constants `SEEK_SET`, `SEEK_CUR`, and `SEEK_END` to the tutorial. Those constants would be particularly useful for new users of the language, and would likely make the tutorial easier to understand for those who don't have prior experience with using `seek()`. However, I figured that replacing *from_what* with *whence* would be significantly less controversial and easier to review, which is why they will be in separate PRs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 14:19:19 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 14 Sep 2019 18:19:19 +0000 Subject: [issue38164] polishing asyncio Streams API In-Reply-To: <1568394692.95.0.46825100333.issue38164@roundup.psfhosted.org> Message-ID: <1568485159.7.0.164401175702.issue38164@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- keywords: +patch pull_requests: +15758 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/16148 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 14:19:38 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 14 Sep 2019 18:19:38 +0000 Subject: [issue37798] Add C fastpath for statistics.NormalDist.inv_cdf() In-Reply-To: <1565325806.95.0.315734354533.issue37798@roundup.psfhosted.org> Message-ID: <1568485178.29.0.674162668339.issue37798@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +15759 pull_request: https://github.com/python/cpython/pull/16149 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 14:57:39 2019 From: report at bugs.python.org (Christian Schmidbauer) Date: Sat, 14 Sep 2019 18:57:39 +0000 Subject: [issue29353] Incorrect handling of HTTP response with "Content-Type: message/rfc822" header In-Reply-To: <1485197905.85.0.319696153354.issue29353@psf.upfronthosting.co.za> Message-ID: <1568487459.14.0.358103503566.issue29353@roundup.psfhosted.org> Change by Christian Schmidbauer : ---------- pull_requests: +15760 stage: -> patch review pull_request: https://github.com/python/cpython/pull/12214 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 15:01:26 2019 From: report at bugs.python.org (Tal Einat) Date: Sat, 14 Sep 2019 19:01:26 +0000 Subject: [issue12178] csv writer doesn't escape escapechar In-Reply-To: <1306348030.98.0.468032848078.issue12178@psf.upfronthosting.co.za> Message-ID: <1568487686.45.0.90529297601.issue12178@roundup.psfhosted.org> Tal Einat added the comment: FWIW, though this is arguably fixing a bug, IMO this shouldn't be back-ported to 2.7 or 3.7, but only be in 3.8+, to avoid breaking backwards-compatibility. That being said, it would be great to get this into 3.8.0! ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 15:02:01 2019 From: report at bugs.python.org (Abhilash Raj) Date: Sat, 14 Sep 2019 19:02:01 +0000 Subject: [issue24363] httplib fails to handle semivalid HTTP headers In-Reply-To: <1433257563.79.0.772954216205.issue24363@psf.upfronthosting.co.za> Message-ID: <1568487721.9.0.264861660557.issue24363@roundup.psfhosted.org> Abhilash Raj added the comment: Martin: Can you please create a PR for the added patch? If you are busy, I can do that for you, just wanted to ask before I do :) I am going to remove "easy" label from this issue, which IMO it clearly isn't given 4 years of history to catch up on and a few other related bugs. Since some time has passed since the patch was posted, I am going to target this to 3.8 and 3.7 since others are in security fix mode only. ---------- keywords: -easy, patch nosy: +maxking versions: +Python 3.8 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 16:10:07 2019 From: report at bugs.python.org (Uche Ogbuji) Date: Sat, 14 Sep 2019 20:10:07 +0000 Subject: [issue38174] Security vulnerability in bundled expat CVE-2019-15903 (fix available in expat 2.2.8) Message-ID: <1568491807.22.0.03411253388.issue38174@roundup.psfhosted.org> New submission from Uche Ogbuji : cpython bundles expat in Modules/expat/ and needs to be updated to expat-2.2.8 to security vulnerability CVE-2019-15903. >From Sebastian Pipping on XML-DEV ML: Expat 2.2.8 [1] has been released yesterday. This release fixes a security issue ? a heap buffer over-read known as CVE-2019-15903 [2] reported by Joonun Jang resulting in Denial of Service ?, starts using the rand_s function on Windows and MinGW (ending the previous LoadLibrary hack), includes non-security bugfixes, many build system fixes and improvements, improvements to xmlwf usability, and more. For more details regarding the latest release, please check out the changelog [3]. If you maintain Expat packaging or a bundled copy of Expat or a pinned version of Expat somewhere, please update to 2.2.8. Thank you! [1] https://github.com/libexpat/libexpat/releases/tag/R_2_2_8 [2] https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-15903 [3] https://github.com/libexpat/libexpat/blob/R_2_2_8/expat/Changes ---------- components: XML messages: 352449 nosy: Uche Ogbuji priority: normal severity: normal status: open title: Security vulnerability in bundled expat CVE-2019-15903 (fix available in expat 2.2.8) type: security versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 16:29:38 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 14 Sep 2019 20:29:38 +0000 Subject: [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1568492978.42.0.827491235691.issue37635@roundup.psfhosted.org> miss-islington added the comment: New changeset ff603f6c3d3dc0e9ea8c1c51ce907c4821f42c54 by Miss Islington (bot) (Kyle Stanley) in branch 'master': bpo-37635: Update arg name for seek() in IO tutorial (GH-16147) https://github.com/python/cpython/commit/ff603f6c3d3dc0e9ea8c1c51ce907c4821f42c54 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 16:29:37 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 14 Sep 2019 20:29:37 +0000 Subject: [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1568492977.51.0.181693957051.issue37635@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15761 pull_request: https://github.com/python/cpython/pull/16150 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 16:29:44 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 14 Sep 2019 20:29:44 +0000 Subject: [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1568492984.49.0.686525248118.issue37635@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15762 pull_request: https://github.com/python/cpython/pull/16151 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 16:38:54 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 14 Sep 2019 20:38:54 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1568493534.04.0.104167114107.issue30458@roundup.psfhosted.org> Jason R. Coombs added the comment: This change caused a regression or two captured in issue36274. Essentially, by blocking invalid requests, it's now not possible for a system intentionally to generate invalid requests for testing purposes. As these point releases of Python start making it into the wild, the impact of this change will likely increase. I think this patch was applied at too low a level. That is, instead of protecting the user inputs, the change protects the programmer's inputs. I mention this here so those interested can follow the mitigation work happening in issue36274. ---------- nosy: +jaraco _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 16:43:36 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 14 Sep 2019 20:43:36 +0000 Subject: [issue36274] http.client cannot send non-ASCII request lines In-Reply-To: <1552422803.93.0.420596825145.issue36274@roundup.psfhosted.org> Message-ID: <1568493816.58.0.681608962862.issue36274@roundup.psfhosted.org> Jason R. Coombs added the comment: As I considered a patch for this, I realized there are actually two issues, the one in the title "http.client cannot send non-ASCII request lines" but also "the protection for invalid requests prevents usage to generate invalid requests". The former issue was new with Python 3 while the latter was introduced with issue30458. I can't decide if we should handle these two issues separately, or address them together in this ticket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 16:47:34 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 14 Sep 2019 20:47:34 +0000 Subject: [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1568494054.97.0.442852927994.issue37635@roundup.psfhosted.org> miss-islington added the comment: New changeset 4a71df88cdba77c409ee70146dd6445b19267df4 by Miss Islington (bot) in branch '3.8': bpo-37635: Update arg name for seek() in IO tutorial (GH-16147) https://github.com/python/cpython/commit/4a71df88cdba77c409ee70146dd6445b19267df4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 16:47:42 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 14 Sep 2019 20:47:42 +0000 Subject: [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1568494062.01.0.177282110678.issue37635@roundup.psfhosted.org> miss-islington added the comment: New changeset b9f932f9e2a170a8d39b3c17f5fabb0967839d85 by Miss Islington (bot) in branch '3.7': bpo-37635: Update arg name for seek() in IO tutorial (GH-16147) https://github.com/python/cpython/commit/b9f932f9e2a170a8d39b3c17f5fabb0967839d85 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 16:48:41 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 14 Sep 2019 20:48:41 +0000 Subject: [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1568494121.91.0.0194610756429.issue37635@roundup.psfhosted.org> Antoine Pitrou added the comment: Thanks you Kyle! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 17:01:06 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sat, 14 Sep 2019 21:01:06 +0000 Subject: [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1568494866.16.0.660516453283.issue37635@roundup.psfhosted.org> Kyle Stanley added the comment: > Thanks you Kyle! No problem, thanks for merging it Antoine! What do you think of the followup PR to make use of the SEEK_* constants listed in the documentation? I think it would be useful to at least mention them in the tutorial, or even make use of them directly in the examples. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 17:23:32 2019 From: report at bugs.python.org (Sviatoslav Sydorenko) Date: Sat, 14 Sep 2019 21:23:32 +0000 Subject: [issue36274] http.client cannot send non-ASCII request lines In-Reply-To: <1552422803.93.0.420596825145.issue36274@roundup.psfhosted.org> Message-ID: <1568496212.89.0.0142560834512.issue36274@roundup.psfhosted.org> Change by Sviatoslav Sydorenko : ---------- nosy: +webknjaz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 19:21:45 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 14 Sep 2019 23:21:45 +0000 Subject: [issue38174] Security vulnerability in bundled expat CVE-2019-15903 (fix available in expat 2.2.8) In-Reply-To: <1568491807.22.0.03411253388.issue38174@roundup.psfhosted.org> Message-ID: <1568503305.25.0.100291732204.issue38174@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 19:54:25 2019 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 14 Sep 2019 23:54:25 +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: <1568505265.18.0.607944397617.issue29988@roundup.psfhosted.org> Nick Coghlan added the comment: It's also not unique to with statements - it applies to all finally clauses. The longstanding workaround when deterministic cleanup is absolutely critical has been to run the "real" application in a subthread, and devote the main thread to gracefully terminating the subthread when requested. When cleanup is critical, but doing it in a deterministic order is less so, __del__ methods are often used to fill the gap (although they too can be interrupted by a subsequent Ctrl-C). I also realized that allowing infinite loops in cleanup code to ignore Ctrl-C may actually be a tolerable outcome: in the worst case, users can still escalate to Ctrl-Break/kill -9/Force stop/etc and pull the entire OS process out from under the interpreter. It's not good, but may be worth it in order to better handle users pressing Ctrl-C multiple times. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 20:33:48 2019 From: report at bugs.python.org (Tahia K) Date: Sun, 15 Sep 2019 00:33:48 +0000 Subject: [issue38155] Add __all__ to the datetime module In-Reply-To: <1568370190.96.0.124167415349.issue38155@roundup.psfhosted.org> Message-ID: <1568507628.74.0.0288101628649.issue38155@roundup.psfhosted.org> Tahia K added the comment: I'll definitely add that test @Paul. Speaking of, what do you guys think of this test: def test_c_all(self): """Test that __all__ symbols between the c datetime module and the python datetime library are equivalent.""" c_datetime = import_fresh_module('datetime', fresh=['_datetime']) py_datetime = import_fresh_module('datetime', blocked=['_datetime']) self.assertEqual(c_datetime.__all__, py_datetime.__all__) I found the import_fresh_module here: https://docs.python.org/3/library/test.html#test.support.import_fresh_module - super handy! The test currently passes for me locally, but I wanted to check if my usage was correct before submitting a PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 14 23:45:49 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Sun, 15 Sep 2019 03:45:49 +0000 Subject: [issue10108] ExpatError not property wrapped In-Reply-To: <1287093270.3.0.510777453712.issue10108@psf.upfronthosting.co.za> Message-ID: <1568519149.43.0.790686572228.issue10108@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 00:06:22 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 15 Sep 2019 04:06:22 +0000 Subject: [issue26360] Deadlock in thread.join on Python 2.7/macOS In-Reply-To: <1455449924.98.0.400633064774.issue26360@psf.upfronthosting.co.za> Message-ID: <1568520382.35.0.392557126985.issue26360@roundup.psfhosted.org> Kyle Stanley added the comment: > FWIW, I've confirmed again that the exact same script on the same machine seems fine under Python 3.x. Given the imminent demise of Python 2, perhaps this issue is just destined to be an unsolved historical oddity. Since it doesn't seem to be occurring across every macOS platform, is specific to 2.7, and isn't proving to be an easy fix, it's probably not worthwhile to invest a significant amount of further time into the issue. Thanks for working on it though, at least we tried. (: ---------- nosy: +aeros167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 00:11:33 2019 From: report at bugs.python.org (hai shi) Date: Sun, 15 Sep 2019 04:11:33 +0000 Subject: [issue19692] Rename Py_SAFE_DOWNCAST In-Reply-To: <1385130295.49.0.846468108755.issue19692@psf.upfronthosting.co.za> Message-ID: <1568520693.76.0.745814475943.issue19692@roundup.psfhosted.org> hai shi added the comment: Looks we have a fast version rhythm. IMHO, If user would be affected and reported, reversing the PR is ok. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 00:56:42 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Sun, 15 Sep 2019 04:56:42 +0000 Subject: [issue21023] PyTypeObject tp_name is char* instead of const char* In-Reply-To: <1395483450.02.0.347211146616.issue21023@psf.upfronthosting.co.za> Message-ID: <1568523402.44.0.706094257001.issue21023@roundup.psfhosted.org> Joannah Nanjekye added the comment: This is nolonger an issue. All references to tp_name are as below. const char *tp_name; ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 02:51:47 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 15 Sep 2019 06:51:47 +0000 Subject: [issue38158] PyType_Spec docs list non-existant field "doc" In-Reply-To: <1568372797.52.0.257422503496.issue38158@roundup.psfhosted.org> Message-ID: <1568530307.81.0.407929220279.issue38158@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15763 pull_request: https://github.com/python/cpython/pull/16153 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 02:53:59 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 15 Sep 2019 06:53:59 +0000 Subject: [issue38158] PyType_Spec docs list non-existant field "doc" In-Reply-To: <1568372797.52.0.257422503496.issue38158@roundup.psfhosted.org> Message-ID: <1568530439.28.0.492191872042.issue38158@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15764 pull_request: https://github.com/python/cpython/pull/16154 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 03:00:47 2019 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 15 Sep 2019 07:00:47 +0000 Subject: [issue38158] PyType_Spec docs list non-existant field "doc" In-Reply-To: <1568372797.52.0.257422503496.issue38158@roundup.psfhosted.org> Message-ID: <1568530847.58.0.0449716620215.issue38158@roundup.psfhosted.org> Stefan Behnel added the comment: New changeset b65be6cd3d9b6102227d27f4f35385f999a7dd7d by Stefan Behnel (Miss Islington (bot)) in branch '3.8': bpo-38158: Removing nonexistant member "doc" from PyType_Spec documentation (GH-16142) (GH-16154) https://github.com/python/cpython/commit/b65be6cd3d9b6102227d27f4f35385f999a7dd7d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 03:01:35 2019 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 15 Sep 2019 07:01:35 +0000 Subject: [issue38158] PyType_Spec docs list non-existant field "doc" In-Reply-To: <1568372797.52.0.257422503496.issue38158@roundup.psfhosted.org> Message-ID: <1568530895.54.0.720976173278.issue38158@roundup.psfhosted.org> Change by Stefan Behnel : ---------- keywords: -patch resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 03:07:35 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 15 Sep 2019 07:07:35 +0000 Subject: [issue21023] PyTypeObject tp_name is char* instead of const char* In-Reply-To: <1395483450.02.0.347211146616.issue21023@psf.upfronthosting.co.za> Message-ID: <1568531255.21.0.516521196219.issue21023@roundup.psfhosted.org> Serhiy Storchaka added the comment: It should not be an issue in 2014 as it was fixed in 2005. See af68c874a6803b4e90b616077a602c0593719a1d. ---------- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 03:18:00 2019 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 15 Sep 2019 07:18:00 +0000 Subject: [issue38155] Add __all__ to the datetime module In-Reply-To: <1568370190.96.0.124167415349.issue38155@roundup.psfhosted.org> Message-ID: <1568531880.49.0.948983741381.issue38155@roundup.psfhosted.org> Dong-hee Na added the comment: @ta1hia My idea is that both tests should be added. @p-ganssle's test aims to check the attr is allowed or not. And your test aims to check attribute equalities of pure python module and c module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 03:29:07 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 15 Sep 2019 07:29:07 +0000 Subject: [issue38175] Memory leak in comparison of sqlite.Row objects Message-ID: <1568532547.02.0.11116376901.issue38175@roundup.psfhosted.org> New submission from Serhiy Storchaka : There is a memory leak in comparison of sqlite.Row objects when row descriptors are different. There were not tests for this case. Also, the code compares the result of PyObject_RichCompare() with Py_True and Py_False. It is better to avoid such code, because technically PyObject_RichCompare() can return an arbitrary value, although in this particular case description can only be tuple or None (or NULL, but this is other issue). Also, there is a test for inequality of hash codes. Since hashes depend on hashes of strings, they value is random, and there is a small chance of failure. Hashes should not be tested for inequality. ---------- components: Library (Lib) messages: 352465 nosy: berker.peksag, ghaering, serhiy.storchaka priority: normal severity: normal status: open title: Memory leak in comparison of sqlite.Row objects type: resource usage versions: Python 2.7, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 03:31:34 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 15 Sep 2019 07:31:34 +0000 Subject: [issue38175] Memory leak in comparison of sqlite.Row objects In-Reply-To: <1568532547.02.0.11116376901.issue38175@roundup.psfhosted.org> Message-ID: <1568532694.2.0.576507412722.issue38175@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +15765 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16155 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 03:37:56 2019 From: report at bugs.python.org (Andrew Briand) Date: Sun, 15 Sep 2019 07:37:56 +0000 Subject: [issue38166] ast identifies incorrect column for compound attribute lookups In-Reply-To: <1568411334.98.0.109884794691.issue38166@roundup.psfhosted.org> Message-ID: <1568533076.15.0.79300883003.issue38166@roundup.psfhosted.org> Andrew Briand added the comment: It looks like the test suite (in particular test_ast) specifically checks for the behavior where the col_offset of c in a.b.c.d is 0. This seems strange to me though, does anyone know if this is intended? If not, I can patch it. ---------- nosy: +andrewbriand _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 04:25:32 2019 From: report at bugs.python.org (Karl Ove Hufthammer) Date: Sun, 15 Sep 2019 08:25:32 +0000 Subject: [issue35638] Introduce fixed point locale aware format type for floating point numbers In-Reply-To: <1546428301.89.0.74748590824.issue35638@roundup.psfhosted.org> Message-ID: <1568535932.62.0.430696453328.issue35638@roundup.psfhosted.org> Change by Karl Ove Hufthammer : ---------- nosy: +huftis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 04:36:39 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 15 Sep 2019 08:36:39 +0000 Subject: [issue38166] ast identifies incorrect column for compound attribute lookups In-Reply-To: <1568411334.98.0.109884794691.issue38166@roundup.psfhosted.org> Message-ID: <1568536599.53.0.876428113199.issue38166@roundup.psfhosted.org> Serhiy Storchaka added the comment: AST for expression a.b.c is Attribute( value=Attribute( value=Name( id='a', ctx=Load(), lineno=1, col_offset=0, end_lineno=1, end_col_offset=1), attr='b', ctx=Load(), lineno=1, col_offset=0, end_lineno=1, end_col_offset=3), attr='c', ctx=Load(), lineno=1, col_offset=0, end_lineno=1, end_col_offset=5) It contains one Name node for "a" and two Attribute nodes for "a.b" and "a.b.c". Every node has attributes lineno, col_offset, end_lineno and end_col_offset. Note that there are no nodes for "b" and "c", therefore there is no information about the location of "c" in AST. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 04:43:40 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 15 Sep 2019 08:43:40 +0000 Subject: [issue38081] Different behavior of os.path.realpath('nul') in 3.7 and 3.8 In-Reply-To: <1568097037.9.0.584511449633.issue38081@roundup.psfhosted.org> Message-ID: <1568537020.13.0.0275461305667.issue38081@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +15766 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/16156 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 04:47:30 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 15 Sep 2019 08:47:30 +0000 Subject: [issue38081] Different behavior of os.path.realpath('nul') in 3.7 and 3.8 In-Reply-To: <1568097037.9.0.584511449633.issue38081@roundup.psfhosted.org> Message-ID: <1568537250.86.0.145171463418.issue38081@roundup.psfhosted.org> Steve Dower added the comment: I added another PR with the additional error codes listed by Eryk Sun. Theoretically we should be able to test most of them, but I haven't written those tests, and I'm not sure they'd prove enough to be worth the extra code. ntpath.realpath is a "best effort" function (realpath in all cases is, I guess), so given the choice between failing and returning a best-effort path, it's obviously better to go with the best-effort path. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 05:06:46 2019 From: report at bugs.python.org (Kirill Smelkov) Date: Sun, 15 Sep 2019 09:06:46 +0000 Subject: [issue26360] Deadlock in thread.join on Python 2.7/macOS In-Reply-To: <1455449924.98.0.400633064774.issue26360@psf.upfronthosting.co.za> Message-ID: <1568538406.58.0.0413867432312.issue26360@roundup.psfhosted.org> Kirill Smelkov added the comment: > > Maybe issue38106 related. > > That looks plausible, but unfortunately I'm still able to reproduce the hang with your PR (commit 9b135c02aa1edab4c99c915c43cd62d988f1f9c1, macOS 10.14.6). Thanks for feedback. Then hereby bug is probably deadlock of another kind. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 05:48:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 15 Sep 2019 09:48:19 +0000 Subject: [issue38176] test_threading leaked [1, 1, 1] references: test_threads_join Message-ID: <1568540899.7.0.49327876198.issue38176@roundup.psfhosted.org> New submission from STINNER Victor : vstinner at apu$ ./python -m test -R 3:3 test_threading -m test.test_threading.SubinterpThreadingTests.test_threads_join Run tests sequentially 0:00:00 load avg: 1.11 [1/1] test_threading beginning 6 repetitions 123456 ...... test_threading leaked [1, 1, 1] references, sum=3 test_threading failed == Tests result: FAILURE == 1 test failed: test_threading Total duration: 639 ms Tests result: FAILURE ---------- components: Library (Lib) messages: 352470 nosy: vstinner priority: normal severity: normal status: open title: test_threading leaked [1, 1, 1] references: test_threads_join versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 05:52:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 15 Sep 2019 09:52:33 +0000 Subject: [issue38176] test_threading leaked [1, 1, 1] references: test_threads_join In-Reply-To: <1568540899.7.0.49327876198.issue38176@roundup.psfhosted.org> Message-ID: <1568541153.06.0.264991081813.issue38176@roundup.psfhosted.org> STINNER Victor added the comment: The regression seems to be introduced by: commit 04f0bbfbedf8d2bb69b012f853de6648b1a9f27f (HEAD, refs/bisect/bad) Author: Dino Viehland Date: Fri Sep 13 11:12:27 2019 +0100 bpo-38075: Port _randommodule.c to PEP-384 (GH-15798) - Migrate `Random_Type` to `PyType_FromSpec` - To simulate an old use of `PyLong_Type.tp_as_number->nb_absolute`, I added code to the module init function to stash `int.__abs__` for later use. Ideally we'd use `PyType_GetSlot()` instead, but it doesn't currently work for static types in CPython, and implementing it just for this case doesn't seem worth it. - Do exact check for long and dispatch to PyNumber_Absolute, use vector call when not exact. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 05:53:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 15 Sep 2019 09:53:06 +0000 Subject: [issue38075] Make random module PEP-384 compatible In-Reply-To: <1568044678.81.0.091085634764.issue38075@roundup.psfhosted.org> Message-ID: <1568541186.69.0.410390817097.issue38075@roundup.psfhosted.org> STINNER Victor added the comment: > bpo-38075: Port _randommodule.c to PEP-384 (GH-15798) It seems like this change introduced a reference leak: bpo-38176. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 05:56:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 15 Sep 2019 09:56:26 +0000 Subject: [issue38177] test_tools: test.test_tools.test_unparse.UnparseTestCase: test_tools leaked [36, 36, 36] references Message-ID: <1568541386.19.0.996414824495.issue38177@roundup.psfhosted.org> New submission from STINNER Victor : https://buildbot.python.org/all/#/builders/189/builds/153 $ ./python -m test -R 3:3 test_tools -m test.test_tools.test_unparse.UnparseTestCase.test_nonlocal Run tests sequentially 0:00:00 load avg: 1.48 [1/1] test_tools beginning 6 repetitions 123456 ...... test_tools leaked [36, 36, 36] references, sum=108 test_tools failed == Tests result: FAILURE == 1 test failed: test_tools Total duration: 591 ms Tests result: FAILURE ---------- components: Tests messages: 352473 nosy: vstinner priority: normal severity: normal status: open title: test_tools: test.test_tools.test_unparse.UnparseTestCase: test_tools leaked [36, 36, 36] references versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 06:26:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Sun, 15 Sep 2019 10:26:39 +0000 Subject: [issue38177] test_tools: test.test_tools.test_unparse.UnparseTestCase: test_tools leaked [36, 36, 36] references In-Reply-To: <1568541386.19.0.996414824495.issue38177@roundup.psfhosted.org> Message-ID: <1568543199.18.0.350054954222.issue38177@roundup.psfhosted.org> STINNER Victor added the comment: Oh, test_unparse.UnparseTestCase.test_nonlocal has been fixed. Maybe by: commit 0247e80f3c529900689425676342cb70ea31a13d Author: Eddie Elizondo Date: Sat Sep 14 09:38:17 2019 -0400 Fix leaks in Python-ast.c (#16127) But there are more leaks. vstinner at apu$ make && ./python -m test -R 3:3 test_tools -m test.test_tools.test_c_analyzer.test_c_analyzer_common.test_known.FromFileTests.test_typical It seems like the test leaks since the test has been added by: commit ee536b2020b1f0baad1286dbd4345e13870324af Author: Eric Snow Date: Wed Sep 11 19:49:45 2019 +0100 bpo-36876: Add a tool that identifies unsupported global C variables. (#15877) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 06:53:15 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 15 Sep 2019 10:53:15 +0000 Subject: [issue36274] http.client cannot send non-ASCII request lines In-Reply-To: <1552422803.93.0.420596825145.issue36274@roundup.psfhosted.org> Message-ID: <1568544795.16.0.187872027471.issue36274@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 08:25:40 2019 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 15 Sep 2019 12:25:40 +0000 Subject: [issue37635] Using constant for whence arg in seek() In-Reply-To: <1563595223.34.0.142119222061.issue37635@roundup.psfhosted.org> Message-ID: <1568550340.85.0.111111811981.issue37635@roundup.psfhosted.org> Antoine Pitrou added the comment: > What do you think of the followup PR to make use of the SEEK_* constants listed in the documentation? I think it would be useful to at least mention them in the tutorial, or even make use of them directly in the examples. Yes, I think it would be good to make use of them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 09:23:40 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Sun, 15 Sep 2019 13:23:40 +0000 Subject: [issue27218] improve tracing performance with f_trace set to Py_None In-Reply-To: <1465057667.55.0.463895492434.issue27218@psf.upfronthosting.co.za> Message-ID: <1568553820.93.0.730010014489.issue27218@roundup.psfhosted.org> Change by Joannah Nanjekye : ---------- keywords: +patch pull_requests: +15767 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/16157 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 09:55:30 2019 From: report at bugs.python.org (Dino Viehland) Date: Sun, 15 Sep 2019 13:55:30 +0000 Subject: [issue38176] test_threading leaked [1, 1, 1] references: test_threads_join In-Reply-To: <1568540899.7.0.49327876198.issue38176@roundup.psfhosted.org> Message-ID: <1568555730.7.0.742596004938.issue38176@roundup.psfhosted.org> Change by Dino Viehland : ---------- assignee: -> dino.viehland nosy: +dino.viehland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 09:56:19 2019 From: report at bugs.python.org (Eryk Sun) Date: Sun, 15 Sep 2019 13:56:19 +0000 Subject: [issue32592] Drop support of Windows Vista and 7 in Python 3.9 In-Reply-To: <1516268238.05.0.467229070634.issue32592@psf.upfronthosting.co.za> Message-ID: <1568555779.45.0.109553608263.issue32592@roundup.psfhosted.org> Eryk Sun added the comment: 3.9 can drop support for console pseudohandles in set_inheritable in Python/fileutils.c and Popen._filter_handle_list in Lib/subprocess.py. Also, _Py_write_impl in Python/fileutils.c can remove the 32767 byte limit for console files (and other character devices such as NUL, since it over-generalizes via isatty). The same applies to _io__WindowsConsoleIO_write_impl in Modules/_io/winconsoleio.c. --- Discussion In Windows 8+, the console uses "\\Device\\ConDrv" with kernel file objects. The console host process opens a file object for the ConDrv device itself in order to handle IOCTLs from clients. A console client process opens virtual files on ConDrv such as Connect (for generic functions such as GetConsoleCP), Input (default StandardInput), Output (default StandardOutput, StandardError), Console (//./CON), CurrentIn (//./CONIN$), and CurrentOut (//./CONOUT$). There's no practical limit on the size of reads and writes via these files. Prior to Windows 8, console API requests are instead sent over an LPC port. Large messages that don't fit in a LPC packet are passed in a 64 KiB window of shared memory that's overlayed by a heap. This is the heap referred to by claims in the console API docs such as "[i]f the total size of the specified number of characters exceeds the available heap, the function fails with ERROR_NOT_ENOUGH_MEMORY". With the LPC implementation, file handles for the console input buffer and screen buffer(s) are not real handles for kernel File objects. Rather, the console host process maintains a private table of pseudohandles for console buffers. These console pseudohandles are tagged for routing in the Windows API by setting the lower 2 bits. They're also verified in functions such as GetFileType via the undocumented function VerifyConsoleIoHandle. These pseudohandles have to be identified in Python because they're not supported by SetHandleInformation or the PROC_THREAD_ATTRIBUTE_HANDLE_LIST of CreateProcess, both of which require real kernel handles. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 10:31:38 2019 From: report at bugs.python.org (Dino Viehland) Date: Sun, 15 Sep 2019 14:31:38 +0000 Subject: [issue38176] test_threading leaked [1, 1, 1] references: test_threads_join In-Reply-To: <1568540899.7.0.49327876198.issue38176@roundup.psfhosted.org> Message-ID: <1568557898.49.0.392270156763.issue38176@roundup.psfhosted.org> Change by Dino Viehland : ---------- keywords: +patch pull_requests: +15768 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16158 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 10:52:08 2019 From: report at bugs.python.org (Dino Viehland) Date: Sun, 15 Sep 2019 14:52:08 +0000 Subject: [issue38176] test_threading leaked [1, 1, 1] references: test_threads_join In-Reply-To: <1568540899.7.0.49327876198.issue38176@roundup.psfhosted.org> Message-ID: <1568559128.35.0.462605906252.issue38176@roundup.psfhosted.org> Change by Dino Viehland : ---------- stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 10:52:17 2019 From: report at bugs.python.org (Dino Viehland) Date: Sun, 15 Sep 2019 14:52:17 +0000 Subject: [issue38176] test_threading leaked [1, 1, 1] references: test_threads_join In-Reply-To: <1568540899.7.0.49327876198.issue38176@roundup.psfhosted.org> Message-ID: <1568559137.18.0.839296393949.issue38176@roundup.psfhosted.org> Change by Dino Viehland : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 11:04:26 2019 From: report at bugs.python.org (Thomas Grainger) Date: Sun, 15 Sep 2019 15:04:26 +0000 Subject: [issue27071] unittest.TestCase.assertCountEqual is a very misleading name In-Reply-To: <1463788380.52.0.782790370377.issue27071@psf.upfronthosting.co.za> Message-ID: <1568559866.65.0.827900461628.issue27071@roundup.psfhosted.org> Thomas Grainger added the comment: I think assertPermutation (without the "is") would be the best name ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 11:17:34 2019 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Sun, 15 Sep 2019 15:17:34 +0000 Subject: [issue38178] Remove explicit "loop" argument from EchoClientProtocol example Message-ID: <1568560654.11.0.446224617149.issue38178@roundup.psfhosted.org> New submission from Hrvoje Nik?i? : The EchoClientProtocol example receives a "loop" argument, which is not used at all in the TCP example, and is used to create a future in the UDP example. In modern asyncio code the explicit loop arguments are no longer used since the loop can always be obtained with get_running_loop(). The proposed patch makes the UDP example consistent with the TCP one (by having the constructor accept the on_con_lost future) and removes the loop argument from both. ---------- assignee: docs at python components: Documentation, asyncio messages: 352478 nosy: asvetlov, docs at python, hniksic, yselivanov priority: normal severity: normal status: open title: Remove explicit "loop" argument from EchoClientProtocol example versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 11:19:36 2019 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Sun, 15 Sep 2019 15:19:36 +0000 Subject: [issue38178] Remove explicit "loop" argument from EchoClientProtocol example In-Reply-To: <1568560654.11.0.446224617149.issue38178@roundup.psfhosted.org> Message-ID: <1568560776.83.0.911669550186.issue38178@roundup.psfhosted.org> Change by Hrvoje Nik?i? : ---------- keywords: +patch pull_requests: +15769 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16159 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 12:36:41 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 15 Sep 2019 16:36:41 +0000 Subject: [issue37798] Add C fastpath for statistics.NormalDist.inv_cdf() In-Reply-To: <1565325806.95.0.315734354533.issue37798@roundup.psfhosted.org> Message-ID: <1568565401.8.0.776920624607.issue37798@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 6e27a0d77520bf2c4412e367496212510f81b983 by Raymond Hettinger in branch 'master': bpo-37798: Prevent undefined behavior in direct calls to the C helper function. (#16149) https://github.com/python/cpython/commit/6e27a0d77520bf2c4412e367496212510f81b983 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 12:37:05 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 15 Sep 2019 16:37:05 +0000 Subject: [issue37798] Add C fastpath for statistics.NormalDist.inv_cdf() In-Reply-To: <1565325806.95.0.315734354533.issue37798@roundup.psfhosted.org> Message-ID: <1568565425.91.0.969017810339.issue37798@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15770 pull_request: https://github.com/python/cpython/pull/16160 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 12:44:32 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 15 Sep 2019 16:44:32 +0000 Subject: [issue38178] Remove explicit "loop" argument from EchoClientProtocol example In-Reply-To: <1568560654.11.0.446224617149.issue38178@roundup.psfhosted.org> Message-ID: <1568565872.53.0.924169074082.issue38178@roundup.psfhosted.org> Raymond Hettinger added the comment: The was added originally by Victor and Yuri in c7edffdddd3 and 7c7605ff113 ---------- nosy: +rhettinger, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 13:04:03 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 15 Sep 2019 17:04:03 +0000 Subject: [issue37798] Add C fastpath for statistics.NormalDist.inv_cdf() In-Reply-To: <1565325806.95.0.315734354533.issue37798@roundup.psfhosted.org> Message-ID: <1568567043.4.0.121290766222.issue37798@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset d6fdfc82dd307161ca2222ae938b7a6c85215bc1 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-37798: Prevent undefined behavior in direct calls to the C helper function. (GH-16149) (GH-16160) https://github.com/python/cpython/commit/d6fdfc82dd307161ca2222ae938b7a6c85215bc1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 13:06:04 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 15 Sep 2019 17:06:04 +0000 Subject: [issue38178] Remove explicit "loop" argument from EchoClientProtocol example In-Reply-To: <1568560654.11.0.446224617149.issue38178@roundup.psfhosted.org> Message-ID: <1568567164.91.0.0627691261572.issue38178@roundup.psfhosted.org> miss-islington added the comment: New changeset c717c73fa33a2f3591442059eaf6e7a673e2c725 by Miss Islington (bot) (Hrvoje Nik?i?) in branch 'master': bpo-38178: Don't explicitly pass "loop" to EchoClientProtocol. (GH-16159) https://github.com/python/cpython/commit/c717c73fa33a2f3591442059eaf6e7a673e2c725 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 13:06:16 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 15 Sep 2019 17:06:16 +0000 Subject: [issue38178] Remove explicit "loop" argument from EchoClientProtocol example In-Reply-To: <1568560654.11.0.446224617149.issue38178@roundup.psfhosted.org> Message-ID: <1568567176.24.0.71723775368.issue38178@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15771 pull_request: https://github.com/python/cpython/pull/16161 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 13:06:23 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 15 Sep 2019 17:06:23 +0000 Subject: [issue38178] Remove explicit "loop" argument from EchoClientProtocol example In-Reply-To: <1568560654.11.0.446224617149.issue38178@roundup.psfhosted.org> Message-ID: <1568567183.46.0.0739739453367.issue38178@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15772 pull_request: https://github.com/python/cpython/pull/16162 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 13:12:15 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 15 Sep 2019 17:12:15 +0000 Subject: [issue38178] Remove explicit "loop" argument from EchoClientProtocol example In-Reply-To: <1568560654.11.0.446224617149.issue38178@roundup.psfhosted.org> Message-ID: <1568567535.78.0.773410842444.issue38178@roundup.psfhosted.org> miss-islington added the comment: New changeset 701c4886bb0e19ad5ed8c8f556f65ab8597841e7 by Miss Islington (bot) in branch '3.7': bpo-38178: Don't explicitly pass "loop" to EchoClientProtocol. (GH-16159) https://github.com/python/cpython/commit/701c4886bb0e19ad5ed8c8f556f65ab8597841e7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 13:12:24 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 15 Sep 2019 17:12:24 +0000 Subject: [issue38178] Remove explicit "loop" argument from EchoClientProtocol example In-Reply-To: <1568560654.11.0.446224617149.issue38178@roundup.psfhosted.org> Message-ID: <1568567544.51.0.0895534541652.issue38178@roundup.psfhosted.org> Raymond Hettinger added the comment: Hrvoje, thanks for fixing this. Next time, please involve the people who originally wrote the code. They are both still active. If they made mistakes, it helps them to know about it. If they had a specific intent for the code example, it allows them to make sure the objectives are still being achieved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 13:13:37 2019 From: report at bugs.python.org (miss-islington) Date: Sun, 15 Sep 2019 17:13:37 +0000 Subject: [issue38178] Remove explicit "loop" argument from EchoClientProtocol example In-Reply-To: <1568560654.11.0.446224617149.issue38178@roundup.psfhosted.org> Message-ID: <1568567617.64.0.241548631258.issue38178@roundup.psfhosted.org> miss-islington added the comment: New changeset 1cd6e926d30552056457820a682c1c361ee0f3ff by Miss Islington (bot) in branch '3.8': bpo-38178: Don't explicitly pass "loop" to EchoClientProtocol. (GH-16159) https://github.com/python/cpython/commit/1cd6e926d30552056457820a682c1c361ee0f3ff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 13:18:18 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 15 Sep 2019 17:18:18 +0000 Subject: [issue38013] AsyncGenerator breaks when not iterated fully with RuntimeError("can't send non-None value to a just-started coroutine") In-Reply-To: <1567469623.0.0.944759957345.issue38013@roundup.psfhosted.org> Message-ID: <1568567898.93.0.819323915615.issue38013@roundup.psfhosted.org> Andrew Svetlov added the comment: I have a PR for the fix. Yuri preliminary agrees with the patch but he requested more time for careful review. I've added 'release blocker' priority to don't miss this bugfix for the next release. ---------- nosy: +lukasz.langa, ned.deily priority: normal -> release blocker versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 13:23:47 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 15 Sep 2019 17:23:47 +0000 Subject: [issue38178] Remove explicit "loop" argument from EchoClientProtocol example In-Reply-To: <1568560654.11.0.446224617149.issue38178@roundup.psfhosted.org> Message-ID: <1568568227.26.0.793300533844.issue38178@roundup.psfhosted.org> Andrew Svetlov added the comment: Thanks Hrvoje! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 13:28:18 2019 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Sun, 15 Sep 2019 17:28:18 +0000 Subject: [issue38178] Remove explicit "loop" argument from EchoClientProtocol example In-Reply-To: <1568560654.11.0.446224617149.issue38178@roundup.psfhosted.org> Message-ID: <1568568498.54.0.637952506791.issue38178@roundup.psfhosted.org> Hrvoje Nik?i? added the comment: Raymond, no problem; I guess I assumed that the authors are following the bug tracker (or have possibly moved on and are inactive). I also had reason to believe the change to be non-controversial, since it is in line with Yury's own recommendations, e.g. from his 2018 EuroPython presentation (slide 14): https://speakerdeck.com/1st1/asyncio-today-and-tomorrow In any case, I am happy that the pull request has been processed and accepted so quickly - thanks everyone for the great work! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 13:28:56 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 15 Sep 2019 17:28:56 +0000 Subject: [issue38019] asyncio subprocess AttributeError: 'NoneType' object has no attribute '_add_reader' / '_remove_reader' In-Reply-To: <1567529709.4.0.805713285268.issue38019@roundup.psfhosted.org> Message-ID: <1568568536.75.0.190040125412.issue38019@roundup.psfhosted.org> Andrew Svetlov added the comment: Thanks. The correct fix is 'do nothing if stream._transport is None'. We have only two weeks before 3.8rc, thus I'll prepare a fix myself for the sake of fast merging. ---------- assignee: -> asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 13:30:40 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 15 Sep 2019 17:30:40 +0000 Subject: [issue38019] asyncio subprocess AttributeError: 'NoneType' object has no attribute '_add_reader' / '_remove_reader' In-Reply-To: <1567529709.4.0.805713285268.issue38019@roundup.psfhosted.org> Message-ID: <1568568640.74.0.179869709309.issue38019@roundup.psfhosted.org> Andrew Svetlov added the comment: This fix cannot land on 3.6, the version is in security-fix only mode. ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 13:51:08 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 15 Sep 2019 17:51:08 +0000 Subject: [issue38178] Remove explicit "loop" argument from EchoClientProtocol example In-Reply-To: <1568560654.11.0.446224617149.issue38178@roundup.psfhosted.org> Message-ID: <1568569868.28.0.1460977759.issue38178@roundup.psfhosted.org> Andrew Svetlov added the comment: Raymond, sorry if I was so quick in applying. The patch is very trivial and obvious. I am pretty sure that Yuri and Victor approve it. The PR doesn't fix a mistake, the code is still valid. But we all changed our mind what is the loop role, should it be explicitly passed everywhere or not, etc. At the time of the example creation explicit loop was safer, after Python 3.5.3 bugfx release the implicit loop became the idiomatic solution. We use the implicit loop everywhere, 3.8 raises DeprecationWarning for passing the loop into certain API calls. The PR just changes the example to follow our own recommendations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 16:06:51 2019 From: report at bugs.python.org (Diego Barriga) Date: Sun, 15 Sep 2019 20:06:51 +0000 Subject: [issue37904] Suggested edit to Python Tutorial - Section 4 In-Reply-To: <1566386922.03.0.919785821856.issue37904@roundup.psfhosted.org> Message-ID: <1568578011.98.0.748133179836.issue37904@roundup.psfhosted.org> Change by Diego Barriga : ---------- nosy: +umoqnier _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 16:16:15 2019 From: report at bugs.python.org (Roundup Robot) Date: Sun, 15 Sep 2019 20:16:15 +0000 Subject: [issue38100] Spelling error in unittest.mock code In-Reply-To: <1568194615.26.0.336032437884.issue38100@roundup.psfhosted.org> Message-ID: <1568578575.63.0.58524221859.issue38100@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +15773 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16164 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 16:18:31 2019 From: report at bugs.python.org (Maritza Esparza) Date: Sun, 15 Sep 2019 20:18:31 +0000 Subject: [issue38100] Spelling error in unittest.mock code In-Reply-To: <1568194615.26.0.336032437884.issue38100@roundup.psfhosted.org> Message-ID: <1568578711.09.0.055500045414.issue38100@roundup.psfhosted.org> Change by Maritza Esparza : ---------- pull_requests: +15774 pull_request: https://github.com/python/cpython/pull/16165 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 16:23:40 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 15 Sep 2019 20:23:40 +0000 Subject: [issue35638] Introduce fixed point locale aware format type for floating point numbers In-Reply-To: <1546428301.89.0.74748590824.issue35638@roundup.psfhosted.org> Message-ID: <1568579020.34.0.744617342455.issue35638@roundup.psfhosted.org> Raymond Hettinger added the comment: I had thought that use a locales were deemed an anti-pattern (not easy-to-use, not thread-safe, etc). ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 16:23:50 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 15 Sep 2019 20:23:50 +0000 Subject: [issue35638] Introduce fixed point locale aware format type for floating point numbers In-Reply-To: <1546428301.89.0.74748590824.issue35638@roundup.psfhosted.org> Message-ID: <1568579030.34.0.801411471803.issue35638@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 16:33:57 2019 From: report at bugs.python.org (Diego Barriga) Date: Sun, 15 Sep 2019 20:33:57 +0000 Subject: [issue37904] Suggested edit to Python Tutorial - Section 4 In-Reply-To: <1566386922.03.0.919785821856.issue37904@roundup.psfhosted.org> Message-ID: <1568579637.4.0.709087831791.issue37904@roundup.psfhosted.org> Diego Barriga added the comment: I'm interest on this for my first contribution :D ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 16:37:39 2019 From: report at bugs.python.org (Abraham) Date: Sun, 15 Sep 2019 20:37:39 +0000 Subject: [issue37828] Fix default mock_name in unittest.mock.assert_called error message In-Reply-To: <1565593953.82.0.916439327482.issue37828@roundup.psfhosted.org> Message-ID: <1568579859.93.0.431883806369.issue37828@roundup.psfhosted.org> Change by Abraham : ---------- keywords: +patch pull_requests: +15775 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16166 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 16:58:01 2019 From: report at bugs.python.org (Roberto Meza) Date: Sun, 15 Sep 2019 20:58:01 +0000 Subject: [issue38080] 2to3 urllib fixer: missing fix for urllib.getproxies In-Reply-To: <1568096046.76.0.575371443955.issue38080@roundup.psfhosted.org> Message-ID: <1568581081.85.0.0347845515331.issue38080@roundup.psfhosted.org> Change by Roberto Meza : ---------- keywords: +patch nosy: +robertpro nosy_count: 1.0 -> 2.0 pull_requests: +15776 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 17:28:37 2019 From: report at bugs.python.org (Marco Antonio Ramirez Valdes) Date: Sun, 15 Sep 2019 21:28:37 +0000 Subject: [issue38100] Spelling error in unittest.mock code In-Reply-To: <1568194615.26.0.336032437884.issue38100@roundup.psfhosted.org> Message-ID: <1568582917.26.0.636073969431.issue38100@roundup.psfhosted.org> Change by Marco Antonio Ramirez Valdes : ---------- pull_requests: +15778 pull_request: https://github.com/python/cpython/pull/16168 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 17:36:07 2019 From: report at bugs.python.org (Ned Deily) Date: Sun, 15 Sep 2019 21:36:07 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568583367.94.0.950046252075.issue38117@roundup.psfhosted.org> Ned Deily added the comment: The Windows and macOS installers also need to by updated to the new versions. ---------- components: +Windows, macOS nosy: +lukasz.langa, ned.deily, paul.moore, ronaldoussoren, steve.dower, tim.golden, zach.ware priority: normal -> release blocker resolution: fixed -> stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 17:37:34 2019 From: report at bugs.python.org (Diego Barriga) Date: Sun, 15 Sep 2019 21:37:34 +0000 Subject: [issue38179] Test subprocess fails on Fedora 30: test_group and test_extra_groups Message-ID: <1568583454.85.0.891057048801.issue38179@roundup.psfhosted.org> New submission from Diego Barriga : ====================================================================== ERROR: test_extra_groups (test.test_subprocess.POSIXProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/umoqnier/develop/python-dev/cpython/Lib/test/test_subprocess.py", line 1840, in test_extra_groups output = subprocess.check_output( File "/home/umoqnier/develop/python-dev/cpython/Lib/subprocess.py", line 419, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/home/umoqnier/develop/python-dev/cpython/Lib/subprocess.py", line 497, in run with Popen(*popenargs, **kwargs) as process: File "/home/umoqnier/develop/python-dev/cpython/Lib/subprocess.py", line 889, in __init__ gids.append(grp.getgrnam(extra_group).gr_gid) KeyError: "getgrnam(): name not found: 'nogroup'" ====================================================================== ERROR: test_group (test.test_subprocess.POSIXProcessTestCase) (group='nogroup') ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/umoqnier/develop/python-dev/cpython/Lib/test/test_subprocess.py", line 1800, in test_group output = subprocess.check_output( File "/home/umoqnier/develop/python-dev/cpython/Lib/subprocess.py", line 419, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/home/umoqnier/develop/python-dev/cpython/Lib/subprocess.py", line 497, in run with Popen(*popenargs, **kwargs) as process: File "/home/umoqnier/develop/python-dev/cpython/Lib/subprocess.py", line 862, in __init__ gid = grp.getgrnam(group).gr_gid KeyError: "getgrnam(): name not found: 'nogroup'" ---------------------------------------------------------------------- Ran 306 tests in 26.423s FAILED (errors=2, skipped=31) test test_subprocess failed == Tests result: FAILURE == 1 test failed: test_subprocess Total duration: 26 sec 676 ms Tests result: FAILURE ---------- components: Tests messages: 352495 nosy: umoqnier priority: normal severity: normal status: open title: Test subprocess fails on Fedora 30: test_group and test_extra_groups type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 17:39:17 2019 From: report at bugs.python.org (Diego Barriga) Date: Sun, 15 Sep 2019 21:39:17 +0000 Subject: [issue38179] Test subprocess fails on Fedora 30: test_group and test_extra_groups In-Reply-To: <1568583454.85.0.891057048801.issue38179@roundup.psfhosted.org> Message-ID: <1568583557.34.0.491499837303.issue38179@roundup.psfhosted.org> Diego Barriga added the comment: $ cat /etc/os-release NAME=Fedora VERSION="30 (Workstation Edition)" ID=fedora VERSION_ID=30 VERSION_CODENAME="" PLATFORM_ID="platform:f30" PRETTY_NAME="Fedora 30 (Workstation Edition)" ANSI_COLOR="0;34" LOGO=fedora-logo-icon CPE_NAME="cpe:/o:fedoraproject:fedora:30" HOME_URL="https://fedoraproject.org/" DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f30/system-administrators-guide/" SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Fedora" REDHAT_BUGZILLA_PRODUCT_VERSION=30 REDHAT_SUPPORT_PRODUCT="Fedora" REDHAT_SUPPORT_PRODUCT_VERSION=30 PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy" VARIANT="Workstation Edition" VARIANT_ID=workstation ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 17:41:09 2019 From: report at bugs.python.org (Diego Barriga) Date: Sun, 15 Sep 2019 21:41:09 +0000 Subject: [issue38180] Test pyexpat fails on Fedora 30 Message-ID: <1568583669.12.0.757725102986.issue38180@roundup.psfhosted.org> New submission from Diego Barriga : $ ./python -m test -j8 test_pyexpat Run tests in parallel using 8 child processes 0:00:00 load avg: 0.66 [1/1/1] test_pyexpat failed test test_pyexpat failed -- Traceback (most recent call last): File "/home/umoqnier/develop/python-dev/cpython/Lib/test/test_pyexpat.py", line 454, in test_exception parser.Parse(b"", True) RuntimeError: a During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/umoqnier/develop/python-dev/cpython/Lib/test/test_pyexpat.py", line 470, in test_exception self.assertIn('call_with_frame("StartElement"', entries[1][3]) AssertionError: 'call_with_frame("StartElement"' not found in '' == Tests result: FAILURE == 1 test failed: test_pyexpat Total duration: 211 ms Tests result: FAILURE ---------- components: Tests messages: 352497 nosy: umoqnier priority: normal severity: normal status: open title: Test pyexpat fails on Fedora 30 versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 17:41:16 2019 From: report at bugs.python.org (Diego Barriga) Date: Sun, 15 Sep 2019 21:41:16 +0000 Subject: [issue38180] Test pyexpat fails on Fedora 30 In-Reply-To: <1568583669.12.0.757725102986.issue38180@roundup.psfhosted.org> Message-ID: <1568583676.67.0.868876485257.issue38180@roundup.psfhosted.org> Change by Diego Barriga : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 17:41:46 2019 From: report at bugs.python.org (Diego Barriga) Date: Sun, 15 Sep 2019 21:41:46 +0000 Subject: [issue38180] Test pyexpat fails on Fedora 30 In-Reply-To: <1568583669.12.0.757725102986.issue38180@roundup.psfhosted.org> Message-ID: <1568583706.78.0.568793327968.issue38180@roundup.psfhosted.org> Diego Barriga added the comment: $ cat /etc/os-release NAME=Fedora VERSION="30 (Workstation Edition)" ID=fedora VERSION_ID=30 VERSION_CODENAME="" PLATFORM_ID="platform:f30" PRETTY_NAME="Fedora 30 (Workstation Edition)" ANSI_COLOR="0;34" LOGO=fedora-logo-icon CPE_NAME="cpe:/o:fedoraproject:fedora:30" HOME_URL="https://fedoraproject.org/" DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f30/system-administrators-guide/" SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help" BUG_REPORT_URL="https://bugzilla.redhat.com/" REDHAT_BUGZILLA_PRODUCT="Fedora" REDHAT_BUGZILLA_PRODUCT_VERSION=30 REDHAT_SUPPORT_PRODUCT="Fedora" REDHAT_SUPPORT_PRODUCT_VERSION=30 PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy" VARIANT="Workstation Edition" VARIANT_ID=workstation ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 18:05:31 2019 From: report at bugs.python.org (Diego Barriga) Date: Sun, 15 Sep 2019 22:05:31 +0000 Subject: [issue37904] Suggested edit to Python Tutorial - Section 4 In-Reply-To: <1566386922.03.0.919785821856.issue37904@roundup.psfhosted.org> Message-ID: <1568585131.68.0.237217634249.issue37904@roundup.psfhosted.org> Change by Diego Barriga : ---------- keywords: +patch pull_requests: +15779 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/16169 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 19:33:40 2019 From: report at bugs.python.org (Anders Lorentsen) Date: Sun, 15 Sep 2019 23:33:40 +0000 Subject: [issue31956] Add start and stop parameters to the array.index() In-Reply-To: <1509966827.68.0.213398074469.issue31956@psf.upfronthosting.co.za> Message-ID: <1568590420.06.0.753097447441.issue31956@roundup.psfhosted.org> Anders Lorentsen added the comment: I have actually managed to lost my local branch of this fix, though I assume I can just start another one, manually copy over the changes, somehow mark this current PR as cancelled, aborted, or in my option the best: "replaced/superseeded by: [new PR]". In any case, there were discussions that seem to be unresolved, allow me to summarize: * Document that index() raises ValueError when *value* is not found? > vstinner: We don't do this, remove this addition. > serhiy: Other index() methods does this. ---> My patch current does this. Who has final saying here? * 'start' and 'stop' arguments are not keyword arguments, and also not shown in the signature as '.. start=0 ..' for this very reason (it may make them look as keyword arguments). Also, this lines up with list.index() for consistency. Wishes about changing this for all index()-methods has been expressed, but it seems to be consensus on doing this in unison for all index()-methods at once, in a bigger change... So, what is currently in the PR is good enough for now, or? * Wording in documentation: Clarify that "the returned index is still relative to the start of the array, not the searched sub sequence" or not? * Comment in the code about checking the length of the array on each iteration? There were comments about it being "confusing" - and while I agree, the other index()-code for lists, does not comment on this. Again I followed the path of most consistency, but I did receive comments about this. Yes to descriptive comments, or not? ---- Generally speaking: In the end, all I really did was mimic how list.index() is both written and documented, and that's when discussions about issues related to that started occurring, and so I now remember that I halted my PR, waiting for these issues to be resolved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 20:55:26 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Mon, 16 Sep 2019 00:55:26 +0000 Subject: [issue15729] PyStructSequence_NewType enhancement In-Reply-To: <1345407378.13.0.964225258094.issue15729@psf.upfronthosting.co.za> Message-ID: <1568595326.86.0.954829443504.issue15729@roundup.psfhosted.org> Joannah Nanjekye added the comment: All enhancements specified in this issue have since been done. PyStructSequence_NewType() calls PyType_FromSpecWithBases() which sets the needed flags and even the qualname: PyObject * PyType_FromSpecWithBases(PyType_Spec *spec, PyObject *bases) { PyHeapTypeObject *res; PyMemberDef *memb; PyObject *modname; PyTypeObject *type, *base; PyType_Slot *slot; Py_ssize_t nmembers; char *s, *res_start; nmembers = 0; for (slot = spec->slots; slot->slot; slot++) { if (slot->slot == Py_tp_members) { nmembers = 0; for (memb = slot->pfunc; memb->name != NULL; memb++) { nmembers++; } } } res = (PyHeapTypeObject*)PyType_GenericAlloc(&PyType_Type, nmembers); if (res == NULL) return NULL; res_start = (char*)res; if (spec->name == NULL) { PyErr_SetString(PyExc_SystemError, "Type spec does not define the name field."); goto fail; } /* Set the type name and qualname */ s = strrchr(spec->name, '.'); if (s == NULL) s = (char*)spec->name; else s++; type = &res->ht_type; /* The flags must be initialized early, before the GC traverses us */ type->tp_flags = spec->flags | Py_TPFLAGS_HEAPTYPE; res->ht_name = PyUnicode_FromString(s); if (!res->ht_name) goto fail; res->ht_qualname = res->ht_name; Py_INCREF(res->ht_qualname); type->tp_name = spec->name; /* Adjust for empty tuple bases */ if (!bases) { base = &PyBaseObject_Type; /* See whether Py_tp_base(s) was specified */ for (slot = spec->slots; slot->slot; slot++) { if (slot->slot == Py_tp_base) base = slot->pfunc; else if (slot->slot == Py_tp_bases) { bases = slot->pfunc; Py_INCREF(bases); } } if (!bases) bases = PyTuple_Pack(1, base); if (!bases) goto fail; } else Py_INCREF(bases); /* Calculate best base, and check that all bases are type objects */ base = best_base(bases); if (base == NULL) { goto fail; } if (!PyType_HasFeature(base, Py_TPFLAGS_BASETYPE)) { PyErr_Format(PyExc_TypeError, "type '%.100s' is not an acceptable base type", base->tp_name); goto fail; } /* Initialize essential fields */ type->tp_as_async = &res->as_async; type->tp_as_number = &res->as_number; type->tp_as_sequence = &res->as_sequence; type->tp_as_mapping = &res->as_mapping; type->tp_as_buffer = &res->as_buffer; /* Set tp_base and tp_bases */ type->tp_bases = bases; bases = NULL; Py_INCREF(base); type->tp_base = base; type->tp_basicsize = spec->basicsize; type->tp_itemsize = spec->itemsize; for (slot = spec->slots; slot->slot; slot++) { if (slot->slot < 0 || (size_t)slot->slot >= Py_ARRAY_LENGTH(slotoffsets)) { PyErr_SetString(PyExc_RuntimeError, "invalid slot offset"); goto fail; } else if (slot->slot == Py_tp_base || slot->slot == Py_tp_bases) { /* Processed above */ continue; } else if (slot->slot == Py_tp_doc) { /* For the docstring slot, which usually points to a static string literal, we need to make a copy */ const char *old_doc = _PyType_DocWithoutSignature(type->tp_name, slot->pfunc); size_t len = strlen(old_doc)+1; char *tp_doc = PyObject_MALLOC(len); if (tp_doc == NULL) { type->tp_doc = NULL; PyErr_NoMemory(); goto fail; } memcpy(tp_doc, old_doc, len); type->tp_doc = tp_doc; } else if (slot->slot == Py_tp_members) { /* Move the slots to the heap type itself */ size_t len = Py_TYPE(type)->tp_itemsize * nmembers; memcpy(PyHeapType_GET_MEMBERS(res), slot->pfunc, len); type->tp_members = PyHeapType_GET_MEMBERS(res); } else { /* Copy other slots directly */ *(void**)(res_start + slotoffsets[slot->slot]) = slot->pfunc; } } if (type->tp_dealloc == NULL) { /* It's a heap type, so needs the heap types' dealloc. subtype_dealloc will call the base type's tp_dealloc, if necessary. */ type->tp_dealloc = subtype_dealloc; } if (PyType_Ready(type) < 0) goto fail; if (type->tp_dictoffset) { res->ht_cached_keys = _PyDict_NewKeysForClass(); } /* Set type.__module__ */ s = strrchr(spec->name, '.'); if (s != NULL) { int err; modname = PyUnicode_FromStringAndSize( spec->name, (Py_ssize_t)(s - spec->name)); if (modname == NULL) { goto fail; } err = _PyDict_SetItemId(type->tp_dict, &PyId___module__, modname); Py_DECREF(modname); if (err != 0) goto fail; } else { if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, "builtin type %.200s has no __module__ attribute", spec->name)) goto fail; } return (PyObject*)res; fail: Py_DECREF(res); return NULL; } So I think this should be closed. I think issue2006 should also be closed as the Py_TPFLAGS_HEAPTYPE flag is set. ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 20:57:58 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Mon, 16 Sep 2019 00:57:58 +0000 Subject: [issue20066] PyStructSequence_NewType() not setting proper heap allocation flag? In-Reply-To: <1387978399.6.0.58819819413.issue20066@psf.upfronthosting.co.za> Message-ID: <1568595478.82.0.667564758603.issue20066@roundup.psfhosted.org> Joannah Nanjekye added the comment: As commented in issue15729, the Py_TPFLAGS_HEAPTYPE flag is now set in PyType_FromSpecWithBases() which is called by PyStructSequence_NewType(). I think this is no longer an issue. ---------- nosy: +nanjekyejoannah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 22:16:28 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 16 Sep 2019 02:16:28 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568600188.71.0.673899325663.issue38117@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +15780 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/16170 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 22:29:31 2019 From: report at bugs.python.org (Eryk Sun) Date: Mon, 16 Sep 2019 02:29:31 +0000 Subject: [issue32592] Drop support of Windows Vista and 7 in Python 3.9 In-Reply-To: <1516268238.05.0.467229070634.issue32592@psf.upfronthosting.co.za> Message-ID: <1568600971.78.0.0922773929356.issue32592@roundup.psfhosted.org> Eryk Sun added the comment: Here are a couple more: * WSA_FLAG_NO_HANDLE_INHERIT is supported. Code related to `support_wsa_no_inherit` in Modules/socketmodule.c can be removed. * AddDllDirectory and RemoveDllDirectory are supported. os__add_dll_directory_impl and os__remove_dll_directory_impl in Modules/posixmodule.c no longer need to manually link to them via GetModuleHandleW and GetProcAddress. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 22:37:20 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 16 Sep 2019 02:37:20 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568601440.55.0.914800685147.issue38117@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +15781 pull_request: https://github.com/python/cpython/pull/16171 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 22:38:42 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 02:38:42 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568601522.42.0.312542759154.issue38117@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15782 pull_request: https://github.com/python/cpython/pull/16172 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 22:38:36 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 16 Sep 2019 02:38:36 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568601516.06.0.918944708748.issue38117@roundup.psfhosted.org> Ned Deily added the comment: New changeset 24d1597e430498ebe2d3d18fba2cacb3957b494d by Ned Deily in branch 'master': bpo-38117: Updated OpenSSL to 1.1.1d in macOS installer. (GH-16170) https://github.com/python/cpython/commit/24d1597e430498ebe2d3d18fba2cacb3957b494d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 22:39:49 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 02:39:49 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568601589.46.0.248297888661.issue38117@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15783 pull_request: https://github.com/python/cpython/pull/16173 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 22:56:07 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 02:56:07 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568602567.23.0.105717995365.issue38117@roundup.psfhosted.org> miss-islington added the comment: New changeset 26c44b5144a51f452dd0693b0278ec69d6a954a1 by Miss Islington (bot) in branch '3.7': bpo-38117: Updated OpenSSL to 1.1.1d in macOS installer. (GH-16170) https://github.com/python/cpython/commit/26c44b5144a51f452dd0693b0278ec69d6a954a1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 22:57:31 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 02:57:31 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568602651.92.0.591225806344.issue38117@roundup.psfhosted.org> miss-islington added the comment: New changeset 346b7c928b82d9da8f6654391e9cfe55625dcfac by Miss Islington (bot) in branch '3.8': bpo-38117: Updated OpenSSL to 1.1.1d in macOS installer. (GH-16170) https://github.com/python/cpython/commit/346b7c928b82d9da8f6654391e9cfe55625dcfac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 23:36:04 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 16 Sep 2019 03:36:04 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568604964.76.0.82028137079.issue38117@roundup.psfhosted.org> Ned Deily added the comment: New changeset 8dd358caf0d3f300ee64799812a020fe0de53637 by Ned Deily in branch '2.7': bpo-38117: Updated OpenSSL to 1.0.2t in macOS installer for 2.7.x. (GH-16171) https://github.com/python/cpython/commit/8dd358caf0d3f300ee64799812a020fe0de53637 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 15 23:39:09 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 16 Sep 2019 03:39:09 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568605149.92.0.103279288491.issue38117@roundup.psfhosted.org> Ned Deily added the comment: macOS 3.9, 3.8, 3.7 installers updated to 1.1.1d, macOS 2.7 installer updated to 1.0.2t. Leaving open for Windows installers updates. ---------- nosy: +benjamin.peterson versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 01:15:02 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 16 Sep 2019 05:15:02 +0000 Subject: [issue37224] test__xxsubinterpreters failed on AMD64 Windows8.1 Refleaks 3.8 In-Reply-To: <1560214681.61.0.906498246375.issue37224@roundup.psfhosted.org> Message-ID: <1568610902.12.0.835140333134.issue37224@roundup.psfhosted.org> Kyle Stanley added the comment: Upon digging through Modules/_xxsubinterpretersmodule.c, I noticed that on line 2059, `PyInterpreterState_Delete(interp);` is commented out (https://github.com/python/cpython/blob/bf169915ecdd42329726104278eb723a7dda2736/Modules/_xxsubinterpretersmodule.c#L2059). This was done when _xxsubinterpretersmodule.c was first added by Eric Snow (https://github.com/python/cpython/blob/bf169915ecdd42329726104278eb723a7dda2736/Modules/_xxsubinterpretersmodule.c#L2059), so it seems to have been done intentionally but I don't understand why. Is this because `Py_EndInterpreter()` is supposed to shutdown the interpreter, so `PyInterpreterState_Delete()` isn't needed? If so, that still doesn't particularly explain why it was commented out. Perhaps Eric can elaborate. ---------- nosy: +aeros167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 01:17:13 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 16 Sep 2019 05:17:13 +0000 Subject: [issue37224] test__xxsubinterpreters failed on AMD64 Windows8.1 Refleaks 3.8 In-Reply-To: <1560214681.61.0.906498246375.issue37224@roundup.psfhosted.org> Message-ID: <1568611033.09.0.320935266875.issue37224@roundup.psfhosted.org> Kyle Stanley added the comment: Note that I'm not particularly experienced with the c-api, I'm just trying to take a stab at understanding why the buildbot failure is occuring. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 01:20:01 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 16 Sep 2019 05:20:01 +0000 Subject: [issue37224] test__xxsubinterpreters failed on AMD64 Windows8.1 Refleaks 3.8 In-Reply-To: <1560214681.61.0.906498246375.issue37224@roundup.psfhosted.org> Message-ID: <1568611201.04.0.134595470311.issue37224@roundup.psfhosted.org> Kyle Stanley added the comment: Clarification: In the above comment when I was referring to the commit made by Eric Snow, I meant to link to https://github.com/python/cpython/commit/7f8bfc9b9a8381ddb768421b5dd5cbd970266190. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 02:06:00 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 06:06:00 +0000 Subject: [issue38168] Refleaks in setint() of mmapmodule.c In-Reply-To: <1568441843.93.0.712377390707.issue38168@roundup.psfhosted.org> Message-ID: <1568613960.35.0.0429253464689.issue38168@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15784 pull_request: https://github.com/python/cpython/pull/16174 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 02:06:29 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 06:06:29 +0000 Subject: [issue38168] Refleaks in setint() of mmapmodule.c In-Reply-To: <1568441843.93.0.712377390707.issue38168@roundup.psfhosted.org> Message-ID: <1568613989.06.0.705772863808.issue38168@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15785 pull_request: https://github.com/python/cpython/pull/16175 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 02:27:05 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 06:27:05 +0000 Subject: [issue38168] Refleaks in setint() of mmapmodule.c In-Reply-To: <1568441843.93.0.712377390707.issue38168@roundup.psfhosted.org> Message-ID: <1568615225.37.0.826138159309.issue38168@roundup.psfhosted.org> miss-islington added the comment: New changeset 322309efe658122cac340adf4995ce40fa0c2e74 by Miss Islington (bot) in branch '3.8': [3.8] bpo-38168: Fix a possbile refleak in setint() of mmapmodule.c (GH-16136) (GH-16174) https://github.com/python/cpython/commit/322309efe658122cac340adf4995ce40fa0c2e74 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 02:27:41 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 06:27:41 +0000 Subject: [issue38168] Refleaks in setint() of mmapmodule.c In-Reply-To: <1568441843.93.0.712377390707.issue38168@roundup.psfhosted.org> Message-ID: <1568615261.36.0.861152889604.issue38168@roundup.psfhosted.org> miss-islington added the comment: New changeset e857fe624d985616f3e1a6e095a5db732e6b3efe by Miss Islington (bot) in branch '3.7': [3.7] bpo-38168: Fix a possbile refleak in setint() of mmapmodule.c (GH-16136) (GH-16175) https://github.com/python/cpython/commit/e857fe624d985616f3e1a6e095a5db732e6b3efe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 02:33:23 2019 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 16 Sep 2019 06:33:23 +0000 Subject: [issue38168] Refleaks in setint() of mmapmodule.c In-Reply-To: <1568441843.93.0.712377390707.issue38168@roundup.psfhosted.org> Message-ID: <1568615603.25.0.349123601168.issue38168@roundup.psfhosted.org> Change by Xiang Zhang : ---------- pull_requests: +15786 pull_request: https://github.com/python/cpython/pull/16176 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 02:36:24 2019 From: report at bugs.python.org (=?utf-8?b?6Jab5a6a6LCU55qE5Za1?=) Date: Mon, 16 Sep 2019 06:36:24 +0000 Subject: [issue38181] some trable with max when np.nan is in the first of a list Message-ID: <1568615784.18.0.275638737164.issue38181@roundup.psfhosted.org> New submission from ????? <1147945735 at QQ.COM>: max([5.0,np.nan]) >>> 5.0 max([np.nan,5.0]) >>> nan ---------- components: Tests messages: 352513 nosy: 1147945735 at qq.com priority: normal severity: normal status: open title: some trable with max when np.nan is in the first of a list versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 02:48:15 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 16 Sep 2019 06:48:15 +0000 Subject: [issue37224] test__xxsubinterpreters failed on AMD64 Windows8.1 Refleaks 3.8 In-Reply-To: <1560214681.61.0.906498246375.issue37224@roundup.psfhosted.org> Message-ID: <1568616495.46.0.492892358093.issue37224@roundup.psfhosted.org> Kyle Stanley added the comment: Upon further reading of the documentation and some experimentation, it would definitely not make sense to call `PyInterpreterState_Delete` here (since we're only closing the sub-interpreter in the current thread), so that's not the issue. I still have no idea as to why it's commented out there, but that's besides the point. I think I may have found the potential cause of the test failure though. Looking into `test_still_running()`, it's clear that the intention is for a RuntimeError to be raised if `interpreters.destroy()` is called on a currently running interpreter: ``` def test_still_running(self): main, = interpreters.list_all() interp = interpreters.create() with _running(interp): with self.assertRaises(RuntimeError): interpreters.destroy(interp) self.assertTrue(interpreters.is_running(interp)) ``` However, within interp_destroy (https://github.com/python/cpython/blob/56a45142e70a1ccf3233d43cb60c47255252e89a/Modules/_xxsubinterpretersmodule.c#L2024), it is apparent that the RuntimeError is ONLY raised when attempting to destroy the current interpreter: ``` if (interp == current) { PyErr_SetString(PyExc_RuntimeError, "cannot destroy the current interpreter"); return NULL; } ``` When attempting to destroy a running interpreter, NULL is returned without raising the RuntimeError: ``` if (_ensure_not_running(interp) < 0) { return NULL; } ``` This was my first guess at a solution: ``` if (_ensure_not_running(interp) < 0) { PyErr_SetString(PyExc_RuntimeError, "cannot destroy a running interpreter") return NULL; } ``` But, within `_ensure_not_running()` (https://github.com/python/cpython/blob/56a45142e70a1ccf3233d43cb60c47255252e89a/Modules/_xxsubinterpretersmodule.c#L1842), a RuntimeError is supposed to be raised from: ``` if (is_running) { PyErr_Format(PyExc_RuntimeError, "interpreter already running"); return -1; } ``` Initially, I was unsure of the difference between `PyErr_SetString()` and `PyErr_Format()`, so I referred to the documentation. `PyErr_Format()` is similar, but it also returns NULL. If I'm not mistaken doesn't mean that the `return -1` within the `if (is_running)` bock is effectively ignored? If so, this would potentially explain the problem... I think the appropriate solution would be to replace `PyErr_Format()` with `PyErr_SetString()` within `_ensure_not_running()`. Also, I think it would be more useful to additionally raise the RuntimeError within `interp_destroy()` if the interpreter is running, to provide a more useful and specific error message. "cannot destroy a running interpreter" is far more useful for debugging purposes than a more generic "interpreter already running". I plan on opening a PR to make these changes in the next few days. Let me know what you think Victor. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 02:50:34 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 16 Sep 2019 06:50:34 +0000 Subject: [issue38181] some trable with max when np.nan is in the first of a list In-Reply-To: <1568615784.18.0.275638737164.issue38181@roundup.psfhosted.org> Message-ID: <1568616634.86.0.709825133147.issue38181@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I think it's more about how np.nan eq is implemented and not a bug in Python. I find this answer to be a good explanation https://stackoverflow.com/a/47788524/2610955 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 02:52:07 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 16 Sep 2019 06:52:07 +0000 Subject: [issue37224] test__xxsubinterpreters failed on AMD64 Windows8.1 Refleaks 3.8 In-Reply-To: <1560214681.61.0.906498246375.issue37224@roundup.psfhosted.org> Message-ID: <1568616727.9.0.0483618934047.issue37224@roundup.psfhosted.org> Kyle Stanley added the comment: Clarification: "If I'm not mistaken doesn't mean that the `return -1` within ..." Should instead be: "If I'm not mistaken doesn't this mean that the `return -1` within ..." (I am really looking forward to moving issue over to GitHub at some point. It's nice to be able to edit comments and properly format code blocks...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 03:01:46 2019 From: report at bugs.python.org (=?utf-8?b?6Jab5a6a6LCU55qE5Za1?=) Date: Mon, 16 Sep 2019 07:01:46 +0000 Subject: [issue38181] some trable with max when np.nan is in the first of a list In-Reply-To: <1568615784.18.0.275638737164.issue38181@roundup.psfhosted.org> Message-ID: <1568617306.61.0.511239074211.issue38181@roundup.psfhosted.org> ????? <1147945735 at QQ.COM> added the comment: thanks . ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 03:03:00 2019 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 16 Sep 2019 07:03:00 +0000 Subject: [issue38181] some trable with max when np.nan is in the first of a list In-Reply-To: <1568615784.18.0.275638737164.issue38181@roundup.psfhosted.org> Message-ID: <1568617380.72.0.713666089322.issue38181@roundup.psfhosted.org> Mark Dickinson added the comment: Right, `max` can only give meaningful results when presented with elements that belong to a totally-ordered collection. Unfortunately, floats-including-nan is not such a collection (though floats-excluding-nan *is*, provided we ignore wrinkles with positive and negative zero). Here's the source of the issue: Python 3.7.4 (default, Sep 7 2019, 19:52:29) [Clang 10.0.1 (clang-1001.0.46.4)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import numpy as np >>> 5.0 < np.nan False >>> np.nan < 5.0 False ---------- nosy: +mark.dickinson resolution: third party -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 03:07:35 2019 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 16 Sep 2019 07:07:35 +0000 Subject: [issue38168] Refleaks in setint() of mmapmodule.c In-Reply-To: <1568441843.93.0.712377390707.issue38168@roundup.psfhosted.org> Message-ID: <1568617655.24.0.239330878193.issue38168@roundup.psfhosted.org> Xiang Zhang added the comment: New changeset 68d8c122972d7a49627b983af4ccbfad9f5ade17 by Xiang Zhang in branch '2.7': [2.7] bpo-38168: Fix a possbile refleak in setint() of mmapmodule.c (GH-16136) (GH-16176) https://github.com/python/cpython/commit/68d8c122972d7a49627b983af4ccbfad9f5ade17 ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 03:09:19 2019 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 16 Sep 2019 07:09:19 +0000 Subject: [issue38168] Refleaks in setint() of mmapmodule.c In-Reply-To: <1568441843.93.0.712377390707.issue38168@roundup.psfhosted.org> Message-ID: <1568617759.28.0.455877047493.issue38168@roundup.psfhosted.org> Change by Xiang Zhang : ---------- components: +Extension Modules -Interpreter Core resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 03:09:58 2019 From: report at bugs.python.org (Kyle Stanley) Date: Mon, 16 Sep 2019 07:09:58 +0000 Subject: [issue38154] test__xxsubinterpreters: random failures on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1568368239.98.0.217777678278.issue38154@roundup.psfhosted.org> Message-ID: <1568617798.77.0.906442061431.issue38154@roundup.psfhosted.org> Kyle Stanley added the comment: I believe I found a potential fix, see https://bugs.python.org/issue37224?@ok_message=msg%20352516%20created%0Aissue%2037224%20message_count%2C%20messages%20edited%20ok&@template=item#msg352514. Should I attach the PR to that issue or this one? ---------- nosy: +aeros167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 03:18:13 2019 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 16 Sep 2019 07:18:13 +0000 Subject: [issue38181] some trable with max when np.nan is in the first of a list In-Reply-To: <1568615784.18.0.275638737164.issue38181@roundup.psfhosted.org> Message-ID: <1568618293.47.0.52195814205.issue38181@roundup.psfhosted.org> Change by Mark Dickinson : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 03:28:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Sep 2019 07:28:52 +0000 Subject: [issue38182] test_asyncio.test_subprocess: test_stdin_stdout() failed on AMD64 FreeBSD 10-STABLE Non-Debug 3.x Message-ID: <1568618932.29.0.888642013257.issue38182@roundup.psfhosted.org> New submission from STINNER Victor : AMD64 FreeBSD 10-STABLE Non-Debug 3.x: https://buildbot.python.org/all/#/builders/167/builds/1535 ====================================================================== ERROR: test_stdin_stdout (test.test_asyncio.test_subprocess.SubprocessMultiLoopWatcherTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/test_asyncio/test_subprocess.py", line 129, in test_stdin_stdout exitcode, stdout = self.loop.run_until_complete(task) File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/asyncio/base_events.py", line 608, in run_until_complete return future.result() File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/asyncio/tasks.py", line 490, in wait_for raise exceptions.TimeoutError() asyncio.exceptions.TimeoutError and then when asyncio is re-run in verbose mode: ERROR: test_stdin_stdout (test.test_asyncio.test_subprocess.SubprocessMultiLoopWatcherTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/test/test_asyncio/test_subprocess.py", line 129, in test_stdin_stdout exitcode, stdout = self.loop.run_until_complete(task) File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/asyncio/base_events.py", line 608, in run_until_complete return future.result() File "/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/asyncio/tasks.py", line 490, in wait_for raise exceptions.TimeoutError() asyncio.exceptions.TimeoutError ---------- components: Tests, asyncio messages: 352521 nosy: asvetlov, vstinner, yselivanov priority: normal severity: normal status: open title: test_asyncio.test_subprocess: test_stdin_stdout() failed on AMD64 FreeBSD 10-STABLE Non-Debug 3.x versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 03:29:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Sep 2019 07:29:19 +0000 Subject: [issue38182] test_asyncio: SubprocessMultiLoopWatcherTests.test_stdin_stdout() failed on AMD64 FreeBSD 10-STABLE Non-Debug 3.x In-Reply-To: <1568618932.29.0.888642013257.issue38182@roundup.psfhosted.org> Message-ID: <1568618959.4.0.531850570555.issue38182@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: test_asyncio.test_subprocess: test_stdin_stdout() failed on AMD64 FreeBSD 10-STABLE Non-Debug 3.x -> test_asyncio: SubprocessMultiLoopWatcherTests.test_stdin_stdout() failed on AMD64 FreeBSD 10-STABLE Non-Debug 3.x _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 03:31:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Sep 2019 07:31:43 +0000 Subject: [issue38182] test_asyncio: SubprocessMultiLoopWatcherTests.test_stdin_stdout() failed on AMD64 FreeBSD 10-STABLE Non-Debug 3.x In-Reply-To: <1568618932.29.0.888642013257.issue38182@roundup.psfhosted.org> Message-ID: <1568619103.08.0.463848222428.issue38182@roundup.psfhosted.org> STINNER Victor added the comment: Python 3.8 also has SubprocessMultiLoopWatcherTests so it's also likely affected. I ran this command for 1 minute on my Linux laptop, it didn't fail: # my laptop has 8 logical CPUs $ ./python -m test test_asyncio -m SubprocessMultiLoopWatcherTests -j20 -F -v ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 03:39:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Sep 2019 07:39:19 +0000 Subject: [issue38183] test_idle fails on AMD64 FreeBSD CURRENT Shared 3.x: GetUserCfgDir() fails with PermissionError In-Reply-To: <1568619549.13.0.00779387021845.issue38183@roundup.psfhosted.org> Message-ID: <1568619559.33.0.461060854753.issue38183@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 03:41:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Sep 2019 07:41:20 +0000 Subject: [issue38183] test_idle fails on AMD64 FreeBSD CURRENT Shared 3.x: GetUserCfgDir() fails with PermissionError In-Reply-To: <1568619549.13.0.00779387021845.issue38183@roundup.psfhosted.org> Message-ID: <1568619680.11.0.894298220371.issue38183@roundup.psfhosted.org> STINNER Victor added the comment: Python 2.7, 3.7 and 3.8 buildbot workers are also affected. Python 2.7 fails differently: https://buildbot.python.org/all/#/builders/169/builds/166 0:04:53 load avg: 3.40 [217/404/1] test_idle failed -- running: test_decimal (31 sec 780 ms) Warning: unable to create user config directory /root/.idlerc Check path and permissions. Exiting! Warning: unable to create user config directory /root/.idlerc Check path and permissions. Exiting! Warning: unable to create user config directory /root/.idlerc Check path and permissions. Exiting! Warning: unable to create user config directory /root/.idlerc Check path and permissions. Exiting! Warning: unable to create user config directory /root/.idlerc Check path and permissions. Exiting! Warning: unable to create user config directory /root/.idlerc Check path and permissions. Exiting! Warning: unable to create user config directory /root/.idlerc Check path and permissions. Exiting! Warning: unable to create user config directory /root/.idlerc Check path and permissions. Exiting! Warning: unable to create user config directory /root/.idlerc Check path and permissions. Exiting! Warning: unable to create user config directory /root/.idlerc Check path and permissions. Exiting! test test_idle failed -- multiple errors occurred; run in verbose mode for details ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 03:47:49 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Sep 2019 07:47:49 +0000 Subject: [issue38184] [2.7] test_site: test_s_option() failed on AMD64 Fedora Rawhide Refleaks 2.7 Message-ID: <1568620069.59.0.0713376910256.issue38184@roundup.psfhosted.org> New submission from STINNER Victor : https://buildbot.python.org/all/#/builders/190/builds/151 Re-running test 'test_site' in verbose mode beginning 6 repetitions 123456 (...) test_aliasing_mbcs (test.test_site.ImportSideEffectTests) ... ok test_no_duplicate_paths (test.test_site.ImportSideEffectTests) ... ok test_setdefaultencoding_removed (test.test_site.ImportSideEffectTests) ... ok test_setting_copyright (test.test_site.ImportSideEffectTests) ... ok test_setting_help (test.test_site.ImportSideEffectTests) ... ok test_setting_quit (test.test_site.ImportSideEffectTests) ... ok test test_site failed -- Traceback (most recent call last): File "/home/buildbot/buildarea/2.7.cstratak-fedora-rawhide-x86_64.refleak/build/Lib/test/test_site.py", line 191, in test_s_option self.assertIn(usersite, sys.path) AssertionError: '/root/.local/lib/python2.7/site-packages' not found in ['/home/buildbot/buildarea/2.7.cstratak-fedora-rawhide-x86_64.refleak/build/target/lib/python27.zip', '/home/buildbot/buildarea/2.7.cstratak-fedora-rawhide-x86_64.refleak/build/Lib', '/home/buildbot/buildarea/2.7.cstratak-fedora-rawhide-x86_64.refleak/build/Lib/plat-linux2', '/home/buildbot/buildarea/2.7.cstratak-fedora-rawhide-x86_64.refleak/build/Lib/lib-tk', '/home/buildbot/buildarea/2.7.cstratak-fedora-rawhide-x86_64.refleak/build/Lib/lib-old', '/home/buildbot/buildarea/2.7.cstratak-fedora-rawhide-x86_64.refleak/build/build/lib.linux-x86_64-2.7-pydebug'] test_sitecustomize_executed (test.test_site.ImportSideEffectTests) ... ok ====================================================================== FAIL: test_s_option (test.test_site.HelperFunctionsTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/2.7.cstratak-fedora-rawhide-x86_64.refleak/build/Lib/test/test_site.py", line 191, in test_s_option self.assertIn(usersite, sys.path) AssertionError: '/root/.local/lib/python2.7/site-packages' not found in ['/home/buildbot/buildarea/2.7.cstratak-fedora-rawhide-x86_64.refleak/build/target/lib/python27.zip', '/home/buildbot/buildarea/2.7.cstratak-fedora-rawhide-x86_64.refleak/build/Lib', '/home/buildbot/buildarea/2.7.cstratak-fedora-rawhide-x86_64.refleak/build/Lib/plat-linux2', '/home/buildbot/buildarea/2.7.cstratak-fedora-rawhide-x86_64.refleak/build/Lib/lib-tk', '/home/buildbot/buildarea/2.7.cstratak-fedora-rawhide-x86_64.refleak/build/Lib/lib-old', '/home/buildbot/buildarea/2.7.cstratak-fedora-rawhide-x86_64.refleak/build/build/lib.linux-x86_64-2.7-pydebug'] ---------------------------------------------------------------------- Ran 21 tests in 0.017s FAILED (failures=1, skipped=1) 1 test failed again: test_site ---------- components: Tests messages: 352525 nosy: vstinner priority: normal severity: normal status: open title: [2.7] test_site: test_s_option() failed on AMD64 Fedora Rawhide Refleaks 2.7 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 03:57:11 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Sep 2019 07:57:11 +0000 Subject: [issue38152] AST change introduced tons of reference leaks In-Reply-To: <1568367428.12.0.614565351268.issue38152@roundup.psfhosted.org> Message-ID: <1568620631.25.0.284387817095.issue38152@roundup.psfhosted.org> STINNER Victor added the comment: commit 0247e80f3c529900689425676342cb70ea31a13d Author: Eddie Elizondo Date: Sat Sep 14 09:38:17 2019 -0400 Fix leaks in Python-ast.c (#16127) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 04:07:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Sep 2019 08:07:17 +0000 Subject: [issue38176] test_threading leaked [1, 1, 1] references: test_threads_join In-Reply-To: <1568540899.7.0.49327876198.issue38176@roundup.psfhosted.org> Message-ID: <1568621237.26.0.771434290679.issue38176@roundup.psfhosted.org> STINNER Victor added the comment: commit 09dc2c672f937cbe53300cb680fca1f9c78ff976 Author: Dino Viehland Date: Sun Sep 15 15:51:44 2019 +0100 Fix missing dec ref (#16158) diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c index 8b0a0244bf..1ea2bf28ab 100644 --- a/Modules/_randommodule.c +++ b/Modules/_randommodule.c @@ -572,6 +572,7 @@ static int _random_clear(PyObject *module) { Py_CLEAR(_randomstate(module)->Random_Type); + Py_CLEAR(_randomstate(module)->Long___abs__); return 0; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 04:07:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Sep 2019 08:07:56 +0000 Subject: [issue38075] Make random module PEP-384 compatible In-Reply-To: <1568044678.81.0.091085634764.issue38075@roundup.psfhosted.org> Message-ID: <1568621276.47.0.771448992915.issue38075@roundup.psfhosted.org> STINNER Victor added the comment: commit 09dc2c672f937cbe53300cb680fca1f9c78ff976 Author: Dino Viehland Date: Sun Sep 15 15:51:44 2019 +0100 Fix missing dec ref (#16158) diff --git a/Modules/_randommodule.c b/Modules/_randommodule.c index 8b0a0244bf..1ea2bf28ab 100644 --- a/Modules/_randommodule.c +++ b/Modules/_randommodule.c @@ -572,6 +572,7 @@ static int _random_clear(PyObject *module) { Py_CLEAR(_randomstate(module)->Random_Type); + Py_CLEAR(_randomstate(module)->Long___abs__); return 0; } ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 04:10:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Sep 2019 08:10:18 +0000 Subject: [issue38106] [2.7] Race in PyThread_release_lock on macOS - can lead to memory corruption and deadlock In-Reply-To: <1568200653.3.0.865964137512.issue38106@roundup.psfhosted.org> Message-ID: <1568621418.06.0.307313286872.issue38106@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Race in PyThread_release_lock - can lead to memory corruption and deadlock -> [2.7] Race in PyThread_release_lock on macOS - can lead to memory corruption and deadlock _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 04:15:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Sep 2019 08:15:20 +0000 Subject: [issue38178] Remove explicit "loop" argument from EchoClientProtocol example In-Reply-To: <1568560654.11.0.446224617149.issue38178@roundup.psfhosted.org> Message-ID: <1568621720.34.0.940988162953.issue38178@roundup.psfhosted.org> STINNER Victor added the comment: > In modern asyncio code the explicit loop arguments are no longer used since the loop can always be obtained with get_running_loop(). Yeah, the trend changed. Around Python 3.4, passing explicitly loop was preferred for best performances. Since that time, the code to get the current loop has been optimized, and the new trend is to make the loop implicit to make the code more readable. -- When I wrote the doc, self.loop.stop() was called explicitly: https://docs.python.org/3.5/library/asyncio-protocol.html#tcp-echo-client-protocol It seems like the example has been modified to add a new "on_con_lost" Future. -- Anyway, thanks Hrvoje Nik?i? for your contribution ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 04:15:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Sep 2019 08:15:54 +0000 Subject: [issue35638] Introduce fixed point locale aware format type for floating point numbers In-Reply-To: <1546428301.89.0.74748590824.issue35638@roundup.psfhosted.org> Message-ID: <1568621754.05.0.844609727923.issue35638@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -10794 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 04:15:56 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Sep 2019 08:15:56 +0000 Subject: [issue35638] Introduce fixed point locale aware format type for floating point numbers In-Reply-To: <1546428301.89.0.74748590824.issue35638@roundup.psfhosted.org> Message-ID: <1568621756.15.0.137240784043.issue35638@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -10795 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 04:15:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Sep 2019 08:15:57 +0000 Subject: [issue35638] Introduce fixed point locale aware format type for floating point numbers In-Reply-To: <1546428301.89.0.74748590824.issue35638@roundup.psfhosted.org> Message-ID: <1568621757.88.0.695327762504.issue35638@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -10796 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 05:33:29 2019 From: report at bugs.python.org (=?utf-8?b?0JDQu9C10LrRgdCw0L3QtNGAINCh0LXQvNC10L3QvtCy?=) Date: Mon, 16 Sep 2019 09:33:29 +0000 Subject: [issue33214] join method for list and tuple In-Reply-To: <1522766033.22.0.467229070634.issue33214@psf.upfronthosting.co.za> Message-ID: <1568626409.56.0.0620943318987.issue33214@roundup.psfhosted.org> ????????? ??????? added the comment: in javascript join() is made the other way around ['1','2','3'].join(', ') so, [].join() may confuse some peoples. ---------- nosy: +iamsav _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 05:46:11 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 16 Sep 2019 09:46:11 +0000 Subject: [issue33214] join method for list and tuple In-Reply-To: <1522766033.22.0.467229070634.issue33214@psf.upfronthosting.co.za> Message-ID: <1568627171.52.0.89930290442.issue33214@roundup.psfhosted.org> Christian Heimes added the comment: > in javascript join() is made the other way around > ['1','2','3'].join(', ') > so, [].join() may confuse some peoples. It would be too confusing to have two different approaches to join strings in Python. Besides ECMAScript 1 came out in 1997, 5 years after Python was first released. By that argument JavaScript that should. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 05:53:43 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 16 Sep 2019 09:53:43 +0000 Subject: [issue33214] join method for list and tuple In-Reply-To: <1522766033.22.0.467229070634.issue33214@psf.upfronthosting.co.za> Message-ID: <1568627623.68.0.0713012424787.issue33214@roundup.psfhosted.org> Serhiy Storchaka added the comment: How common is the case of variable number of things to concatenate/union/merge? >From my experience, in most ceases this looks like: result = [] for ...: # many complex statements # may include continue and break result.extend(items) # may be intermixed with result.append(item) So concatenating purely lists from some sequence is very special case. And there are several ways to perform it. result = [] for items in seq: result.extend(items) # nothing wrong with this simple code, really result = [x for items in seq for x in items] # may be less effective for really long sublists, # but looks simple result = list(itertools.chain.from_iterable(items)) # if you are itertools addictive ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 06:00:11 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 16 Sep 2019 10:00:11 +0000 Subject: [issue38185] Weird way of case-insensitive indexing of sqlite3.Row Message-ID: <1568628011.92.0.862406558941.issue38185@roundup.psfhosted.org> New submission from Serhiy Storchaka : sqlite3.Row can be indexed by integers and by strings. In the latter case string matching is case insensitive. But the code that implements this is too simple-minded. It compares UTF-8 representation of two strings ignoring some bit. It works for ASCII letters, but has weird behavior for digits, '_' and non-ASCII characters. For example: >>> import sqlite3 >>> con = sqlite3.connect(":memory:") >>> con.row_factory = sqlite3.Row >>> row = con.execute("select 1 as a_1").fetchone() >>> row['a_1'] 1 >>> row['A_1'] 1 >>> row['A_\x11'] 1 >>> row['A\x7f1'] 1 >>> row = con.execute("select 1 as ?").fetchone() >>> row["?"] 1 >>> row["?"] Traceback (most recent call last): File "", line 1, in IndexError: No item with that key >>> row["?"] 1 ---------- components: Library (Lib) messages: 352533 nosy: berker.peksag, ghaering, serhiy.storchaka priority: normal severity: normal status: open title: Weird way of case-insensitive indexing of sqlite3.Row type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 06:04:49 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 16 Sep 2019 10:04:49 +0000 Subject: [issue33214] join method for list and tuple In-Reply-To: <1522766033.22.0.467229070634.issue33214@psf.upfronthosting.co.za> Message-ID: <1568628289.4.0.442715515739.issue33214@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is history, but in 1997 Python had the same order of arguments as ECMAScript: string.join(words [, sep]). str.join() was added only in 1999 (226ae6ca122f814dabdc40178c7b9656caf729c2). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 06:07:45 2019 From: report at bugs.python.org (Christian Schmidbauer) Date: Mon, 16 Sep 2019 10:07:45 +0000 Subject: [issue24363] httplib fails to handle semivalid HTTP headers In-Reply-To: <1433257563.79.0.772954216205.issue24363@psf.upfronthosting.co.za> Message-ID: <1568628465.09.0.516479776661.issue24363@roundup.psfhosted.org> Change by Christian Schmidbauer : ---------- keywords: +patch pull_requests: +15787 pull_request: https://github.com/python/cpython/pull/12214 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 06:16:14 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Mon, 16 Sep 2019 10:16:14 +0000 Subject: [issue38183] test_idle fails on AMD64 FreeBSD CURRENT Shared 3.x: GetUserCfgDir() fails with PermissionError In-Reply-To: <1568619549.13.0.00779387021845.issue38183@roundup.psfhosted.org> Message-ID: <1568628974.44.0.00119115130568.issue38183@roundup.psfhosted.org> Kubilay Kocak added the comment: This is related to issue 37400 and issue 27838 in that specific invocations of the buildbot service (like via sudo) cause the environment to be setup differently. In this case, I had just started the buildbot worker via sudo prior to the build starting and failing. In the #37400 and #27838 cases (see msg295486), sudo was also used, where HOME ends up being /root, which is not writeable by the user the worker is run under (buildbot). The test should either mock, or should write to a known temp directory (possibly one it creates), either in the build dir, or /tmp or similar, though I'd lean towards keeping all test writes within the scope of the temporary build location I can either 1) if the issue cannot be resolved in short order, restart the worker now to clear the problem, until this issue has a changeset against it to resolve it 2) if it can be resolved in short order, leave the worker in this state until fixed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 07:34:47 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 16 Sep 2019 11:34:47 +0000 Subject: [issue38180] Test pyexpat fails on Fedora 30 In-Reply-To: <1568583669.12.0.757725102986.issue38180@roundup.psfhosted.org> Message-ID: <1568633687.02.0.99274165539.issue38180@roundup.psfhosted.org> Christian Heimes added the comment: What's your expat version? Please post the output of "rpm -qa expat" ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 07:51:31 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 16 Sep 2019 11:51:31 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568634691.37.0.917481600194.issue38117@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +15788 pull_request: https://github.com/python/cpython/pull/16178 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 08:06:52 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 16 Sep 2019 12:06:52 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568635612.16.0.311202374776.issue38117@roundup.psfhosted.org> Steve Dower added the comment: I've published the sources and binaries for Windows - will get to updating the 3.9/3.8/3.7 branches later today unless someone else does first (should just require version number changes). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 08:07:48 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 16 Sep 2019 12:07:48 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568635668.92.0.0183763226646.issue38117@roundup.psfhosted.org> Steve Dower added the comment: New changeset d8903416d223d01e23dfa8bffe48b1428d90d202 by Steve Dower in branch '2.7': bpo-38117: Updates bundled OpenSSL to 1.0.2t (GH-16178) https://github.com/python/cpython/commit/d8903416d223d01e23dfa8bffe48b1428d90d202 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 08:08:58 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 16 Sep 2019 12:08:58 +0000 Subject: [issue38153] Normalize hashing algorithm names In-Reply-To: <1568368232.54.0.0384008471773.issue38153@roundup.psfhosted.org> Message-ID: <1568635738.77.0.562418875084.issue38153@roundup.psfhosted.org> Christian Heimes added the comment: New changeset e8d7fa2db8a6c641019b06943852492f24ac3e69 by Christian Heimes in branch '3.8': [3.8] bpo-38153: Normalize hashlib algorithm names (GH-16083) (GH-16144) https://github.com/python/cpython/commit/e8d7fa2db8a6c641019b06943852492f24ac3e69 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 08:10:28 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 12:10:28 +0000 Subject: [issue38153] Normalize hashing algorithm names In-Reply-To: <1568368232.54.0.0384008471773.issue38153@roundup.psfhosted.org> Message-ID: <1568635828.85.0.797542618227.issue38153@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15789 pull_request: https://github.com/python/cpython/pull/16179 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 08:14:22 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 12:14:22 +0000 Subject: [issue33095] Cross-reference isolated mode from relevant locations In-Reply-To: <1521352636.34.0.467229070634.issue33095@psf.upfronthosting.co.za> Message-ID: <1568636062.01.0.334769773355.issue33095@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15790 pull_request: https://github.com/python/cpython/pull/16180 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 08:20:26 2019 From: report at bugs.python.org (Julien Palard) Date: Mon, 16 Sep 2019 12:20:26 +0000 Subject: [issue33095] Cross-reference isolated mode from relevant locations In-Reply-To: <1521352636.34.0.467229070634.issue33095@psf.upfronthosting.co.za> Message-ID: <1568636426.44.0.482536138802.issue33095@roundup.psfhosted.org> Change by Julien Palard : ---------- pull_requests: +15791 pull_request: https://github.com/python/cpython/pull/16181 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 08:21:06 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 12:21:06 +0000 Subject: [issue33095] Cross-reference isolated mode from relevant locations In-Reply-To: <1521352636.34.0.467229070634.issue33095@psf.upfronthosting.co.za> Message-ID: <1568636466.36.0.44452894138.issue33095@roundup.psfhosted.org> miss-islington added the comment: New changeset 07186c3959a61c3d73b5ccae431cdd32afe70e5e by Miss Islington (bot) in branch '3.8': bpo-33095: Add reference to isolated mode in -m and script option (GH-7764) https://github.com/python/cpython/commit/07186c3959a61c3d73b5ccae431cdd32afe70e5e ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 08:28:35 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 12:28:35 +0000 Subject: [issue38153] Normalize hashing algorithm names In-Reply-To: <1568368232.54.0.0384008471773.issue38153@roundup.psfhosted.org> Message-ID: <1568636915.91.0.334214573597.issue38153@roundup.psfhosted.org> miss-islington added the comment: New changeset 0067fc287a86cdd8d71dc2d402d596950ff88fca by Miss Islington (bot) in branch '3.8': bpo-38153: detect shake independently from sha3 (GH-16143) https://github.com/python/cpython/commit/0067fc287a86cdd8d71dc2d402d596950ff88fca ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 08:30:36 2019 From: report at bugs.python.org (Julien Palard) Date: Mon, 16 Sep 2019 12:30:36 +0000 Subject: [issue33095] Cross-reference isolated mode from relevant locations In-Reply-To: <1521352636.34.0.467229070634.issue33095@psf.upfronthosting.co.za> Message-ID: <1568637036.29.0.390617586259.issue33095@roundup.psfhosted.org> Julien Palard added the comment: New changeset 210dc3bb37ec57a8b8b16ffe0881181138a6e973 by Julien Palard in branch '3.7': [3.7] bpo-33095: Add reference to isolated mode in -m and script option (GH-7764) (GH-16181) https://github.com/python/cpython/commit/210dc3bb37ec57a8b8b16ffe0881181138a6e973 ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 08:53:57 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 16 Sep 2019 12:53:57 +0000 Subject: [issue38186] Use FindFirstFile in ntpath.realpath() when access is denied Message-ID: <1568638437.12.0.76713297277.issue38186@roundup.psfhosted.org> New submission from Steve Dower : There remains a case in ntpath.realpath() where a (handled) ERROR_ACCESS_DENIED or ERROR_SHARING_VIOLATION will break out of traversing a series of paths. However, in this case (in os.stat(), for example), we could request the real name of the file from the directory using FindFirstFileW. This would correct the case and remove any path shortening (e.g. LONGFI~1 to LongFilename) without needing to directly access the file. ---------- components: Windows messages: 352543 nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Use FindFirstFile in ntpath.realpath() when access is denied versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 08:56:41 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 16 Sep 2019 12:56:41 +0000 Subject: [issue38186] Use FindFirstFile in ntpath.realpath() when access is denied In-Reply-To: <1568638437.12.0.76713297277.issue38186@roundup.psfhosted.org> Message-ID: <1568638601.99.0.456051990442.issue38186@roundup.psfhosted.org> Steve Dower added the comment: See issue38081 and PR 16156 for related discussion and changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 09:08:28 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 16 Sep 2019 13:08:28 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568639308.65.0.97503709504.issue38117@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +15792 pull_request: https://github.com/python/cpython/pull/16184 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 10:12:24 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 16 Sep 2019 14:12:24 +0000 Subject: [issue38179] Test subprocess fails on Fedora 30: test_group and test_extra_groups In-Reply-To: <1568583454.85.0.891057048801.issue38179@roundup.psfhosted.org> Message-ID: <1568643144.1.0.584982664181.issue38179@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I think this should be fixed now as reported in https://bugs.python.org/issue36046#msg352235 . Can you please try the latest master branch? ---------- nosy: +gregory.p.smith, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 10:21:19 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 16 Sep 2019 14:21:19 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568643679.49.0.303423090646.issue38117@roundup.psfhosted.org> Steve Dower added the comment: New changeset 3ab73f6bbf4ff66e7ace3c4eab25461b5c7d71d4 by Steve Dower in branch 'master': bpo-38117: Update bundled Windows OpenSSL to 1.1.1d (GH-16184) https://github.com/python/cpython/commit/3ab73f6bbf4ff66e7ace3c4eab25461b5c7d71d4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 10:21:28 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 14:21:28 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568643688.05.0.169821119672.issue38117@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15793 pull_request: https://github.com/python/cpython/pull/16185 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 10:21:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Sep 2019 14:21:32 +0000 Subject: [issue38183] test_idle fails on AMD64 FreeBSD CURRENT Shared 3.x: GetUserCfgDir() fails with PermissionError In-Reply-To: <1568619549.13.0.00779387021845.issue38183@roundup.psfhosted.org> Message-ID: <1568643692.99.0.442862719311.issue38183@roundup.psfhosted.org> STINNER Victor added the comment: I suggest to fix the buildbot workers right now. I plan to leave this issue open until test_idle is fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 10:24:26 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 16 Sep 2019 14:24:26 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568643866.8.0.0272511762588.issue38117@roundup.psfhosted.org> Change by Steve Dower : ---------- pull_requests: +15794 pull_request: https://github.com/python/cpython/pull/16186 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 10:25:15 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 16 Sep 2019 14:25:15 +0000 Subject: [issue38081] Different behavior of os.path.realpath('nul') in 3.7 and 3.8 In-Reply-To: <1568097037.9.0.584511449633.issue38081@roundup.psfhosted.org> Message-ID: <1568643915.01.0.380838661401.issue38081@roundup.psfhosted.org> Steve Dower added the comment: New changeset 89b8933bb537179f81003928786c5cc6183af591 by Steve Dower in branch 'master': bpo-38081: Add more non-fatal error codes for ntpath.realpath (GH-16156) https://github.com/python/cpython/commit/89b8933bb537179f81003928786c5cc6183af591 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 10:25:54 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 14:25:54 +0000 Subject: [issue38081] Different behavior of os.path.realpath('nul') in 3.7 and 3.8 In-Reply-To: <1568097037.9.0.584511449633.issue38081@roundup.psfhosted.org> Message-ID: <1568643954.79.0.581000428732.issue38081@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15795 pull_request: https://github.com/python/cpython/pull/16187 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 10:26:39 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 16 Sep 2019 14:26:39 +0000 Subject: [issue38081] Different behavior of os.path.realpath('nul') in 3.7 and 3.8 In-Reply-To: <1568097037.9.0.584511449633.issue38081@roundup.psfhosted.org> Message-ID: <1568643999.84.0.639991361599.issue38081@roundup.psfhosted.org> Change by Steve Dower : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 10:40:23 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 14:40:23 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568644823.41.0.212027603366.issue38117@roundup.psfhosted.org> miss-islington added the comment: New changeset 26729ce74a47c3d16f219aee0a712011622aeeb5 by Miss Islington (bot) in branch '3.8': bpo-38117: Update bundled Windows OpenSSL to 1.1.1d (GH-16184) https://github.com/python/cpython/commit/26729ce74a47c3d16f219aee0a712011622aeeb5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 10:43:40 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 14:43:40 +0000 Subject: [issue38081] Different behavior of os.path.realpath('nul') in 3.7 and 3.8 In-Reply-To: <1568097037.9.0.584511449633.issue38081@roundup.psfhosted.org> Message-ID: <1568645020.3.0.0421631916056.issue38081@roundup.psfhosted.org> miss-islington added the comment: New changeset 4924d558478c9bd7f7ee7cd9c00c72c0f281f1a5 by Miss Islington (bot) in branch '3.8': bpo-38081: Add more non-fatal error codes for ntpath.realpath (GH-16156) https://github.com/python/cpython/commit/4924d558478c9bd7f7ee7cd9c00c72c0f281f1a5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 10:47:31 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 16 Sep 2019 14:47:31 +0000 Subject: [issue38106] [2.7] Race in PyThread_release_lock on macOS - can lead to memory corruption and deadlock In-Reply-To: <1568200653.3.0.865964137512.issue38106@roundup.psfhosted.org> Message-ID: <1568645251.0.0.463063267731.issue38106@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: -terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 10:55:11 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 16 Sep 2019 14:55:11 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568645711.96.0.156779436319.issue38117@roundup.psfhosted.org> Steve Dower added the comment: New changeset 76d8fb771659a5574604bf78eb2ee090f5c337cc by Steve Dower in branch '3.7': bpo-38117: Update bundled Windows OpenSSL to 1.1.1d (GH-16184) https://github.com/python/cpython/commit/76d8fb771659a5574604bf78eb2ee090f5c337cc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 11:07:46 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 16 Sep 2019 15:07:46 +0000 Subject: [issue38187] test.test_tools.test_c_analyzer fails in refleak mode Message-ID: <1568646466.84.0.78149770012.issue38187@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : Running the test suite to check refleaks over test.test_tools.test_c_analyzer will always fail, make it impossible for the refleak buildbots to run correctly. Steps to reproduce: ./python -m test test_tools -v -R 3:3 ====================================================================== FAIL: test_typical (test.test_tools.test_c_analyzer.test_c_globals.test_find.StaticsTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pablogsal/github/cpython/Lib/test/test_tools/test_c_analyzer/test_c_globals/test_find.py", line 319, in test_typical self.assertEqual(found, [ AssertionError: Lists differ: [Vari[413 chars]rc1/sub/ham.c', funcname=None, name='var1'), v[318 chars]nt')] != [Vari[413 chars]rc1/spam.c', funcname=None, name='freelist'), [431 chars]nt')] First differing element 4: Varia[21 chars]rc1/sub/ham.c', funcname=None, name='var1'), v[30 chars]t *') Varia[21 chars]rc1/spam.c', funcname=None, name='freelist'), [34 chars]10]') Second list contains 1 additional elements. First extra element 8: Variable(id=ID(filename='Include/spam.h', funcname=None, name='data'), vartype='static const int') [Variable(id=ID(filename='src1/spam.c', funcname=None, name='var1'), vartype='static const char *'), Variable(id=ID(filename='src1/spam.c', funcname='ham', name='initialized'), vartype='static int'), Variable(id=ID(filename='src1/spam.c', funcname=None, name='var2'), vartype='static PyObject *'), Variable(id=ID(filename='src1/eggs.c', funcname='tofu', name='ready'), vartype='static int'), + Variable(id=ID(filename='src1/spam.c', funcname=None, name='freelist'), vartype='static (PyTupleObject *)[10]'), Variable(id=ID(filename='src1/sub/ham.c', funcname=None, name='var1'), vartype='static const char const *'), Variable(id=ID(filename='src2/jam.c', funcname=None, name='var1'), vartype='static int'), Variable(id=ID(filename='src2/jam.c', funcname=None, name='var2'), vartype='static MyObject *'), Variable(id=ID(filename='Include/spam.h', funcname=None, name='data'), vartype='static const int')] ---------------------------------------------------------------------- Ran 219 tests in 3.769s FAILED (failures=1, skipped=2, expected failures=14) test test_tools failed test_tools failed == Tests result: FAILURE == 1 test failed: test_tools Total duration: 19 sec 101 ms Tests result: FAILURE ---------- components: Tests messages: 352552 nosy: eric.snow, pablogsal priority: normal severity: normal status: open title: test.test_tools.test_c_analyzer fails in refleak mode versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 11:08:50 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 16 Sep 2019 15:08:50 +0000 Subject: [issue38187] test.test_tools.test_c_analyzer fails in refleak mode In-Reply-To: <1568646466.84.0.78149770012.issue38187@roundup.psfhosted.org> Message-ID: <1568646530.7.0.44042150767.issue38187@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Check this failure in the buildbots for reference: https://buildbot.python.org/all/#/builders/80/builds/705/steps/4/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 11:38:04 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 16 Sep 2019 15:38:04 +0000 Subject: [issue38117] Update to OpenSSL 1.1.1d, 1.1.0l, 1.0.2t In-Reply-To: <1568215128.5.0.058779071611.issue38117@roundup.psfhosted.org> Message-ID: <1568648284.5.0.952138358407.issue38117@roundup.psfhosted.org> Change by Steve Dower : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 12:30:37 2019 From: report at bugs.python.org (Lisa Roach) Date: Mon, 16 Sep 2019 16:30:37 +0000 Subject: [issue38100] Spelling error in unittest.mock code In-Reply-To: <1568194615.26.0.336032437884.issue38100@roundup.psfhosted.org> Message-ID: <1568651437.43.0.141941127691.issue38100@roundup.psfhosted.org> Lisa Roach added the comment: It helps to comment on the issue before making a PR for it to claim it, as now we have 3 PRs all for the same issue :) We will likely accept the first PR that was created (or in this case the first PR that gets a CLA signed for it) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 12:32:34 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 16 Sep 2019 16:32:34 +0000 Subject: [issue38185] Weird way of case-insensitive indexing of sqlite3.Row In-Reply-To: <1568628011.92.0.862406558941.issue38185@roundup.psfhosted.org> Message-ID: <1568651554.71.0.644712771222.issue38185@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +15796 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16190 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 12:34:48 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 16 Sep 2019 16:34:48 +0000 Subject: [issue38100] Spelling error in unittest.mock code In-Reply-To: <1568194615.26.0.336032437884.issue38100@roundup.psfhosted.org> Message-ID: <1568651688.88.0.260731802212.issue38100@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset a9187c31185fe7ea47271839898416400cc3d976 by St?phane Wirtel (marcoramirezmx) in branch 'master': bpo-38100: Fix spelling error in unittest.mock code (GH-16168) https://github.com/python/cpython/commit/a9187c31185fe7ea47271839898416400cc3d976 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 12:34:57 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 16:34:57 +0000 Subject: [issue38100] Spelling error in unittest.mock code In-Reply-To: <1568194615.26.0.336032437884.issue38100@roundup.psfhosted.org> Message-ID: <1568651697.71.0.802922331683.issue38100@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15797 pull_request: https://github.com/python/cpython/pull/16191 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 12:39:19 2019 From: report at bugs.python.org (Michael Foord) Date: Mon, 16 Sep 2019 16:39:19 +0000 Subject: [issue27071] unittest.TestCase.assertCountEqual is a very misleading name In-Reply-To: <1463788380.52.0.782790370377.issue27071@psf.upfronthosting.co.za> Message-ID: <1568651959.05.0.254476138045.issue27071@roundup.psfhosted.org> Michael Foord added the comment: I like assertPermutation (with or without the Is, slight preference for without). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 12:52:07 2019 From: report at bugs.python.org (Lisa Roach) Date: Mon, 16 Sep 2019 16:52:07 +0000 Subject: [issue38136] Remove AsyncMock.assert_awaited_* In-Reply-To: <1568292020.39.0.826451235958.issue38136@roundup.psfhosted.org> Message-ID: <1568652727.75.0.143004045689.issue38136@roundup.psfhosted.org> Change by Lisa Roach : ---------- keywords: +patch pull_requests: +15798 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16192 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 12:52:50 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 16:52:50 +0000 Subject: [issue38100] Spelling error in unittest.mock code In-Reply-To: <1568194615.26.0.336032437884.issue38100@roundup.psfhosted.org> Message-ID: <1568652770.09.0.274967363855.issue38100@roundup.psfhosted.org> miss-islington added the comment: New changeset cc8edfbd9c66a40e2d405e49b75227a8d2a4dd55 by Miss Islington (bot) in branch '3.8': bpo-38100: Fix spelling error in unittest.mock code (GH-16168) https://github.com/python/cpython/commit/cc8edfbd9c66a40e2d405e49b75227a8d2a4dd55 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 13:15:22 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 16 Sep 2019 17:15:22 +0000 Subject: [issue38175] Memory leak in comparison of sqlite.Row objects In-Reply-To: <1568532547.02.0.11116376901.issue38175@roundup.psfhosted.org> Message-ID: <1568654122.05.0.00429388363067.issue38175@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 8debfa50407107ff2329d01081cdc12d359f1d12 by Serhiy Storchaka in branch 'master': bpo-38175: Fix a memory leak in comparison of sqlite3.Row objects. (GH-16155) https://github.com/python/cpython/commit/8debfa50407107ff2329d01081cdc12d359f1d12 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 13:15:30 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 17:15:30 +0000 Subject: [issue38175] Memory leak in comparison of sqlite.Row objects In-Reply-To: <1568532547.02.0.11116376901.issue38175@roundup.psfhosted.org> Message-ID: <1568654130.53.0.170581423728.issue38175@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15799 pull_request: https://github.com/python/cpython/pull/16193 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 13:15:37 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 17:15:37 +0000 Subject: [issue38175] Memory leak in comparison of sqlite.Row objects In-Reply-To: <1568532547.02.0.11116376901.issue38175@roundup.psfhosted.org> Message-ID: <1568654137.26.0.335529814177.issue38175@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15800 pull_request: https://github.com/python/cpython/pull/16194 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 13:28:52 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Mon, 16 Sep 2019 17:28:52 +0000 Subject: [issue38183] test_idle fails on AMD64 FreeBSD CURRENT Shared 3.x: GetUserCfgDir() fails with PermissionError In-Reply-To: <1568619549.13.0.00779387021845.issue38183@roundup.psfhosted.org> Message-ID: <1568654932.56.0.162351434673.issue38183@roundup.psfhosted.org> Kubilay Kocak added the comment: I've restarted the worker via sudo service(8), which shouldn't have the same (environment) issue as starting the rc script directly under sudo https://buildbot.python.org/all/#/builders/168/builds/1462 is running now Let me know if you need any further information from my end to assist resolution of test_idle under reproduction conditions ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 13:51:37 2019 From: report at bugs.python.org (Cameron Kennedy) Date: Mon, 16 Sep 2019 17:51:37 +0000 Subject: [issue38188] Incorrect Argument Order for Calls to _winapi.DuplicateHandle() in multiprocessing.reduction.DupHandle Message-ID: <1568656297.2.0.121307750927.issue38188@roundup.psfhosted.org> New submission from Cameron Kennedy : The DuplicateHandle function is utilized by the DupHandle object to duplicate handles for the purpose of sending and receiving between processes on Windows systems. At least on Python 3.7.3, this function is invoked with an incorrect argument order. In multiprocessing.reduction, send_handle passes _winapi.DUPLICATE_SAME_ACCESS as the access argument to the DupHandle constructor, which in-turn passes it to the access argument for _winapi.DuplicateHandle(). Instead, per https://docs.microsoft.com/en-us/windows/win32/api/handleapi/nf-handleapi-duplicatehandle this constant should be passed into the options argument. This bug results in any handles communicated via this method to have meaningless permissions set, which makes them unusable. I've monkeypatched the issue with the following code: try: import _winapi log = logging.getLogger('') log.warning('Patching multiprocessing.reduction to deal with the _winapi.DuplicateHandle() PROCESS_DUP_HANDLE argument order bug.') class _PatchedDupHandle(object): '''Picklable wrapper for a handle.''' def __init__(self, handle, access, pid=None, options=0): if pid is None: # We just duplicate the handle in the current process and # let the receiving process steal the handle. pid = os.getpid() proc = _winapi.OpenProcess(_winapi.PROCESS_DUP_HANDLE, False, pid) try: self._handle = _winapi.DuplicateHandle( _winapi.GetCurrentProcess(), handle, proc, access, False, options) finally: _winapi.CloseHandle(proc) self._options = options self._access = access self._pid = pid def detach(self): '''Get the handle. This should only be called once.''' # retrieve handle from process which currently owns it if self._pid == os.getpid(): # The handle has already been duplicated for this process. return self._handle # We must steal the handle from the process whose pid is self._pid. proc = _winapi.OpenProcess(_winapi.PROCESS_DUP_HANDLE, False, self._pid) try: return _winapi.DuplicateHandle( proc, self._handle, _winapi.GetCurrentProcess(), self._access, False, self._options|_winapi.DUPLICATE_CLOSE_SOURCE) finally: _winapi.CloseHandle(proc) DupHandle = _PatchedDupHandle def _patched_send_handle(conn, handle, destination_pid): '''Send a handle over a local connection.''' dh = DupHandle(handle, 0, destination_pid, _winapi.DUPLICATE_SAME_ACCESS) conn.send(dh) send_handle=_patched_send_handle except ImportError: pass The above seems to fix the problem on my machine by adding an additional options property to the DupHandle object and an options argument to send_handle function. ---------- components: Windows messages: 352560 nosy: m3rc1fulcameron, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Incorrect Argument Order for Calls to _winapi.DuplicateHandle() in multiprocessing.reduction.DupHandle versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 13:54:18 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 16 Sep 2019 17:54:18 +0000 Subject: [issue38100] Spelling error in unittest.mock code In-Reply-To: <1568194615.26.0.336032437884.issue38100@roundup.psfhosted.org> Message-ID: <1568656458.95.0.108289931734.issue38100@roundup.psfhosted.org> St?phane Wirtel added the comment: Lisa, I don't close this issue because I would like to know if we have to back port to 3.7. The spelling error does exist into 3.7 ---------- versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 13:55:13 2019 From: report at bugs.python.org (Lisa Roach) Date: Mon, 16 Sep 2019 17:55:13 +0000 Subject: [issue38100] Spelling error in unittest.mock code In-Reply-To: <1568194615.26.0.336032437884.issue38100@roundup.psfhosted.org> Message-ID: <1568656513.43.0.236615963852.issue38100@roundup.psfhosted.org> Lisa Roach added the comment: (y) Thanks for looking into it St?phane! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 13:58:32 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 16 Sep 2019 17:58:32 +0000 Subject: [issue38100] Spelling error in unittest.mock code In-Reply-To: <1568194615.26.0.336032437884.issue38100@roundup.psfhosted.org> Message-ID: <1568656712.38.0.875330585549.issue38100@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- pull_requests: +15801 pull_request: https://github.com/python/cpython/pull/16195 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 14:14:55 2019 From: report at bugs.python.org (Ammar Askar) Date: Mon, 16 Sep 2019 18:14:55 +0000 Subject: [issue38188] Incorrect Argument Order for Calls to _winapi.DuplicateHandle() in multiprocessing.reduction.DupHandle In-Reply-To: <1568656297.2.0.121307750927.issue38188@roundup.psfhosted.org> Message-ID: <1568657695.83.0.838308654284.issue38188@roundup.psfhosted.org> Change by Ammar Askar : ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 14:16:40 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 18:16:40 +0000 Subject: [issue38100] Spelling error in unittest.mock code In-Reply-To: <1568194615.26.0.336032437884.issue38100@roundup.psfhosted.org> Message-ID: <1568657800.92.0.410634808988.issue38100@roundup.psfhosted.org> miss-islington added the comment: New changeset 7aae4f004e69ebec011098f85ab232e2778a0ca4 by Miss Islington (bot) (St?phane Wirtel) in branch '3.7': [3.7] bpo-38100: Fix spelling error in unittest.mock code (GH-16195) https://github.com/python/cpython/commit/7aae4f004e69ebec011098f85ab232e2778a0ca4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 14:17:15 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 16 Sep 2019 18:17:15 +0000 Subject: [issue38100] Spelling error in unittest.mock code In-Reply-To: <1568194615.26.0.336032437884.issue38100@roundup.psfhosted.org> Message-ID: <1568657835.04.0.791885208101.issue38100@roundup.psfhosted.org> Change by St?phane Wirtel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 14:19:55 2019 From: report at bugs.python.org (Jonathan Gossage) Date: Mon, 16 Sep 2019 18:19:55 +0000 Subject: [issue38189] pip does not run in virtual environment in 3.8 Message-ID: <1568657995.84.0.793323146645.issue38189@roundup.psfhosted.org> New submission from Jonathan Gossage : Python 3.8 was installed from source on Ubuntu 19.04 desktop and a virtual environment was created with python3.8 -m venv venvrh. When attempting to use pip to install a package, the following error was encountered: (venvrh) jgossage at jgossage-XPS-8700:~/Projects/Maintenance$ pip install sphinx WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Collecting sphinx WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/sphinx/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/sphinx/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/sphinx/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/sphinx/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/sphinx/ Could not fetch URL https://pypi.org/simple/sphinx/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/sphinx/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping ERROR: Could not find a version that satisfies the requirement sphinx (from versions: none) ERROR: No matching distribution found for sphinx WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping ---------- assignee: christian.heimes components: SSL messages: 352564 nosy: Jonathan.Gossage, christian.heimes priority: normal severity: normal status: open title: pip does not run in virtual environment in 3.8 type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 14:24:14 2019 From: report at bugs.python.org (Ammar Askar) Date: Mon, 16 Sep 2019 18:24:14 +0000 Subject: [issue38189] pip does not run in virtual environment in 3.8 In-Reply-To: <1568657995.84.0.793323146645.issue38189@roundup.psfhosted.org> Message-ID: <1568658254.72.0.499863904684.issue38189@roundup.psfhosted.org> Ammar Askar added the comment: As the error says: > Can't connect to HTTPS URL because the SSL module is not available. Since you built it from source, you should check your build logs, the _ssl module likely failed to build. You're most probably missing the openssl dependency. ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 14:26:15 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 16 Sep 2019 18:26:15 +0000 Subject: [issue38189] pip does not run in virtual environment in 3.8 In-Reply-To: <1568657995.84.0.793323146645.issue38189@roundup.psfhosted.org> Message-ID: <1568658375.14.0.0419068841666.issue38189@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I guess it's due to the binary not being built with ssl module. During build did you get a message like below ? Could not build the ssl module! Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_PARAM_set1_host(). LibreSSL 2.6.4 and earlier do not provide the necessary APIs, https://github.com/libressl-portable/portable/issues/381 In the REPL you can verify it by trying to import ssl module that would fail if python was not built with ssl ./python.exe Python 3.9.0a0 (heads/pr_16148:1a801bd50d, Sep 16 2019, 22:15:26) [Clang 7.0.2 (clang-700.1.81)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import ssl Traceback (most recent call last): File "", line 1, in File "/Users/karthikeyansingaravelan/stuff/python/cpython/Lib/ssl.py", line 98, in import _ssl # if we can't import it, let the error propagate ModuleNotFoundError: No module named '_ssl' ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 14:28:05 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 16 Sep 2019 18:28:05 +0000 Subject: [issue38189] pip does not run in virtual environment in 3.8 In-Reply-To: <1568657995.84.0.793323146645.issue38189@roundup.psfhosted.org> Message-ID: <1568658485.55.0.682026916343.issue38189@roundup.psfhosted.org> St?phane Wirtel added the comment: I close this issue, it's not related to the packaging of Python, but just to your compilation. As explained by Ammar Askar, when you compile Python, you have to be sure that you have the openssl-dev package installed on your system You can read this page: https://cpython-core-tutorial.readthedocs.io/en/latest/build_cpython_linux.html ---------- nosy: +matrixise resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 14:49:06 2019 From: report at bugs.python.org (Ethan Furman) Date: Mon, 16 Sep 2019 18:49:06 +0000 Subject: [issue21705] cgi.py: Multipart with more than one file is misparsed In-Reply-To: <1402401424.17.0.414317354507.issue21705@psf.upfronthosting.co.za> Message-ID: <1568659746.88.0.359853204505.issue21705@roundup.psfhosted.org> Ethan Furman added the comment: The last status was "test-needed" -- has anyone verified that a test exists for this scenario? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 14:55:10 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 16 Sep 2019 18:55:10 +0000 Subject: [issue38165] freezes when loading a program on imports In-Reply-To: <1568397005.25.0.136695117075.issue38165@roundup.psfhosted.org> Message-ID: <1568660110.4.0.601159534216.issue38165@roundup.psfhosted.org> St?phane Wirtel added the comment: I close the issue because it's a duplicate of an other issue of the same author. ---------- nosy: +matrixise resolution: -> duplicate stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 14:57:33 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 16 Sep 2019 18:57:33 +0000 Subject: [issue38162] Import Long Load In-Reply-To: <1568393637.17.0.162733973896.issue38162@roundup.psfhosted.org> Message-ID: <1568660253.97.0.849323471018.issue38162@roundup.psfhosted.org> St?phane Wirtel added the comment: I close the issue because there is no discussion :/ ---------- components: +Unicode -Windows nosy: +ezio.melotti, matrixise, vstinner resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 14:57:50 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 16 Sep 2019 18:57:50 +0000 Subject: [issue38162] Import Long Load In-Reply-To: <1568393637.17.0.162733973896.issue38162@roundup.psfhosted.org> Message-ID: <1568660270.79.0.345772642658.issue38162@roundup.psfhosted.org> St?phane Wirtel added the comment: and related to 3.6 (security) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 15:07:33 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 16 Sep 2019 19:07:33 +0000 Subject: [issue38183] test_idle fails on AMD64 FreeBSD CURRENT Shared 3.x: GetUserCfgDir() fails with PermissionError In-Reply-To: <1568619549.13.0.00779387021845.issue38183@roundup.psfhosted.org> Message-ID: <1568660853.05.0.799752511923.issue38183@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +15802 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16198 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 15:10:10 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 19:10:10 +0000 Subject: [issue33936] OPENSSL_VERSION_1_1 never defined in _hashopenssl.c In-Reply-To: <1529635821.29.0.56676864532.issue33936@psf.upfronthosting.co.za> Message-ID: <1568661010.07.0.849534253834.issue33936@roundup.psfhosted.org> miss-islington added the comment: New changeset 724f1a57231f9287c37255adf0e4364d12cf693d by Miss Islington (bot) (Christian Heimes) in branch 'master': bpo-33936: Don't call obsolete init methods with OpenSSL 1.1.0+ (GH-16140) https://github.com/python/cpython/commit/724f1a57231f9287c37255adf0e4364d12cf693d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 15:10:18 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 19:10:18 +0000 Subject: [issue33936] OPENSSL_VERSION_1_1 never defined in _hashopenssl.c In-Reply-To: <1529635821.29.0.56676864532.issue33936@psf.upfronthosting.co.za> Message-ID: <1568661018.57.0.118308663828.issue33936@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15803 pull_request: https://github.com/python/cpython/pull/16199 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 15:10:29 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 19:10:29 +0000 Subject: [issue33936] OPENSSL_VERSION_1_1 never defined in _hashopenssl.c In-Reply-To: <1529635821.29.0.56676864532.issue33936@psf.upfronthosting.co.za> Message-ID: <1568661029.71.0.126368019674.issue33936@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15804 pull_request: https://github.com/python/cpython/pull/16200 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 15:10:40 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 19:10:40 +0000 Subject: [issue33936] OPENSSL_VERSION_1_1 never defined in _hashopenssl.c In-Reply-To: <1529635821.29.0.56676864532.issue33936@psf.upfronthosting.co.za> Message-ID: <1568661040.86.0.676653543873.issue33936@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15805 pull_request: https://github.com/python/cpython/pull/16201 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 15:30:58 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 16 Sep 2019 19:30:58 +0000 Subject: [issue38183] test_idle fails on AMD64 FreeBSD CURRENT Shared 3.x: GetUserCfgDir() fails with PermissionError In-Reply-To: <1568619549.13.0.00779387021845.issue38183@roundup.psfhosted.org> Message-ID: <1568662258.9.0.0623443244927.issue38183@roundup.psfhosted.org> Terry J. Reedy added the comment: >From IDLE's viewpoint, the 2.7 failures are the same. In current 3.x, GetUserCfgDir has warn = ('\n Warning: unable to create user config directory\n' + userDir + '\n Check path and permissions.\n Exiting!\n') if not idlelib.testing: print(warn, file=sys.stderr) raise SystemExit In 2.7. the conditional clause is not there because idlelib.testing does not exist. It was added to avoid 3.x regrtest resource-changed checks that either were not backported to 2.7 or are not triggered by the smaller 2.7 set of IDLE tests. The irony of the failures is that the tests are carefully written to pass regardless of user config values, if any, and never alter them. Only test_config and test_configdialog actually *need* to access the config machinery. Other tests could mock idleConf. PR 16198 has a minimal fix that works on my Windows machine. A 2.7 backport, which must be manual, will require the addition of idlelib.testing and its setting it test_idle. I will wait for passes from buildbots, not just the CI. Followup issues: 0. For 'other tests', mock idleConf and run a bit faster. 1. If ignoring .idlerc this way works, simplify some of the tests by setting idlelib.testing to True instead of duplicating what IdleConf will now do. 2. Minimally implement "# TODO continue without userDIr instead of exit". Replace "raise SystemExit" with "return ''" and add warnings that configuration changes will disappear when exiting IDLE. ---------- stage: patch review -> commit review type: -> behavior versions: +Python 2.7, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 15:31:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Sep 2019 19:31:55 +0000 Subject: [issue38190] regrtest: test suite completes but Tests Result is not displayed and the process hangs Message-ID: <1568662315.14.0.520273367874.issue38190@roundup.psfhosted.org> New submission from STINNER Victor : https://buildbot.python.org/all/#/builders/225/builds/239 ... 0:21:16 load avg: 2.54 [422/423] test_venv passed (1 min 31 sec) -- running: test_tools (1 min 27 sec) running: test_tools (1 min 57 sec) running: test_tools (2 min 27 sec) running: test_tools (2 min 57 sec) running: test_tools (3 min 27 sec) 0:23:42 load avg: 1.48 [423/423] test_tools passed (3 min 52 sec) command timed out: 1200 seconds without output running ['make', 'buildbottest', 'TESTOPTS=-j2 -j4 ${BUILDBOT_TESTOPTS}', 'TESTPYTHONOPTS=', 'TESTTIMEOUT=900'], attempting to kill process killed by signal 9 program finished with exit code -1 elapsedTime=2628.905564 It may be a regression caused by bpo-37531. ---------- components: Tests messages: 352574 nosy: pablogsal, vstinner priority: normal severity: normal status: open title: regrtest: test suite completes but Tests Result is not displayed and the process hangs versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 15:45:58 2019 From: report at bugs.python.org (Eric Snow) Date: Mon, 16 Sep 2019 19:45:58 +0000 Subject: [issue38005] Coercing strings and non-integer numbers to interpreter ID and channel ID In-Reply-To: <1567415474.91.0.412541266394.issue38005@roundup.psfhosted.org> Message-ID: <1568663158.29.0.529322231032.issue38005@roundup.psfhosted.org> Eric Snow added the comment: Yeah, dropping str support is fine. It wouldn't be hard to add it back in if later we find it's useful. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 15:48:06 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 19:48:06 +0000 Subject: [issue33936] OPENSSL_VERSION_1_1 never defined in _hashopenssl.c In-Reply-To: <1529635821.29.0.56676864532.issue33936@psf.upfronthosting.co.za> Message-ID: <1568663286.73.0.189967683092.issue33936@roundup.psfhosted.org> miss-islington added the comment: New changeset 1ecc75ad1cdf458c2aa7192844e83c4665a5f9b5 by Miss Islington (bot) in branch '3.8': bpo-33936: Don't call obsolete init methods with OpenSSL 1.1.0+ (GH-16140) https://github.com/python/cpython/commit/1ecc75ad1cdf458c2aa7192844e83c4665a5f9b5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 15:48:24 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 19:48:24 +0000 Subject: [issue33936] OPENSSL_VERSION_1_1 never defined in _hashopenssl.c In-Reply-To: <1529635821.29.0.56676864532.issue33936@psf.upfronthosting.co.za> Message-ID: <1568663304.03.0.426448023249.issue33936@roundup.psfhosted.org> miss-islington added the comment: New changeset 5d55d52b61f56522e616ac1423437d4e3f641ce6 by Miss Islington (bot) in branch '2.7': bpo-33936: Don't call obsolete init methods with OpenSSL 1.1.0+ (GH-16140) https://github.com/python/cpython/commit/5d55d52b61f56522e616ac1423437d4e3f641ce6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 15:49:10 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 19:49:10 +0000 Subject: [issue33936] OPENSSL_VERSION_1_1 never defined in _hashopenssl.c In-Reply-To: <1529635821.29.0.56676864532.issue33936@psf.upfronthosting.co.za> Message-ID: <1568663350.49.0.879442113222.issue33936@roundup.psfhosted.org> miss-islington added the comment: New changeset c55f69552cdab26362c1ff4416fe1c3e9b27ccbe by Miss Islington (bot) in branch '3.7': [3.7] bpo-33936: Don't call obsolete init methods with OpenSSL 1.1.0+ (GH-16140) (GH-16200) https://github.com/python/cpython/commit/c55f69552cdab26362c1ff4416fe1c3e9b27ccbe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 15:59:55 2019 From: report at bugs.python.org (Glenn Gribble) Date: Mon, 16 Sep 2019 19:59:55 +0000 Subject: [issue38191] typing.NamedTuple() should prefix parameters with '_' Message-ID: <1568663995.81.0.542051193907.issue38191@roundup.psfhosted.org> New submission from Glenn Gribble : At present, it is not possible to use the shorthand notation to define a NamedTuple with typename or fields. I.e., NamedTuple('MyTuple', typename=str, fields=int) does not work. Changing the parameter names to _typename and _fields would allow any non-private, legal identifier to be used in the shorthand notation. >>> import typing >>> typing.NamedTuple('Example', fieldz=int) >>> typing.NamedTuple('Example2', fields=int) Traceback (most recent call last): File "", line 1, in File "C:\Program Files\Python37\lib\typing.py", line 1411, in __new__ return _make_nmtuple(typename, fields) File "C:\Program Files\Python37\lib\typing.py", line 1326, in _make_nmtuple types = [(n, _type_check(t, msg)) for n, t in types] TypeError: 'type' object is not iterable Of course, it is fairly easy to work around the issue by using fields parameter: >>> typing.NamedTuple('Example3', [('fields', int)]) There would be backwards compatibility issues with any code using named arguments for fields or typename. ---------- components: Library (Lib) messages: 352579 nosy: gribbg priority: normal severity: normal status: open title: typing.NamedTuple() should prefix parameters with '_' type: enhancement versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 16:08:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Sep 2019 20:08:02 +0000 Subject: [issue38162] Import Long Load In-Reply-To: <1568393637.17.0.162733973896.issue38162@roundup.psfhosted.org> Message-ID: <1568664482.11.0.121245885135.issue38162@roundup.psfhosted.org> STINNER Victor added the comment: tempfile uses a low number of random bits per filename, so collision is "likely". Two Python processes might attempt to create the same temporary file "at the same time". Maybe not two processes, but two Python threads. Rather than writing complex locking mechanism, "for seq in range(TMP_MAX):" retries. While one collision is "likely", TMP_MAX is less likely, especially if TMP_MAX is big. On my Linux, I get: pvstinner at apu$ python3 Python 3.7.4 (default, Jul 9 2019, 16:32:37) >>> import posix >>> posix.TMP_MAX 238328 Removing the loop introduces a race condition. You tagged this issue as "performance": well, in Python we don't accept optimizations which make Python "not correct". Correctness matters more than performance. If tempfile is critical for your application performance, you can easily copy tempfile.py and adapt it for your needs ;-) -- Well, as St?phane wrote: you need to eloborate the rationale for your change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 16:10:37 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 16 Sep 2019 20:10:37 +0000 Subject: [issue38187] test.test_tools.test_c_analyzer fails in refleak mode In-Reply-To: <1568646466.84.0.78149770012.issue38187@roundup.psfhosted.org> Message-ID: <1568664637.44.0.628584192839.issue38187@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +nanjekyejoannah, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 16:20:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Sep 2019 20:20:36 +0000 Subject: [issue38190] regrtest: test suite completes but Tests Result is not displayed and the process hangs In-Reply-To: <1568662315.14.0.520273367874.issue38190@roundup.psfhosted.org> Message-ID: <1568665236.7.0.12112139511.issue38190@roundup.psfhosted.org> STINNER Victor added the comment: > command timed out: 1200 seconds without output running ['make', 'buildbottest', 'TESTOPTS=-j2 -j4 ${BUILDBOT_TESTOPTS}', 'TESTPYTHONOPTS=', 'TESTTIMEOUT=900'], attempting to kill faulthandler is supposed to display the traceback where the test hangs, but for the main process, libregrtest uses a delay of timeout x 2 seconds: self.worker_timeout = self.ns.timeout * 1.5 self.main_timeout = self.ns.timeout * 2.0 Here timeout=900 ("TESTTIMEOUT=900"), so main_timeout = 1800 seconds (30 minutes), whereas buildbot timeout is 1200 seconds (20 minutes) :-( In fact, main_timeout can be *way* shorter: the main process calls faulthandler.dump_traceback_later(self.main_timeout, exit=True) every max(PROGRESS_UPDATE, PROGRESS_MIN_TIME) seconds (or more often): every 30 seconds (of more often). So main_process could be max(PROGRESS_UPDATE, PROGRESS_MIN_TIME) x 2 = 1 minute, instead of 30 minutes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 16:21:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Sep 2019 20:21:00 +0000 Subject: [issue38190] regrtest: test suite completes but Tests Result is not displayed and the process hangs In-Reply-To: <1568662315.14.0.520273367874.issue38190@roundup.psfhosted.org> Message-ID: <1568665260.89.0.268965161634.issue38190@roundup.psfhosted.org> STINNER Victor added the comment: > https://buildbot.python.org/all/#/builders/225/builds/239 This bug only occurred once, the next build (240) was fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 16:23:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Sep 2019 20:23:23 +0000 Subject: [issue38187] test.test_tools.test_c_analyzer fails in refleak mode In-Reply-To: <1568646466.84.0.78149770012.issue38187@roundup.psfhosted.org> Message-ID: <1568665403.27.0.0742114561923.issue38187@roundup.psfhosted.org> STINNER Victor added the comment: I also opened https://bugs.python.org/issue38177#msg352474 we should only track this leak in a single issue, you can close bpo-38177. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 16:34:18 2019 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Mon, 16 Sep 2019 20:34:18 +0000 Subject: [issue38192] Fix invocation of EchoClientProtocol Message-ID: <1568666058.33.0.112875968613.issue38192@roundup.psfhosted.org> New submission from Hrvoje Nik?i? : This is a followup on issue38178. While testing the new code, I noticed that my change introduced a bug, where the code still attempts to pass "loop" when constructing an EchoClientProtocol. A pull request is attached. Also, I've noticed that the MyProtocol example under "Connecting Existing Sockets" is still passing an explicit loop, so I created a commit that converts it to the on_con_lost idiom, and included it in the above pull request. ---------- assignee: docs at python components: Documentation, asyncio messages: 352584 nosy: asvetlov, docs at python, hniksic, yselivanov priority: normal severity: normal status: open title: Fix invocation of EchoClientProtocol versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 16:35:05 2019 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Mon, 16 Sep 2019 20:35:05 +0000 Subject: [issue38192] Fix invocation of EchoClientProtocol In-Reply-To: <1568666058.33.0.112875968613.issue38192@roundup.psfhosted.org> Message-ID: <1568666105.31.0.07094770272.issue38192@roundup.psfhosted.org> Change by Hrvoje Nik?i? : ---------- keywords: +patch pull_requests: +15806 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16202 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 17:45:47 2019 From: report at bugs.python.org (Tahia K) Date: Mon, 16 Sep 2019 21:45:47 +0000 Subject: [issue38155] Add __all__ to the datetime module In-Reply-To: <1568370190.96.0.124167415349.issue38155@roundup.psfhosted.org> Message-ID: <1568670347.83.0.161455666757.issue38155@roundup.psfhosted.org> Change by Tahia K : ---------- keywords: +patch pull_requests: +15807 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/16203 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 17:46:20 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 16 Sep 2019 21:46:20 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1568670380.49.0.956523646197.issue28556@roundup.psfhosted.org> Change by Ivan Levkivskyi : ---------- pull_requests: +15808 pull_request: https://github.com/python/cpython/pull/16204 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 17:48:51 2019 From: report at bugs.python.org (Tahia K) Date: Mon, 16 Sep 2019 21:48:51 +0000 Subject: [issue38155] Add __all__ to the datetime module In-Reply-To: <1568370190.96.0.124167415349.issue38155@roundup.psfhosted.org> Message-ID: <1568670531.86.0.989300248074.issue38155@roundup.psfhosted.org> Tahia K added the comment: Thanks @corona10. I've posted a PR with all these bits. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 18:02:08 2019 From: report at bugs.python.org (Will Boyce) Date: Mon, 16 Sep 2019 22:02:08 +0000 Subject: [issue38193] http.client should be "runnable" like http.server Message-ID: <1568671328.34.0.971414028957.issue38193@roundup.psfhosted.org> New submission from Will Boyce : I think it would be both sensible and useful if the `http.client` library exposed a "runnable" interface (similar to `http.server`). I would suggest keeping it simple, for example: python -m http.client python -m http.client -o ---------- components: Library (Lib) messages: 352586 nosy: Will Boyce priority: normal severity: normal status: open title: http.client should be "runnable" like http.server type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 18:04:12 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 16 Sep 2019 22:04:12 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1568671452.74.0.532367693659.issue28556@roundup.psfhosted.org> Ivan Levkivskyi added the comment: New changeset 81528ba2e81c39f4d6bca5b785e818c7d08b8501 by Ivan Levkivskyi in branch 'master': bpo-28556: Update the opening note in typing docs (GH-16204) https://github.com/python/cpython/commit/81528ba2e81c39f4d6bca5b785e818c7d08b8501 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 18:04:18 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 22:04:18 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1568671458.11.0.454518386567.issue28556@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15809 pull_request: https://github.com/python/cpython/pull/16205 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 18:04:25 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 22:04:25 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1568671465.16.0.960726650744.issue28556@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15810 pull_request: https://github.com/python/cpython/pull/16206 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 18:10:14 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 22:10:14 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1568671814.68.0.561192523043.issue28556@roundup.psfhosted.org> miss-islington added the comment: New changeset 733193d050f317a7965faac6c3718e6e8316a8a0 by Miss Islington (bot) in branch '3.7': bpo-28556: Update the opening note in typing docs (GH-16204) https://github.com/python/cpython/commit/733193d050f317a7965faac6c3718e6e8316a8a0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 18:11:13 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 22:11:13 +0000 Subject: [issue28556] typing.py upgrades In-Reply-To: <1477756009.46.0.442279756181.issue28556@psf.upfronthosting.co.za> Message-ID: <1568671873.8.0.995519959095.issue28556@roundup.psfhosted.org> miss-islington added the comment: New changeset 7076764992cd29e0e1f8b0ac2b92403e1a698aa6 by Miss Islington (bot) in branch '3.8': bpo-28556: Update the opening note in typing docs (GH-16204) https://github.com/python/cpython/commit/7076764992cd29e0e1f8b0ac2b92403e1a698aa6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 18:45:09 2019 From: report at bugs.python.org (Tim Hoffmann) Date: Mon, 16 Sep 2019 22:45:09 +0000 Subject: [issue38194] Consistently add exist_ok / missing_ok parameters to directory creation/deletion functions Message-ID: <1568673909.26.0.25333771691.issue38194@roundup.psfhosted.org> New submission from Tim Hoffmann : The following functions accept exist_ok/missing_ok parameters: - Path.mkdir(exist_ok) - os.makedirs(exist_ok) - shutil.copytree(dirs_exist_ok) - (https://bugs.python.org/issue20849) - Path.unlink(missing_ok) - (https://bugs.python.org/issue33123) For consistency, these functions should support them as well (but currently don't): - os.makedir(exist_ok) - os.rmdir(missing_ok) - Path.rmdir(missing_ok) - os.removedirs(missing_ok) - shutil.rmtree(missing_ok) ---------- components: Library (Lib) messages: 352590 nosy: timhoffm priority: normal severity: normal status: open title: Consistently add exist_ok / missing_ok parameters to directory creation/deletion functions type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 19:04:24 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 16 Sep 2019 23:04:24 +0000 Subject: [issue38183] test_idle fails on AMD64 FreeBSD CURRENT Shared 3.x: GetUserCfgDir() fails with PermissionError In-Reply-To: <1568619549.13.0.00779387021845.issue38183@roundup.psfhosted.org> Message-ID: <1568675064.47.0.739079761286.issue38183@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 0048afc16a7e7301d5c565237db271505e5fbed9 by Terry Jan Reedy in branch 'master': bpo-38183: Test_idle ignores user config directory GH-16198) https://github.com/python/cpython/commit/0048afc16a7e7301d5c565237db271505e5fbed9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 19:04:32 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 23:04:32 +0000 Subject: [issue38183] test_idle fails on AMD64 FreeBSD CURRENT Shared 3.x: GetUserCfgDir() fails with PermissionError In-Reply-To: <1568619549.13.0.00779387021845.issue38183@roundup.psfhosted.org> Message-ID: <1568675072.21.0.340379646562.issue38183@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15811 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/16207 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 19:04:38 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 16 Sep 2019 23:04:38 +0000 Subject: [issue38183] test_idle fails on AMD64 FreeBSD CURRENT Shared 3.x: GetUserCfgDir() fails with PermissionError In-Reply-To: <1568619549.13.0.00779387021845.issue38183@roundup.psfhosted.org> Message-ID: <1568675078.0.0.0422476106586.issue38183@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15812 pull_request: https://github.com/python/cpython/pull/16208 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 19:42:58 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 16 Sep 2019 23:42:58 +0000 Subject: [issue38177] test_tools: test.test_tools.test_unparse.UnparseTestCase: test_tools leaked [36, 36, 36] references In-Reply-To: <1568541386.19.0.996414824495.issue38177@roundup.psfhosted.org> Message-ID: <1568677378.27.0.11811212541.issue38177@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 20:11:09 2019 From: report at bugs.python.org (Kyle Stanley) Date: Tue, 17 Sep 2019 00:11:09 +0000 Subject: [issue37224] test__xxsubinterpreters failed on AMD64 Windows8.1 Refleaks 3.8 In-Reply-To: <1560214681.61.0.906498246375.issue37224@roundup.psfhosted.org> Message-ID: <1568679069.46.0.271761738424.issue37224@roundup.psfhosted.org> Kyle Stanley added the comment: Upon further consideration, I don't think this will address the issue. If the RuntimeError was not being raised, this failure would be consistent rather than intermittent. I think I have have gotten a bit mixed up, even if the return value of PyErr_Format is NULL, it would not implicitly return NULL upon being called and exit the function early (like a macro could) . I'm not experienced with programming in C, I only started learning it more recently (Python, Java, and C# have been my primary languages) when I started contributing to CPython in June. Instead, I suspect this is likely a concurrency issue, where multiple threads are trying to access the same sub-interpreter during ``interp_destroy()``. The solution will likely involve finding the correct place for a lock. I'll continue to work on this and see if I can find a solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 23:33:07 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 03:33:07 +0000 Subject: [issue38183] test_idle fails on AMD64 FreeBSD CURRENT Shared 3.x: GetUserCfgDir() fails with PermissionError In-Reply-To: <1568619549.13.0.00779387021845.issue38183@roundup.psfhosted.org> Message-ID: <1568691187.47.0.577791206531.issue38183@roundup.psfhosted.org> miss-islington added the comment: New changeset ad845becf29afe0507a46a4b885a9670b5d7639d by Miss Islington (bot) in branch '3.8': bpo-38183: Test_idle ignores user config directory GH-16198) https://github.com/python/cpython/commit/ad845becf29afe0507a46a4b885a9670b5d7639d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 16 23:33:09 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 03:33:09 +0000 Subject: [issue38183] test_idle fails on AMD64 FreeBSD CURRENT Shared 3.x: GetUserCfgDir() fails with PermissionError In-Reply-To: <1568619549.13.0.00779387021845.issue38183@roundup.psfhosted.org> Message-ID: <1568691189.82.0.690031042615.issue38183@roundup.psfhosted.org> miss-islington added the comment: New changeset 523497cbdc8292bfc12938aaaca0ad02a7708c25 by Miss Islington (bot) in branch '3.7': bpo-38183: Test_idle ignores user config directory GH-16198) https://github.com/python/cpython/commit/523497cbdc8292bfc12938aaaca0ad02a7708c25 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 00:58:40 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Tue, 17 Sep 2019 04:58:40 +0000 Subject: [issue38183] test_idle fails on AMD64 FreeBSD CURRENT Shared 3.x: GetUserCfgDir() fails with PermissionError In-Reply-To: <1568619549.13.0.00779387021845.issue38183@roundup.psfhosted.org> Message-ID: <1568696320.35.0.380089008395.issue38183@roundup.psfhosted.org> Kubilay Kocak added the comment: I can restart the worker to create the environment that reproduces the issue at any time to confirm the test passes, just let me know ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 00:58:53 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 17 Sep 2019 04:58:53 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1568696333.17.0.466980323829.issue30458@roundup.psfhosted.org> Ned Deily added the comment: If I understand Jason's message correctly, the changes for Issue30458 introduced a regression in 3.7.4 and will introduce the same regression in other branches as they are released, including 3.5.8 whose rc1 is now in testing. 3.7.5rc1 is scheduled to be tagged later today. Is this regression serious enough that we should hold 3.7.5 and/or 3.5.8 for a fix? If so, there should probably be a separate issue for it unless it is necessarily intertwined with the resolution of Issue36274. I'm provisionally setting the status of this issue to "release blocker". ---------- nosy: +benjamin.peterson, lukasz.langa, ned.deily priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 01:01:27 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 17 Sep 2019 05:01:27 +0000 Subject: [issue36274] http.client cannot send non-ASCII request lines In-Reply-To: <1552422803.93.0.420596825145.issue36274@roundup.psfhosted.org> Message-ID: <1568696487.32.0.822460236227.issue36274@roundup.psfhosted.org> Ned Deily added the comment: See msg352596 in Issue30458 for discussion of whether the regression should be considered a "release blocker" for the imminent 3.7.5 and 3.5.8 releases. ---------- keywords: +3.7regression nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 01:15:34 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 17 Sep 2019 05:15:34 +0000 Subject: [issue38013] AsyncGenerator breaks when not iterated fully with RuntimeError("can't send non-None value to a just-started coroutine") In-Reply-To: <1567469623.0.0.944759957345.issue38013@roundup.psfhosted.org> Message-ID: <1568697334.47.0.334052530554.issue38013@roundup.psfhosted.org> Ned Deily added the comment: > I've added 'release blocker' priority to don't miss this bugfix for the next release. Note that 3.7.5rc1 is scheduled to be tagged today so we need to make a decision on whether to hold the release for a fix. From a quick test, it looks like the behavior was introduced in 3.7.1 as the test does not fail for me with 3.7.0. If so, that seems to meet the criteria for a maintenance release regression and thus potentially a release blocker. ---------- assignee: -> asvetlov keywords: +3.7regression _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 01:39:54 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 17 Sep 2019 05:39:54 +0000 Subject: [issue35379] IDLE's close fails io is set to None on Mac In-Reply-To: <1543775410.03.0.788709270274.issue35379@psf.upfronthosting.co.za> Message-ID: <1568698794.34.0.624514495311.issue35379@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +15813 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16212 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 02:04:03 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 17 Sep 2019 06:04:03 +0000 Subject: [issue35379] IDLE's close fails io is set to None on Mac In-Reply-To: <1543775410.03.0.788709270274.issue35379@psf.upfronthosting.co.za> Message-ID: <1568700243.63.0.323383035445.issue35379@roundup.psfhosted.org> Terry J. Reedy added the comment: By reading idlelib code, I determined that the error must arise from EditorWindow.close being called twice. I confirmed this with a debug print. EW.close is called from close_event, PyShell.close, and filelist.close_all_callback. For the AttributeError I see, msg352409, both calls come from PyShell.close (debug print) and at least the second from PseudoInputFile.close. Since it does not happen in 3.7, in spite of code being identical, a 3.8 change in Python shutdown must be involved. I am rather sure that a double close is also the problem on Raymond's mac, with at least the second coming from close_all_callback. The latter is invoked by File => exit and exit() or quit(). It might be that I do not remember seeing the same traceback because I almost never exit that way. On Windows, I often right click the IDLE taskbar icon and select 'close all windows'. Or the binding of close_all_callback in macOSX might be involved. As a practical matter, I am defining the bug to be fixed as printing an annoying and essentially useless traceback to a terminal used to start IDLE. I could spend hours trying to prevent the 2nd call I see and even if I succeeded, there would still be the 2nd call I don't see, and the problem that prompted #17822. Clean tk shutdown is tricky and there are other unresolved issues with IDLE tests. PR 10564 uses the direct approach suggested by Tal. It works for me however I shut down IDLE. Setting a Boolean flag after the first call might be cleaner, but I don't know for sure that it would prevent what Raymond sees, and I want to get a fix into 3.7.5, and I am more sure that catching AttributeErrors will work for him as well. ---------- stage: patch review -> commit review type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 02:05:07 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 17 Sep 2019 06:05:07 +0000 Subject: [issue35379] IDLE's close fails io is set to None on Mac In-Reply-To: <1543775410.03.0.788709270274.issue35379@psf.upfronthosting.co.za> Message-ID: <1568700307.35.0.0722321980439.issue35379@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset dfd34a9cd58e8150c324190f746de919e140abe8 by Terry Jan Reedy in branch 'master': bpo-35379: When exiting IDLE, catch any AttributeError. (GH-16212) https://github.com/python/cpython/commit/dfd34a9cd58e8150c324190f746de919e140abe8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 02:05:17 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 06:05:17 +0000 Subject: [issue35379] IDLE's close fails io is set to None on Mac In-Reply-To: <1543775410.03.0.788709270274.issue35379@psf.upfronthosting.co.za> Message-ID: <1568700317.56.0.222079723904.issue35379@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15814 stage: commit review -> patch review pull_request: https://github.com/python/cpython/pull/16213 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 02:05:24 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 06:05:24 +0000 Subject: [issue35379] IDLE's close fails io is set to None on Mac In-Reply-To: <1543775410.03.0.788709270274.issue35379@psf.upfronthosting.co.za> Message-ID: <1568700324.47.0.22047134634.issue35379@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15815 pull_request: https://github.com/python/cpython/pull/16214 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 02:13:45 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Sep 2019 06:13:45 +0000 Subject: [issue38175] Memory leak in comparison of sqlite.Row objects In-Reply-To: <1568532547.02.0.11116376901.issue38175@roundup.psfhosted.org> Message-ID: <1568700825.41.0.212233453072.issue38175@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +15816 pull_request: https://github.com/python/cpython/pull/16215 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 02:14:23 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 06:14:23 +0000 Subject: [issue38175] Memory leak in comparison of sqlite.Row objects In-Reply-To: <1568532547.02.0.11116376901.issue38175@roundup.psfhosted.org> Message-ID: <1568700863.82.0.380485310751.issue38175@roundup.psfhosted.org> miss-islington added the comment: New changeset f04299d978793be33828dc4d5f46e9b54c81a0a2 by Miss Islington (bot) in branch '3.8': bpo-38175: Fix a memory leak in comparison of sqlite3.Row objects. (GH-16155) https://github.com/python/cpython/commit/f04299d978793be33828dc4d5f46e9b54c81a0a2 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 02:14:32 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 06:14:32 +0000 Subject: [issue38175] Memory leak in comparison of sqlite.Row objects In-Reply-To: <1568532547.02.0.11116376901.issue38175@roundup.psfhosted.org> Message-ID: <1568700872.76.0.761319446107.issue38175@roundup.psfhosted.org> miss-islington added the comment: New changeset 4ac1be28281d8961e71b13623c3671245c125760 by Miss Islington (bot) in branch '3.7': bpo-38175: Fix a memory leak in comparison of sqlite3.Row objects. (GH-16155) https://github.com/python/cpython/commit/4ac1be28281d8961e71b13623c3671245c125760 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 02:18:41 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 17 Sep 2019 06:18:41 +0000 Subject: [issue38013] AsyncGenerator breaks when not iterated fully with RuntimeError("can't send non-None value to a just-started coroutine") In-Reply-To: <1567469623.0.0.944759957345.issue38013@roundup.psfhosted.org> Message-ID: <1568701121.14.0.339245560549.issue38013@roundup.psfhosted.org> Andrew Svetlov added the comment: Thanks, Ned. I love to include this in 3.7.5. I've pinged Yuri offline with ask for review ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 02:20:59 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Sep 2019 06:20:59 +0000 Subject: [issue38185] Weird way of case-insensitive indexing of sqlite3.Row In-Reply-To: <1568628011.92.0.862406558941.issue38185@roundup.psfhosted.org> Message-ID: <1568701259.7.0.139227667165.issue38185@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset f669581a9527afb0d2325f9845a86715c0ba365d by Serhiy Storchaka in branch 'master': bpo-38185: Fixed case-insensitive string comparison in sqlite3.Row indexing. (GH-16190) https://github.com/python/cpython/commit/f669581a9527afb0d2325f9845a86715c0ba365d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 02:21:10 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 06:21:10 +0000 Subject: [issue38185] Weird way of case-insensitive indexing of sqlite3.Row In-Reply-To: <1568628011.92.0.862406558941.issue38185@roundup.psfhosted.org> Message-ID: <1568701270.55.0.250642990872.issue38185@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15817 pull_request: https://github.com/python/cpython/pull/16216 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 02:21:18 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 06:21:18 +0000 Subject: [issue38185] Weird way of case-insensitive indexing of sqlite3.Row In-Reply-To: <1568628011.92.0.862406558941.issue38185@roundup.psfhosted.org> Message-ID: <1568701278.41.0.336625888742.issue38185@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15818 pull_request: https://github.com/python/cpython/pull/16217 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 02:23:10 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 17 Sep 2019 06:23:10 +0000 Subject: [issue38183] test_idle fails on AMD64 FreeBSD CURRENT Shared 3.x: GetUserCfgDir() fails with PermissionError In-Reply-To: <1568619549.13.0.00779387021845.issue38183@roundup.psfhosted.org> Message-ID: <1568701390.96.0.537075720439.issue38183@roundup.psfhosted.org> Terry J. Reedy added the comment: Except for an unrelated gui test on AMD Alpine, the revised tests pass all buildbots. So try with the reproducing condition whenever you want. ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 02:23:15 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 06:23:15 +0000 Subject: [issue35379] IDLE's close fails io is set to None on Mac In-Reply-To: <1543775410.03.0.788709270274.issue35379@psf.upfronthosting.co.za> Message-ID: <1568701395.21.0.446162930994.issue35379@roundup.psfhosted.org> miss-islington added the comment: New changeset 73ccc3322f7ad0d016478ef20237bccd0a314f0a by Miss Islington (bot) in branch '3.8': bpo-35379: When exiting IDLE, catch any AttributeError. (GH-16212) https://github.com/python/cpython/commit/73ccc3322f7ad0d016478ef20237bccd0a314f0a ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 02:24:05 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 06:24:05 +0000 Subject: [issue35379] IDLE's close fails io is set to None on Mac In-Reply-To: <1543775410.03.0.788709270274.issue35379@psf.upfronthosting.co.za> Message-ID: <1568701445.13.0.364905698859.issue35379@roundup.psfhosted.org> miss-islington added the comment: New changeset 3d916a7b1ee29896bece4a6a37d8084fa3c1abf6 by Miss Islington (bot) in branch '3.7': bpo-35379: When exiting IDLE, catch any AttributeError. (GH-16212) https://github.com/python/cpython/commit/3d916a7b1ee29896bece4a6a37d8084fa3c1abf6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 02:25:44 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Tue, 17 Sep 2019 06:25:44 +0000 Subject: [issue38183] test_idle fails on AMD64 FreeBSD CURRENT Shared 3.x: GetUserCfgDir() fails with PermissionError In-Reply-To: <1568619549.13.0.00779387021845.issue38183@roundup.psfhosted.org> Message-ID: <1568701544.44.0.043676745827.issue38183@roundup.psfhosted.org> Kubilay Kocak added the comment: Thanks Terry, I've restarted the worker under sudo The following builds are underway: https://buildbot.python.org/all/#/builders/168/builds/1467 (default) https://buildbot.python.org/all/#/builders/212/builds/218 (3.8) https://buildbot.python.org/all/#/builders/173/builds/589 (3.7) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 02:29:35 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 17 Sep 2019 06:29:35 +0000 Subject: [issue35379] IDLE's close fails io is set to None on Mac In-Reply-To: <1543775410.03.0.788709270274.issue35379@psf.upfronthosting.co.za> Message-ID: <1568701775.65.0.461982733598.issue35379@roundup.psfhosted.org> Terry J. Reedy added the comment: Before closing this, I want to review #17822 and if the specific fix is superceded by this one, remove it. ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 02:35:55 2019 From: report at bugs.python.org (Eryk Sun) Date: Tue, 17 Sep 2019 06:35:55 +0000 Subject: [issue38188] Incorrect Argument Order for Calls to _winapi.DuplicateHandle() in multiprocessing.reduction.DupHandle In-Reply-To: <1568656297.2.0.121307750927.issue38188@roundup.psfhosted.org> Message-ID: <1568702155.41.0.669755809278.issue38188@roundup.psfhosted.org> Eryk Sun added the comment: As far as I can tell, reduction.send_handle isn't used internally in the Windows implementation, and it's also not a documented API function. However, it is tested on Windows in test_fd_transfer in Lib/test/_test_multiprocessing.py. As it turns out, the bug that Cameron's proposed solution fixes slips under the radar. By coincidence, DUPLICATE_SAME_ACCESS (2) has the same value as the file access right FILE_WRITE_DATA (2), and test_fd_transfer only checks whether the child can write to a file handle. I propose adding test_fd_transfer_windows to _TestConnection in Lib/test/_test_multiprocessing.py, which will test whether the parent and child are granted the same access to a kernel file object after the handle is sent to the child. @classmethod def _check_handle_access(cls, conn): handle = reduction.recv_handle(conn) conn.send(get_handle_info(handle).GrantedAccess) @unittest.skipUnless(HAS_REDUCTION, "test needs multiprocessing.reduction") @unittest.skipIf(sys.platform != "win32", "Windows-only test") def test_fd_transfer_windows(self): if self.TYPE != 'processes': self.skipTest("only makes sense with processes") conn, child_conn = self.Pipe(duplex=True) p = self.Process(target=self._check_handle_access, args=(child_conn,)) p.daemon = True p.start() try: with open(test.support.TESTFN, "wb") as f: self.addCleanup(test.support.unlink, test.support.TESTFN) handle = msvcrt.get_osfhandle(f.fileno()) parent_access = get_handle_info(handle).GrantedAccess reduction.send_handle(conn, handle, p.pid) child_access = conn.recv() self.assertEqual(parent_access, child_access) finally: p.join() get_handle_info() and the required ctypes support definitions [1] would be defined at module scope as follows: if WIN32: from ctypes import (WinDLL, WinError, Structure, POINTER, byref, sizeof, c_void_p, c_ulong) ntdll = WinDLL('ntdll') ntdll.NtQueryObject.argtypes = ( c_void_p, # Handle c_ulong, # ObjectInformationClass c_void_p, # ObjectInformation c_ulong, # ObjectInformationLength POINTER(c_ulong)) # ReturnLength ObjectBasicInformation = 0 class PUBLIC_OBJECT_BASIC_INFORMATION(Structure): (r"https://docs.microsoft.com/en-us/windows/win32/api" r"/winternl/nf-winternl-ntqueryobject") _fields_ = (('Attributes', c_ulong), ('GrantedAccess', c_ulong), ('HandleCount', c_ulong), ('PointerCount', c_ulong), ('Reserved', c_ulong * 10)) def get_handle_info(handle): info = PUBLIC_OBJECT_BASIC_INFORMATION() status = ntdll.NtQueryObject(handle, ObjectBasicInformation, byref(info), sizeof(info), None) if status < 0: error = ntdll.RtlNtStatusToDosError(status) raise WinError(error) return info [1] https://docs.microsoft.com/en-us/windows/win32/api/winternl/nf-winternl-ntqueryobject ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 02:39:14 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 06:39:14 +0000 Subject: [issue38185] Weird way of case-insensitive indexing of sqlite3.Row In-Reply-To: <1568628011.92.0.862406558941.issue38185@roundup.psfhosted.org> Message-ID: <1568702354.17.0.880137922727.issue38185@roundup.psfhosted.org> miss-islington added the comment: New changeset d8d653c2d0d267eb1e44f6cdb916945029fec3b1 by Miss Islington (bot) in branch '3.8': bpo-38185: Fixed case-insensitive string comparison in sqlite3.Row indexing. (GH-16190) https://github.com/python/cpython/commit/d8d653c2d0d267eb1e44f6cdb916945029fec3b1 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 02:39:52 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 06:39:52 +0000 Subject: [issue38185] Weird way of case-insensitive indexing of sqlite3.Row In-Reply-To: <1568628011.92.0.862406558941.issue38185@roundup.psfhosted.org> Message-ID: <1568702392.7.0.738371627262.issue38185@roundup.psfhosted.org> miss-islington added the comment: New changeset 80cb055aa45f37951b8e3097fe4367d443d455ae by Miss Islington (bot) in branch '3.7': bpo-38185: Fixed case-insensitive string comparison in sqlite3.Row indexing. (GH-16190) https://github.com/python/cpython/commit/80cb055aa45f37951b8e3097fe4367d443d455ae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 02:51:10 2019 From: report at bugs.python.org (eshkrig) Date: Tue, 17 Sep 2019 06:51:10 +0000 Subject: [issue38195] A bug in the multiprocessing module Message-ID: <1568703069.98.0.135749134145.issue38195@roundup.psfhosted.org> New submission from eshkrig : Hi! I found a bug in the multiprocessing module. The documentation (https://docs.python.org/3.6/library/multiprocessing.html) for the Queue.get method says: "If timeout is a positive number, it blocks at most timeout seconds ..." But the Queue.get method freezes if the process filling the queue terminates while reading data. In the attachment is an example of a program (testqueue.py) that freezes after ~ 5-30 seconds. After pressing -, the output is as follows: Traceback (most recent call last): File "./testqueue.py", line 45, in result = ps_queues[cpu].get(timeout=2) File "/usr/lib64/python3.6/multiprocessing/queues.py", line 108, in get res = self._recv_bytes() File "/usr/lib64/python3.6/multiprocessing/connection.py", line 216, in recv_bytes buf = self._recv_bytes(maxlength) File "/usr/lib64/python3.6/multiprocessing/connection.py", line 411, in _recv_bytes return self._recv(size) File "/usr/lib64/python3.6/multiprocessing/connection.py", line 379, in _recv chunk = read(handle, remaining) KeyboardInterrupt Please fix it. ---------- components: Extension Modules files: testqueue.py messages: 352613 nosy: eshkrig priority: normal severity: normal status: open title: A bug in the multiprocessing module type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file48609/testqueue.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 02:56:30 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Sep 2019 06:56:30 +0000 Subject: [issue38175] Memory leak in comparison of sqlite.Row objects In-Reply-To: <1568532547.02.0.11116376901.issue38175@roundup.psfhosted.org> Message-ID: <1568703390.44.0.661420003667.issue38175@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset be257bcad12b1d72a2c2a8199d2291ae22bccf78 by Serhiy Storchaka in branch '2.7': [2.7] bpo-38175: Fix a memory leak in comparison of sqlite3.Row objects. (GH-16155). (GH-16215) https://github.com/python/cpython/commit/be257bcad12b1d72a2c2a8199d2291ae22bccf78 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 02:56:48 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Sep 2019 06:56:48 +0000 Subject: [issue38175] Memory leak in comparison of sqlite.Row objects In-Reply-To: <1568532547.02.0.11116376901.issue38175@roundup.psfhosted.org> Message-ID: <1568703408.53.0.280326650332.issue38175@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 03:10:33 2019 From: report at bugs.python.org (Eryk Sun) Date: Tue, 17 Sep 2019 07:10:33 +0000 Subject: [issue38188] Incorrect Argument Order for Calls to _winapi.DuplicateHandle() in multiprocessing.reduction.DupHandle In-Reply-To: <1568656297.2.0.121307750927.issue38188@roundup.psfhosted.org> Message-ID: <1568704233.09.0.97965008425.issue38188@roundup.psfhosted.org> Eryk Sun added the comment: Let's make test_fd_transfer_windows a bit less hangy by polling for up to 60 seconds instead of simply trying to recv() and by terminating before trying to join(). @unittest.skipUnless(HAS_REDUCTION, "test needs multiprocessing.reduction") @unittest.skipIf(sys.platform != "win32", "Windows-only test") def test_fd_transfer_windows(self): if self.TYPE != 'processes': self.skipTest("only makes sense with processes") conn, child_conn = self.Pipe(duplex=True) p = self.Process(target=self._check_handle_access, args=(child_conn,)) p.daemon = True p.start() try: with open(test.support.TESTFN, "wb") as f: self.addCleanup(test.support.unlink, test.support.TESTFN) handle = msvcrt.get_osfhandle(f.fileno()) parent_access = get_handle_info(handle).GrantedAccess reduction.send_handle(conn, handle, p.pid) if not conn.poll(timeout=60): raise AssertionError("could not receive from child process") child_access = conn.recv() self.assertEqual(parent_access, child_access) finally: p.terminate() p.join() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 03:16:46 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 07:16:46 +0000 Subject: [issue38192] Fix invocation of EchoClientProtocol In-Reply-To: <1568666058.33.0.112875968613.issue38192@roundup.psfhosted.org> Message-ID: <1568704606.28.0.479905736252.issue38192@roundup.psfhosted.org> miss-islington added the comment: New changeset 5d359cc62e0244e1fd8d17146a4135079d6843bf by Miss Islington (bot) (Hrvoje Nik?i?) in branch 'master': bpo-38192: Fix remaining passing of "loop" in the protocol examples (GH-16202) https://github.com/python/cpython/commit/5d359cc62e0244e1fd8d17146a4135079d6843bf ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 03:17:00 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 07:17:00 +0000 Subject: [issue38192] Fix invocation of EchoClientProtocol In-Reply-To: <1568666058.33.0.112875968613.issue38192@roundup.psfhosted.org> Message-ID: <1568704620.45.0.622658689866.issue38192@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15819 pull_request: https://github.com/python/cpython/pull/16218 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 03:17:09 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 07:17:09 +0000 Subject: [issue38192] Fix invocation of EchoClientProtocol In-Reply-To: <1568666058.33.0.112875968613.issue38192@roundup.psfhosted.org> Message-ID: <1568704629.68.0.701335186398.issue38192@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15820 pull_request: https://github.com/python/cpython/pull/16219 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 03:22:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 07:22:02 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568704922.84.0.117852874331.issue37531@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15821 pull_request: https://github.com/python/cpython/pull/16220 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 03:22:51 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 07:22:51 +0000 Subject: [issue38192] Fix invocation of EchoClientProtocol In-Reply-To: <1568666058.33.0.112875968613.issue38192@roundup.psfhosted.org> Message-ID: <1568704971.49.0.594394243655.issue38192@roundup.psfhosted.org> miss-islington added the comment: New changeset facbd316b409f3775da2a74d0845938b4c7b88f0 by Miss Islington (bot) in branch '3.7': bpo-38192: Fix remaining passing of "loop" in the protocol examples (GH-16202) https://github.com/python/cpython/commit/facbd316b409f3775da2a74d0845938b4c7b88f0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 03:24:34 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 07:24:34 +0000 Subject: [issue38192] Fix invocation of EchoClientProtocol In-Reply-To: <1568666058.33.0.112875968613.issue38192@roundup.psfhosted.org> Message-ID: <1568705074.79.0.991105336695.issue38192@roundup.psfhosted.org> miss-islington added the comment: New changeset 1ba74719e3a213a2c473b92f3a79f8399e65f80a by Miss Islington (bot) in branch '3.8': bpo-38192: Fix remaining passing of "loop" in the protocol examples (GH-16202) https://github.com/python/cpython/commit/1ba74719e3a213a2c473b92f3a79f8399e65f80a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 03:31:44 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 17 Sep 2019 07:31:44 +0000 Subject: [issue38192] Fix invocation of EchoClientProtocol In-Reply-To: <1568666058.33.0.112875968613.issue38192@roundup.psfhosted.org> Message-ID: <1568705504.27.0.618840807186.issue38192@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 04:08:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 08:08:30 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568707710.74.0.23718035039.issue37531@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 46b0b81220a23bc4aee5ba3ba67e8cf1b5df7960 by Victor Stinner in branch 'master': bpo-37531: regrtest main process uses shorter timeout (GH-16220) https://github.com/python/cpython/commit/46b0b81220a23bc4aee5ba3ba67e8cf1b5df7960 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 04:11:18 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Sep 2019 08:11:18 +0000 Subject: [issue38191] typing.NamedTuple() should prefix parameters with '_' In-Reply-To: <1568663995.81.0.542051193907.issue38191@roundup.psfhosted.org> Message-ID: <1568707878.16.0.329807894937.issue38191@roundup.psfhosted.org> Serhiy Storchaka added the comment: Looks as a good case for positional-only parameters. But first passing these arguments by keyword should be deprecated. ---------- assignee: -> serhiy.storchaka nosy: +gvanrossum, levkivskyi, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 05:22:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 09:22:42 +0000 Subject: [issue38190] regrtest: test suite completes but Tests Result is not displayed and the process hangs In-Reply-To: <1568662315.14.0.520273367874.issue38190@roundup.psfhosted.org> Message-ID: <1568712162.79.0.925684516317.issue38190@roundup.psfhosted.org> STINNER Victor added the comment: > https://buildbot.python.org/all/#/builders/225/builds/239 I forgot to mention the buildbot name: AMD64 FreeBSD 10-STABLE Non-Debug 3.8. > It may be a regression caused by bpo-37531. > (...) > So main_process could be max(PROGRESS_UPDATE, PROGRESS_MIN_TIME) x 2 = 1 minute, instead of 30 minutes. I pushed a change for that: New changeset 46b0b81220a23bc4aee5ba3ba67e8cf1b5df7960 by Victor Stinner in branch 'master': bpo-37531: regrtest main process uses shorter timeout (GH-16220) https://github.com/python/cpython/commit/46b0b81220a23bc4aee5ba3ba67e8cf1b5df7960 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 05:31:48 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Sep 2019 09:31:48 +0000 Subject: [issue38191] typing.NamedTuple() should prefix parameters with '_' In-Reply-To: <1568663995.81.0.542051193907.issue38191@roundup.psfhosted.org> Message-ID: <1568712708.55.0.146774032843.issue38191@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +15822 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16222 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 05:36:22 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Sep 2019 09:36:22 +0000 Subject: [issue38191] typing.NamedTuple() should prefix parameters with '_' In-Reply-To: <1568663995.81.0.542051193907.issue38191@roundup.psfhosted.org> Message-ID: <1568712982.64.0.733793450417.issue38191@roundup.psfhosted.org> Serhiy Storchaka added the comment: PR 16222 adds support for arbitrary keyword argument names in NamedTuple and TypedDict. Passing arguments like "typename", "_typename", "fields" and "_fields" by keyword is still supported, but deprecated. I'm going to backport this to 3.8 and 3.7 (to 3.7 without deprecation warnings), and than convert warnings to error in master (by using positional-only parameters syntax). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 05:37:40 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Sep 2019 09:37:40 +0000 Subject: [issue38185] Weird way of case-insensitive indexing of sqlite3.Row In-Reply-To: <1568628011.92.0.862406558941.issue38185@roundup.psfhosted.org> Message-ID: <1568713060.04.0.358929607626.issue38185@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 05:43:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 09:43:32 +0000 Subject: [issue38183] test_idle fails on AMD64 FreeBSD CURRENT Shared 3.x: GetUserCfgDir() fails with PermissionError In-Reply-To: <1568619549.13.0.00779387021845.issue38183@roundup.psfhosted.org> Message-ID: <1568713412.52.0.620300585781.issue38183@roundup.psfhosted.org> STINNER Victor added the comment: > I can restart the worker to create the environment that reproduces the issue at any time to confirm the test passes, just let me know Running test_idle as an user different than root and with HOME=/root env var (or HOME=/) should be enough to reproduce the issue, no? I understand that test_idle has been fixed in 3.7, 3.8 and master. The buildbot worker configuration has also been fixed, so can we close the issue? Or does someone want to attempt to fix Python 2.7 as well? I don't think that it's worth it to invest too much time in 2.7 which will be unsupported in 3 months; ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 05:46:28 2019 From: report at bugs.python.org (Kubilay Kocak) Date: Tue, 17 Sep 2019 09:46:28 +0000 Subject: [issue38183] test_idle fails on AMD64 FreeBSD CURRENT Shared 3.x: GetUserCfgDir() fails with PermissionError In-Reply-To: <1568619549.13.0.00779387021845.issue38183@roundup.psfhosted.org> Message-ID: <1568713588.71.0.452156113142.issue38183@roundup.psfhosted.org> Kubilay Kocak added the comment: @Victor Yes. I restarted the worker to re-create reproduction conditions. It looks like default, 3.8 and 3.7 are OK now after Terry;s commits, with 2.7 failing (expected): https://buildbot.python.org/all/#/builders/169/builds/170 It would be nice to fix the bug in all supported branches until they are EoL ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 05:51:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 09:51:25 +0000 Subject: [issue38183] test_idle fails on AMD64 FreeBSD CURRENT Shared 3.x: GetUserCfgDir() fails with PermissionError In-Reply-To: <1568619549.13.0.00779387021845.issue38183@roundup.psfhosted.org> Message-ID: <1568713885.63.0.515959002287.issue38183@roundup.psfhosted.org> STINNER Victor added the comment: > It would be nice to fix the bug in all supported branches until they are EoL Or just fix the buildbot which means less work to do :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 06:05:42 2019 From: report at bugs.python.org (Arshdeep) Date: Tue, 17 Sep 2019 10:05:42 +0000 Subject: [issue38196] Bug fix in folderstats module Message-ID: <1568714742.05.0.0708040865921.issue38196@roundup.psfhosted.org> New submission from Arshdeep : Issue : While using folderstats module in python3, the records are cascaded from all previous runs of folderstats for that specific session i.e. once the folderstats is run, it will provide the dataframe with all the files/directories in that directory, but if we run it another time, the new data is appended to the old data. To overcome this issue you can make a minor change in the folderstats module and import it : init.py : [attached] In method folderstats() edit the below line to make an addition i.e initialise items=list() so as the data is not appended to the previous list : idx, items, foldersize, num_files = _recursive_folderstats( folderpath, hash_name=hash_name,items=list() ignore_hidden=ignore_hidden, verbose=verbose) ---------- components: Library (Lib) messages: 352626 nosy: arshdeepbal priority: normal severity: normal status: open title: Bug fix in folderstats module type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 06:15:36 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 10:15:36 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568715336.83.0.745023764297.issue37531@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15823 pull_request: https://github.com/python/cpython/pull/16223 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 06:15:43 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 10:15:43 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568715343.1.0.754580602303.issue37531@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15824 pull_request: https://github.com/python/cpython/pull/16224 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 06:21:48 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Sep 2019 10:21:48 +0000 Subject: [issue38196] Bug fix in folderstats module In-Reply-To: <1568714742.05.0.0708040865921.issue38196@roundup.psfhosted.org> Message-ID: <1568715708.81.0.295102148735.issue38196@roundup.psfhosted.org> Serhiy Storchaka added the comment: This tracker is for bugs in the C implementation of Python. "foldersize" is not a module from the standard Python library. Use the corresponding bug tracker for reporting a bug in third-party modules. ---------- nosy: +serhiy.storchaka resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 06:34:55 2019 From: report at bugs.python.org (Carl Friedrich Bolz-Tereick) Date: Tue, 17 Sep 2019 10:34:55 +0000 Subject: [issue38197] Meaning of tracebacklimit differs between sys.tracebacklimit and traceback module Message-ID: <1568716495.17.0.305052685385.issue38197@roundup.psfhosted.org> New submission from Carl Friedrich Bolz-Tereick : The meaning of sys.tracebacklimit seems to be different than the meaning of the various limit parameters in the traceback module. One shows the top n stack frames, the other the bottom n. Is this intentional, and if yes, is that difference documented somewhere? (it came up because PyPy just uses the traceback module and has no equivalent of PyTraceBack_Print). See the attached script to understand the problem. The script formats the same exception twice, once with the traceback module, once by the interpreter. I would have expected them to look the same for all limits, but instead: $ ./python /tmp/x.py 3 limit 3 from traceback module: Traceback (most recent call last): File "/tmp/x.py", line 19, in main() File "/tmp/x.py", line 16, in main x3() File "/tmp/x.py", line 14, in x3 x2() ZeroDivisionError: division by zero from interpreter: Traceback (most recent call last): File "/tmp/x.py", line 14, in x3 x2() File "/tmp/x.py", line 12, in x2 x1() File "/tmp/x.py", line 10, in x1 1 / 0 ZeroDivisionError: division by zero ---------- files: x.py messages: 352628 nosy: Carl.Friedrich.Bolz priority: normal severity: normal status: open title: Meaning of tracebacklimit differs between sys.tracebacklimit and traceback module versions: Python 3.7 Added file: https://bugs.python.org/file48610/x.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 06:42:59 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Sep 2019 10:42:59 +0000 Subject: [issue38005] Coercing strings and non-integer numbers to interpreter ID and channel ID In-Reply-To: <1567415474.91.0.412541266394.issue38005@roundup.psfhosted.org> Message-ID: <1568716979.41.0.226766909133.issue38005@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +15825 pull_request: https://github.com/python/cpython/pull/16227 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 07:05:25 2019 From: report at bugs.python.org (Thomas Grainger) Date: Tue, 17 Sep 2019 11:05:25 +0000 Subject: [issue27071] unittest.TestCase.assertCountEqual is a very misleading name In-Reply-To: <1463788380.52.0.782790370377.issue27071@psf.upfronthosting.co.za> Message-ID: <1568718325.63.0.489814261479.issue27071@roundup.psfhosted.org> Change by Thomas Grainger : ---------- pull_requests: +15826 pull_request: https://github.com/python/cpython/pull/16228 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 07:16:12 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 17 Sep 2019 11:16:12 +0000 Subject: [issue37828] Fix default mock_name in unittest.mock.assert_called error message In-Reply-To: <1565593953.82.0.916439327482.issue37828@roundup.psfhosted.org> Message-ID: <1568718972.09.0.266207145434.issue37828@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 5f5f11faf9de0d8dcbe1a8a4eb35d2a4232d6eaa by Pablo Galindo (Abraham Toriz Cruz) in branch 'master': bpo-37828: Fix default mock_name in unittest.mock.assert_called error (GH-16166) https://github.com/python/cpython/commit/5f5f11faf9de0d8dcbe1a8a4eb35d2a4232d6eaa ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 07:16:46 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 11:16:46 +0000 Subject: [issue37828] Fix default mock_name in unittest.mock.assert_called error message In-Reply-To: <1565593953.82.0.916439327482.issue37828@roundup.psfhosted.org> Message-ID: <1568719006.56.0.439199711312.issue37828@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15827 pull_request: https://github.com/python/cpython/pull/16229 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 07:34:37 2019 From: report at bugs.python.org (Francesco Ricciardi) Date: Tue, 17 Sep 2019 11:34:37 +0000 Subject: [issue38198] Attributes of pathlib classes are not indexed in Windows help file Message-ID: <1568720077.25.0.0826430559794.issue38198@roundup.psfhosted.org> New submission from Francesco Ricciardi : Attributes of pathlib classes (e.g. 'stem' or 'root') cannot be searched for in Python Windows help file index. ---------- assignee: docs at python components: Documentation messages: 352630 nosy: docs at python, francescor priority: normal severity: normal status: open title: Attributes of pathlib classes are not indexed in Windows help file type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 07:36:02 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 11:36:02 +0000 Subject: [issue37828] Fix default mock_name in unittest.mock.assert_called error message In-Reply-To: <1565593953.82.0.916439327482.issue37828@roundup.psfhosted.org> Message-ID: <1568720162.34.0.851736067208.issue37828@roundup.psfhosted.org> miss-islington added the comment: New changeset f668d2b775da4bcd07e142c4bc5ebd88165fadf4 by Miss Islington (bot) in branch '3.8': bpo-37828: Fix default mock_name in unittest.mock.assert_called error (GH-16166) https://github.com/python/cpython/commit/f668d2b775da4bcd07e142c4bc5ebd88165fadf4 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 08:34:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 12:34:18 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568723658.01.0.875098900288.issue37531@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 5f1590d5e679f4dd0b611ef54ae512f137e78f1b by Victor Stinner (Miss Islington (bot)) in branch '3.8': bpo-37531: regrtest main process uses shorter timeout (GH-16220) (GH-16224) https://github.com/python/cpython/commit/5f1590d5e679f4dd0b611ef54ae512f137e78f1b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 08:34:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 12:34:18 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568723657.26.0.605074980754.issue37531@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 6591b4bbb1c0b9c26b99e4b2dba1e5cc8546732d by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-37531: regrtest main process uses shorter timeout (GH-16220) (GH-16223) https://github.com/python/cpython/commit/6591b4bbb1c0b9c26b99e4b2dba1e5cc8546732d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 08:34:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 12:34:17 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568723657.26.0.605074980754.issue37531@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 6591b4bbb1c0b9c26b99e4b2dba1e5cc8546732d by Victor Stinner (Miss Islington (bot)) in branch '3.7': bpo-37531: regrtest main process uses shorter timeout (GH-16220) (GH-16223) https://github.com/python/cpython/commit/6591b4bbb1c0b9c26b99e4b2dba1e5cc8546732d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 08:59:54 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 12:59:54 +0000 Subject: [issue38013] AsyncGenerator breaks when not iterated fully with RuntimeError("can't send non-None value to a just-started coroutine") In-Reply-To: <1567469623.0.0.944759957345.issue38013@roundup.psfhosted.org> Message-ID: <1568725194.22.0.596330109492.issue38013@roundup.psfhosted.org> miss-islington added the comment: New changeset c275312a6284bd319ea33c9abd7e15c230eca43f by Miss Islington (bot) (Andrew Svetlov) in branch 'master': bpo-38013: make async_generator_athrow object tolerant to throwing exceptions (GH-16070) https://github.com/python/cpython/commit/c275312a6284bd319ea33c9abd7e15c230eca43f ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 09:00:01 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 13:00:01 +0000 Subject: [issue38013] AsyncGenerator breaks when not iterated fully with RuntimeError("can't send non-None value to a just-started coroutine") In-Reply-To: <1567469623.0.0.944759957345.issue38013@roundup.psfhosted.org> Message-ID: <1568725201.1.0.693931610503.issue38013@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15828 pull_request: https://github.com/python/cpython/pull/16231 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 09:00:12 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 13:00:12 +0000 Subject: [issue38013] AsyncGenerator breaks when not iterated fully with RuntimeError("can't send non-None value to a just-started coroutine") In-Reply-To: <1567469623.0.0.944759957345.issue38013@roundup.psfhosted.org> Message-ID: <1568725212.12.0.477028270518.issue38013@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15829 pull_request: https://github.com/python/cpython/pull/16232 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 09:15:58 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 17 Sep 2019 13:15:58 +0000 Subject: [issue37828] Fix default mock_name in unittest.mock.assert_called error message In-Reply-To: <1565593953.82.0.916439327482.issue37828@roundup.psfhosted.org> Message-ID: <1568726158.73.0.088285176076.issue37828@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I don't think 3.7 needs a backport of the fix. I am closing this as fixed since all PRs are merged. Please reopen if a backport is needed. Thanks @categulario. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 09:16:12 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 17 Sep 2019 13:16:12 +0000 Subject: [issue37828] Fix default mock_name in unittest.mock.assert_called error message In-Reply-To: <1565593953.82.0.916439327482.issue37828@roundup.psfhosted.org> Message-ID: <1568726172.72.0.0103836931041.issue37828@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 09:19:32 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 13:19:32 +0000 Subject: [issue38013] AsyncGenerator breaks when not iterated fully with RuntimeError("can't send non-None value to a just-started coroutine") In-Reply-To: <1567469623.0.0.944759957345.issue38013@roundup.psfhosted.org> Message-ID: <1568726372.57.0.286870156503.issue38013@roundup.psfhosted.org> miss-islington added the comment: New changeset fc022f04b41a79cacdff380435c30c8042c82b99 by Miss Islington (bot) in branch '3.7': bpo-38013: make async_generator_athrow object tolerant to throwing exceptions (GH-16070) https://github.com/python/cpython/commit/fc022f04b41a79cacdff380435c30c8042c82b99 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 09:20:10 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 13:20:10 +0000 Subject: [issue38013] AsyncGenerator breaks when not iterated fully with RuntimeError("can't send non-None value to a just-started coroutine") In-Reply-To: <1567469623.0.0.944759957345.issue38013@roundup.psfhosted.org> Message-ID: <1568726410.47.0.709956384062.issue38013@roundup.psfhosted.org> miss-islington added the comment: New changeset 3c1786f18b1542e71454f37e3f3ca1ef3eec0e5f by Miss Islington (bot) in branch '3.8': bpo-38013: make async_generator_athrow object tolerant to throwing exceptions (GH-16070) https://github.com/python/cpython/commit/3c1786f18b1542e71454f37e3f3ca1ef3eec0e5f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 09:20:51 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 17 Sep 2019 13:20:51 +0000 Subject: [issue38013] AsyncGenerator breaks when not iterated fully with RuntimeError("can't send non-None value to a just-started coroutine") In-Reply-To: <1567469623.0.0.944759957345.issue38013@roundup.psfhosted.org> Message-ID: <1568726451.18.0.780534410743.issue38013@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 09:34:54 2019 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 17 Sep 2019 13:34:54 +0000 Subject: =?utf-8?q?=5Bissue30367=5D_Cannot_build_CPython3=2E6_with_module_?= =?utf-8?q?=E2=80=9Ctestcapimodule=E2=80=9D_statically?= In-Reply-To: <1494816939.58.0.996227470169.issue30367@psf.upfronthosting.co.za> Message-ID: <1568727294.25.0.837911036798.issue30367@roundup.psfhosted.org> Paul Ganssle added the comment: Is this issue only in Python 3.6? I believe Python 3.6 is only receiving security fixes at the moment, so this could only be fixed in 3.7, 3.8 and 3.9. ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 09:45:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 13:45:37 +0000 Subject: [issue38199] python3.8-config --ldflags must not generate -L/usr/lib64 Message-ID: <1568727937.94.0.575779306656.issue38199@roundup.psfhosted.org> New submission from STINNER Victor : Example on Fedora 30: $ python3.8-config --ldflags -L/usr/lib64 -lcrypt -lpthread -ldl -lutil -lm -lm This command output must not generate "-L/usr/lib64". This bug report is based on this Fedora bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1724190#c3 == Using "-L /usr/lib64" is wrong == If for example you are building something against a non-system version of a library, while you have a system version of that library installed. You would then have -L/ in your LDFLAGS. If some configure script then adds -L/usr/lib64 to your LDFLAGS from python-config you might link to the system version instead, depending on in which order the Makefiles puts the options together. If your are building a new version of a software of which you already have an older version installed. If the software provides both libraries and executables, the executables should be linked to the new version of the library you just built and not the system version in /usr/lib64. Depending on how the Makefiles are written you might get the wrong version if -L/usr/lib64 is added to LDFLAGS. == pkg-config default is correct == pkg-config --libs does not generate any -L flags if the .pc file contains "libdir=/usr/lib64", "Libs: -L${libdir}". Example on Fedora 30: $ pkg-config python-3.8 --libs # empty output $ pkg-config python-3.8-embed --libs -lpython3.8 pkg-config has a --keep-system-libs flag which includes -L/usr/lib64 as expected: $ pkg-config python-3.8-embed --libs --keep-system-libs -L/usr/lib64 -lpython3.8 If PKG_CONFIG_SYSTEM_LIBRARY_PATH env var is set to a directory different than /usr/lib64, -L/usr/lib64 is generated: $ PKG_CONFIG_SYSTEM_LIBRARY_PATH=/xxx pkg-config python-3.8-embed --libs -L/usr/lib64 -lpython3.8 == pkg-config internals == Look at pkgconfig internals, so we can mimick the behavior. On my Fedora 30, /usr/lib64/pkgconfig/python3.pc contains "Libs: -L${libdir} -lpython3.7m" with "libdir=/usr/lib64", but "pkg-config python3 --libs" only returns "-lpython3.7m": no -L flag. pkg-config: * https://github.com/pkgconf/pkgconf/tree/master/libpkgconf * https://src.fedoraproject.org/rpms/pkgconf/blob/master/f/pkgconf.spec pkg-config uses PKG_CONFIG_SYSTEM_LIBRARY_PATH environment variable if set, otherwise it uses &personality->filter_libdirs. "SystemLibraryPaths" value (&personality->filter_libdirs) can be read using the command: --- $ pkg-config --dump-personality Triplet: default DefaultSearchPaths: /usr/lib64/pkgconfig /usr/share/pkgconfig SystemIncludePaths: /usr/include SystemLibraryPaths: /usr/lib64 --- The default personality uses SYSTEM_LIBDIR, macro defines by CMakeLists.txt, extract: --- SET(libdir ${prefix}/lib) SET(system_libdir "${libdir}" CACHE STRING "specify the system library directory (default LIBDIR)") SET(SYSTEM_LIBDIR "${system_libdir}") ADD_DEFINITIONS(-DSYSTEM_LIBDIR=\"${system_libdir}\") --- Fedora pkgconf specfile overrides the system libdir: --- %configure --disable-static \ --with-pkg-config-dir=%{pkgconf_libdirs} \ --with-system-includedir=%{_includedir} \ --with-system-libdir=%{_libdir} --- https://src.fedoraproject.org/rpms/pkgconf/blob/master/f/pkgconf.spec#_110 == How to fix python3.8-config? == The logic to detect the "system library path(s)" looks highly platform dependent. Maybe Python configure script should get an optional --with-system-libdir=PATH which would strip -L option in python-config if it's value is equal to PATH. pkg-config also supports PKG_CONFIG_SYSTEM_LIBRARY_PATH env var and --keep-system-libs command line option. == Options == * Deprecate python3.8-config: promote pkg-config. Is pkg-config available on all platforms? (Linux, macOS, FreeBSD, AIX, etc.) => easy option, least work to do! * Document python3.8-config current behavior (document that -L/usr/lib64), modify python3.8-config & update the doc. Need to decide which features do we want (env var and/or cmdline option?). ---------- components: Build messages: 352639 nosy: vstinner priority: normal severity: normal status: open title: python3.8-config --ldflags must not generate -L/usr/lib64 versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 10:37:00 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 17 Sep 2019 14:37:00 +0000 Subject: [issue38183] test_idle fails on AMD64 FreeBSD CURRENT Shared 3.x: GetUserCfgDir() fails with PermissionError In-Reply-To: <1568619549.13.0.00779387021845.issue38183@roundup.psfhosted.org> Message-ID: <1568731020.57.0.865267005592.issue38183@roundup.psfhosted.org> Terry J. Reedy added the comment: When I thought a simple change to one file was enough, I thought to backport to 2.7. But given that I will not backport the followup changes that will affect users, I am not going to backport the more complicated changes. ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 10:39:24 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 17 Sep 2019 14:39:24 +0000 Subject: [issue38183] test_idle should not access or modify user config directory In-Reply-To: <1568619549.13.0.00779387021845.issue38183@roundup.psfhosted.org> Message-ID: <1568731163.99.0.215860174594.issue38183@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- title: test_idle fails on AMD64 FreeBSD CURRENT Shared 3.x: GetUserCfgDir() fails with PermissionError -> test_idle should not access or modify user config directory _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 10:42:35 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 17 Sep 2019 14:42:35 +0000 Subject: [issue38187] test.test_tools.test_c_analyzer fails in refleak mode In-Reply-To: <1568646466.84.0.78149770012.issue38187@roundup.psfhosted.org> Message-ID: <1568731355.72.0.330328199925.issue38187@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +15830 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16233 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 11:36:18 2019 From: report at bugs.python.org (Diego Barriga) Date: Tue, 17 Sep 2019 15:36:18 +0000 Subject: [issue38180] Test pyexpat fails on Fedora 30 In-Reply-To: <1568583669.12.0.757725102986.issue38180@roundup.psfhosted.org> Message-ID: <1568734578.35.0.306884149308.issue38180@roundup.psfhosted.org> Diego Barriga added the comment: $ rpm -qa expat expat-2.2.7-1.fc30.x86_64 expat-2.2.7-1.fc30.i686 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 12:00:08 2019 From: report at bugs.python.org (Matteo Dell'Amico) Date: Tue, 17 Sep 2019 16:00:08 +0000 Subject: [issue38200] Adding itertools.pairwise to the standard library? Message-ID: <1568736008.51.0.85414927582.issue38200@roundup.psfhosted.org> New submission from Matteo Dell'Amico : I use itertools.pairwise all the time and I wonder if the same happens to others. I'm thinking that others may be in the same situation, and having this simple recipe already included in the library would be definitely more convenient than copy/pasting the recipe. Also, it may improve its visibility... ---------- components: Library (Lib) messages: 352642 nosy: della priority: normal severity: normal status: open title: Adding itertools.pairwise to the standard library? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 12:04:28 2019 From: report at bugs.python.org (Eryk Sun) Date: Tue, 17 Sep 2019 16:04:28 +0000 Subject: [issue38081] Different behavior of os.path.realpath('nul') in 3.7 and 3.8 In-Reply-To: <1568097037.9.0.584511449633.issue38081@roundup.psfhosted.org> Message-ID: <1568736268.44.0.156644221586.issue38081@roundup.psfhosted.org> Eryk Sun added the comment: Sorry, I mistakenly left out ERROR_BAD_NETPATH (53). It's at least used with mapped drives. For example, I have drive "M:" mapped to WebDAV "//live.sysinternals.com/tools", and I see this error if I disconnect the network: >>> try: nt._getfinalpathname('M:/') ... except OSError as e: print(e.winerror) ... 53 whereas if I access the underlying UNC path directly the error in this case is ERROR_BAD_NET_NAME (67): >>> try: nt._getfinalpathname('//live.sysinternals.com/tools') ... except OSError as e: print(e.winerror) ... 67 (Not that this case would normally succeed. A WebDAV share fails the internal request to get a normalized name, as expected for most network providers, but with an unexpected error code that's not handled by the API. It would succeed if we changed _getfinalpathname to fall back on getting the final name as opened, which skips expanding short component names.) --- Discussion The Multiple UNC Provider device (i.e. "\??\UNC" -> "\Device\Mup") resolves a UNC path prefix to a network provider (e.g. "Microsoft Windows Network" for SMB) by checking all providers in a registered order until one claims to handle the path. Typically a provider claims the server/share prefix, but the claimed prefix can be just the server, or a variable path length. Typically, if the "server" component isn't found, a provider returns STATUS_BAD_NETWORK_PATH. If the "share" component isn't found, it returns STATUS_BAD_NETWORK_NAME. However, since the request is to MUP, the final status is whatever MUP returns. As far as I can tell, post-Vista MUP prefix resolution returns STATUS_BAD_NETWORK_NAME even if all providers return STATUS_BAD_NETWORK_PATH. That said, MUP prefix resolution isn't used for mapped drives. A mapped drive sends the request directly to the provider that created the drive. Prior to Vista, this used to be a top-level named device such as "\Device\LanmanRedirector" (SMB). Since Vista, all redirected create/open requests are routed through MUP, but it doesn't use prefix resolution in this case. It has a sneaky way of implementing this. The provider's device name nowadays is an object SymbolicLink that targets MUP, but with a reserved component that indicates the redirector to use, e.g. "\Device\LanmanRedirector" -> "\Device\Mup\;LanmanRedirector". (A valid server name cannot begin with a semicolon, so this syntax is reserved by MUP. It also supports an optional second reserved component, with the drive name and logon session ID, such as ";Z:0000000000001234". These reserved components are removed from the parsed path, i.e. they are not included in the final path.) Nothing stops us from using this undocumented feature manually in a UNC path, as demonstrated by the examples below. The following shows that MUP parses ";LanmanRedirector" as the redirector name, not the "server" component. >>> os.path.samefile('//localhost/C$', '//;LanmanRedirector/localhost/C$') True The following shows that an explicit redirector path does not use prefix resolution. This open fails because there's no WebDAV server on localhost. >>> try: os.stat('//;WebDavRedirector/localhost/C$') ... except OSError as e: print(e.winerror) ... 53 The following shows that MUP fails an open with STATUS_OBJECT_PATH_INVALID (i.e. ERROR_BAD_PATHNAME, 161) if the redirector name is unknown: >>> try: os.stat('//;Lanman/localhost/C$') ... except OSError as e: print(e.winerror) ... 161 When we misspell the server name as "localhos", we see that the error for an explicit redirector path, as is used in a mapped drive, is ERROR_BAD_NETPATH (53): >>> try: os.stat('//;LanmanRedirector/localhos/C$') ... except OSError as e: print(e.winerror) ... 53 If we omit the explicit redirector name, then MUP tries prefix resolution, and the error is instead ERROR_BAD_NET_NAME (67): >>> try: os.stat('//localhos/C$') ... except OSError as e: print(e.winerror) ... 67 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 12:05:06 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 17 Sep 2019 16:05:06 +0000 Subject: [issue38187] test.test_tools.test_c_analyzer fails in refleak mode In-Reply-To: <1568646466.84.0.78149770012.issue38187@roundup.psfhosted.org> Message-ID: <1568736306.35.0.325533400916.issue38187@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 6fbc924696b4b5097c273c06ca2d82662940e184 by Pablo Galindo in branch 'master': bpo-38187: Fix reference leak in test_tools (GH-16233) https://github.com/python/cpython/commit/6fbc924696b4b5097c273c06ca2d82662940e184 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 12:06:33 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 17 Sep 2019 16:06:33 +0000 Subject: [issue38187] test.test_tools.test_c_analyzer fails in refleak mode In-Reply-To: <1568646466.84.0.78149770012.issue38187@roundup.psfhosted.org> Message-ID: <1568736393.26.0.939747595626.issue38187@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: The original error is still present and ./python -m test test_tools -v -R 3:3 is still failing some times, but when it suceeds there are no leaks being reported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 12:06:44 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 17 Sep 2019 16:06:44 +0000 Subject: [issue38200] Adding itertools.pairwise to the standard library? In-Reply-To: <1568736008.51.0.85414927582.issue38200@roundup.psfhosted.org> Message-ID: <1568736404.32.0.830191155928.issue38200@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +rhettinger type: -> enhancement versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 12:07:00 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 17 Sep 2019 16:07:00 +0000 Subject: [issue38187] test.test_tools.test_c_analyzer fails in refleak mode In-Reply-To: <1568646466.84.0.78149770012.issue38187@roundup.psfhosted.org> Message-ID: <1568736420.53.0.0344155670056.issue38187@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- Removed message: https://bugs.python.org/msg352645 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 12:07:35 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 17 Sep 2019 16:07:35 +0000 Subject: [issue38187] test.test_tools.test_c_analyzer fails in refleak mode In-Reply-To: <1568646466.84.0.78149770012.issue38187@roundup.psfhosted.org> Message-ID: <1568736455.22.0.159426961577.issue38187@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: PR 16233 fixes the reference leaks but the original error is still present and ./python -m test test_tools -v -R 3:3 is still failing (as in the test fails, instead of failing because there are leaks). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 12:09:39 2019 From: report at bugs.python.org (Diego Barriga) Date: Tue, 17 Sep 2019 16:09:39 +0000 Subject: [issue38179] Test subprocess fails on Fedora 30: test_group and test_extra_groups In-Reply-To: <1568583454.85.0.891057048801.issue38179@roundup.psfhosted.org> Message-ID: <1568736579.73.0.0754710381853.issue38179@roundup.psfhosted.org> Diego Barriga added the comment: That's right. The test result was success on latest master. Should i close this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 12:15:15 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 17 Sep 2019 16:15:15 +0000 Subject: [issue27071] unittest.TestCase.assertCountEqual is a very misleading name In-Reply-To: <1463788380.52.0.782790370377.issue27071@psf.upfronthosting.co.za> Message-ID: <1568736915.52.0.872849324585.issue27071@roundup.psfhosted.org> Terry J. Reedy added the comment: In msg266115, Robert Collins suggested "add a different name and deprecate assertCountEqual". In msg266184, Gregory Smith said "not against adding a new name if it makes glorious sense, but we should not remove the old names from unittest as that causes unnecessary pain (based on past experience)." Others suggested status quo. In msg352556, Michael Ford said "I like assertPermutation", but did not reopen the issue. Coming at this fresh, via the PR that patches idlelib, my first thought was that assertCountEqual meant assertEqual(len(a), len(b)). So the issue seems real. assertPermutation is much better to me and I would like it added. In unittest/case.py, PR 16228 renames assertCountEqual to assertPermutation and adds assertCountEqual as an alias, with no plan for deprecation and removal, as eventually done with other duplicates. However, the PR also immediately renames all instances of assertCountEqual in the stdlib. Perhaps 1/4 of these are in idlelib tests. Much as I prefer the new name, this is unacceptible as it immediately makes backporting test changes in these areas (and I plan to make some) a manual process. So I don't want IDLE tests renamed until 3.8 is off maintenance and the name change can be made in all maintenance versions at once. I leave it to the rest of you to decide on the rest of the stdlib. ---------- nosy: +terry.reedy versions: +Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 12:26:00 2019 From: report at bugs.python.org (Serkan) Date: Tue, 17 Sep 2019 16:26:00 +0000 Subject: [issue38201] Anotation problem at flask_httpauth package Message-ID: <1568737560.92.0.707944179779.issue38201@roundup.psfhosted.org> New submission from Serkan : if I use @auth.login_required anotation before @app.route, it is not working. It must be used after @app.route anotation. (flask_httpauth ) Sample:# from flask_httpauth import HTTPBasicAuth auth = HTTPBasicAuth() @auth.login_required @app.route('/api/v1.0/Scoring', methods=['POST']) def Scoring(): ---------- components: Extension Modules messages: 352649 nosy: Serkan Gecici priority: normal severity: normal status: open title: Anotation problem at flask_httpauth package versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 12:32:08 2019 From: report at bugs.python.org (Batuhan) Date: Tue, 17 Sep 2019 16:32:08 +0000 Subject: [issue38201] Anotation problem at flask_httpauth package In-Reply-To: <1568737560.92.0.707944179779.issue38201@roundup.psfhosted.org> Message-ID: <1568737928.86.0.767970931122.issue38201@roundup.psfhosted.org> Batuhan added the comment: I dont think this is a bug for cpython project. Extension modules category has a different meaning. ---------- nosy: +BTaskaya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 12:37:28 2019 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 17 Sep 2019 16:37:28 +0000 Subject: [issue36876] Global C variables are a problem. In-Reply-To: <1557514902.13.0.853517754348.issue36876@roundup.psfhosted.org> Message-ID: <1568738248.31.0.38463840018.issue36876@roundup.psfhosted.org> Change by Vinay Sajip : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 12:37:57 2019 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 17 Sep 2019 16:37:57 +0000 Subject: [issue38201] Anotation problem at flask_httpauth package In-Reply-To: <1568737560.92.0.707944179779.issue38201@roundup.psfhosted.org> Message-ID: <1568738277.33.0.0382078421376.issue38201@roundup.psfhosted.org> Ezio Melotti added the comment: Please read the documentation for login_required at https://flask-login.readthedocs.io/en/latest/#flask_login.login_required and if you still think you have found a bug report it to the Flask bug tracker. ---------- nosy: +ezio.melotti resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 12:55:23 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 17 Sep 2019 16:55:23 +0000 Subject: [issue38179] Test subprocess fails on Fedora 30: test_group and test_extra_groups In-Reply-To: <1568583454.85.0.891057048801.issue38179@roundup.psfhosted.org> Message-ID: <1568739323.76.0.233104031834.issue38179@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks for the confirmation. I am closing this as per issue36046. ---------- resolution: -> fixed stage: -> resolved status: open -> closed superseder: -> support dropping privileges when running subprocesses _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 12:58:01 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 16:58:01 +0000 Subject: [issue37904] Suggested edit to Python Tutorial - Section 4 In-Reply-To: <1566386922.03.0.919785821856.issue37904@roundup.psfhosted.org> Message-ID: <1568739481.57.0.101688375922.issue37904@roundup.psfhosted.org> miss-islington added the comment: New changeset b57481318e3e3cbacd398b898f9849ec8f2d7eec by Miss Islington (bot) (Diego Alberto Barriga Mart?nez) in branch 'master': bpo-37904: Edition on python tutorial - section 4 (GH-16169) https://github.com/python/cpython/commit/b57481318e3e3cbacd398b898f9849ec8f2d7eec ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 12:58:12 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 16:58:12 +0000 Subject: [issue37904] Suggested edit to Python Tutorial - Section 4 In-Reply-To: <1566386922.03.0.919785821856.issue37904@roundup.psfhosted.org> Message-ID: <1568739492.07.0.522687493336.issue37904@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15831 pull_request: https://github.com/python/cpython/pull/16234 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 12:58:18 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 16:58:18 +0000 Subject: [issue37904] Suggested edit to Python Tutorial - Section 4 In-Reply-To: <1566386922.03.0.919785821856.issue37904@roundup.psfhosted.org> Message-ID: <1568739498.44.0.23888088298.issue37904@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15832 pull_request: https://github.com/python/cpython/pull/16235 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 12:58:25 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 16:58:25 +0000 Subject: [issue37904] Suggested edit to Python Tutorial - Section 4 In-Reply-To: <1566386922.03.0.919785821856.issue37904@roundup.psfhosted.org> Message-ID: <1568739505.08.0.968432330089.issue37904@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15833 pull_request: https://github.com/python/cpython/pull/16236 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 14:21:07 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 17 Sep 2019 18:21:07 +0000 Subject: [issue37449] Move ensurepip off of pkgutil and to importlib.resources In-Reply-To: <1561860772.49.0.185483718697.issue37449@roundup.psfhosted.org> Message-ID: <1568744467.73.0.293092514015.issue37449@roundup.psfhosted.org> Change by Brett Cannon : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 14:22:04 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Sep 2019 18:22:04 +0000 Subject: [issue38191] typing.NamedTuple() should prefix parameters with '_' In-Reply-To: <1568663995.81.0.542051193907.issue38191@roundup.psfhosted.org> Message-ID: <1568744524.57.0.887312552973.issue38191@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 2bf31ccab3d17f3f35b42dca97f99576dfe2fc7d by Serhiy Storchaka in branch 'master': bpo-38191: Accept arbitrary keyword names in NamedTuple() and TypedDict(). (GH-16222) https://github.com/python/cpython/commit/2bf31ccab3d17f3f35b42dca97f99576dfe2fc7d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 14:22:13 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 18:22:13 +0000 Subject: [issue38191] typing.NamedTuple() should prefix parameters with '_' In-Reply-To: <1568663995.81.0.542051193907.issue38191@roundup.psfhosted.org> Message-ID: <1568744533.13.0.423087450665.issue38191@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15834 pull_request: https://github.com/python/cpython/pull/16237 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 14:33:28 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Sep 2019 18:33:28 +0000 Subject: [issue38191] typing.NamedTuple() should prefix parameters with '_' In-Reply-To: <1568663995.81.0.542051193907.issue38191@roundup.psfhosted.org> Message-ID: <1568745208.7.0.228723217703.issue38191@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +15835 pull_request: https://github.com/python/cpython/pull/16238 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 14:41:58 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 17 Sep 2019 18:41:58 +0000 Subject: [issue38191] typing.NamedTuple() should prefix parameters with '_' In-Reply-To: <1568663995.81.0.542051193907.issue38191@roundup.psfhosted.org> Message-ID: <1568745718.83.0.535107232308.issue38191@roundup.psfhosted.org> miss-islington added the comment: New changeset 54ba5f19d4a654768c785468d736ed0bd05947f5 by Miss Islington (bot) in branch '3.8': bpo-38191: Accept arbitrary keyword names in NamedTuple() and TypedDict(). (GH-16222) https://github.com/python/cpython/commit/54ba5f19d4a654768c785468d736ed0bd05947f5 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 14:42:23 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Sep 2019 18:42:23 +0000 Subject: [issue38191] typing.NamedTuple() should prefix parameters with '_' In-Reply-To: <1568663995.81.0.542051193907.issue38191@roundup.psfhosted.org> Message-ID: <1568745743.99.0.875501769416.issue38191@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +15836 pull_request: https://github.com/python/cpython/pull/16239 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 14:51:36 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Sep 2019 18:51:36 +0000 Subject: [issue38191] typing.NamedTuple() should prefix parameters with '_' In-Reply-To: <1568663995.81.0.542051193907.issue38191@roundup.psfhosted.org> Message-ID: <1568746296.13.0.888137441235.issue38191@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +15837 pull_request: https://github.com/python/cpython/pull/16240 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 14:53:53 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Sep 2019 18:53:53 +0000 Subject: [issue38191] typing.NamedTuple() should prefix parameters with '_' In-Reply-To: <1568663995.81.0.542051193907.issue38191@roundup.psfhosted.org> Message-ID: <1568746433.9.0.410560677215.issue38191@roundup.psfhosted.org> Serhiy Storchaka added the comment: Oh, when backported to 3.7 I have found that TypedDict is new in 3.8. So I think it is better to get rid of deprecations in TypedDict(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 15:09:15 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Sep 2019 19:09:15 +0000 Subject: [issue38191] typing.NamedTuple() should prefix parameters with '_' In-Reply-To: <1568663995.81.0.542051193907.issue38191@roundup.psfhosted.org> Message-ID: <1568747355.66.0.612741521553.issue38191@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 69b3718b183a698202bd67488639bffd64a488bc by Serhiy Storchaka in branch '3.7': [3.7] bpo-38191: Accept arbitrary keyword names in NamedTuple(). (GH-16222) (GH-16239) https://github.com/python/cpython/commit/69b3718b183a698202bd67488639bffd64a488bc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 15:27:01 2019 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 17 Sep 2019 19:27:01 +0000 Subject: [issue38202] A fatal error in test_dictviews Message-ID: <1568748421.29.0.795591630213.issue38202@roundup.psfhosted.org> New submission from Zackery Spytz : When running test_dictviews, I sometimes encounter a fatal error. ./python -m test test_dictviews Run tests sequentially 0:00:00 load avg: 0.36 [1/1] test_dictviews python: Objects/typeobject.c:3125: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed. Fatal Python error: Aborted Current thread 0x00007fd5506de140 (most recent call first): File "/home/lubuntu2/cpython/Lib/test/test_dictviews.py", line 166 in test_items_set_operations File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 617 in _callTestMethod File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 663 in run File "/home/lubuntu2/cpython/Lib/unittest/case.py", line 725 in __call__ File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 122 in run File "/home/lubuntu2/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/home/lubuntu2/cpython/Lib/test/support/testresult.py", line 162 in run File "/home/lubuntu2/cpython/Lib/test/support/__init__.py", line 1996 in _run_suite File "/home/lubuntu2/cpython/Lib/test/support/__init__.py", line 2092 in run_unittest File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 209 in _test_module File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 234 in _runtest_inner2 File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 270 in _runtest_inner File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 153 in _runtest File "/home/lubuntu2/cpython/Lib/test/libregrtest/runtest.py", line 193 in runtest File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 409 in run_tests_sequential File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 507 in run_tests File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 674 in _main File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 628 in main File "/home/lubuntu2/cpython/Lib/test/libregrtest/main.py", line 695 in main File "/home/lubuntu2/cpython/Lib/test/__main__.py", line 2 in File "/home/lubuntu2/cpython/Lib/runpy.py", line 85 in _run_code File "/home/lubuntu2/cpython/Lib/runpy.py", line 192 in _run_module_as_main Aborted (core dumped) It seems that this is because the PyObject_GetIter() call in _PyDictView_Intersect() is not checked for failure. ---------- components: Interpreter Core messages: 352658 nosy: ZackerySpytz, rhettinger priority: normal severity: normal status: open title: A fatal error in test_dictviews type: crash versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 15:29:33 2019 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 17 Sep 2019 19:29:33 +0000 Subject: [issue38202] A fatal error in test_dictviews In-Reply-To: <1568748421.29.0.795591630213.issue38202@roundup.psfhosted.org> Message-ID: <1568748573.39.0.111106973022.issue38202@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +15838 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16241 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 15:41:59 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Sep 2019 19:41:59 +0000 Subject: [issue38191] typing.NamedTuple() should prefix parameters with '_' In-Reply-To: <1568663995.81.0.542051193907.issue38191@roundup.psfhosted.org> Message-ID: <1568749319.19.0.209416266239.issue38191@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 8fc5839a9def34c13b6025c291434ba5fb5d6442 by Serhiy Storchaka in branch 'master': bpo-38191: Turn warnings into errors in NamedTuple() and TypedDict(). (GH-16238) https://github.com/python/cpython/commit/8fc5839a9def34c13b6025c291434ba5fb5d6442 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 15:53:47 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 17 Sep 2019 19:53:47 +0000 Subject: [issue38200] Adding itertools.pairwise to the standard library? In-Reply-To: <1568736008.51.0.85414927582.issue38200@roundup.psfhosted.org> Message-ID: <1568750027.83.0.497744398029.issue38200@roundup.psfhosted.org> Raymond Hettinger added the comment: Can you show some examples of what you used it for? ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 15:59:32 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 17 Sep 2019 19:59:32 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1568750372.3.0.506724805546.issue13153@roundup.psfhosted.org> Terry J. Reedy added the comment: Another report today on idle-dev that pasting emoji exits IDLE. Serhiy, I applied the _tkinter part of your...args_2.patch to a branch of current master -- see serhiy_tkinter.patch. (Could push branch if helpful.). After recompiling _tkinter.c, pasting ? still gives same error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 16:46:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 20:46:01 +0000 Subject: =?utf-8?q?=5Bissue30367=5D_Cannot_build_CPython3=2E6_with_module_?= =?utf-8?q?=E2=80=9Ctestcapimodule=E2=80=9D_statically?= In-Reply-To: <1494816939.58.0.996227470169.issue30367@psf.upfronthosting.co.za> Message-ID: <1568753161.22.0.434198935219.issue30367@roundup.psfhosted.org> STINNER Victor added the comment: It seems like this issue has been fixed in 3.8 and master branches (I didn't test Python 3.7): see below. I close the issue. Reopen/comment the issue if you consider that Python 3.7 should be fixed as well. I made this change: $ git diff diff --git a/Modules/Setup b/Modules/Setup index 983fa014ec..ff2fd14857 100644 --- a/Modules/Setup +++ b/Modules/Setup @@ -151,6 +151,10 @@ _symtable symtablemodule.c # modules are to be built as shared libraries (see above for more # detail; also note that *static* or *disabled* cancels this effect): +*static* + +_datetime _datetimemodule.c # datetime accelerator + #*shared* # GNU readline. Unlike previous Python incarnations, GNU readline is @@ -177,7 +181,6 @@ _symtable symtablemodule.c #_random _randommodule.c # Random number generator #_elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _elementtree.c # elementtree accelerator #_pickle _pickle.c # pickle accelerator -#_datetime _datetimemodule.c # datetime accelerator #_bisect _bisectmodule.c # Bisection algorithms #_heapq _heapqmodule.c # Heap queue algorithm #_asyncio _asynciomodule.c # Fast asyncio Future I built Python: it works as expected, _datetime is a built-in module: $ ./python Python 3.9.0a0 (heads/master-dirty:46b0b81220, Sep 17 2019, 22:42:19) [GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import _datetime >>> _datetime Note: $ make ... The following modules found by detect_modules() in setup.py, have been built by the Makefile instead, as configured by the Setup files: _abc _datetime atexit pwd time ... ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 16:58:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 20:58:38 +0000 Subject: [issue38203] regrtest fails to stop test_multiprocessing_spawn worker process Message-ID: <1568753918.39.0.636404406219.issue38203@roundup.psfhosted.org> New submission from STINNER Victor : I ran tests locally on my laptop. Tests were running for 2 minutes. I interrupted the process by pressing CTRL+c: regrtest failed to stop immediately the worker . Then, regrtest main process hangs in threading._shutdown(). I had to press again CTRL+c to unblock it :-( This bug may be related to bpo-37531 "Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS". See also bpo-38190 "regrtest: test suite completes but Tests Result is not displayed and the process hangs" which might be related? vstinner at apu$ make && ./python -m test -j0 -r ... 0:02:03 load avg: 8.15 [240/419] test_dynamicclassattribute passed -- running: test_multiprocessing_spawn (1 min 17 sec), test_multiprocessing_forkserver (1 min 17 sec), test_gdb (1 min 32 sec), test_multiprocessing_fork (50 sec 894 ms) 0:02:03 load avg: 8.15 [241/419] test_importlib passed -- running: test_multiprocessing_spawn (1 min 17 sec), test_multiprocessing_forkserver (1 min 17 sec), test_gdb (1 min 32 sec), test_multiprocessing_fork (50 sec 998 ms) 0:02:04 load avg: 8.15 [242/419] test_ensurepip passed -- running: test_multiprocessing_spawn (1 min 18 sec), test_multiprocessing_forkserver (1 min 18 sec), test_gdb (1 min 33 sec), test_multiprocessing_fork (51 sec 937 ms) ^C Kill worker process 6290 running for 2.7 sec Kill worker process 6290 running for 2.7 sec Kill worker process 28037 running for 78.3 sec Kill worker process 6538 running for 1.2 sec Kill worker process 6538 running for 1.2 sec Kill worker process 5567 running for 4.6 sec Kill worker process 5567 running for 4.6 sec Kill worker process 28020 running for 79.0 sec Kill worker process 3314 running for 22.5 sec Kill worker process 3314 running for 22.5 sec Kill worker process 28020 running for 79.0 sec Kill worker process 6533 running for 1.4 sec Kill worker process 6533 running for 1.4 sec Kill worker process 27563 running for 93.8 sec Kill worker process 27563 running for 93.8 sec Kill worker process 31118 running for 52.1 sec Kill worker process 31118 running for 52.2 sec Wait for regrtest worker for 1.1 sec Wait for regrtest worker for 2.1 sec Wait for regrtest worker for 3.1 sec Wait for regrtest worker for 4.1 sec Wait for regrtest worker for 5.1 sec Wait for regrtest worker for 6.1 sec Wait for regrtest worker for 7.1 sec Wait for regrtest worker for 8.1 sec Wait for regrtest worker for 9.1 sec Wait for regrtest worker for 10.1 sec Wait for regrtest worker for 11.1 sec Wait for regrtest worker for 12.1 sec Wait for regrtest worker for 13.1 sec Wait for regrtest worker for 14.1 sec Wait for regrtest worker for 15.1 sec Wait for regrtest worker for 16.1 sec Wait for regrtest worker for 17.1 sec Wait for regrtest worker for 18.1 sec Wait for regrtest worker for 19.1 sec Wait for regrtest worker for 20.1 sec Wait for regrtest worker for 21.1 sec Wait for regrtest worker for 22.1 sec Wait for regrtest worker for 23.1 sec Wait for regrtest worker for 24.1 sec Wait for regrtest worker for 25.1 sec Wait for regrtest worker for 26.1 sec Wait for regrtest worker for 27.1 sec Wait for regrtest worker for 28.1 sec Wait for regrtest worker for 29.1 sec Wait for regrtest worker for 30.1 sec Warning -- failed to join a regrtest worker == Tests result: INTERRUPTED == Test suite interrupted by signal SIGINT. 177 tests omitted: test__osx_support test_abstract_numbers test_aifc test_asyncgen test_atexit test_audit test_base64 test_binascii test_bisect test_buffer test_bz2 test_c_locale_coercion test_calendar test_call test_charmapcodec test_clinic test_cmd_line test_cmd_line_script test_code test_codecencodings_hk test_codecencodings_iso2022 test_codecencodings_jp test_codecencodings_kr test_codecmaps_tw test_codecs test_compile test_complex test_concurrent_futures test_configparser test_contains test_contextlib test_contextlib_async test_copy test_copyreg test_coroutines test_crashers test_csv test_ctypes test_curses test_decorators test_deque test_dictviews test_dis test_doctest test_dtrace test_dynamic test_email test_embed test_exception_variations test_exceptions test_faulthandler test_file test_finalization test_flufl test_fork1 test_format test_future3 test_future5 test_gdb test_genericclass test_genericpath test_grp test_heapq test_htmlparser test_httplib test_imghdr test_imp test_int test_io test_ioctl test_ipaddress test_isinstance test_itertools test_json test_keyword test_largefile test_lib2to3 test_linecache test_lltrace test_logging test_mailcap test_marshal test_math test_memoryio test_multibytecodec test_multiprocessing_fork test_multiprocessing_forkserver test_multiprocessing_main_handling test_multiprocessing_spawn test_named_expressions test_netrc test_numeric_tower test_openpty test_operator test_ordered_dict test_os test_ossaudiodev test_parser test_pathlib test_pdb test_peepholer test_pickle test_pkg test_plistlib test_popen test_poplib test_posixpath test_pow test_print test_profile test_property test_pstats test_pyclbr test_pydoc test_random test_range test_readline test_regrtest test_repl test_richcmp test_robotparser test_sax test_sched test_scope test_script_helper test_setcomps test_shelve test_shlex test_site test_smtpd test_smtplib test_sndhdr test_socketserver test_source_encoding test_spwd test_sqlite test_ssl test_statistics test_string_literals test_strptime test_struct test_structmembers test_subprocess test_super test_symtable test_syntax test_tabnanny test_telnetlib test_tempfile test_threadedtempfile test_threading_local test_timeit test_tokenize test_trace test_traceback test_tracemalloc test_typechecks test_unicode_file test_unicode_file_functions test_unicode_identifiers test_unpack_ex test_urllib test_urllib_response test_userlist test_userstring test_utf8source test_venv test_wait4 test_warnings test_webbrowser test_xml_etree test_yield_from test_zipapp test_zipfile test_zipfile64 test_zipimport_support test_zlib 226 tests OK. 16 tests skipped: test_devpoll test_kqueue test_msilib test_nis test_smtpnet test_startfile test_timeout test_tix test_tk test_ttk_guionly test_urllib2net test_urllibnet test_winconsoleio test_winreg test_winsound test_xmlrpc_net Total duration: 2 min 34 sec Tests result: INTERRUPTED ^CWarning -- Unraisable exception Exception ignored in: Traceback (most recent call last): File "/home/vstinner/python/master/Lib/threading.py", line 1390, in _shutdown lock.acquire() KeyboardInterrupt: ---------- components: Tests messages: 352663 nosy: vstinner priority: normal severity: normal status: open title: regrtest fails to stop test_multiprocessing_spawn worker process versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 17:02:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 21:02:52 +0000 Subject: [issue38203] regrtest fails to stop test_multiprocessing_spawn worker process In-Reply-To: <1568753918.39.0.636404406219.issue38203@roundup.psfhosted.org> Message-ID: <1568754172.9.0.555591955752.issue38203@roundup.psfhosted.org> STINNER Victor added the comment: Moreover, even after I stopped regrtest, two processes are still running in the background :-( 6535 pts/2 Sl 0:00 /home/vstinner/python/master/python -c from multiprocessing.spawn import spawn_main; spawn_main(tracker_fd=4, pipe_handle=9) --multiprocessing-fork 6560 pts/2 Sl 0:00 /home/vstinner/python/master/python -c from multiprocessing.spawn import spawn_main; spawn_main(tracker_fd=4, pipe_handle=11) --multiprocessing-fork ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 17:03:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 21:03:18 +0000 Subject: [issue38070] visit_decref(): add an assertion to check that the object is not freed In-Reply-To: <1568037936.88.0.10373402622.issue38070@roundup.psfhosted.org> Message-ID: <1568754198.83.0.122835714112.issue38070@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15839 pull_request: https://github.com/python/cpython/pull/16243 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 17:10:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 21:10:37 +0000 Subject: [issue38070] visit_decref(): add an assertion to check that the object is not freed In-Reply-To: <1568037936.88.0.10373402622.issue38070@roundup.psfhosted.org> Message-ID: <1568754637.42.0.92698612441.issue38070@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15840 pull_request: https://github.com/python/cpython/pull/16244 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 17:36:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 21:36:19 +0000 Subject: [issue38070] visit_decref(): add an assertion to check that the object is not freed In-Reply-To: <1568037936.88.0.10373402622.issue38070@roundup.psfhosted.org> Message-ID: <1568756179.05.0.752187049815.issue38070@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 8fa3e1740b3f03ea65ddb68411c2238c5f98eec2 by Victor Stinner in branch 'master': bpo-38070: _Py_DumpTraceback() writes (GH-16244) https://github.com/python/cpython/commit/8fa3e1740b3f03ea65ddb68411c2238c5f98eec2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 17:36:31 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 21:36:31 +0000 Subject: [issue38070] visit_decref(): add an assertion to check that the object is not freed In-Reply-To: <1568037936.88.0.10373402622.issue38070@roundup.psfhosted.org> Message-ID: <1568756191.8.0.405891808416.issue38070@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b39afb78768418d9405c4b528c80fa968ccc974d by Victor Stinner in branch 'master': bpo-38070: Enhance _PyObject_Dump() (GH-16243) https://github.com/python/cpython/commit/b39afb78768418d9405c4b528c80fa968ccc974d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 17:36:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 21:36:55 +0000 Subject: [issue38070] visit_decref(): add an assertion to check that the object is not freed In-Reply-To: <1568037936.88.0.10373402622.issue38070@roundup.psfhosted.org> Message-ID: <1568756215.4.0.640928304051.issue38070@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15841 pull_request: https://github.com/python/cpython/pull/16245 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 17:59:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 21:59:55 +0000 Subject: [issue38070] visit_decref(): add an assertion to check that the object is not freed In-Reply-To: <1568037936.88.0.10373402622.issue38070@roundup.psfhosted.org> Message-ID: <1568757595.23.0.619057263496.issue38070@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d3b904144e86e2442961de6a7dccecbe133d5c6d by Victor Stinner in branch 'master': bpo-38070: Add _PyRuntimeState.preinitializing (GH-16245) https://github.com/python/cpython/commit/d3b904144e86e2442961de6a7dccecbe133d5c6d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 18:01:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 22:01:20 +0000 Subject: [issue38070] visit_decref(): add an assertion to check that the object is not freed In-Reply-To: <1568037936.88.0.10373402622.issue38070@roundup.psfhosted.org> Message-ID: <1568757680.98.0.856089727849.issue38070@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15842 pull_request: https://github.com/python/cpython/pull/16246 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 18:05:08 2019 From: report at bugs.python.org (Thomas Knox) Date: Tue, 17 Sep 2019 22:05:08 +0000 Subject: [issue38204] Cannot compile on RPi with optimizations Message-ID: <1568757908.38.0.366967403928.issue38204@roundup.psfhosted.org> New submission from Thomas Knox : Trying to compile 3.8.0b4 on an raspberry pi 3B+ and 4 running: pi at pi4b:~/Downloads/Python-3.8.0b4 $ uname -a Linux pi4b 4.19.66-v7l+ #1253 SMP Thu Aug 15 12:02:08 BST 2019 armv7l GNU/Linux Using arguments: ./configure --disable-shared --enable-optimizations --enable-loadable-sqlite-extensions --enable-ipv6 --enable-big-digits --with-lto --with-doc-strings --with-ensurepip --with-openssl=/usr fails compilation at the linking stage with the errors: /usr/bin/ld: /usr/bin/ld: DWARF error: offset (7602768) greater than or equal to .debug_str size (517480) /usr/bin/ld: DWARF error: offset (2013417729) greater than or equal to .debug_str size (517480) /usr/bin/ld: DWARF error: offset (1375799296) greater than or equal to .debug_str size (517480) /usr/bin/ld: DWARF error: offset (3959620946) greater than or equal to .debug_str size (517480) /usr/bin/ld: DWARF error: offset (150994953) greater than or equal to .debug_str size (517480) /usr/bin/ld: DWARF error: offset (622700) greater than or equal to .debug_str size (517480) /usr/bin/ld: DWARF error: offset (990813185) greater than or equal to .debug_str size (517480) /usr/bin/ld: DWARF error: could not find abbrev number 9630 /tmp/ccX29Gpf.lto.o: in function `copy_base': :(.text+0x8374): undefined reference to `__gcov_one_value_profiler_atomic' /usr/bin/ld: :(.text+0x8388): undefined reference to `__gcov_average_profiler_atomic' /usr/bin/ld: :(.text+0x8398): undefined reference to `__gcov_ior_profiler_atomic' /usr/bin/ld: :(.text+0x840c): undefined reference to `__gcov_one_value_profiler_atomic' /usr/bin/ld: :(.text+0x8420): undefined reference to `__gcov_average_profiler_atomic' /usr/bin/ld: :(.text+0x8430): undefined reference to `__gcov_ior_profiler_atomic' /usr/bin/ld: :(.text+0x84c8): undefined reference to `__gcov_one_value_profiler_atomic' /usr/bin/ld: :(.text+0x84dc): undefined reference to `__gcov_average_profiler_atomic' /usr/bin/ld: :(.text+0x84ec): undefined reference to `__gcov_ior_profiler_atomic' /usr/bin/ld: :(.text+0x856c): undefined reference to `__gcov_one_value_profiler_atomic' /usr/bin/ld: :(.text+0x8580): undefined reference to `__gcov_average_profiler_atomic' /usr/bin/ld: :(.text+0x8590): undefined reference to `__gcov_ior_profiler_atomic' /usr/bin/ld: :(.text+0x866c): undefined reference to `__gcov_one_value_profiler_atomic' /usr/bin/ld: :(.text+0x867c): undefined reference to `__gcov_average_profiler_atomic' /usr/bin/ld: :(.text+0x868c): undefined reference to `__gcov_ior_profiler_atomic' /usr/bin/ld: :(.text+0x8718): undefined reference to `__gcov_one_value_profiler_atomic' /usr/bin/ld: :(.text+0x8728): undefined reference to `__gcov_average_profiler_atomic' /usr/bin/ld: :(.text+0x8738): undefined reference to `__gcov_ior_profiler_atomic' /usr/bin/ld: :(.text+0x87b0): undefined reference to `__gcov_one_value_profiler_atomic' /usr/bin/ld: :(.text+0x87c8): undefined reference to `__gcov_average_profiler_atomic' /usr/bin/ld: :(.text+0x87d8): undefined reference to `__gcov_ior_profiler_atomic' ... For hundreds of lines. Removing the --enable-optimizations flag allows it compile and link. ---------- components: Build messages: 352668 nosy: DNSGeek priority: normal severity: normal status: open title: Cannot compile on RPi with optimizations type: compile error versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 18:12:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 22:12:35 +0000 Subject: [issue38205] Python no longer compiles without small integer singletons Message-ID: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> New submission from STINNER Victor : With the following change, Python no longer compiles. I'm sure that it compiled successfully 2 weeks ago. diff --git a/Objects/longobject.c b/Objects/longobject.c index 4cf2b0726e..0ad2609882 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -16,10 +16,10 @@ class int "PyObject *" "&PyLong_Type" /*[clinic end generated code: output=da39a3ee5e6b4b0d input=ec0275e3422a36e3]*/ #ifndef NSMALLPOSINTS -#define NSMALLPOSINTS 257 +#define NSMALLPOSINTS 0 #endif #ifndef NSMALLNEGINTS -#define NSMALLNEGINTS 5 +#define NSMALLNEGINTS 0 #endif _Py_IDENTIFIER(little); Main GCC error: Objects/longobject.c: In function '_PyLong_Copy': ./Include/pymacro.h:119:26: error: expected expression before 'do' 119 | #define Py_UNREACHABLE() do { \ | ^~ Objects/longobject.c:83:30: note: in expansion of macro 'Py_UNREACHABLE' 83 | #define get_small_int(ival) (Py_UNREACHABLE(), NULL) | ^~~~~~~~~~~~~~ It seems to be a regression introduced by: commit 6b519985d23bd0f0bd072b5d5d5f2c60a81a19f2 Author: animalize Date: Fri Sep 6 14:00:56 2019 +0800 replace inline function `is_small_int` with a macro version (GH-15710) ---------- components: Interpreter Core messages: 352669 nosy: vstinner priority: normal severity: normal status: open title: Python no longer compiles without small integer singletons type: compile error versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 18:26:14 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 22:26:14 +0000 Subject: [issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT) In-Reply-To: <1565471250.77.0.491506074373.issue37812@roundup.psfhosted.org> Message-ID: <1568759174.49.0.0149132438608.issue37812@roundup.psfhosted.org> STINNER Victor added the comment: Sadly, GH-15710 was merged without mentioning the bpo-37812 (this issue) in the final commit message :-( commit 6b519985d23bd0f0bd072b5d5d5f2c60a81a19f2 Author: animalize Date: Fri Sep 6 14:00:56 2019 +0800 replace inline function `is_small_int` with a macro version (GH-15710) This second change introduced a regression: bpo-38205 "Python no longer compiles without small integer singletons". I don't understand the whole issue. A first change converted a macro to a static inline function. The second change converted the static inline fnuction to a macro... but the overall change introduced a regression. Why not reverting the first change instead of pushing a new change? Morever, if using a static inline function is causing issues, it would be nice to add a comment to explain why, so the issue will be avoided in the future. ---------- nosy: +vstinner resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 19:01:48 2019 From: report at bugs.python.org (Ammar Askar) Date: Tue, 17 Sep 2019 23:01:48 +0000 Subject: [issue38204] Cannot compile on RPi with optimizations In-Reply-To: <1568757908.38.0.366967403928.issue38204@roundup.psfhosted.org> Message-ID: <1568761308.1.0.165445641058.issue38204@roundup.psfhosted.org> Ammar Askar added the comment: Could you provide the output of gcc --version and ld --version ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 19:27:39 2019 From: report at bugs.python.org (Ammar Askar) Date: Tue, 17 Sep 2019 23:27:39 +0000 Subject: [issue38206] Clarify that tp_dealloc must decref for heap allocated type Message-ID: <1568762859.98.0.230733966822.issue38206@roundup.psfhosted.org> New submission from Ammar Askar : When dealing with a heap allocated type (https://docs.python.org/3/c-api/typeobj.html#Py_TPFLAGS_HEAPTYPE / PyType_FromSpec), if the type has a custom tp_dealloc function then it MUST decrement the references to the type object itself due to this code block: https://github.com/python/cpython/blob/4a12a178f4a6b9a59d97fecc727f2b6b28dfc85f/Objects/typeobject.c#L1189-L1192 The only mention of this is within the whatsnew entry for 3.8: https://github.com/python/cpython/commit/364f0b0f19cc3f0d5e63f571ec9163cf41c62958#diff-77c703d9a958f6a4b0dc2f692b3fd5b3 This error was made in https://github.com/python/cpython/pull/16127#pullrequestreview-288312751 and https://github.com/python/cpython/pull/16071#pullrequestreview-287819525 It seems like a common pitfall, let's add a note about this in the doc. ---------- assignee: docs at python components: Documentation messages: 352672 nosy: ammar2, docs at python priority: normal severity: normal status: open title: Clarify that tp_dealloc must decref for heap allocated type type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 19:30:48 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 23:30:48 +0000 Subject: [issue38207] subprocess: On Windows, Popen.kill() + Popen.communicate() is blocking until all processes using the pipe close the pipe Message-ID: <1568763048.2.0.765446302919.issue38207@roundup.psfhosted.org> New submission from STINNER Victor : On Windows, the communicate() method of subprocess.Popen is implemented with threads calling: def _readerthread(self, fh, buffer): buffer.append(fh.read()) fh.close() where fh is one the Popen pipes: popen.stdout or popen.stderr. For stdout=PIPE and/or stderr=PIPE, Popen._get_handles() creates a pipe with _winapi.CreatePipe(None, 0). The fh.read() calls only completes when the write end of the pipe is closed: when all open handles of the write end of the pipe are closed. When using Popen(stdout=PIPE), Python uses the pipe as stdout: startupinfo.dwFlags |= _winapi.STARTF_USESTDHANDLES startupinfo.hStdInput = p2cread startupinfo.hStdOutput = c2pwrite startupinfo.hStdError = errwrite So far so good, it works well when Python spawns a single process. -- Problems arise when the child process itself spawns new processes. In that case, the stdout pipe is inherited by other processes. Popen.communicate() will block until all processes close the pipe. This behavior is surprising for the following pattern: ------------------ try: stdout, stderr = popen.communicate(timeout=5.0) except subprocess.TimeoutExpired: popen.kill() stdout, stderr = popen.communicate() ------------------ I would expect that the second communicate() call completes immediately since we just killed the process: Windows knows that child process is dead, Python knows that Popen object has been kill, but fh.read() continues to block (until all processes closed the pipe). I would expect communicate() to complete immediately. The problem is that fh.read() only returns once all data is returned at once. If fh.read() call is cancelled somehow, communicate() would just return empty data: we loose all data. -- Eryk Sun proposed two solutions: https://bugs.python.org/issue37531#msg350246 "For Windows, subprocess could have a _read_all(file) method that special cases a pipe. The read loop for a pipe would check whether the child has exited. Then call _winapi.PeekNamedPipe on the handle (from get_osfhandle), and do a raw read of the available bytes. If the child has exited or PeekNamedPipe fails (EPIPE), then break, join the partial reads, decode and translate newlines if it's text mode, and return." and: https://bugs.python.org/issue37531#msg350329 "Alternatively, instead of special casing the file type and spinning on PeekNamedPipe, the workaround could be based on a multiple-object wait that includes the child process handle. In this case, communicate() would always call _communicate in Windows, regardless of the timeout or number of pipes -- because simplistically calling either self.stdout.read() or self.stderr.read() could hang. The implementation would be moderately complicated. If we stop waiting on the reader threads because the process exited, we can give the threads a short time to finish reading and close the files -- maybe 250 ms is enough. But if they haven't exited at this time, we can't simply raise a TimeoutExpired exception if the call hasn't actually timed out. To finish the _communicate call, we would have to cancel the pending reads and join() the threads. We can force a reader thread to exit by canceling the read via WINAPI CancelIoEx. However, _readerthread has to be modified to support this. It could be implemented as a loop that calls _winapi.ReadFile to read the output in chunks that get appended to the buffer list. The read loop would break for either ERROR_BROKEN_PIPE or ERROR_OPERATION_ABORTED (canceled). The final step in _communicate would be to concatenate the partial reads. If it's text mode, it would also have to decode the bytes and translate newlines. The POSIX implementation of _communicate has to do this, so we already have a _translate_newlines method for this case. Note that _winapi.WaitForMultipleObjects is interruptible in the main thread via Ctrl+C, which is a bonus improvement since Thread.join() can't be interrupted in Windows." -- This issue has been discussed in bpo-37531 about regrtest: https://bugs.python.org/issue37531#msg350181 It impacts the Python test suite when a test uses multiprocessing (for example) which spawns new processes. ---------- components: Library (Lib) messages: 352673 nosy: vstinner priority: normal severity: normal status: open title: subprocess: On Windows, Popen.kill() + Popen.communicate() is blocking until all processes using the pipe close the pipe versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 19:31:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 23:31:22 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568763082.7.0.91523433159.issue37531@roundup.psfhosted.org> STINNER Victor added the comment: I created bpo-38207 "subprocess: On Windows, Popen.kill() + Popen.communicate() is blocking until all processes using the pipe close the pipe". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 19:35:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 23:35:04 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568763304.54.0.268769738713.issue37531@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15843 pull_request: https://github.com/python/cpython/pull/16247 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 19:35:36 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 23:35:36 +0000 Subject: [issue38070] visit_decref(): add an assertion to check that the object is not freed In-Reply-To: <1568037936.88.0.10373402622.issue38070@roundup.psfhosted.org> Message-ID: <1568763336.73.0.552827063029.issue38070@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 1ce16fb0977283ae42a9f8917bbca5f44aa69324 by Victor Stinner in branch 'master': bpo-38070: Py_FatalError() logs runtime state (GH-16246) https://github.com/python/cpython/commit/1ce16fb0977283ae42a9f8917bbca5f44aa69324 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 19:36:16 2019 From: report at bugs.python.org (Brett Cannon) Date: Tue, 17 Sep 2019 23:36:16 +0000 Subject: [issue29652] Fix evaluation order of keys/values in dict comprehensions In-Reply-To: <1488052483.04.0.021043093911.issue29652@psf.upfronthosting.co.za> Message-ID: <1568763376.14.0.0971645039392.issue29652@roundup.psfhosted.org> Change by Brett Cannon : ---------- resolution: -> fixed stage: -> resolved status: -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 19:38:47 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 23:38:47 +0000 Subject: [issue38070] visit_decref(): add an assertion to check that the object is not freed In-Reply-To: <1568037936.88.0.10373402622.issue38070@roundup.psfhosted.org> Message-ID: <1568763527.81.0.578604314859.issue38070@roundup.psfhosted.org> STINNER Victor added the comment: msg351473 example with the new assertion and enhanced debug functions: --- Modules/gcmodule.c:379: visit_decref: Assertion "!_PyObject_IsFreed(op)" failed Fatal Python error: _PyObject_AssertFailed Python runtime state: finalizing (tstate=0x1d1c9b0) Current thread 0x00007ff010841740 (most recent call first): Aborted (core dumped) --- * Obviously, "Modules/gcmodule.c:379: visit_decref: Assertion "!_PyObject_IsFreed(op)" failed" is the first most visible enhancement * Add "Python runtime state: finalizing (tstate=0x1d1c9b0)": Python is finalizing (Py_Finalize) * New "" in the traceback * "" became "": add the object address ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 19:40:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 23:40:17 +0000 Subject: [issue37424] subprocess.run timeout does not function if shell=True and capture_output=True In-Reply-To: <1561618790.88.0.611701645761.issue37424@roundup.psfhosted.org> Message-ID: <1568763617.49.0.377115541926.issue37424@roundup.psfhosted.org> STINNER Victor added the comment: > On Windows, the following pattern _can_ hang: (...) I created bpo-38207 "subprocess: On Windows, Popen.kill() + Popen.communicate() is blocking until all processes using the pipe close the pipe" to track this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 19:40:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 23:40:39 +0000 Subject: [issue38207] subprocess: On Windows, Popen.kill() + Popen.communicate() is blocking until all processes using the pipe close the pipe In-Reply-To: <1568763048.2.0.765446302919.issue38207@roundup.psfhosted.org> Message-ID: <1568763639.74.0.016258480357.issue38207@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-37424 was has been fixed: "subprocess.run timeout does not function if shell=True and capture_output=True". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 19:44:04 2019 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 17 Sep 2019 23:44:04 +0000 Subject: [issue38207] subprocess: On Windows, Popen.kill() + Popen.communicate() is blocking until all processes using the pipe close the pipe In-Reply-To: <1568763048.2.0.765446302919.issue38207@roundup.psfhosted.org> Message-ID: <1568763844.8.0.862847080388.issue38207@roundup.psfhosted.org> Change by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 19:58:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 17 Sep 2019 23:58:32 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568764712.51.0.912711243096.issue37531@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b9877cd2cc47b6f3512c171814c4f630286279b9 by Victor Stinner in branch 'master': bpo-37531: Skip test_regrtest.test_multiprocessing_timeout() on Windows (GH-16247) https://github.com/python/cpython/commit/b9877cd2cc47b6f3512c171814c4f630286279b9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 20:03:52 2019 From: report at bugs.python.org (Ma Lin) Date: Wed, 18 Sep 2019 00:03:52 +0000 Subject: [issue38205] Python no longer compiles without small integer singletons In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1568765032.79.0.934073631914.issue38205@roundup.psfhosted.org> Ma Lin added the comment: This commit changed Py_UNREACHABLE() five days ago: https://github.com/python/cpython/commit/3ab61473ba7f3dca32d779ec2766a4faa0657923 If remove this change, it can be compiled successfully. ---------- nosy: +Ma Lin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 20:11:56 2019 From: report at bugs.python.org (Ammar Askar) Date: Wed, 18 Sep 2019 00:11:56 +0000 Subject: [issue38206] Clarify that tp_dealloc must decref for heap allocated type In-Reply-To: <1568762859.98.0.230733966822.issue38206@roundup.psfhosted.org> Message-ID: <1568765516.9.0.577484300865.issue38206@roundup.psfhosted.org> Change by Ammar Askar : ---------- keywords: +patch pull_requests: +15844 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16248 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 20:21:30 2019 From: report at bugs.python.org (Ma Lin) Date: Wed, 18 Sep 2019 00:21:30 +0000 Subject: [issue38205] Python no longer compiles without small integer singletons In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1568766090.07.0.453415576479.issue38205@roundup.psfhosted.org> Ma Lin added the comment: We can change Py_UNREACHABLE() to assert(0) in longobject.c Or remove the article in Py_UNREACHABLE() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 20:24:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Sep 2019 00:24:01 +0000 Subject: [issue38205] Python no longer compiles without small integer singletons In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1568766241.68.0.168090119819.issue38205@roundup.psfhosted.org> STINNER Victor added the comment: See https://bugs.python.org/issue37812#msg352670 and https://bugs.python.org/issue38015 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 20:25:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Sep 2019 00:25:16 +0000 Subject: [issue38203] regrtest fails to stop test_multiprocessing_spawn worker process In-Reply-To: <1568753918.39.0.636404406219.issue38203@roundup.psfhosted.org> Message-ID: <1568766316.04.0.75105564061.issue38203@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +15845 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16249 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 20:41:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Sep 2019 00:41:35 +0000 Subject: [issue38203] regrtest fails to stop test_multiprocessing_spawn worker process In-Reply-To: <1568753918.39.0.636404406219.issue38203@roundup.psfhosted.org> Message-ID: <1568767295.65.0.823851236682.issue38203@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15846 pull_request: https://github.com/python/cpython/pull/16250 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 21:03:18 2019 From: report at bugs.python.org (Dima Tisnek) Date: Wed, 18 Sep 2019 01:03:18 +0000 Subject: [issue37657] ERROR: grip 4.5.2 requires docopt>=0.4.0, which is not installed. In-Reply-To: <1563857026.02.0.43954136156.issue37657@roundup.psfhosted.org> Message-ID: <1568768598.83.0.679142173695.issue37657@roundup.psfhosted.org> Dima Tisnek added the comment: I've just got it again, when running `Install Certificates.command` after installing Python 3.8.0b4. Yes I do have Python 3.7 installed and had earlier 3.8 builds installed. Could it be referenced by `pip`? Or `certifi` itself? I can't find any references... I can reproduce this at will with: `python -E -s -m pip install --upgrade certifi --force` The `-E -s -m pip` is taken from the cert script, and `--force` is added so that pip doesn't short circuit. Could it be that `grip` is installed badly and that even with `-E -s` it's somehow loaded? ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 21:14:34 2019 From: report at bugs.python.org (Dima Tisnek) Date: Wed, 18 Sep 2019 01:14:34 +0000 Subject: [issue37657] ERROR: grip 4.5.2 requires docopt>=0.4.0, which is not installed. In-Reply-To: <1563857026.02.0.43954136156.issue37657@roundup.psfhosted.org> Message-ID: <1568769274.11.0.845539759183.issue37657@roundup.psfhosted.org> Dima Tisnek added the comment: I've nuked 3.8/.../site-packages and the problem is gone; confirmed by reinstalling 3.8 from scratch. It must've been something in the my environment, if/when I find what it was, I'll open a bug in the respective package. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 22:06:10 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 18 Sep 2019 02:06:10 +0000 Subject: [issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT) In-Reply-To: <1565471250.77.0.491506074373.issue37812@roundup.psfhosted.org> Message-ID: <1568772369.99.0.638079533412.issue37812@roundup.psfhosted.org> Raymond Hettinger added the comment: Victor, I agree that both changes should be reverted. We should avoid churning long stable, bug free code for minimal aesthetic value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 23:22:39 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 18 Sep 2019 03:22:39 +0000 Subject: [issue36546] Add quantiles() to the statistics module In-Reply-To: <1554585736.61.0.903931747573.issue36546@roundup.psfhosted.org> Message-ID: <1568776959.81.0.146830918053.issue36546@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- pull_requests: +15847 pull_request: https://github.com/python/cpython/pull/16252 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 23:41:32 2019 From: report at bugs.python.org (Greg Lindahl) Date: Wed, 18 Sep 2019 03:41:32 +0000 Subject: [issue27970] ssl: can't verify a trusted site with imcomplete certificate chain In-Reply-To: <1473151937.46.0.395458552575.issue27970@psf.upfronthosting.co.za> Message-ID: <1568778092.39.0.900144057064.issue27970@roundup.psfhosted.org> Change by Greg Lindahl : ---------- nosy: +wumpus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 23:45:12 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 18 Sep 2019 03:45:12 +0000 Subject: [issue36546] Add quantiles() to the statistics module In-Reply-To: <1554585736.61.0.903931747573.issue36546@roundup.psfhosted.org> Message-ID: <1568778312.5.0.975244012034.issue36546@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 272d0d017aef585acf84bb0af99a90a2a8582b2c by Raymond Hettinger in branch 'master': bpo-36546: No longer a need to make "data" positional only (GH-16252) https://github.com/python/cpython/commit/272d0d017aef585acf84bb0af99a90a2a8582b2c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 17 23:47:12 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 18 Sep 2019 03:47:12 +0000 Subject: [issue36546] Add quantiles() to the statistics module In-Reply-To: <1554585736.61.0.903931747573.issue36546@roundup.psfhosted.org> Message-ID: <1568778432.73.0.880399434036.issue36546@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15848 pull_request: https://github.com/python/cpython/pull/16253 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 00:06:56 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 18 Sep 2019 04:06:56 +0000 Subject: [issue36546] Add quantiles() to the statistics module In-Reply-To: <1554585736.61.0.903931747573.issue36546@roundup.psfhosted.org> Message-ID: <1568779616.94.0.51694855543.issue36546@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 31af1cce9d799475ba8c3dec3e239b4a75ce268f by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-36546: No longer a need to make "data" positional only (GH-16252) (GH-16253) https://github.com/python/cpython/commit/31af1cce9d799475ba8c3dec3e239b4a75ce268f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 00:39:27 2019 From: report at bugs.python.org (Greg Price) Date: Wed, 18 Sep 2019 04:39:27 +0000 Subject: [issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT) In-Reply-To: <1565471250.77.0.491506074373.issue37812@roundup.psfhosted.org> Message-ID: <1568781567.74.0.675607050568.issue37812@roundup.psfhosted.org> Greg Price added the comment: Thanks Victor for linking that issue back here. > A first change converted a macro to a static inline function. The second change converted the static inline fnuction to a macro Not quite. The first change converted a macro `CHECK_SMALL_INT` to an equivalent sequence, including a `return` that had been hidden inside the macro: if (is_small_int(ival)) { return get_small_int((sdigit)ival); } The second change converted `is_small_int` to a macro `IS_SMALL_INT`. The second change also changed an `assert(0)` to say `Py_UNREACHABLE()`. I don't know why it did that -- it seems quite orthogonal to the rest of the change. > Morever, if using a static inline function is causing issues, The change that caused the build failure you're seeing (GH-15710) was intended for bpo-38015 . Details there; briefly, common compilers on x86_32 would emit some unsightly extra instructions with `is_small_int`, and converting it to the macro `IS_SMALL_INT` eliminated those extra instructions. It's not clear to me if anyone benchmarked to see if the conversion to a macro had any measurable performance benefit. There's some measurement here: https://bugs.python.org/issue38015#msg351315 which finds no benefit. I'm not sure if that was measuring the change in GH-15710, or if it was an attempt to replicate the findings in msg351255 (which it quotes) about a more invasive change. So I think the short of it is that the static inline function was not causing any issue, and an easy fix for the build failure is to revert GH-15710. Alternatively, another easy fix would be to replace just the `Py_UNREACHABLE()` introduced by GH-15710 with the original `assert(0)`. Either way, I don't think there's any reason here to revert GH-15216. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 01:00:18 2019 From: report at bugs.python.org (Ma Lin) Date: Wed, 18 Sep 2019 05:00:18 +0000 Subject: [issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT) In-Reply-To: <1565471250.77.0.491506074373.issue37812@roundup.psfhosted.org> Message-ID: <1568782818.08.0.103256098847.issue37812@roundup.psfhosted.org> Ma Lin added the comment: > It's not clear to me if anyone benchmarked to see if the > conversion to a macro had any measurable performance benefit. I tested on that day, also use this command: python.exe -m pyperf timeit -s "from collections import deque; consume = deque(maxlen=0).extend; r = range(256)" "consume(r)" --duplicate=1000 I remember the results are: inline function: 1.6 us macro version : 1.27 us (32-bit release build by MSVC 2017) Since the difference is too obvious, I tested it only once for each version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 01:00:45 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 18 Sep 2019 05:00:45 +0000 Subject: [issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT) In-Reply-To: <1565471250.77.0.491506074373.issue37812@roundup.psfhosted.org> Message-ID: <1568782845.86.0.393879851973.issue37812@roundup.psfhosted.org> Raymond Hettinger added the comment: Sorry Greg, I know you're enthusiastic about this but I think both changes were a mistake. As the person who merged them, I've decided to revert them in favor of stable code (FWIW, I do care about Ma Lin's concerns in the other BPO and I don't want the generated code to be any different than it was). We're wasted a lot of dev time on something that never promised much value in the first place. So, I'll revert and close this tracker issue so we can move on to something more substantive. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 01:06:47 2019 From: report at bugs.python.org (Greg Price) Date: Wed, 18 Sep 2019 05:06:47 +0000 Subject: [issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT) In-Reply-To: <1565471250.77.0.491506074373.issue37812@roundup.psfhosted.org> Message-ID: <1568783207.47.0.333783110264.issue37812@roundup.psfhosted.org> Greg Price added the comment: > if using a static inline function is causing issues Separately from whether there was or wasn't such an issue here, I think it's interesting to note that the build failure bpo-38205 is an example of exactly the opposite! It was caused by a combination of (a) using a macro *instead* of a plain old C function; (b) using avoidable preprocessor conditionals. And both of them led to that build failure in classic ways. Specifically, the build failure happened because (a) this `Py_UNREACHABLE` call was in an unusual syntactic context, squished into an expression, in order to use it in a macro. (b) the call was behind an `#ifdef`/`#else`; and the configuration that included it wasn't one that got test-built by the authors of 3ab61473b (which modified `Py_UNREACHABLE`), nor by CI. When conditional preprocessing is kept to a minimum -- here, if the `#if NSMALLNEGINTS + NSMALLPOSINTS > 0` conditional enclosed just the `small_ints` array that it needs to -- then this kind of build regression on non-default configurations can't so easily happen. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 01:11:29 2019 From: report at bugs.python.org (Greg Price) Date: Wed, 18 Sep 2019 05:11:29 +0000 Subject: [issue38015] inline function generates slightly inefficient machine code In-Reply-To: <1567483364.75.0.314519224234.issue38015@roundup.psfhosted.org> Message-ID: <1568783489.37.0.404815641.issue38015@roundup.psfhosted.org> Greg Price added the comment: See followup at https://bugs.python.org/issue38205 and https://bugs.python.org/issue37812#msg352670 . The patch in GH-15710 had a side effect of introducing a call to `Py_UNREACHABLE` inside a comma-expression. A subsequent commit 3ab61473b changed `Py_UNREACHABLE` in a way that made that a syntax error; the issue wasn't caught then because the code is only compiled if `NSMALLNEGINTS + NSMALLPOSINTS <= 0`. Detailed discussion on those threads. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 01:16:22 2019 From: report at bugs.python.org (Ma Lin) Date: Wed, 18 Sep 2019 05:16:22 +0000 Subject: [issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT) In-Reply-To: <1565471250.77.0.491506074373.issue37812@roundup.psfhosted.org> Message-ID: <1568783782.98.0.8117906267.issue37812@roundup.psfhosted.org> Ma Lin added the comment: > I agree that both changes should be reverted. There is another commit after the two commits: https://github.com/python/cpython/commit/c6734ee7c55add5fdc2c821729ed5f67e237a096 It is troublesome to revert them. PR 16146 is on-going, maybe we can request the author to replace `Py_UNREACHABLE()` with `assert(0)`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 01:17:06 2019 From: report at bugs.python.org (Greg Price) Date: Wed, 18 Sep 2019 05:17:06 +0000 Subject: [issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT) In-Reply-To: <1565471250.77.0.491506074373.issue37812@roundup.psfhosted.org> Message-ID: <1568783826.05.0.274348391601.issue37812@roundup.psfhosted.org> Greg Price added the comment: > We're wasted a lot of dev time on something that never promised much value in the first place. So, I'll revert and close this tracker issue OK, so be it. I'll certainly agree that this series of threads consumed a lot more time than I anticipated or hoped, though I think we have different analyses of why that was. (As you can probably guess, my previous message crossed with yours.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 01:32:20 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 18 Sep 2019 05:32:20 +0000 Subject: [issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT) In-Reply-To: <1565471250.77.0.491506074373.issue37812@roundup.psfhosted.org> Message-ID: <1568784740.13.0.945929106795.issue37812@roundup.psfhosted.org> Raymond Hettinger added the comment: Greg, would you be willing to work on a PR that reverts pr15216 and pr15710 while preserving the efforts of pr15192 ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 01:54:06 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 18 Sep 2019 05:54:06 +0000 Subject: [issue38200] Adding itertools.pairwise to the standard library? In-Reply-To: <1568736008.51.0.85414927582.issue38200@roundup.psfhosted.org> Message-ID: <1568786046.2.0.881789338918.issue38200@roundup.psfhosted.org> Raymond Hettinger added the comment: FWIW, pairwise() is in the more-itertools module. A quick code search does show occasional use in the wild: https://github.com/search?q=language%3Apython+more_itertools.pairwise&type=Code In my own code, I've had some cases that almost fit but they needed custom padding on one end or both ends: zip([0.0] + data, data + [1.0]). Also, its unclear where anyone would want a wider sliding window. Tim, do you have any thoughts about pairwise()? ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 02:02:16 2019 From: report at bugs.python.org (Greg Price) Date: Wed, 18 Sep 2019 06:02:16 +0000 Subject: [issue18236] str.isspace should use the Unicode White_Space property In-Reply-To: <1371431190.78.0.117337167573.issue18236@psf.upfronthosting.co.za> Message-ID: <1568786536.67.0.499040998967.issue18236@roundup.psfhosted.org> Change by Greg Price : ---------- keywords: +patch pull_requests: +15849 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/16254 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 02:08:04 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 18 Sep 2019 06:08:04 +0000 Subject: [issue38191] typing.NamedTuple() should prefix parameters with '_' In-Reply-To: <1568663995.81.0.542051193907.issue38191@roundup.psfhosted.org> Message-ID: <1568786884.4.0.577337379555.issue38191@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 2adcd79bf90415147691a51a4cb046d5920f6ce7 by Serhiy Storchaka in branch '3.8': bpo-38191: Use positional-only parameters in TypedDict(). (GH-16240) https://github.com/python/cpython/commit/2adcd79bf90415147691a51a4cb046d5920f6ce7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 02:08:31 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 18 Sep 2019 06:08:31 +0000 Subject: [issue38191] typing.NamedTuple() should prefix parameters with '_' In-Reply-To: <1568663995.81.0.542051193907.issue38191@roundup.psfhosted.org> Message-ID: <1568786911.73.0.264537377531.issue38191@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 02:11:56 2019 From: report at bugs.python.org (Greg Price) Date: Wed, 18 Sep 2019 06:11:56 +0000 Subject: [issue37760] Refactor makeunicodedata.py: dedupe parsing, use dataclass In-Reply-To: <1564977335.6.0.0909548880632.issue37760@roundup.psfhosted.org> Message-ID: <1568787116.2.0.320552552751.issue37760@roundup.psfhosted.org> Greg Price added the comment: Thanks Benjamin for reviewing and merging this series! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 02:17:21 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 18 Sep 2019 06:17:21 +0000 Subject: [issue38208] Simplify string.Template by using __init_subclass__() Message-ID: <1568787441.71.0.0135329637022.issue38208@roundup.psfhosted.org> New submission from Serhiy Storchaka : Currently string.Template uses a metaclass. It is possible to get rid of it and use __init_subclass__() instead. ---------- components: Library (Lib) messages: 352699 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Simplify string.Template by using __init_subclass__() versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 02:29:04 2019 From: report at bugs.python.org (Sergey Fedoseev) Date: Wed, 18 Sep 2019 06:29:04 +0000 Subject: [issue38205] Python no longer compiles without small integer singletons In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1568788144.11.0.196837802785.issue38205@roundup.psfhosted.org> Sergey Fedoseev added the comment: I believe that the problem is caused by the change in Py_UNREACHABLE() (https://github.com/python/cpython/commit/3ab61473ba7f3dca32d779ec2766a4faa0657923). Before the mentioned commit Py_UNREACHABLE() was an expression, now it's a block. Py_UNREACHABLE() macro is public (see https://docs.python.org/3/c-api/intro.html#c.Py_UNREACHABLE), so this change can cause similar problems outside of CPython (i.e. that change was breaking). ---------- nosy: +sir-sigurd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 02:29:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Sep 2019 06:29:32 +0000 Subject: [issue38203] regrtest fails to stop test_multiprocessing_spawn worker process In-Reply-To: <1568753918.39.0.636404406219.issue38203@roundup.psfhosted.org> Message-ID: <1568788172.67.0.567630308742.issue38203@roundup.psfhosted.org> STINNER Victor added the comment: New changeset da57599af51c602b015b6880123fef6eccdabcf5 by Victor Stinner in branch 'master': bpo-38203: regrtest: put a 2 min timeout on Python exit (GH-16250) https://github.com/python/cpython/commit/da57599af51c602b015b6880123fef6eccdabcf5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 02:30:37 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 18 Sep 2019 06:30:37 +0000 Subject: [issue38209] Simplify dataclasses.InitVar by using __class_getitem__() Message-ID: <1568788237.84.0.300342046917.issue38209@roundup.psfhosted.org> New submission from Serhiy Storchaka : Currently dataclasses.InitVar uses a metaclass. It is possible to get rid of it and use __class_getitem__() instead. ---------- components: Library (Lib) messages: 352702 nosy: eric.smith, serhiy.storchaka priority: normal severity: normal status: open title: Simplify dataclasses.InitVar by using __class_getitem__() versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 02:31:43 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 18 Sep 2019 06:31:43 +0000 Subject: [issue38209] Simplify dataclasses.InitVar by using __class_getitem__() In-Reply-To: <1568788237.84.0.300342046917.issue38209@roundup.psfhosted.org> Message-ID: <1568788303.41.0.714959379876.issue38209@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +15850 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16255 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 02:33:00 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 18 Sep 2019 06:33:00 +0000 Subject: [issue38208] Simplify string.Template by using __init_subclass__() In-Reply-To: <1568787441.71.0.0135329637022.issue38208@roundup.psfhosted.org> Message-ID: <1568788380.17.0.720422112007.issue38208@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +15851 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16256 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 02:54:17 2019 From: report at bugs.python.org (Sergey Fedoseev) Date: Wed, 18 Sep 2019 06:54:17 +0000 Subject: [issue38205] Python no longer compiles without small integer singletons In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1568789657.97.0.57953936016.issue38205@roundup.psfhosted.org> Sergey Fedoseev added the comment: Also quote from Py_UNREACHABLE() doc: > Use this in places where you might be tempted to put an assert(0) or abort() call. https://github.com/python/cpython/commit/6b519985d23bd0f0bd072b5d5d5f2c60a81a19f2 does exactly that, it replaces assert(0) with Py_UNREACHABLE(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 03:01:29 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 18 Sep 2019 07:01:29 +0000 Subject: [issue27575] dict viewkeys intersection slow for large dicts In-Reply-To: <1468950707.74.0.640405379684.issue27575@psf.upfronthosting.co.za> Message-ID: <1568790089.59.0.919833190974.issue27575@roundup.psfhosted.org> Serhiy Storchaka added the comment: I am puzzled why we still call set.intersection_update with empty set? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 03:10:07 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 18 Sep 2019 07:10:07 +0000 Subject: [issue38210] Intersection of dict view with iterator returns empty set Message-ID: <1568790606.98.0.898790756289.issue38210@roundup.psfhosted.org> New submission from Serhiy Storchaka : In 3.8: >>> {1: 2, 3: 4}.keys() & {1, 2} {1} In master: >>> {1: 2, 3: 4}.keys() & iter([1, 2]) set() The behavior was changed in issue27575. ---------- components: Interpreter Core messages: 352705 nosy: rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: Intersection of dict view with iterator returns empty set type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 03:11:11 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 18 Sep 2019 07:11:11 +0000 Subject: [issue27575] dict viewkeys intersection slow for large dicts In-Reply-To: <1468950707.74.0.640405379684.issue27575@psf.upfronthosting.co.za> Message-ID: <1568790671.22.0.179034076791.issue27575@roundup.psfhosted.org> Serhiy Storchaka added the comment: This changed behavior. See issue38210. See also issue38202 for other regression. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 03:11:18 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 18 Sep 2019 07:11:18 +0000 Subject: [issue27575] dict viewkeys intersection slow for large dicts In-Reply-To: <1468950707.74.0.640405379684.issue27575@psf.upfronthosting.co.za> Message-ID: <1568790678.47.0.84258095904.issue27575@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- versions: +Python 3.9 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 03:11:26 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 18 Sep 2019 07:11:26 +0000 Subject: [issue27575] dict viewkeys intersection slow for large dicts In-Reply-To: <1468950707.74.0.640405379684.issue27575@psf.upfronthosting.co.za> Message-ID: <1568790686.42.0.958503370783.issue27575@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 03:34:39 2019 From: report at bugs.python.org (bentoi) Date: Wed, 18 Sep 2019 07:34:39 +0000 Subject: [issue35866] concurrent.futures deadlock In-Reply-To: <1548929111.09.0.517798780255.issue35866@roundup.psfhosted.org> Message-ID: <1568792079.35.0.815406463551.issue35866@roundup.psfhosted.org> bentoi added the comment: FYI, I'm getting a similar deadlock in a child Python process which is stuck on locking a mutex from the dl library. See attached stack. I'm not using concurrent.futures however, the parent Python process is a test driver that uses threading.Thread and subprocess.Popen to spawn new processes... I'm not using os.fork(). This occurred on ArchLinux with Python 3.7.4. ---------- nosy: +bentoi Added file: https://bugs.python.org/file48611/stack-python.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 03:41:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Sep 2019 07:41:13 +0000 Subject: [issue38205] Python no longer compiles without small integer singletons In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1568792473.55.0.687148933644.issue38205@roundup.psfhosted.org> STINNER Victor added the comment: > Before the mentioned commit Py_UNREACHABLE() was an expression, now it's a block. Right, it was changed by: commit 3ab61473ba7f3dca32d779ec2766a4faa0657923 Author: Zachary Ware Date: Thu Sep 12 13:35:48 2019 +0100 Enhance Py_UNREACHABLE macro (GH-16032) I add Zachary Ware in the nosy list. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 03:50:40 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Sep 2019 07:50:40 +0000 Subject: [issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT) In-Reply-To: <1565471250.77.0.491506074373.issue37812@roundup.psfhosted.org> Message-ID: <1568793040.33.0.256149529001.issue37812@roundup.psfhosted.org> STINNER Victor added the comment: Raymond: > We're wasted a lot of dev time on something that never promised much value in the first place. I'm one of the first to advocate to replace ugly macros with clean static inline functions. Macros are evil and can be too easily misused. On PR 15216, Benjamin and Raymond advised to replace the macro with a function. I'm also a believer that one day, we could replace duplicated C functions accepting variant of C "integers" types with a single larger type: * signed: replace (char, short, int, long, long long, ssize_t) with intmax_t * unsigned: replace (unsigned char, unsigned short, unsigned int, unsigned long, unsigned long long, size_t) with uintmax_t Sadly, it seems like such change has a small performance loss, and so cannot be done in "performance critical" code. I consider that longobject.c is such performance critical code. -- I converted some macros of the Python C API to static inline functions, like Py_INCREF() or _PyObject_GC_TRACK(): https://vstinner.github.io/split-include-directory-python38.html Compared to macros, static inline functions have multiple advantages: * Parameter types and return type are well defined; * They don't have issues specific to macros: see GCC Macro Pitfals https://gcc.gnu.org/onlinedocs/cpp/Macro-Pitfalls.html ; * Variables have a well defined local scope ; * GDB is able to retrieve then name when read the current C stack ("backtrace"). -- Again, I advice to add a small comment in longobject.c macros to explain that converting them to functions would loose performances. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 04:11:29 2019 From: report at bugs.python.org (Sergey Fedoseev) Date: Wed, 18 Sep 2019 08:11:29 +0000 Subject: [issue38211] clean up type_init() Message-ID: <1568794289.26.0.422992703771.issue38211@roundup.psfhosted.org> New submission from Sergey Fedoseev : I wrote patch that cleans up type_init(): 1. Removes conditions already checked by assert() 2. Removes object_init() call that effectively creates an empty tuple and checks that this tuple is empty ---------- messages: 352710 nosy: sir-sigurd priority: normal severity: normal status: open title: clean up type_init() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 04:12:24 2019 From: report at bugs.python.org (Sergey Fedoseev) Date: Wed, 18 Sep 2019 08:12:24 +0000 Subject: [issue38211] clean up type_init() In-Reply-To: <1568794289.26.0.422992703771.issue38211@roundup.psfhosted.org> Message-ID: <1568794344.21.0.865139160218.issue38211@roundup.psfhosted.org> Change by Sergey Fedoseev : ---------- keywords: +patch pull_requests: +15852 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16257 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 04:42:16 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 18 Sep 2019 08:42:16 +0000 Subject: [issue36274] http.client cannot send non-ASCII request lines In-Reply-To: <1552422803.93.0.420596825145.issue36274@roundup.psfhosted.org> Message-ID: <1568796136.09.0.96810024677.issue36274@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Is there a reason why cherrypy doesn't URL encode the null byte in this test as per comment : https://github.com/cherrypy/cherrypy/issues/1781#issuecomment-504476658 ? The original fix was adopted from golang (https://github.com/golang/go/commit/829c5df58694b3345cb5ea41206783c8ccf5c3ca) and as per the cherrypy test the golang client also should be forbidding invalid control character : https://play.golang.org/p/FTNtRmvlWrn Also as per the discussion one of our own stdlib tests were depending on this behavior in the http client and had to be changed : https://github.com/python/cpython/pull/12755#issuecomment-481617878 The change made in Issue30458 also affects urllib3 test in 3.7.4 causing CI failure and the related discussion to encode URLs : https://github.com/urllib3/urllib3/pull/1671#discussion_r318804155 . urllib3 issue : https://github.com/urllib3/urllib3/issues/1664 . IIRC urllib3 was also patched for this vulnerability in similar manner as part of larger refactor : https://github.com/urllib3/urllib3/issues/1553 . I didn't verify yet, it's unreleased and how urllib3 client behaves before and after patch for the CRLF characters and similar tests that use urllib3 as client. Applying the URL encoding patch to cherrypy I can verify that the behavior is also tested diff --git a/cherrypy/test/test_static.py b/cherrypy/test/test_static.py index cdd821ae..85a51cf3 100644 --- a/cherrypy/test/test_static.py +++ b/cherrypy/test/test_static.py @@ -398,7 +398,8 @@ class StaticTest(helper.CPWebCase): self.assertInBody("I couldn't find that thing") def test_null_bytes(self): - self.getPage('/static/\x00') + from urllib.parse import quote + self.getPage(quote('/static/\x00')) self.assertStatus('404 Not Found') @classmethod After patch the test passes and ValueError is also raised properly as the null byte is decoded in the server and using it in os.stat to resolve null byte path. Breakages were expected in the discussion as adopting the fix from golang. Giving an option like a parameter to bypass the validation was also discussed in the linked but giving an option would also mean it could be abused or missed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 05:21:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Sep 2019 09:21:37 +0000 Subject: [issue38212] test_multiprocessing_spawn: test_queue_feeder_donot_stop_onexc() failed on x86 Windows7 3.x Message-ID: <1568798497.72.0.146892893981.issue38212@roundup.psfhosted.org> New submission from STINNER Victor : x86 Windows7 3.x: https://buildbot.python.org/all/#/builders/58/builds/3015 If I recall correctly, this buildbot is known to be slow. It sounds like a race condition. ERROR: test_queue_feeder_donot_stop_onexc (test.test_multiprocessing_spawn.WithProcessesTestQueue) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py", line 1132, in test_queue_feeder_donot_stop_onexc self.assertTrue(q.get(timeout=1.0)) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\queues.py", line 108, in get raise Empty _queue.Empty Extract of the test: def test_queue_feeder_donot_stop_onexc(self): # bpo-30414: verify feeder handles exceptions correctly if self.TYPE != 'processes': self.skipTest('test not appropriate for {}'.format(self.TYPE)) class NotSerializable(object): def __reduce__(self): raise AttributeError with test.support.captured_stderr(): q = self.Queue() q.put(NotSerializable()) q.put(True) # bpo-30595: use a timeout of 1 second for slow buildbots self.assertTrue(q.get(timeout=1.0)) # <===== FAIL HERE ===== close_queue(q) ... Hum, "bpo-30595: use a timeout of 1 second for slow buildbots" sounds like this test depends on time which is bad for reliable tests. Would it be possible to use a more reliable synchronization primitive? If no solution is found, the workaround is to use a timeout of 60 seconds instead of just 1 second... ---------- components: Tests messages: 352712 nosy: pablogsal, vstinner priority: normal severity: normal status: open title: test_multiprocessing_spawn: test_queue_feeder_donot_stop_onexc() failed on x86 Windows7 3.x versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 05:42:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Sep 2019 09:42:39 +0000 Subject: [issue38070] visit_decref(): add an assertion to check that the object is not freed In-Reply-To: <1568037936.88.0.10373402622.issue38070@roundup.psfhosted.org> Message-ID: <1568799759.01.0.975863510481.issue38070@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15853 pull_request: https://github.com/python/cpython/pull/16258 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 06:36:29 2019 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 18 Sep 2019 10:36:29 +0000 Subject: [issue37904] Suggested edit to Python Tutorial - Section 4 In-Reply-To: <1566386922.03.0.919785821856.issue37904@roundup.psfhosted.org> Message-ID: <1568802989.61.0.956792141438.issue37904@roundup.psfhosted.org> Eric V. Smith added the comment: New changeset 7a2f68776a77c782c0abf40dc9e3fb687787e730 by Eric V. Smith (Miss Islington (bot)) in branch '3.8': bpo-37904: Edition on python tutorial - section 4 (GH-16169) (GH-16234) https://github.com/python/cpython/commit/7a2f68776a77c782c0abf40dc9e3fb687787e730 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 06:36:38 2019 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 18 Sep 2019 10:36:38 +0000 Subject: [issue37904] Suggested edit to Python Tutorial - Section 4 In-Reply-To: <1566386922.03.0.919785821856.issue37904@roundup.psfhosted.org> Message-ID: <1568802998.37.0.310701141702.issue37904@roundup.psfhosted.org> Eric V. Smith added the comment: New changeset 8b907a8875d1b22d8f060dee9430cc82d471e86b by Eric V. Smith (Miss Islington (bot)) in branch '3.7': bpo-37904: Edition on python tutorial - section 4 (GH-16169) (GH-16235) https://github.com/python/cpython/commit/8b907a8875d1b22d8f060dee9430cc82d471e86b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 06:37:00 2019 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 18 Sep 2019 10:37:00 +0000 Subject: [issue37904] Suggested edit to Python Tutorial - Section 4 In-Reply-To: <1566386922.03.0.919785821856.issue37904@roundup.psfhosted.org> Message-ID: <1568803020.72.0.774346793193.issue37904@roundup.psfhosted.org> Eric V. Smith added the comment: New changeset c47c8ba2969c9faf1c036b3dc4b0a5cf0d3aa0cc by Eric V. Smith (Miss Islington (bot)) in branch '2.7': bpo-37904: Edition on python tutorial - section 4 (GH-16169) (GH-16236) https://github.com/python/cpython/commit/c47c8ba2969c9faf1c036b3dc4b0a5cf0d3aa0cc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 06:37:37 2019 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 18 Sep 2019 10:37:37 +0000 Subject: [issue37904] Suggested edit to Python Tutorial - Section 4 In-Reply-To: <1566386922.03.0.919785821856.issue37904@roundup.psfhosted.org> Message-ID: <1568803057.74.0.892460200438.issue37904@roundup.psfhosted.org> Change by Eric V. Smith : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 07:25:21 2019 From: report at bugs.python.org (Akash Shende) Date: Wed, 18 Sep 2019 11:25:21 +0000 Subject: [issue38213] sys.maxsize returns incorrect docstring. Message-ID: <1568805921.73.0.762997174876.issue38213@roundup.psfhosted.org> New submission from Akash Shende : >>> import sys >>> print(sys.maxsize.__doc__) int([x]) -> integer int(x, base=10) -> integer Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero. If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int('0b100', base=0) 4 ---------- components: Library (Lib) messages: 352716 nosy: akash0x53 priority: normal severity: normal status: open title: sys.maxsize returns incorrect docstring. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 07:36:03 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 18 Sep 2019 11:36:03 +0000 Subject: [issue38213] sys.maxsize returns incorrect docstring. In-Reply-To: <1568805921.73.0.762997174876.issue38213@roundup.psfhosted.org> Message-ID: <1568806563.37.0.810115898828.issue38213@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: sys.maxsize returns an integer so essentially sys.maxsize.__doc__ is giving docs for int.__doc__. help(sys) to get to maxsize would help. maxsize -- the largest supported length of containers. python3 Python 3.8.0b4 (v3.8.0b4:d93605de72, Aug 29 2019, 21:47:47) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> print(sys.maxsize) 9223372036854775807 >>> print(sys.maxsize.__doc__) int([x]) -> integer int(x, base=10) -> integer Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero. If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int('0b100', base=0) 4 >>> print(int.__doc__) int([x]) -> integer int(x, base=10) -> integer Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero. If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int('0b100', base=0) 4 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 07:38:18 2019 From: report at bugs.python.org (Akash Shende) Date: Wed, 18 Sep 2019 11:38:18 +0000 Subject: [issue38213] sys.maxsize returns incorrect docstring. In-Reply-To: <1568805921.73.0.762997174876.issue38213@roundup.psfhosted.org> Message-ID: <1568806698.31.0.913664028837.issue38213@roundup.psfhosted.org> Akash Shende added the comment: Yes. I checked that. Same for sys.maxunicode ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 08:08:02 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 18 Sep 2019 12:08:02 +0000 Subject: [issue38213] sys.maxsize returns incorrect docstring. In-Reply-To: <1568805921.73.0.762997174876.issue38213@roundup.psfhosted.org> Message-ID: <1568808482.45.0.896559690498.issue38213@roundup.psfhosted.org> Steven D'Aprano added the comment: This is not a bug. ``sys.maxsize`` is just an int instance, and it has no docstring itself. When you look up ``sys.maxsize.__doc__``, or call ``help(sys.maxsize)``, the ordinary inheritance rules apply and you get the class docstring. There is nothing magical about ``sys.maxsize``. You will get the same result for ``help(2147483647)`` or ``help(1234)`` or any other int. So you are getting the correct docstring, the one which belongs to the class. I'm going to close this as "not a bug", but if you believe that you have a good reason to treat this as a bug, please reply. If your argument is convincing, we can re-open the ticket. ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 08:10:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Sep 2019 12:10:33 +0000 Subject: [issue38070] visit_decref(): add an assertion to check that the object is not freed In-Reply-To: <1568037936.88.0.10373402622.issue38070@roundup.psfhosted.org> Message-ID: <1568808633.91.0.267924719835.issue38070@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 47bbab9f76735acc1991e541d12fd18be6b13b16 by Victor Stinner in branch '3.8': [3.8] bpo-38070: Py_FatalError() logs runtime state (GH-16258) https://github.com/python/cpython/commit/47bbab9f76735acc1991e541d12fd18be6b13b16 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 08:10:58 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Sep 2019 12:10:58 +0000 Subject: [issue38070] visit_decref(): add an assertion to check that the object is not freed In-Reply-To: <1568037936.88.0.10373402622.issue38070@roundup.psfhosted.org> Message-ID: <1568808658.18.0.686835271324.issue38070@roundup.psfhosted.org> STINNER Victor added the comment: Ok, I pushed the most important changes that I wanted to push. I close the issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 08:15:15 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Sep 2019 12:15:15 +0000 Subject: [issue38203] regrtest fails to stop test_multiprocessing_spawn worker process In-Reply-To: <1568753918.39.0.636404406219.issue38203@roundup.psfhosted.org> Message-ID: <1568808915.0.0.419082296706.issue38203@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 0a963fbc9c4cf4569f1eadaa2aa1229bb0081256 by Victor Stinner in branch 'master': bpo-38203: faulthandler.dump_traceback_later() is always available (GH-16249) https://github.com/python/cpython/commit/0a963fbc9c4cf4569f1eadaa2aa1229bb0081256 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 08:17:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Sep 2019 12:17:38 +0000 Subject: [issue38203] regrtest fails to stop test_multiprocessing_spawn worker process In-Reply-To: <1568753918.39.0.636404406219.issue38203@roundup.psfhosted.org> Message-ID: <1568809058.85.0.22636251769.issue38203@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15854 pull_request: https://github.com/python/cpython/pull/16260 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 08:37:08 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Sep 2019 12:37:08 +0000 Subject: [issue38203] regrtest fails to stop test_multiprocessing_spawn worker process In-Reply-To: <1568753918.39.0.636404406219.issue38203@roundup.psfhosted.org> Message-ID: <1568810228.39.0.869102777751.issue38203@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 064e1e384120635330493abf300b1113eadd904c by Victor Stinner in branch '3.8': bpo-38203: faulthandler.dump_traceback_later() is always available (GH-16260) https://github.com/python/cpython/commit/064e1e384120635330493abf300b1113eadd904c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 08:37:24 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 18 Sep 2019 12:37:24 +0000 Subject: [issue38203] regrtest fails to stop test_multiprocessing_spawn worker process In-Reply-To: <1568753918.39.0.636404406219.issue38203@roundup.psfhosted.org> Message-ID: <1568810244.18.0.224924908045.issue38203@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15855 pull_request: https://github.com/python/cpython/pull/16261 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 08:43:20 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 18 Sep 2019 12:43:20 +0000 Subject: [issue38203] regrtest fails to stop test_multiprocessing_spawn worker process In-Reply-To: <1568753918.39.0.636404406219.issue38203@roundup.psfhosted.org> Message-ID: <1568810600.77.0.920910314407.issue38203@roundup.psfhosted.org> miss-islington added the comment: New changeset 1a3a48ddaf41dff3c0fcedcfe7ec0940158c568d by Miss Islington (bot) in branch '3.7': bpo-38203: faulthandler.dump_traceback_later() is always available (GH-16260) https://github.com/python/cpython/commit/1a3a48ddaf41dff3c0fcedcfe7ec0940158c568d ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 09:05:58 2019 From: report at bugs.python.org (Sviatoslav Sydorenko) Date: Wed, 18 Sep 2019 13:05:58 +0000 Subject: [issue36274] http.client cannot send non-ASCII request lines In-Reply-To: <1552422803.93.0.420596825145.issue36274@roundup.psfhosted.org> Message-ID: <1568811958.21.0.186820161295.issue36274@roundup.psfhosted.org> Sviatoslav Sydorenko added the comment: @xtreak the encoded null-byte test would be an extra test case to consider. It is reasonable to test as many known invalid sequences as possible. Changing that byte to encoded notation would just replace one test with another effectively changing the semantics of it. To me, it's quite weird that it's considered a CVE at all: it's happening on the client side and it doesn't prevent the user from just feeding the proper bytes right into the socket so why overcomplicate things? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 09:30:40 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Sep 2019 13:30:40 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568813440.84.0.498337911008.issue37531@roundup.psfhosted.org> STINNER Victor added the comment: Oh wait, test_regrtest.test_multiprocessing_timeout() now also hangs on FreeBSD? :-( AMD64 FreeBSD CURRENT Shared 3.8: https://buildbot.python.org/all/#/builders/212/builds/226 running: test_regrtest (24 min 52 sec) 0:32:54 load avg: 0.26 [423/423/1] test_regrtest crashed (Exit code 1) Timeout (0:25:00)! Thread 0x0000000800ac0000 (most recent call first): File "/usr/home/buildbot/python/3.8.koobs-freebsd-current/build/Lib/selectors.py", line 415 in select File "/usr/home/buildbot/python/3.8.koobs-freebsd-current/build/Lib/subprocess.py", line 1866 in _communicate File "/usr/home/buildbot/python/3.8.koobs-freebsd-current/build/Lib/subprocess.py", line 1024 in communicate File "/usr/home/buildbot/python/3.8.koobs-freebsd-current/build/Lib/subprocess.py", line 491 in run File "/usr/home/buildbot/python/3.8.koobs-freebsd-current/build/Lib/test/test_regrtest.py", line 504 in run_command File "/usr/home/buildbot/python/3.8.koobs-freebsd-current/build/Lib/test/test_regrtest.py", line 529 in run_python File "/usr/home/buildbot/python/3.8.koobs-freebsd-current/build/Lib/test/test_regrtest.py", line 676 in run_tests File "/usr/home/buildbot/python/3.8.koobs-freebsd-current/build/Lib/test/test_regrtest.py", line 1174 in test_multiprocessing_timeout File "/usr/home/buildbot/python/3.8.koobs-freebsd-current/build/Lib/unittest/case.py", line 633 in _callTestMethod ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 09:32:02 2019 From: report at bugs.python.org (Larry Hastings) Date: Wed, 18 Sep 2019 13:32:02 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1568813522.91.0.867928124838.issue30458@roundup.psfhosted.org> Larry Hastings added the comment: Should we open a separate issue to track fixing the regression? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 09:50:59 2019 From: report at bugs.python.org (Guido Imperiale) Date: Wed, 18 Sep 2019 13:50:59 +0000 Subject: [issue38214] __reduce__ API specs for objects with __slots__ Message-ID: <1568814659.52.0.633360812637.issue38214@roundup.psfhosted.org> New submission from Guido Imperiale : The documentation for the pickle module states, about the 3rd element of the tuple returned by __reduce__: ---- Optionally, the object?s state, which will be passed to the object?s __setstate__() method as previously described. If the object has no such method then, the value must be a dictionary and it will be added to the object?s __dict__ attribute. ---- This doesn't seem correct to me. It should instead read: ---- Optionally, the object?s state, which will be passed to the object?s __setstate__() method as previously described. If the object has no such method, then the value must be: - for objects with only __dict__, a dictionary which will be used to update the object?s __dict__ attribute. - for objects with only __slots__, a tuple of (None, {<__slots__ key>: , ...}) - for objects with both __dict__ and __slots__, a tuple of ({<__dict__ key>: , ...}, {<__slots__ key>: , ...}) ---- ---------- assignee: docs at python components: Documentation messages: 352728 nosy: crusaderky, docs at python priority: normal severity: normal status: open title: __reduce__ API specs for objects with __slots__ type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 10:16:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Sep 2019 14:16:39 +0000 Subject: [issue38207] subprocess: On Windows, Popen.kill() + Popen.communicate() is blocking until all processes using the pipe close the pipe In-Reply-To: <1568763048.2.0.765446302919.issue38207@roundup.psfhosted.org> Message-ID: <1568816199.04.0.921778192179.issue38207@roundup.psfhosted.org> STINNER Victor added the comment: Hum, I see a similar behavior on Linux. Try attached communicate_close.py (I added newlines for readability): --- vstinner at apu$ python3 communicate_close.py process 1: pid 13089 process 1: process 2 spawned (pid 13090) process 1: stdout pipe os.stat_result(st_mode=4480, st_ino=3107861, st_dev=12, st_nlink=1, st_uid=1000, st_gid=1000, st_size=0, st_atime=1568816000, st_mtime=1568816000, st_ctime=1568816000) process 1: communicate with process 2 (pid 13090) ... process 2: pid 13090 process 2: stdout os.stat_result(st_mode=4480, st_ino=3107861, st_dev=12, st_nlink=1, st_uid=1000, st_gid=1000, st_size=0, st_atime=1568816000, st_mtime=1568816000, st_ctime=1568816000) process 3: pid 13092 process 3: stdout os.stat_result(st_mode=4480, st_ino=3107861, st_dev=12, st_nlink=1, st_uid=1000, st_gid=1000, st_size=0, st_atime=1568816000, st_mtime=1568816000, st_ctime=1568816000) process 1 (thread): kill process 2 (pid 13090) process 1 (thread): close process 2 stdout pipe (fd 3) process 3: exit process 1: communicate with process 2 (pid 13090) ... done in 5.1 sec --- In process 1, communicate() does not complete immediately when the process 1 thread kills process 2 and closes process 2 stdout pipe. communicate() only completes once process 3 completes. The stdout file of process 2 and process 3 are the same file. ---------- Added file: https://bugs.python.org/file48612/communicate_close.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 10:26:01 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 18 Sep 2019 14:26:01 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568816761.35.0.97078611446.issue37531@roundup.psfhosted.org> STINNER Victor added the comment: It seems like the new regrtest design doesn't work as I expected. Calling popen.kill() + popen.stdout.close() + popen.stderr.close() from a thread B does not always interrupt popen.communicate() in thread A. See https://bugs.python.org/issue38207#msg352729 for an example on Linux where communicate() still blocks until all child processes complete. I see different options: * Revert changes to restore regrtest old design which didn't have these new issues * Find a way to fix bpo-38207 on all platforms: be able to interrupt communicate() as soon as the process is killed and/or when all pipes are closed. * Call communicate() with shorter timeout to workaround the blocking communicate() issue (bpo-38207). * Maybe experiment asyncio which supports asynchronous subprocess. asyncio subprocess uses overlapped operations which can be cancelled. So maybe it isn't affected by bpo-38207. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 10:37:37 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 18 Sep 2019 14:37:37 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1568817457.39.0.133747374998.issue30458@roundup.psfhosted.org> Jason R. Coombs added the comment: > Should we open a separate issue to track (fixing) the regression? Yes, I think so. The ticket I referenced mainly addresses an incompatibility that was introduced with Python 3.0, so is much less urgent than the one introduced more recently, so I believe it deserves a proper, independent description and discussion. I'll gladly file that ticket, tonight most likely. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 11:10:28 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 18 Sep 2019 15:10:28 +0000 Subject: [issue35696] remove unnecessary operation in long_compare() In-Reply-To: <1547025999.59.0.0318422017652.issue35696@roundup.psfhosted.org> Message-ID: <1568819428.56.0.420439492907.issue35696@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 42acb7b8d29d078bc97b0cfd7c4911b2266b26b9 by Inada Naoki (HongWeipeng) in branch 'master': bpo-35696: Simplify long_compare() (GH-16146) https://github.com/python/cpython/commit/42acb7b8d29d078bc97b0cfd7c4911b2266b26b9 ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 11:14:29 2019 From: report at bugs.python.org (Inada Naoki) Date: Wed, 18 Sep 2019 15:14:29 +0000 Subject: [issue35696] remove unnecessary operation in long_compare() In-Reply-To: <1547025999.59.0.0318422017652.issue35696@roundup.psfhosted.org> Message-ID: <1568819669.61.0.290840138286.issue35696@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 11:49:42 2019 From: report at bugs.python.org (Thomas Knox) Date: Wed, 18 Sep 2019 15:49:42 +0000 Subject: [issue38204] Cannot compile on RPi with optimizations In-Reply-To: <1568757908.38.0.366967403928.issue38204@roundup.psfhosted.org> Message-ID: <1568821782.9.0.902777001815.issue38204@roundup.psfhosted.org> Thomas Knox added the comment: pi at pi4b:~ $ gcc --version gcc (Raspbian 8.3.0-6+rpi1) 8.3.0 pi at pi4b:~ $ ld --version GNU ld (GNU Binutils for Raspbian) 2.31.1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 11:51:47 2019 From: report at bugs.python.org (Thomas Knox) Date: Wed, 18 Sep 2019 15:51:47 +0000 Subject: [issue38204] Cannot compile on RPi with optimizations In-Reply-To: <1568757908.38.0.366967403928.issue38204@roundup.psfhosted.org> Message-ID: <1568821907.44.0.0467722277493.issue38204@roundup.psfhosted.org> Thomas Knox added the comment: I'll be more than happy to buy you an RPi to do testing on. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 11:56:32 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 18 Sep 2019 15:56:32 +0000 Subject: [issue38205] Python no longer compiles without small integer singletons In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1568822192.47.0.207721624494.issue38205@roundup.psfhosted.org> Zachary Ware added the comment: Whoops :(. Fixing this is beyond my C skill. I'd rather not lose the easter egg, but if it can't be fixed properly then 3ab61473ba7f3dca32d779ec2766a4faa0657923 should just be reverted. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 11:56:53 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 18 Sep 2019 15:56:53 +0000 Subject: [issue38215] Do not import modules in star-import when __all__ is not defined. Message-ID: <1568822213.45.0.69943350833.issue38215@roundup.psfhosted.org> New submission from Serhiy Storchaka : If __all__ is not defined in a module "from module import *" will import all keys from module.__dict__ which does not start with underscore. It can add undesired names to the current namespace. The common case is related to importing modules. 1. Importing modules which are imported in the original module for internal use. Every module usually imports several other modules, and since public module names are not underscored, they pollute the namespace of the module. To prevent leaking they names you need to import them under underscored name, like "import sys as _sys" (if you don't want to use __all__). This is cumbersome and makes the module code less readable. 2. Importing submodules. The problem is that the result depends on the history of imports. If you imported "module.submodule" before or if it was imported implicitly by other module, "from module import *" will import the "submodule" name. But if it was not imported before, "from module import *" will import the "submodule" name. The proposed PR excludes modules from importing by star-import if __all__ is not defined. Discussion on Python-ideas: https://mail.python.org/archives/list/python-ideas at python.org/thread/AKWL7CRCCFACSITAH2NNFBL5BGRKLKJD/ ---------- components: Interpreter Core messages: 352736 nosy: gvanrossum, serhiy.storchaka priority: normal severity: normal status: open title: Do not import modules in star-import when __all__ is not defined. type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 12:00:20 2019 From: report at bugs.python.org (Ammar Askar) Date: Wed, 18 Sep 2019 16:00:20 +0000 Subject: [issue38204] Cannot compile on RPi with optimizations In-Reply-To: <1568757908.38.0.366967403928.issue38204@roundup.psfhosted.org> Message-ID: <1568822420.32.0.707580675334.issue38204@roundup.psfhosted.org> Ammar Askar added the comment: Hmm, I think this might be the following gcc/binutils bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84847 https://sourceware.org/bugzilla/show_bug.cgi?id=20882 This might be a bit of a pain but could you try updating binutils and see if the problem persists. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 12:00:46 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 18 Sep 2019 16:00:46 +0000 Subject: [issue38215] Do not import modules in star-import when __all__ is not defined. In-Reply-To: <1568822213.45.0.69943350833.issue38215@roundup.psfhosted.org> Message-ID: <1568822446.57.0.412029199541.issue38215@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +15856 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16263 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 12:14:30 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 18 Sep 2019 16:14:30 +0000 Subject: [issue38216] Fix for issue30458 prevents crafting invalid requests Message-ID: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> New submission from Jason R. Coombs : The fix for issue30458 prevents any request line from transmitting non-ascii characters. In some cases, it's useful to transmit these illegal bytes in order to simulate a maliciously-crafted request (such as to ensure a web server responds correctly to such a request). This limitation is a regression from previous behavior that allowed transmission of such invalid requests. For example, consider [this comment](https://github.com/cherrypy/cherrypy/issues/1781#issuecomment-507836873), where tests in CherryPy were disabled due to emergent failures against nightly builds. Originally, I reported this issue in issue36274, but I believe this issue is distinct and has a different timeline from that issue. In [this comment](https://bugs.python.org/issue36274#msg352711), xtreak suggests that the proper solution might be not to transmit raw invalid characters but to actually rely on URL quoting to "transmit" those bytes. While that does seem to exercise CherryPy's error detection properly, I believe it still fails to exercise the receipt and handling of raw invalid bytes, but it does provide a possible satisfactory mitigation to this issue. ---------- messages: 352738 nosy: jaraco priority: normal severity: normal status: open title: Fix for issue30458 prevents crafting invalid requests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 12:15:39 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 18 Sep 2019 16:15:39 +0000 Subject: [issue36274] http.client cannot send non-ASCII request lines In-Reply-To: <1552422803.93.0.420596825145.issue36274@roundup.psfhosted.org> Message-ID: <1568823339.52.0.667696749356.issue36274@roundup.psfhosted.org> Jason R. Coombs added the comment: I've created issue38216 to address the issue of sending invalid bytes in the request line, separate from the original intention and title issue about sending non-ASCII. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 12:17:23 2019 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 18 Sep 2019 16:17:23 +0000 Subject: [issue17258] multiprocessing.connection challenge implicitly uses MD5 In-Reply-To: <1361391096.59.0.84157337171.issue17258@psf.upfronthosting.co.za> Message-ID: <1568823443.95.0.977058772661.issue17258@roundup.psfhosted.org> Change by Charalampos Stratakis : ---------- pull_requests: +15857 pull_request: https://github.com/python/cpython/pull/16264 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 12:19:11 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 18 Sep 2019 16:19:11 +0000 Subject: [issue38216] Fix for issue30458 prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1568823551.89.0.131036203301.issue38216@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 12:19:49 2019 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 18 Sep 2019 16:19:49 +0000 Subject: [issue38215] Do not import modules in star-import when __all__ is not defined. In-Reply-To: <1568822213.45.0.69943350833.issue38215@roundup.psfhosted.org> Message-ID: <1568823589.12.0.237750479019.issue38215@roundup.psfhosted.org> Guido van Rossum added the comment: I feel that this is a relatively minor issue, and not worth breaking "working" code over. Some more pedantic tool like a linter or type checker would be a better place to start diagnosing this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 12:19:53 2019 From: report at bugs.python.org (Sviatoslav Sydorenko) Date: Wed, 18 Sep 2019 16:19:53 +0000 Subject: [issue38216] Fix for issue30458 prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1568823593.6.0.721583737305.issue38216@roundup.psfhosted.org> Change by Sviatoslav Sydorenko : ---------- nosy: +webknjaz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 12:20:02 2019 From: report at bugs.python.org (Ryan Govostes) Date: Wed, 18 Sep 2019 16:20:02 +0000 Subject: [issue38217] argparse should support multiple types when nargs > 1 Message-ID: <1568823602.67.0.456772116494.issue38217@roundup.psfhosted.org> New submission from Ryan Govostes : argparse supports consuming multiple command-line arguments with nargs=2, etc. It converts them to the type given in the argument's type parameter. argparse does not provide a good solution when the input arguments should be different data types. For an example, you cannot have an argument that expects a str followed by an int, '--set-age Bob 34'. Ordinarily, the suggestion would be to split it into two arguments, like '--set-person Bob --set-age 34'. However, this becomes awkward with an action such as 'append', where the command line arguments become tedious, like '--set-person Bob --set-age 34 --set-person Alice --set-age 29', or confusing, as in '--set-person Bob --set-person Alice --set-age 34 --set-age 29'. My proposal is to allow the 'type' parameter to accept a tuple of types: p.add_argument('--set-age', nargs=2, type=(str, int)) Since 'nargs' is redundant, this could even be simplified to just: p.add_argument('--set-age', type=(str, int)) The resulting parsed argument would then be a tuple of (str, int), as opposed to a list. If action='append', the result would be a list of such tuples. This creates no backwards compatibility issue because tuple instances are not callable, so this was never valid code that did something else. A further enhancement could be that when nargs='+' or '*', and a tuple of types is provided, the types are used round robin: '--set-ages Bob 34 Alice 29'. An exception would be raised if it would create an incomplete tuple. See here for other discussion and workarounds: https://stackoverflow.com/questions/16959101/python-argparse-how-to-have-nargs-2-with-type-str-and-type-int ---------- components: Library (Lib) messages: 352741 nosy: rgov priority: normal severity: normal status: open title: argparse should support multiple types when nargs > 1 type: enhancement versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 12:36:33 2019 From: report at bugs.python.org (Thomas Knox) Date: Wed, 18 Sep 2019 16:36:33 +0000 Subject: [issue38204] Cannot compile on RPi with optimizations In-Reply-To: <1568757908.38.0.366967403928.issue38204@roundup.psfhosted.org> Message-ID: <1568824593.08.0.0464669050559.issue38204@roundup.psfhosted.org> Thomas Knox added the comment: I updated binutils: pi at pi4b:~/Downloads/Python-3.8.0b4 $ ld --version GNU ld (GNU Binutils) 2.32 Same problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 12:40:38 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 18 Sep 2019 16:40:38 +0000 Subject: [issue36274] http.client cannot send non-ASCII request lines In-Reply-To: <1552422803.93.0.420596825145.issue36274@roundup.psfhosted.org> Message-ID: <1568824838.96.0.982506616595.issue36274@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: > @xtreak the encoded null-byte test would be an extra test case to consider. It is reasonable to test as many known invalid sequences as possible. Changing that byte to encoded notation would just replace one test with another effectively changing the semantics of it. Agreed that it's slightly different but I also admit I was also relying on the fact that encoded request will also be decoded by the server as done in most web frameworks to act upon the decoded payload. There could be systems where raw null byte might need to be transferred where the receiving system might not decode the payload but it seemed to be a workaround to ensure the required exception of serving null byte included static file was handled properly by CherryPy and also seemed to be adopted by others like urllib3. > To me, it's quite weird that it's considered a CVE at all: it's happening on the client side and it doesn't prevent the user from just feeding the proper bytes right into the socket so why overcomplicate things? The impacted function in http is used by functions like urllib.urlopen which is often feeded with input from the user that is not validated properly with some expectation that the function itself might handle the URL parsing and is safe enough. In this case it could lead to things like SSRF where malicious input could end up executing arbitrary code in some of the systems like Redis as demonstrated in the report. As for the CVE in question it was originally reported to golang and the same attack was also found out to be vulnerable. The fix adopted also seemed to have address few other security reports of similar nature. Thanks Jason, as issue38216 is now a separate issue we can discuss around there. I guess this issue then is not a 3.7 only regression anymore since the original issue reported predates 3.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 12:41:52 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 18 Sep 2019 16:41:52 +0000 Subject: [issue38217] argparse should support multiple types when nargs > 1 In-Reply-To: <1568823602.67.0.456772116494.issue38217@roundup.psfhosted.org> Message-ID: <1568824912.68.0.407471536965.issue38217@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +paul.j3, rhettinger versions: -Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 12:58:43 2019 From: report at bugs.python.org (paul j3) Date: Wed, 18 Sep 2019 16:58:43 +0000 Subject: [issue38217] argparse should support multiple types when nargs > 1 In-Reply-To: <1568823602.67.0.456772116494.issue38217@roundup.psfhosted.org> Message-ID: <1568825923.62.0.11712666576.issue38217@roundup.psfhosted.org> paul j3 added the comment: Which is more valuable to you, the string conversion, or the checking? What's wrong with doing the 'type check' in post parsing code? (MarSoft's answer in the SO link). To make a better case for this, I'd suggest writing your own fix. It doesn't need to be a polished push, but enough code to show that the change is relatively simple (preferably occurring in only one or two functions). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 13:15:12 2019 From: report at bugs.python.org (Ethan Furman) Date: Wed, 18 Sep 2019 17:15:12 +0000 Subject: [issue38215] Do not import modules in star-import when __all__ is not defined. In-Reply-To: <1568822213.45.0.69943350833.issue38215@roundup.psfhosted.org> Message-ID: <1568826912.61.0.521505708144.issue38215@roundup.psfhosted.org> Ethan Furman added the comment: I don't think this is worth the code breakage. The advice already given is not to use `import *` unless: - the module was designed for that usage; or - you know what you are doing. ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 13:29:23 2019 From: report at bugs.python.org (Brett Cannon) Date: Wed, 18 Sep 2019 17:29:23 +0000 Subject: [issue38215] Do not import modules in star-import when __all__ is not defined. In-Reply-To: <1568822213.45.0.69943350833.issue38215@roundup.psfhosted.org> Message-ID: <1568827763.54.0.493309406364.issue38215@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 13:37:13 2019 From: report at bugs.python.org (Jason Plurad) Date: Wed, 18 Sep 2019 17:37:13 +0000 Subject: [issue38218] SyntaxError in Tutorial 8.6 Defining Clean-up Actions Message-ID: <1568828233.7.0.343332850468.issue38218@roundup.psfhosted.org> New submission from Jason Plurad : The second code example in Tutorial section 8.6 defines the function: def bool_return(): -> bool: which throws a SyntaxError: invalid syntax If the function wants to use a return annotation, there should not be a colon after the function name. I have a pull request ready for this. ---------- assignee: docs at python components: Documentation messages: 352746 nosy: Jason Plurad, docs at python priority: normal severity: normal status: open title: SyntaxError in Tutorial 8.6 Defining Clean-up Actions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 13:37:45 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 18 Sep 2019 17:37:45 +0000 Subject: [issue38215] Do not import modules in star-import when __all__ is not defined. In-Reply-To: <1568822213.45.0.69943350833.issue38215@roundup.psfhosted.org> Message-ID: <1568828265.61.0.073649784106.issue38215@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 13:39:29 2019 From: report at bugs.python.org (Roundup Robot) Date: Wed, 18 Sep 2019 17:39:29 +0000 Subject: [issue38218] SyntaxError in Tutorial 8.6 Defining Clean-up Actions In-Reply-To: <1568828233.7.0.343332850468.issue38218@roundup.psfhosted.org> Message-ID: <1568828369.08.0.528022710496.issue38218@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +15858 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16265 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 13:41:01 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 18 Sep 2019 17:41:01 +0000 Subject: [issue38215] Do not import modules in star-import when __all__ is not defined. In-Reply-To: <1568822213.45.0.69943350833.issue38215@roundup.psfhosted.org> Message-ID: <1568828461.92.0.627735159355.issue38215@roundup.psfhosted.org> Serhiy Storchaka added the comment: I believe that significant part or even most of code is writing without using linters and type checkers. Python is too convenient for non-professional programmers. You do not need to declare all variables with their types to use Python and do not need to run a compiler/linker/checker after editing sources. There was such mistake (using a module implicitly imported by star-import) even in the Python stdlib (fixed now). This change would increase the quality of code if you do not use __all__ and do not have habits to write "import sys as _sys". It will not affect professional code. It is just a small step in the direction of been casual user friendly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 13:43:54 2019 From: report at bugs.python.org (Ethan Furman) Date: Wed, 18 Sep 2019 17:43:54 +0000 Subject: [issue38215] Do not import modules in star-import when __all__ is not defined. In-Reply-To: <1568822213.45.0.69943350833.issue38215@roundup.psfhosted.org> Message-ID: <1568828634.6.0.687912546354.issue38215@roundup.psfhosted.org> Ethan Furman added the comment: It's the casual users' code that will break. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 14:25:55 2019 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Wed, 18 Sep 2019 18:25:55 +0000 Subject: [issue38200] Adding itertools.pairwise to the standard library? In-Reply-To: <1568736008.51.0.85414927582.issue38200@roundup.psfhosted.org> Message-ID: <1568831155.5.0.458403131435.issue38200@roundup.psfhosted.org> Vedran ?a?i? added the comment: I also use it all the time. Most recently in some numerical calculation for successive differences. My main problem is that I'm too often tempted to just zip l with l[1:], thereby restricting the code to sequences, when it would work perfectly well for any iterable. (Just as I sometimes write range(lots of nines) instead of itertools.count() *shame*;) ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 14:43:20 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 18 Sep 2019 18:43:20 +0000 Subject: [issue36274] http.client cannot send non-ASCII request lines In-Reply-To: <1552422803.93.0.420596825145.issue36274@roundup.psfhosted.org> Message-ID: <1568832200.88.0.0367628269274.issue36274@roundup.psfhosted.org> Jason R. Coombs added the comment: That's right - no longer a 3.7 regression here. ---------- keywords: -3.7regression _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 14:43:53 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 18 Sep 2019 18:43:53 +0000 Subject: [issue38216] Fix for issue30458 prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1568832233.82.0.213925810079.issue38216@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- keywords: +3.6regression, 3.7regression _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 14:44:54 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 18 Sep 2019 18:44:54 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1568832294.33.0.124798931516.issue30458@roundup.psfhosted.org> Jason R. Coombs added the comment: I've created issue38216 to address the (perceived) regression. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 15:15:56 2019 From: report at bugs.python.org (Tim Peters) Date: Wed, 18 Sep 2019 19:15:56 +0000 Subject: [issue38200] Adding itertools.pairwise to the standard library? In-Reply-To: <1568736008.51.0.85414927582.issue38200@roundup.psfhosted.org> Message-ID: <1568834156.47.0.295989061605.issue38200@roundup.psfhosted.org> Tim Peters added the comment: There's an eternal culture clash here: functional languages have a long history of building in just about everything of plausible use, regardless of how trivial to build on other stuff. This started when LISP was barely released before (cadr x) was introduced as a shorthand for (car (cdr x)), and (caddr x) for (car (cdr (cdr x))), and so on. Which more modern functional languages also supply (second x) and (third x) spellings for (_and_ nth(2, x) and nth(3, x) spellings). This one is harder to get right than those, but not hard at all. But it's not coincidence that itertoolz[1] (note the trailing 'z') also supplies it, spelled `sliding_window(width, iterable)` there. Working with finite difference algorithms is probably "the most obvious" use case for a width of 2. More esoterically, one of my favorite "technical indicators" for stock analysis is a dead simple 20-period simple moving average, which can be built very conveniently (although not very efficiently - but I don't usually care) by mapping a mean function over a sliding window of width 20. BTW, if you want padding on each end, you can apply pairwise to `chain([first], iterable, [last])`. A related function is breaking an iterable into _non_-overlapping chunks of a given width. itertoolz spells that "partition". For me that comes up more often than overlapping windows. I like having these things around, but it's not a big deal. Perhaps it would be an easier decision in Python if we gave up on believing that everything in itertools _must_ be coded in C. In functional idioms sometimes speed isn't the point at all, but rather using conventional names for simple but compound functionality. Like that "sliding window" is a concept in its own right. If I'm _picturing_ an algorithm in terms of a sliding window, then - of course - the shortest distance to working code is to use a facility that already implements that concept. Which is a long way of saying +0. [1] https://toolz.readthedocs.io/en/latest/api.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 16:46:08 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 18 Sep 2019 20:46:08 +0000 Subject: [issue38219] Optimize dict.__init__ and dict.update for dict argument Message-ID: <1568839568.62.0.894949186749.issue38219@roundup.psfhosted.org> New submission from Serhiy Storchaka : dict.__init__() and dict.update() with a positional argument look up the "keys" attribute of the argument to distinguish a mapping from a sequence of item-value pairs. It has a non-trivial cost. Merging dicts is optimized for exact dicts in PyDict_Merge(), so it would be worth to optimize also this check. $ ./python -m pyperf timeit -s "d = {}; D = dict" -- "D(d)" Unpatched: Mean +- std dev: 154 ns +- 4 ns Patched: Mean +- std dev: 110 ns +- 4 ns $ ./python -m pyperf timeit -s "d = {}" -- "d.update(d)" Unpatched: Mean +- std dev: 112 ns +- 3 ns Patched: Mean +- std dev: 70.4 ns +- 1.5 ns The cost of the check is about 40 ns, and it is a significant part of the total time of creating/updating a small dict. ---------- components: Interpreter Core messages: 352753 nosy: rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: Optimize dict.__init__ and dict.update for dict argument type: performance versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 16:47:30 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 18 Sep 2019 20:47:30 +0000 Subject: [issue38219] Optimize dict.__init__ and dict.update for dict argument In-Reply-To: <1568839568.62.0.894949186749.issue38219@roundup.psfhosted.org> Message-ID: <1568839650.18.0.901416057753.issue38219@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +15859 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16268 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 16:57:42 2019 From: report at bugs.python.org (David Cuthbert) Date: Wed, 18 Sep 2019 20:57:42 +0000 Subject: =?utf-8?q?=5Bissue34820=5D_binascii=2Ec=3A1578=3A1=3A_error=3A_the_contro?= =?utf-8?q?l_flow_of_function_=E2=80=98binascii=5Fcrc32=E2=80=99_does_not_?= =?utf-8?q?match_its_profile_data_=28counter_=E2=80=98arcs=E2=80=99=29?= In-Reply-To: <1538056682.62.0.545547206417.issue34820@psf.upfronthosting.co.za> Message-ID: <1568840262.74.0.2160105562.issue34820@roundup.psfhosted.org> David Cuthbert added the comment: I'm seeing this on a rebuild now of Python 3.7.4 on Ubuntu 18.04 (in my case against _ssl.c). What's happening is there's coverage/profiling data being generated in the build chain (somewhere), which spits out files named *.gcda. Interestingly, make clean does *not* clean these files up. gcc is attempting to use this data in its optimization, but discovers that it's now bogus -- likely due to system library headers (like OpenSSL) being updated in the meantime, with some inline code causing the coverage data to become invalid. The fix should be to have 'make clean' clean up these *.gcda files. In the meantime, the workaround is to run "find . -name \*.gcda -exec rm '{}' \;" ---------- nosy: +dacut versions: +Python 3.7 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 16:58:29 2019 From: report at bugs.python.org (David Cuthbert) Date: Wed, 18 Sep 2019 20:58:29 +0000 Subject: =?utf-8?q?=5Bissue34820=5D_binascii=2Ec=3A1578=3A1=3A_error=3A_the_contro?= =?utf-8?q?l_flow_of_function_=E2=80=98binascii=5Fcrc32=E2=80=99_does_not_?= =?utf-8?q?match_its_profile_data_=28counter_=E2=80=98arcs=E2=80=99=29?= In-Reply-To: <1538056682.62.0.545547206417.issue34820@psf.upfronthosting.co.za> Message-ID: <1568840309.15.0.209569983512.issue34820@roundup.psfhosted.org> Change by David Cuthbert : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 17:03:06 2019 From: report at bugs.python.org (Joan) Date: Wed, 18 Sep 2019 21:03:06 +0000 Subject: [issue38220] Wrong values for %b and %B in ca_ES and ca_AD locales Message-ID: <1568840586.34.0.840255264722.issue38220@roundup.psfhosted.org> New submission from Joan : There's an incorrect behaviour in the output for the strftime values when in catalan. On the documentation at https://docs.python.org/3.7/library/datetime.html#strftime-strptime-behavior: - %b Month as locale?s abbreviated name. Jan, Feb, ?, Dec (en_US) - %B Month as locale?s full name. January, February, ?, December (en_US); It works also in es_ES an others, while in catalan there's an extra article on the month name (and a point in the abbreviated version) that shouldn't be there de "set." and "de setembre". Where should I go to fix this and get the documented behaviour? I haven't been able to find a translation section on python site. ---------- components: Library (Lib) messages: 352755 nosy: aseques priority: normal severity: normal status: open title: Wrong values for %b and %B in ca_ES and ca_AD locales type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 17:09:52 2019 From: report at bugs.python.org (Joan) Date: Wed, 18 Sep 2019 21:09:52 +0000 Subject: [issue38220] Wrong values for %b and %B in ca_ES and ca_AD locales In-Reply-To: <1568840586.34.0.840255264722.issue38220@roundup.psfhosted.org> Message-ID: <1568840992.04.0.229419861968.issue38220@roundup.psfhosted.org> Joan added the comment: Issue can be reproduced with this snippet: --- import locale from datetime import datetime locale.setlocale(locale.LC_ALL, 'ca_AD.utf8') locale.setlocale(locale.LC_ALL, 'ca_ES.utf8') #locale.setlocale(locale.LC_ALL, 'es_ES.utf8') now = datetime.now() # current date and time date_time = now.strftime("|%b|%B|") print("date and time:",date_time) --- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 17:16:21 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 18 Sep 2019 21:16:21 +0000 Subject: =?utf-8?q?=5Bissue34820=5D_binascii=2Ec=3A1578=3A1=3A_error=3A_the_contro?= =?utf-8?q?l_flow_of_function_=E2=80=98binascii=5Fcrc32=E2=80=99_does_not_?= =?utf-8?q?match_its_profile_data_=28counter_=E2=80=98arcs=E2=80=99=29?= In-Reply-To: <1538056682.62.0.545547206417.issue34820@psf.upfronthosting.co.za> Message-ID: <1568841381.51.0.0273518897942.issue34820@roundup.psfhosted.org> Change by Ned Deily : ---------- stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 17:41:46 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 18 Sep 2019 21:41:46 +0000 Subject: [issue38205] Python no longer compiles without small integer singletons In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1568842906.51.0.840957491437.issue38205@roundup.psfhosted.org> Gregory P. Smith added the comment: While I don't like how that get_small_int macro is defined... and I don't like that Py_UNREACHABLE() was usable as an expression in the past... it is probably best to just revert 3ab61473ba7f3dca32d779ec2766a4faa0657923. The choice to use a macro for this when it was created and the way the macro was defined means it is an expression forever unless we want to bother forcing code cleanups for uses of it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 17:48:26 2019 From: report at bugs.python.org (Zachary Ware) Date: Wed, 18 Sep 2019 21:48:26 +0000 Subject: [issue38205] Python no longer compiles without small integer singletons In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1568843306.1.0.0632242899592.issue38205@roundup.psfhosted.org> Zachary Ware added the comment: I have poked at this a bit and have an implementation that defines a `static inline void _Py_Unreachable()` in pymacro.h, see https://github.com/zware/cpython/commit/d07b4255dc1170155e18db0fea99ec1cb29c2f0a This works on at least macOS and Windows, and we also have prior art for defining static inline functions in headers in GH-10079. If we agree that that's an acceptable solution, I'll open a PR for that change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 18:12:36 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 18 Sep 2019 22:12:36 +0000 Subject: [issue38216] Fix for issue30458 prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1568844756.89.0.269790518771.issue38216@roundup.psfhosted.org> Ned Deily added the comment: Thanks for identifying this issue and breaking it out into a separate bpo, Jason. If I understand correctly, the problematic fix for Issue30458 has already been released in maintenance release 3.7.4 and security release 3.6.9, is in the current security release candidate 3.5.8rc1, as well as 3.8.0b4, and, without further action, will be in 2.7.17rc1 and continue to be in 3.7.5rc1. In other words, this issue potentially affects all currently maintained Python branches and/or releases. (In addition, there appear to be still unresolved questions about the original Issue30458 and the CVE's associated with it. But let's ignore those here. My brain hurts enough already.) The immediate question for me is what to do about 3.7.5. We could: 1. hold 3.7.5rc1 for a mitigation fix 2. release 3.7.5rc1 and accept a fix for 3.7.5final or for an unplanned 3.7.5rc2 3. fix in 3.7.6 4. do nothing other than possibly a doc change Since 3.5.8rc1 is already released for testing, a similar decision needs to be made for it. And 3.8.0rc1 and 2.7.17rc1 are schedulded for tagging om the coming weeks. Since the problem. as best I understand, is most likely to impact tests rather than legitimate user cases (is that correct?) and, since at least some projects and users of 3.7.4 impacted by the change have developed workarounds, and since 3.7.5rc1 is being delayed pending a resolution of this, I think the best options for 3.7.5 at this point are either 2 or 3 above. So, unless someone expresses a major objection in the next few hours, I am going to proceed with 3.7.5rc1 as is with the hope that we will have final resolution prior to 3.7.5 final. Decisions will still have to be made by the other RMs for their branches. ---------- nosy: +benjamin.peterson, larry, lukasz.langa, ned.deily priority: normal -> release blocker versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 18:30:08 2019 From: report at bugs.python.org (Ned Deily) Date: Wed, 18 Sep 2019 22:30:08 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1568845808.0.0.793103258914.issue30458@roundup.psfhosted.org> Ned Deily added the comment: With the breaking out of the portential and/or actual regression (e.g. invalid requests can no longer be crafted) into Issue38216, itself a potential release blocker, we are still left here with the as-yet unresolved issue identified above in msg34728 (e.g. not checking for control characters in the "host" part of the URL, only the "path" part). Since this also affects so many branches/releases and has external components (CVE's, third-party impacts), it probably would have made sense to break it out into a separate issue (and maybe it still does). But since this problem has been present for many releases (apparently), I would rather not further hold the 3.7.5 release for a resolution (though that would be a good thing) so I'm going to change the priority for the moment to "deferred blocker". But we need someone (preferably a core dev already involved) to take charge of this and push it to a resolution. Thanks for everyone's help so far! ---------- priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 18:56:31 2019 From: report at bugs.python.org (Tim Burke) Date: Wed, 18 Sep 2019 22:56:31 +0000 Subject: [issue38216] Fix for issue30458 prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1568847391.81.0.847360655447.issue38216@roundup.psfhosted.org> Change by Tim Burke : ---------- nosy: +tburke _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 20:31:30 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 19 Sep 2019 00:31:30 +0000 Subject: [issue35379] IDLE's close fails io is set to None on Mac In-Reply-To: <1543775410.03.0.788709270274.issue35379@psf.upfronthosting.co.za> Message-ID: <1568853090.07.0.815892629657.issue35379@roundup.psfhosted.org> Terry J. Reedy added the comment: #17822 is not what I was thinking of, nor are #17614 or #22614, so I considered this issue done for now. ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 20:46:01 2019 From: report at bugs.python.org (Eric Wieser) Date: Thu, 19 Sep 2019 00:46:01 +0000 Subject: [issue29258] __init__.py required for pkgutil.walk_packages in python3 In-Reply-To: <1484282874.75.0.69511180509.issue29258@psf.upfronthosting.co.za> Message-ID: <1568853961.42.0.92890489615.issue29258@roundup.psfhosted.org> Change by Eric Wieser : ---------- nosy: +Eric Wieser _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 20:51:45 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 19 Sep 2019 00:51:45 +0000 Subject: [issue17822] Save on Close windows (IDLE) In-Reply-To: <1366722813.3.0.645227250665.issue17822@psf.upfronthosting.co.za> Message-ID: <1568854305.33.0.737702809861.issue17822@roundup.psfhosted.org> Terry J. Reedy added the comment: AttributeErrors on closing were a separate issue. They are now caught on closing. #35379. Save on Close is now modal on Windows also, in that one cannot do anything with the Window being closed. One can try to close a second dirty window. Saying 'no' in either dialog no longer crashes. The only oddity is that if one switched from the 2nd dialog to the 1st and say 'no' on the first first, it does not immediately close until one answers on the second. It seems normal to me that the 2nd call that raises the 2nd dialog blocks the 1st from receiving and responding to the 1st click until the 2nd call returns. Thus the bugs reported here have been otherwise fixed. ---------- resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 21:03:41 2019 From: report at bugs.python.org (Ma Lin) Date: Thu, 19 Sep 2019 01:03:41 +0000 Subject: [issue38205] Python no longer compiles without small integer singletons In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1568855021.51.0.324915468566.issue38205@roundup.psfhosted.org> Ma Lin added the comment: If use static inline function, and Py_UNREACHABLE() inside an if-else branch that should return a value, compiler may emit warning: https://godbolt.org/z/YtcNSf MSVC v19.14: warning C4715: 'test': not all control paths return a value clang 8.0.0: warning: control may reach end of non-void function [-Wreturn-type] Other compilers (gcc, icc) don't emit this warning. This situation in real code: https://github.com/python/cpython/blob/v3.8.0b4/Include/object.h#L600 https://github.com/python/cpython/blob/v3.8.0b4/Objects/longobject.c#L3088 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 21:08:03 2019 From: report at bugs.python.org (Ma Lin) Date: Thu, 19 Sep 2019 01:08:03 +0000 Subject: [issue38205] Python no longer compiles without small integer singletons In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1568855283.66.0.247899951864.issue38205@roundup.psfhosted.org> Change by Ma Lin : ---------- keywords: +patch pull_requests: +15860 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16270 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 21:11:08 2019 From: report at bugs.python.org (Ma Lin) Date: Thu, 19 Sep 2019 01:11:08 +0000 Subject: [issue38205] Python no longer compiles without small integer singletons In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1568855468.09.0.584803077163.issue38205@roundup.psfhosted.org> Ma Lin added the comment: PR 16270 use Py_UNREACHABLE() in a single line. It solves this particular issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 21:34:35 2019 From: report at bugs.python.org (Ammar Askar) Date: Thu, 19 Sep 2019 01:34:35 +0000 Subject: [issue38205] Python no longer compiles without small integer singletons In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1568856875.8.0.508923457297.issue38205@roundup.psfhosted.org> Ammar Askar added the comment: For the control path warning, that can be fixed by just hinting to the compiler that the function doesn't return like so: # ifdef __GNUC__ __attribute__ ((noreturn)) # elif defined(_MSC_VER) __declspec(noreturn) # endif static inline void _Py_UNREACHABLE() { (https://godbolt.org/z/AG9tx_) ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 18 21:53:04 2019 From: report at bugs.python.org (Lindsay Haisley) Date: Thu, 19 Sep 2019 01:53:04 +0000 Subject: [issue38221] Enhancement to pydoc for Python 3.6 to allow full backgrounding as a server Message-ID: <1568857984.74.0.551082494657.issue38221@roundup.psfhosted.org> New submission from Lindsay Haisley : This patch extends the functionality of pydoc3 to allow it to run purely as a server, as is the case with pydoc for python 2.7. If the -d option is specified, pydoc as a server (-p option) may be backgrounded to a subshell with "&". ---------- assignee: docs at python components: Documentation files: pydoc3.diff keywords: patch messages: 352766 nosy: docs at python, fmouse priority: normal severity: normal status: open title: Enhancement to pydoc for Python 3.6 to allow full backgrounding as a server type: enhancement versions: Python 3.6 Added file: https://bugs.python.org/file48613/pydoc3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 00:03:39 2019 From: report at bugs.python.org (Paulo Henrique Silva) Date: Thu, 19 Sep 2019 04:03:39 +0000 Subject: [issue38116] Make select module PEP-384 compatible In-Reply-To: <1568213295.38.0.552886185542.issue38116@roundup.psfhosted.org> Message-ID: <1568865819.4.0.125425971008.issue38116@roundup.psfhosted.org> Change by Paulo Henrique Silva : ---------- nosy: +phsilva _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 01:27:03 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 19 Sep 2019 05:27:03 +0000 Subject: [issue38218] SyntaxError in Tutorial 8.6 Defining Clean-up Actions In-Reply-To: <1568828233.7.0.343332850468.issue38218@roundup.psfhosted.org> Message-ID: <1568870823.2.0.554986789527.issue38218@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15861 pull_request: https://github.com/python/cpython/pull/16272 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 01:27:11 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 19 Sep 2019 05:27:11 +0000 Subject: [issue38218] SyntaxError in Tutorial 8.6 Defining Clean-up Actions In-Reply-To: <1568828233.7.0.343332850468.issue38218@roundup.psfhosted.org> Message-ID: <1568870831.1.0.574510698046.issue38218@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15862 pull_request: https://github.com/python/cpython/pull/16273 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 01:27:39 2019 From: report at bugs.python.org (Eryk Sun) Date: Thu, 19 Sep 2019 05:27:39 +0000 Subject: [issue38220] Wrong values for %b and %B in ca_ES and ca_AD locales In-Reply-To: <1568840586.34.0.840255264722.issue38220@roundup.psfhosted.org> Message-ID: <1568870859.36.0.0232619444274.issue38220@roundup.psfhosted.org> Eryk Sun added the comment: The result from strftime is platform dependent. In Windows, the result has a trailing "." for the abbreviated names that are less than four characters, but no "de" in either form: >>> months = [(2019, m) + (0,)*7 for m in range(1,13)] >>> locale.setlocale(locale.LC_ALL, 'ca_ES.utf8') 'ca_ES.utf8' >>> print(*(time.strftime('%b|%B', m) for m in months), sep='\n') gen.|gener febr.|febrer mar?|mar? abr.|abril maig|maig juny|juny jul.|juliol ag.|agost set.|setembre oct.|octubre nov.|novembre des.|desembre In Linux, the result uses the same base abbreviations as in Windows, including the trailing ".", but it also includes "de" or "d'" in both forms: >>> months = [(2019, m) + (0,)*7 for m in range(1,13)] >>> locale.setlocale(locale.LC_ALL, 'ca_ES.utf8') 'ca_ES.utf8' >>> print(*(time.strftime('%b|%B', m) for m in months), sep='\n') de gen.|de gener de febr.|de febrer de mar?|de mar? d?abr.|d?abril de maig|de maig de juny|de juny de jul.|de juliol d?ag.|d?agost de set.|de setembre d?oct.|d?octubre de nov.|de novembre de des.|de desembre ---------- nosy: +eryksun resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 01:31:03 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 19 Sep 2019 05:31:03 +0000 Subject: [issue38218] SyntaxError in Tutorial 8.6 Defining Clean-up Actions In-Reply-To: <1568828233.7.0.343332850468.issue38218@roundup.psfhosted.org> Message-ID: <1568871063.76.0.311089741054.issue38218@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15863 pull_request: https://github.com/python/cpython/pull/16274 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 01:31:37 2019 From: report at bugs.python.org (miss-islington) Date: Thu, 19 Sep 2019 05:31:37 +0000 Subject: [issue38218] SyntaxError in Tutorial 8.6 Defining Clean-up Actions In-Reply-To: <1568828233.7.0.343332850468.issue38218@roundup.psfhosted.org> Message-ID: <1568871097.75.0.0507395879905.issue38218@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15864 pull_request: https://github.com/python/cpython/pull/16275 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 01:37:41 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 19 Sep 2019 05:37:41 +0000 Subject: [issue38218] SyntaxError in Tutorial 8.6 Defining Clean-up Actions In-Reply-To: <1568828233.7.0.343332850468.issue38218@roundup.psfhosted.org> Message-ID: <1568871461.75.0.43431760823.issue38218@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 20d3bce3effd7cca71a9bf3caa247eef2791517b by St?phane Wirtel (Miss Islington (bot)) in branch '3.7': [3.7] bpo-38218: Doc: Corrected syntax for return annotation (GH-16265) (GH-16275) https://github.com/python/cpython/commit/20d3bce3effd7cca71a9bf3caa247eef2791517b ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 01:43:00 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 19 Sep 2019 05:43:00 +0000 Subject: [issue38218] SyntaxError in Tutorial 8.6 Defining Clean-up Actions In-Reply-To: <1568828233.7.0.343332850468.issue38218@roundup.psfhosted.org> Message-ID: <1568871780.48.0.531265262226.issue38218@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 6612a4fd36c7f2d71b00da12a3ad4ce619670cd2 by St?phane Wirtel (Miss Islington (bot)) in branch '3.8': [3.8] bpo-38218: Doc: Corrected syntax for return annotation (GH-16265) (GH-16274) https://github.com/python/cpython/commit/6612a4fd36c7f2d71b00da12a3ad4ce619670cd2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 01:50:33 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 19 Sep 2019 05:50:33 +0000 Subject: [issue38218] SyntaxError in Tutorial 8.6 Defining Clean-up Actions In-Reply-To: <1568828233.7.0.343332850468.issue38218@roundup.psfhosted.org> Message-ID: <1568872233.95.0.543346927449.issue38218@roundup.psfhosted.org> St?phane Wirtel added the comment: Thank you for your contribution ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 02:01:05 2019 From: report at bugs.python.org (Miki Tebeka) Date: Thu, 19 Sep 2019 06:01:05 +0000 Subject: [issue38222] pathlib Path objects should support __format__ Message-ID: <1568872865.53.0.090540874839.issue38222@roundup.psfhosted.org> New submission from Miki Tebeka : Currently pathlib.Path cannot be used with string formatting directives. IMO it should. >>> from pathlib import Path >>> path = Path('/path/to/enlightenment') >>> print(f'path is: {path:>50}') Traceback (most recent call last): File "", line 1, in TypeError: unsupported format string passed to PosixPath.__format__ ---------- components: Library (Lib) messages: 352771 nosy: tebeka priority: normal severity: normal status: open title: pathlib Path objects should support __format__ type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 02:03:27 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 19 Sep 2019 06:03:27 +0000 Subject: [issue38222] pathlib Path objects should support __format__ In-Reply-To: <1568872865.53.0.090540874839.issue38222@roundup.psfhosted.org> Message-ID: <1568873007.16.0.680284254328.issue38222@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 03:26:14 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 19 Sep 2019 07:26:14 +0000 Subject: [issue38222] pathlib Path objects should support __format__ In-Reply-To: <1568872865.53.0.090540874839.issue38222@roundup.psfhosted.org> Message-ID: <1568877974.73.0.733024113543.issue38222@roundup.psfhosted.org> Serhiy Storchaka added the comment: Convert it to string first: print(f'path is: {path!s:>50}') ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 03:39:57 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 19 Sep 2019 07:39:57 +0000 Subject: [issue38219] Optimize dict.__init__ and dict.update for dict argument In-Reply-To: <1568839568.62.0.894949186749.issue38219@roundup.psfhosted.org> Message-ID: <1568878797.53.0.914071594945.issue38219@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 04:16:20 2019 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 19 Sep 2019 08:16:20 +0000 Subject: [issue38222] pathlib Path objects should support __format__ In-Reply-To: <1568872865.53.0.090540874839.issue38222@roundup.psfhosted.org> Message-ID: <1568880980.88.0.970340257769.issue38222@roundup.psfhosted.org> Eric V. Smith added the comment: I agree with Serhiy that !s solves the problem. But as a convenience it might be nice to add __format__. This issue pops up from time to time on Path and other types, and I don't think !s is very discoverable. Especially because formatting works with a specifier, but fails with one: >>> format(path) '/path/to/enlightenment' >>> format(path, '>50') Traceback (most recent call last): File "", line 1, in TypeError: unsupported format string passed to PosixPath.__format__ ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 04:54:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Sep 2019 08:54:51 +0000 Subject: [issue38205] Python no longer compiles without small integer singletons In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1568883291.98.0.798322373178.issue38205@roundup.psfhosted.org> STINNER Victor added the comment: I like the idea of implementing Py_UNREACHABLE() as a function. Would it make sense to even declare it as a regular function rather than a static inline function? What is the benefit of inlining here? Inlining can make the code larger, rather than a function call at the machine code level is shorter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 05:02:13 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 19 Sep 2019 09:02:13 +0000 Subject: [issue38222] pathlib Path objects should support __format__ In-Reply-To: <1568872865.53.0.090540874839.issue38222@roundup.psfhosted.org> Message-ID: <1568883733.57.0.436414877981.issue38222@roundup.psfhosted.org> Serhiy Storchaka added the comment: Initially, the default __format__ converted the object to str and passed format specifier to str.__format__. This is defined in PEP 3101: class object: def __format__(self, format_spec): return format(str(self), format_spec) But later we changed the implementation, because this leaded to difficult to catch errors. Non-empty format specifier is now error in the default __format__. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 05:18:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Sep 2019 09:18:35 +0000 Subject: [issue38205] Python no longer compiles without small integer singletons In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1568884715.58.0.411818749423.issue38205@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15865 pull_request: https://github.com/python/cpython/pull/16280 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 05:34:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Sep 2019 09:34:59 +0000 Subject: [issue38205] Python no longer compiles without small integer singletons In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1568885699.96.0.235256915818.issue38205@roundup.psfhosted.org> STINNER Victor added the comment: I wrote PR 16280: "Convert Py_UNREACHABLE() macro to a function". This change fix this issue but also enhance Py_UNREACHABLE() which now dumps the Python traceback where the bug occurs. See my example: https://github.com/python/cpython/pull/16280#issuecomment-533049748 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 05:37:09 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 19 Sep 2019 09:37:09 +0000 Subject: [issue38223] Reorganize test_shutil Message-ID: <1568885829.07.0.120848262053.issue38223@roundup.psfhosted.org> New submission from Serhiy Storchaka : Currently most shutil tests are in a single class. Tests for the same function are partially grouped together and partially intermixed with other tests. This makes hard to find an appropriate place for adding new tests and increase risk of hiding test by other test with the same name. The proposed PR reorganized shutil tests. Added separate classes for particular functions and groups of related functions. It also cleans up some code: creating temporary dirs and monkey-patching shutil.open. test.support.rmtree() is used instead of shutil.rmtree() for cleaning up temporary dirs (it is more reliable for testing purposes). I am going to add new tests, so I need to clean up the existing code first. ---------- components: Tests messages: 352777 nosy: giampaolo.rodola, serhiy.storchaka, tarek priority: normal severity: normal status: open title: Reorganize test_shutil type: enhancement versions: Python 2.7, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 05:40:28 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 19 Sep 2019 09:40:28 +0000 Subject: [issue38223] Reorganize test_shutil In-Reply-To: <1568885829.07.0.120848262053.issue38223@roundup.psfhosted.org> Message-ID: <1568886028.24.0.821577835991.issue38223@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +15866 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16281 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 05:42:05 2019 From: report at bugs.python.org (Leblond Emmanuel) Date: Thu, 19 Sep 2019 09:42:05 +0000 Subject: [issue38224] Windows embeddable distribution doesn't ship headers Message-ID: <1568886125.02.0.449353693253.issue38224@roundup.psfhosted.org> New submission from Leblond Emmanuel : I don't understand why the headers are not provided as part of the distribution. It would be really easy to rm them once the distribution extracted for usecases that don't need them. On the other hand, usecases that need them cannot just download the Include folder from the CPython git repository given they get cooked during the build phase. It's also really inconvenient to extract the headers from the executable distribution. >From my personal experience, this prevented me from using the distribution each time it would have been a good fit for my need: - Embedding CPython into the Godot game engine (see https://github.com/touilleMan/godot-python/blob/284f092d9f7893403f7af32cac5978532c0e7d21/platforms/windows-64/SCsub#L55-L62) - Providing a frozen distribution of python for a script with simple .exe binary that would initialize the CPython insterpeter and run a simple "import mymodule; mymodule.main()" command ---------- components: Build, Windows messages: 352778 nosy: paul.moore, steve.dower, tim.golden, touilleMan, zach.ware priority: normal severity: normal status: open title: Windows embeddable distribution doesn't ship headers versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 05:46:43 2019 From: report at bugs.python.org (Marat Sharafutdinov) Date: Thu, 19 Sep 2019 09:46:43 +0000 Subject: [issue38019] asyncio subprocess AttributeError: 'NoneType' object has no attribute '_add_reader' / '_remove_reader' In-Reply-To: <1567529709.4.0.805713285268.issue38019@roundup.psfhosted.org> Message-ID: <1568886403.02.0.563070386895.issue38019@roundup.psfhosted.org> Marat Sharafutdinov added the comment: Andrew, it would be nice to have it fixed within 3.8. Hope you'll find time for this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 05:48:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Sep 2019 09:48:06 +0000 Subject: [issue38205] Py_UNREACHABLE() no longer behaves as a function call In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1568886486.33.0.586376159032.issue38205@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Python no longer compiles without small integer singletons -> Py_UNREACHABLE() no longer behaves as a function call _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 05:48:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Sep 2019 09:48:28 +0000 Subject: [issue38205] Py_UNREACHABLE() no longer behaves as a function call In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1568886508.26.0.177778297627.issue38205@roundup.psfhosted.org> STINNER Victor added the comment: I propose to restrict this issue to Py_UNREACHABLE() macro/function. Please use bpo-37812 to discuss longobject.c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 05:50:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Sep 2019 09:50:41 +0000 Subject: [issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT) In-Reply-To: <1565471250.77.0.491506074373.issue37812@roundup.psfhosted.org> Message-ID: <1568886641.26.0.617690644271.issue37812@roundup.psfhosted.org> STINNER Victor added the comment: When small integer are disabled at compilation time (NSMALLPOSINTS=0 and a NSMALLNEGINTS=0), I suggest to remove code related to small integers. IMHO CHECK_SMALL_INT() macro is a good practical solution for that. So I suggest to restore this macro. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 05:53:25 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 19 Sep 2019 09:53:25 +0000 Subject: [issue38205] Py_UNREACHABLE() no longer behaves as a function call In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1568886805.8.0.216496625364.issue38205@roundup.psfhosted.org> Serhiy Storchaka added the comment: I prefer to keep it a macro. The compiler does not know that it is never executed, so it can generate a suboptimal code. While it is a macro, it can be made a no-op, or even with compiler-specific instructions like __builtin_unreachable. This can help the compiler to generate more optimal code. For example, the popular idiom: switch (kind) { case PyUnicode_1BYTE_KIND: { ... break; } case PyUnicode_2BYTE_KIND: { ... break; } case PyUnicode_4BYTE_KIND: { ... break; } default: Py_UNREACHABLE(); } could be compiled to the code equivalent to: if (kind == PyUnicode_1BYTE_KIND) { ... break; } else if (kind == PyUnicode_2BYTE_KIND) { ... break; } else { // assuming (kind == PyUnicode_4BYTE_KIND) ... break; } ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 06:00:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Sep 2019 10:00:57 +0000 Subject: [issue38205] Py_UNREACHABLE() no longer behaves as a function call In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1568887257.51.0.23545499431.issue38205@roundup.psfhosted.org> STINNER Victor added the comment: > While it is a macro, it can be made a no-op, or even with compiler-specific instructions like __builtin_unreachable. My PR 16280 uses _Py_NO_RETURN which uses __attribute__((__noreturn__)) with GCC and clang. I'm not sure how __builtin_unreachable could be used with Py_UNREACHABLE() macro. > While it is a macro, it can be made a no-op I understood that Py_UNREACHABLE() is used on purpose to prevent undefined behavior. For example, if a function accepts an enum, but is called with a value which is not part of the enum: what should happen? Should Python crash? Usually, we try to be nice and return an error. But sometimes, you cannot report an error and so Py_UNREACHABLE() is a good solution. > I prefer to keep it a macro. The compiler does not know that it is never executed, so it can generate a suboptimal code. I don't see how PR 16280 could have an effect on that. I don't see how the compiler can guess that the code is never executed with the current macro. -- Using a function allows to put a breakpoint on it. In fact, I can easily modify PR 16280 to keep the macro, since I only call Py_FatalError() with a string. The function body is simple. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 06:04:27 2019 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 19 Sep 2019 10:04:27 +0000 Subject: [issue38222] pathlib Path objects should support __format__ In-Reply-To: <1568872865.53.0.090540874839.issue38222@roundup.psfhosted.org> Message-ID: <1568887467.31.0.330781513824.issue38222@roundup.psfhosted.org> Eric V. Smith added the comment: Correct: this change was made specifically so that objects could add their own format specifiers at a later time. If I recall correctly, This change was precipitated by wanting to add datetime.__format__: this change broke existing uses for format() that formatted datetimes as strings. But the result is that objects that really just want to be formatted as strings need to have their own __format__ which returns format(str(self), format_spec). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 06:06:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Sep 2019 10:06:00 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568887560.41.0.543266678254.issue37531@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15867 pull_request: https://github.com/python/cpython/pull/16282 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 06:14:40 2019 From: report at bugs.python.org (Orivej Desh) Date: Thu, 19 Sep 2019 10:14:40 +0000 Subject: [issue6559] add pass_fds paramter to subprocess.Popen() In-Reply-To: <1248422197.05.0.784368367425.issue6559@psf.upfronthosting.co.za> Message-ID: <1568888080.75.0.755266520024.issue6559@roundup.psfhosted.org> Change by Orivej Desh : ---------- pull_requests: +15868 pull_request: https://github.com/python/cpython/pull/16283 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 06:18:39 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 19 Sep 2019 10:18:39 +0000 Subject: [issue38222] pathlib Path objects should support __format__ In-Reply-To: <1568872865.53.0.090540874839.issue38222@roundup.psfhosted.org> Message-ID: <1568888319.75.0.211501985187.issue38222@roundup.psfhosted.org> Serhiy Storchaka added the comment: Or use !s or !r. In some cases it may be even better to use both convertions: f'{str(path)!r:>50}'. This is all application specific, so I do not think we should rethink our old decision. Explicit is better than implicit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 06:36:41 2019 From: report at bugs.python.org (Sergey Fedoseev) Date: Thu, 19 Sep 2019 10:36:41 +0000 Subject: [issue38205] Py_UNREACHABLE() no longer behaves as a function call In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1568889401.43.0.80641052523.issue38205@roundup.psfhosted.org> Sergey Fedoseev added the comment: FWIW I proposed to add Py_ASSUME() macro that uses __builtin_unreachable() in bpo-38147. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 06:45:07 2019 From: report at bugs.python.org (Henry Harutyunyan) Date: Thu, 19 Sep 2019 10:45:07 +0000 Subject: [issue13743] xml.dom.minidom.Document class is not documented In-Reply-To: <1326114378.06.0.424770823698.issue13743@psf.upfronthosting.co.za> Message-ID: <1568889907.91.0.92555450234.issue13743@roundup.psfhosted.org> Change by Henry Harutyunyan : ---------- nosy: +hharutyunyan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 08:12:56 2019 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 19 Sep 2019 12:12:56 +0000 Subject: [issue38222] pathlib Path objects should support __format__ In-Reply-To: <1568872865.53.0.090540874839.issue38222@roundup.psfhosted.org> Message-ID: <1568895176.96.0.889027560457.issue38222@roundup.psfhosted.org> Eric V. Smith added the comment: I don't think anyone is suggesting reverting the decision on object.__format__. That decision should stay. I think the suggestion is to add Path.__format__, which just converts to a string and formats with the given spec. Unless someone can think of a reason to have a different format specifier language for Path, I think this is a good usability improvement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 08:47:29 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 19 Sep 2019 12:47:29 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1568897249.25.0.0199625248088.issue34037@roundup.psfhosted.org> Andrew Svetlov added the comment: New changeset 9fdc64cf1266b6d5bf0503847b5c38e5edc53a14 by Andrew Svetlov (Kyle Stanley) in branch 'master': bpo-34037: Fix test_asyncio failure and add loop.shutdown_default_executor() (GH-15735) https://github.com/python/cpython/commit/9fdc64cf1266b6d5bf0503847b5c38e5edc53a14 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 08:48:29 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 19 Sep 2019 12:48:29 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1568897309.1.0.454793011706.issue34037@roundup.psfhosted.org> Andrew Svetlov added the comment: Thnks, Kyle! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 09:34:44 2019 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 19 Sep 2019 13:34:44 +0000 Subject: [issue38155] Add __all__ to the datetime module In-Reply-To: <1568370190.96.0.124167415349.issue38155@roundup.psfhosted.org> Message-ID: <1568900084.66.0.827470741166.issue38155@roundup.psfhosted.org> Paul Ganssle added the comment: New changeset 96b1c59c71534db3f0f3799cd84e2006923a5098 by Paul Ganssle (t k) in branch 'master': bpo-38155: Add __all__ to datetime module (GH-16203) https://github.com/python/cpython/commit/96b1c59c71534db3f0f3799cd84e2006923a5098 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 09:37:04 2019 From: report at bugs.python.org (Paul Ganssle) Date: Thu, 19 Sep 2019 13:37:04 +0000 Subject: [issue38155] Add __all__ to the datetime module In-Reply-To: <1568370190.96.0.124167415349.issue38155@roundup.psfhosted.org> Message-ID: <1568900224.66.0.211827098616.issue38155@roundup.psfhosted.org> Paul Ganssle added the comment: Closing this as resolved. I don't think we should backport this, as it's more of an enhancement than a bug fix (and since no one has ever complained about it to my knowledge, I don't think there's any big rush to see this released). Thanks Tahia and all the reviewers! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 09:43:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Sep 2019 13:43:13 +0000 Subject: [issue38147] add macro for __builtin_unreachable In-Reply-To: <1568316863.5.0.507617055887.issue38147@roundup.psfhosted.org> Message-ID: <1568900593.81.0.979375867421.issue38147@roundup.psfhosted.org> STINNER Victor added the comment: > Real world example. _PyLong_Copy() [1] calls _PyLong_New() [2]. _PyLong_New() checks the size, so that overflow does not occur. This check is redundant when _PyLong_New() is called from _PyLong_Copy(). We could add a function that bypass that check, but in LTO build PyObject_MALLOC() is inlined into _PyLong_New() and it also checks the size. Adding Py_ASSUME((size_t)size <= MAX_LONG_DIGITS) allows to bypass both checks. This sounds like a bad usage of __builtin_unreachable(). _PyLong_New() must always check that size <= MAX_LONG_DIGITS, the check must not be optimized by the compiler. __builtin_unreachable() must only be used if the code really be reached by design. For example: if (...) { Py_FatalError("oops)"; __builtin_unreachable() } But it's a bad example, since Py_FatalError is decorated with the "noreturn" attribute, so the compiler should already know that Py_FatalError() never returns. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 09:44:07 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Sep 2019 13:44:07 +0000 Subject: [issue38147] add macro for __builtin_unreachable In-Reply-To: <1568316863.5.0.507617055887.issue38147@roundup.psfhosted.org> Message-ID: <1568900647.18.0.942647387081.issue38147@roundup.psfhosted.org> STINNER Victor added the comment: > This check is redundant when _PyLong_New() is called from _PyLong_Copy(). If you care of _PyLong_Copy() performance, you should somehow manually inline _PyLong_New() inside _PyLong_Copy(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 10:12:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Sep 2019 14:12:39 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1568902359.17.0.500464492736.issue34037@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15869 pull_request: https://github.com/python/cpython/pull/16284 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 10:31:08 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 19 Sep 2019 14:31:08 +0000 Subject: [issue38222] pathlib Path objects should support __format__ In-Reply-To: <1568872865.53.0.090540874839.issue38222@roundup.psfhosted.org> Message-ID: <1568903468.25.0.0695262241968.issue38222@roundup.psfhosted.org> Serhiy Storchaka added the comment: I am -0 on this. It is a can of worms. Once we add a trivial __format__ in Path, we will need to handle numerous requests for adding a trivial __format__ in many other classes. It is better to teach users to use !s (and this works also on older Python versions!). As for Path, there many ways to convert it to string: str(), repr(), os.fspath(), os.fsdecode(), Path.as_posix(), Path.as_uri(), with possible normalization, converting to absolute or relative path. I would not bet that we will never have reasons to have a different format specifier language for Path. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 10:33:41 2019 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 19 Sep 2019 14:33:41 +0000 Subject: [issue38222] pathlib Path objects should support __format__ In-Reply-To: <1568872865.53.0.090540874839.issue38222@roundup.psfhosted.org> Message-ID: <1568903621.2.0.474219647555.issue38222@roundup.psfhosted.org> Eric V. Smith added the comment: I'm also -0 on it. It's up to Antoine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 10:38:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Sep 2019 14:38:23 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568903903.22.0.0637456639861.issue37531@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b2dd2dd6e9212ba6b03885b998736a180ef283d6 by Victor Stinner in branch 'master': bpo-37531: Skip test_regrtest.test_multiprocessing_timeout() on all platforms (GH-16282) https://github.com/python/cpython/commit/b2dd2dd6e9212ba6b03885b998736a180ef283d6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 10:41:15 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Sep 2019 14:41:15 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568904075.61.0.883285490256.issue37531@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15870 pull_request: https://github.com/python/cpython/pull/16285 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 10:45:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Sep 2019 14:45:09 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1568904309.28.0.496996208352.issue34037@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 079931d12223ec98cbf53185b90db48efa61f93f by Victor Stinner in branch 'master': bpo-34037: test_asyncio uses shutdown_default_executor() (GH-16284) https://github.com/python/cpython/commit/079931d12223ec98cbf53185b90db48efa61f93f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 10:47:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Sep 2019 14:47:52 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1568904472.02.0.682574637065.issue34037@roundup.psfhosted.org> STINNER Victor added the comment: asyncio.run() now shutdowns the default executor: nice, thanks! That was my request. IMHO it will make asyncio more reliable, especially for tests on the CI. If it becomes an issue in Python 3.9 (executor hangs forever), we can add new parameters (to run()?) to put a timeout for example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 10:59:53 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 19 Sep 2019 14:59:53 +0000 Subject: [issue38205] Py_UNREACHABLE() no longer behaves as a function call In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1568905193.84.0.365973061271.issue38205@roundup.psfhosted.org> Serhiy Storchaka added the comment: _Py_NO_RETURN is a promise that the code past the function is unreachable, not that the function call is unreachable. > I'm not sure how __builtin_unreachable could be used with Py_UNREACHABLE() macro. In the release mode Py_UNREACHABLE() can be replaced with __builtin_unreachable(). > For example, if a function accepts an enum, but is called with a value which is not part of the enum: what should happen? Should Python crash? If the accessibility of the code depends on the call from Python code, we should raise normal exception. If it is not possible to pass it out of the function, we should use PyErr_WriteUnraisable(). If the accessibility of the code depends on the call from C code, we can use PyErr_BadInternalCall() or raise a SystemError directly. If we are in the situation where recovering from errors is not possible (for example if the memory manager is broken) we use Py_FatalError(). If we are absolutely sure that the code never can be executed (unless memory was corrupted or something like), we use Py_UNREACHABLE(). It will silence compiler complains, fail loudly in debug mode if our assumption is wrong (this is our programming bug), and allow the compiler to optimize out the code if substituted by __builtin_unreachable() in the release mode. > I don't see how the compiler can guess that the code is never executed with the current macro. But we can make the macro to expand to __builtin_unreachable in the release mode. Or just to no-op if there is other way to silence the compiler warning. > Using a function allows to put a breakpoint on it. You can put a brackpoint on Py_FatalError(). > In fact, I can easily modify PR 16280 to keep the macro, since I only call Py_FatalError() with a string. It would be nice. We can consider using __builtin_unreachable() in different issue. I am also going to use Py_UNREACHABLE() more widely to write more uniform, but still optimal code. It could replace if (cond1) { ... } else if (cond2) { ... } else if (cond3) { ... } else { assert (!cond4); ... } with if (cond1) { ... } else if (cond2) { ... } else if (cond3) { ... } else if (cond4) { ... } else { Py_UNREACHABLE(); } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 11:27:23 2019 From: report at bugs.python.org (Ronan Lamy) Date: Thu, 19 Sep 2019 15:27:23 +0000 Subject: [issue25130] Make tests more PyPy compatible In-Reply-To: <1442340924.34.0.752221775968.issue25130@psf.upfronthosting.co.za> Message-ID: <1568906843.91.0.574671017614.issue25130@roundup.psfhosted.org> Change by Ronan Lamy : ---------- nosy: +Ronan.Lamy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 11:27:43 2019 From: report at bugs.python.org (Sergey Fedoseev) Date: Thu, 19 Sep 2019 15:27:43 +0000 Subject: [issue38147] add macro for __builtin_unreachable In-Reply-To: <1568316863.5.0.507617055887.issue38147@roundup.psfhosted.org> Message-ID: <1568906863.55.0.658893589316.issue38147@roundup.psfhosted.org> Sergey Fedoseev added the comment: > If you care of _PyLong_Copy() performance, you should somehow manually inline _PyLong_New() inside _PyLong_Copy(). It doesn't solve this: > We could add a function that bypass that check, but in LTO build PyObject_MALLOC() is inlined into _PyLong_New() and it also checks the size. Adding Py_ASSUME((size_t)size <= MAX_LONG_DIGITS) allows to bypass both checks. Here's example: https://github.com/sir-sigurd/cpython/commit/c8699d0c614a18d558216ae7d432107147c95c28. I attach some disassembly from this example compiled with LTO, to demonstrate how the proposed macro affects generated code. ---------- Added file: https://bugs.python.org/file48614/disasm.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 11:45:01 2019 From: report at bugs.python.org (Miki Tebeka) Date: Thu, 19 Sep 2019 15:45:01 +0000 Subject: [issue38222] pathlib Path objects should support __format__ In-Reply-To: <1568872865.53.0.090540874839.issue38222@roundup.psfhosted.org> Message-ID: <1568907901.89.0.782683265887.issue38222@roundup.psfhosted.org> Miki Tebeka added the comment: I don't think it violates " Explicit is better than implicit." There's a lot of work done to make pathlib.Path objects work in places where str or bytes is expected (e.g PEP 519), IMO this is another case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 11:48:29 2019 From: report at bugs.python.org (Roundup Robot) Date: Thu, 19 Sep 2019 15:48:29 +0000 Subject: [issue38222] pathlib Path objects should support __format__ In-Reply-To: <1568872865.53.0.090540874839.issue38222@roundup.psfhosted.org> Message-ID: <1568908109.37.0.814587636921.issue38222@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +15871 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16286 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 11:50:17 2019 From: report at bugs.python.org (Larry Hastings) Date: Thu, 19 Sep 2019 15:50:17 +0000 Subject: [issue38216] Fix for issue30458 prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1568908217.6.0.609097745311.issue38216@roundup.psfhosted.org> Larry Hastings added the comment: FWIW I planned to tag and release 3.5.8 final early next week. I don't have the domain knowledge to assess the severity of this bug--much less pitch in and help fix it--so I suspect this will simply hold up 3.5.8 final. Depending on the complexity of the fix for this issue, I may also insert a second rc into the 3.5.8 schedule. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 11:50:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Sep 2019 15:50:37 +0000 Subject: [issue38147] add macro for __builtin_unreachable In-Reply-To: <1568316863.5.0.507617055887.issue38147@roundup.psfhosted.org> Message-ID: <1568908237.57.0.745891677087.issue38147@roundup.psfhosted.org> STINNER Victor added the comment: > Here's example: https://github.com/sir-sigurd/cpython/commit/c8699d0c614a18d558216ae7d432107147c95c28. "_Py_ASSUME((size_t)size <= MAX_LONG_DIGITS);" Typically, such code use assert() and is removed for release build. assert() is more for contract base programming: when the error "cannot" happen at runtime (it would be a programming error). For other cases, I prefer to always emit code to handle the error (the error can happen, for example, the function must check inputs), even in release build. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 11:51:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Sep 2019 15:51:35 +0000 Subject: [issue38147] add Py_ASSUME() macro for __builtin_unreachable() In-Reply-To: <1568316863.5.0.507617055887.issue38147@roundup.psfhosted.org> Message-ID: <1568908295.43.0.600088888061.issue38147@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: add macro for __builtin_unreachable -> add Py_ASSUME() macro for __builtin_unreachable() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 11:51:48 2019 From: report at bugs.python.org (Roundup Robot) Date: Thu, 19 Sep 2019 15:51:48 +0000 Subject: [issue38222] pathlib Path objects should support __format__ In-Reply-To: <1568872865.53.0.090540874839.issue38222@roundup.psfhosted.org> Message-ID: <1568908308.06.0.603925311481.issue38222@roundup.psfhosted.org> Change by Roundup Robot : ---------- pull_requests: +15872 pull_request: https://github.com/python/cpython/pull/16287 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 12:05:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Sep 2019 16:05:12 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568909112.11.0.797490143768.issue37531@roundup.psfhosted.org> STINNER Victor added the comment: New changeset fb7746d5d10ec4a34198da672018ba15f5667079 by Victor Stinner in branch '3.8': bpo-37531: sync regrtest with master branch (GH-16285) https://github.com/python/cpython/commit/fb7746d5d10ec4a34198da672018ba15f5667079 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 12:09:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Sep 2019 16:09:34 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1568909374.35.0.159200715713.issue33694@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15873 pull_request: https://github.com/python/cpython/pull/16288 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 12:19:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Sep 2019 16:19:03 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568909943.92.0.558005838374.issue37531@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15874 pull_request: https://github.com/python/cpython/pull/16289 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 12:25:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Sep 2019 16:25:52 +0000 Subject: [issue38205] Py_UNREACHABLE() no longer behaves as a function call In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1568910352.19.0.547220499813.issue38205@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15875 pull_request: https://github.com/python/cpython/pull/16290 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 12:29:08 2019 From: report at bugs.python.org (Dino Viehland) Date: Thu, 19 Sep 2019 16:29:08 +0000 Subject: [issue38140] Py_tp_dictoffset / Py_tp_finalize are unsettable in stable API In-Reply-To: <1568297060.68.0.400472303762.issue38140@roundup.psfhosted.org> Message-ID: <1568910548.96.0.0711050475303.issue38140@roundup.psfhosted.org> Dino Viehland added the comment: New changeset 3368f3c6ae4140a0883e19350e672fd09c9db616 by Dino Viehland (Eddie Elizondo) in branch 'master': bpo-38140: Make dict and weakref offsets opaque for C heap types (#16076) https://github.com/python/cpython/commit/3368f3c6ae4140a0883e19350e672fd09c9db616 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 12:40:50 2019 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Sep 2019 16:40:50 +0000 Subject: [issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS In-Reply-To: <1562700862.92.0.104600612678.issue37531@roundup.psfhosted.org> Message-ID: <1568911250.78.0.597012279649.issue37531@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 5e1400a6bcbb3350a6665176980a2b8343075c63 by Victor Stinner in branch '3.7': bpo-37531: sync regrtest with master branch (GH-16285) (GH-16289) https://github.com/python/cpython/commit/5e1400a6bcbb3350a6665176980a2b8343075c63 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 12:51:17 2019 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 19 Sep 2019 16:51:17 +0000 Subject: [issue38208] Simplify string.Template by using __init_subclass__() In-Reply-To: <1568787441.71.0.0135329637022.issue38208@roundup.psfhosted.org> Message-ID: <1568911877.52.0.428887045496.issue38208@roundup.psfhosted.org> Change by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 13:16:09 2019 From: report at bugs.python.org (Steve Dower) Date: Thu, 19 Sep 2019 17:16:09 +0000 Subject: [issue38224] Windows embeddable distribution doesn't ship headers In-Reply-To: <1568886125.02.0.449353693253.issue38224@roundup.psfhosted.org> Message-ID: <1568913369.94.0.701845066951.issue38224@roundup.psfhosted.org> Steve Dower added the comment: The embeddable distro is meant to be a "redistributable" for end-user machines, rather than a development kit. "Build" and "distribution" are two clearly separated tasks (at least on Windows), and so they have different dependencies. We won't be adding headers to the embeddable distro. To get the headers, you'll either want the regular installer or the package from https://www.nuget.org/packages/python (or pythonx86). Or you can grab the Include folder from git, provided you use PC/pyconfig.h and the correct tag, as none of the files are "cooked" on Windows. To directly address your two examples: - the linked SCons script is a build script, which should be run on a build machine against a development kit. But when you copy the built result to another machine, they'll only require the embeddable distro at runtime - the "frozen" distribution will need the new .exe binary to be built against a development kit. But when you copy the built result to another machine, they'll only require the embeddable distro at runtime. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 13:23:29 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 19 Sep 2019 17:23:29 +0000 Subject: [issue15347] IDLE - remove debugger 'interacting' In-Reply-To: <1342207963.58.0.539607447258.issue15347@psf.upfronthosting.co.za> Message-ID: <1568913809.11.0.111300002605.issue15347@roundup.psfhosted.org> Terry J. Reedy added the comment: fix-nested-mainloop.patch was superceded by fix-nested2.patch for #24455. I verified that the initial test now passes. When I click 'yes' in that box popped up by step 4, both Shell and debugger windows disappear and IDLE exists. The only question left is whether to apply remove-interacting-debugger.patch, which was aimed at the deprecated but not removed -n mode. ---------- nosy: -Saimadhav.Heblikar, roger.serwy title: IDLE - does not close if the debugger was active -> IDLE - remove debugger 'interacting' versions: +Python 3.9 -Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 13:33:03 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 19 Sep 2019 17:33:03 +0000 Subject: [issue15348] IDLE - shell becomes unresponsive if debugger windows is closed while active. In-Reply-To: <1342208290.25.0.778184843655.issue15348@psf.upfronthosting.co.za> Message-ID: <1568914383.64.0.255783871107.issue15348@roundup.psfhosted.org> Terry J. Reedy added the comment: The input glitch mentioned above no longer exists, so closing. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 13:53:12 2019 From: report at bugs.python.org (Roundup Robot) Date: Thu, 19 Sep 2019 17:53:12 +0000 Subject: [issue38045] enum.Flag instance creation is slow In-Reply-To: <1567772280.73.0.782923595007.issue38045@roundup.psfhosted.org> Message-ID: <1568915592.27.0.824855633752.issue38045@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +15876 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16291 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 13:55:59 2019 From: report at bugs.python.org (Dino Viehland) Date: Thu, 19 Sep 2019 17:55:59 +0000 Subject: [issue38140] Py_tp_dictoffset / Py_tp_finalize are unsettable in stable API In-Reply-To: <1568297060.68.0.400472303762.issue38140@roundup.psfhosted.org> Message-ID: <1568915759.81.0.78595626797.issue38140@roundup.psfhosted.org> Change by Dino Viehland : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 13:59:51 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 19 Sep 2019 17:59:51 +0000 Subject: [issue35104] IDLE: On macOS, Command-M minimizes & opens "Open Module..." In-Reply-To: <1540812606.17.0.788709270274.issue35104@psf.upfronthosting.co.za> Message-ID: <1568915991.52.0.1873174133.issue35104@roundup.psfhosted.org> Terry J. Reedy added the comment: I am closing this as a duplicate of #21359 as I believe there is at least one more non-working shortcut and because I believe the solution is to test all and patch the default mac keyset all at once. ---------- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> IDLE Redo command accelerator acts as Undo with current OS X Cocoa Tk 8.5.15 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 14:13:58 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 19 Sep 2019 18:13:58 +0000 Subject: [issue21359] IDLE macOS: Some Command shortcuts do not work correctly In-Reply-To: <1398549164.45.0.802525173407.issue21359@psf.upfronthosting.co.za> Message-ID: <1568916838.21.0.433746458379.issue21359@roundup.psfhosted.org> Terry J. Reedy added the comment: Still an issue. Several shortcuts do not work right, so I am generalizing the issue. 1. Redo command accelerator acts as Undo. 2. Cmd-M minimizes instead of open module (#35104 has long discussion). I at least one other issue mentions a similar problem. The default mac keybinding should all be tested to determine the scope of the problem. Then a new keyset designed (#32761) 3. #18444 and #32761 both discuss ^A and beginning of line. ---------- title: IDLE Redo command accelerator acts as Undo with current OS X Cocoa Tk 8.5.15 -> IDLE macOS: Some Command shortcuts do not work correctly versions: +Python 3.9 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 14:14:42 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 19 Sep 2019 18:14:42 +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: <1568916882.24.0.75968514391.issue31930@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.9 -Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 14:18:00 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 19 Sep 2019 18:18:00 +0000 Subject: [issue22083] IDLE: Refactor breakpoint related methods In-Reply-To: <1406387183.56.0.280615170045.issue22083@psf.upfronthosting.co.za> Message-ID: <1568917080.36.0.494017916232.issue22083@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- title: Refactor PyShell's breakpoint related methods -> IDLE: Refactor breakpoint related methods versions: +Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 14:38:39 2019 From: report at bugs.python.org (David Hilton) Date: Thu, 19 Sep 2019 18:38:39 +0000 Subject: [issue38225] iscoroutinefunction broken with cython - allow tagging of functions as async? Message-ID: <1568918319.91.0.348855638851.issue38225@roundup.psfhosted.org> New submission from David Hilton : If a python piece of code imports cython code with async defs, `asyncio.iscoroutinefunction` cannot determine that the code is async. https://github.com/cython/cython/issues/2273#issuecomment-531537624 scoder is open to marking async defs so that they can be identified, just like `asyncio.coroutine`: https://github.com/python/cpython/blob/ae239f6b0626e926613a4a1dbafa323bd41fec32/Lib/asyncio/coroutines.py#L156 However, that is an internal interface and `@coroutine` is deprecated. -------------- Can we have some official way of marking functions as async that will not be deprecated? The easiest would be for `asyncio.iscoroutinefunction` to look for `_is_coroutine = True`, and promise to keep looking for that value. This would also allow for functools.partial to easily mark that it's returning an async function, which some people seem to care about. ---------- components: asyncio messages: 352812 nosy: asvetlov, dhiltonp, yselivanov priority: normal severity: normal status: open title: iscoroutinefunction broken with cython - allow tagging of functions as async? type: enhancement versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 14:39:19 2019 From: report at bugs.python.org (David Hilton) Date: Thu, 19 Sep 2019 18:39:19 +0000 Subject: [issue38225] iscoroutinefunction broken with cython - allow tagging of functions as async? In-Reply-To: <1568918319.91.0.348855638851.issue38225@roundup.psfhosted.org> Message-ID: <1568918359.58.0.490953362924.issue38225@roundup.psfhosted.org> Change by David Hilton : ---------- keywords: +patch pull_requests: +15877 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16292 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 14:39:22 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 19 Sep 2019 18:39:22 +0000 Subject: [issue11820] idle3 shell os.system swallows shell command output In-Reply-To: <1302421540.99.0.957938249964.issue11820@psf.upfronthosting.co.za> Message-ID: <1568918362.84.0.0548932880553.issue11820@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 14:42:59 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 19 Sep 2019 18:42:59 +0000 Subject: [issue29926] IDLE: in shell, time.sleep ignores _thread.interrupt_main() In-Reply-To: <1490655071.78.0.435370193059.issue29926@psf.upfronthosting.co.za> Message-ID: <1568918579.56.0.0110324631883.issue29926@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.9 -Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 14:44:47 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 19 Sep 2019 18:44:47 +0000 Subject: [issue24812] All standard keystrokes not recognized in IDLE dialogs on Mac In-Reply-To: <1438920938.34.0.296980992753.issue24812@psf.upfronthosting.co.za> Message-ID: <1568918687.2.0.754078778608.issue24812@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: -kbk, roger.serwy versions: +Python 3.9 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 14:45:15 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 19 Sep 2019 18:45:15 +0000 Subject: [issue21674] Idle: Add 'find all' in current file In-Reply-To: <1402000832.05.0.464293408794.issue21674@psf.upfronthosting.co.za> Message-ID: <1568918715.09.0.70705659835.issue21674@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 14:46:17 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 19 Sep 2019 18:46:17 +0000 Subject: [issue23544] IDLE hangs when selecting Stack View with debug active In-Reply-To: <1425072335.83.0.576854566256.issue23544@psf.upfronthosting.co.za> Message-ID: <1568918777.06.0.276778775658.issue23544@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: -kbk, roger.serwy versions: +Python 3.9 -Python 2.7, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 14:46:46 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 19 Sep 2019 18:46:46 +0000 Subject: [issue21937] IDLE interactive window doesn't display unsaved-indicator In-Reply-To: <1404794523.71.0.976776826141.issue21937@psf.upfronthosting.co.za> Message-ID: <1568918806.52.0.590097851406.issue21937@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.9 -Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 14:50:18 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 19 Sep 2019 18:50:18 +0000 Subject: [issue15363] Idle/tkinter ~x.py 'save as' fails. closes idle In-Reply-To: <1342394243.7.0.336788716257.issue15363@psf.upfronthosting.co.za> Message-ID: <1568919018.47.0.449280150398.issue15363@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 15:30:29 2019 From: report at bugs.python.org (Zachary Ware) Date: Thu, 19 Sep 2019 19:30:29 +0000 Subject: [issue38225] iscoroutinefunction broken with cython - allow tagging of functions as async? In-Reply-To: <1568918319.91.0.348855638851.issue38225@roundup.psfhosted.org> Message-ID: <1568921429.24.0.553803942353.issue38225@roundup.psfhosted.org> Change by Zachary Ware : ---------- nosy: +scoder versions: -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 16:31:01 2019 From: report at bugs.python.org (=?utf-8?b?0JHQvtGA0LjRgSDQktC10YDRhdC+0LLRgdC60LjQuQ==?=) Date: Thu, 19 Sep 2019 20:31:01 +0000 Subject: [issue38226] pickle.dump and load error message when file isn't opened in binary mode are not useful Message-ID: <1568925061.22.0.28448935108.issue38226@roundup.psfhosted.org> New submission from ????? ?????????? : pickle.load() and pickle.dump() take a file object as an argument. That file object must be opened in binary mode ("rb" or "wb"). If it's not, pickle raises a confusing error message. When pickle.dump()'ing to a file opened in "w" mode instead of "wb" mode it'll raise a TypeError: TypeError: write() argument must be str, not bytes I thought it might be getting this because I was pickling bytes objects. For pickle.load()'ing from a file opened in "r" mode instead of "rb" mode, it'll raise a UnicodeDecodeError UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte There are a couple pages on the internet (just search "pickle" followed by either error message) with people being confused about this. pickle should catch these errors and report something more useful. ---------- components: Library (Lib) messages: 352813 nosy: boris priority: normal severity: normal status: open title: pickle.dump and load error message when file isn't opened in binary mode are not useful versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 16:54:43 2019 From: report at bugs.python.org (Brett Cannon) Date: Thu, 19 Sep 2019 20:54:43 +0000 Subject: [issue38222] pathlib Path objects should support __format__ In-Reply-To: <1568872865.53.0.090540874839.issue38222@roundup.psfhosted.org> Message-ID: <1568926483.27.0.299480374847.issue38222@roundup.psfhosted.org> Brett Cannon added the comment: I'm -1 as PEP 519 created __fspath__ specifically so that pathlib.Path wouldn't be confused as a string by accident. You can also use os.fspath() to get a string representation of the path itself. I also don't know if Antoine wants to make this sort of call for pathlib anymore as he isn't listed in https://devguide.python.org/experts/ or https://github.com/python/cpython/blob/master/.github/CODEOWNERS for pathlib anymore (and that was an explicit choice based on code history for the experts index). ---------- nosy: +brett.cannon resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 17:41:35 2019 From: report at bugs.python.org (=?utf-8?q?Ionel_Cristian_M=C4=83rie=C8=99?=) Date: Thu, 19 Sep 2019 21:41:35 +0000 Subject: [issue38227] Setting a signal handler gets multiprocessing.Pool stuck Message-ID: <1568929295.79.0.555392640133.issue38227@roundup.psfhosted.org> New submission from Ionel Cristian M?rie? : Running `python3.8 mp-bug-python2.8.py` usually gets stuck after a dozen iterations or so. It appears that if I stop setting that signal handler it doesn't get stuck. Unfortunately I need it to perform critical cleanup. This is what I got from gdb: (gdb) py-bt Traceback (most recent call first): File "/usr/lib/python3.8/multiprocessing/synchronize.py", line 95, in __enter__ return self._semlock.__enter__() File "/usr/lib/python3.8/multiprocessing/queues.py", line 355, in get with self._rlock: File "/usr/lib/python3.8/multiprocessing/pool.py", line 370, in worker `func` and (a, b) becomes func(a, b). File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/usr/lib/python3.8/multiprocessing/process.py", line 569, in _bootstrap File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 75, in _launch code = process_obj._bootstrap(parent_sentinel=child_r) File "/usr/lib/python3.8/multiprocessing/popen_fork.py", line 19, in __init__ self._launch(process_obj) File "/usr/lib/python3.8/multiprocessing/context.py", line 276, in _Popen return Popen(process_obj) File "/usr/lib/python3.8/multiprocessing/process.py", line 633, in start File "/usr/lib/python3.8/multiprocessing/pool.py", line 838, in _repopulate_pool_static self._length = None File "/usr/lib/python3.8/multiprocessing/pool.py", line 559, in _repopulate_pool outqueue.put(None) File "/usr/lib/python3.8/multiprocessing/pool.py", line 212, in __init__ self._repopulate_pool() File "/usr/lib/python3.8/multiprocessing/context.py", line 375, in Pool File "mp-bug-python2.8.py", line 21, in And without the macros: #0 0x00007f51c79fb6d6 in futex_abstimed_wait_cancelable (private=128, abstime=0x0, expected=0, futex_word=0x7f51c7e29000) at ../sysdeps/unix/sysv/linux/futex-internal.h:205 #1 do_futex_wait (sem=sem at entry=0x7f51c7e29000, abstime=0x0) at sem_waitcommon.c:111 #2 0x00007f51c79fb7c8 in __new_sem_wait_slow (sem=0x7f51c7e29000, abstime=0x0) at sem_waitcommon.c:181 #3 0x00007f51c79fb839 in __new_sem_wait (sem=) at sem_wait.c:42 #4 0x00007f51c58d51f7 in semlock_acquire (self=0x7f51c58a60b0, args=, kwds=) at ./Modules/_multiprocessing/semaphore.c:319 #5 0x000000000067d929 in method_vectorcall_VARARGS_KEYWORDS (func=, args=0x7f51c58a4eb8, nargsf=, kwnames=) at ../Objects/descrobject.c:332 #6 0x000000000042c5dc in _PyObject_Vectorcall (kwnames=, nargsf=, args=, callable=) at ../Include/cpython/abstract.h:127 #7 call_function (kwnames=0x0, oparg=, pp_stack=, tstate=0x22bd160) at ../Python/ceval.c:4987 #8 _PyEval_EvalFrameDefault (f=, throwflag=) at ../Python/ceval.c:3486 #9 0x0000000000425ed7 in function_code_fastcall (co=, args=, nargs=1, globals=) at ../Objects/call.c:283 #10 0x00000000006761e4 in _PyObject_Vectorcall (kwnames=0x0, nargsf=1, args=0x7ffe20bcc908, callable=) at ../Include/cpython/abstract.h:127 #11 method_vectorcall (method=, args=, nargsf=, kwnames=0x0) at ../Objects/classobject.c:67 #12 0x000000000042857e in _PyObject_Vectorcall (kwnames=0x0, nargsf=0, args=0x0, callable=) at ../Include/cpython/abstract.h:127 #13 _PyObject_CallNoArg (func=) at ../Include/cpython/abstract.h:153 #14 _PyEval_EvalFrameDefault (f=, throwflag=) at ../Python/ceval.c:3287 #15 0x0000000000425ed7 in function_code_fastcall (co=, args=, nargs=1, globals=) at ../Objects/call.c:283 #16 0x0000000000676245 in _PyObject_Vectorcall (kwnames=0x0, nargsf=1, args=0x23cea18, callable=) at ../Include/cpython/abstract.h:127 #17 method_vectorcall (method=, args=0x23cea20, nargsf=, kwnames=0x0) at ../Objects/classobject.c:60 #18 0x000000000042cf2f in _PyObject_Vectorcall (kwnames=, nargsf=, args=, callable=) at ../Include/cpython/abstract.h:127 #19 call_function (kwnames=0x0, oparg=, pp_stack=, tstate=0x22bd160) at ../Python/ceval.c:4987 #20 _PyEval_EvalFrameDefault (f=, throwflag=) at ../Python/ceval.c:3500 #21 0x00000000004f9f44 in PyEval_EvalFrameEx (throwflag=0, f=Frame 0x23ce820, for file /usr/lib/python3.8/multiprocessing/pool.py, line 370, in worker (inqueue=, _writer=, _rlock=, acquire=, release=) at remote 0x7f51c589d0d0>, _poll=, _wlock=, acquire=, release=) at remote 0x7f51c589deb0>) at remote 0x7f51c589d3a0>, outqueue=, globals=, locals=locals at entry=0x0, args=, argcount=6, kwnames=0x0, kwargs=0x7f51c636e628, kwcount=0, kwstep=1, defs=0x7f51c65a4828, defcount=4, kwdefs=0x0, closure=0x0, name='worker', qualname='worker') at ../Python/ceval.c:4298 #23 0x000000000043e7a2 in _PyFunction_Vectorcall (func=func at entry=, stack=, nargsf=nargsf at entry=6, kwnames=) at ../Objects/call.c:435 #24 0x000000000044143c in PyVectorcall_Call (callable=, tuple=, kwargs=) at ../Objects/call.c:199 #25 0x0000000000428aec in do_call_core (kwdict={}, callargs=(, _writer=, _rlock=, acquire=, release=) at remote 0x7f51c589d0d0>, _poll=, _wlock=, acquire=, release=) at remote 0x7f51c589deb0>) at remote 0x7f51c589d3a0>, , _writer=, tstate=0x22bd160) at ../Python/ceval.c:5034 #26 _PyEval_EvalFrameDefault (f=, throwflag=) at ../Python/ceval.c:3559 #27 0x0000000000425ed7 in function_code_fastcall (co=, args=, nargs=1, globals=) at ../Objects/call.c:283 #28 0x000000000042c5dc in _PyObject_Vectorcall (kwnames=, nargsf=, args=, callable=) at ../Include/cpython/abstract.h:127 #29 call_function (kwnames=0x0, oparg=, pp_stack=, tstate=0x22bd160) at ../Python/ceval.c:4987 #30 _PyEval_EvalFrameDefault (f=, throwflag=) at ../Python/ceval.c:3486 #31 0x00000000004f9f44 in PyEval_EvalFrameEx (throwflag=0, f=Frame 0x23e7f40, for file /usr/lib/python3.8/multiprocessing/process.py, line 569, in _bootstrap (self=, 'semprefix': '/mp', 'daemon': True}, _parent_pid=191540, _parent_name='MainProcess', _popen=None, _closed=False, _target=, _args=(, _writer=, _rlock=, acquire=, release=) at remote 0x7f51c589d0d0>, _poll=, _wlock=, acquire=, globals=, locals=locals at entry=0x0, args=, argcount=1, kwnames=0x7f51c589d5c8, kwargs=0x7f51c66fcde8, kwcount=1, kwstep=1, defs=0x7f51c6672808, defcount=1, kwdefs=0x0, closure=0x0, name='_bootstrap', qualname='BaseProcess._bootstrap') at ../Python/ceval.c:4298 #33 0x000000000043e7a2 in _PyFunction_Vectorcall (func=, stack=, nargsf=, kwnames=) at ../Objects/call.c:435 #34 0x0000000000676245 in _PyObject_Vectorcall (kwnames=('parent_sentinel',), nargsf=1, args=0x7f51c66fcde0, callable=) at ../Include/cpython/abstract.h:127 #35 method_vectorcall (method=, args=0x7f51c66fcde8, nargsf=, kwnames=('parent_sentinel',)) at ../Objects/classobject.c:60 This issue doesn't reproduce on python 3.7 or earlier. ---------- files: mp-bug-python2.8.py messages: 352815 nosy: ionelmc priority: normal severity: normal status: open title: Setting a signal handler gets multiprocessing.Pool stuck versions: Python 3.8 Added file: https://bugs.python.org/file48615/mp-bug-python2.8.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 17:51:22 2019 From: report at bugs.python.org (Joan) Date: Thu, 19 Sep 2019 21:51:22 +0000 Subject: [issue38228] Missing documentation on strftime modifier O Message-ID: <1568929882.38.0.223065779216.issue38228@roundup.psfhosted.org> New submission from Joan : In the documentation at https://docs.python.org/3.9/library/datetime.html#strftime-strptime-behavior there's an omission of one of the modifiers that can be add to the strftime parameters (O and E) Quoting from http://man7.org/linux/man-pages/man3/strftime.3.html Some conversion specifications can be modified by preceding the conversion specifier character by the E or O modifier to indicate that an alternative format should be used. If the alternative format or specification does not exist for the current locale, the behavior will be as if the unmodified conversion specification were used. (SU) The Single UNIX Specification mentions %Ec, %EC, %Ex, %EX, %Ey, %EY, %Od, %Oe, %OH, %OI, %Om, %OM, %OS, %Ou, %OU, %OV, %Ow, %OW, %Oy, where the effect of the O modifier is to use alternative numeric symbols (say, roman numerals), and that of the E modifier is to use a locale-dependent alternative representation. The modifier works as expected for the O modifier returning the values defined in ab_alt_mon and alt_mon from the locale (instead of the ones defined in abmon and mon. I haven't been able to get any results with the E modifier (might not be yet defined in any locale) A small snippet of code to see the difference: import locale from datetime import datetime locale.setlocale(locale.LC_ALL, 'ca_AD.utf8') locale.setlocale(locale.LC_ALL, 'ca_ES.utf8') now = datetime.now() # current date and time date_time = now.strftime("|%Ob|%b|||%OB|%B|") print("date and time:",date_time) ---------- assignee: docs at python components: Documentation messages: 352816 nosy: aseques, docs at python priority: normal severity: normal status: open title: Missing documentation on strftime modifier O type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 17:58:23 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 19 Sep 2019 21:58:23 +0000 Subject: [issue38228] Missing documentation on strftime modifier O In-Reply-To: <1568929882.38.0.223065779216.issue38228@roundup.psfhosted.org> Message-ID: <1568930303.85.0.332949151242.issue38228@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +belopolsky, p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 18:46:25 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 19 Sep 2019 22:46:25 +0000 Subject: [issue38225] iscoroutinefunction broken with cython - allow tagging of functions as async? In-Reply-To: <1568918319.91.0.348855638851.issue38225@roundup.psfhosted.org> Message-ID: <1568933185.2.0.206263484298.issue38225@roundup.psfhosted.org> Andrew Svetlov added the comment: I think we need better name than just `_is_coroutine`. All async function properties as dunder named, the new *official* name should follow this convention as well ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 20:00:39 2019 From: report at bugs.python.org (David Parks) Date: Fri, 20 Sep 2019 00:00:39 +0000 Subject: [issue38229] ClientConnectionError exception doesn't serialize propertly Message-ID: <1568937639.83.0.112440355372.issue38229@roundup.psfhosted.org> New submission from David Parks : Original question posted here: https://stackoverflow.com/questions/58019939/attributeerror-str-object-has-no-attribute-errno?noredirect=1#comment102443264_58019939 The following exception is encountered when placing an `aiohttp.client_exceptions.ClientConnectionError` on a `multiprocessing.Queue`. The problem appears to occur during deserialization. ``` Traceback (most recent call last): File "model_neural_simplified.py", line 318, in main(**arg_parser()) File "model_neural_simplified.py", line 314, in main globals()[command](**kwargs) File "model_neural_simplified.py", line 304, in predict next_neural_data, next_sample = reader.get_next_result() File "/project_neural_mouse/src/asyncs3/s3reader.py", line 174, in get_next_result result = future.result() File "/usr/lib/python3.6/concurrent/futures/_base.py", line 432, in result return self.__get_result() File "/usr/lib/python3.6/concurrent/futures/_base.py", line 384, in __get_result raise self._exception File "/usr/lib/python3.6/concurrent/futures/thread.py", line 56, in run result = self.fn(*self.args, **self.kwargs) File "model_neural_simplified.py", line 245, in read_sample f_bytes = s3f.read(read_size) File "/project_neural_mouse/src/asyncs3/s3reader.py", line 374, in read size, b = self._issue_request(S3Reader.READ, (self.url, size, self.position)) File "/project_neural_mouse/src/asyncs3/s3reader.py", line 389, in _issue_request response = self.communication_channels[uuid].get() File "/usr/lib/python3.6/multiprocessing/queues.py", line 113, in get return _ForkingPickler.loads(res) File "/usr/local/lib/python3.6/dist-packages/aiohttp/client_exceptions.py", line 133, in __init__ super().__init__(os_error.errno, os_error.strerror) AttributeError: 'str' object has no attribute 'errno' ``` A similar issue is reproducible using the following code snippet: ``` import multiprocessing import aiohttp connection_key = aiohttp.client_reqrep.ConnectionKey ose = OSError('test') e = aiohttp.client_exceptions.ClientConnectorError(connection_key, ose) q = multiprocessing.Queue() q.put(e) q.get(e) ``` ---------- components: asyncio messages: 352818 nosy: asvetlov, davidparks21, yselivanov priority: normal severity: normal status: open title: ClientConnectionError exception doesn't serialize propertly type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 20:14:13 2019 From: report at bugs.python.org (David Parks) Date: Fri, 20 Sep 2019 00:14:13 +0000 Subject: [issue38229] ClientConnectionError exception doesn't serialize propertly In-Reply-To: <1568937639.83.0.112440355372.issue38229@roundup.psfhosted.org> Message-ID: <1568938453.53.0.350574393675.issue38229@roundup.psfhosted.org> David Parks added the comment: Minor correction to the minimal reproducible test case: ``` import multiprocessing import aiohttp connection_key = aiohttp.client_reqrep.ConnectionKey ose = OSError('test') e = aiohttp.client_exceptions.ClientConnectorError(connection_key, ose) q = multiprocessing.Queue() q.put(e) q.get() ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 20:29:27 2019 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 20 Sep 2019 00:29:27 +0000 Subject: [issue38228] Missing documentation on strftime modifier O In-Reply-To: <1568929882.38.0.223065779216.issue38228@roundup.psfhosted.org> Message-ID: <1568939367.83.0.540283563212.issue38228@roundup.psfhosted.org> Eric V. Smith added the comment: Have you tried this on Windows or macOS? ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 21:48:08 2019 From: report at bugs.python.org (ppperry) Date: Fri, 20 Sep 2019 01:48:08 +0000 Subject: [issue38229] ClientConnectionError exception doesn't serialize propertly In-Reply-To: <1568937639.83.0.112440355372.issue38229@roundup.psfhosted.org> Message-ID: <1568944088.13.0.188602508659.issue38229@roundup.psfhosted.org> ppperry added the comment: This seems more likely to be a bug in aiohttp than in python. ---------- nosy: +ppperry type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 22:08:48 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 20 Sep 2019 02:08:48 +0000 Subject: [issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads In-Reply-To: <1530658646.63.0.56676864532.issue34037@psf.upfronthosting.co.za> Message-ID: <1568945328.95.0.776614458328.issue34037@roundup.psfhosted.org> Kyle Stanley added the comment: > Thanks, Kyle! No problem, and thanks for all of the help from Andrew, Yury, and Victor! > IMHO it will make asyncio more reliable, especially for tests on the CI. Awesome, that was my primary intention. (: > If it becomes an issue in Python 3.9 (executor hangs forever), Feel free to add me to the nosy list if you have to open an issue for it, I'd be glad to help out with this if it becomes an issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 22:53:03 2019 From: report at bugs.python.org (David Parks) Date: Fri, 20 Sep 2019 02:53:03 +0000 Subject: [issue38229] ClientConnectionError exception doesn't serialize property In-Reply-To: <1568937639.83.0.112440355372.issue38229@roundup.psfhosted.org> Message-ID: <1568947983.61.0.987896302345.issue38229@roundup.psfhosted.org> David Parks added the comment: Oh yes, this belongs to aiohttp. I thought that was handled here. I'll move this to a git issue on that page, and I'm closing this. https://github.com/aio-libs/aiohttp/issues/4077 ---------- resolution: -> rejected stage: -> resolved status: open -> closed title: ClientConnectionError exception doesn't serialize propertly -> ClientConnectionError exception doesn't serialize property _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 23:05:44 2019 From: report at bugs.python.org (Eryk Sun) Date: Fri, 20 Sep 2019 03:05:44 +0000 Subject: [issue38228] Missing documentation on strftime modifier O In-Reply-To: <1568929882.38.0.223065779216.issue38228@roundup.psfhosted.org> Message-ID: <1568948744.41.0.0127675188321.issue38228@roundup.psfhosted.org> Eryk Sun added the comment: > Have you tried this on Windows or macOS? 3.5+ in Windows uses ucrt, which quietly ignores 'E' and 'O' strftime modifiers. From ucrt\time\wcsftime.cpp: // Skip ISO E and O alternative representation format modifiers. We // do not support alternative formats in any locale. if (*format_it == L'E' || *format_it == L'O') { ++format_it; } Example: >>> locale.setlocale(locale.LC_ALL, 'ca_ES.utf8') 'ca_ES.utf8' >>> time.strftime('%b|%Ob') 'set.|set.' 2.7 uses the old MSVC runtime, in which the 'E' and 'O' modifiers are invalid. Example: >>> locale.setlocale(locale.LC_ALL, 'cat_esp') 'Catalan_Spain.1252' >>> time.strftime('%b') 'set.' >>> time.strftime('%Ob') Traceback (most recent call last): File "", line 1, in ValueError: Invalid format string ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 23:26:00 2019 From: report at bugs.python.org (Abhilash Raj) Date: Fri, 20 Sep 2019 03:26:00 +0000 Subject: [issue34002] minor efficiency and clarity improvements in email package In-Reply-To: <1530298950.25.0.56676864532.issue34002@psf.upfronthosting.co.za> Message-ID: <1568949960.04.0.423902011108.issue34002@roundup.psfhosted.org> Abhilash Raj added the comment: New changeset 2702638eabe5f7b25f36d295f0ad78cb8d4eda05 by Abhilash Raj (Michael Selik) in branch 'master': bpo-34002: Minor efficiency and clarity improvements in email package. (GH-7999) https://github.com/python/cpython/commit/2702638eabe5f7b25f36d295f0ad78cb8d4eda05 ---------- nosy: +maxking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 23:26:40 2019 From: report at bugs.python.org (Abhilash Raj) Date: Fri, 20 Sep 2019 03:26:40 +0000 Subject: [issue34002] minor efficiency and clarity improvements in email package In-Reply-To: <1530298950.25.0.56676864532.issue34002@psf.upfronthosting.co.za> Message-ID: <1568950000.38.0.262854463487.issue34002@roundup.psfhosted.org> Abhilash Raj added the comment: PR is now merged. ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 19 23:42:48 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 20 Sep 2019 03:42:48 +0000 Subject: [issue38216] Fix for issue30458 prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1568950968.58.0.500491034767.issue38216@roundup.psfhosted.org> Gregory P. Smith added the comment: What's needed here is a Decision. (release managers and steering councils make those) IMNSHO, this regression is intentional and does not feel like a bug. The Python HTTP APIs were never designed with an explicit intent to allow violations of the protocol. That it was "allowed" was an accident because the very old original API design didn't go out of its way to check much. That doesn't mean it was intended. Hyrum's Law applies as the (lack of) behavior has been around forever. So of course someone has written code that depended on that. But it doesn't make said code right. We either "be strict in what we produce" or we ignore abuse of the APIs and effectively close all CVEs filed against them as "not a bug, this library is intended to allow abuse when given untrusted input." If we take the latter route and intended to allow such things, we'd need to explicitly document it as such and guarantee their behaviors. As noted, disallowing it has already shipped in two stable releases. When writing tests of particular out of spec queries such that servers can implement good "be lenient in what you accept" behavior, it is better not to depend on specific behaviors of a given http client library to allow you to do so for such tests. If the decision requires code changes, do not expect me to spend time creating them. Please feel free to loop me in on PR reviews but I'd rather not review anything without release manager approval of the direction they take things in the first place. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 00:03:21 2019 From: report at bugs.python.org (Lisa Roach) Date: Fri, 20 Sep 2019 04:03:21 +0000 Subject: [issue38161] AsyncMock add `.awaited` like `.called` In-Reply-To: <1568389768.59.0.850541174467.issue38161@roundup.psfhosted.org> Message-ID: <1568952201.67.0.449348428739.issue38161@roundup.psfhosted.org> Lisa Roach added the comment: Yeah I think the current `awaited` ought to at least be a private variable, since people will assume it works like a boolean to match `.called`. Then we could add a new, proper, `awaited` that would function like: >>> mock = AsyncMock() >>> cr_mock = mock() >>> mock.called True >>> mock.awaited False >>> await cr_mock >>> mock.awaited True ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 00:04:21 2019 From: report at bugs.python.org (Lisa Roach) Date: Fri, 20 Sep 2019 04:04:21 +0000 Subject: [issue38093] Update MagicMock __aenter__ and __aexit__ to return AsyncMock's In-Reply-To: <1568126561.19.0.234964443085.issue38093@roundup.psfhosted.org> Message-ID: <1568952261.13.0.718437772771.issue38093@roundup.psfhosted.org> Lisa Roach added the comment: New changeset 8b03f943c37e07fb2394acdcfacd066647f9b1fd by Lisa Roach in branch 'master': bpo-38093: Correctly returns AsyncMock for async subclasses. (GH-15947) https://github.com/python/cpython/commit/8b03f943c37e07fb2394acdcfacd066647f9b1fd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 00:10:19 2019 From: report at bugs.python.org (Ned Deily) Date: Fri, 20 Sep 2019 04:10:19 +0000 Subject: [issue38216] Fix for issue30458 prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1568952619.12.0.254441915421.issue38216@roundup.psfhosted.org> Ned Deily added the comment: Thanks for your comments, Greg. Here's my take as release manager for 3.7 (and for 3.6). What bothers me here is that we apparently changed de facto behavior between maintenance releases, in the middle of 3.7's lifecycle, without warning, no doubt because we didn't realize it would break third-party packages. But it has and that's a big no-no. A very important part of our maintenance strategy is that we implicitly promise our users that they can easily upgrade from any older release in a release family to the most current release without fear of incompatibilities (e.g. 3.7.0 to 3.7.4). In return for that, we will only provide fixes for the most recent maintenance release in a family (e.g. once 3.7.5 is released, 3.7.4 is dead and 2.7.3 through 3.7.0 were already dead). So it seems here we have violated that compatibility promise for 3.7 and 3.6 and are about to do so for 3.5 and 2.7. Since at least one project is known to have been impacted, it's not unreasonable to expect that more will be. So I think we should avoid such breakage and undo the change in behavior for 3.7 (and the older releases as well). Now, as for 3.8, as it hasn't released yet, we have more latitude and, although we're close to producing an RC, it may still be OK to document the changed behavior there. That should be ?ukasz's call. Does that make sense? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 00:22:10 2019 From: report at bugs.python.org (Ammar Askar) Date: Fri, 20 Sep 2019 04:22:10 +0000 Subject: [issue38216] Fix for issue30458 prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1568953330.55.0.709675711846.issue38216@roundup.psfhosted.org> Ammar Askar added the comment: > What bothers me here is that we apparently changed de facto behavior between maintenance releases, in the middle of 3.7's lifecycle, without warning, no doubt because we didn't realize it would break third-party packages. Arguably, I think the programs that are affected by this vulnerability far outnumber the amount of third-party packages that will be broken. The trade-off here seems to be between the promise of compatibility and the promise of security, choosing compatibility strikes me as odd. ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 00:23:03 2019 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 20 Sep 2019 04:23:03 +0000 Subject: [issue38225] iscoroutinefunction broken with cython - allow tagging of functions as async? In-Reply-To: <1568918319.91.0.348855638851.issue38225@roundup.psfhosted.org> Message-ID: <1568953383.72.0.852741844962.issue38225@roundup.psfhosted.org> Stefan Behnel added the comment: My usual first reaction is: "if you need to find out whether the return value of a callable will be an Awaitable or not, without calling it, then you're probably doing something wrong in your design". However, a) there is code that tries this already (and it falls short in various ways while trying) b) asyncio has a function `iscoroutinefunction` which *seems* to fulfil this need but does not achieve it (because not everything that returns an Awaitable is a "coroutine function") c) asyncio has an internal protocol for marking things as "is a coroutine", which comes close to but isn't "returns an Awaitable when called" So ? should there be an official protocol for marking callables as returning an Awaitable? Should we look at annotations for that? Anything else? Or do we consider this intention inherently flawed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 00:50:02 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 20 Sep 2019 04:50:02 +0000 Subject: [issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT) In-Reply-To: <1565471250.77.0.491506074373.issue37812@roundup.psfhosted.org> Message-ID: <1568955002.86.0.347987442283.issue37812@roundup.psfhosted.org> Kyle Stanley added the comment: > I'm one of the first to advocate to replace ugly macros with clean static inline functions. Macros are evil and can be too easily misused. As someone who has only more recently started learning the C-API (and C in general), I'm certainly in favor of replacing macros with functions when possible. I might be a bit biased, but it definitely makes the code a lot easier to understand (especially the macros with implicit returns). As long as there's not a significant performance loss and it doesn't introduce new complications, I don't see an issue with it. >From my understanding, readability isn't as high of a priority in the C code, but certainly there's some benefit to improving areas that are more difficult to understand. The easier the code is to understand, the lower the overall maintenance cost becomes. Of course, this should certainly be done in moderation to reduce the introduction of unnecessary new bugs and the cost in reviewer time for more pressing concerns. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 00:50:53 2019 From: report at bugs.python.org (Greg Price) Date: Fri, 20 Sep 2019 04:50:53 +0000 Subject: [issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT) In-Reply-To: <1565471250.77.0.491506074373.issue37812@roundup.psfhosted.org> Message-ID: <1568955053.88.0.759656937796.issue37812@roundup.psfhosted.org> Greg Price added the comment: I hesitate to come back to this thread, because as Raymond says it's consumed a lot of time already. But I think this point is of broader interest than the specific few lines we've been discussing: > When small integer are disabled at compilation time (NSMALLPOSINTS=0 and a NSMALLNEGINTS=0), I suggest to remove code related to small integers. IMHO CHECK_SMALL_INT() macro is a good practical solution for that. Victor, can you be more specific about the problem this is solving? I think the existing code in master really doesn't leave any problems in place that CHECK_SMALL_INT solves. In master (as of 2702638ea), here's the code that CHECK_SMALL_INT would replace: if (IS_SMALL_INT(ival)) { return get_small_int((sdigit)ival); } When NSMALLPOSINTS=0 and NSMALLNEGINTS=0 , this expands in the preprocessor to the equivalent of: if (0) { return (Py_UNREACHABLE(), NULL); } (Specifically, it expands to whatever that expands to, since Py_UNREACHABLE and possibly NULL are also macros.) A compiler that's attempting to do any significant optimization at all has to be able to discard code that's inside `if (0)`; dead-code elimination is a necessary primitive for lots of other optimizations. (And at a quick empirical sanity-check: gcc, clang, and msvc all do so at any optimization setting other than "disabled". In fact gcc and clang do so even with optimizations disabled.) You made the case very nicely above that macros are evil. The IS_SMALL_INT macro is fairly mild, and it has a performance benefit on some platforms to justify it. But CHECK_SMALL_INT causes a return from the enclosing function, which seems quite high on the "evil macro" scale. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 01:03:25 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 20 Sep 2019 05:03:25 +0000 Subject: [issue37224] test__xxsubinterpreters failed on AMD64 Windows8.1 Refleaks 3.8 In-Reply-To: <1560214681.61.0.906498246375.issue37224@roundup.psfhosted.org> Message-ID: <1568955805.8.0.910770187463.issue37224@roundup.psfhosted.org> Kyle Stanley added the comment: Is there a currently reliable way of accessing the GIL functions within the sub-interpreters, without causing deadlock issues? I was trying to follow the advice in the documentation (https://docs.python.org/3/c-api/init.html?highlight=global%20interpreter%20lock#bugs-and-caveats). "It is highly recommended that you don?t switch sub-interpreters between a pair of matching PyGILState_Ensure() and PyGILState_Release() calls." But it seemed that any attempt to use any of the PyGIL* calls within ``interp_destroy()`` in a meaningful way resulted in a deadlock, even if it was done away from the sub-interpreter switching. My next idea would be to add a conditional check to see if the current thread has ownership of the GIL, and using ``PyEval_RestoreThread()`` to acquire it if it doesn't. This would be followed by releasing the GIL with ``PyThreadState_Get()`` at the end of the function. I'll try experimenting with that idea next. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 01:14:48 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 20 Sep 2019 05:14:48 +0000 Subject: [issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT) In-Reply-To: <1565471250.77.0.491506074373.issue37812@roundup.psfhosted.org> Message-ID: <1568956488.26.0.153036816954.issue37812@roundup.psfhosted.org> Raymond Hettinger added the comment: I'm unassigning this. It has been blown profoundly out of proportion. The recommendation of the senior most developer is being ignored, and now two developers are speaking in terms of strong belief systems and labeling long-stable code as "evil". This doesn't bode well and it makes it difficult to conduct reasoned discourse. (Meanwhile, we have another have another long-term active developer who routinely adds new macros to existing code because he thinks that is an improvement. That portends a pointless tug-of-war predicated almost solely in not liking how other people code). ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 02:27:26 2019 From: report at bugs.python.org (Ma Lin) Date: Fri, 20 Sep 2019 06:27:26 +0000 Subject: [issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT) In-Reply-To: <1565471250.77.0.491506074373.issue37812@roundup.psfhosted.org> Message-ID: <1568960846.2.0.223878658383.issue37812@roundup.psfhosted.org> Ma Lin added the comment: Recent commits for longobject.c Revision: 5e63ab05f114987478a21612d918a1c0276fe9d2 Author: Greg Price Date: 19-8-25 1:19:37 Message: bpo-37812: Convert CHECK_SMALL_INT macro to a function so the return is explicit. (GH-15216) The concern for this issue is: implicit return from macro. We can add a comment before the call sites of CHECK_SMALL_INT macro, to explain that there is a possible return. Revision: 6b519985d23bd0f0bd072b5d5d5f2c60a81a19f2 Author: animalize Date: 19-9-6 14:00:56 Message: replace inline function `is_small_int` with a macro version (GH-15710) Then this commit is not necessary. Revision: c6734ee7c55add5fdc2c821729ed5f67e237a096 Author: Sergey Fedoseev Date: 19-9-12 22:41:14 Message: bpo-37802: Slightly improve perfomance of PyLong_FromUnsigned*() (GH-15192) This commit introduced a compiler warning due to this line [1]: d:\dev\cpython\objects\longobject.c(412): warning C4244: ?function?: from ?unsigned long? to ?sdigit ??may lose data [1] the line: return get_small_int((ival)); \ https://github.com/python/cpython/blob/master/Objects/longobject.c#L386 Revision: 42acb7b8d29d078bc97b0cfd7c4911b2266b26b9 Author: HongWeipeng <961365124 at qq.com> Date: 19-9-18 23:10:15 Message: bpo-35696: Simplify long_compare() (GH-16146) IMO this commit reduces readability a bit. We can sort out these problems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 02:48:02 2019 From: report at bugs.python.org (Tim Peters) Date: Fri, 20 Sep 2019 06:48:02 +0000 Subject: [issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT) In-Reply-To: <1565471250.77.0.491506074373.issue37812@roundup.psfhosted.org> Message-ID: <1568962082.83.0.725659771372.issue37812@roundup.psfhosted.org> Tim Peters added the comment: Sorry, but there was nothing wrong with the CHECK_SMALL_INT macro, to my eyes, to begin with - except that it was burdened with an over-elaborate "do ... while(0)" wrapper. Not all macros are _intended_ to be "cheap functions". Like this one, some are intended to be merely textual replacement, to minimize tedious and error-prone redundant typing, in a specific file. Even "bulletproofing them" with tricks like "do ... while(0)" cruft is counterproductive in such cases. They're not _intended_ to capture abstractions, neither for general use. This one was intended to check its argument and possibly return, exactly what its expansion did (after mentally tossing out the distracting "do while" noise). Nobody competent to address logic errors in longobject.c was confused about that in the slightest. Knowing the details of how small integers may be cached is part of what "competent" means in this context, and what the macro does is so simple it's no burden to learn or to use. Is there an "aesthetic code cleanup" patch that's ever turned out well? ;-) ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 03:40:51 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 20 Sep 2019 07:40:51 +0000 Subject: [issue38216] Fix for issue30458 prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1568965251.41.0.888095342369.issue38216@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: For reference this is how urllib handled the same issue in their test suite : https://github.com/urllib3/urllib3/pull/1673. golang also received similar regression report as the change landed in 1.11.6 and discussion : https://github.com/golang/go/issues/30903 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 03:56:31 2019 From: report at bugs.python.org (Greg Price) Date: Fri, 20 Sep 2019 07:56:31 +0000 Subject: [issue16684] Unicode property value abbreviated names and long names In-Reply-To: <1355506392.97.0.314398568458.issue16684@psf.upfronthosting.co.za> Message-ID: <1568966191.51.0.993224144287.issue16684@roundup.psfhosted.org> Greg Price added the comment: I've gone and implemented a version of this that's integrated into Tools/unicode/makeunicodedata.py , and into the unicodedata module. Patch attached. Demo: >>> import unicodedata, pprint >>> pprint.pprint(unicodedata.property_value_aliases) {'bidirectional': {'AL': ['Arabic_Letter'], # ... 'WS': ['White_Space']}, 'category': {'C': ['Other'], # ... 'east_asian_width': {'A': ['Ambiguous'], # ... 'W': ['Wide']}} Note that the values are lists. That's because a value can have multiple aliases in addition to its "short name": >>> unicodedata.property_value_aliases['category'][unicodedata.category('4')] ['Decimal_Number', 'digit'] This implementation also provides the reverse mapping, from an alias to the "short name": >>> pprint.pprint(unicodedata.property_value_by_alias) {'bidirectional': {'Arabic_Letter': 'AL', # ... This draft doesn't have tests or docs, but it's otherwise complete. I've posted it at this stage for feedback on a few open questions: * This version is in C; at import time some C code builds up the dicts, from static tables in the header generated by makeunicodedata.py . It's not *that* much code... but it sure would be more convenient to do in Python instead. Should the unicodedata module perhaps have a Python part? I'd be happy to go about that -- rename the existing C module to _unicodedata and add a small unicodedata.py wrapper -- if there's a feeling that it'd be a good idea. Then this could go there instead of using the C code I've just written. * Is this API the right one? * This version has e.g. unicodedata.property_value_by_alias['category']['Decimal_Number'] == 'Nd' . * Perhaps make category/bidirectional/east_asian_width into attributes rather than keys? So e.g. unicodedata.property_value_by_alias.category['Decimal_Number'] == 'Nd' . * Or: the standard says "loose matching" should be applied to these names, so e.g. 'decimal number' or 'is-decimal-number' is equivalent to 'Decimal_Number'. To accomplish that, perhaps make it not dicts at all but functions? So e.g. unicodedata.property_value_by_alias('decimal number') == unicodedata.property_value_by_alias('Decimal_Number') == 'Nd' . * There's also room for bikeshedding on the names. * How shall we handle ucd_3_2_0 for this feature? This implementation doesn't attempt to record the older version of the data. My reasoning is that because the applications of the old data are quite specific and they haven't needed this information yet, it seems unlikely anyone will ever really want to know from this module just which aliases existed already in 3.2.0 and which didn't yet. OTOH, as a convenience I've caused e.g. unicodedata.ucd_3_2_0.property_value_by_alias to exist, just pointing to the same object as unicodedata.property_value_by_alias . This allows unicodedata.ucd_3_2_0 to remain a near drop-in substitute for the unicodedata module itself, while minimizing the complexity it adds to the implementation. Might be cleanest to just leave these off of ucd_3_2_0 entirely, though. It's still easy to get at them -- just get them from the module itself -- and it makes it explicit that you're getting current rather than old data. ---------- keywords: +patch nosy: +Greg Price versions: +Python 3.9 -Python 3.8 Added file: https://bugs.python.org/file48616/prop-val-aliases.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 04:08:34 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 20 Sep 2019 08:08:34 +0000 Subject: [issue38154] test__xxsubinterpreters: random failures on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1568368239.98.0.217777678278.issue38154@roundup.psfhosted.org> Message-ID: <1568966914.25.0.380878571736.issue38154@roundup.psfhosted.org> Change by Kyle Stanley : ---------- keywords: +patch pull_requests: +15879 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16293 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 04:11:07 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 20 Sep 2019 08:11:07 +0000 Subject: [issue38154] test__xxsubinterpreters: random failures on AMD64 FreeBSD CURRENT Shared 3.x In-Reply-To: <1568368239.98.0.217777678278.issue38154@roundup.psfhosted.org> Message-ID: <1568967067.15.0.453723323443.issue38154@roundup.psfhosted.org> Kyle Stanley added the comment: For an updated explanation of the PR, see https://bugs.python.org/msg352835 or the comments in the PR itself. ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 04:29:17 2019 From: report at bugs.python.org (Greg Price) Date: Fri, 20 Sep 2019 08:29:17 +0000 Subject: [issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT) In-Reply-To: <1565471250.77.0.491506074373.issue37812@roundup.psfhosted.org> Message-ID: <1568968157.23.0.830134694063.issue37812@roundup.psfhosted.org> Greg Price added the comment: > labeling long-stable code as "evil". Let me apologize about this bit -- I was thinking of the term in quotes (referring to the earlier comment), but I didn't write it clearly that way. I don't think any of this code is evil, past or present, and I regret that I carelessly gave that impression. I think there isn't currently any problem to be solved here, and I hope we can all put our energy elsewhere. (For my part, I just spent the balance of the evening implementing an old feature request on unicodedata.) Victor, I'd still be quite interested in better understanding your thinking (as this example relates to macros in general) if you'd like to reply, though this thread may not be the right place to continue. You can find my email in Git, and I'm on Zulip and Discourse; and I'd be happy to start or follow a thread in a forum you think appropriate. Or if you'd rather drop it entirely, that's fine too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 04:47:04 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 20 Sep 2019 08:47:04 +0000 Subject: [issue38225] iscoroutinefunction broken with cython - allow tagging of functions as async? In-Reply-To: <1568918319.91.0.348855638851.issue38225@roundup.psfhosted.org> Message-ID: <1568969224.46.0.896028788279.issue38225@roundup.psfhosted.org> Andrew Svetlov added the comment: I think `func.__awaitable__ = True` can serve all possible situations. We need it for async mocks (now the library use flawless `_is_coroutine` approach. `__awaitable__` can also cover cases where a regular function returns awaitable object or there is a class with `def __await__(self)` method, `functools.partial` -- all of them are awaitable. Async functions can be modified to provide the property out of the box. Regarding the question "is a check for awaitableness a good design or not"? I agree that a check for awaitableness is useless *just before* calling the function. There is another very useful case where the check is important: registering a callback for later usage. For example, we have a web server framework. It is built around a mapping of URL paths to async functions, e.g. path('/hello', say_hello) in Django style. It's crucial to check if say_hello() is an async function *on the application configuration stage*, not on viewing the particular http://localhost/hello page in a browser. So, I think an official protocol makes a lot of sense, let's implement it in 3.9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 06:00:36 2019 From: report at bugs.python.org (Matej Cepl) Date: Fri, 20 Sep 2019 10:00:36 +0000 Subject: [issue38216] Fix for issue30458 prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1568973636.54.0.185963207955.issue38216@roundup.psfhosted.org> Change by Matej Cepl : ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 08:47:45 2019 From: report at bugs.python.org (longwenzhang) Date: Fri, 20 Sep 2019 12:47:45 +0000 Subject: [issue38230] A Path Traversal vulnerability in ssl_servers.py Message-ID: <1568983665.6.0.164381465993.issue38230@roundup.psfhosted.org> New submission from longwenzhang : There is a Path Traversal vulnerability in https://github.com/python/cpython/blob/master/Lib/test/ssl_servers.py (on windows platform), Steps to reproduce: 1.Run the script https://github.com/python/cpython/blob/master/Lib/test/ssl_servers.py 2.If you visit the https://127.0.0.1:4433/ , you will see the files in the current directory, But if you visit the https://127.0.0.1:4433/c:../,you will jump to parent directory, and if you visit https://127.0.0.1:4433/d:../ , you will see the files of D:\ 3.I'm sure it?s a Path Traversal and I think the problem is at https://github.com/python/cpython/blob/master/Lib/test/ssl_servers.py#L71 , there is no check about ?word?. ---------- components: Tests messages: 352844 nosy: longwenzhang priority: normal severity: normal status: open title: A Path Traversal vulnerability in ssl_servers.py type: security versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 09:13:15 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 20 Sep 2019 13:13:15 +0000 Subject: [issue38230] A Path Traversal vulnerability in ssl_servers.py In-Reply-To: <1568983665.6.0.164381465993.issue38230@roundup.psfhosted.org> Message-ID: <1568985195.19.0.138034232128.issue38230@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Is this only about the test/ssl_servers.py ? I am not sure they are meant to be used by users and might have path access for tests. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 09:14:28 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 20 Sep 2019 13:14:28 +0000 Subject: [issue38230] A Path Traversal vulnerability in test/ssl_servers.py In-Reply-To: <1568983665.6.0.164381465993.issue38230@roundup.psfhosted.org> Message-ID: <1568985268.75.0.869107955302.issue38230@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- title: A Path Traversal vulnerability in ssl_servers.py -> A Path Traversal vulnerability in test/ssl_servers.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 09:25:10 2019 From: report at bugs.python.org (Emmanuel Arias) Date: Fri, 20 Sep 2019 13:25:10 +0000 Subject: [issue38225] iscoroutinefunction broken with cython - allow tagging of functions as async? In-Reply-To: <1568918319.91.0.348855638851.issue38225@roundup.psfhosted.org> Message-ID: <1568985910.85.0.582731825445.issue38225@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- nosy: +eamanu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 09:39:39 2019 From: report at bugs.python.org (Matt) Date: Fri, 20 Sep 2019 13:39:39 +0000 Subject: [issue38231] Documentation search results focus on tutorials and not language specifications Message-ID: <1568986779.54.0.790565695991.issue38231@roundup.psfhosted.org> New submission from Matt : * Problem: Documentation search results favor tutorials and over language specifications * How to reproduce: I often forget simple syntax. For example, say I want to raise an exception. Clearly, I need to search for "raise". 1. Go to https://docs.python.org/3.6/search.html 2. Type in "raise" * Expected result: A clearly understandable link to the "raise" documentation or something closely related, such as link to the "Built-in Exceptions" documentation * Actual result: The documentation for the "raise" keyword is given in search result number... at first, second, and third glance, I don't even know if a page describing the "raise" command is returned. The first result is a 2to3 conversion tutorial. The second result is for urllib.error. The third result is a unittest.mock tutorial The fourth result is an optparse tutorial The fifth result is a tutorial for "simple statements" The sixth result is a tutorial for "Errors and exceptions". The seventh result is a for "exception handling" After much poking around, it turns out that the documentation for "raise" is in the "Simple statements" tutorial. Knowing to select the correct link requires knowing that "raise" is a statement, as the only indication that this is the correct link is that "raise_stmt" occurs in its preview snippet. Searching for related terms, such as "exceptions" or "errors", returns similarly indirect results, such as tutorials for "Extending Python with C or C++" and "API Reference". The experience is the same, regardless of the Python version searched. * Proposed solution: I'm not sure how I can help with this, but I would like to. For example, is there some kind of tagging I could do while meandering through the morass of Python documentation? ---------- assignee: docs at python components: Documentation messages: 352846 nosy: docs at python, excalamus priority: normal severity: normal status: open title: Documentation search results focus on tutorials and not language specifications type: behavior versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 09:54:58 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 20 Sep 2019 13:54:58 +0000 Subject: [issue38216] Fix for issue30458 prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1568987698.78.0.179766176438.issue38216@roundup.psfhosted.org> Gregory P. Smith added the comment: All bug fixes are behavior changes. Any broken behavior can be relied upon by someone. So far the only ones who have popped up with this change as being a problem is one project's test suite where the behavior was used by a test because it was a convenient hack. Not by application code. Reverting mitigations due to the undesired behavior being convenient for someones protocol-abuse tests seems over cautious. Those can be updated to not use our client library for their abuse scenarios. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 09:55:38 2019 From: report at bugs.python.org (Zachary Ware) Date: Fri, 20 Sep 2019 13:55:38 +0000 Subject: [issue37353] Source code has not always been forward-compatible In-Reply-To: <1561051346.87.0.0805255025553.issue37353@roundup.psfhosted.org> Message-ID: <1568987738.61.0.554649171162.issue37353@roundup.psfhosted.org> Zachary Ware added the comment: New changeset 062cfe3b11c61d03ccc2915e360f9b0d80e23642 by Zachary Ware (Prateek Nayak) in branch 'master': bpo-37353: Updated parser note about source code compatibility(GH-14277) https://github.com/python/cpython/commit/062cfe3b11c61d03ccc2915e360f9b0d80e23642 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 09:56:11 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 20 Sep 2019 13:56:11 +0000 Subject: [issue37353] Source code has not always been forward-compatible In-Reply-To: <1561051346.87.0.0805255025553.issue37353@roundup.psfhosted.org> Message-ID: <1568987771.35.0.00130435200549.issue37353@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15880 pull_request: https://github.com/python/cpython/pull/16294 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 09:56:19 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 20 Sep 2019 13:56:19 +0000 Subject: [issue37353] Source code has not always been forward-compatible In-Reply-To: <1561051346.87.0.0805255025553.issue37353@roundup.psfhosted.org> Message-ID: <1568987779.73.0.469180192902.issue37353@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15881 pull_request: https://github.com/python/cpython/pull/16295 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 09:57:52 2019 From: report at bugs.python.org (Zachary Ware) Date: Fri, 20 Sep 2019 13:57:52 +0000 Subject: [issue37353] Source code has not always been forward-compatible In-Reply-To: <1561051346.87.0.0805255025553.issue37353@roundup.psfhosted.org> Message-ID: <1568987872.94.0.782145891351.issue37353@roundup.psfhosted.org> Change by Zachary Ware : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 10:02:04 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 20 Sep 2019 14:02:04 +0000 Subject: [issue37353] Source code has not always been forward-compatible In-Reply-To: <1561051346.87.0.0805255025553.issue37353@roundup.psfhosted.org> Message-ID: <1568988124.43.0.541260765853.issue37353@roundup.psfhosted.org> miss-islington added the comment: New changeset 2552e27b752f449b1d7046b384b14db0a69f46ad by Miss Islington (bot) in branch '3.7': bpo-37353: Updated parser note about source code compatibility(GH-14277) https://github.com/python/cpython/commit/2552e27b752f449b1d7046b384b14db0a69f46ad ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 10:03:13 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 20 Sep 2019 14:03:13 +0000 Subject: [issue38216] Fix for issue30458 prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1568988193.73.0.280120694211.issue38216@roundup.psfhosted.org> Jason R. Coombs added the comment: Thanks for all the comments. I agree the current (secure by default) implementation is desirable. I also agree that such usage was never explicitly supported, so the "regression" here is perhaps over-stated. What I seek is to avoid the Go recommendation of "fork the implementation" when a lightweight hook could be provided as a means to achieve a reasonable, if unusual and discouraged, behavior. In particular, I'd like to support: Sending a single request with invalid bytes for the path. Allowing all requests for a client to support invalid bytes on the path. Ideally, the solution should allow sending other non-control bytes as well, supporting the use case reported in issue36274 also. I'll draft a patch. I'll try to get to it this weekend, but if I don't, don't feel like this needs to block releases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 10:03:24 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 20 Sep 2019 14:03:24 +0000 Subject: [issue37353] Source code has not always been forward-compatible In-Reply-To: <1561051346.87.0.0805255025553.issue37353@roundup.psfhosted.org> Message-ID: <1568988204.86.0.493889031014.issue37353@roundup.psfhosted.org> miss-islington added the comment: New changeset 0ab6b01820afef44beea8158ba08b6469bf264a0 by Miss Islington (bot) in branch '3.8': bpo-37353: Updated parser note about source code compatibility(GH-14277) https://github.com/python/cpython/commit/0ab6b01820afef44beea8158ba08b6469bf264a0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 10:34:10 2019 From: report at bugs.python.org (Andrei Troie) Date: Fri, 20 Sep 2019 14:34:10 +0000 Subject: [issue38232] empty local-part in addr_spec displayed incorrectly Message-ID: <1568990050.48.0.808924350002.issue38232@roundup.psfhosted.org> New submission from Andrei Troie : Given an (RFC-legal) email address with the local part consisting of a quoted empty string (e.g. 'Nobody <""@example.org>'), when I call the 'addr_spec' property, the result no longer includes the quoted empty string (so, in this case, addr_spec would return '@example.org'). ---------- components: email files: example_parser.py messages: 352852 nosy: andreitroiebbc, barry, r.david.murray priority: normal severity: normal status: open title: empty local-part in addr_spec displayed incorrectly type: behavior versions: Python 3.6, Python 3.7, Python 3.8 Added file: https://bugs.python.org/file48617/example_parser.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 10:55:16 2019 From: report at bugs.python.org (Alexandre Ouellet) Date: Fri, 20 Sep 2019 14:55:16 +0000 Subject: [issue38233] datetime.datetime.fromtimestamp have different behaviour on windows and mac Message-ID: <1568991316.62.0.929906860007.issue38233@roundup.psfhosted.org> New submission from Alexandre Ouellet : in a python console on a windows machine: import datetime d = datetime.datetime.fromtimestamp(0) d >datetime.datetime(1969, 12, 31, 19, 0) d.timestamp() >OSError: [Errno 22] Invalid argument on a macOS machine : d = datetime.datetime.fromtimestamp(-1) d >datetime.datetime(1969, 12, 31, 19, 0) d.timestamp() >-1.0 both machines running 3.6.9 I would expect them have the same behaviour. ---------- components: Windows, macOS messages: 352853 nosy: Alexandre Ouellet, ned.deily, paul.moore, ronaldoussoren, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: datetime.datetime.fromtimestamp have different behaviour on windows and mac type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 11:13:00 2019 From: report at bugs.python.org (Sylvain Marie) Date: Fri, 20 Sep 2019 15:13:00 +0000 Subject: [issue30129] functools.partialmethod should look more like what it's impersonating. In-Reply-To: <1492784871.01.0.595019366474.issue30129@psf.upfronthosting.co.za> Message-ID: <1568992380.29.0.822072310639.issue30129@roundup.psfhosted.org> Sylvain Marie added the comment: For future reference if this topic re-opens, there is now an alternative here: https://smarie.github.io/python-makefun/#removing-parameters-easily Note: it relies on a dynamic `compile` statement so of course it is less optimal than the one in functools. But at least it can serve as a reference... ---------- nosy: +smarie _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 11:19:14 2019 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 20 Sep 2019 15:19:14 +0000 Subject: [issue37937] Mention ``frame.f_trace`` in :func:`sys.settrace` docs. In-Reply-To: <1567841962.19.0.174314664422.issue37937@roundup.psfhosted.org> Message-ID: <1568992754.06.0.642324175239.issue37937@roundup.psfhosted.org> Nick Coghlan added the comment: New changeset 9c2682efc69568e1b42a0c1759489d6f2e3b30ea by Nick Coghlan (Ram Rachum) in branch 'master': bpo-37937: Mention frame.f_trace in sys.settrace docs (GH-15439) https://github.com/python/cpython/commit/9c2682efc69568e1b42a0c1759489d6f2e3b30ea ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 11:19:17 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 20 Sep 2019 15:19:17 +0000 Subject: [issue37937] Mention ``frame.f_trace`` in :func:`sys.settrace` docs. In-Reply-To: <1567841962.19.0.174314664422.issue37937@roundup.psfhosted.org> Message-ID: <1568992757.5.0.0593430488334.issue37937@roundup.psfhosted.org> Change by miss-islington : ---------- keywords: +patch pull_requests: +15882 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16296 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 11:19:26 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 20 Sep 2019 15:19:26 +0000 Subject: [issue37937] Mention ``frame.f_trace`` in :func:`sys.settrace` docs. In-Reply-To: <1567841962.19.0.174314664422.issue37937@roundup.psfhosted.org> Message-ID: <1568992766.88.0.462816359395.issue37937@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15883 pull_request: https://github.com/python/cpython/pull/16297 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 11:19:54 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 20 Sep 2019 15:19:54 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration Message-ID: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : When calling Py_SetPath(), the value that is passed in is ignored. ---------- components: Interpreter Core keywords: 3.8regression messages: 352856 nosy: pablogsal, vstinner priority: normal severity: normal status: open title: The value of Py_SetPath is not used to populate the configuration type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 11:20:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 15:20:59 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1568992859.3.0.438047664582.issue38234@roundup.psfhosted.org> STINNER Victor added the comment: It's a 3.8 regression: I set the priority to release blocker. ---------- nosy: +lukasz.langa priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 11:22:01 2019 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 20 Sep 2019 15:22:01 +0000 Subject: [issue37937] Mention ``frame.f_trace`` in :func:`sys.settrace` docs. In-Reply-To: <1567841962.19.0.174314664422.issue37937@roundup.psfhosted.org> Message-ID: <1568992921.2.0.843541073221.issue37937@roundup.psfhosted.org> Nick Coghlan added the comment: Thanks for the PR, Ram, and the initial review, Serhiy. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 11:24:50 2019 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 20 Sep 2019 15:24:50 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1568993090.53.0.420338716926.issue38234@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: A very simple way to reproduce the bug: Using pyInstaller, after applying these patches (to fix other Python3.8 issues) https://github.com/pyinstaller/pyinstaller/pull/4441 https://github.com/pyinstaller/pyinstaller/pull/4440 you will get Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding Python runtime state: core initialized ModuleNotFoundError: No module named 'encodings' This is because Python will use the default value for sys.path, including the "lib" subdirectory: /dist/hello/lib/python3.8 ^----------------> This should not be here Instead, that value should be the one that pyinstaller passes when calling Py_SetPath() here: https://github.com/pyinstaller/pyinstaller/blob/develop/bootloader/src/pyi_pythonlib.c#L495 So it should be: /dist/hello/python3.8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 11:25:15 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 20 Sep 2019 15:25:15 +0000 Subject: [issue37937] Mention ``frame.f_trace`` in :func:`sys.settrace` docs. In-Reply-To: <1567841962.19.0.174314664422.issue37937@roundup.psfhosted.org> Message-ID: <1568993115.15.0.438468103431.issue37937@roundup.psfhosted.org> miss-islington added the comment: New changeset fd4f28d894ee55d7ee1625c726c1859fcd1e2249 by Miss Islington (bot) in branch '3.7': bpo-37937: Mention frame.f_trace in sys.settrace docs (GH-15439) https://github.com/python/cpython/commit/fd4f28d894ee55d7ee1625c726c1859fcd1e2249 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 11:26:30 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 20 Sep 2019 15:26:30 +0000 Subject: [issue37937] Mention ``frame.f_trace`` in :func:`sys.settrace` docs. In-Reply-To: <1567841962.19.0.174314664422.issue37937@roundup.psfhosted.org> Message-ID: <1568993190.59.0.741363062849.issue37937@roundup.psfhosted.org> miss-islington added the comment: New changeset c410390e89071c4a4c2a437a227c14274add4116 by Miss Islington (bot) in branch '3.8': bpo-37937: Mention frame.f_trace in sys.settrace docs (GH-15439) https://github.com/python/cpython/commit/c410390e89071c4a4c2a437a227c14274add4116 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 11:41:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 15:41:04 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1568994064.56.0.249086144411.issue38234@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +15884 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16298 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 11:42:05 2019 From: report at bugs.python.org (Andrei Troie) Date: Fri, 20 Sep 2019 15:42:05 +0000 Subject: [issue38232] empty local-part in addr_spec displayed incorrectly In-Reply-To: <1568990050.48.0.808924350002.issue38232@roundup.psfhosted.org> Message-ID: <1568994125.82.0.621125933337.issue38232@roundup.psfhosted.org> Change by Andrei Troie : ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 11:43:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 15:43:33 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1568994213.36.0.133473675429.issue38234@roundup.psfhosted.org> STINNER Victor added the comment: That's a regression that I introduced between Python 3.7 and 3.8 when refactoring _PyCoreConfig/_PyPathConfig code into PyConfig/_PyPathConfig. Previously, if Py_SetPath() was called, the specified string was used to fill config->module_search_paths. Now, this string is basically ignored. PR 16298 fix this regression. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 11:45:48 2019 From: report at bugs.python.org (Ammar Askar) Date: Fri, 20 Sep 2019 15:45:48 +0000 Subject: [issue38233] datetime.datetime.fromtimestamp have different behaviour on windows and mac In-Reply-To: <1568991316.62.0.929906860007.issue38233@roundup.psfhosted.org> Message-ID: <1568994348.59.0.596141427623.issue38233@roundup.psfhosted.org> Ammar Askar added the comment: Thanks for the report Alexandre, this has to do with issues with negative numbers in Window's time APIs. There's already a bug open for this, so I've marked it as a duplicate. ---------- nosy: +ammar2 resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Timestamp conversion on windows fails with timestamps close to EPOCH type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 12:05:36 2019 From: report at bugs.python.org (Ammar Askar) Date: Fri, 20 Sep 2019 16:05:36 +0000 Subject: [issue38231] Documentation search results focus on tutorials and not language specifications In-Reply-To: <1568986779.54.0.790565695991.issue38231@roundup.psfhosted.org> Message-ID: <1568995536.22.0.0666445539919.issue38231@roundup.psfhosted.org> Ammar Askar added the comment: This is a great point Matt, the documentation search is a bit lacking and we're kind of using https://bugs.python.org/issue34398 and https://github.com/python/cpython/pull/8773 to track it. The current idea that Julien, the docs expert, had is to add some sort of Sphinx directive in the docs that boosts and entry's search result. Would you like to close this issue in favor of that one...or post your comment there so we can track these in one place? ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 12:18:09 2019 From: report at bugs.python.org (Ammar Askar) Date: Fri, 20 Sep 2019 16:18:09 +0000 Subject: [issue34398] Docs search should prominently show definitions and glossary items In-Reply-To: <1534233148.48.0.56676864532.issue34398@psf.upfronthosting.co.za> Message-ID: <1568996289.91.0.134951494909.issue34398@roundup.psfhosted.org> Ammar Askar added the comment: Changing the title a little to represent that this is now a general improvement of the docs search. Julien is working to upstream a solution into Sphinx that will allow any items to be featured prominently on search. ---------- title: Docs search does not index glossary items -> Docs search should prominently show definitions and glossary items _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 12:26:57 2019 From: report at bugs.python.org (Daniel Andersson) Date: Fri, 20 Sep 2019 16:26:57 +0000 Subject: [issue38235] Docs of logging module says argument is named "lvl". TypeError. Message-ID: <1568996817.83.0.32795106699.issue38235@roundup.psfhosted.org> New submission from Daniel Andersson : How to reproduce: >>> import logging >>> logging.disable(lvl=logging.ERROR) Traceback (most recent call last): File "", line 1, in TypeError: disable() got an unexpected keyword argument 'lvl' The correct keyword argument name is `level` as can be seen in the Python code Lib/logging/__init__.py: ---> def disable(level=CRITICAL): The documentation uses `lvl`, see Doc/library/logging.rst: ---> .. function:: disable(lvl=CRITICAL) The solution would be to rename the argument from `lvl` to `level` in the documentation. I also noticed some more cases in the logging module docs where `lvl` is used (and `level` is used in the Python code): * logging.Logger.isEnabledFor(lvl) * logging.Logger.log(lvl, msg, *args, **kwargs) * logging.Logger.makeRecord(name, lvl, fn, lno, msg, args, exc_info, func=None, extra=None, sinfo=None) * logging.addLevelName(lvl, levelName) * logging.getLevelName(lvl) Maybe there are some historical reasons for this that I'm not aware about. I also found an inconsistency. In the `Handler` class the docs does use `level`: * logging.Handler.setLevel(level) I can understand that the English in the documentation might be clearer when written as: "Associates level `lvl` with text `levelName`" instead of, "Associates level `level` with text `levelName`" - avoids the double-"level". But at the same time, I usually trust the documentation blindly and was surprised by this error. In the five listed examples above, `lvl` is only used as a positional argument. Maybe it is more OK to deviate from the actual name in the code in this case compared to keyword arguments, as in logging.disable. ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 352866 nosy: docs at python, penlect, vinay.sajip priority: normal severity: normal status: open title: Docs of logging module says argument is named "lvl". TypeError. versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 12:38:52 2019 From: report at bugs.python.org (Matt) Date: Fri, 20 Sep 2019 16:38:52 +0000 Subject: [issue38231] Documentation search results focus on tutorials and not language specifications In-Reply-To: <1568986779.54.0.790565695991.issue38231@roundup.psfhosted.org> Message-ID: <1568997532.79.0.817057676286.issue38231@roundup.psfhosted.org> Matt added the comment: I will close this issue and post in one of the two places you linked. Thank you for your prompt reply and affirmation of my observations. I feel my language was colored by frustration, yet you focused instead on my willingness to help. I appreciate that and find your response encouraging. Somewhat related, I am responding to this through the bugs.python.org interface. If I reply directly to the email the tracker sent me, will my reply be properly routed to this thread? It's not clear from the send address what would happen if I replied via email. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 12:41:49 2019 From: report at bugs.python.org (Ammar Askar) Date: Fri, 20 Sep 2019 16:41:49 +0000 Subject: [issue38231] Documentation search results focus on tutorials and not language specifications In-Reply-To: <1568986779.54.0.790565695991.issue38231@roundup.psfhosted.org> Message-ID: <1568997709.79.0.237999716658.issue38231@roundup.psfhosted.org> Ammar Askar added the comment: > Somewhat related, I am responding to this through the bugs.python.org interface. If I reply directly to the email the tracker sent me, will my reply be properly routed to this thread? Yes, it will :) The bug tracker allows replies by email. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 12:44:55 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 16:44:55 +0000 Subject: [issue38236] Dump the Python path configuration at the first import error Message-ID: <1568997895.56.0.760570797029.issue38236@roundup.psfhosted.org> New submission from STINNER Victor : When Python path configuration is not properly configured, Python fails with an error looking like: --- Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding Python runtime state: core initialized ModuleNotFoundError: No module named 'encodings' Current thread 0x00007ff0065b2740 (most recent call first): --- This error is very common and hard to debug. It can happen in various cases for various reasons: * Python is embedded in an application * PYTHONPATH and/or PYTHONHOME environment variable is set * pyenv.cfg configuration for virtual environment * Local .py files which override the standard library A few examples: * bpo-38234: Py_SetPath() regression in Python 3.8 which impacts PyInstaller * https://bugs.python.org/issue35978#msg335363 virtual env * https://bugs.python.org/issue35969#msg335249 "encodings.py" file in the current directory * https://stackoverflow.com/questions/55657593/python-3-8-0a3-failed-to-get-the-python-codec-of-the-filesystem-encoding embedded Python * https://askubuntu.com/questions/640010/fatal-python-error-py-initialize-unable-to-get-the-locale-encoding-syntaxe Python 3 installed by Anaconda which uses Python 2.7 stdlib because of PYTHONPATH * https://github.com/GNS3/gns3-gui/issues/2267 Python embedded in "gns3" * https://github.com/JuliaPy/PyCall.jl/issues/410 venv * https://techglimpse.com/error-executing-python3-5-command-solution/ another random error Attached PR dumps the Python path configuration if importing the Python codec of the filesystem encoding fails. In the Python initialization, it's the first import which is done. ---------- components: Interpreter Core messages: 352869 nosy: inada.naoki, ncoghlan, pablogsal, steve.dower, vstinner priority: normal severity: normal status: open title: Dump the Python path configuration at the first import error versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 12:49:02 2019 From: report at bugs.python.org (Lisa Roach) Date: Fri, 20 Sep 2019 16:49:02 +0000 Subject: [issue38093] Update MagicMock __aenter__ and __aexit__ to return AsyncMock's In-Reply-To: <1568126561.19.0.234964443085.issue38093@roundup.psfhosted.org> Message-ID: <1568998142.38.0.00824151030099.issue38093@roundup.psfhosted.org> Change by Lisa Roach : ---------- pull_requests: +15885 pull_request: https://github.com/python/cpython/pull/16299 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 12:55:41 2019 From: report at bugs.python.org (Tim Burke) Date: Fri, 20 Sep 2019 16:55:41 +0000 Subject: [issue38216] Fix for issue30458 prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1568998541.19.0.519964855053.issue38216@roundup.psfhosted.org> Tim Burke added the comment: > Since at least one project is known to have been impacted, it's not unreasonable to expect that more will be. I can confirm at least one other: OpenStack Swift's stable jobs have been broken by https://github.com/python/cpython/commit/bb8071a since 11 Sep; see https://bugs.launchpad.net/swift/+bug/1843816 . (*Why* we're testing against an untagged version of py27, I still need to investigate...) Now, the broken tests *do* represent something of a long-standing bug in application code: our front-end server was lenient in what it accepted but not strict in what it emitted -- it would forward on whatever crazy query params the client sent, directly to the back-end servers. Of course, as long as the back-end servers are *also* lenient in what they accept, it doesn't actually present a problem. Still, I'm happy to fix the issue. Actually *addressing* this has proven problematic, however, as we have numerous functional tests that send raw UTF-8 request paths -- to the point that I can only assume there exist clients sending such requests. Changing the tests to URL-encode the path would do a disservice to those clients, as my fix (or some future fix) may break them and we'd be none the wiser. > We either "be strict in what we produce" or we ignore abuse of the APIs and effectively close all CVEs filed against them as "not a bug, this library is intended to allow abuse when given untrusted input." I think this is a false dichotomy; in https://bugs.python.org/issue36274#msg351834 Jason proposed a few alternatives that allow for a secure and obvious default API while adding a new, explicitly unsafe API. I'd like to add yet another option that may be useful specifically for maintenance releases: forbid only the problematic characters -- namely LF (and potentially CR and SP). This seems like a much more surgical fix for maintenance releases, allowing the null byte for CherryPy or the raw UTF-8 bytes for Swift, while still mitigating the CVE. 3.8 and later can still have the more-robust check to ensure callers have done any requisite URL-escaping. Ideally, there would also be a reasonable hook in place to allow application developers to verify behavior in the presence of invalid requests; something short of writing raw bytes to a socket. > For reference this is how urllib handled the same issue in their test suite : https://github.com/urllib3/urllib3/pull/1673. I think the test suites developed by clients (like urllib3) and servers (like CherryPy or Swift) inherently have very different goals -- where a client would want to ensure that it *produces valid bytes* on the wire, a server ought to check that it doesn't completely fall over when it *receives invalid bytes* on the wire. > What I seek is to avoid the Go recommendation of "fork the implementation" ... This is *exactly* the way we worked around https://bugs.python.org/issue36274 in Swift: swap out putrequest() in our func tests. (See https://github.com/openstack/swift/commit/c0ae48b .) It looks like a similar change will be required to fix our stable branches. I agree, I'd much rather *not* have to do that. :-/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 12:57:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 16:57:05 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1568998625.25.0.362664807245.issue38234@roundup.psfhosted.org> STINNER Victor added the comment: > Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding I created bpo-38236 "Dump the Python path configuration at the first import error" which should ease to debug such issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 13:01:12 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 20 Sep 2019 17:01:12 +0000 Subject: [issue6559] add pass_fds paramter to subprocess.Popen() In-Reply-To: <1248422197.05.0.784368367425.issue6559@psf.upfronthosting.co.za> Message-ID: <1568998872.96.0.666740787057.issue6559@roundup.psfhosted.org> miss-islington added the comment: New changeset 77abf23c67c1a465a8899666c69f6bcd6930e003 by Miss Islington (bot) (Orivej Desh) in branch 'master': bpo-6559: Update _posixsubprocess.fork_exec doc (GH-16283) https://github.com/python/cpython/commit/77abf23c67c1a465a8899666c69f6bcd6930e003 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 13:07:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 17:07:19 +0000 Subject: [issue38236] Dump the Python path configuration at the first import error In-Reply-To: <1568997895.56.0.760570797029.issue38236@roundup.psfhosted.org> Message-ID: <1568999239.17.0.0605745728935.issue38236@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +15886 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16300 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 13:08:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 17:08:39 +0000 Subject: [issue38236] Dump the Python path configuration at the first import error In-Reply-To: <1568997895.56.0.760570797029.issue38236@roundup.psfhosted.org> Message-ID: <1568999319.66.0.188587626627.issue38236@roundup.psfhosted.org> STINNER Victor added the comment: Without my change: --- vstinner at apu$ PYTHONHOME=/xxx ./python Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding Python runtime state: core initialized ModuleNotFoundError: No module named 'encodings' Current thread 0x00007fa9c32d6740 (most recent call first): --- With my PR 16300: --- $ PYTHONHOME=/xxx ./python Python path configuration: PYTHONHOME = '/xxx' PYTHONPATH = '/usr/share/qa-tools/python-modules' isolated = 0 environment = 1 user site = 1 import site = 1 sys.executable = '/home/vstinner/python/master/python' sys.prefix = '/xxx' sys.exec_prefix = '/xxx' sys.path = [ '/usr/share/qa-tools/python-modules', '/xxx/lib/python39.zip', '/xxx/lib/python3.9', '/xxx/lib/python3.9/lib-dynload', ] Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding Python runtime state: core initialized ModuleNotFoundError: No module named 'encodings' Current thread 0x00007f9cef949740 (most recent call first): --- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 13:13:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 17:13:10 +0000 Subject: [issue38236] Dump the Python path configuration at the first import error In-Reply-To: <1568997895.56.0.760570797029.issue38236@roundup.psfhosted.org> Message-ID: <1568999590.78.0.0476972978891.issue38236@roundup.psfhosted.org> STINNER Victor added the comment: > user site = 1 > import site = 1 I'm not sure that dumping these configuration variables are useful to debug this very specific error: "Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding" They only have an effect on sys.path later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 13:16:06 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 17:16:06 +0000 Subject: [issue35696] remove unnecessary operation in long_compare() In-Reply-To: <1547025999.59.0.0318422017652.issue35696@roundup.psfhosted.org> Message-ID: <1568999766.23.0.951767817208.issue35696@roundup.psfhosted.org> STINNER Victor added the comment: I reopen the issue. The win32 job of Azure Pipelines now logs a compiler warning: Objects\longobject.c(412,5): warning C4244: 'function': conversion from 'unsigned long' to 'sdigit', possible loss of data Objects\longobject.c(420,5): warning C4244: 'function': conversion from 'unsigned __int64' to 'sdigit', possible loss of data See also discussion on PR 16146: https://github.com/python/cpython/pull/16146#issuecomment-533351728 ---------- nosy: +vstinner resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 13:21:42 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 20 Sep 2019 17:21:42 +0000 Subject: [issue38237] Expose meaningful keyword arguments for pow() Message-ID: <1569000102.29.0.506926854512.issue38237@roundup.psfhosted.org> New submission from Raymond Hettinger : Current signature: pow(x, y, z=None, /) Proposed signature: pow(base, exp, mod=None) Benefits: * Meaningful and self-explanatory parameters in tooltips * Optionally clearer calls for the three argument form: pow(2, 5, mod=4) * More usable with partial(): squared = partial(pow, exp=2) ---------- components: Library (Lib) keywords: easy (C) messages: 352876 nosy: mark.dickinson, rhettinger priority: normal severity: normal status: open title: Expose meaningful keyword arguments for pow() type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 13:24:31 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 20 Sep 2019 17:24:31 +0000 Subject: [issue38235] Docs of logging module says argument is named "lvl". TypeError. In-Reply-To: <1568996817.83.0.32795106699.issue38235@roundup.psfhosted.org> Message-ID: <1569000271.01.0.0477664683144.issue38235@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 13:28:14 2019 From: report at bugs.python.org (Ammar Askar) Date: Fri, 20 Sep 2019 17:28:14 +0000 Subject: [issue38237] Expose meaningful keyword arguments for pow() In-Reply-To: <1569000102.29.0.506926854512.issue38237@roundup.psfhosted.org> Message-ID: <1569000494.6.0.00784525580628.issue38237@roundup.psfhosted.org> Ammar Askar added the comment: Looks like a solid proposal, I especially like the clarity for the 3-argument call. Often beginners ask about why there's a third argument in pow especially when teaching RSA and number-theoretic stuff. Do you mind if I take this on Raymond? ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 13:59:02 2019 From: report at bugs.python.org (Ammar Askar) Date: Fri, 20 Sep 2019 17:59:02 +0000 Subject: [issue38237] Expose meaningful keyword arguments for pow() In-Reply-To: <1569000102.29.0.506926854512.issue38237@roundup.psfhosted.org> Message-ID: <1569002342.43.0.600630615199.issue38237@roundup.psfhosted.org> Ammar Askar added the comment: Actually quick question, should a similar change be made for `math.pow` for consistency's sake? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 14:28:49 2019 From: report at bugs.python.org (Ammar Askar) Date: Fri, 20 Sep 2019 18:28:49 +0000 Subject: [issue38237] Expose meaningful keyword arguments for pow() In-Reply-To: <1569000102.29.0.506926854512.issue38237@roundup.psfhosted.org> Message-ID: <1569004129.79.0.586675371369.issue38237@roundup.psfhosted.org> Change by Ammar Askar : ---------- keywords: +patch pull_requests: +15887 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16302 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 14:29:35 2019 From: report at bugs.python.org (Ammar Askar) Date: Fri, 20 Sep 2019 18:29:35 +0000 Subject: [issue38237] Expose meaningful keyword arguments for pow() In-Reply-To: <1569000102.29.0.506926854512.issue38237@roundup.psfhosted.org> Message-ID: <1569004175.91.0.175852381628.issue38237@roundup.psfhosted.org> Ammar Askar added the comment: I've made a PR, feel free to close it if you'd rather implement this yourself or this proposal won't be accepted :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 14:37:05 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 20 Sep 2019 18:37:05 +0000 Subject: [issue38237] Expose meaningful keyword arguments for pow() In-Reply-To: <1569000102.29.0.506926854512.issue38237@roundup.psfhosted.org> Message-ID: <1569004625.5.0.465202133617.issue38237@roundup.psfhosted.org> Serhiy Storchaka added the comment: You can use a lambda instead of partial: squared = lambda x: pow(x, 2) Proposed names look meaningful. But after adding support of keyword arguments please compare performance of the old and the new functions. I expect that the difference will be small, but we need to check. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 15:02:06 2019 From: report at bugs.python.org (Ammar Askar) Date: Fri, 20 Sep 2019 19:02:06 +0000 Subject: [issue38237] Expose meaningful keyword arguments for pow() In-Reply-To: <1569000102.29.0.506926854512.issue38237@roundup.psfhosted.org> Message-ID: <1569006126.26.0.625974044788.issue38237@roundup.psfhosted.org> Ammar Askar added the comment: Here's a little microbenchmark, let me know if there's anything specific you'd like to see: Before ====== > python -m pyperf timeit "from test.test_builtin import BuiltinTest; tst = BuiltinTest()" -- "tst.test_pow()" Mean +- std dev: 3.80 us +- 0.23 us > python -m pyperf timeit "pow(23, 19, 3)" Mean +- std dev: 519 ns +- 12 ns After ===== > python -m pyperf timeit "from test.test_builtin import BuiltinTest; tst = BuiltinTest()" -- "tst.test_pow()" Mean +- std dev: 3.80 us +- 0.26 us > python -m pyperf timeit "pow(23, 19, 3)" Mean +- std dev: 526 ns +- 18 ns ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 15:18:32 2019 From: report at bugs.python.org (Andre Herbst) Date: Fri, 20 Sep 2019 19:18:32 +0000 Subject: [issue7897] Support parametrized tests in unittest In-Reply-To: <1265768482.24.0.694001982317.issue7897@psf.upfronthosting.co.za> Message-ID: <1569007112.64.0.317708621569.issue7897@roundup.psfhosted.org> Andre Herbst added the comment: +1 for the feature Subtests make the test results of all asserts visible at test execution time but decrease the readability of a test: @parameterized([2,4,6]) def test_method_whenCalled_returnsNone(self, a): # 1) arrange something = Something() # 2) act result = something.method(a) # 3) assert self.assertIsNone(result) When using subtests the phases of 1) arrange, 2) act, 3) assert are not clearly separated, the unit test contains logic and two additional indentation levels that could be avoided with parameterized tests: def test_method_whenCalled_returnsNone(self, a): # 1) arrange something = Something() for a in [2,4,6]: with self.subTest(a=a): # 2) act result = something.method(a) # 3) assert self.assertIsNone(result) ---------- nosy: +moormaster _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 15:28:53 2019 From: report at bugs.python.org (Sergey Fedoseev) Date: Fri, 20 Sep 2019 19:28:53 +0000 Subject: [issue35696] remove unnecessary operation in long_compare() In-Reply-To: <1547025999.59.0.0318422017652.issue35696@roundup.psfhosted.org> Message-ID: <1569007733.12.0.671662838695.issue35696@roundup.psfhosted.org> Sergey Fedoseev added the comment: These warnings are caused by https://github.com/python/cpython/commit/c6734ee7c55add5fdc2c821729ed5f67e237a096. I'd fix them, but I'm not sure if we are going to restore CHECK_SMALL_INT() ?\_(?)_/? ---------- nosy: +sir-sigurd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 15:34:35 2019 From: report at bugs.python.org (Barry Muldrey) Date: Fri, 20 Sep 2019 19:34:35 +0000 Subject: [issue38238] site.py reporting user site info even if ENABLE_USER_SITE=False Message-ID: <1569008075.72.0.976020458298.issue38238@roundup.psfhosted.org> New submission from Barry Muldrey : site info is accessed externally via getusersitepackages() and getuserbase()... for example see "pip/_internal/locations.py" If ENABLE_USER_SITE is set to "False," or otherwise disabled, accesses to these methods should return '' or None (shouldn't they?). Currently, I have ENABLE_USER_SITE globally disabled (by various means), but pip's call to getusersitepackages() is still returning "~/.local/lib/...". This seems wrong. An alternative would be for external tools to manually import site.ENABLE_USER_SITE, but this seems incorrect. ---------- components: Library (Lib) messages: 352884 nosy: bjmuld priority: normal severity: normal status: open title: site.py reporting user site info even if ENABLE_USER_SITE=False type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 15:35:13 2019 From: report at bugs.python.org (Barry Muldrey) Date: Fri, 20 Sep 2019 19:35:13 +0000 Subject: [issue38238] site.py reporting user site info even if ENABLE_USER_SITE=False In-Reply-To: <1569008075.72.0.976020458298.issue38238@roundup.psfhosted.org> Message-ID: <1569008113.62.0.272584662146.issue38238@roundup.psfhosted.org> Change by Barry Muldrey : ---------- keywords: +patch pull_requests: +15888 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16303 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 16:16:14 2019 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 20 Sep 2019 20:16:14 +0000 Subject: [issue38237] Expose meaningful keyword arguments for pow() In-Reply-To: <1569000102.29.0.506926854512.issue38237@roundup.psfhosted.org> Message-ID: <1569010574.64.0.523170822139.issue38237@roundup.psfhosted.org> Mark Dickinson added the comment: The proposal sounds reasonable to me. > should a similar change be made for `math.pow` for consistency's sake? I'd leave math.pow alone here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 16:17:23 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 20 Sep 2019 20:17:23 +0000 Subject: [issue38237] Expose meaningful keyword arguments for pow() In-Reply-To: <1569000102.29.0.506926854512.issue38237@roundup.psfhosted.org> Message-ID: <1569010643.61.0.586106482197.issue38237@roundup.psfhosted.org> Serhiy Storchaka added the comment: Thank you. Could you please test simpler examples like pow(2, 3)? Please use the --duplicate option. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 16:18:57 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 20 Sep 2019 20:18:57 +0000 Subject: [issue38237] Expose meaningful keyword arguments for pow() In-Reply-To: <1569000102.29.0.506926854512.issue38237@roundup.psfhosted.org> Message-ID: <1569010737.19.0.375806925335.issue38237@roundup.psfhosted.org> Serhiy Storchaka added the comment: And pow(2.0, 3.0) please. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 16:46:55 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 20 Sep 2019 20:46:55 +0000 Subject: [issue25244] Idle: refine right-click behavior In-Reply-To: <1443309139.01.0.264782757887.issue25244@psf.upfronthosting.co.za> Message-ID: <1569012415.46.0.676901721655.issue25244@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.9 -Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 16:49:36 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 20 Sep 2019 20:49:36 +0000 Subject: [issue25488] IDLE: Remove '', user_dir, and idlelib from sys.path when added In-Reply-To: <1445937913.03.0.194834202195.issue25488@psf.upfronthosting.co.za> Message-ID: <1569012576.86.0.102592989429.issue25488@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 16:52:20 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 20 Sep 2019 20:52:20 +0000 Subject: [issue1207613] Idle Editor: Bottom Scroll Bar Message-ID: <1569012740.12.0.422104712894.issue1207613@roundup.psfhosted.org> Terry J. Reedy added the comment: A horizontal text bar is added to a text view as needed (recent patch) when one is used for the font sample. The latter fits or not according to the font size. The same could be used for editor, or better, editor windows could inherit from text views. ---------- nosy: -kbk, roger.serwy versions: +Python 3.9 -Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 16:57:18 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 20 Sep 2019 20:57:18 +0000 Subject: [issue26949] IDLE restarts when one debugs code raising SystemExit In-Reply-To: <1462395098.97.0.302049116339.issue26949@psf.upfronthosting.co.za> Message-ID: <1569013038.04.0.710563319342.issue26949@roundup.psfhosted.org> Terry J. Reedy added the comment: >>> raise SystemExit does not normally cause a restart. ---------- nosy: -kbk, roger.serwy versions: +Python 3.9 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:01:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 21:01:29 +0000 Subject: [issue38216] Fix for issue30458 (HTTP Header Injection) prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1569013289.91.0.255101458592.issue38216@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Fix for issue30458 prevents crafting invalid requests -> Fix for issue30458 (HTTP Header Injection) prevents crafting invalid requests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:01:33 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 20 Sep 2019 21:01:33 +0000 Subject: [issue28840] IDLE: Document tk's long line display limitation In-Reply-To: <1480514700.66.0.957548851102.issue28840@psf.upfronthosting.co.za> Message-ID: <1569013293.79.0.457043014093.issue28840@roundup.psfhosted.org> Terry J. Reedy added the comment: IDLE Help's newish section "User Output in Shell" makes some mention of this but a bit more is still needed. ---------- stage: test needed -> needs patch versions: +Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:02:54 2019 From: report at bugs.python.org (Eric Snow) Date: Fri, 20 Sep 2019 21:02:54 +0000 Subject: [issue38187] test.test_tools.test_c_analyzer fails in refleak mode In-Reply-To: <1568646466.84.0.78149770012.issue38187@roundup.psfhosted.org> Message-ID: <1569013374.63.0.28469256043.issue38187@roundup.psfhosted.org> Change by Eric Snow : ---------- pull_requests: +15890 pull_request: https://github.com/python/cpython/pull/16304 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:04:52 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 20 Sep 2019 21:04:52 +0000 Subject: [issue21973] IDLE: catch user cfg file error, better error message, continue In-Reply-To: <1405252905.33.0.296703763462.issue21973@psf.upfronthosting.co.za> Message-ID: <1569013492.11.0.319094849886.issue21973@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: -kbk, roger.serwy versions: +Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:05:39 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 20 Sep 2019 21:05:39 +0000 Subject: [issue23218] Modernize the IDLE Find/Replace/Find in Files dialogs In-Reply-To: <1420884051.8.0.416866319984.issue23218@psf.upfronthosting.co.za> Message-ID: <1569013539.87.0.204963341359.issue23218@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:07:15 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 20 Sep 2019 21:07:15 +0000 Subject: [issue3559] IDLE: Pasted newline doesn't trigger execution when typed newline would In-Reply-To: <1218778489.95.0.525643042727.issue3559@psf.upfronthosting.co.za> Message-ID: <1569013635.7.0.0953322973611.issue3559@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.9 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:08:02 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 21:08:02 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1569013682.51.0.968971209383.issue33694@roundup.psfhosted.org> STINNER Victor added the comment: New changeset bc2256ea177a653bcab15b06b5f5725b10c1fff3 by Victor Stinner in branch 'master': bpo-33694: Remove test_asyncio ProactorDatagramTransportTests (GH-16288) https://github.com/python/cpython/commit/bc2256ea177a653bcab15b06b5f5725b10c1fff3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:08:22 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 20 Sep 2019 21:08:22 +0000 Subject: [issue25733] Code and IDLE should catch all compile errors. In-Reply-To: <1448461598.38.0.392041411432.issue25733@psf.upfronthosting.co.za> Message-ID: <1569013702.68.0.451346364452.issue25733@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.9 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:08:57 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 20 Sep 2019 21:08:57 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1569013737.04.0.722698580797.issue33694@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15891 pull_request: https://github.com/python/cpython/pull/16305 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:10:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 21:10:19 +0000 Subject: [issue38205] Py_UNREACHABLE() no longer behaves as a function call In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1569013819.37.0.507437432698.issue38205@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b1542583bee204130934c2b90684041e29378250 by Victor Stinner in branch 'master': bpo-38205: Py_UNREACHABLE() calls Py_FatalError() (GH-16290) https://github.com/python/cpython/commit/b1542583bee204130934c2b90684041e29378250 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:17:02 2019 From: report at bugs.python.org (Zane Bitter) Date: Fri, 20 Sep 2019 21:17:02 +0000 Subject: [issue37857] Setting logger.level directly has no effect due to caching in 3.7+ In-Reply-To: <1565811970.47.0.529067236549.issue37857@roundup.psfhosted.org> Message-ID: <1569014222.97.0.779130855354.issue37857@roundup.psfhosted.org> Zane Bitter added the comment: In turns out that setting the level directly is used in the standard library, so we definitely have a bug here that needs fixing in 3.7 & 3.8. Obviously the fix could be just to stop doing that in the standard library, but I'd argue that this is even stronger evidence that it can happen to anyone, and that we should fix it for Python users in general. > But it's not a priority to support situations where people don't follow published APIs and still expect things to work the way they would like. That's fair, of course. This isn't and shouldn't be anyone's number 1 priority, but that doesn't mean we can't do it. > I would prefer people to use setLevel(), as it helps to have consistent usage. Me too. I added a new patch to the PR that deprecates the setter so that anyone doing it wrong will get a warning. (In fact that's how I discovered it was being set directly in the standard library.) > The philosophy is that of not breaking userspace code *which follows published APIs*. If you use unpublished APIs or rely on implementation details, you're generally on your own. I was referring to stuff like https://devblogs.microsoft.com/oldnewthing/20031015-00/?p=42163 (I won't link to a famous equivalent in Linux because it involves Linus swearing at people), where the users are clearly wrong but they have a policy of not breaking them anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:17:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 21:17:37 +0000 Subject: [issue38205] Py_UNREACHABLE() no longer behaves as a function call In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1569014257.18.0.799306830101.issue38205@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15892 pull_request: https://github.com/python/cpython/pull/16306 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:27:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 21:27:18 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1569014838.78.0.633887886297.issue33694@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -13220 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:27:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 21:27:20 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1569014840.33.0.837902109931.issue33694@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -13627 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:27:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 21:27:17 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1569014837.94.0.0615126944283.issue33694@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -12891 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:27:16 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 21:27:16 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1569014836.95.0.225048091009.issue33694@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -10267 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:27:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 21:27:21 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1569014841.5.0.0425417693829.issue33694@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -13643 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:27:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 21:27:20 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1569014840.88.0.778006641565.issue33694@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -13642 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:27:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 21:27:22 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1569014842.21.0.268836610201.issue33694@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -13649 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:27:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 21:27:19 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1569014839.6.0.907982707667.issue33694@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -13625 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:27:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 21:27:23 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1569014843.78.0.164088004563.issue33694@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -13656 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:27:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 21:27:25 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1569014845.17.0.604562339901.issue33694@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -13661 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:27:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 21:27:26 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1569014846.06.0.780732543688.issue33694@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -13663 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:27:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 21:27:27 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1569014847.47.0.661332050198.issue33694@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -14111 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:27:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 21:27:26 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1569014846.8.0.753507545178.issue33694@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -13676 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:27:29 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 21:27:29 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1569014849.06.0.364519591241.issue33694@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -15156 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:27:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 21:27:24 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1569014844.54.0.267295053845.issue33694@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -13660 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:27:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 21:27:28 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1569014848.23.0.122464207171.issue33694@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -14161 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:27:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 21:27:23 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1569014843.07.0.461895027583.issue33694@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: -13654 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:27:31 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 20 Sep 2019 21:27:31 +0000 Subject: [issue33694] test_asyncio: test_start_tls_server_1() fails on Python on x86 Windows7 3.7 and 3.x In-Reply-To: <1527679178.26.0.682650639539.issue33694@psf.upfronthosting.co.za> Message-ID: <1569014851.75.0.720518554757.issue33694@roundup.psfhosted.org> miss-islington added the comment: New changeset b50edac42fd39d58ba51eb9cee2d3645a2e28ca4 by Miss Islington (bot) in branch '3.8': bpo-33694: Remove test_asyncio ProactorDatagramTransportTests (GH-16288) https://github.com/python/cpython/commit/b50edac42fd39d58ba51eb9cee2d3645a2e28ca4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:29:54 2019 From: report at bugs.python.org (Ammar Askar) Date: Fri, 20 Sep 2019 21:29:54 +0000 Subject: [issue38237] Expose meaningful keyword arguments for pow() In-Reply-To: <1569000102.29.0.506926854512.issue38237@roundup.psfhosted.org> Message-ID: <1569014994.89.0.432030241398.issue38237@roundup.psfhosted.org> Ammar Askar added the comment: Before ====== >python -m pyperf timeit "pow(2, 3)" --duplicate 100000 Mean +- std dev: 242 ns +- 19 ns > python -m pyperf timeit "pow(2.0, 3.0)" --duplicate 100000 Mean +- std dev: 197 ns +- 16 ns After ===== > python -m pyperf timeit "pow(2, 3)" --duplicate 100000 Mean +- std dev: 243 ns +- 11 ns > python -m pyperf timeit "pow(2.0, 3.0)" --duplicate 100000 Mean +- std dev: 200 ns +- 14 ns ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:32:40 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 21:32:40 +0000 Subject: [issue38239] test_gdb fails on AMD64 RHEL8 LTO 3.x: Unexpected gdb output Message-ID: <1569015160.3.0.923927814388.issue38239@roundup.psfhosted.org> New submission from STINNER Victor : AMD64 RHEL8 LTO 3.x: https://buildbot.python.org/all/#/builders/312/builds/4 FAIL: test_NULL_ob_type (test.test_gdb.PrettyPrintTests) FAIL: test_NULL_ptr (test.test_gdb.PrettyPrintTests) FAIL: test_builtin_method (test.test_gdb.PrettyPrintTests) FAIL: test_builtins_help (test.test_gdb.PrettyPrintTests) FAIL: test_bytes (test.test_gdb.PrettyPrintTests) FAIL: test_corrupt_ob_type (test.test_gdb.PrettyPrintTests) FAIL: test_corrupt_tp_flags (test.test_gdb.PrettyPrintTests) FAIL: test_corrupt_tp_name (test.test_gdb.PrettyPrintTests) FAIL: test_dicts (test.test_gdb.PrettyPrintTests) FAIL: test_exceptions (test.test_gdb.PrettyPrintTests) FAIL: test_frozensets (test.test_gdb.PrettyPrintTests) FAIL: test_int (test.test_gdb.PrettyPrintTests) FAIL: test_lists (test.test_gdb.PrettyPrintTests) FAIL: test_modern_class (test.test_gdb.PrettyPrintTests) FAIL: test_selfreferential_dict (test.test_gdb.PrettyPrintTests) FAIL: test_selfreferential_list (test.test_gdb.PrettyPrintTests) 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) FAIL: test_singletons (test.test_gdb.PrettyPrintTests) FAIL: test_strings (test.test_gdb.PrettyPrintTests) FAIL: test_subclassing_list (test.test_gdb.PrettyPrintTests) FAIL: test_subclassing_tuple (test.test_gdb.PrettyPrintTests) FAIL: test_truncation (test.test_gdb.PrettyPrintTests) FAIL: test_tuples (test.test_gdb.PrettyPrintTests) Example of failure: ====================================================================== FAIL: test_NULL_ob_type (test.test_gdb.PrettyPrintTests) Ensure that a PyObject* with NULL ob_type is handled gracefully ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64.lto/build/Lib/test/test_gdb.py", line 515, in test_NULL_ob_type self.assertSane('id(42)', File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64.lto/build/Lib/test/test_gdb.py", line 486, in assertSane self.get_gdb_repr(source, File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64.lto/build/Lib/test/test_gdb.py", line 261, in get_gdb_repr self.fail('Unexpected gdb output: %r\n%s' % (gdb_output, gdb_output)) AssertionError: Unexpected gdb output: 'Breakpoint 1 at 0x565b60: file Objects/longobject.c, line 1113.\n[Thread debugging using libthread_db enabled]\nUsing host libthread_db library "/lib64/libthread_db.so.1".\n\nBreakpoint 1, builtin_id (self=, v=42) at Objects/longobject.c:1113\n1113\tPyLong_FromVoidPtr(void *p)\n#0 builtin_id (self=, v=) at Objects/longobject.c:1113\n#1 cfunction_vectorcall_O (func=, args=, nargsf=, kwnames=) at Objects/methodobject.c:442\n#2 _PyObject_Vectorcall (kwnames=0x0, nargsf=9223372036854775809, args=, callable=) at ./Include/cpython/abstract.h:96\n#3 call_function (tstate=, pp_stack=, oparg=, kwnames=0x0) at Python/ceval.c:4984\n#4 _PyEval_EvalFrameDefault (f=, throwflag=) at Python/ceval.c:3496\n#5 _PyEval_EvalCodeWithName (_co=, globals={\'__name__\': \'__main__\', \'__doc__\': None, \'__package__\': None, \'__loader__\': , \'__spec__\': None, \'__annotations__\': {}, \'__builtins__\': }, locals={\'__name__\': \'__main__\', \'__doc__\': None, \'__package__\': None, \'__loader__\': , \'__spec__\': None, \'__annotations__\': {}, \'__builtins__\': }, args=, argcount=0, kwnames=, kwargs=, kwcount=0, kwstep=2, defs=, defcount=0, kwdefs=0x0, closure=0x0, name=0x0, qualname=0x0) at Python/ceval.c:4296\n#6 PyEval_EvalCodeEx (closure=0x0, kwdefs=0x0, defcount=0, defs=, kwcount=0, kws=, argcount=0, args=, locals={\'__name__\': \'__main__\', \'__doc__\': None, \'__package__\': None, \'__loader__\': , \'__spec__\': None, \'__annotations__\': {}, \'__builtins__\': }, globals={\'__name__\': \'__main__\', \'__doc__\': None, \'__package__\': None, \'__loader__\': , \'__spec__\': None, \'__annotations__\': {}, \'__builtins__\': }, _co=) at Python/ceval.c:712\n#7 PyEval_EvalCode (locals={\'__name__\': \'__main__\', \'__doc__\': None, \'__package__\': None, \'__loader__\': , \'__spec__\': None, \'__annotations__\': {}, \'__builtins__\': }, globals={\'__name__\': \'__main__\', \'__doc__\': None, \'__package__\': None, \'__loader__\': , \'__spec__\': None, \'__annotations__\': {}, \'__builtins__\': }, co=) at Python/ceval.c:714\n#8 run_eval_code_obj (locals={\'__name__\': \'__main__\', \'__doc__\': None, \'__package__\': None, \'__loader__\': , \'__spec__\': None, \'__annotations__\': {}, \'__builtins__\': }, globals={\'__name__\': \'__main__\', \'__doc__\': None, \'__package__\': None, \'__loader__\': , \'__spec__\': None, \'__annotations__\': {}, \'__builtins__\': }, co=) at Python/pythonrun.c:1117\n#9 run_mod (mod=, filename=\'\', globals={\'__name__\': \'__main__\', \'__doc__\': None, \'__package__\': None, \'__loader__\': , \'__spec__\': None, \'__annotations__\': {}, \'__builtins__\': }, locals={\'__name__\': \'__main__\', \'__doc__\': None, \'__package__\': None, \'__loader__\': , \'__spec__\': None, \'__annotations__\': {}, \'__builtins__\': }, flags=, arena=) at Python/pythonrun.c:1139\n#10 PyRun_StringFlags (flags=, locals={\'__name__\': \'__main__\', \'__doc__\': None, \'__package__\': None, \'__loader__\': , \'__spec__\': None, \'__annotations__\': {}, \'__builtins__\': }, globals={\'__name__\': \'__main__\', \'__doc__\': None, \'__package__\': None, \'__loader__\': , \'__spec__\': None, \'__annotations__\': {}, \'__builtins__\': }, start=257, str="id(42)\\n") at Python/pythonrun.c:1008\n#11 PyRun_SimpleStringFlags (command="id(42)\\n", flags=) at Python/pythonrun.c:460\n#12 pymain_run_command (cf=, command=) at Modules/main.c:260\n#13 pymain_run_python (exitcode=) at Modules/main.c:558\n#14 Py_RunMain () at Modules/main.c:646\n#15 pymain_main (args=) at Modules/main.c:676\n#16 Py_BytesMain (argc=, argv=) at Modules/main.c:700\n#17 __libc_start_main () from /lib64/libc.so.6\n#18 _start () at Python/ceval.c:5444\n' Breakpoint 1 at 0x565b60: file Objects/longobject.c, line 1113. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Breakpoint 1, builtin_id (self=, v=42) at Objects/longobject.c:1113 1113 PyLong_FromVoidPtr(void *p) #0 builtin_id (self=, v=) at Objects/longobject.c:1113 #1 cfunction_vectorcall_O (func=, args=, nargsf=, kwnames=) at Objects/methodobject.c:442 #2 _PyObject_Vectorcall (kwnames=0x0, nargsf=9223372036854775809, args=, callable=) at ./Include/cpython/abstract.h:96 #3 call_function (tstate=, pp_stack=, oparg=, kwnames=0x0) at Python/ceval.c:4984 #4 _PyEval_EvalFrameDefault (f=, throwflag=) at Python/ceval.c:3496 #5 _PyEval_EvalCodeWithName (_co=, globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': }, locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': }, args=, argcount=0, kwnames=, kwargs=, kwcount=0, kwstep=2, defs=, defcount=0, kwdefs=0x0, closure=0x0, name=0x0, qualname=0x0) at Python/ceval.c:4296 #6 PyEval_EvalCodeEx (closure=0x0, kwdefs=0x0, defcount=0, defs=, kwcount=0, kws=, argcount=0, args=, locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': }, globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': }, _co=) at Python/ceval.c:712 #7 PyEval_EvalCode (locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': }, globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': }, co=) at Python/ceval.c:714 #8 run_eval_code_obj (locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': }, globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': }, co=) at Python/pythonrun.c:1117 #9 run_mod (mod=, filename='', globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': }, locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': }, flags=, arena=) at Python/pythonrun.c:1139 #10 PyRun_StringFlags (flags=, locals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': }, globals={'__name__': '__main__', '__doc__': None, '__package__': None, '__loader__': , '__spec__': None, '__annotations__': {}, '__builtins__': }, start=257, str="id(42)\n") at Python/pythonrun.c:1008 #11 PyRun_SimpleStringFlags (command="id(42)\n", flags=) at Python/pythonrun.c:460 #12 pymain_run_command (cf=, command=) at Modules/main.c:260 #13 pymain_run_python (exitcode=) at Modules/main.c:558 #14 Py_RunMain () at Modules/main.c:646 #15 pymain_main (args=) at Modules/main.c:676 #16 Py_BytesMain (argc=, argv=) at Modules/main.c:700 #17 __libc_start_main () from /lib64/libc.so.6 #18 _start () at Python/ceval.c:5444 ---------- components: Tests messages: 352896 nosy: vstinner priority: normal severity: normal status: open title: test_gdb fails on AMD64 RHEL8 LTO 3.x: Unexpected gdb output versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:35:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 21:35:30 +0000 Subject: [issue38239] test_gdb fails on AMD64 RHEL8 LTO 3.x: Unexpected gdb output In-Reply-To: <1569015160.3.0.923927814388.issue38239@roundup.psfhosted.org> Message-ID: <1569015330.82.0.242718882565.issue38239@roundup.psfhosted.org> STINNER Victor added the comment: Similar errors on: AMD64 RHEL8 LTO + PGO 3.7: https://buildbot.python.org/all/#/builders/255/builds/13 AMD64 RHEL8 LTO 3.7: https://buildbot.python.org/all/#/builders/293/builds/13 AMD64 RHEL8 LTO 3.8: https://buildbot.python.org/all/#/builders/265/builds/12 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:36:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 21:36:35 +0000 Subject: [issue38205] Py_UNREACHABLE() no longer behaves as a function call In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1569015395.3.0.826053584942.issue38205@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 245d439320e0921459502883fe809213e3b93e35 by Victor Stinner in branch '3.8': bpo-38205: Py_UNREACHABLE() calls Py_FatalError() (GH-16290) (GH-16306) https://github.com/python/cpython/commit/245d439320e0921459502883fe809213e3b93e35 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:49:33 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 20 Sep 2019 21:49:33 +0000 Subject: [issue38216] Fix for issue30458 (HTTP Header Injection) prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1569016173.28.0.62964185164.issue38216@roundup.psfhosted.org> Gregory P. Smith added the comment: > I think this is a false dichotomy; in https://bugs.python.org/issue36274#msg351834 Jason proposed a few alternatives that allow for a secure and obvious default API while adding a new, explicitly unsafe API. I'm not against that concept, but it is only appropriate for >= 3.9 as that'd be adding a feature. This issue is marked a release blocker to decide what to do for 3.5-3.7 (and maybe 3.8 if deemed a serious breaking change). > I'd like to add yet another option that may be useful specifically for maintenance releases: forbid only the problematic characters -- namely LF (and potentially CR and SP). This seems like a much more surgical fix for maintenance releases, allowing the null byte for CherryPy or the raw UTF-8 bytes for Swift, while still mitigating the CVE. PRs with explicit tests for what is and isn't allowed welcome. Thankfully for the UTF-8 case, its multi-byte codepoint bytes will never contain LF, CR or SP. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:52:49 2019 From: report at bugs.python.org (Ammar Askar) Date: Fri, 20 Sep 2019 21:52:49 +0000 Subject: [issue38237] Expose meaningful keyword arguments for pow() In-Reply-To: <1569000102.29.0.506926854512.issue38237@roundup.psfhosted.org> Message-ID: <1569016369.92.0.86864712217.issue38237@roundup.psfhosted.org> Ammar Askar added the comment: math.pow changes removed from PR ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:55:35 2019 From: report at bugs.python.org (Vitaly Kruglikov) Date: Fri, 20 Sep 2019 21:55:35 +0000 Subject: [issue38240] assertCountEqual is horribly misleading, sounds like only counts are being compared Message-ID: <1569016535.61.0.833203589698.issue38240@roundup.psfhosted.org> New submission from Vitaly Kruglikov : assertCountEqual is a horribly misleading name because it misleads the programmer and reader of the test code into thinking that it only compares the counts of the elements. It's name misrepresents what it does in a really bad way. ---------- components: Tests messages: 352901 nosy: vitaly.krug priority: normal severity: normal status: open title: assertCountEqual is horribly misleading, sounds like only counts are being compared versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 17:58:32 2019 From: report at bugs.python.org (Ammar Askar) Date: Fri, 20 Sep 2019 21:58:32 +0000 Subject: [issue38240] assertCountEqual is horribly misleading, sounds like only counts are being compared In-Reply-To: <1569016535.61.0.833203589698.issue38240@roundup.psfhosted.org> Message-ID: <1569016712.88.0.906551015635.issue38240@roundup.psfhosted.org> Change by Ammar Askar : ---------- resolution: -> duplicate stage: -> resolved superseder: -> unittest.TestCase.assertCountEqual is a very misleading name type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 18:01:30 2019 From: report at bugs.python.org (Ammar Askar) Date: Fri, 20 Sep 2019 22:01:30 +0000 Subject: [issue38240] assertCountEqual is horribly misleading, sounds like only counts are being compared In-Reply-To: <1569016535.61.0.833203589698.issue38240@roundup.psfhosted.org> Message-ID: <1569016890.25.0.356226902269.issue38240@roundup.psfhosted.org> Ammar Askar added the comment: Hey Vitaly, not sure if you're the author of the original bug here: https://bugs.python.org/issue27071 Could you re-open that so the discussion is kept in one place. ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 18:26:47 2019 From: report at bugs.python.org (Ma Lin) Date: Fri, 20 Sep 2019 22:26:47 +0000 Subject: [issue35696] remove unnecessary operation in long_compare() In-Reply-To: <1547025999.59.0.0318422017652.issue35696@roundup.psfhosted.org> Message-ID: <1569018407.85.0.494126136239.issue35696@roundup.psfhosted.org> Ma Lin added the comment: > I'd fix them, but I'm not sure if we are going to restore CHECK_SMALL_INT() ?\_(?)_/? I suggest we slow down, carefully sort out the recent commits for longobject.c: https://bugs.python.org/issue37812#msg352837 Make the code has consistent style, better readability... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 18:32:16 2019 From: report at bugs.python.org (Kyle Stanley) Date: Fri, 20 Sep 2019 22:32:16 +0000 Subject: [issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT) In-Reply-To: <1565471250.77.0.491506074373.issue37812@roundup.psfhosted.org> Message-ID: <1569018736.78.0.0161538058622.issue37812@roundup.psfhosted.org> Kyle Stanley added the comment: > You can find my email in Git, and I'm on Zulip and Discourse; and I'd be happy to start or follow a thread in a forum you think appropriate. Or if you'd rather drop it entirely, that's fine too. I think opening a thread in https://discuss.python.org/c/users to talk about deciding between the usage of functions and macros (discussing when each may be appropriate) would be beneficial to the community at large. > The recommendation of the senior most developer is being ignored, and now two developers are speaking in terms of strong belief systems and labeling long-stable code as "evil". This doesn't bode well and it makes it difficult to conduct reasoned discourse. Apologies if I added to that, I certainly respect your judgement on this issue. Pretty much everyone involved in this discussion has more experience in working with the CPython C-API than I do, you most of all (as far I'm aware). My perspective was coming from someone attempting to understand it better, and explaining how those learning the C-API might find it confusing. I don't find the code itself to be at all "evil", just potentially confusing. That long-stable code has provided a lot of benefit over the years, and I can definitely appreciate the effort that was put into writing it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 18:34:52 2019 From: report at bugs.python.org (PyScripter) Date: Fri, 20 Sep 2019 22:34:52 +0000 Subject: [issue22213] Make pyvenv style virtual environments easier to configure when embedding Python In-Reply-To: <1408275761.36.0.915361061447.issue22213@psf.upfronthosting.co.za> Message-ID: <1569018892.58.0.311239145411.issue22213@roundup.psfhosted.org> PyScripter added the comment: To Victor: So how does the implementation of PEP-587 help configure embedded python with venv? It would be great help to provide some minimal instructions. ---------- nosy: +pyscripter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 18:35:34 2019 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 20 Sep 2019 22:35:34 +0000 Subject: [issue38225] iscoroutinefunction broken with cython - allow tagging of functions as async? In-Reply-To: <1568918319.91.0.348855638851.issue38225@roundup.psfhosted.org> Message-ID: <1569018934.27.0.122320680027.issue38225@roundup.psfhosted.org> Yury Selivanov added the comment: > If a python piece of code imports cython code with async defs, `asyncio.iscoroutinefunction` cannot determine that the code is async. Well, this seems to be a regression. IIRC Cython used to emulate a Python code object (__code__) for functions it compiled along with the appropriate CO_COROUTINE flag set. Wasn't that the case? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 18:39:40 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 22:39:40 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569019180.46.0.255360148096.issue38234@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15893 pull_request: https://github.com/python/cpython/pull/16307 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 18:53:12 2019 From: report at bugs.python.org (Nicholas Neumann) Date: Fri, 20 Sep 2019 22:53:12 +0000 Subject: [issue38241] Pickle with protocol=0 in python 3 does not produce a 'human-readable' format Message-ID: <1569019992.12.0.181360535458.issue38241@roundup.psfhosted.org> New submission from Nicholas Neumann : The docs for pickle, in python 2, say that the default pickle protocol, 0, produces ASCII. In the python 3 docs, this has changed to "human-readable". While the pickle output with protocol 0 loads fine in python2, it is definitely not human-readable, as it is not valid ASCII and contains every possible byte. To see a simple example, run this in both python 2 and 3 import pickle a = bytearray(range(255)) #bytes containing 0..255 b = bytes(a) c = pickle.dumps(b,protocol=0) print(c)#human readable in 2, not in 3 c.decode('ascii')#throws in 3, not in 2 ---------- messages: 352907 nosy: aggieNick02 priority: normal severity: normal status: open title: Pickle with protocol=0 in python 3 does not produce a 'human-readable' format type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 18:58:45 2019 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 20 Sep 2019 22:58:45 +0000 Subject: [issue38242] Revert the new asyncio Streams API Message-ID: <1569020325.08.0.390897413838.issue38242@roundup.psfhosted.org> New submission from Yury Selivanov : == Context 1. Andrew and I implemented a new streaming API in asyncio 3.8. The key idea is that there's a single Stream object, combining old StreamReader & StreamWriter APIs. On top of that, `Stream.write()` and `Stream.close()` became coroutines. The new API is significantly easier to use, but it required us to: (a) Make backwards compatible changes to subprocess APIs; (b) Add two new APIs: `asyncio.connect() -> Stream` and `asyncio.StreamServer` (c) Soft-deprecate `asyncio.open_connection()` and `asyncio.start_serving()`. 2. The Trio project considers implementing new Streams API (see [1]). The key idea is to make the core Stream object very simple and then enable building complex protocol pipelines using composition. Want SSL? Add an SSL layer. Have a framed binary protocol? Push a reusable framing layer to the stack and parse the protocol. On top of that, Trio wants us to standardize Streams, so that it's possible to write framework agnostic protocol code using async/await and to even reuse things like SSL implementation. == Problem I really like how Trio approaches this. The asyncio.Stream class we have now is overloaded with functionality. It's not composable. It's internal buffer and APIs are designed to parsing text protocols (i.e. parsing a complex binary protocol requires an entirely different buffer implementation). Long story short, I think we should revert the new streaming API from the 3.8 branch and see if Trio & asyncio can design a better Streaming API. Otherwise we end up in a weird situation where we added a bunch of new APIs to 3.8 which can be deprecated in 3.9. Worst case scenario we'll just ship our current versions of Streams in 3.9 (not in 3.8). Thoughts? [1] https://github.com/python-trio/trio/issues/1208 ---------- components: asyncio messages: 352908 nosy: asvetlov, gvanrossum, lukasz.langa, njs, yselivanov priority: release blocker severity: normal status: open title: Revert the new asyncio Streams API type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 19:02:59 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 23:02:59 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569020579.5.0.433355220624.issue38234@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c422167749f92d4170203e996a2c619c818335ea by Victor Stinner in branch 'master': bpo-38234: Remove _PyPathConfig.dll_path (GH-16307) https://github.com/python/cpython/commit/c422167749f92d4170203e996a2c619c818335ea ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 19:33:33 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Fri, 20 Sep 2019 23:33:33 +0000 Subject: [issue38242] Revert the new asyncio Streams API In-Reply-To: <1569020325.08.0.390897413838.issue38242@roundup.psfhosted.org> Message-ID: <1569022413.86.0.00417294494274.issue38242@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 19:41:48 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 23:41:48 +0000 Subject: [issue38239] test_gdb fails on AMD64 Fedora Stable LTO 3.8 and AMD64 RHEL8 LTO 3.x: Unexpected gdb output In-Reply-To: <1569015160.3.0.923927814388.issue38239@roundup.psfhosted.org> Message-ID: <1569022908.14.0.272527541097.issue38239@roundup.psfhosted.org> STINNER Victor added the comment: Similar issue on AMD64 Fedora Stable LTO 3.8: https://buildbot.python.org/all/#/builders/235/builds/2 ---------- title: test_gdb fails on AMD64 RHEL8 LTO 3.x: Unexpected gdb output -> test_gdb fails on AMD64 Fedora Stable LTO 3.8 and AMD64 RHEL8 LTO 3.x: Unexpected gdb output _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 19:44:06 2019 From: report at bugs.python.org (Nathaniel Smith) Date: Fri, 20 Sep 2019 23:44:06 +0000 Subject: [issue38242] Revert the new asyncio Streams API In-Reply-To: <1569020325.08.0.390897413838.issue38242@roundup.psfhosted.org> Message-ID: <1569023046.99.0.504190685406.issue38242@roundup.psfhosted.org> Nathaniel Smith added the comment: Yury asked me to weigh in here, since I guess between him and Andrew there's some uncertainty about whether reverting is the right choice or not. I can't answer that, but I can share some thoughts. Unfortunately, I wasn't aware of the Stream PR when it was first being written and reviewed; I only discovered the change a month or two ago, by accident. If I had, I'd have said something like: > This is definitely a major improvement over the old API, that fixes some important issues, which is awesome. But, it only fixes some of the issues, not all of them, and it's really difficult to change things in asyncio after they ship. So there's a tricky question: do you want to ship this now so users can start taking advantage of its improvements immediately, or do you want to wait to make sure you don't have to do multiple rounds of changes? Of course, now we're in a situation where it's already merged, which makes things more awkward. But maybe it will clarify things a bit to do a thought experiment: if the asyncio.Stream API was a PR that hadn't been merged yet and we were considering merging it ? would you hit the green merge button, given what we know now, or would you hold off for 3.9? ---------- nosy: -xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 19:45:42 2019 From: report at bugs.python.org (Tim Burke) Date: Fri, 20 Sep 2019 23:45:42 +0000 Subject: [issue38216] Fix for issue30458 (HTTP Header Injection) prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1569023142.48.0.811406029428.issue38216@roundup.psfhosted.org> Tim Burke added the comment: Something like this for 3.7, say? I should probably go add some tests in test_httplib.py (for example, to demonstrate that http.client can still send a raw #, even if urllib appropriately drops the fragment), but I wanted some feedback on whether this is even an avenue worth pursuing. ---------- keywords: +patch Added file: https://bugs.python.org/file48618/0001-bpo-38216-Only-forbid-CR-LF-and-SP-in-http-URLs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 19:50:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 23:50:19 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569023419.97.0.90584062533.issue38234@roundup.psfhosted.org> STINNER Victor added the comment: New changeset e267793aa4101b2771ed0e66aaff5743d23f59af by Victor Stinner in branch 'master': bpo-38234: Fix PyConfig_Read() when Py_SetPath() was called (GH-16298) https://github.com/python/cpython/commit/e267793aa4101b2771ed0e66aaff5743d23f59af ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 19:50:30 2019 From: report at bugs.python.org (miss-islington) Date: Fri, 20 Sep 2019 23:50:30 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569023430.84.0.736572610566.issue38234@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15894 pull_request: https://github.com/python/cpython/pull/16312 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 19:53:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Fri, 20 Sep 2019 23:53:51 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569023631.68.0.306431767692.issue38234@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15895 pull_request: https://github.com/python/cpython/pull/16313 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 20:04:57 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 21 Sep 2019 00:04:57 +0000 Subject: [issue38242] Revert the new asyncio Streams API In-Reply-To: <1569020325.08.0.390897413838.issue38242@roundup.psfhosted.org> Message-ID: <1569024297.5.0.977569757037.issue38242@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 20:13:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 21 Sep 2019 00:13:17 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569024797.34.0.0466189108323.issue38234@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 9f3dcf802eefeb5ab821ce3c7204ab46557d53d7 by Victor Stinner in branch '3.8': [3.8] bpo-38234: Fix PyConfig_Read() when Py_SetPath() was called (GH-16298) (GH-16313) https://github.com/python/cpython/commit/9f3dcf802eefeb5ab821ce3c7204ab46557d53d7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 20:13:48 2019 From: report at bugs.python.org (STINNER Victor) Date: Sat, 21 Sep 2019 00:13:48 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569024828.42.0.516804046205.issue38234@roundup.psfhosted.org> STINNER Victor added the comment: > When calling Py_SetPath(), the value that is passed in is ignored. I fixed this regression. Thanks for the bug report. ---------- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 20:57:43 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 21 Sep 2019 00:57:43 +0000 Subject: [issue38172] Python 3.8 Segfult with Bandersnatch pytest Suite In-Reply-To: <1568472460.87.0.817204992487.issue38172@roundup.psfhosted.org> Message-ID: <1569027463.52.0.205810939372.issue38172@roundup.psfhosted.org> Terry J. Reedy added the comment: If you mean that the crash no longer occurs with current 3.8.b4+ in the repository, then you should close as 'out-of-date. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 21:00:25 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 21 Sep 2019 01:00:25 +0000 Subject: [issue38195] A bug in the multiprocessing module In-Reply-To: <1568703069.98.0.135749134145.issue38195@roundup.psfhosted.org> Message-ID: <1569027625.81.0.46212670287.issue38195@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +davin, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 21:08:04 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 21 Sep 2019 01:08:04 +0000 Subject: [issue38231] Documentation search results focus on tutorials and not language specifications In-Reply-To: <1568986779.54.0.790565695991.issue38231@roundup.psfhosted.org> Message-ID: <1569028084.73.0.131312204612.issue38231@roundup.psfhosted.org> Terry J. Reedy added the comment: But in your response, please delete the message you are responding to (except possibly a line or two). ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 21:18:18 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 21 Sep 2019 01:18:18 +0000 Subject: [issue38237] Expose meaningful keyword arguments for pow() In-Reply-To: <1569000102.29.0.506926854512.issue38237@roundup.psfhosted.org> Message-ID: <1569028698.52.0.888627802902.issue38237@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 21:31:34 2019 From: report at bugs.python.org (longwenzhang) Date: Sat, 21 Sep 2019 01:31:34 +0000 Subject: [issue38230] A Path Traversal vulnerability in test/ssl_servers.py In-Reply-To: <1568983665.6.0.164381465993.issue38230@roundup.psfhosted.org> Message-ID: <1569029494.45.0.431085482603.issue38230@roundup.psfhosted.org> longwenzhang added the comment: It seems to be only used in test. Does it need to be repaired? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 21:37:37 2019 From: report at bugs.python.org (Ammar Askar) Date: Sat, 21 Sep 2019 01:37:37 +0000 Subject: [issue38231] Documentation search results focus on tutorials and not language specifications In-Reply-To: <1568986779.54.0.790565695991.issue38231@roundup.psfhosted.org> Message-ID: <1569029857.15.0.385971294344.issue38231@roundup.psfhosted.org> Change by Ammar Askar : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Docs search should prominently show definitions and glossary items _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 22:12:26 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Sat, 21 Sep 2019 02:12:26 +0000 Subject: [issue38241] Pickle with protocol=0 in python 3 does not produce a 'human-readable' format In-Reply-To: <1569019992.12.0.181360535458.issue38241@roundup.psfhosted.org> Message-ID: <1569031946.02.0.838232125948.issue38241@roundup.psfhosted.org> Josh Rosenberg added the comment: This seems like a bug in pickle; protocol 0 is *defined* to be ASCII compatible. Nothing should encode to a byte above 0x7f. It's not actually supposed to be "human-readable" (since many ASCII bytes aren't printable), so the docs should be changed to describe protocol 0 as ASCII consistently; if this isn't fixed to make it ASCII consistently, "human-readable" is still meaningless and shouldn't be used. I'm kind of surprised the output from Py3 works on Py2 to be honest. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 22:15:08 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Sat, 21 Sep 2019 02:15:08 +0000 Subject: [issue38241] Pickle with protocol=0 in python 3 does not produce a 'human-readable' format In-Reply-To: <1569019992.12.0.181360535458.issue38241@roundup.psfhosted.org> Message-ID: <1569032108.36.0.750720661936.issue38241@roundup.psfhosted.org> Josh Rosenberg added the comment: I'll note, the same bug appears in Python 2, but only when pickling bytearray; since bytes in Python 2 is just a str alias, you don't see this misbehavior with it, only with bytearray (which is consistently incorrect/non-ASCII on both 2 and 3). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 20 22:17:30 2019 From: report at bugs.python.org (longwenzhang) Date: Sat, 21 Sep 2019 02:17:30 +0000 Subject: [issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py Message-ID: <1569032250.18.0.545337961077.issue38243@roundup.psfhosted.org> New submission from longwenzhang : It's "Lib/DocXMLRPCServer.py" in python2x or "Lib/xmlrpc/server.py" in python3x. Steps to reproduce: 1.Lib/DocXMLRPCServer.py is ?a documenting XML-RPC Server?,In the Class ServerHTMLDoc, method markup(), will escape the Special symbols to safe(such as <," etc). 2.But it only escape the content from server.set_server_name() and server.set_server_documentation(),the "title" content from the server.set_server_title() will not be escaped, so if I set_server_title('123'), it will cause XSS because not escaped. 3.I see the alert in Chrome by visiting http://127.0.0.1,the Poc is the poc.py?run in python2.7? in attachments. 4.Problems seems to be at https://github.com/python/cpython/blob/master/Lib/xmlrpc/server.py#L897 "return documenter.page(self.server_title,documentation)".Before this line,variable "documentation" has been escaped but self.server_title not.This is the main cause. ---------- components: Library (Lib) files: poc.py messages: 352921 nosy: longwenzhang priority: normal severity: normal status: open title: A reflected XSS in python/Lib/DocXMLRPCServer.py type: security versions: Python 3.7 Added file: https://bugs.python.org/file48619/poc.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 00:25:04 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 21 Sep 2019 04:25:04 +0000 Subject: [issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py In-Reply-To: <1569032250.18.0.545337961077.issue38243@roundup.psfhosted.org> Message-ID: <1569039904.82.0.625163176468.issue38243@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks for the report. There is a policy to report security vulnerabilities in CPython : https://www.python.org/news/security/. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 00:28:53 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 21 Sep 2019 04:28:53 +0000 Subject: [issue38237] Expose meaningful keyword arguments for pow() In-Reply-To: <1569000102.29.0.506926854512.issue38237@roundup.psfhosted.org> Message-ID: <1569040133.12.0.149420301287.issue38237@roundup.psfhosted.org> miss-islington added the comment: New changeset 87d6cd3604e5c83c06339276228139f5e040b0e7 by Miss Islington (bot) (Ammar Askar) in branch 'master': bpo-38237: Make pow's arguments have more descriptive names and be keyword passable (GH-16302) https://github.com/python/cpython/commit/87d6cd3604e5c83c06339276228139f5e040b0e7 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 00:29:31 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 21 Sep 2019 04:29:31 +0000 Subject: [issue38237] Expose meaningful keyword arguments for pow() In-Reply-To: <1569000102.29.0.506926854512.issue38237@roundup.psfhosted.org> Message-ID: <1569040171.3.0.992221514086.issue38237@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks Ammar ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 01:39:55 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 21 Sep 2019 05:39:55 +0000 Subject: [issue38236] Dump the Python path configuration at the first import error In-Reply-To: <1568997895.56.0.760570797029.issue38236@roundup.psfhosted.org> Message-ID: <1569044395.59.0.787288544383.issue38236@roundup.psfhosted.org> St?phane Wirtel added the comment: +1 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 01:52:06 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 21 Sep 2019 05:52:06 +0000 Subject: [issue27071] unittest.TestCase.assertCountEqual is a very misleading name In-Reply-To: <1463788380.52.0.782790370377.issue27071@psf.upfronthosting.co.za> Message-ID: <1569045126.2.0.162882831131.issue27071@roundup.psfhosted.org> Raymond Hettinger added the comment: FWIW "assertMultiSetEqual" may be better than "assertPermutation". The issue with the latter is that distinct but equal values may appear on both sides, so it isn't really a permutation. # These don't look like permutations at all # but they are equivalent multisets assertPermutation([Decimal(3), 5, Fraction(12, 4)], [3.0, 3, Fraction(15, 3)]) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 01:54:52 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Sep 2019 05:54:52 +0000 Subject: [issue38237] Expose meaningful keyword arguments for pow() In-Reply-To: <1569000102.29.0.506926854512.issue38237@roundup.psfhosted.org> Message-ID: <1569045292.75.0.189401422788.issue38237@roundup.psfhosted.org> Serhiy Storchaka added the comment: Thank you for your contribution Ammar! Nice work! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 02:00:07 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 21 Sep 2019 06:00:07 +0000 Subject: [issue38093] Update MagicMock __aenter__ and __aexit__ to return AsyncMock's In-Reply-To: <1568126561.19.0.234964443085.issue38093@roundup.psfhosted.org> Message-ID: <1569045607.82.0.953299965672.issue38093@roundup.psfhosted.org> St?phane Wirtel added the comment: New changeset 865bb685a67798eb98dcf5f3a852e08c77792998 by St?phane Wirtel (Lisa Roach) in branch '3.8': [3.8] bpo-38093: Correctly returns AsyncMock for async subclasses. (GH-15947) (GH-16299) https://github.com/python/cpython/commit/865bb685a67798eb98dcf5f3a852e08c77792998 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 02:12:10 2019 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 21 Sep 2019 06:12:10 +0000 Subject: [issue38244] example in ftplib.rst uses ftp.debian.org but it's not reachable Message-ID: <1569046330.36.0.543009773859.issue38244@roundup.psfhosted.org> New submission from St?phane Wirtel : In the first example of Doc/library/ftplib.rst, we use ftp.debian.org but the connection is refused. There is no automatic redirection to ftp.us.debian.org or another server. If we want to keep a consistent example, we should use ftp.us.debian.org or another server. ---------- messages: 352929 nosy: matrixise priority: normal severity: normal status: open title: example in ftplib.rst uses ftp.debian.org but it's not reachable versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 02:30:21 2019 From: report at bugs.python.org (Prateek Nayak) Date: Sat, 21 Sep 2019 06:30:21 +0000 Subject: [issue38244] example in ftplib.rst uses ftp.debian.org but it's not reachable In-Reply-To: <1569046330.36.0.543009773859.issue38244@roundup.psfhosted.org> Message-ID: <1569047421.03.0.913977749735.issue38244@roundup.psfhosted.org> Change by Prateek Nayak : ---------- keywords: +patch pull_requests: +15896 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16319 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 03:45:26 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 21 Sep 2019 07:45:26 +0000 Subject: [issue38216] Fix for issue30458 (HTTP Header Injection) prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1569051926.15.0.173848081959.issue38216@roundup.psfhosted.org> Jason R. Coombs added the comment: > I'm not against that concept, but it is only appropriate for >= 3.9 as that'd be adding a feature. This issue is marked a release blocker to decide what to do for 3.5-3.7 (and maybe 3.8 if deemed a serious breaking change). The key part of the regression for 2.7 and 3.5+ was that it became impractical to retain the existing behavior of sending invalid bytes. My recommendation is to provide a mechanism to achieve compatibility with the older versions of Python. Although it's a "feature", it's also a feature necessitated by the security bugfix and to alleviate the regression. For this reason, I think the change should be applied to all Python versions that were patched for the security issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 03:59:56 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 21 Sep 2019 07:59:56 +0000 Subject: [issue38237] Expose meaningful keyword arguments for pow() In-Reply-To: <1569000102.29.0.506926854512.issue38237@roundup.psfhosted.org> Message-ID: <1569052796.3.0.937776497612.issue38237@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15897 pull_request: https://github.com/python/cpython/pull/16320 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 04:07:35 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 21 Sep 2019 08:07:35 +0000 Subject: [issue38242] Revert the new asyncio Streams API In-Reply-To: <1569020325.08.0.390897413838.issue38242@roundup.psfhosted.org> Message-ID: <1569053255.6.0.639409164343.issue38242@roundup.psfhosted.org> Andrew Svetlov added the comment: There is an alternative proposal: let's deprecate and eventually remove streams API entirely (for sockets, pipes, and subprocesses). By this, we will never have a chance to conflict with trio. Another option is removing asyncio at all (again to never conflict with trio and possible future awesome libraries) but the ship has sailed maybe. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 04:14:11 2019 From: report at bugs.python.org (Pierre-Jean Grenier) Date: Sat, 21 Sep 2019 08:14:11 +0000 Subject: [issue37921] Improve zipfile: add support for symlinks In-Reply-To: <1566508476.42.0.582332769766.issue37921@roundup.psfhosted.org> Message-ID: <1569053651.61.0.331518699711.issue37921@roundup.psfhosted.org> Pierre-Jean Grenier added the comment: The PR went through review and has been awaiting core review for almost a month, anyone to have a look at it? :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 04:22:37 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 21 Sep 2019 08:22:37 +0000 Subject: [issue38237] Expose meaningful keyword arguments for pow() In-Reply-To: <1569000102.29.0.506926854512.issue38237@roundup.psfhosted.org> Message-ID: <1569054157.24.0.343669643423.issue38237@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 37bc93552375cb1bc616927b5c1905bae3c0e99d by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-38237: Let pow() support keyword arguments (GH-16302) (GH-16320) https://github.com/python/cpython/commit/37bc93552375cb1bc616927b5c1905bae3c0e99d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 04:32:39 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 21 Sep 2019 08:32:39 +0000 Subject: [issue38242] Revert the new asyncio Streams API In-Reply-To: <1569020325.08.0.390897413838.issue38242@roundup.psfhosted.org> Message-ID: <1569054759.4.0.279502466623.issue38242@roundup.psfhosted.org> Raymond Hettinger added the comment: Reversion is cheap. Published APIs are hard to take back. If the plan is to deprecate, then anything added for 3.8 should be reverted. There's no point in publishing a new API only to take it away. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 04:55:08 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 21 Sep 2019 08:55:08 +0000 Subject: [issue38216] Fix for issue30458 (HTTP Header Injection) prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1569056108.69.0.878708868675.issue38216@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- pull_requests: +15898 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16321 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 04:55:08 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 21 Sep 2019 08:55:08 +0000 Subject: [issue36274] http.client cannot send non-ASCII request lines In-Reply-To: <1552422803.93.0.420596825145.issue36274@roundup.psfhosted.org> Message-ID: <1569056108.86.0.0879757550855.issue36274@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- pull_requests: +15899 pull_request: https://github.com/python/cpython/pull/16321 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 04:55:09 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 21 Sep 2019 08:55:09 +0000 Subject: [issue30458] [security][CVE-2019-9740][CVE-2019-9947] HTTP Header Injection (follow-up of CVE-2016-5699) In-Reply-To: <1495638091.75.0.96439752743.issue30458@psf.upfronthosting.co.za> Message-ID: <1569056109.0.0.755673463071.issue30458@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- pull_requests: +15900 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/16321 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 04:55:56 2019 From: report at bugs.python.org (Nathaniel Smith) Date: Sat, 21 Sep 2019 08:55:56 +0000 Subject: [issue38242] Revert the new asyncio Streams API In-Reply-To: <1569020325.08.0.390897413838.issue38242@roundup.psfhosted.org> Message-ID: <1569056156.13.0.777903660175.issue38242@roundup.psfhosted.org> Nathaniel Smith added the comment: That seems a bit extreme, and I don't think conflicts with Trio are the most important motivation here. (And they shouldn't be.) But, we should probably write down what the motivations actually are. Yury might have a different perspective, but to me the challenge of the asyncio stream API is that it's trying to do three things at once: 1. Provide a generic interface for representing byte streams 2. Provide useful higher-level tools for working with byte streams, like readuntil and TLS 3. Adapt the protocol/transports world into the async/await world These are all important things that should exist. The problem is that asyncio.Stream tries to do all three at once in a single class, which makes them tightly coupled. *If* we're going to have a single class that does all those things, then I think the new asyncio.Stream code does that about as well as it can be done. The alternative is to split up those responsibilities: solve (1) by defining some simple ABCs to represent a generic stream, that are optimized to be easy to implement for lots of different stream types, solve (2) by building higher-level tools that work against the ABC interface so they work on any stream implementation, and then once that's done it should be pretty easy to solve (3) by implementing the new ABC for protocol/transports. By splitting things up this way, I think we can do a better job at solving all the problems with fewer compromises. For example, there are lots of third-party libraries that use asyncio and want to expose some kind of stream object, like HTTP libraries, SSH libraries, SOCKS libraries, etc., but the current design makes this difficult. Also, building streams on top of protocols/transports adds unnecessary runtime overhead. A further bonus is that (1) and (2) aren't tied to any async library, so it's possible to borrow the work that Trio's been doing on them, and to potentially share this part of the code between Trio and asyncio. So that all sounds pretty cool, but what does it have to do with shipping asyncio.Stream in 3.8? The concern is that right now asyncio has two APIs for working with byte streams (protocols/transports + StreamReader/StreamWriter); then 3.8 adds asyncio.Stream; and then the design I'm describing will make a *fourth*, which is a lot. I think we need something *like* asyncio.Stream in the mix, for compatibility and bridging between the two worlds, but right now it's not quite clear how that should look, and pushing it off to 3.9 would give us time to figure out the details for how these things can all fit together best. ---------- nosy: -rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 04:57:44 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 21 Sep 2019 08:57:44 +0000 Subject: [issue38242] Revert the new asyncio Streams API In-Reply-To: <1569020325.08.0.390897413838.issue38242@roundup.psfhosted.org> Message-ID: <1569056264.01.0.113353470383.issue38242@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 04:57:54 2019 From: report at bugs.python.org (Nathaniel Smith) Date: Sat, 21 Sep 2019 08:57:54 +0000 Subject: [issue38242] Revert the new asyncio Streams API In-Reply-To: <1569020325.08.0.390897413838.issue38242@roundup.psfhosted.org> Message-ID: <1569056274.54.0.49920376166.issue38242@roundup.psfhosted.org> Nathaniel Smith added the comment: > I think we need something *like* asyncio.Stream in the mix, for compatibility and bridging between the two worlds, but right now it's not quite clear how that should look, and pushing it off to 3.9 would give us time to figure out the details for how these things can all fit together best. Sorry, this was unclear. The "two worlds" I mean here are the current asyncio landscape and a future where we have standardized composable ABCs. ---------- nosy: -rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 04:59:49 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 21 Sep 2019 08:59:49 +0000 Subject: [issue38216] Fix for issue30458 (HTTP Header Injection) prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1569056389.86.0.744876932162.issue38216@roundup.psfhosted.org> Jason R. Coombs added the comment: I've added PR 16321 illustrating my proposed solution. This solution, while more invasive than Tim's more surgical solution, addresses the concerns brought about by this issue as well as those articulated originally in issue36274. I'm slightly inclined to suggest accepting this change for Python 3.8, and Tim's surgical patch for earlier versions except that doing so would not address the main concern of issue36274, which addresses a migration concern from Python 2.7 (a regression introduced in Python 3.0). ---------- stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 05:55:01 2019 From: report at bugs.python.org (Thomas Grainger) Date: Sat, 21 Sep 2019 09:55:01 +0000 Subject: [issue27071] unittest.TestCase.assertCountEqual is a very misleading name In-Reply-To: <1463788380.52.0.782790370377.issue27071@psf.upfronthosting.co.za> Message-ID: <1569059701.19.0.45651632796.issue27071@roundup.psfhosted.org> Thomas Grainger added the comment: While it may not appear to be a permutation, python already considers it one: graingert at onomastic:~$ cat test_assert_permutation.py import itertools import unittest from decimal import Decimal from fractions import Fraction class TestAssertPermutation(unittest.TestCase): def assertPermutation(self, a, b): return self.assertIn(tuple(a), itertools.permutations(b)) def test_do_not_look_like_permutations(self): self.assertPermutation( [Decimal(3), 5, Fraction(12, 4)], [3.0, 3, Fraction(15, 3)] ) if __name__ == "__main__": unittest.main() graingert at onomastic:~$ python3 test_assert_permutation.py -v test_do_not_look_like_permutations (__main__.TestAssertPermutation) ... ok ---------------------------------------------------------------------- Ran 1 test in 0.000s OK ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 05:56:56 2019 From: report at bugs.python.org (hongweipeng) Date: Sat, 21 Sep 2019 09:56:56 +0000 Subject: [issue35696] remove unnecessary operation in long_compare() In-Reply-To: <1547025999.59.0.0318422017652.issue35696@roundup.psfhosted.org> Message-ID: <1569059816.03.0.296406311893.issue35696@roundup.psfhosted.org> Change by hongweipeng : ---------- nosy: +hongweipeng _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 06:11:28 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Sep 2019 10:11:28 +0000 Subject: [issue38237] Expose meaningful keyword arguments for pow() In-Reply-To: <1569000102.29.0.506926854512.issue38237@roundup.psfhosted.org> Message-ID: <1569060688.89.0.452051592073.issue38237@roundup.psfhosted.org> Serhiy Storchaka added the comment: Isn't it a new feature? Isn't it too later to add it to 3.8? ---------- nosy: +lukasz.langa status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 09:23:26 2019 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 21 Sep 2019 13:23:26 +0000 Subject: [issue38225] iscoroutinefunction broken with cython - allow tagging of functions as async? In-Reply-To: <1568918319.91.0.348855638851.issue38225@roundup.psfhosted.org> Message-ID: <1569072206.73.0.756737451691.issue38225@roundup.psfhosted.org> Stefan Behnel added the comment: > along with the appropriate CO_COROUTINE flag set No, it never did that, for safety reasons. It's difficult to say if enabling these flags is the right thing to do, because it's unclear what assumptions code that tests for them would make. In CPython itself, there do not seem to be any "excessive" assumptions specific to that flag ? also because Cython functions are not Python functions, and thus the flag will never be looked at: https://github.com/python/cpython/blob/5b9ff7a0dcb16d6f5c3cd4f1f52e0ca6a4bde586/Lib/inspect.py#L178-L180 Thus, setting the CO_COROUTINE and CO_ASYNC_GENERATOR code flags has no effect for Cython functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 10:12:22 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 21 Sep 2019 14:12:22 +0000 Subject: [issue38045] enum.Flag instance creation is slow In-Reply-To: <1567772280.73.0.782923595007.issue38045@roundup.psfhosted.org> Message-ID: <1569075142.32.0.0971418458851.issue38045@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 11:04:03 2019 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sat, 21 Sep 2019 15:04:03 +0000 Subject: [issue38166] ast identifies incorrect column for compound attribute lookups In-Reply-To: <1568411334.98.0.109884794691.issue38166@roundup.psfhosted.org> Message-ID: <1569078243.12.0.0585175652045.issue38166@roundup.psfhosted.org> Ivan Levkivskyi added the comment: As Serhiy explained, there is no bug here, _potentially_ we could change AST so that attribute name (i.e. "b" in "a.b") is wrapped in a special node holding the position info (similar to ``ast.arg``), but it is a breaking change and is not worth it. You can re-open your issue on PyLint tracker. ---------- nosy: +levkivskyi resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 11:56:45 2019 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 21 Sep 2019 15:56:45 +0000 Subject: [issue38242] Revert the new asyncio Streams API In-Reply-To: <1569020325.08.0.390897413838.issue38242@roundup.psfhosted.org> Message-ID: <1569081405.14.0.0789167838636.issue38242@roundup.psfhosted.org> Guido van Rossum added the comment: I am going to recommend sticking to the status quo, i.e. Andrew's improvements to asyncio.Stream should stay. The rest of this message is an elaboration. The new perfect composable Streams design is just that -- a design. Many things could go wrong in the implementation. Once it exists as a 3rd party add-on and users agree it's better we *may* decide to deprecate asyncio.Stream. Or not -- there are many examples in the stdlib of modules for which a better 3rd party alternative exists but which are nevertheless useful and not deprecated. Much of the asyncio universe already exists outside the stdlib -- the perfect composable Streams API should probably never be moved into the stdlib (unless it's so perfect that it never needs to change :-). Andrew's improvements help current users of asyncio.Stream. If those users eventually want to migrate to the perfect composable Streams API, once it's available, fine. But I don't think we're helping them by not giving them improvements that have already been implemented (and which everyone here agrees are improvements!) right now. Users of the current asyncio.Stream have a choice -- they can adopt the improvements in 3.8, or they can wait for the perfect design to be implemented. Everybody's constraints are different. Let's not pretend we already know what they should choose. If in the future we end up changing our mind, that's okay. It's happened before, and we've lived. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 12:22:10 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 21 Sep 2019 16:22:10 +0000 Subject: [issue38242] Revert the new asyncio Streams API In-Reply-To: <1569020325.08.0.390897413838.issue38242@roundup.psfhosted.org> Message-ID: <1569082930.55.0.632140179604.issue38242@roundup.psfhosted.org> Andrew Svetlov added the comment: I would say that we can reimplement the Stream class on top of new composable streams in the future. I'd love to do it right now but these streams don't exist yet. I totally support the idea of new streams design, it looks very attractive. The implementation may take a while and require many labor-hours though. asyncio is driven by volunteers, mostly by Yuri and I. We constantly don't implement all our *wishes* at the time on next Python feature-freezing but only a subset of them. Maybe the situation will change in the future but I have no strong confidence that we finish the design of the new streams in 3.9. Task group is another very required thing. If I choose between groups and steams I probably invest my time into the former. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 12:23:13 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 21 Sep 2019 16:23:13 +0000 Subject: [issue38242] Revert the new asyncio Streams API In-Reply-To: <1569020325.08.0.390897413838.issue38242@roundup.psfhosted.org> Message-ID: <1569082993.55.0.299974141682.issue38242@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 12:50:01 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 21 Sep 2019 16:50:01 +0000 Subject: [issue38237] Expose meaningful keyword arguments for pow() In-Reply-To: <1569000102.29.0.506926854512.issue38237@roundup.psfhosted.org> Message-ID: <1569084601.19.0.79571337711.issue38237@roundup.psfhosted.org> Raymond Hettinger added the comment: As noted in the checkin, this was backported with the release manager's assent. FWIW, pow() itself is an old feature, recently enhanced to support negative powers in a given modulus. When the enhancement went in, we should have done this as well. ---------- status: open -> closed versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 13:06:30 2019 From: report at bugs.python.org (Srinivasan Samuel) Date: Sat, 21 Sep 2019 17:06:30 +0000 Subject: [issue38245] Why am I getting inconsistent results in this simple List assignment? Message-ID: <1569085590.42.0.704218792201.issue38245@roundup.psfhosted.org> New submission from Srinivasan Samuel : Here is the my direct cut & paste from my Python 3.7.3 Shell >>> C = 2*[[]] >>> C [[], []] >>> >>> M = [[],[]] >>> M [[], []] >>> >>> C == M True >>> >>> M[0].append(5) >>> M [[5], []] >>> >>> C[0].append(5) >>> C [[5], [5]] >>> >>> C == M False >>> ---------- messages: 352945 nosy: pysolo priority: normal severity: normal status: open title: Why am I getting inconsistent results in this simple List assignment? type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 13:20:26 2019 From: report at bugs.python.org (Ammar Askar) Date: Sat, 21 Sep 2019 17:20:26 +0000 Subject: [issue38245] Why am I getting inconsistent results in this simple List assignment? In-Reply-To: <1569085590.42.0.704218792201.issue38245@roundup.psfhosted.org> Message-ID: <1569086426.33.0.254371332944.issue38245@roundup.psfhosted.org> Ammar Askar added the comment: Check out this part of the FAQ: https://docs.python.org/3/faq/programming.html#how-do-i-create-a-multidimensional-list Essentially, when you did `C = 2*[[]]`, what happens is that the SAME empty list is placed into C[0] and C[1]. Whereas when you do `M = [[],[]]`, you're creating two different lists. You can confirm this using: >>> C = 2*[[]] >>> C[0] is C[1] True >>> M = [[],[]] >>> M[0] is M[1] False ---------- nosy: +ammar2 resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 13:50:05 2019 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 21 Sep 2019 17:50:05 +0000 Subject: [issue38242] Revert the new asyncio Streams API In-Reply-To: <1569020325.08.0.390897413838.issue38242@roundup.psfhosted.org> Message-ID: <1569088205.56.0.97591390443.issue38242@roundup.psfhosted.org> Yury Selivanov added the comment: > Task group is another very required thing. If I choose between groups and steams I probably invest my time into the former. We should get them in 3.9. I'm going to be working on the ExceptionGroup PEP today. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 13:55:41 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 21 Sep 2019 17:55:41 +0000 Subject: [issue38242] Revert the new asyncio Streams API In-Reply-To: <1569020325.08.0.390897413838.issue38242@roundup.psfhosted.org> Message-ID: <1569088541.26.0.772573628547.issue38242@roundup.psfhosted.org> Andrew Svetlov added the comment: Awesome! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 14:31:47 2019 From: report at bugs.python.org (Steve Dower) Date: Sat, 21 Sep 2019 18:31:47 +0000 Subject: [issue38239] test_gdb fails on AMD64 Fedora Stable LTO 3.8 and AMD64 RHEL8 LTO 3.x: Unexpected gdb output In-Reply-To: <1569015160.3.0.923927814388.issue38239@roundup.psfhosted.org> Message-ID: <1569090707.48.0.49536080181.issue38239@roundup.psfhosted.org> Steve Dower added the comment: Shouldn't this test be suppressed on LTO builds? #0 builtin_id (self=, v=) at Objects/longobject.c:1113 builtid_id isn't in longobject.c, so this is incorrect debug information. The test expects to find it in bltinmodule.c: re.match(r'.*#0\s+builtin_id\s+\(self\=.*,\s+v=\s*(.*?)?\)\s+at\s+\S*Python/bltinmodule.c.*' ... ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 15:34:38 2019 From: report at bugs.python.org (Ned Deily) Date: Sat, 21 Sep 2019 19:34:38 +0000 Subject: [issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py In-Reply-To: <1569032250.18.0.545337961077.issue38243@roundup.psfhosted.org> Message-ID: <1569094478.44.0.456421352501.issue38243@roundup.psfhosted.org> Change by Ned Deily : ---------- keywords: +security_issue priority: normal -> high versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 16:18:39 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 21 Sep 2019 20:18:39 +0000 Subject: [issue27071] unittest.TestCase.assertCountEqual is a very misleading name In-Reply-To: <1463788380.52.0.782790370377.issue27071@psf.upfronthosting.co.za> Message-ID: <1569097119.69.0.227080440491.issue27071@roundup.psfhosted.org> Terry J. Reedy added the comment: I like using 'multiset', but I think 'assertMultisetEqual', proposed by Martin Panter in msg266207, is better than assertMultiSetEqual, as it does not imply the existence of a class 'MultiSet'. Raymond's comment "distinct but equal values may appear on both sides, so it isn't really a permutation" turns on the ambiguity of 'same element' in the assertCoultEqual definition. The doc never says explicitly that it means same by equality ('==') regardless of class, rather than same by equality within a class, which one might assume for 'permutation of values', or same by identity ('is'), which would be needed for 'permutation of objects'. I think it should what same means here. Gregory Smith msg266208 objects to a name containing 'set' because "this is most notably an api having nothing to do with sets". However, the short definition of the assertion, "a and b have the same elements in the same number, regardless of their order" *is* a definition of multiset equality. The assertion looks at both collections as multisets. Unlike R. David Murray msg266153, I see a difference between 'count' and 'counts'. The former can only mean comparing one count for each collection, the number of items. The latter could mean the same, but could also mean comparing multiple counts for each collection, as is the case. RDM goes on to claim that 'count' is correct because the function's doc defines it in terms of itertools.count. It actually defines it in terms of collections.Counter, which would suggest, using the same logic, 'assertCounterEqual' or assertCountersEqual. Since Counter implements the mathematical idea of 'multiset' and "is similar to bags or multisets in other languages", we get to 'assertMultisetEqual' as the less Python-specific name. [I am puzzled about a couple of things. The doc says "Equivalent to: assertEqual(Counter(list(first)), Counter(list(second))) but works with sequences of unhashable objects as well." That expression *is* the current implementation. 1. It seems that the 'list' call should be irrelevant. 2. Counter calls fail with iterables of unhashable objects. Why not the overall expression?] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 16:32:11 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 21 Sep 2019 20:32:11 +0000 Subject: [issue38237] Expose meaningful keyword arguments for pow() In-Reply-To: <1569000102.29.0.506926854512.issue38237@roundup.psfhosted.org> Message-ID: <1569097931.54.0.0107321796921.issue38237@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 24231ca75c721c8167a7394deb300727ccdcba51 by Raymond Hettinger (Miss Islington (bot)) in branch '3.8': bpo-38237: Shorter docstring (GH-16322) (GH-16323) https://github.com/python/cpython/commit/24231ca75c721c8167a7394deb300727ccdcba51 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 16:32:32 2019 From: report at bugs.python.org (miss-islington) Date: Sat, 21 Sep 2019 20:32:32 +0000 Subject: [issue38237] Expose meaningful keyword arguments for pow() In-Reply-To: <1569000102.29.0.506926854512.issue38237@roundup.psfhosted.org> Message-ID: <1569097952.33.0.35990548313.issue38237@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15901 pull_request: https://github.com/python/cpython/pull/16323 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 16:44:01 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Sep 2019 20:44:01 +0000 Subject: [issue38237] Expose meaningful keyword arguments for pow() In-Reply-To: <1569000102.29.0.506926854512.issue38237@roundup.psfhosted.org> Message-ID: <1569098641.08.0.324564212149.issue38237@roundup.psfhosted.org> Serhiy Storchaka added the comment: Thank you for the explanation Raymond and sorry for the disturb. My mistake, I had not noticed the release manager's assent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 16:47:44 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 21 Sep 2019 20:47:44 +0000 Subject: [issue27071] unittest.TestCase.assertCountEqual is a very misleading name In-Reply-To: <1463788380.52.0.782790370377.issue27071@psf.upfronthosting.co.za> Message-ID: <1569098864.12.0.414794479362.issue27071@roundup.psfhosted.org> Serhiy Storchaka added the comment: > 1. It seems that the 'list' call should be irrelevant. It is relevant. Counter({1: 2}) != Counter(list({1: 2})). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 18:01:21 2019 From: report at bugs.python.org (Infrasonics) Date: Sat, 21 Sep 2019 22:01:21 +0000 Subject: [issue38246] pathlib.resolve and .absolute leave trailing tilde in home expansion Message-ID: <1569103281.1.0.00418386254379.issue38246@roundup.psfhosted.org> New submission from Infrasonics : `Path('~').resolve()` gives `PosixPath('/home/youruser/~')`. Same problem for `.absolute`, yet `.expanduser` works correctly. ---------- components: Library (Lib) messages: 352954 nosy: Infrasonics priority: normal severity: normal status: open title: pathlib.resolve and .absolute leave trailing tilde in home expansion type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 18:19:50 2019 From: report at bugs.python.org (Aman Priyanshu) Date: Sat, 21 Sep 2019 22:19:50 +0000 Subject: [issue38247] list(str.split(ch)) Does not print blank elements upon repeating character(ch) Message-ID: <1569104390.96.0.0416491313723.issue38247@roundup.psfhosted.org> New submission from Aman Priyanshu : I have been annoyed by the fact that at multiple where we print list(str.split(ch)) we get empty elements in place of repeated characters (ch). Example: #### >>> print(list("Hello World How Are You?".split(" "))) ['Hello', 'World', 'How', 'Are', 'You?'] >>> print(list("Hello World How Are You?".split(" "))) ['Hello', 'World', '', '', '', '', '', '', 'How', 'Are', '', '', '', '', '', 'You?'] #### So can it be fixed so that it gives: #### >>> print(list("Hello World How Are You?".split(" "))) ['Hello', 'World', 'How', 'Are', 'You?'] >>> print(list("Hello World How Are You?".split(" "))) ['Hello', 'World', 'How', 'Are', 'You?'] #### ---------- messages: 352955 nosy: AmanPriyanshu priority: normal pull_requests: 15902 severity: normal status: open title: list(str.split(ch)) Does not print blank elements upon repeating character(ch) type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 18:21:29 2019 From: report at bugs.python.org (Aman Priyanshu) Date: Sat, 21 Sep 2019 22:21:29 +0000 Subject: [issue15902] imp.load_module won't accept None for the file argument for a C extension In-Reply-To: <1347278689.78.0.295593798435.issue15902@psf.upfronthosting.co.za> Message-ID: <1569104489.6.0.234432886575.issue15902@roundup.psfhosted.org> Change by Aman Priyanshu : ---------- pull_requests: +15903 pull_request: https://github.com/python/cpython/pull/16324 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 18:47:44 2019 From: report at bugs.python.org (Aman Priyanshu) Date: Sat, 21 Sep 2019 22:47:44 +0000 Subject: [issue38247] list(str.split(ch)) Does not print blank elements upon repeating character(ch) In-Reply-To: <1569104390.96.0.0416491313723.issue38247@roundup.psfhosted.org> Message-ID: <1569106064.46.0.935010593716.issue38247@roundup.psfhosted.org> Change by Aman Priyanshu : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 19:19:45 2019 From: report at bugs.python.org (Ammar Askar) Date: Sat, 21 Sep 2019 23:19:45 +0000 Subject: [issue38247] list(str.split(ch)) Does not print blank elements upon repeating character(ch) In-Reply-To: <1569104390.96.0.0416491313723.issue38247@roundup.psfhosted.org> Message-ID: <1569107985.79.0.501369166029.issue38247@roundup.psfhosted.org> Ammar Askar added the comment: For whitespace, the correct way to achieve this using split() with no argument: >>> print(list("Hello World How Are You?".split())) ['Hello', 'World', 'How', 'Are', 'You?'] >>> print(list("Hello World How Are You?".split())) ['Hello', 'World', 'How', 'Are', 'You?'] Your proposed solution would be a breaking change to all code that relies on the old style. ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 21:48:57 2019 From: report at bugs.python.org (Eryk Sun) Date: Sun, 22 Sep 2019 01:48:57 +0000 Subject: [issue38246] pathlib.resolve and .absolute leave trailing tilde in home expansion In-Reply-To: <1569103281.1.0.00418386254379.issue38246@roundup.psfhosted.org> Message-ID: <1569116937.35.0.754637376059.issue38246@roundup.psfhosted.org> Eryk Sun added the comment: Only Path.expanduser() special cases tilde as a POSIX shell would. Otherwise "~" is not a reserved filename character in POSIX. Path('~') is a file named "~" that's relative to the current working directory. By coincidence the working directory is the user's home directory in your example. ---------- nosy: +eryksun resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 22:54:09 2019 From: report at bugs.python.org (Nicholas Neumann) Date: Sun, 22 Sep 2019 02:54:09 +0000 Subject: [issue38241] Pickle with protocol=0 in python 3 does not produce a 'human-readable' format In-Reply-To: <1569019992.12.0.181360535458.issue38241@roundup.psfhosted.org> Message-ID: <1569120849.25.0.935396729661.issue38241@roundup.psfhosted.org> Nicholas Neumann added the comment: Wow, that's a great catch with bytearray on py2. Protocols 0-2 are all actually supposed to work with python 2, and I was using 0 from Py3 as it's the default for Py2, and what I want to use during a short transition where both Py3 and Py2 are operating on my pickled data. I was surprised when Py3's protocol 0 output was so different than Py2's protocol 0. To be "human-readable", I think the protocol would have to be even stricter, omitting the non-printable ASCII characters. I wonder if protocol 0 was initially ASCII (or even stricter), and then this went out the window or was unintentionally not adhered to when new things like bytearray (2.6) were introduced. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 21 23:30:37 2019 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 22 Sep 2019 03:30:37 +0000 Subject: [issue37857] Setting logger.level directly has no effect due to caching in 3.7+ In-Reply-To: <1565811970.47.0.529067236549.issue37857@roundup.psfhosted.org> Message-ID: <1569123037.36.0.514246768149.issue37857@roundup.psfhosted.org> Vinay Sajip added the comment: > Obviously the fix could be just to stop doing that in the standard library Well, that's the right fix, and thanks for spotting it. I've applied those changes (42b6c5d and 19c42fb) to the master, 3.8 and 3.7 branches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 00:41:55 2019 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 22 Sep 2019 04:41:55 +0000 Subject: [issue36876] Global C variables are a problem. In-Reply-To: <1557514902.13.0.853517754348.issue36876@roundup.psfhosted.org> Message-ID: <1569127315.94.0.831827903537.issue36876@roundup.psfhosted.org> Change by Vinay Sajip : ---------- pull_requests: +15904 pull_request: https://github.com/python/cpython/pull/16328 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 01:50:49 2019 From: report at bugs.python.org (Michael Tippie) Date: Sun, 22 Sep 2019 05:50:49 +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: <1569131449.4.0.604216299466.issue30256@roundup.psfhosted.org> Michael Tippie added the comment: I am getting this error now, too. I'm not sure what's causing it - when I use multiprocessing with a Manager.Queue, if I am passing around an object on the queue stack, I get this error. Would really like it to "just work". ---------- nosy: +Locane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 01:54:27 2019 From: report at bugs.python.org (Srinivasan Samuel) Date: Sun, 22 Sep 2019 05:54:27 +0000 Subject: [issue38245] Why am I getting inconsistent results in this simple List assignment? In-Reply-To: <1569086426.33.0.254371332944.issue38245@roundup.psfhosted.org> Message-ID: <1989043124.4858426.1569131543139@mail.yahoo.com> Srinivasan Samuel added the comment: Thanks Ammar for your time, service and reply. It was really helpful. I learned some thing more.God Bless you.Srinivasan Samuel On Saturday, September 21, 2019, 10:50:32 PM GMT+5:30, Ammar Askar wrote: Ammar Askar added the comment: Check out this part of the FAQ: https://docs.python.org/3/faq/programming.html#how-do-i-create-a-multidimensional-list Essentially, when you did `C = 2*[[]]`, what happens is that the SAME empty list is placed into C[0] and C[1]. Whereas when you do `M = [[],[]]`, you're creating two different lists. You can confirm this using: >>> C = 2*[[]] >>> C[0] is C[1] True >>> M = [[],[]] >>> M[0] is M[1] False ---------- nosy: +ammar2 resolution:? -> not a bug stage:? -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 02:30:45 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 22 Sep 2019 06:30:45 +0000 Subject: [issue35603] table header in output of difflib.HtmlDiff.make_table is not escaped and can be rendered as code in the browser In-Reply-To: <1545988680.87.0.068090288545.issue35603@roundup.psfhosted.org> Message-ID: <1569133845.67.0.138865364854.issue35603@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Closing this as the docs are merged with the initial patch to escape header reverted. Thanks all for the reviews. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 02:41:33 2019 From: report at bugs.python.org (Kyle Stanley) Date: Sun, 22 Sep 2019 06:41:33 +0000 Subject: [issue37812] Make implicit returns explicit in longobject.c (in CHECK_SMALL_INT) In-Reply-To: <1565471250.77.0.491506074373.issue37812@roundup.psfhosted.org> Message-ID: <1569134493.87.0.45773182351.issue37812@roundup.psfhosted.org> Kyle Stanley added the comment: > Is there an "aesthetic code cleanup" patch that's ever turned out well? ;-) >From what I can tell, any remotely extensive aesthetic code patch I've seen has been highly controversial. I think they can have value in some cases, but the value relative to the potential cost may have been a bit overstated in this particular case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 04:45:24 2019 From: report at bugs.python.org (Nathaniel Smith) Date: Sun, 22 Sep 2019 08:45:24 +0000 Subject: [issue38248] inconsistency in asyncio.Task between cancellation while running vs. cancellation immediately after it finishes Message-ID: <1569141924.07.0.413373545347.issue38248@roundup.psfhosted.org> New submission from Nathaniel Smith : Just noticed this while looking at the code to asyncio.Task.__step asyncio Futures have two different error states: they can have an arbitrary exception set, or they can be marked as cancelled. asyncio Tasks handle this by detecting what exception was raised by the task code: if it's a CancelledError, then the mark the Future as cancelled, and if it's anything else, they set that as the Future's exception. There is also a special case handled inside the 'except StopIteration' clause in Task.__step. If we request that a Task be cancelled, but then the task exits normally before we have a chance to throw in a CancelledError, then we also want mark the Future as cancelled. BUT, this special case is handled incorrectly: it does Future.set_exception(CancelledError()), instead of Future.cancel(). Normally it's impossible for a task to end up with its exception set to CancelledError, but it does happen in this one weird edge case, basically as a race condition. Here's some sample code to illustrate the problem (tested on 3.7): ------ import asyncio # This gets cancelled normally async def cancel_early(): asyncio.current_task().cancel() await asyncio.sleep(1) async def cancel_late(): asyncio.current_task().cancel() # No sleep, so CancelledError doesn't get delivered until after the # task exits async def main(): t_early = asyncio.create_task(cancel_early()) await asyncio.sleep(0.1) print(f"t_early.cancelled(): {t_early.cancelled()!r}") t_late = asyncio.create_task(cancel_late()) await asyncio.sleep(0.1) print(f"t_late.cancelled(): {t_late.cancelled()!r}") print(f"t_late.exception(): {t_late.exception()!r}") asyncio.run(main()) ------ Output: t_early.cancelled(): True t_late.cancelled(): False t_late.exception(): CancelledError() The obvious fix would be to modify the 'except StopIteration' branch to handle this case by calling super().cancel() instead of super().set_exception(...). Alternatively, I could see an argument that asyncio.Task should always preserve the CancelledError, so that e.g. you can get a proper traceback. In that case we'd need to change the 'except CancelledError' branch to call super().set_exception(...) instead of super().cancel(). This would also need some more changes, like overriding .cancelled() to check for a stored exception and then return isinstance(stored_exc, CancelledError), and maybe others... I'm not sure of the full consequences. But handling these two cases differently is definitely wrong, that part I'm sure of :-) ---------- messages: 352964 nosy: asvetlov, njs, yselivanov priority: normal severity: normal status: open title: inconsistency in asyncio.Task between cancellation while running vs. cancellation immediately after it finishes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 05:47:06 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 22 Sep 2019 09:47:06 +0000 Subject: [issue38249] Optimize out Py_UNREACHABLE in the release mode Message-ID: <1569145626.92.0.408422678201.issue38249@roundup.psfhosted.org> New submission from Serhiy Storchaka : Py_UNREACHABLE is used to indicate that a specific point in the program cannot be reached, even if the compiler might otherwise think it can. This is exact the case for __builtin_unreachable in GCC and Clang. I propose to extend Py_UNREACHABLE() to __builtin_unreachable() in the release mode. This will allow the compiler to generate more efficient code. If there are circumstances in which Py_UNREACHABLE() is reachable, then it is improper use of Py_UNREACHABLE(). It should be replaced with raising an appropriate exception (like TypeError, ValueError, RuntimeError or SystemError) or, in extreme cases, with explicit Py_FatalError() ---------- components: Interpreter Core messages: 352965 nosy: barry, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Optimize out Py_UNREACHABLE in the release mode type: performance versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 05:53:58 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 22 Sep 2019 09:53:58 +0000 Subject: [issue38249] Optimize out Py_UNREACHABLE in the release mode In-Reply-To: <1569145626.92.0.408422678201.issue38249@roundup.psfhosted.org> Message-ID: <1569146038.13.0.939141688832.issue38249@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- keywords: +patch pull_requests: +15905 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16329 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 06:32:50 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 22 Sep 2019 10:32:50 +0000 Subject: [issue38209] Simplify dataclasses.InitVar by using __class_getitem__() In-Reply-To: <1568788237.84.0.300342046917.issue38209@roundup.psfhosted.org> Message-ID: <1569148370.42.0.00669099380955.issue38209@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset b4d0b39a9b4cd203bcc5b236dc96456e9658119a by Serhiy Storchaka in branch 'master': bpo-38209: Simplify dataclasses.InitVar by using __class_getitem__(). (GH-16255) https://github.com/python/cpython/commit/b4d0b39a9b4cd203bcc5b236dc96456e9658119a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 07:14:02 2019 From: report at bugs.python.org (John Belmonte) Date: Sun, 22 Sep 2019 11:14:02 +0000 Subject: [issue38250] enum.Flag should be more set-like Message-ID: <1569150842.66.0.799345616323.issue38250@roundup.psfhosted.org> New submission from John Belmonte : I would like Flag class instances to have more set-like abilities: 1. iteration, to walk through each set bit of the value 2. len corresponding to #1 3. subset operator I may be told "implement it yourself as instance methods", or that #3 has an idiom (a & b is b). Ideally though, every Flag user should be able to rely on these being implemented consistently. When trying to implement #1 without devolving into bit fiddling, naturally one might try to use the class iterator. Unfortunately the semantics of that enumeration include 0, aliases, and compound values. I've used Flag in several situations and projects, and so far there hasn't been a case where that was the desired semantics. Interesting though, if #1 were implemented in the standard library, then we could enumerate all bits of the Flag via iteration of `~MyFlag(0)`... though that's obscuring things behind another idiom. Thank you for considering. ---------- components: Library (Lib) messages: 352967 nosy: John Belmonte priority: normal severity: normal status: open title: enum.Flag should be more set-like type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 07:29:48 2019 From: report at bugs.python.org (Ofer Sadan) Date: Sun, 22 Sep 2019 11:29:48 +0000 Subject: [issue38251] urllib.request memory leak / overflow Message-ID: <1569151788.73.0.0306600169217.issue38251@roundup.psfhosted.org> New submission from Ofer Sadan : running `urllib.request.urlopen` multiple times causes the memory usage to increase with each run, even after calling `close()` on the request or using `del` on the result To recreate this problem, run code: import urllib.request def ip(): r = urllib.request.urlopen('https://api.ipify.org') b = r.read() r.close() print(len(b)) return b for i in range(1000): result = ip() del result Even though `len(b)` has a maximum value of 15 (for this url at least), the memory increases with each run by 200KB - 1MB ---------- components: Library (Lib) messages: 352968 nosy: Ofer Sadan priority: normal severity: normal status: open title: urllib.request memory leak / overflow versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 07:35:21 2019 From: report at bugs.python.org (Ofer Sadan) Date: Sun, 22 Sep 2019 11:35:21 +0000 Subject: [issue38251] urllib.request memory leak / overflow In-Reply-To: <1569151788.73.0.0306600169217.issue38251@roundup.psfhosted.org> Message-ID: <1569152121.94.0.275744112227.issue38251@roundup.psfhosted.org> Ofer Sadan added the comment: Just to note: I'm using Python 3.7.4 on Windows 10 (64bit), the issue exists on both the 32bit/64bit python versions I could test on. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 07:50:02 2019 From: report at bugs.python.org (Ma Lin) Date: Sun, 22 Sep 2019 11:50:02 +0000 Subject: [issue38252] micro-optimize ucs1lib_find_max_char in Windows 64-bit build Message-ID: <1569153002.15.0.915285235862.issue38252@roundup.psfhosted.org> New submission from Ma Lin : C type `long` is 4-byte integer in 64-bit Windows build. [1] But `ucs1lib_find_max_char()` function [2] uses SIZEOF_LONG, so it loses a little performance in 64-bit Windows build. Below is the benchmark of using SIZEOF_SIZE_T and this change: - unsigned long value = *(unsigned long *) _p; + sizt_t value = *(sizt_t *) _p; D:\dev\cpython\PCbuild\amd64\python.exe -m pyperf timeit -s "b=b'a'*10_000_000; f=b.decode;" "f('latin1')" before: 5.83 ms +- 0.05 ms after : 5.58 ms +- 0.06 ms [1] https://stackoverflow.com/questions/384502 [2] https://github.com/python/cpython/blob/v3.8.0b4/Objects/stringlib/find_max_char.h#L9 Maybe there can be more optimizations, so I didn't prepare a PR for this. ---------- components: Interpreter Core messages: 352970 nosy: Ma Lin, inada.naoki, serhiy.storchaka, sir-sigurd priority: normal severity: normal status: open title: micro-optimize ucs1lib_find_max_char in Windows 64-bit build type: performance versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 07:50:11 2019 From: report at bugs.python.org (Ido Michael) Date: Sun, 22 Sep 2019 11:50:11 +0000 Subject: [issue38101] Update devguide triaging keywords In-Reply-To: <1568194769.69.0.909868564617.issue38101@roundup.psfhosted.org> Message-ID: <1569153011.03.0.106886878574.issue38101@roundup.psfhosted.org> Ido Michael added the comment: Hi Lisa, I can take this (first commit), where can I edit the dev guide? I could see someone did update the easy keyword in it? Ido ---------- nosy: +Ido Michael _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 08:06:23 2019 From: report at bugs.python.org (Ido Michael) Date: Sun, 22 Sep 2019 12:06:23 +0000 Subject: [issue36947] [Good first issue] Fix 3.3.3.1 Metaclasses Documentation In-Reply-To: <1558103271.07.0.643884881507.issue36947@roundup.psfhosted.org> Message-ID: <1569153983.2.0.424728203673.issue36947@roundup.psfhosted.org> Ido Michael added the comment: Hey, Is someone working on this issue? Can I take it? Ido ---------- nosy: +Ido Michael _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 08:09:43 2019 From: report at bugs.python.org (Ido Michael) Date: Sun, 22 Sep 2019 12:09:43 +0000 Subject: [issue27873] multiprocessing.pool.Pool.map should take more than one iterable In-Reply-To: <1472253350.37.0.404019702525.issue27873@psf.upfronthosting.co.za> Message-ID: <1569154183.14.0.921765449367.issue27873@roundup.psfhosted.org> Ido Michael added the comment: Hey, Is it still open? What else needs to be done? Ido ---------- nosy: +Ido Michael _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 08:11:48 2019 From: report at bugs.python.org (Ido Michael) Date: Sun, 22 Sep 2019 12:11:48 +0000 Subject: [issue15436] __sizeof__ is not documented In-Reply-To: <1343073282.53.0.774447573036.issue15436@psf.upfronthosting.co.za> Message-ID: <1569154308.87.0.84744667218.issue15436@roundup.psfhosted.org> Ido Michael added the comment: I can add those changes if someone didn't take it already? Ido ---------- nosy: +Ido Michael _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 08:19:37 2019 From: report at bugs.python.org (Kumar Akshay) Date: Sun, 22 Sep 2019 12:19:37 +0000 Subject: [issue38251] urllib.request memory leak / overflow In-Reply-To: <1569151788.73.0.0306600169217.issue38251@roundup.psfhosted.org> Message-ID: <1569154777.34.0.842677831687.issue38251@roundup.psfhosted.org> Kumar Akshay added the comment: JFYI, Not reproducible on macOS. ---------- nosy: +kakshay _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 08:31:15 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 22 Sep 2019 12:31:15 +0000 Subject: [issue38251] urllib.request memory leak / overflow In-Reply-To: <1569151788.73.0.0306600169217.issue38251@roundup.psfhosted.org> Message-ID: <1569155475.45.0.310273112957.issue38251@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Is this related to https://bugs.python.org/issue35941 given that it's related to windows. Similar report https://bugs.python.org/issue37498 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 08:31:49 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 22 Sep 2019 12:31:49 +0000 Subject: [issue38251] urllib.request memory leak / overflow In-Reply-To: <1569151788.73.0.0306600169217.issue38251@roundup.psfhosted.org> Message-ID: <1569155509.48.0.00342740729612.issue38251@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 08:33:23 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 22 Sep 2019 12:33:23 +0000 Subject: [issue38101] Update devguide triaging keywords In-Reply-To: <1568194769.69.0.909868564617.issue38101@roundup.psfhosted.org> Message-ID: <1569155603.12.0.0394170385675.issue38101@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I think devguide has it's own repo that accepts PRs https://github.com/python/devguide ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 08:42:55 2019 From: report at bugs.python.org (Kumar Akshay) Date: Sun, 22 Sep 2019 12:42:55 +0000 Subject: [issue38251] urllib.request memory leak / overflow In-Reply-To: <1569151788.73.0.0306600169217.issue38251@roundup.psfhosted.org> Message-ID: <1569156175.3.0.279318038496.issue38251@roundup.psfhosted.org> Kumar Akshay added the comment: Yes, https://bugs.python.org/issue37498 is indeed the same issue ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 09:44:44 2019 From: report at bugs.python.org (Ido Michael) Date: Sun, 22 Sep 2019 13:44:44 +0000 Subject: [issue38101] Update devguide triaging keywords In-Reply-To: <1568194769.69.0.909868564617.issue38101@roundup.psfhosted.org> Message-ID: <1569159884.13.0.312444347354.issue38101@roundup.psfhosted.org> Ido Michael added the comment: Thanks Karthikeyan! Found it, so for the last one pep3121, would you like to describe PEP in general or Extension Module Initialization and Finalization? Ido ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 10:57:20 2019 From: report at bugs.python.org (hongweipeng) Date: Sun, 22 Sep 2019 14:57:20 +0000 Subject: [issue38251] urllib.request memory leak / overflow In-Reply-To: <1569151788.73.0.0306600169217.issue38251@roundup.psfhosted.org> Message-ID: <1569164240.26.0.172754442871.issue38251@roundup.psfhosted.org> Change by hongweipeng : ---------- nosy: +hongweipeng _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 11:54:53 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 22 Sep 2019 15:54:53 +0000 Subject: [issue36274] http.client cannot send non-ASCII request lines In-Reply-To: <1552422803.93.0.420596825145.issue36274@roundup.psfhosted.org> Message-ID: <1569167693.98.0.0278869514841.issue36274@roundup.psfhosted.org> Jason R. Coombs added the comment: I should say, though, this issue is a long-standing regression from Python 3.0. Although intentional, the inability for a client to override the encoding of the request line does make it impossible without replacing all of .putrequest to override that behavior, so although it would be a feature, it might justify a backport to supported bugfix Pythons to facilitate migration from Python 2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 12:03:34 2019 From: report at bugs.python.org (hai shi) Date: Sun, 22 Sep 2019 16:03:34 +0000 Subject: [issue38253] Fix typo of Py_SET_ERANGE_IF_OVERFLOW in pyport.h Message-ID: <1569168214.54.0.709512149535.issue38253@roundup.psfhosted.org> New submission from hai shi : Py_SET_ERANGE_ON_OVERFLOW should be changed to Py_SET_ERANGE_IF_OVERFLOW in pyport.h. ---------- assignee: docs at python components: Documentation messages: 352981 nosy: docs at python, shihai1991 priority: normal severity: normal status: open title: Fix typo of Py_SET_ERANGE_IF_OVERFLOW in pyport.h versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 12:04:25 2019 From: report at bugs.python.org (hai shi) Date: Sun, 22 Sep 2019 16:04:25 +0000 Subject: [issue38253] Fix typo of Py_SET_ERANGE_IF_OVERFLOW in pyport.h In-Reply-To: <1569168214.54.0.709512149535.issue38253@roundup.psfhosted.org> Message-ID: <1569168265.14.0.96198752401.issue38253@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch pull_requests: +15906 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16230 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 12:11:18 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 22 Sep 2019 16:11:18 +0000 Subject: [issue38216] Fix for issue30458 (HTTP Header Injection) prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1569168678.52.0.0526742337706.issue38216@roundup.psfhosted.org> Jason R. Coombs added the comment: In https://github.com/cherrypy/cherrypy/pull/1807, I discovered that there is already a fairly straightforward means for a third-party package to override the putrequest character validation (just monkeypatch http.client._contains_disallowed_url_pchar_re with a less strict pattern; I used `[\n]`). This approach is barely worse than the proposal I made in the PR, the main differences being that a monkeypatch of that global variable is global (not selective to specific instances or subclasses of HTTPConnection) and doesn't have any tests in the CPython test suite to protect that as a supported mechanism. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 12:13:02 2019 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 22 Sep 2019 16:13:02 +0000 Subject: [issue38216] Fix for issue30458 (HTTP Header Injection) prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1569168782.44.0.0311320827311.issue38216@roundup.psfhosted.org> Jason R. Coombs added the comment: Also, with the CherryPy approach, the Python 2.7 story is more complicated. I haven't yet addressed that in the CherryPy 17 maintenance branch (which supports Python 2.7). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 13:02:27 2019 From: report at bugs.python.org (Cooper Lees) Date: Sun, 22 Sep 2019 17:02:27 +0000 Subject: [issue38172] Python 3.8 Segfult with Bandersnatch pytest Suite In-Reply-To: <1568472460.87.0.817204992487.issue38172@roundup.psfhosted.org> Message-ID: <1569171747.71.0.329360670514.issue38172@roundup.psfhosted.org> Cooper Lees added the comment: Happy to close, just was not 100% sure if the fix is merged into the 3.8 branch. I mainly opened this bug to ensure that has been done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 14:02:44 2019 From: report at bugs.python.org (David Parks) Date: Sun, 22 Sep 2019 18:02:44 +0000 Subject: [issue38254] Pickle not deserializing an OSError exception as expected Message-ID: <1569175364.49.0.370257231179.issue38254@roundup.psfhosted.org> New submission from David Parks : Below is a minimum reproducible test case of what appears to be an issue in pickle. Before pickling the exception ClientConnectionError, from aiohttp, the property ClientConnectionError._os_error is a PermissionError object (a subclass of OSError). After deserialization ClientConnectionError._os_error appears to be a string based on the exception that is produced. I'm not familiar enough with pickle to make much headway here. ``` import aiohttp import pickle connection_key = aiohttp.client_reqrep.ConnectionKey ose = OSError(1, 'unittest') cce = aiohttp.client_exceptions.ClientConnectorError(connection_key, ose) cce_pickled = pickle.dumps(cce) pickle.loads(cce_pickled) ``` ``` Traceback (most recent call last): File "/opt/.pycharm_helpers/pydev/pydevd.py", line 1758, in main() File "/opt/.pycharm_helpers/pydev/pydevd.py", line 1752, in main globals = debugger.run(setup['file'], None, None, is_module) File "/opt/.pycharm_helpers/pydev/pydevd.py", line 1147, in run pydev_imports.execfile(file, globals, locals) # execute the script File "/opt/.pycharm_helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "/project_neural_mouse/src/ARCHIVE/scratch/scratch_13.py", line 11, in File "/usr/local/lib/python3.6/dist-packages/aiohttp/client_exceptions.py", line 133, in __init__ super().__init__(os_error.errno, os_error.strerror) AttributeError: 'str' object has no attribute 'errno' ``` ---------- components: Library (Lib) messages: 352985 nosy: davidparks21 priority: normal severity: normal status: open title: Pickle not deserializing an OSError exception as expected type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 14:06:29 2019 From: report at bugs.python.org (David Parks) Date: Sun, 22 Sep 2019 18:06:29 +0000 Subject: [issue38254] Pickle not deserializing an aiohttp ClientConnectorError exception as expected In-Reply-To: <1569175364.49.0.370257231179.issue38254@roundup.psfhosted.org> Message-ID: <1569175589.0.0.485000956393.issue38254@roundup.psfhosted.org> Change by David Parks : ---------- title: Pickle not deserializing an OSError exception as expected -> Pickle not deserializing an aiohttp ClientConnectorError exception as expected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 14:19:11 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 22 Sep 2019 18:19:11 +0000 Subject: [issue38172] Python 3.8 Segfult with Bandersnatch pytest Suite In-Reply-To: <1568472460.87.0.817204992487.issue38172@roundup.psfhosted.org> Message-ID: <1569176351.89.0.379350049314.issue38172@roundup.psfhosted.org> Terry J. Reedy added the comment: Victor, am I correct in thinking that this should be closed as either intermittent, lacking in sufficient information for us to do anything, or possibly a 3rd party issue? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 14:43:29 2019 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 22 Sep 2019 18:43:29 +0000 Subject: [issue38248] inconsistency in asyncio.Task between cancellation while running vs. cancellation immediately after it finishes In-Reply-To: <1569141924.07.0.413373545347.issue38248@roundup.psfhosted.org> Message-ID: <1569177809.46.0.0044138766091.issue38248@roundup.psfhosted.org> Yury Selivanov added the comment: > The obvious fix would be to modify the 'except StopIteration' branch to handle this case by calling super().cancel() instead of super().set_exception(...). Yeah, I think this is the solution we should do in 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 16:07:36 2019 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 22 Sep 2019 20:07:36 +0000 Subject: [issue38248] inconsistency in asyncio.Task between cancellation while running vs. cancellation immediately after it finishes In-Reply-To: <1569141924.07.0.413373545347.issue38248@roundup.psfhosted.org> Message-ID: <1569182856.16.0.179384826271.issue38248@roundup.psfhosted.org> Change by Yury Selivanov : ---------- keywords: +patch pull_requests: +15907 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16330 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 16:35:03 2019 From: report at bugs.python.org (Ned Deily) Date: Sun, 22 Sep 2019 20:35:03 +0000 Subject: [issue38216] Fix for issue30458 (HTTP Header Injection) prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1569184503.79.0.682131220009.issue38216@roundup.psfhosted.org> Ned Deily added the comment: I am certainly not a domain expert but, at a high level, I think the approach in PR 16321 is a reasonable compromise and I would support merging it to 3.7 and 3.6 (I'll let Larry and Benjamin speak for 3.5 and 2.7) assuming there are no review objections. Since we seem to be getting close to a comprehensive solution here, I am going to hold off on tagging 3.7.5r1 for a few more days in the hopes we can reach agreement on this approach. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 18:15:46 2019 From: report at bugs.python.org (Steve Dower) Date: Sun, 22 Sep 2019 22:15:46 +0000 Subject: [issue38251] urllib.request memory leak / overflow In-Reply-To: <1569151788.73.0.0306600169217.issue38251@roundup.psfhosted.org> Message-ID: <1569190546.94.0.576774761194.issue38251@roundup.psfhosted.org> Steve Dower added the comment: Closing as a duplicate of issue35941 ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> ssl.enum_certificates() regression _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 22 21:33:24 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 23 Sep 2019 01:33:24 +0000 Subject: [issue38216] Fix for issue30458 (HTTP Header Injection) prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1569202404.35.0.299198299723.issue38216@roundup.psfhosted.org> Ned Deily added the comment: Also, besides the normal news entry (via blurb), there should probably be a "Notable changes in x.y.z" entry added to the end of each affected release's Doc/whatsnew/x.y.rst file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 03:04:42 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Mon, 23 Sep 2019 07:04:42 +0000 Subject: [issue38255] Replace "method" with "attribute" in the description of super() Message-ID: <1569222282.28.0.777862000618.issue38255@roundup.psfhosted.org> New submission from G?ry : The description of `super()` uses the word "method" instead of the more general word "attribute". > super([type[, object-or-type]]) > Return a proxy object that delegates method calls to a parent or sibling class of *type*. This is useful for accessing inherited methods that have been overridden in a class. `super()` is not restricted to method access but can also do data attribute access: ``` >>> class A: ... x = True ... >>> class B(A): ... x = False ... >>> B().x False >>> super(B, B()).x True ``` I have just opened a PR to address this issue. ---------- assignee: docs at python components: Documentation messages: 352991 nosy: docs at python, maggyero, rhettinger priority: normal pull_requests: 15908 severity: normal status: open title: Replace "method" with "attribute" in the description of super() type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 03:48:21 2019 From: report at bugs.python.org (marko kreen) Date: Mon, 23 Sep 2019 07:48:21 +0000 Subject: [issue38256] binascii.crc32 is not 64-bit clean Message-ID: <1569224901.03.0.176047397678.issue38256@roundup.psfhosted.org> New submission from marko kreen : Following code: ---------------------------- import binascii, zlib bigdata=memoryview(bytearray((1<<32) + 100)) print(binascii.crc32(bigdata)) crc = binascii.crc32(bigdata[:1000]) crc = binascii.crc32(bigdata[1000:], crc) print(crc) print(zlib.crc32(bigdata)) crc = zlib.crc32(bigdata[:1000]) crc = zlib.crc32(bigdata[1000:], crc) print(crc) --------------------------- Outputs with python3.7 $ python3.7 x.py 2575877834 2838121701 2838121701 2838121701 ---------- components: Library (Lib) messages: 352992 nosy: zmk priority: normal severity: normal status: open title: binascii.crc32 is not 64-bit clean type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 04:01:35 2019 From: report at bugs.python.org (=?utf-8?b?0JDQu9C10LrRgdCw0L3QtNGAINCh0LXQvNC10L3QvtCy?=) Date: Mon, 23 Sep 2019 08:01:35 +0000 Subject: [issue38256] binascii.crc32 is not 64-bit clean In-Reply-To: <1569224901.03.0.176047397678.issue38256@roundup.psfhosted.org> Message-ID: <1569225695.33.0.0766072434189.issue38256@roundup.psfhosted.org> ????????? ??????? added the comment: I've got Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)] 2838121701 2838121701 2838121701 2838121701 ---------- nosy: +iamsav _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 04:16:36 2019 From: report at bugs.python.org (marko kreen) Date: Mon, 23 Sep 2019 08:16:36 +0000 Subject: [issue38256] binascii.crc32 is not 64-bit clean In-Reply-To: <1569224901.03.0.176047397678.issue38256@roundup.psfhosted.org> Message-ID: <1569226596.44.0.613443825256.issue38256@roundup.psfhosted.org> marko kreen added the comment: Looking at the code, the bug is dependant on USE_ZLIB_CRC32 define and it's unfixed in master. Cause is zlib crc32 that takes length as integer, zlibmodule has workaround, binascii has not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 04:49:04 2019 From: report at bugs.python.org (marko kreen) Date: Mon, 23 Sep 2019 08:49:04 +0000 Subject: [issue38256] binascii.crc32 is not 64-bit clean In-Reply-To: <1569224901.03.0.176047397678.issue38256@roundup.psfhosted.org> Message-ID: <1569228544.52.0.354767820673.issue38256@roundup.psfhosted.org> marko kreen added the comment: Found zlibmodule fix: https://bugs.python.org/issue10276 ---------- versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 05:17:07 2019 From: report at bugs.python.org (hongweipeng) Date: Mon, 23 Sep 2019 09:17:07 +0000 Subject: [issue38251] urllib.request memory leak / overflow In-Reply-To: <1569151788.73.0.0306600169217.issue38251@roundup.psfhosted.org> Message-ID: <1569230227.83.0.650191270041.issue38251@roundup.psfhosted.org> hongweipeng added the comment: My Windows 10 (64bit). There is no such problem in 3.6.1, but 3.7.0 has. And when requesting `http://...`, both of them are normal. By the way, the related issues are all closed, is it supposed to reopen one? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 05:18:28 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Sep 2019 09:18:28 +0000 Subject: [issue38256] binascii.crc32 is not 64-bit clean In-Reply-To: <1569224901.03.0.176047397678.issue38256@roundup.psfhosted.org> Message-ID: <1569230308.89.0.0269318838777.issue38256@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +nadeem.vawda _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 05:22:27 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Sep 2019 09:22:27 +0000 Subject: [issue38254] Pickle not deserializing an aiohttp ClientConnectorError exception as expected In-Reply-To: <1569175364.49.0.370257231179.issue38254@roundup.psfhosted.org> Message-ID: <1569230547.84.0.162898843458.issue38254@roundup.psfhosted.org> Serhiy Storchaka added the comment: aiohttp is not the part of the standard Python library. Please use an appropriate bug tracker for reporting this issue. ---------- nosy: +serhiy.storchaka resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 05:24:12 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Sep 2019 09:24:12 +0000 Subject: [issue38252] micro-optimize ucs1lib_find_max_char in Windows 64-bit build In-Reply-To: <1569153002.15.0.915285235862.issue38252@roundup.psfhosted.org> Message-ID: <1569230652.29.0.949208574549.issue38252@roundup.psfhosted.org> Serhiy Storchaka added the comment: This looks like a good idea. Do you mind to create a PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 05:25:25 2019 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 23 Sep 2019 09:25:25 +0000 Subject: [issue36587] race in logging code when fork() In-Reply-To: <1554905678.69.0.300642105392.issue36587@roundup.psfhosted.org> Message-ID: <1569230725.86.0.163961885607.issue36587@roundup.psfhosted.org> Vinay Sajip added the comment: Is this issue still valid, or should it be closed as out of date? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 05:58:54 2019 From: report at bugs.python.org (Ofer Sadan) Date: Mon, 23 Sep 2019 09:58:54 +0000 Subject: [issue38251] urllib.request memory leak / overflow In-Reply-To: <1569151788.73.0.0306600169217.issue38251@roundup.psfhosted.org> Message-ID: <1569232734.55.0.780370168006.issue38251@roundup.psfhosted.org> Ofer Sadan added the comment: I can confirm that testing with http instead of https this problem doesn't exist, on 3.7.4. Are the issues closed because this problem is fixed in the upcoming 3.7.5, or 3.8.0? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 06:00:07 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 23 Sep 2019 10:00:07 +0000 Subject: [issue38216] Fix for issue30458 (HTTP Header Injection) prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1569232807.8.0.872076353495.issue38216@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: If I understand PR 16321 correctly it has a private hook to bypass validating invalid bytes in URL added in 3.7.4 and also has the fix to accept non-ascii values which is a regression from 2.7 to 3.0 . Will the latter to accept non-ascii values also be merged to security branches too given that it predates the security issue addressed ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 06:05:19 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Sep 2019 10:05:19 +0000 Subject: [issue36947] [Good first issue] Fix 3.3.3.1 Metaclasses Documentation In-Reply-To: <1558103271.07.0.643884881507.issue36947@roundup.psfhosted.org> Message-ID: <1569233119.1.0.704918443402.issue36947@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is not good first issue. The referred documentation is complex and needs deep knowledge of Python for changing. The original report was wrong. The original documentation is correct. Josh, do you think the documentation needs other changes, and if yes, do you mind to create a PR? If no, I am inclined to close this issue. ---------- keywords: -easy, patch nosy: +serhiy.storchaka status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 06:05:32 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Sep 2019 10:05:32 +0000 Subject: [issue36947] Fix 3.3.3.1 Metaclasses Documentation In-Reply-To: <1558103271.07.0.643884881507.issue36947@roundup.psfhosted.org> Message-ID: <1569233132.87.0.729569529568.issue36947@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- status: pending -> open title: [Good first issue] Fix 3.3.3.1 Metaclasses Documentation -> Fix 3.3.3.1 Metaclasses Documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 06:13:03 2019 From: report at bugs.python.org (Andrei Troie) Date: Mon, 23 Sep 2019 10:13:03 +0000 Subject: [issue38232] empty local-part in addr_spec displayed incorrectly In-Reply-To: <1568990050.48.0.808924350002.issue38232@roundup.psfhosted.org> Message-ID: <1569233583.03.0.660629818712.issue38232@roundup.psfhosted.org> Andrei Troie added the comment: As far as I understand it, this is due to the following code in email.headerregistry.Address.addr_spec (in 3.8 and below): if len(nameset) > len(nameset-parser.DOT_ATOM_ENDS): lp = parser.quote_string(self.username) or, in the current version on master: lp = self.username if not parser.DOT_ATOM_ENDS.isdisjoint(lp): lp = parser.quote_string(lp) Both of these tests will not work with the empty string since the empty string is always disjoint from anything, so it will never get quoted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 06:18:40 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Sep 2019 10:18:40 +0000 Subject: [issue38241] Pickle with protocol=0 in python 3 does not produce a 'human-readable' format In-Reply-To: <1569019992.12.0.181360535458.issue38241@roundup.psfhosted.org> Message-ID: <1569233920.8.0.98752165689.issue38241@roundup.psfhosted.org> Serhiy Storchaka added the comment: Protocol 0 was initially ASCII, but it was changed since adding support for the unicode type (and bytearray uses the unicode representation for compatibility with Python 3). It is Latin1 now. And still mostly human-readable (except that some control characters in Unicode strings can be invisible on your terminal). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 06:25:50 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 23 Sep 2019 10:25:50 +0000 Subject: [issue38251] urllib.request memory leak / overflow In-Reply-To: <1569151788.73.0.0306600169217.issue38251@roundup.psfhosted.org> Message-ID: <1569234350.18.0.926533894685.issue38251@roundup.psfhosted.org> Christian Heimes added the comment: Yes, the problem will be fixed by 3.7.5. In the mean time you can work around the issue by creating a single SSLContext object with ssl.create_default_context() and reusing it for all requests. It's also much more efficient to reuse a single context for all requests. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 06:34:31 2019 From: report at bugs.python.org (Ofer Sadan) Date: Mon, 23 Sep 2019 10:34:31 +0000 Subject: [issue38251] urllib.request memory leak / overflow In-Reply-To: <1569151788.73.0.0306600169217.issue38251@roundup.psfhosted.org> Message-ID: <1569234871.75.0.911927507557.issue38251@roundup.psfhosted.org> Ofer Sadan added the comment: I appreciate the suggestion and the update, thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 06:46:18 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 23 Sep 2019 10:46:18 +0000 Subject: [issue38232] empty local-part in addr_spec displayed incorrectly In-Reply-To: <1568990050.48.0.808924350002.issue38232@roundup.psfhosted.org> Message-ID: <1569235578.44.0.90158382556.issue38232@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +maxking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 06:50:05 2019 From: report at bugs.python.org (Ma Lin) Date: Mon, 23 Sep 2019 10:50:05 +0000 Subject: [issue38252] micro-optimize ucs1lib_find_max_char in Windows 64-bit build In-Reply-To: <1569153002.15.0.915285235862.issue38252@roundup.psfhosted.org> Message-ID: <1569235805.86.0.133922792336.issue38252@roundup.psfhosted.org> Ma Lin added the comment: Maybe @sir-sigurd can find more optimizations. FYI, `_Py_bytes_isascii()` function [1] also has similar code. [1] https://github.com/python/cpython/blob/v3.8.0b4/Objects/bytes_methods.c#L104 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 06:58:24 2019 From: report at bugs.python.org (Christian Heimes) Date: Mon, 23 Sep 2019 10:58:24 +0000 Subject: [issue38238] site.py reporting user site info even if ENABLE_USER_SITE=False In-Reply-To: <1569008075.72.0.976020458298.issue38238@roundup.psfhosted.org> Message-ID: <1569236304.69.0.207747056323.issue38238@roundup.psfhosted.org> Christian Heimes added the comment: getusersitepackages() and getuserbase() don't take ENABLE_USER_SITE into account. The function simply return the location of the user site-package directory independently of the value of ENABLE_USER_SITE. The check for ENABLE_USER_SITE and modification of sys.path occurs later. The design allows applications to get the hypothetical path for user site-packages independently from the ENABLE_USER_SITE flag. The API is mature, old, and around since Python 2.6. We can't change it without breaking backwards compatibility. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 07:48:50 2019 From: report at bugs.python.org (SivaKumar NSK) Date: Mon, 23 Sep 2019 11:48:50 +0000 Subject: [issue38257] __pycache__ directory with World writable permission Message-ID: <1569239330.58.0.427836280782.issue38257@roundup.psfhosted.org> New submission from SivaKumar NSK : Hello All, I am having some python script, which will be loaded when I run lpinfo -v in Manjaro Linux Distro (18.0.4) which has Python 3.7 , it is creating _pycache__ directory with full permission, not root user can edit those file. May i know on what basis the permission of the __pycache__ directory has been decided. Thanks in advance. ---------- messages: 353009 nosy: SivaKumar NSK priority: normal severity: normal status: open title: __pycache__ directory with World writable permission versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 08:22:45 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 12:22:45 +0000 Subject: [issue38184] [2.7] test_site: test_s_option() failed on AMD64 Fedora Rawhide Refleaks 2.7 In-Reply-To: <1568620069.59.0.0713376910256.issue38184@roundup.psfhosted.org> Message-ID: <1569241365.45.0.891401551943.issue38184@roundup.psfhosted.org> STINNER Victor added the comment: Same error on AMD64 Fedora Stable Refleaks 2.7: https://buildbot.python.org/all/#/builders/291/builds/2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 08:23:58 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 12:23:58 +0000 Subject: [issue38184] test_site: test_s_option() failed on AMD64 Fedora Rawhide Refleaks 2.7 and AMD64 Fedora Stable Refleaks 3.7 In-Reply-To: <1568620069.59.0.0713376910256.issue38184@roundup.psfhosted.org> Message-ID: <1569241438.9.0.706935193199.issue38184@roundup.psfhosted.org> STINNER Victor added the comment: Fail on AMD64 Fedora Stable Refleaks 3.7: https://buildbot.python.org/all/#/builders/261/builds/2 FAIL: test_s_option (test.test_site.HelperFunctionsTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/3.7.cstratak-fedora-stable-x86_64.refleak/build/Lib/test/test_site.py", line 204, in test_s_option self.assertIn(usersite, sys.path) AssertionError: '/home/buildbot/.local/lib/python3.7/site-packages' not found in ['/home/buildbot/buildarea/3.7.cstratak-fedora-stable-x86_64.refleak/build', '/home/buildbot/buildarea/3.7.cstratak-fedora-stable-x86_64.refleak/build/target/lib/python37.zip', '/home/buildbot/buildarea/3.7.cstratak-fedora-stable-x86_64.refleak/build/Lib', '/home/buildbot/buildarea/3.7.cstratak-fedora-stable-x86_64.refleak/build/build/lib.linux-x86_64-3.7-pydebug'] ---------- title: [2.7] test_site: test_s_option() failed on AMD64 Fedora Rawhide Refleaks 2.7 -> test_site: test_s_option() failed on AMD64 Fedora Rawhide Refleaks 2.7 and AMD64 Fedora Stable Refleaks 3.7 versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 08:25:34 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 12:25:34 +0000 Subject: [issue38239] test_gdb fails on AMD64 Fedora Stable LTO 3.8 and AMD64 RHEL8 LTO 3.x: Unexpected gdb output In-Reply-To: <1569015160.3.0.923927814388.issue38239@roundup.psfhosted.org> Message-ID: <1569241534.96.0.543519306003.issue38239@roundup.psfhosted.org> STINNER Victor added the comment: AMD64 Fedora Stable LTO + PGO 3.7 is also affected: https://buildbot.python.org/all/#/builders/252/builds/2 And AMD64 Fedora Stable LTO 3.7: https://buildbot.python.org/all/#/builders/270/builds/2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 08:46:03 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 12:46:03 +0000 Subject: [issue38236] Dump the Python path configuration at the first import error In-Reply-To: <1568997895.56.0.760570797029.issue38236@roundup.psfhosted.org> Message-ID: <1569242763.58.0.92575840967.issue38236@roundup.psfhosted.org> STINNER Victor added the comment: New changeset fcdb027234566c4d506d6d753c7d5638490fb088 by Victor Stinner in branch 'master': bpo-38236: Dump path config at first import error (GH-16300) https://github.com/python/cpython/commit/fcdb027234566c4d506d6d753c7d5638490fb088 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 08:57:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 12:57:52 +0000 Subject: [issue38236] Dump the Python path configuration at the first import error In-Reply-To: <1568997895.56.0.760570797029.issue38236@roundup.psfhosted.org> Message-ID: <1569243472.84.0.86353447104.issue38236@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15909 pull_request: https://github.com/python/cpython/pull/16332 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 09:13:40 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 13:13:40 +0000 Subject: [issue38236] Dump the Python path configuration at the first import error In-Reply-To: <1568997895.56.0.760570797029.issue38236@roundup.psfhosted.org> Message-ID: <1569244420.71.0.477157735725.issue38236@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15910 pull_request: https://github.com/python/cpython/pull/16333 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 09:29:28 2019 From: report at bugs.python.org (Nicholas Neumann) Date: Mon, 23 Sep 2019 13:29:28 +0000 Subject: [issue38241] Pickle with protocol=0 in python 3 does not produce a 'human-readable' format In-Reply-To: <1569019992.12.0.181360535458.issue38241@roundup.psfhosted.org> Message-ID: <1569245368.74.0.155711207509.issue38241@roundup.psfhosted.org> Nicholas Neumann added the comment: Apologies as I'm not super-familiar with Latin1 or how Python refers to Latin1, but it seems a little odd to even call it Latin1. It can be decoded as Latin1, but it can contain every possible byte, including 0x7f through 0x9f, which aren't really Latin1. It is human readable when pickling certain data types, but when others are involved, it sure seems like binary to me. I think that is fine, and perhaps all that needs to be done is to update the documentation to say something like: "Protocol level 0 is the original pickling format. It is the default for Python 2 and is now a binary format; it originally was an ASCII format but this ceased to be true as support for new datatypes was added to Python." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 09:30:30 2019 From: report at bugs.python.org (Ma Lin) Date: Mon, 23 Sep 2019 13:30:30 +0000 Subject: [issue38252] micro-optimize ucs1lib_find_max_char in Windows 64-bit build In-Reply-To: <1569153002.15.0.915285235862.issue38252@roundup.psfhosted.org> Message-ID: <1569245430.97.0.153052556212.issue38252@roundup.psfhosted.org> Change by Ma Lin : ---------- keywords: +patch pull_requests: +15911 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16334 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 09:36:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 13:36:00 +0000 Subject: [issue38236] Dump the Python path configuration at the first import error In-Reply-To: <1568997895.56.0.760570797029.issue38236@roundup.psfhosted.org> Message-ID: <1569245760.1.0.660556396655.issue38236@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 88e6447451fb5525e83e802c66c3e51b4a45bf86 by Victor Stinner in branch 'master': bpo-38236: Fix init_dump_ascii_wstr() (GH-16333) https://github.com/python/cpython/commit/88e6447451fb5525e83e802c66c3e51b4a45bf86 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 09:59:08 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 13:59:08 +0000 Subject: [issue38236] Dump the Python path configuration at the first import error In-Reply-To: <1568997895.56.0.760570797029.issue38236@roundup.psfhosted.org> Message-ID: <1569247148.15.0.537567560418.issue38236@roundup.psfhosted.org> STINNER Victor added the comment: New changeset c5c642565e260477ae2fb29d0c86a91e19702ae3 by Victor Stinner in branch '3.8': bpo-38236: Dump path config at first import error (GH-16300) (GH-16332) https://github.com/python/cpython/commit/c5c642565e260477ae2fb29d0c86a91e19702ae3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 10:00:13 2019 From: report at bugs.python.org (Ma Lin) Date: Mon, 23 Sep 2019 14:00:13 +0000 Subject: [issue38252] Use 8-byte step to detect ASCII sequence in 64bit Windows builds In-Reply-To: <1569153002.15.0.915285235862.issue38252@roundup.psfhosted.org> Message-ID: <1569247213.66.0.109641859134.issue38252@roundup.psfhosted.org> Change by Ma Lin : ---------- title: micro-optimize ucs1lib_find_max_char in Windows 64-bit build -> Use 8-byte step to detect ASCII sequence in 64bit Windows builds _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 10:01:26 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 14:01:26 +0000 Subject: [issue38236] Dump the Python path configuration at the first import error In-Reply-To: <1568997895.56.0.760570797029.issue38236@roundup.psfhosted.org> Message-ID: <1569247286.24.0.828953396219.issue38236@roundup.psfhosted.org> STINNER Victor added the comment: I backported my change to Python 3.8. Example with PYTHONPATH set to Python 2.7 with Python 3.8: $ PYTHONPATH=/usr/lib64/python2.7/ ./python -c pass Python path configuration: PYTHONHOME = (not set) PYTHONPATH = '/usr/lib64/python2.7/' program name = './python' isolated = 0 environment = 1 user site = 1 import site = 1 sys._base_executable = '/home/vstinner/python/3.8/python' sys.base_prefix = '/usr/local' sys.base_exec_prefix = '/usr/local' sys.executable = '/home/vstinner/python/3.8/python' sys.prefix = '/usr/local' sys.exec_prefix = '/usr/local' sys.path = [ '/usr/lib64/python2.7/', '/usr/local/lib/python38.zip', '/home/vstinner/python/3.8/Lib', '/home/vstinner/python/3.8/build/lib.linux-x86_64-3.8-pydebug', ] Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding Python runtime state: core initialized File "/usr/lib64/python2.7/encodings/__init__.py", line 123 raise CodecRegistryError,\ ^ SyntaxError: invalid syntax Current thread 0x00007fe3ade4d740 (most recent call first): ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 10:01:37 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 14:01:37 +0000 Subject: [issue38236] Dump the Python path configuration at the first import error In-Reply-To: <1568997895.56.0.760570797029.issue38236@roundup.psfhosted.org> Message-ID: <1569247297.32.0.505055919752.issue38236@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 10:31:53 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 14:31:53 +0000 Subject: [issue38172] Python 3.8 Segfult with Bandersnatch pytest Suite In-Reply-To: <1568472460.87.0.817204992487.issue38172@roundup.psfhosted.org> Message-ID: <1569249113.84.0.0835951809235.issue38172@roundup.psfhosted.org> STINNER Victor added the comment: The Travis CI job contains the Python traceback where the bug occurs. It seems like the crash occurs at multidict/__init__.py:23 which imports multidict._multidict which is a C extension. > Full failure on Travis CI: https://travis-ci.org/pypa/bandersnatch/jobs/584973434 $ pip --version pip 19.2.3 from /home/travis/virtualenv/python3.8-dev/lib/python3.8/site-packages/pip (python 3.8) install.1 1.02s$ pip install --upgrade pip setuptools install.2 4.44s$ pip install -r requirements.txt -r requirements_test.txt install.3 1.48s$ pip install . 12.98s$ python test_runner.py GLOB sdist-make: /home/travis/build/pypa/bandersnatch/setup.py py38 create: /home/travis/build/pypa/bandersnatch/.tox/py38 py38 installdeps: -rrequirements_test.txt py38 inst: /home/travis/build/pypa/bandersnatch/.tox/.tmp/package/1/bandersnatch-3.4.1.zip py38 installed: aiohttp==3.6.0,apipkg==1.5,appdirs==1.4.3,async-timeout==3.0.1,atomicwrites==1.3.0,attrs==19.1.0,bandersnatch==3.4.1,black==19.3b0,certifi==2019.9.11,chardet==3.0.4,Click==7.0,codecov==2.0.15,coverage==4.5.4,execnet==1.7.1,filelock==3.0.12,freezegun==0.3.12,idna==2.8,more-itertools==7.2.0,multidict==4.5.2,packaging==19.1,pluggy==0.13.0,py==1.8.0,pyparsing==2.4.2,pytest==5.1.2,pytest-cache==1.0,pytest-timeout==1.3.3,python-dateutil==2.8.0,requests==2.22.0,six==1.12.0,toml==0.10.0,tox==3.14.0,urllib3==1.25.3,virtualenv==16.7.5,wcwidth==0.1.7,xmlrpc2==0.3.1,yarl==1.3.0 py38 run-test-pre: PYTHONHASHSEED='690490585' py38 run-test: commands[0] | coverage run -m pytest ============================= test session starts ============================== platform linux -- Python 3.8.0b4+, pytest-5.1.2, py-1.8.0, pluggy-0.13.0 cachedir: .tox/py38/.pytest_cache rootdir: /home/travis/build/pypa/bandersnatch, inifile: pytest.ini plugins: timeout-1.3.3 Fatal Python error: Segmentation fault Current thread 0x00007fabb284a700 (most recent call first): File "", line 219 in _call_with_frames_removed File "", line 1109 in exec_module File "", line 671 in _load_unlocked File "", line 975 in _find_and_load_unlocked File "", line 991 in _find_and_load File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/multidict/__init__.py", line 23 in File "", line 219 in _call_with_frames_removed File "", line 783 in exec_module File "", line 671 in _load_unlocked File "", line 975 in _find_and_load_unlocked File "", line 991 in _find_and_load File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/aiohttp/hdrs.py", line 6 in File "", line 219 in _call_with_frames_removed File "", line 783 in exec_module File "", line 671 in _load_unlocked File "", line 975 in _find_and_load_unlocked File "", line 991 in _find_and_load File "", line 219 in _call_with_frames_removed File "", line 1042 in _handle_fromlist File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/aiohttp/__init__.py", line 5 in File "", line 219 in _call_with_frames_removed File "", line 783 in exec_module File "", line 671 in _load_unlocked File "", line 975 in _find_and_load_unlocked File "", line 991 in _find_and_load File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/bandersnatch/verify.py", line 14 in File "", line 219 in _call_with_frames_removed File "", line 783 in exec_module File "", line 671 in _load_unlocked File "", line 975 in _find_and_load_unlocked File "", line 991 in _find_and_load File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/bandersnatch/main.py", line 17 in File "", line 219 in _call_with_frames_removed File "", line 783 in exec_module File "", line 671 in _load_unlocked File "", line 975 in _find_and_load_unlocked File "", line 991 in _find_and_load File "/home/travis/build/pypa/bandersnatch/src/bandersnatch/tests/test_main.py", line 10 in File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/_pytest/assertion/rewrite.py", line 140 in exec_module File "", line 671 in _load_unlocked File "", line 975 in _find_and_load_unlocked File "", line 991 in _find_and_load File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/py/_path/local.py", line 701 in pyimport File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/_pytest/python.py", line 501 in _importtestmodule File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/_pytest/python.py", line 433 in _getobj File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/_pytest/python.py", line 256 in obj File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/_pytest/python.py", line 449 in _inject_setup_module_fixture File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/_pytest/python.py", line 436 in collect File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/_pytest/runner.py", line 247 in File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/_pytest/runner.py", line 220 in from_call File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/_pytest/runner.py", line 247 in pytest_make_collect_report File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/pluggy/callers.py", line 187 in _multicall File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/pluggy/manager.py", line 83 in File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/pluggy/manager.py", line 92 in _hookexec File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/pluggy/hooks.py", line 286 in __call__ File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/_pytest/runner.py", line 363 in collect_one_node File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/_pytest/main.py", line 701 in genitems File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/_pytest/main.py", line 476 in _perform_collect File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/_pytest/main.py", line 437 in perform_collect File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/_pytest/main.py", line 244 in pytest_collection File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/pluggy/callers.py", line 187 in _multicall File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/pluggy/manager.py", line 83 in File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/pluggy/manager.py", line 92 in _hookexec File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/pluggy/hooks.py", line 286 in __call__ File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/_pytest/main.py", line 234 in _main File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/_pytest/main.py", line 191 in wrap_session File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/_pytest/main.py", line 228 in pytest_cmdline_main File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/pluggy/callers.py", line 187 in _multicall File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/pluggy/manager.py", line 83 in File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/pluggy/manager.py", line 92 in _hookexec File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/pluggy/hooks.py", line 286 in __call__ File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/_pytest/config/__init__.py", line 78 in main File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/pytest.py", line 101 in File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/coverage/execfile.py", line 192 in run_python_file File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/coverage/execfile.py", line 122 in run_python_module File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/coverage/cmdline.py", line 627 in do_run File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/coverage/cmdline.py", line 491 in command_line File "/home/travis/build/pypa/bandersnatch/.tox/py38/lib/python3.8/site-packages/coverage/cmdline.py", line 756 in main File "/home/travis/build/pypa/bandersnatch/.tox/py38/bin/coverage", line 10 in ERROR: InvocationError for command /home/travis/build/pypa/bandersnatch/.tox/py38/bin/coverage run -m pytest (exited with code -11) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 10:33:10 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 14:33:10 +0000 Subject: [issue38172] Python 3.8 Segfult with Bandersnatch pytest Suite In-Reply-To: <1568472460.87.0.817204992487.issue38172@roundup.psfhosted.org> Message-ID: <1569249190.33.0.638431844895.issue38172@roundup.psfhosted.org> STINNER Victor added the comment: > Victor, am I correct in thinking that this should be closed as either intermittent, lacking in sufficient information for us to do anything, or possibly a 3rd party issue? It can be a Python 3.8 or a bug in third party code. I suggest to attempt to reproduce the bug in gdb to collect more info about this crash. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 10:34:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 14:34:21 +0000 Subject: [issue38239] test_gdb fails on AMD64 Fedora Stable LTO 3.8 and AMD64 RHEL8 LTO 3.x: Unexpected gdb output In-Reply-To: <1569015160.3.0.923927814388.issue38239@roundup.psfhosted.org> Message-ID: <1569249261.44.0.91130076351.issue38239@roundup.psfhosted.org> STINNER Victor added the comment: > builtid_id isn't in longobject.c, so this is incorrect debug information. The test expects to find it in bltinmodule.c: gdb may be confused by LTO. I'm not sure if how LTO works to debug symbols. > Shouldn't this test be suppressed on LTO builds? Maybe. I don't know. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 10:35:01 2019 From: report at bugs.python.org (Sebastian Ernst) Date: Mon, 23 Sep 2019 14:35:01 +0000 Subject: [issue38258] ctypes ignores when a DLL function is called with too many arguments Message-ID: <1569249301.19.0.433627246846.issue38258@roundup.psfhosted.org> New submission from Sebastian Ernst : A c-function with the following signature ... ```C int16_t __stdcall __declspec(dllimport) square_int( int16_t a ); ``` ... is being called with ctypes: ```python def test_error_callargs_unconfigured_too_many_args(): dll = ctypes.windll.LoadLibrary('tests/demo_dll.dll') square_int = dll.square_int with pytest.raises(ValueError): a = square_int(1, 2, 3) ``` Expected result: If the function is called with too many (positional) arguments (in the example 3 instead of 1), a `ValueError` should be raised. This is the case for at least CPython 3.4 to 3.7. Actual result: "Nothing", i.e. no exception. The described test "fails". The function is called without an error - with CPython 3.8.0b4. If this behavior is intended, is has not been (as far as I can tell) documented. ---------- components: ctypes messages: 353021 nosy: smernst priority: normal severity: normal status: open title: ctypes ignores when a DLL function is called with too many arguments type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 10:43:00 2019 From: report at bugs.python.org (Yair Bonastre) Date: Mon, 23 Sep 2019 14:43:00 +0000 Subject: [issue38259] There should be a PriorityQueue in multiprocessing module Message-ID: <1569249780.79.0.316857326171.issue38259@roundup.psfhosted.org> New submission from Yair Bonastre : In Python 3.7 queue module has Queue, LifoQueue, PriorityQueue, SimpleQueue types and in multiprocessing.queue has Queue, SimpleQueue, JoinableQueue. Why not adding PriorityQueue to multiprocessing.queue? Now the only way to do it is by making usage of SyncManager check the solution: https://stackoverflow.com/questions/25324560/strange-queue-priorityqueue-behaviour-with-multiprocessing-in-python-2-7-6?answertab=active#tab-top ---------- messages: 353022 nosy: Yair Bonastre priority: normal severity: normal status: open title: There should be a PriorityQueue in multiprocessing module type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 10:48:10 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 23 Sep 2019 14:48:10 +0000 Subject: [issue38239] test_gdb fails on AMD64 Fedora Stable LTO 3.8 and AMD64 RHEL8 LTO 3.x: Unexpected gdb output In-Reply-To: <1569015160.3.0.923927814388.issue38239@roundup.psfhosted.org> Message-ID: <1569250090.22.0.981404323871.issue38239@roundup.psfhosted.org> Steve Dower added the comment: Greg seems to have done LTO related things in the past, maybe he knows? (All my PGO contributions only apply to Windows :) ) ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 10:52:22 2019 From: report at bugs.python.org (Ma Lin) Date: Mon, 23 Sep 2019 14:52:22 +0000 Subject: [issue38252] Use 8-byte step to detect ASCII sequence in 64bit Windows builds In-Reply-To: <1569153002.15.0.915285235862.issue38252@roundup.psfhosted.org> Message-ID: <1569250342.98.0.649478345933.issue38252@roundup.psfhosted.org> Ma Lin added the comment: There are 4 functions have the similar code, see PR 16334. Just replaced the `unsigned long` type with `size_t` type, got these benchmarks. Can this be backported to 3.8 branch? 1. bytes.isascii() D:\dev\cpython\PCbuild\amd64\python.exe -m pyperf timeit -s "b = b'x' * 100_000_000; f = b.isascii;" "f()" +-----------+-----------+------------------------------+ | Benchmark | isascii_a | isascii_b | +===========+===========+==============================+ | timeit | 11.7 ms | 7.84 ms: 1.50x faster (-33%) | +-----------+-----------+------------------------------+ 2. bytes.decode('latin1') D:\dev\cpython\PCbuild\amd64\python.exe -m pyperf timeit -s "b = b'x' * 100_000_000; f = b.decode;" "f('latin1')" +-----------+----------+-----------------------------+ | Benchmark | latin1_a | latin1_b | +===========+==========+=============================+ | timeit | 60.3 ms | 57.4 ms: 1.05x faster (-5%) | +-----------+----------+-----------------------------+ 3. bytes.decode('ascii') D:\dev\cpython\PCbuild\amd64\python.exe -m pyperf timeit -s "b = b'x' * 100_000_000; f = b.decode;" "f('ascii')" +-----------+---------+-----------------------------+ | Benchmark | ascii_a | ascii_b | +===========+=========+=============================+ | timeit | 48.5 ms | 47.1 ms: 1.03x faster (-3%) | +-----------+---------+-----------------------------+ 4. bytes.decode('utf8') D:\dev\cpython\PCbuild\amd64\python.exe -m pyperf timeit -s "b = b'x' * 100_000_000; f = b.decode;" "f('utf8')" +-----------+---------+-----------------------------+ | Benchmark | utf8_a | utf8_b | +===========+=========+=============================+ | timeit | 48.3 ms | 47.1 ms: 1.03x faster (-3%) | +-----------+---------+-----------------------------+ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 10:56:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 14:56:18 +0000 Subject: [issue38249] Optimize out Py_UNREACHABLE in the release mode In-Reply-To: <1569145626.92.0.408422678201.issue38249@roundup.psfhosted.org> Message-ID: <1569250578.94.0.406425845331.issue38249@roundup.psfhosted.org> STINNER Victor added the comment: What does __builtin_unreachable()? Does it nothing? Call abort()? > Py_UNREACHABLE is used to indicate that a specific point in the program cannot be reached, even if the compiler might otherwise think it can. I disagree here. https://docs.python.org/dev/c-api/intro.html#c.Py_UNREACHABLE For me, it's not an issue with the compiler, but more about handling corner cases. Py_UNREACHABLE() is used in cases which "should not occur" but can technically occur if you pass invalid data, or in "very unlikely case". I looked at the Python code base. tracemalloc_realloc(): if (ADD_TRACE(ptr2, new_size) < 0) { /* Memory allocation failed. The error cannot be reported to the caller, because realloc() may already have shrunk the memory block and so removed bytes. This case is very unlikely: a hash entry has just been released, so the hash table should have at least one free entry. The GIL and the table lock ensures that only one thread is allocating memory. */ Py_UNREACHABLE(); } Technically, Py_UNREACHABLE() can be reached if there is very low available memory, but it "should not". dictobject.c: static Py_ssize_t lookdict_index(PyDictKeysObject *k, Py_hash_t hash, Py_ssize_t index) { size_t mask = DK_MASK(k); size_t perturb = (size_t)hash; size_t i = (size_t)hash & mask; for (;;) { Py_ssize_t ix = dictkeys_get_index(k, i); if (ix == index) { return i; } if (ix == DKIX_EMPTY) { return DKIX_EMPTY; } perturb >>= PERTURB_SHIFT; i = mask & (i*5 + perturb + 1); } Py_UNREACHABLE(); } Here it's unclear to me if this case can be reached or not. _PyLong_Format() calls Py_UNREACHABLE() if base is not in (2, 8, 16). long_bitwise() calls Py_UNREACHABLE() if op is not in ('&', '^', '|'). Technically, this case cannot occur, since it's static function which has exactly 3 call sites all with valid 'op'. This *very specific* case could use __builtin_unreachable(). pytime.c: _PyTime_t _PyTime_GetSystemClock(void) { _PyTime_t t; if (pygettimeofday(&t, NULL, 0) < 0) { /* should not happen, _PyTime_Init() checked the clock at startup */ Py_UNREACHABLE(); } return t; } _PyTime_t _PyTime_GetPerfCounter(void) { _PyTime_t t; if (_PyTime_GetPerfCounterWithInfo(&t, NULL)) { Py_UNREACHABLE(); } return t; } Clocks should not fail, but if they fail I would prefer to call Py_FatalError() to collect the traceback where the bug occurred. > This is exact the case for __builtin_unreachable in GCC and Clang. I propose to extend Py_UNREACHABLE() to __builtin_unreachable() in the release mode. This will allow the compiler to generate more efficient code. > > If there are circumstances in which Py_UNREACHABLE() is reachable, then it is improper use of Py_UNREACHABLE(). It should be replaced with raising an appropriate exception (like TypeError, ValueError, RuntimeError or SystemError) or, in extreme cases, with explicit Py_FatalError() If you consider that it's really worth it to optimize Py_UNREACHABLE(), I would prefer to have a new macro which is only used for compiler warnings: for cases which really "cannot happen". But it sounds hard to ensure that bugs cannot happen. I'm not sure that it's worth it to optimize Py_UNREACHABLE(). IMHO the current implementation is a good tradeoff between correctness and performance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 10:56:58 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 14:56:58 +0000 Subject: [issue38249] Optimize out Py_UNREACHABLE in the release mode In-Reply-To: <1569145626.92.0.408422678201.issue38249@roundup.psfhosted.org> Message-ID: <1569250618.89.0.520355890767.issue38249@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-38147. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 10:57:12 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 14:57:12 +0000 Subject: [issue38147] add Py_ASSUME() macro for __builtin_unreachable() In-Reply-To: <1568316863.5.0.507617055887.issue38147@roundup.psfhosted.org> Message-ID: <1569250632.57.0.958597035149.issue38147@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-38249. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 10:58:27 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 14:58:27 +0000 Subject: [issue38205] Py_UNREACHABLE() no longer behaves as a function call In-Reply-To: <1568758355.81.0.764131668398.issue38205@roundup.psfhosted.org> Message-ID: <1569250707.32.0.72770565782.issue38205@roundup.psfhosted.org> STINNER Victor added the comment: Serhiy created bpo-38249: "Optimize out Py_UNREACHABLE in the release mode". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 10:59:17 2019 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Mon, 23 Sep 2019 14:59:17 +0000 Subject: [issue38255] Replace "method" with "attribute" in the description of super() In-Reply-To: <1569222282.28.0.777862000618.issue38255@roundup.psfhosted.org> Message-ID: <1569250757.21.0.771341829835.issue38255@roundup.psfhosted.org> Change by Fred L. Drake, Jr. : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 10:59:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 14:59:21 +0000 Subject: [issue38249] Optimize out Py_UNREACHABLE in the release mode In-Reply-To: <1569145626.92.0.408422678201.issue38249@roundup.psfhosted.org> Message-ID: <1569250761.07.0.728331515728.issue38249@roundup.psfhosted.org> STINNER Victor added the comment: Ah, moreover, it's a public macro, so I would prefer to not change its behavior. I consider that modify the macro to call __builtin_unreachable() changes the behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 11:09:30 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 23 Sep 2019 15:09:30 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569251370.27.0.185837255669.issue38234@roundup.psfhosted.org> Steve Dower added the comment: Why are we keeping the DLL path around at all? It should only be being used in 1-2 places during path calculation. ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 11:10:41 2019 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Mon, 23 Sep 2019 15:10:41 +0000 Subject: [issue38255] Replace "method" with "attribute" in the description of super() In-Reply-To: <1569222282.28.0.777862000618.issue38255@roundup.psfhosted.org> Message-ID: <1569251441.07.0.921513635435.issue38255@roundup.psfhosted.org> Change by Fred L. Drake, Jr. : ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 11:16:44 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 15:16:44 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569251804.35.0.970102555779.issue38234@roundup.psfhosted.org> STINNER Victor added the comment: Steve: > Why are we keeping the DLL path around at all? It should only be being used in 1-2 places during path calculation. _PyPathConfig_Init() initializes _Py_dll_path global variable which is only used by _Py_CheckPython3(). _Py_CheckPython3() is called at each _PyImport_FindSharedFuncptrWindows() call which is used by _PyImport_LoadDynamicModuleWithSpec() (to import a .pyd extension). I tried to minimize my changes to fix the issue, I tried to leave _Py_CheckPython3() unchanged. But I made one change in _Py_CheckPython3(): it handles the case _Py_dll_path=NULL... which should never occur, but I wasn't 100% sure that it really can never occur. Python 3.6 (before my init work), _Py_CheckPython3() used "static wchar_t dllpath[MAXPATHLEN+1];": it was less important when dllpath is initialized. -- _PyPathConfig_Calculate() of PC/getpathp.c now uses a temporary variable which stores the result of _Py_GetDLLPath(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 11:28:17 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 23 Sep 2019 15:28:17 +0000 Subject: [issue38255] Replace "method" with "attribute" in the description of super() In-Reply-To: <1569222282.28.0.777862000618.issue38255@roundup.psfhosted.org> Message-ID: <1569252497.13.0.660432563154.issue38255@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 11:39:54 2019 From: report at bugs.python.org (Steve Dower) Date: Mon, 23 Sep 2019 15:39:54 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569253194.23.0.918470712473.issue38234@roundup.psfhosted.org> Steve Dower added the comment: > _PyPathConfig_Init() initializes _Py_dll_path global variable which is only used by _Py_CheckPython3(). Ah okay, maybe I'll take the time later on (in a separate issue) to get rid of it fully. We may as well load python3.dll at startup anyway, it's not expensive. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 11:40:12 2019 From: report at bugs.python.org (Luis E.) Date: Mon, 23 Sep 2019 15:40:12 +0000 Subject: [issue38260] asyncio.run documentation does not mention its return value Message-ID: <1569253212.87.0.131241104419.issue38260@roundup.psfhosted.org> New submission from Luis E. : The documentation for asyncio.run (https://docs.python.org/3/library/asyncio-task.html#asyncio.run) does not mention the function's return value or lack of one. Looking at the source, its clear it returns the passed coroutine's value via loop.run_until_complete, but the documentation or the provided example do not make it clear. ---------- assignee: docs at python components: Documentation, asyncio messages: 353033 nosy: asvetlov, docs at python, edd07, yselivanov priority: normal severity: normal status: open title: asyncio.run documentation does not mention its return value type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 11:55:22 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 15:55:22 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569254122.66.0.535571854601.issue38234@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15912 pull_request: https://github.com/python/cpython/pull/16335 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 12:12:35 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 16:12:35 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569255155.21.0.255256686198.issue38234@roundup.psfhosted.org> STINNER Victor added the comment: > When calling Py_SetPath(), the value that is passed in is ignored. Hum, in fact the bug was even worse: Py_SetPythonHome() and Py_SetProgramName() calls are also ignored. I'm not sure when I introduced these regressions. PR 16335 fix this bug as well. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 12:47:40 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 16:47:40 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569257260.7.0.442750646431.issue38234@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 9c42f8cda552694f3b47d6388d4ae84d61731872 by Victor Stinner in branch 'master': bpo-38234: Fix _PyConfig_InitPathConfig() (GH-16335) https://github.com/python/cpython/commit/9c42f8cda552694f3b47d6388d4ae84d61731872 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 12:58:33 2019 From: report at bugs.python.org (Eryk Sun) Date: Mon, 23 Sep 2019 16:58:33 +0000 Subject: [issue38258] ctypes ignores when a DLL function is called with too many arguments In-Reply-To: <1569249301.19.0.433627246846.issue38258@roundup.psfhosted.org> Message-ID: <1569257913.56.0.110975403866.issue38258@roundup.psfhosted.org> Eryk Sun added the comment: According to the docs, raising ValueError in this case has been a deprecated feature since 3.6.2, and the ability to do so no longer exists in 3.8. The documentation needs to be updated to reflect the new behavior. https://docs.python.org/3.8/library/ctypes.html#calling-functions In issue 35947, the customized libffi_msvc was replaced by standard libffi. ffi_call() in libffi_msvc returned a stack cleanup delta. This allowed raising ValueError in _call_function_pointer if the delta value was non-zero for an x86 32-bit stdcall function (callee cleanup). A positive delta implied too many arguments, and a negative delta implied too few arguments. The standard libffi ffi_call() has no return value, so the code for raising ValueError was removed. --- On a related note, PyCFuncPtr_call can be relaxed to allow the argument count to exceed the length of argtypes for x64 stdcall (but not x86). The 64-bit calling convention is the same for cdecl, stdcall, fastcall, and thiscall. It uses caller cleanup, like x86 cdecl, so we can skip raising TypeError in this case, just like we already do for cdecl. ---------- assignee: -> docs at python components: +Documentation, Windows nosy: +docs at python, eryksun, paul.moore, steve.dower, tim.golden, zach.ware stage: -> needs patch versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 13:04:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 17:04:13 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569258253.04.0.469617252866.issue38234@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15913 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/16336 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 13:27:28 2019 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 23 Sep 2019 17:27:28 +0000 Subject: [issue38260] asyncio.run documentation does not mention its return value In-Reply-To: <1569253212.87.0.131241104419.issue38260@roundup.psfhosted.org> Message-ID: <1569259648.85.0.439826529593.issue38260@roundup.psfhosted.org> Change by Yury Selivanov : ---------- nosy: +aeros167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 13:41:23 2019 From: report at bugs.python.org (Brett Cannon) Date: Mon, 23 Sep 2019 17:41:23 +0000 Subject: [issue15902] imp.load_module won't accept None for the file argument for a C extension In-Reply-To: <1347278689.78.0.295593798435.issue15902@psf.upfronthosting.co.za> Message-ID: <1569260483.23.0.862282371029.issue15902@roundup.psfhosted.org> Change by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 13:50:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 17:50:32 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569261032.61.0.448326349617.issue38234@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 3f5409a3f13c59baa34656bccefdc3728e46c9ef by Victor Stinner in branch '3.8': bpo-38234: Fix _PyConfig_InitPathConfig() (GH-16335) (GH-16336) https://github.com/python/cpython/commit/3f5409a3f13c59baa34656bccefdc3728e46c9ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 14:45:52 2019 From: report at bugs.python.org (David Parks) Date: Mon, 23 Sep 2019 18:45:52 +0000 Subject: [issue38254] Pickle not deserializing an aiohttp ClientConnectorError exception as expected In-Reply-To: <1569175364.49.0.370257231179.issue38254@roundup.psfhosted.org> Message-ID: <1569264352.5.0.521295881559.issue38254@roundup.psfhosted.org> David Parks added the comment: I may be wrong here, but the issue appears to be a problem in pickle, which is why I brought it over here. From the looks of the very simple code in the Exception I can't see that there's any way that this exception is possible unless pickle itself has a bug. Pickle appears to be reconstructing the object with a string in a place where an Object was before the serialization process. The issue is currently reported under aiohttp here: https://github.com/aio-libs/aiohttp/issues/4077 It's also posted (originally) on stack overflow here: https://stackoverflow.com/questions/58019939/attributeerror-str-object-has-no-attribute-errno ---------- resolution: third party -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 14:48:25 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 23 Sep 2019 18:48:25 +0000 Subject: [issue38249] Optimize out Py_UNREACHABLE in the release mode In-Reply-To: <1569145626.92.0.408422678201.issue38249@roundup.psfhosted.org> Message-ID: <1569264505.4.0.935473553127.issue38249@roundup.psfhosted.org> Serhiy Storchaka added the comment: > What does __builtin_unreachable()? Does it nothing? Call abort()? It is more than does nothing. It gives a hint to the compiler, so it can optimize out checks that lead to this code. For example, in switch (k) { case 0: ... case 1: ... case 2: ... case 3: ... default: __builtin_unreachable(); } the compiler can remove the check that k is in the range from 0 to 3 and use direct jump table. Or it can keep tests for k == 0, k == 1, k == 2 and remove the test for k == 3. Py_UNREACHABLE() replaces assert(0), but additionally silences compiler warning about unreachable code. It was the purpose of introducing Py_UNREACHABLE() (see issue14656). > For me, it's not an issue with the compiler, but more about handling corner cases. Py_UNREACHABLE() is used in cases which "should not occur" but can technically occur if you pass invalid data, or in "very unlikely case". It is bad if Py_UNREACHABLE() is now used in both cases: for assert(0) and for abort(). Using Py_UNREACHABLE() for "very unlikely case" is technically incorrect. Raise an exception or call Py_FatalError() in that case. We need to fix incorrect uses of Py_UNREACHABLE() or add Py_TRUE_UNREACHABLE() for true unreachable code. > Here it's unclear to me if this case can be reached or not. This is an infinite loop without "break". What can be the doubts? > _PyLong_Format() calls Py_UNREACHABLE() if base is not in (2, 8, 16). There is assert(base == 2 || base == 8 || base == 16) above in the code. Technically it is a bug. _PyLong_Format() can be used from public PyNumber_ToBase(). Either PyNumber_ToBase() or _PyLong_Format() should check that the base is 2, 8, 10 or 16, and raise an exception otherwise, but not abort the program. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 15:31:36 2019 From: report at bugs.python.org (Ned Deily) Date: Mon, 23 Sep 2019 19:31:36 +0000 Subject: [issue38216] Fix for issue30458 (HTTP Header Injection) prevents crafting invalid requests In-Reply-To: <1568823270.72.0.1365123921.issue38216@roundup.psfhosted.org> Message-ID: <1569267096.09.0.0712148649108.issue38216@roundup.psfhosted.org> Ned Deily added the comment: > Will the latter to accept non-ascii values also be merged to security branches too given that it predates the security issue addressed ? At this point, I'm willing to allow it in 3.6 unless someone identifies a compelling reason not to. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 16:47:32 2019 From: report at bugs.python.org (Yair Bonastre) Date: Mon, 23 Sep 2019 20:47:32 +0000 Subject: [issue38259] having a PriorityQueue in multiprocessing.queue module like in queue module would be a plus In-Reply-To: <1569249780.79.0.316857326171.issue38259@roundup.psfhosted.org> Message-ID: <1569271652.81.0.565750581226.issue38259@roundup.psfhosted.org> Change by Yair Bonastre : ---------- title: There should be a PriorityQueue in multiprocessing module -> having a PriorityQueue in multiprocessing.queue module like in queue module would be a plus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 16:55:14 2019 From: report at bugs.python.org (Emmanuel Arias) Date: Mon, 23 Sep 2019 20:55:14 +0000 Subject: [issue38260] asyncio.run documentation does not mention its return value In-Reply-To: <1569253212.87.0.131241104419.issue38260@roundup.psfhosted.org> Message-ID: <1569272114.06.0.318342414976.issue38260@roundup.psfhosted.org> Emmanuel Arias added the comment: So, I think that will return the Future's return, isn't? I will propose a PR for this ---------- nosy: +eamanu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 16:59:30 2019 From: report at bugs.python.org (pmp-p) Date: Mon, 23 Sep 2019 20:59:30 +0000 Subject: [issue35243] readline timeout too long for async gfx use In-Reply-To: <1542182908.62.0.788709270274.issue35243@psf.upfronthosting.co.za> Message-ID: <1569272370.96.0.661000111536.issue35243@roundup.psfhosted.org> Change by pmp-p : ---------- nosy: +pmpp type: enhancement -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 17:05:21 2019 From: report at bugs.python.org (Emmanuel Arias) Date: Mon, 23 Sep 2019 21:05:21 +0000 Subject: [issue38260] asyncio.run documentation does not mention its return value In-Reply-To: <1569253212.87.0.131241104419.issue38260@roundup.psfhosted.org> Message-ID: <1569272721.67.0.175697322181.issue38260@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- keywords: +patch pull_requests: +15914 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16337 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 18:23:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 22:23:23 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569277403.4.0.980859320757.issue38234@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15915 pull_request: https://github.com/python/cpython/pull/16338 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 18:27:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 22:27:17 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569277637.38.0.403294994972.issue38234@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15916 pull_request: https://github.com/python/cpython/pull/16339 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 18:55:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Mon, 23 Sep 2019 22:55:52 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569279352.49.0.568178177514.issue38234@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 85ce0a7178801b538160cbb5cf9ef50a713c45bf by Victor Stinner in branch 'master': bpo-38234: read_pth_file() now returns PyStatus (GH-16338) https://github.com/python/cpython/commit/85ce0a7178801b538160cbb5cf9ef50a713c45bf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 18:56:37 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 23 Sep 2019 22:56:37 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569279397.6.0.617508314908.issue38234@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15917 pull_request: https://github.com/python/cpython/pull/16340 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 19:16:56 2019 From: report at bugs.python.org (miss-islington) Date: Mon, 23 Sep 2019 23:16:56 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569280616.76.0.838579144584.issue38234@roundup.psfhosted.org> miss-islington added the comment: New changeset 7f7cd899e3d773b803b7af5b0c19eeff83dd69fe by Miss Islington (bot) in branch '3.8': bpo-38234: read_pth_file() now returns PyStatus (GH-16338) https://github.com/python/cpython/commit/7f7cd899e3d773b803b7af5b0c19eeff83dd69fe ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 20:04:08 2019 From: report at bugs.python.org (Nathaniel Smith) Date: Tue, 24 Sep 2019 00:04:08 +0000 Subject: [issue38242] Revert the new asyncio Streams API In-Reply-To: <1569020325.08.0.390897413838.issue38242@roundup.psfhosted.org> Message-ID: <1569283448.09.0.5707304283.issue38242@roundup.psfhosted.org> Nathaniel Smith added the comment: I saw Yury on Saturday, and we spent some time working through the implications of different options here. For context: the stream ABCs will be a bit different from most third-party code, because their value is proportional to how many projects adopt them. So some kind of central standardization is especially valuable. And, they'll have lots of implementors + lots of users, so they'll be hard to change regardless of whether we standardize them (e.g. even adding new features will be a breaking change). Part of the reason we've been aggressively iterating on them in Trio is because I know that eventually we need to end up with a minimal core that can never change again, so I want to make sure we find the right one :-). So Yury and I are tentatively thinking we'll make some kind of PEP for the 3.9 timescale, probably just for the core ABCs, maybe in the stdlib or maybe just as an informational PEP that we can use to convince people that this is "the python way" (like the WSGI PEP). Now, the implications for the asyncio.Stream API in 3.8. This is tricky because we aren't sure of how everything will shake out, so we considered multiple scenarios. First decision point: will asyncio.Stream implement the ABCs directly, or will you need some kind of adapter? If we go with an adapter, then there's no conflict between the ABC approach and whatever we do in 3.8, because the adapter can always fix things up later. But, it might be nicer to eventually have asyncio.Stream implement the ABC directly, so users can use the recommended API directly without extra fuss, so let's consider that too. Next decision point: will the byte stream ABC have an __aiter__ that yields chunks? We're pretty sure this is the only place where the ABC *might* conflict with the asyncio.Stream interface. And as Josh Oreman pointed out in the Trio issue thread, we could even avoid this by making the ABC's chunk-iterator be a method like .chunks() instead of naming it __aiter__. So even with the current asyncio.Stream, there are two potentially workable options. But, they do involve *some* compromises, so what would happen if we wanted asyncio.Stream to implement the ABC directly without and adapter, *and* the ABC uses __aiter__? We can't do that with the current asyncio.Stream. Are there any tweaks we'd want to make to 3.8 to keep our options open here? The obvious change would be to leave out __aiter__ from asyncio.Stream in 3.8. That would leave all our options open. For sockets this would be easy, because the old functions are still there and still returning StreamReader/StreamWriter objects. For 3.8, we're adding a bunch of new Stream-based APIs, and users won't encounter a Stream until they switch to those. (The new APIs are: connect, connect_read_pipe, connect_write_pipe, connect_unix, StreamServer, UnixStreamServer). The problem is the subprocess functions (create_subprocess_exec, create_subprocess_shell), since they've been changed *in place* to return asyncio.Stream instead of StreamReader/StreamWriter. We considered the possibility of migrating the existing subprocess functions to a different __aiter__ implementation via a deprecation period, but concluded that this wasn't really workable. So if we want to go down this branch of the decision tree, then 3.8 would have to leave create_subprocess_{exec,shell} as using StreamReader/StreamWriter, and in either 3.8 or 3.9 we'd have to add new subprocess functions that use Stream, like we did for sockets. Doing this for subprocesses is a bit more complicated than for sockets, because subprocesses have a Process object that holds the stream objects and interacts with them. But looking at the code, I don't see any real blockers. If we completely separated the old StreamReader/StreamWriter functions from the new Stream functions, then it would also have another advantage: we could clean up several issues with Stream that are only needed for compatibility with the old APIs. In particular, we could get rid of the optional-await hacks on 'write' and 'close', and turn them into regular coroutines. So I guess this is the real question we have to answer now. Which of these do we pick? Option 1: Keep the Stream code as-is, and accept that using asyncio.Stream with future ABC-based code will require some compromises Option 2: Create new functions for spawning subprocesses; revert create_subprocess_{exec,shell} to use StreamReader/StreamWriter; take advantage of the break between old and new APIs to clean up Stream in general; take advantage of that cleanup to remove __aiter__ so the the future ABC-based code won't have to compromise. I think this is one of those good problems to have, where really we could live with either option :-). Still, we should pick one on purpose instead of by accident. Yury's preference was "option 1", because he feels compromises for the ABC design aren't that bad, and adding and documenting new subprocess APIs is expensive. I'm leaning towards "option 2", because we're already paying the cost of adding and documenting a ton of new APIs for sockets. Given that, adding a few more to that list doesn't add that much cost, and it lets us get more value from *all* of the new APIs, by letting us shed more of the legacy backcompat constraints. Right now we don't have any path to fixing 'write'/'close' at all; this would give us one. I'd also be willing to put in some time to actually implement this if that turns out to be the limiting factor. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 20:27:27 2019 From: report at bugs.python.org (Nathaniel Smith) Date: Tue, 24 Sep 2019 00:27:27 +0000 Subject: [issue38242] Revert the new asyncio Streams API In-Reply-To: <1569020325.08.0.390897413838.issue38242@roundup.psfhosted.org> Message-ID: <1569284847.34.0.00833926679339.issue38242@roundup.psfhosted.org> Nathaniel Smith added the comment: BTW Andrew, while writing that I realized that there's also overlap between your new Server classes and Trio's ABC for servers, and I think it'd be interesting to chat about how they compare maybe? But it's not relevant to this issue, so maybe gitter or another issue or something? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 20:52:11 2019 From: report at bugs.python.org (finefoot) Date: Tue, 24 Sep 2019 00:52:11 +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: <1569286331.96.0.950845487437.issue30256@roundup.psfhosted.org> Change by finefoot : ---------- pull_requests: +15918 pull_request: https://github.com/python/cpython/pull/16341 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 21:56:24 2019 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 24 Sep 2019 01:56:24 +0000 Subject: [issue38242] Revert the new asyncio Streams API In-Reply-To: <1569020325.08.0.390897413838.issue38242@roundup.psfhosted.org> Message-ID: <1569290184.21.0.191824111381.issue38242@roundup.psfhosted.org> Yury Selivanov added the comment: Nathaniel, thanks for the summary! A few comments to address some points: > So Yury and I are tentatively thinking we'll make some kind of PEP for the 3.9 timescale, probably just for the core ABCs Yes! At the very least for things like asynchronous version of "closable", e.g. an object with an "aclose()" coroutine method. I'm sure there are some other straightforward design patterns that we can codify. Maybe we can do that for streams too -- see some thoughts below. > First decision point: will asyncio.Stream implement the ABCs directly, or will you need some kind of adapter? I'd love asyncio.Stream to implement the ABCs directly. The only problem is that Trio isn't yet settled on the design of those ABCs and we need to make some decisions for asyncio *now*. I hope that the Trio project can minimize the number of methods they want to add to those ABCs so that we don't need to duplicate a lot of functionality in asyncio.Stream. E.g. in the new asyncio.Stream there's a Stream.write() coroutine; in Trio it's Stream.send_all(). I'm not entirely convinced that "send_all()" is a good name, for example, even though I now understand the motivation. We can discuss that later in a relevant issue though. Another important point to consider: if the new Trio Stream ABCs are *significantly different* from asyncio.Stream and would require us to alias too many methods or to do heavy refactoring and deprecations, then Trio will have to show some real world usage and traction of its APIs first. > If we completely separated the old StreamReader/StreamWriter functions from the new Stream functions, then it would also have another advantage: we could clean up several issues with Stream that are only needed for compatibility with the old APIs. In particular, we could get rid of the optional-await hacks on 'write' and 'close', and turn them into regular coroutines. We'd like to avoid that and have one asyncio.Stream class in asyncio. Using legacy StreamReader/StreamWriter functions for subprocesses alone (long term) isn't a solution for us, since there're real problems with .write() and .close() not being awaitables. Sticking to having a new asyncio.Stream API and old StreamReader/StreamWriter for subprocesses isn't an acceptable solution either. We'd like to minimize the API surface that asyncio users have to deal with. > The obvious change would be to leave out __aiter__ from asyncio.Stream in 3.8. > Option 1: Keep the Stream code as-is, and accept that using asyncio.Stream with future ABC-based code will require some compromises Nathaniel, I think it's important to emphasize that those compromises should be mutual. I'm willing to support changing "Stream.close()" to "Stream.aclose()" and to perhaps alias some methods. We can also implement "Stream.chunks()". But changing the semantics of "__aiter__" is, unfortunately, not on the table, at least for me. If Trio doesn't want to change the __aiter__ semantics of its Stream ABC (which is only a *proposal* right now!), then: - Fragmenting asyncio APIs by letting subprocesses use old StreamReader/StreamWriter while we have new asyncio.Stream isn't an option. - Asking us to implement new subprocess APIs just for the sake of having different Stream implementation for Process.std* channels isn't an option either. Adding new APIs and deprecating old ones is a huge burden on asyncio maintainers and users. So the "obvious change" for *me* would be using "Stream.chunks()" iterator in Trio. For Trio it's a question of whether the new API is pretty; for asyncio it's a question of how many APIs we need to deprecate/change. I hope you understand my position and why I am strong -1 on the "Option 2". > Right now we don't have any path to fixing 'write'/'close' at all; Andrew and I discussed that this morning. Here's the plan: 1. We add "aclose()" and "write()" coroutines to the new "asyncio.Stream()". It won't have "wait_closed()" or "drain()" or "close()". 2. We add a _LegacyStream class derived from the new asyncio.Stream. We will use it for subprocesses. Its "write()" method will return an "OptionallyAwaitable" wrapper that will nudge users to add an await in front of "stdin.write()". _LegacyStream will be completely backwards compatible. This path enables us to add a decent new streaming API while retaining consistency and backwards compatibility. > BTW Andrew, while writing that I realized that there's also overlap between your new Server classes and Trio's ABC for servers, and I think it'd be interesting to chat about how they compare maybe? But it's not relevant to this issue, so maybe gitter or another issue or something? If possible please use email/bpo/github. I don't use gitter and I'd like to be part of that discussion (or at least be able to follow it). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 22:21:01 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 24 Sep 2019 02:21:01 +0000 Subject: [issue38253] Fix typo of Py_SET_ERANGE_IF_OVERFLOW in pyport.h In-Reply-To: <1569168214.54.0.709512149535.issue38253@roundup.psfhosted.org> Message-ID: <1569291661.84.0.706850420048.issue38253@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15919 pull_request: https://github.com/python/cpython/pull/16342 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 22:21:08 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 24 Sep 2019 02:21:08 +0000 Subject: [issue38253] Fix typo of Py_SET_ERANGE_IF_OVERFLOW in pyport.h In-Reply-To: <1569168214.54.0.709512149535.issue38253@roundup.psfhosted.org> Message-ID: <1569291668.53.0.00879689614535.issue38253@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15920 pull_request: https://github.com/python/cpython/pull/16343 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 22:21:09 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 24 Sep 2019 02:21:09 +0000 Subject: [issue38253] Fix typo of Py_SET_ERANGE_IF_OVERFLOW in pyport.h In-Reply-To: <1569168214.54.0.709512149535.issue38253@roundup.psfhosted.org> Message-ID: <1569291669.74.0.76001324402.issue38253@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 4346bad3321699d49a45e3446270b57726ab5c8f by Benjamin Peterson (Hai Shi) in branch 'master': closes bpo-38253: Fix typo of Py_SET_ERANGE_IF_OVERFLOW in pyport.h. (GH-16230) https://github.com/python/cpython/commit/4346bad3321699d49a45e3446270b57726ab5c8f ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 22:21:17 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 24 Sep 2019 02:21:17 +0000 Subject: [issue38253] Fix typo of Py_SET_ERANGE_IF_OVERFLOW in pyport.h In-Reply-To: <1569168214.54.0.709512149535.issue38253@roundup.psfhosted.org> Message-ID: <1569291677.88.0.754683620507.issue38253@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15921 pull_request: https://github.com/python/cpython/pull/16344 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 22:31:29 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 24 Sep 2019 02:31:29 +0000 Subject: [issue38253] Fix typo of Py_SET_ERANGE_IF_OVERFLOW in pyport.h In-Reply-To: <1569168214.54.0.709512149535.issue38253@roundup.psfhosted.org> Message-ID: <1569292289.75.0.569022423902.issue38253@roundup.psfhosted.org> miss-islington added the comment: New changeset 7c65adf688dfadb113eec64374d8d5ccb4fc892b by Miss Islington (bot) in branch '2.7': closes bpo-38253: Fix typo of Py_SET_ERANGE_IF_OVERFLOW in pyport.h. (GH-16230) https://github.com/python/cpython/commit/7c65adf688dfadb113eec64374d8d5ccb4fc892b ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 22:39:40 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 24 Sep 2019 02:39:40 +0000 Subject: [issue38253] Fix typo of Py_SET_ERANGE_IF_OVERFLOW in pyport.h In-Reply-To: <1569168214.54.0.709512149535.issue38253@roundup.psfhosted.org> Message-ID: <1569292780.32.0.451601739959.issue38253@roundup.psfhosted.org> miss-islington added the comment: New changeset 912b5a986c4fe0f4d758d7536ce818b1ab672437 by Miss Islington (bot) in branch '3.7': closes bpo-38253: Fix typo of Py_SET_ERANGE_IF_OVERFLOW in pyport.h. (GH-16230) https://github.com/python/cpython/commit/912b5a986c4fe0f4d758d7536ce818b1ab672437 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 22:41:09 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 24 Sep 2019 02:41:09 +0000 Subject: [issue38253] Fix typo of Py_SET_ERANGE_IF_OVERFLOW in pyport.h In-Reply-To: <1569168214.54.0.709512149535.issue38253@roundup.psfhosted.org> Message-ID: <1569292869.67.0.457367753403.issue38253@roundup.psfhosted.org> miss-islington added the comment: New changeset a7c73a0094c336e5f10d9364f244be70683409ff by Miss Islington (bot) in branch '3.8': closes bpo-38253: Fix typo of Py_SET_ERANGE_IF_OVERFLOW in pyport.h. (GH-16230) https://github.com/python/cpython/commit/a7c73a0094c336e5f10d9364f244be70683409ff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 23:34:16 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 24 Sep 2019 03:34:16 +0000 Subject: [issue16637] py-bt, py-locals, etc. GDB commands fail with output-radix 16 In-Reply-To: <1354903492.9.0.822155625877.issue16637@psf.upfronthosting.co.za> Message-ID: <1569296056.3.0.22467848937.issue16637@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 6f53d34fb0f944a8c0ee530334c353559ac40f72 by Benjamin Peterson (Marc Hartmayer) in branch 'master': closes bpo-16637: libpython: construct integer object directly from gdbvalue (GH-15232) https://github.com/python/cpython/commit/6f53d34fb0f944a8c0ee530334c353559ac40f72 ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 23:34:24 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 24 Sep 2019 03:34:24 +0000 Subject: [issue16637] py-bt, py-locals, etc. GDB commands fail with output-radix 16 In-Reply-To: <1354903492.9.0.822155625877.issue16637@psf.upfronthosting.co.za> Message-ID: <1569296064.16.0.0476563775915.issue16637@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15922 pull_request: https://github.com/python/cpython/pull/16345 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 23:37:16 2019 From: report at bugs.python.org (Nathaniel Smith) Date: Tue, 24 Sep 2019 03:37:16 +0000 Subject: [issue38242] Revert the new asyncio Streams API In-Reply-To: <1569020325.08.0.390897413838.issue38242@roundup.psfhosted.org> Message-ID: <1569296236.1.0.00811327958962.issue38242@roundup.psfhosted.org> Nathaniel Smith added the comment: > I hope that the Trio project can minimize the number of methods they want to add to those ABCs so that we don't need to duplicate a lot of functionality in asyncio.Stream. E.g. in the new asyncio.Stream there's a Stream.write() coroutine; in Trio it's Stream.send_all(). I'm not entirely convinced that "send_all()" is a good name, for example, even though I now understand the motivation. We can discuss that later in a relevant issue though. Yeah, we definitely need to bikeshed the method names but we should do that separately. The actual methods are mostly settled though, and designed to be as minimal as possible. The complete set is: - send data - send EOF - receive data - close - and *maybe* a kind of 'drain' method, which is quasi-optional and I'm hoping we can get rid of it; it's related to some latency/flow control/buffering issues that are too complex to discuss here And we'll provide standard implementations for iteration and __aenter__/__aexit__. > Another important point to consider: if the new Trio Stream ABCs are *significantly different* from asyncio.Stream and would require us to alias too many methods or to do heavy refactoring and deprecations, then Trio will have to show some real world usage and traction of its APIs first. It sounds like the only aliasing will be for the send data method; everything else either has different semantics, or has both the same semantics and the same name.* And there won't be any refactoring needed; the whole goal of this design is to make sure that any reasonable stream implementation can easily provide these methods :-). *I was going to say the "send EOF" method would also be potentially aliased, but send EOF should be async, because e.g. on a TLS stream it has to send data, and Stream.write_eof is sync. Or maybe we should migrate Stream.write_eof to become async too? > Nathaniel, I think it's important to emphasize that those compromises should be mutual. I'm willing to support changing "Stream.close()" to "Stream.aclose()" and to perhaps alias some methods. We can also implement "Stream.chunks()". But changing the semantics of "__aiter__" is, unfortunately, not on the table, at least for me. Let's put __aiter__ aside for a moment, and just think about what's best for asyncio itself. And if that turns out to include breaking compatibility between Stream and StreamReader/StreamWriter, then we can go back to the discussion about __aiter__ :-) > Here's the plan: > > 1. We add "aclose()" and "write()" coroutines to the new "asyncio.Stream()". It won't have "wait_closed()" or "drain()" or "close()". > > 2. We add a _LegacyStream class derived from the new asyncio.Stream. We will use it for subprocesses. Its "write()" method will return an "OptionallyAwaitable" wrapper that will nudge users to add an await in front of "stdin.write()". _LegacyStream will be completely backwards compatible. > > This path enables us to add a decent new streaming API while retaining consistency and backwards compatibility. I don't think this is a terrible plan or anything like that. But I'm still confused about why you think it's better than adding new subprocess spawn functions. IIUC, your goal is to make the documentation and deprecations as simple as possible. If we add two new subprocess functions, then the documentation/deprecations look like this: - We have to document that there are two different versions of the stream API, the new one and the legacy one - We have to document how Stream works, and how StreamReader/StreamWriter work - We have to document that 6 functions that return old-style streams are deprecated (open_connection, start_server, open_unix_connection, start_unix_server, create_subprocess_exec, create_subprocess_shell) and replaced by 8 new functions (connect, StreamServer, connect_unix, UnixStreamServer, connect_read_pipe, connect_write_pipe, and whatever we called the new subprocess functions) OTOH, with your proposal, we also have a set of deprecations and migrations to do: - We have to document that there are two different versions of the stream API, the new one and the legacy one - We have to document how Stream works, and how StreamReader/StreamWriter work - We have to document that 4 functions that return old-style streams are deprecated (open_connection, start_server, open_unix_connection, start_unix_server) and replaced by 6 new functions (connect, StreamServer, connect_unix, UnixStreamServer, connect_read_pipe, connect_write_pipe) - We have to document that Process objects use a third kind of stream object that doesn't match either the old or new APIs, and how this one works - We have to deprecate the no-await write and no-await close (and maybe no-await write_eof) In addition, deprecating a function is straightforward and well understood: you just issue a deprecation warning, and tools can automatically show the source of the problem and suppress duplicates, or convert it into an error. But deprecating call-without-await is messy ? you have to issue the warning from inside __del__, so you can't easily find the source of the problem, suppress duplicates, or convert it into an error. So like... both of these approaches are definitely possible, but to me it seems like if you look at it holistically, your approach is actually making the documentation and deprecations *more* complicated, not less. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 23:49:43 2019 From: report at bugs.python.org (Lisa Roach) Date: Tue, 24 Sep 2019 03:49:43 +0000 Subject: [issue38136] Remove AsyncMock.assert_awaited_* In-Reply-To: <1568292020.39.0.826451235958.issue38136@roundup.psfhosted.org> Message-ID: <1569296983.93.0.614449024303.issue38136@roundup.psfhosted.org> Lisa Roach added the comment: New changeset ef048517755db1f0d211fb6dfc655a8b412cc96f by Lisa Roach in branch 'master': bpo-38136: Updates await_count and call_count to be different things (GH-16192) https://github.com/python/cpython/commit/ef048517755db1f0d211fb6dfc655a8b412cc96f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 23 23:52:53 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 24 Sep 2019 03:52:53 +0000 Subject: [issue16637] py-bt, py-locals, etc. GDB commands fail with output-radix 16 In-Reply-To: <1354903492.9.0.822155625877.issue16637@psf.upfronthosting.co.za> Message-ID: <1569297173.42.0.108366930902.issue16637@roundup.psfhosted.org> miss-islington added the comment: New changeset 5b94eb8d14f5a5b20dc2a999d6ca6219214b458c by Miss Islington (bot) in branch '3.8': closes bpo-16637: libpython: construct integer object directly from gdbvalue (GH-15232) https://github.com/python/cpython/commit/5b94eb8d14f5a5b20dc2a999d6ca6219214b458c ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 00:03:26 2019 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 24 Sep 2019 04:03:26 +0000 Subject: [issue38174] Security vulnerability in bundled expat CVE-2019-15903 (fix available in expat 2.2.8) In-Reply-To: <1568491807.22.0.03411253388.issue38174@roundup.psfhosted.org> Message-ID: <1569297806.87.0.440834079066.issue38174@roundup.psfhosted.org> Change by Benjamin Peterson : ---------- keywords: +patch pull_requests: +15923 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16346 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 00:28:36 2019 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 24 Sep 2019 04:28:36 +0000 Subject: [issue11410] Use GCC visibility attrs in PyAPI_* In-Reply-To: <1299391945.72.0.037942723875.issue11410@psf.upfronthosting.co.za> Message-ID: <1569299316.85.0.137417341937.issue11410@roundup.psfhosted.org> Vinay Sajip added the comment: Reopening, as a new patch is available. ---------- nosy: +vinay.sajip resolution: out of date -> stage: resolved -> patch review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 00:35:01 2019 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 24 Sep 2019 04:35:01 +0000 Subject: [issue11410] Use GCC visibility attrs in PyAPI_* In-Reply-To: <1299391945.72.0.037942723875.issue11410@psf.upfronthosting.co.za> Message-ID: <1569299701.31.0.951022105896.issue11410@roundup.psfhosted.org> Change by Vinay Sajip : ---------- pull_requests: +15924 pull_request: https://github.com/python/cpython/pull/16347 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 00:35:40 2019 From: report at bugs.python.org (Ryang Sohn) Date: Tue, 24 Sep 2019 04:35:40 +0000 Subject: [issue38261] Tkinter CheckButton default label white in macOS dark mode Message-ID: <1569299740.39.0.742587153558.issue38261@roundup.psfhosted.org> New submission from Ryang Sohn : In macOS, when "Dark Mode" is turned on, TKinter's checkbutton's default label color is white, not black. ---------- components: Tkinter, macOS files: tkinter_checkbox.py messages: 353056 nosy: Ryang Sohn, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Tkinter CheckButton default label white in macOS dark mode type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48620/tkinter_checkbox.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 00:44:52 2019 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 24 Sep 2019 04:44:52 +0000 Subject: [issue11410] Use GCC visibility attrs in PyAPI_* In-Reply-To: <1299391945.72.0.037942723875.issue11410@psf.upfronthosting.co.za> Message-ID: <1569300292.48.0.523865894073.issue11410@roundup.psfhosted.org> Change by Vinay Sajip : ---------- versions: +Python 3.9 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 01:14:57 2019 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 24 Sep 2019 05:14:57 +0000 Subject: [issue38242] Revert the new asyncio Streams API In-Reply-To: <1569020325.08.0.390897413838.issue38242@roundup.psfhosted.org> Message-ID: <1569302097.97.0.222410916069.issue38242@roundup.psfhosted.org> Yury Selivanov added the comment: > So like... both of these approaches are definitely possible, but to me it seems like if you look at it holistically, your approach is actually making the documentation and deprecations *more* complicated, not less. I think Nathaniel might have a point here. Andrew, Guido, what do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 01:53:04 2019 From: report at bugs.python.org (Kyle Stanley) Date: Tue, 24 Sep 2019 05:53:04 +0000 Subject: [issue38242] Revert the new asyncio Streams API In-Reply-To: <1569020325.08.0.390897413838.issue38242@roundup.psfhosted.org> Message-ID: <1569304384.42.0.589101653003.issue38242@roundup.psfhosted.org> Change by Kyle Stanley : ---------- nosy: +aeros167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 02:35:44 2019 From: report at bugs.python.org (Kyle Stanley) Date: Tue, 24 Sep 2019 06:35:44 +0000 Subject: [issue38242] Revert the new asyncio Streams API In-Reply-To: <1569020325.08.0.390897413838.issue38242@roundup.psfhosted.org> Message-ID: <1569306944.42.0.8741531764.issue38242@roundup.psfhosted.org> Kyle Stanley added the comment: > We have to document that Process objects use a third kind of stream object that doesn't match either the old or new APIs, and how this one works >From my perspective, this point would have the largest user learning cost due to the stream object having a completely different API. As a result, I'm significantly more in favor of adding the two new subprocess functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 02:41:40 2019 From: report at bugs.python.org (=?utf-8?b?0JHQvtGA0LjRgSDQktC10YDRhdC+0LLRgdC60LjQuQ==?=) Date: Tue, 24 Sep 2019 06:41:40 +0000 Subject: [issue37904] Suggested edit to Python Tutorial - Section 4 In-Reply-To: <1566386922.03.0.919785821856.issue37904@roundup.psfhosted.org> Message-ID: <1569307300.86.0.0961843530812.issue37904@roundup.psfhosted.org> ????? ?????????? added the comment: You changed "control flow statements" to "flow control statements", which is an unrelated concept. ---------- nosy: +boris _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 02:55:02 2019 From: report at bugs.python.org (Ned Deily) Date: Tue, 24 Sep 2019 06:55:02 +0000 Subject: [issue38261] Tkinter CheckButton default label white in macOS dark mode In-Reply-To: <1569299740.39.0.742587153558.issue38261@roundup.psfhosted.org> Message-ID: <1569308102.15.0.919593101887.issue38261@roundup.psfhosted.org> Ned Deily added the comment: I assume you are using a Python 3.7.x from a python.org macOS installer? Support for macOS dark mode is almost entirely a Tk issue as Tkinter is basically a shallow wrapper around Tk-provided APIs. We have been shipping Tk 8.6.8, s stable, slightly out-of-date version because it seemed to have the least number of issues across all of the macOS versions we support. With macOS 10.15 coming soon, I will shortly be taking another look st the latest unreleased Tk which may also have better support for dark mode. ---------- assignee: -> ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 03:06:03 2019 From: report at bugs.python.org (Michael Felt) Date: Tue, 24 Sep 2019 07:06:03 +0000 Subject: [issue36210] correct AIX logic in setup.py for (non-existant) optional extensions In-Reply-To: <1551877478.38.0.771456862754.issue36210@roundup.psfhosted.org> Message-ID: <1569308763.43.0.361896091849.issue36210@roundup.psfhosted.org> Michael Felt added the comment: Hi all, Now that I have finally noticed that the 3.8 branches are active for AIX bots I see something that I had always thought was in the 3.8 branch, but is not yet. https://github.com/python/cpython/pull/12202 Seems the backport never succeeded. Although, iirc it was, then, very near the day that "3.9" started. So, surprised that it failed the backport. Can that process be started again, or will I need to do this manually, so that the PPC64 bot also passes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 06:11:33 2019 From: report at bugs.python.org (Arno-Can Uestuensoez) Date: Tue, 24 Sep 2019 10:11:33 +0000 Subject: [issue38262] Mixins - super calls in bases of multiple-inheritance with different parameters Message-ID: <1569319893.51.0.228639226849.issue38262@roundup.psfhosted.org> New submission from Arno-Can Uestuensoez : The attached examples evaluate inheritance by mixins with different arameters and in different orders. The 'super()' call propagates the call resolution by definition to the next level, and cares about multiple inheritance as well as mixins. Where mixins are the superior case as they represent multiple inheritance in any case due to the common top class 'object'. So far perfect. The oddity I came around is the simple case of mixins with different parameters, where both are derived from 'object'. It is obvious, that such a class has to comply to the parents call interface - here object - when to be used standalone. BUT when I ignore this and set intentionally a parameter - for test-purposes of mixins only - the resolution algorithm seems to normalize both for the final call without parameters - as soon as one of the mixins is a non-parameter call. This is independent from the inheritance order for the derived class. I expect for the rightmost of the inherited classes to pass the parameters literally. When both classes have parameters, the parameter is passed to 'object' and correctly raises an exception. #---------------------------------------------------------- [acue at lap001 mixin-order-with-different-params]$ ./call.sh ************************ different parameters for mixin classes at diffeent positions 0: super() method signature has no param 1: super() method signature has param final top-class is 'object()' which does not know the parameter - here 'propagate' ************************ #--------------- # # CALL: mixin_C_is_A1B0.py # B:C A:C C:C #--------------- # # CALL: mixin_C_is_A1B1.py # Traceback (most recent call last): File "mixin_C_is_A1B1.py", line 24, in c=C(True) File "mixin_C_is_A1B1.py", line 20, in __init__ super(C, self).__init__(propagate) File "mixin_C_is_A1B1.py", line 4, in __init__ super(A, self).__init__(propagate) File "mixin_C_is_A1B1.py", line 12, in __init__ super(B, self).__init__(propagate) TypeError: object.__init__() takes no parameters #--------------- # # CALL: mixin_C_is_B0A1.py # A:C B:C C:C #--------------- # # CALL: mixin_C_is_B1A1.py # Traceback (most recent call last): File "mixin_C_is_B1A1.py", line 25, in c=C(True) File "mixin_C_is_B1A1.py", line 20, in __init__ super(C, self).__init__(propagate) File "mixin_C_is_B1A1.py", line 12, in __init__ super(B, self).__init__(propagate) File "mixin_C_is_B1A1.py", line 4, in __init__ super(A, self).__init__(propagate) TypeError: object.__init__() takes no parameters [acue at lap001 mixin-order-with-different-params]$ #---------------------------------------------- Is this intentional? If so, what is the explanation? - Because it potentially hides bugs for later debugging... ---------- files: tests.tar.gz messages: 353062 nosy: acue priority: normal severity: normal status: open title: Mixins - super calls in bases of multiple-inheritance with different parameters type: compile error versions: Python 2.7, Python 3.6 Added file: https://bugs.python.org/file48621/tests.tar.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 06:20:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 10:20:20 +0000 Subject: [issue38203] regrtest fails to stop test_multiprocessing_spawn worker process In-Reply-To: <1568753918.39.0.636404406219.issue38203@roundup.psfhosted.org> Message-ID: <1569320420.52.0.80432426462.issue38203@roundup.psfhosted.org> STINNER Victor added the comment: I worked around the issue, but see bpo-37531 for the root issue which is not fixed yet. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 06:24:33 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 10:24:33 +0000 Subject: [issue38212] test_multiprocessing_spawn: test_queue_feeder_donot_stop_onexc() failed on x86 Windows7 3.x In-Reply-To: <1568798497.72.0.146892893981.issue38212@roundup.psfhosted.org> Message-ID: <1569320673.56.0.756259789185.issue38212@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +15925 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16348 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 06:31:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 10:31:18 +0000 Subject: [issue37123] test_multiprocessing fails randomly on Windows In-Reply-To: <1559405131.96.0.0818992217462.issue37123@roundup.psfhosted.org> Message-ID: <1569321078.12.0.996458372378.issue37123@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +15926 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16349 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 06:31:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 10:31:18 +0000 Subject: [issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x In-Reply-To: <1494628223.7.0.0775389696939.issue30356@psf.upfronthosting.co.za> Message-ID: <1569321078.21.0.0168941215366.issue30356@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15927 pull_request: https://github.com/python/cpython/pull/16349 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 06:36:39 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 10:36:39 +0000 Subject: [issue38263] [Windows] multiprocessing: DupHandle.detach() race condition on DuplicateHandle(DUPLICATE_CLOSE_SOURCE) Message-ID: <1569321399.19.0.207011593125.issue38263@roundup.psfhosted.org> New submission from STINNER Victor : On Windows, the multiprocessing DupHandle.detach() method has race condition on DuplicateHandle(DUPLICATE_CLOSE_SOURCE). Error on duplicate(): Traceback (most recent call last): File "", line 1, in File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\spawn.py", line 107, in spawn_main new_handle = reduction.duplicate(pipe_handle, File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\reduction.py", line 79, in duplicate return _winapi.DuplicateHandle( PermissionError: [WinError 5] Access is denied Example: bpo-34714 Error on detach(): Traceback (most recent call last): File "", line 1, in File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\spawn.py", line 117, in spawn_main exitcode = _main(fd) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\spawn.py", line 127, in _main self = reduction.pickle.load(from_parent) File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\connection.py", line 951, in rebuild_pipe_connection handle = dh.detach() File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\reduction.py", line 133, in detach self._access, False, _winapi.DUPLICATE_CLOSE_SOURCE) PermissionError: [WinError 5] Access is denied Example: bpo-34513 ---------- components: Library (Lib) messages: 353064 nosy: pablogsal, pitrou, vstinner priority: normal severity: normal status: open title: [Windows] multiprocessing: DupHandle.detach() race condition on DuplicateHandle(DUPLICATE_CLOSE_SOURCE) versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 06:37:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 10:37:25 +0000 Subject: [issue34513] test_multiprocessing_spawn fails on x86 Windows7 3.7 buildbot In-Reply-To: <1535330423.47.0.56676864532.issue34513@psf.upfronthosting.co.za> Message-ID: <1569321445.2.0.112839987695.issue34513@roundup.psfhosted.org> STINNER Victor added the comment: File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\reduction.py", line 133, in detach self._access, False, _winapi.DUPLICATE_CLOSE_SOURCE) PermissionError: [WinError 5] Access is denied I created bpo-38263 "[Windows] multiprocessing: DupHandle.detach() race condition on DuplicateHandle(DUPLICATE_CLOSE_SOURCE)" for this bug. I close this issue as outdated. ---------- nosy: +vstinner resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 06:37:57 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 10:37:57 +0000 Subject: [issue34714] timeout in test_multiprocessing_spawn x86 Windows7 3.x buildbot In-Reply-To: <1537211187.89.0.956365154283.issue34714@psf.upfronthosting.co.za> Message-ID: <1569321477.5.0.137611575059.issue34714@roundup.psfhosted.org> STINNER Victor added the comment: File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\reduction.py", line 79, in duplicate return _winapi.DuplicateHandle( PermissionError: [WinError 5] Access is denied I created bpo-38263 "[Windows] multiprocessing: DupHandle.detach() race condition on DuplicateHandle(DUPLICATE_CLOSE_SOURCE)" for this bug. I close this issue as outdated. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 06:38:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 10:38:51 +0000 Subject: [issue26195] Windows frozen .exe multiprocessing.Queue access is denied exception In-Reply-To: <1453690484.95.0.111987955887.issue26195@psf.upfronthosting.co.za> Message-ID: <1569321531.19.0.215260095885.issue26195@roundup.psfhosted.org> STINNER Victor added the comment: No activity since 2016 and Davin considers that we lack information to debug this issue, so I close this issue as out of date. ---------- nosy: +vstinner resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 06:41:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 10:41:04 +0000 Subject: [issue17101] __main__.py Multiprocessing on Windows In-Reply-To: <1359737656.57.0.323890943093.issue17101@psf.upfronthosting.co.za> Message-ID: <1569321664.96.0.985798733549.issue17101@roundup.psfhosted.org> STINNER Victor added the comment: > Is it possible to backport the fix from #10845 to 2.7? Is it actually worth doing? I close the issue, it has been done in 2015: commit 2a6c2c9baa4bef29d605438c3e2ada01a240bdc3 Author: Nick Coghlan Date: Thu Nov 19 12:59:39 2015 +1000 Close #10128: don't rerun __main__.py in multiprocessing - backports issue #10845's mitigation of incompatibilities between the multiprocessing module and directory and zipfile execution - Multiprocessing on Windows will now automatically skip rerunning top level __main__.py modules in spawned processes, rather than failing with AssertionError ---------- nosy: +vstinner resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 06:42:06 2019 From: report at bugs.python.org (Sebastian Ernst) Date: Tue, 24 Sep 2019 10:42:06 +0000 Subject: [issue38258] ctypes ignores when a DLL function is called with too many arguments In-Reply-To: <1569249301.19.0.433627246846.issue38258@roundup.psfhosted.org> Message-ID: <1569321726.32.0.42335264059.issue38258@roundup.psfhosted.org> Sebastian Ernst added the comment: Thanks a lot for the clarification, Eryk. I did not notice that it was deprecated behavior. For the "too many arguments" case I guess this is not an issue. However, just for the symmetry of things, I also looked at calling a function with TOO FEW arguments. ```C int16_t __stdcall __declspec(dllimport) mul_ints( int16_t a, int16_t b ) { return a * b; } ``` ```python def test_error_callargs_unconfigured_too_few_args(): dll = ctypes.windll.LoadLibrary('tests/demo_dll.dll') mul_ints = dll.mul_ints with pytest.raises(ValueError): a = mul_ints(7) ``` As expected after your explanation, also no error in CPython 3.8 (i.e. the test fails, while is passes on CPython <= 3.7). If I run this manually, I even get a "result": ```python >>> dll = ctypes.windll.LoadLibrary('tests/demo_dll.dll') >>> mul_ints = dll.mul_ints >>> a = mul_ints(7) >>> a 445564 # ! >>> 445564/7 # Just looking at where this result is coming from ... 63652.0 ``` Re-starting Python (3.8) and (intentionally) misconfiguring the function interestingly also does not change the result: ```python >>> dll = ctypes.windll.LoadLibrary('tests/demo_dll.dll') >>> mul_ints = dll.mul_ints >>> mul_ints.argtypes = (ctypes.c_int16,) >>> a = mul_ints(7) >>> a 445564 # Apparently, this is deterministic?!? ``` Just out of curiosity, where is this data coming from? This ONLY way to prevent things like this to happen is to actually correctly configure the function: ```python >>> dll = ctypes.windll.LoadLibrary('tests/demo_dll.dll') >>> mul_ints = dll.mul_ints >>> mul_ints.argtypes = (ctypes.c_int16, ctypes.c_int16) >>> mul_ints(7) Traceback (most recent call last): File "", line 1, in TypeError: this function takes 2 arguments (1 given) ``` This should very CLEARLY be mentioned in the documentation ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 06:42:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 10:42:20 +0000 Subject: [issue36632] test_multiprocessing_forkserver: test_rapid_restart() leaked a dangling process on AMD64 FreeBSD 10-STABLE Non-Debug 3.x In-Reply-To: <1555326100.12.0.0433329524894.issue36632@roundup.psfhosted.org> Message-ID: <1569321740.19.0.257604020056.issue36632@roundup.psfhosted.org> STINNER Victor added the comment: x86 Windows7 3.8: https://buildbot.python.org/all/#/builders/210/builds/308 test_level (test.test_multiprocessing_spawn.WithProcessesTestLogging) ... ok test_rapid_restart (test.test_multiprocessing_spawn.WithProcessesTestManagerRestart) ... ok Warning -- Dangling processes: {} test_access (test.test_multiprocessing_spawn.WithProcessesTestPicklingConnections) ... ok ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 06:45:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 10:45:21 +0000 Subject: [issue36560] test_functools leaks randomly 1 memory block In-Reply-To: <1554733336.52.0.331530875309.issue36560@roundup.psfhosted.org> Message-ID: <1569321921.31.0.847112268328.issue36560@roundup.psfhosted.org> STINNER Victor added the comment: Recent fail on AMD64 Fedora Rawhide Refleaks 3.x: https://buildbot.python.org/all/#builders/189/builds/162 test_functools leaked [1, 2, 1] memory blocks, sum=4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 06:47:52 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 10:47:52 +0000 Subject: [issue38212] test_multiprocessing_spawn: test_queue_feeder_donot_stop_onexc() failed on x86 Windows7 3.x In-Reply-To: <1568798497.72.0.146892893981.issue38212@roundup.psfhosted.org> Message-ID: <1569322072.68.0.480921405468.issue38212@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 99799c722065d0524f3ab0bc455e1938bb8dc60f by Victor Stinner in branch 'master': bpo-38212: Increase MP test_queue_feeder_donot_stop_onexc() timeout (GH-16348) https://github.com/python/cpython/commit/99799c722065d0524f3ab0bc455e1938bb8dc60f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 06:48:17 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 24 Sep 2019 10:48:17 +0000 Subject: [issue38212] test_multiprocessing_spawn: test_queue_feeder_donot_stop_onexc() failed on x86 Windows7 3.x In-Reply-To: <1568798497.72.0.146892893981.issue38212@roundup.psfhosted.org> Message-ID: <1569322097.97.0.842851401517.issue38212@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15928 pull_request: https://github.com/python/cpython/pull/16350 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 06:48:25 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 24 Sep 2019 10:48:25 +0000 Subject: [issue38212] test_multiprocessing_spawn: test_queue_feeder_donot_stop_onexc() failed on x86 Windows7 3.x In-Reply-To: <1568798497.72.0.146892893981.issue38212@roundup.psfhosted.org> Message-ID: <1569322105.16.0.910927720167.issue38212@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15929 pull_request: https://github.com/python/cpython/pull/16351 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 07:06:18 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 24 Sep 2019 11:06:18 +0000 Subject: [issue38212] test_multiprocessing_spawn: test_queue_feeder_donot_stop_onexc() failed on x86 Windows7 3.x In-Reply-To: <1568798497.72.0.146892893981.issue38212@roundup.psfhosted.org> Message-ID: <1569323178.63.0.874878521628.issue38212@roundup.psfhosted.org> miss-islington added the comment: New changeset c13a4d6a94b5fab52422fcba612b3d1790aa3422 by Miss Islington (bot) in branch '3.7': bpo-38212: Increase MP test_queue_feeder_donot_stop_onexc() timeout (GH-16348) https://github.com/python/cpython/commit/c13a4d6a94b5fab52422fcba612b3d1790aa3422 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 07:07:32 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 24 Sep 2019 11:07:32 +0000 Subject: [issue38212] test_multiprocessing_spawn: test_queue_feeder_donot_stop_onexc() failed on x86 Windows7 3.x In-Reply-To: <1568798497.72.0.146892893981.issue38212@roundup.psfhosted.org> Message-ID: <1569323252.0.0.822037085073.issue38212@roundup.psfhosted.org> miss-islington added the comment: New changeset fea9ca1b0c6279f483a73f2040b068dd0e0d3acd by Miss Islington (bot) in branch '3.8': bpo-38212: Increase MP test_queue_feeder_donot_stop_onexc() timeout (GH-16348) https://github.com/python/cpython/commit/fea9ca1b0c6279f483a73f2040b068dd0e0d3acd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 07:29:36 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 24 Sep 2019 11:29:36 +0000 Subject: [issue38172] Python 3.8 Segfult with Bandersnatch pytest Suite In-Reply-To: <1568472460.87.0.817204992487.issue38172@roundup.psfhosted.org> Message-ID: <1569324576.62.0.407028581555.issue38172@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 07:42:08 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 24 Sep 2019 11:42:08 +0000 Subject: [issue38262] Mixins - super calls in bases of multiple-inheritance with different parameters In-Reply-To: <1569319893.51.0.228639226849.issue38262@roundup.psfhosted.org> Message-ID: <1569325328.49.0.302889148692.issue38262@roundup.psfhosted.org> Steven D'Aprano added the comment: Are your tests so huge that you need to gzip them before uploading? That makes them extremely difficult to read from the browser, and makes me extremely suspicious that this could be some form of zip bomb or other malware. Couldn't you upload a single .py file instead a shell script? You say that super() "cares about multiple inheritance as well as mixins" and then say "It is obvious, that such a class has to comply to the parents call interface - here object - when to be used standalone." I don't understand what you mean by "standalone" here, but to be clear, Python mixins are just regular classes. There is no difference between ordinary classes and mixin classes in Python, and they use the same multiple-inheritance method resolution order whether you think of them as "mixins" or "multiple inheritance". You say: "BUT when I ignore this and set intentionally a parameter - for test-purposes of mixins only - the resolution algorithm seems to normalize both for the final call without parameters - as soon as one of the mixins is a non-parameter call. This is independent from the inheritance order for the derived class." I am sorry, I cannot work out what you are saying here. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 07:43:23 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 24 Sep 2019 11:43:23 +0000 Subject: [issue38172] Python 3.8 Segfult with Bandersnatch pytest Suite In-Reply-To: <1568472460.87.0.817204992487.issue38172@roundup.psfhosted.org> Message-ID: <1569325403.64.0.783787461342.issue38172@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I am not sure about the difference between python 3.8-dev and nightly . The pipelines seem to have same configuration. The version on both pipelines is 3.8.0b4+ and the nightly build passes : https://travis-ci.org/pypa/bandersnatch/jobs/588664064 . Maybe getting the exact commit hash for the python version might help here in trying to replicate the issue under the environment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 07:57:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 11:57:19 +0000 Subject: [issue38172] Python 3.8 Segfult with Bandersnatch pytest Suite In-Reply-To: <1568472460.87.0.817204992487.issue38172@roundup.psfhosted.org> Message-ID: <1569326239.96.0.194504881262.issue38172@roundup.psfhosted.org> STINNER Victor added the comment: I suggest to wait one or two weeks, and if the bug doesn't reoccur: simply close the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 08:01:30 2019 From: report at bugs.python.org (=?utf-8?b?R8Opcnk=?=) Date: Tue, 24 Sep 2019 12:01:30 +0000 Subject: [issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse) In-Reply-To: <1279836939.11.0.811316280273.issue9334@psf.upfronthosting.co.za> Message-ID: <1569326490.19.0.445453481989.issue9334@roundup.psfhosted.org> Change by G?ry : ---------- nosy: +maggyero _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 08:03:19 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 12:03:19 +0000 Subject: [issue37896] test_multiprocessing_fork hangs on an IPv6-only host In-Reply-To: <1566325831.71.0.21098480947.issue37896@roundup.psfhosted.org> Message-ID: <1569326599.35.0.953198685587.issue37896@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 08:04:23 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 12:04:23 +0000 Subject: [issue37338] test_multiprocessing_forkserver, SemLock: test_thousand() logged on AMD64 Ubuntu Shared 3.x: Exception ignored in: In-Reply-To: <1560938260.28.0.194629990204.issue37338@roundup.psfhosted.org> Message-ID: <1569326663.36.0.410929565275.issue37338@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: test_multiprocessing_forkserver: test_thousand() logged on AMD64 Ubuntu Shared 3.x: Exception ignored in: -> test_multiprocessing_forkserver, SemLock: test_thousand() logged on AMD64 Ubuntu Shared 3.x: Exception ignored in: _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 08:06:09 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 12:06:09 +0000 Subject: [issue36342] test_venv failure when executed by test_multiprocessing and the platform lacks a functional sem_open() In-Reply-To: <1552903359.9.0.770761638832.issue36342@roundup.psfhosted.org> Message-ID: <1569326769.21.0.646258601084.issue36342@roundup.psfhosted.org> STINNER Victor added the comment: It seems like this issue has been fixed in the master branch. Reopen the issue if you consider that the fix should be backported. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 08:06:42 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Tue, 24 Sep 2019 12:06:42 +0000 Subject: [issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent() In-Reply-To: <1565985235.6.0.212314052144.issue37878@roundup.psfhosted.org> Message-ID: <1569326802.19.0.0923755015124.issue37878@roundup.psfhosted.org> Joannah Nanjekye added the comment: Update, Some user of this function just complained on the merged pull requests here : https://github.com/python/cpython/pull/15315#issuecomment-534522962. Do we revert and deprecate ? cc @victor ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 08:10:21 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 12:10:21 +0000 Subject: [issue34607] test_multiprocessing_forkserver is altering the environment on AMD64 FreeBSD 10.x Shared 3.7 In-Reply-To: <1536332520.99.0.56676864532.issue34607@psf.upfronthosting.co.za> Message-ID: <1569327021.87.0.37339158807.issue34607@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 08:14:50 2019 From: report at bugs.python.org (Charalampos Stratakis) Date: Tue, 24 Sep 2019 12:14:50 +0000 Subject: [issue38239] test_gdb fails on AMD64 Fedora Stable LTO 3.8 and AMD64 RHEL8 LTO 3.x: Unexpected gdb output In-Reply-To: <1569015160.3.0.923927814388.issue38239@roundup.psfhosted.org> Message-ID: <1569327290.49.0.829411443649.issue38239@roundup.psfhosted.org> Change by Charalampos Stratakis : ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 08:19:09 2019 From: report at bugs.python.org (Wenzel Jakob) Date: Tue, 24 Sep 2019 12:19:09 +0000 Subject: [issue37878] Sub-Interpreters : Document PyThreadState_DeleteCurrent() In-Reply-To: <1565985235.6.0.212314052144.issue37878@roundup.psfhosted.org> Message-ID: <1569327549.78.0.240728467566.issue37878@roundup.psfhosted.org> Wenzel Jakob added the comment: Hi, pybind11 developer here. A bit on context of our usage of this function: Pybind11 supports some advanced GIL-related tricks that *require* access this function. For instance, pybind11 can intercept a Python function call on the `main()` thread and delete the associated thread state, launching a new thread and continuing Python execution there (with a newly created thread state). Kind of crazy, but why is this useful? UI libraries. On some platforms, it is not legal to poll UI events on any thread other than the main thread. This means that it's impossible to implement a proper UI event loop because Python is hogging the main thread. With the functionality in pybind11's ``gil_scoped_acquire``, I can launch an event polling loop on the main thread, continue running an interactive Python session on another thread, and even swap them back e.g. when the user interface is no longer needed. Best, Wenzel ---------- nosy: +wenzel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 08:19:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 12:19:54 +0000 Subject: [issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x In-Reply-To: <1494628223.7.0.0775389696939.issue30356@psf.upfronthosting.co.za> Message-ID: <1569327594.27.0.922231360261.issue30356@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b0e1ae5f5430433766e023c1a6936aeba0f2b84e by Victor Stinner in branch 'master': bpo-37123: multiprocessing test_mymanager() accepts SIGTERM (GH-16349) https://github.com/python/cpython/commit/b0e1ae5f5430433766e023c1a6936aeba0f2b84e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 08:19:54 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 12:19:54 +0000 Subject: [issue37123] test_multiprocessing fails randomly on Windows In-Reply-To: <1559405131.96.0.0818992217462.issue37123@roundup.psfhosted.org> Message-ID: <1569327594.41.0.961088363576.issue37123@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b0e1ae5f5430433766e023c1a6936aeba0f2b84e by Victor Stinner in branch 'master': bpo-37123: multiprocessing test_mymanager() accepts SIGTERM (GH-16349) https://github.com/python/cpython/commit/b0e1ae5f5430433766e023c1a6936aeba0f2b84e ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 08:20:00 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 24 Sep 2019 12:20:00 +0000 Subject: [issue37123] test_multiprocessing fails randomly on Windows In-Reply-To: <1559405131.96.0.0818992217462.issue37123@roundup.psfhosted.org> Message-ID: <1569327600.12.0.774322330529.issue37123@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15930 pull_request: https://github.com/python/cpython/pull/16352 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 08:20:00 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 24 Sep 2019 12:20:00 +0000 Subject: [issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x In-Reply-To: <1494628223.7.0.0775389696939.issue30356@psf.upfronthosting.co.za> Message-ID: <1569327600.2.0.766259335517.issue30356@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15931 pull_request: https://github.com/python/cpython/pull/16352 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 08:20:12 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 24 Sep 2019 12:20:12 +0000 Subject: [issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x In-Reply-To: <1494628223.7.0.0775389696939.issue30356@psf.upfronthosting.co.za> Message-ID: <1569327612.36.0.94620813171.issue30356@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15933 pull_request: https://github.com/python/cpython/pull/16353 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 08:20:12 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 24 Sep 2019 12:20:12 +0000 Subject: [issue37123] test_multiprocessing fails randomly on Windows In-Reply-To: <1559405131.96.0.0818992217462.issue37123@roundup.psfhosted.org> Message-ID: <1569327612.3.0.397578849934.issue37123@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15932 pull_request: https://github.com/python/cpython/pull/16353 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 08:21:40 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 12:21:40 +0000 Subject: [issue38212] test_multiprocessing_spawn: test_queue_feeder_donot_stop_onexc() failed on x86 Windows7 3.x In-Reply-To: <1568798497.72.0.146892893981.issue38212@roundup.psfhosted.org> Message-ID: <1569327700.19.0.861354978642.issue38212@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 08:23:06 2019 From: report at bugs.python.org (Tal Einat) Date: Tue, 24 Sep 2019 12:23:06 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1569327786.81.0.341658453038.issue13153@roundup.psfhosted.org> Tal Einat added the comment: I can confirm that the crash from pasting these characters happens when trying to fetch the clipboard contents. We can override the built-in <> event, but then we have to get the clipboard's contents directly, and the only portable way to do that in the stdlib is via Tkinter's clipboard_get(). (For a non-stdlib solution, check out pyperclip on PyPI.) clipboard_get(), which I assume calls what Tk uses internally to handle the <> event, crashes in the C code with a UnicodeDecodeError. Here's a traceback from calling clipboard_get() with ? in the clipboard (Windows 10, recent master branch, i.e. to be 3.9): Exception in Tkinter callback Traceback (most recent call last): File "C:\Users\Tal\dev\cpython\lib\tkinter\__init__.py", line 1885, in __call__ return self.func(*args) File "C:\Users\Tal\dev\cpython\lib\idlelib\multicall.py", line 176, in handler r = l[i](event) File "C:\Users\Tal\dev\cpython\lib\idlelib\editor.py", line 618, in paste print(self.text.clipboard_get()) File "C:\Users\Tal\dev\cpython\lib\tkinter\__init__.py", line 867, in clipboard_get return self.tk.call(('clipboard', 'get') + self._options(kw)) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xed in position 0: invalid continuation byte >From a quick look, this appears to be happening in _tkinter.c, here: static PyObject * unicodeFromTclStringAndSize(const char *s, Py_ssize_t size) { PyObject *r = PyUnicode_DecodeUTF8(s, size, NULL); ... My guess is that Tk is passing the clipboard contents as-is, and we're simply not decoding it with the proper encoding (i.e. utf-16le on Windows). Is this something worth fixing / working around in Tkinter, e.g. by using a proper encoding depending on the platform for fetching clipboard contents? Or are we content to continue waiting for Tk to fix this? ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 08:34:34 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 24 Sep 2019 12:34:34 +0000 Subject: [issue38262] Mixins - super calls in bases of multiple-inheritance with different parameters In-Reply-To: <1569319893.51.0.228639226849.issue38262@roundup.psfhosted.org> Message-ID: <1569328474.65.0.34423262787.issue38262@roundup.psfhosted.org> Steven D'Aprano added the comment: I took the health of my PC into my hands *smiles* and unzipped your test cases. I don't know .sh scripts well, so I didn't run that (and Windows users won't be able to run it), but I looked at the Python scripts, and I think I have duplicated your test cases in a way that I find easier to understand. (Fewer files, more descriptive names, less code duplication.) ---------- Added file: https://bugs.python.org/file48622/mixin_tests.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 08:38:44 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 24 Sep 2019 12:38:44 +0000 Subject: [issue37123] test_multiprocessing fails randomly on Windows In-Reply-To: <1559405131.96.0.0818992217462.issue37123@roundup.psfhosted.org> Message-ID: <1569328724.55.0.613351717168.issue37123@roundup.psfhosted.org> miss-islington added the comment: New changeset 46f6c566a888fb637913ef71fed28568180eafb4 by Miss Islington (bot) in branch '3.7': bpo-37123: multiprocessing test_mymanager() accepts SIGTERM (GH-16349) https://github.com/python/cpython/commit/46f6c566a888fb637913ef71fed28568180eafb4 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 08:38:44 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 24 Sep 2019 12:38:44 +0000 Subject: [issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x In-Reply-To: <1494628223.7.0.0775389696939.issue30356@psf.upfronthosting.co.za> Message-ID: <1569328724.43.0.212574798437.issue30356@roundup.psfhosted.org> miss-islington added the comment: New changeset 46f6c566a888fb637913ef71fed28568180eafb4 by Miss Islington (bot) in branch '3.7': bpo-37123: multiprocessing test_mymanager() accepts SIGTERM (GH-16349) https://github.com/python/cpython/commit/46f6c566a888fb637913ef71fed28568180eafb4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 08:40:01 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 24 Sep 2019 12:40:01 +0000 Subject: [issue30356] test_mymanager_context() of test_multiprocessing_spawn: manager._process.exitcode=-15 on x86 Windows7 3.x In-Reply-To: <1494628223.7.0.0775389696939.issue30356@psf.upfronthosting.co.za> Message-ID: <1569328801.85.0.73306350754.issue30356@roundup.psfhosted.org> miss-islington added the comment: New changeset 081641fe520382d48ffead158ab528180f72017d by Miss Islington (bot) in branch '3.8': bpo-37123: multiprocessing test_mymanager() accepts SIGTERM (GH-16349) https://github.com/python/cpython/commit/081641fe520382d48ffead158ab528180f72017d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 08:40:01 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 24 Sep 2019 12:40:01 +0000 Subject: [issue37123] test_multiprocessing fails randomly on Windows In-Reply-To: <1559405131.96.0.0818992217462.issue37123@roundup.psfhosted.org> Message-ID: <1569328801.96.0.411928521343.issue37123@roundup.psfhosted.org> miss-islington added the comment: New changeset 081641fe520382d48ffead158ab528180f72017d by Miss Islington (bot) in branch '3.8': bpo-37123: multiprocessing test_mymanager() accepts SIGTERM (GH-16349) https://github.com/python/cpython/commit/081641fe520382d48ffead158ab528180f72017d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 08:40:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 12:40:17 +0000 Subject: [issue37123] test_multiprocessing fails randomly on Windows In-Reply-To: <1559405131.96.0.0818992217462.issue37123@roundup.psfhosted.org> Message-ID: <1569328817.08.0.523578904653.issue37123@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 08:54:27 2019 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 24 Sep 2019 12:54:27 +0000 Subject: [issue38140] Py_tp_dictoffset / Py_tp_finalize are unsettable in stable API In-Reply-To: <1568297060.68.0.400472303762.issue38140@roundup.psfhosted.org> Message-ID: <1569329667.71.0.491718676342.issue38140@roundup.psfhosted.org> Petr Viktorin added the comment: Thanks for the feature! This still needs documentation, however. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 08:58:08 2019 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 24 Sep 2019 12:58:08 +0000 Subject: [issue38140] Py_tp_dictoffset / Py_tp_finalize are unsettable in stable API In-Reply-To: <1568297060.68.0.400472303762.issue38140@roundup.psfhosted.org> Message-ID: <1569329888.34.0.577920750252.issue38140@roundup.psfhosted.org> Change by Petr Viktorin : ---------- pull_requests: +15934 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/16354 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 09:07:58 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 24 Sep 2019 13:07:58 +0000 Subject: [issue38262] Mixins - super calls in bases of multiple-inheritance with different parameters In-Reply-To: <1569319893.51.0.228639226849.issue38262@roundup.psfhosted.org> Message-ID: <1569330478.89.0.908773262261.issue38262@roundup.psfhosted.org> Steven D'Aprano added the comment: I'm not an expert on super and multiple inheritance, but let me see if I can explain what is going on. (Hopefully an expert will correct me if I get something wrong.) 1. The class C(A_With_Arg, B_With_Arg) is straight-forward: the super call inside A passes the True parameter to B, which passes it to object, which raises. 2. The class C(B_With_Arg, A_With_Arg) is the same, except B passes the parameter to A, which passes it to object, which raises. 3. The class C(A_With_Arg, B_Without_Arg) is also straight-forward: the super call inside A passes the True parameter to B, but B ignores it and passes nothing to object. 4. The class C(B_Without_Arg, A_With_Arg) is the tricky case. The super call inside B passes no arguments to A, so A gets the default value of False for its parameter. Since A's propagate parameter is False, it doesn't call super at all, object's __init__ method doesn't get called, and there's no exception. I've added another version, mixin_tests2.py, which hopefully makes it a bit easier to see what is happening. You said: "The 'super()' call propagates the call resolution by definition to the next level". I think this means that you expect that in class C(A, B), A.__init__ will call object.__init__, and B.__init__ will call object.__init__ as well. But that's not what happens. That's what Python 2 "classic classes" did, but it was buggy, because superclasses would be called *twice*. Perhaps it will help to read this: https://www.python.org/download/releases/2.3/mro/ So I believe that the behaviour you are seeing is correct, there is no error or bug. Do you agree? If so, we can close this issue. Otherwise, if you disagree and still believe this is a bug, please explain why you think it is a bug. ---------- Added file: https://bugs.python.org/file48623/mixin_tests2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 09:17:13 2019 From: report at bugs.python.org (Cooper Lees) Date: Tue, 24 Sep 2019 13:17:13 +0000 Subject: [issue38172] Python 3.8 Segfult with Bandersnatch pytest Suite In-Reply-To: <1568472460.87.0.817204992487.issue38172@roundup.psfhosted.org> Message-ID: <1569331033.81.0.459037863449.issue38172@roundup.psfhosted.org> Cooper Lees added the comment: https://docs.travis-ci.com/user/languages/python/ make no mention of the difference between "3.8-dev" and "nightly". I'd expect it to be latest released 3.8 alpha/beta and Trunk (or possibly trunk on 3.8 branch) respectively. Have reached out via Twitter (unable to see a contact anywhere on their website) to see if we can get clarity: https://twitter.com/cooperlees/status/1176485344553754624 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 10:17:37 2019 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 24 Sep 2019 14:17:37 +0000 Subject: [issue35540] dataclasses.asdict breaks with defaultdict fields In-Reply-To: <1545257204.19.0.788709270274.issue35540@psf.upfronthosting.co.za> Message-ID: <1569334657.14.0.801432584371.issue35540@roundup.psfhosted.org> Change by Paul Ganssle : ---------- pull_requests: +15935 pull_request: https://github.com/python/cpython/pull/16356 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 10:25:11 2019 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 24 Sep 2019 14:25:11 +0000 Subject: [issue35540] dataclasses.asdict breaks with defaultdict fields In-Reply-To: <1545257204.19.0.788709270274.issue35540@psf.upfronthosting.co.za> Message-ID: <1569335111.77.0.0707655824516.issue35540@roundup.psfhosted.org> Paul Ganssle added the comment: Considering that `namedtuple` is special-cased, I think it's reasonable to special-case `defaultdict` as well, though it may be worth considering more general solutions that will also work for things other than the standard library. One would be to solve this the same way that other "subclasses may have a different constructor" problems are solved (e.g. `float`, `int`, formerly `datetime`) and ignore the subclass (or selectively ignore it if it's a problem), for example changing _asdict_inner to something like this: if isinstance(obj, dict): new_keys = tuple((_asdict_inner(k, dict_factory), _asdict_inner(v, dict_factory)) for k, v in obj.items()) try: return type(obj)(new_keys) except Exception: return dict(new_keys) Another more general alternative would be to add a type registry for `asdict`, either as an additional parameter or with a new transformer class of some sort. I created a quick proof of concept for this in GH-16356 to see one way it could look. In any case I think it's quite unfortunate that we can't easily just support anything that has a __deepcopy__ defined. There may be some crazy solution that involves passing a class with a custom __getitem__ to the `memo` argument of copy.deepcopy, but if it's even possible (haven't thought about it enough) I'm not sure it's *advisable*. ---------- nosy: +p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 10:22:35 2019 From: report at bugs.python.org (Emmanuel Arias) Date: Tue, 24 Sep 2019 14:22:35 +0000 Subject: [issue38172] Python 3.8 Segfult with Bandersnatch pytest Suite In-Reply-To: <1568472460.87.0.817204992487.issue38172@roundup.psfhosted.org> Message-ID: <1569334955.91.0.158375637176.issue38172@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- nosy: +eamanu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 11:04:25 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 15:04:25 +0000 Subject: [issue35886] Move PyInterpreterState into Include/internal/pycore_pystate.h In-Reply-To: <1549069628.87.0.454232469964.issue35886@roundup.psfhosted.org> Message-ID: <1569337465.5.0.968130247025.issue35886@roundup.psfhosted.org> STINNER Victor added the comment: This change broke at least two projects: * Blender: access "interp->modules" but also "interp->builtins" * FreeCAD: access "interp->modules" It would be nice to document replacement solutions at: https://docs.python.org/dev/whatsnew/3.8.html#porting-to-python-3-8 * Replace "interp->modules" with PyImport_GetModuleDict() * Replace "interp->builtins" with PyEval_GetBuiltins() ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 11:05:17 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 15:05:17 +0000 Subject: [issue35886] Move PyInterpreterState into Include/internal/pycore_pystate.h In-Reply-To: <1549069628.87.0.454232469964.issue35886@roundup.psfhosted.org> Message-ID: <1569337517.79.0.44392118054.issue35886@roundup.psfhosted.org> STINNER Victor added the comment: Note: IMHO the "The PyInterpreterState struct has been moved into the ?internal? header files (...)" entry should be documented in the "Changes in the C API" section, rather than in the "Changes in the Python API" section of: https://docs.python.org/dev/whatsnew/3.8.html#porting-to-python-3-8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 11:11:51 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 15:11:51 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569337911.3.0.370303344077.issue38234@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15936 pull_request: https://github.com/python/cpython/pull/16357 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 11:30:18 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 24 Sep 2019 15:30:18 +0000 Subject: [issue38254] Pickle not deserializing an aiohttp ClientConnectorError exception as expected In-Reply-To: <1569175364.49.0.370257231179.issue38254@roundup.psfhosted.org> Message-ID: <1569339018.03.0.736032725916.issue38254@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: A simplified example to reproduce the issue as below. It seems that the OSError instance passed to the constructor is pickled such that during unpickling the string part of OSError 'unittest' is passed to the constructor instead of the original OSError object. import pickle ose = OSError(1, 'unittest') class SubOSError(OSError): def __init__(self, foo, os_error): super().__init__(os_error.errno, os_error.strerror) cce = SubOSError(1, ose) cce_pickled = pickle.dumps(cce) pickle.loads(cce_pickled) ./python.exe ../backups/bpo38254.py Traceback (most recent call last): File "/Users/karthikeyansingaravelan/stuff/python/cpython/../backups/bpo38254.py", line 12, in pickle.loads(cce_pickled) File "/Users/karthikeyansingaravelan/stuff/python/cpython/../backups/bpo38254.py", line 8, in __init__ super().__init__(os_error.errno, os_error.strerror) AttributeError: 'str' object has no attribute 'errno' ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 11:44:30 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 15:44:30 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569339870.51.0.860248026347.issue38234@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 1ce152a42eaa917d7763bce93f1e1ca72530d7ca by Victor Stinner in branch 'master': bpo-38234: Py_SetPath() uses the program full path (GH-16357) https://github.com/python/cpython/commit/1ce152a42eaa917d7763bce93f1e1ca72530d7ca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 11:47:10 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 24 Sep 2019 15:47:10 +0000 Subject: [issue36632] test_multiprocessing_forkserver: test_rapid_restart() leaked a dangling process on AMD64 FreeBSD 10-STABLE Non-Debug 3.x In-Reply-To: <1555326100.12.0.0433329524894.issue36632@roundup.psfhosted.org> Message-ID: <1569340030.74.0.133913237787.issue36632@roundup.psfhosted.org> Steve Dower added the comment: Hey Davin - could this be related to the new tests/restart support we added at the sprints? ---------- nosy: +davin, steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 11:56:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 15:56:28 +0000 Subject: [issue36632] test_multiprocessing_forkserver: test_rapid_restart() leaked a dangling process on AMD64 FreeBSD 10-STABLE Non-Debug 3.x In-Reply-To: <1555326100.12.0.0433329524894.issue36632@roundup.psfhosted.org> Message-ID: <1569340588.7.0.509912171958.issue36632@roundup.psfhosted.org> STINNER Victor added the comment: > Hey Davin - could this be related to the new tests/restart support we added at the sprints? I saw this issue for the first time last April, so it's unlikely to be a recent regression. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 12:01:00 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 16:01:00 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569340860.47.0.846971111015.issue38234@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15937 pull_request: https://github.com/python/cpython/pull/16358 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 12:21:08 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 16:21:08 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569342068.18.0.0458524636603.issue38234@roundup.psfhosted.org> STINNER Victor added the comment: New changeset bb6bf7d342b4503a6227fd209fac934905b6a1aa by Victor Stinner in branch 'master': bpo-38234: Add tests for Python init path config (GH-16358) https://github.com/python/cpython/commit/bb6bf7d342b4503a6227fd209fac934905b6a1aa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 12:56:54 2019 From: report at bugs.python.org (Eryk Sun) Date: Tue, 24 Sep 2019 16:56:54 +0000 Subject: [issue38258] ctypes ignores when a DLL function is called with too many arguments In-Reply-To: <1569249301.19.0.433627246846.issue38258@roundup.psfhosted.org> Message-ID: <1569344214.64.0.748905271071.issue38258@roundup.psfhosted.org> Eryk Sun added the comment: > Just out of curiosity, where is this data coming from? In general it's just random data on the stack. It's not worth investigating where this particular value comes from. It could be the low word of the address of a stack-allocated buffer, such as the buffer where ffi_call writes the return value. > This ONLY way to prevent things like this to happen is to actually > correctly configure the function: > ... > >>> mul_ints.argtypes = (ctypes.c_int16, ctypes.c_int16) Yes, the docs should explain that TypeError is raised for the wrong number of arguments when argtypes is assigned, and it should be noted that cdecl (CDLL) allows passing more (but not fewer) arguments than what argtypes defines. As I mentioned previously, we could extend this cdecl behavior to stdcall (WinDLL) for the x64 architecture, since it's caller cleanup like cdecl. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 12:59:24 2019 From: report at bugs.python.org (David Parks) Date: Tue, 24 Sep 2019 16:59:24 +0000 Subject: [issue38254] Pickle not deserializing an aiohttp ClientConnectorError exception as expected In-Reply-To: <1569175364.49.0.370257231179.issue38254@roundup.psfhosted.org> Message-ID: <1569344364.6.0.181178164934.issue38254@roundup.psfhosted.org> David Parks added the comment: An answer came in over the stack overflow question. https://stackoverflow.com/questions/58019939/attributeerror-str-object-has-no-attribute-errno/58084380#58084380 The issue is that OSError implements a custom __reduce__ function which needs to be override by the subclass when the arguments to the subclass are different than the parent. So no bug, just pickle subtlety. Passing it back to the aiohttp repo for a fix there. https://github.com/aio-libs/aiohttp/issues/4077 ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 13:04:59 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 24 Sep 2019 17:04:59 +0000 Subject: [issue38254] Pickle not deserializing an aiohttp ClientConnectorError exception as expected In-Reply-To: <1569175364.49.0.370257231179.issue38254@roundup.psfhosted.org> Message-ID: <1569344699.23.0.597520688684.issue38254@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: Thanks for the clarification and the answer link. I was also just debugging along the similar lines around how OSError.__reduce__ treats the arguments something like. Custom __reduce__ for aiohttp works as explained in the SO answer. class SubOSError(OSError): def __init__(self, foo, os_error, /): self.foo = foo self.os_error = os_error super().__init__(os_error.errno, os_error.strerror) def __reduce__(self): # Custom __reduce__ return (self.__class__, (self.foo, self.os_error )) def __reduce__(self): # OSError __reduce__ return (self.__class__, (self.os_error.errno, self.os_error.strerror )) ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 13:10:07 2019 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 24 Sep 2019 17:10:07 +0000 Subject: [issue38242] Revert the new asyncio Streams API In-Reply-To: <1569020325.08.0.390897413838.issue38242@roundup.psfhosted.org> Message-ID: <1569345007.01.0.124495964612.issue38242@roundup.psfhosted.org> Yury Selivanov added the comment: I slept on this and discussed this issue privately with a few non-involved people who use asyncio daily. My final opinion on this issue: we must revert the new streaming API from asyncio and take our time to design it properly. I don't like what we have in the 3.8 branch right now. I don't feel comfortable rushing decisions and doing last minute API changes. Andrew, do you want me to submit a PR or you can do it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 13:12:28 2019 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 24 Sep 2019 17:12:28 +0000 Subject: [issue35886] Move PyInterpreterState into Include/internal/pycore_pystate.h In-Reply-To: <1549069628.87.0.454232469964.issue35886@roundup.psfhosted.org> Message-ID: <1569345148.65.0.553156875601.issue35886@roundup.psfhosted.org> Change by Vinay Sajip : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 13:31:13 2019 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 24 Sep 2019 17:31:13 +0000 Subject: [issue36232] Improve error message on dbm.open In-Reply-To: <1552039612.76.0.91124690084.issue36232@roundup.psfhosted.org> Message-ID: <1569346273.71.0.514876284001.issue36232@roundup.psfhosted.org> Dong-hee Na added the comment: I think that this issue solved. Can we close this issue? ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 13:56:57 2019 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 24 Sep 2019 17:56:57 +0000 Subject: [issue38264] Makefile appears broken - touching header causes no build Message-ID: <1569347817.5.0.215967707465.issue38264@roundup.psfhosted.org> New submission from Vinay Sajip : There appears to be a failure in the Makefile build logic. Steps to reproduce: 1. Make a fresh build using "make clean && make" 2. run "touch Modules/_io/_iomodule.h" 3. Run "make" again. Observed result: No related files get built. Expected result: The directly including compilation units Modules/_io/{_iomodule,iobase,fileio,bufferedio,textio,bytesio,stringio}.o should be built. The compilation units which depend on these (e.g. Modules/textio.o) should also be built. The problem appears to be related to Modules/makesetup, which adds rules to tbe Makefile. An example of a rule is Modules/textio.o: $(srcdir)/Modules/_io/textio.c; $(CC) $(PY_BUILTIN_MODULE_CFLAGS) -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal -I$(srcdir)/Modules/_io -c $(srcdir)/Modules/_io/textio.c -o Modules/textio.o The problem here looks like the lack of a dependency between Modules/_io/textio.o and Modules/_io/textio.o - there is only a dependency on Modules/_io/textio.c, which wouldn't be rebuilt on a touch of Modules/_io/_iomodule.h. ---------- components: Build messages: 353105 nosy: vinay.sajip priority: high severity: normal status: open title: Makefile appears broken - touching header causes no build type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 13:58:39 2019 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 24 Sep 2019 17:58:39 +0000 Subject: [issue38264] Makefile appears broken - touching header causes no build In-Reply-To: <1569347817.5.0.215967707465.issue38264@roundup.psfhosted.org> Message-ID: <1569347919.39.0.737224835707.issue38264@roundup.psfhosted.org> Vinay Sajip added the comment: Problem also seems to occur in 3.8 and 3.7. ---------- versions: +Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 14:14:15 2019 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 24 Sep 2019 18:14:15 +0000 Subject: [issue38265] Update os.pread to accept the length type as size_t Message-ID: <1569348855.48.0.735036515408.issue38265@roundup.psfhosted.org> New submission from Dong-hee Na : I've found this comments. // TODO length should be size_t! but Python doesn't support parsing size_t yet. (https://github.com/python/cpython/blob/279f44678c8b84a183f9eeb85e0b086228154497/Modules/posixmodule.c#L8830) I don't know when this comment was created. But at this point, it seems to provide that functionality. It can be simply solved through the clinic. How about updating this argument to be size_t and remove the TODO comment? ---------- components: Library (Lib) messages: 353107 nosy: corona10, serhiy.storchaka, vstinner priority: normal severity: normal status: open title: Update os.pread to accept the length type as size_t versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 14:29:21 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 24 Sep 2019 18:29:21 +0000 Subject: [issue38265] Update os.pread to accept the length type as size_t In-Reply-To: <1569348855.48.0.735036515408.issue38265@roundup.psfhosted.org> Message-ID: <1569349761.71.0.348870747542.issue38265@roundup.psfhosted.org> Serhiy Storchaka added the comment: Length should be Py_ssize_t. Python does not support creating bytes objects larger than PY_SSIZE_T_MAX. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 14:38:50 2019 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 24 Sep 2019 18:38:50 +0000 Subject: [issue38265] Update os.pread to accept the length type as size_t In-Reply-To: <1569348855.48.0.735036515408.issue38265@roundup.psfhosted.org> Message-ID: <1569350330.07.0.152659838892.issue38265@roundup.psfhosted.org> Dong-hee Na added the comment: Oh okay! Thanks for letting me know. Is it okay to switch it into Py_ssize_t? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 14:42:40 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 24 Sep 2019 18:42:40 +0000 Subject: [issue38265] Update os.pread to accept the length type as size_t In-Reply-To: <1569348855.48.0.735036515408.issue38265@roundup.psfhosted.org> Message-ID: <1569350560.85.0.595135626034.issue38265@roundup.psfhosted.org> Serhiy Storchaka added the comment: I think it is okay. Just check that all platforms which support pread() (Linux, *BSD, macOS) pass the length as size_t instead of int. Windows does not always support length larger than 2 KiB, but it does not support pread() either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 14:56:04 2019 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 24 Sep 2019 18:56:04 +0000 Subject: [issue38265] Update os.pread to accept the length type as size_t In-Reply-To: <1569348855.48.0.735036515408.issue38265@roundup.psfhosted.org> Message-ID: <1569351364.01.0.515046659091.issue38265@roundup.psfhosted.org> Dong-hee Na added the comment: Linux: http://man7.org/linux/man-pages/man2/pread.2.html BSD: https://www.freebsd.org/cgi/man.cgi?pread(2) macOS: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/pread.2.html All of them pass the length as size_t instead of int. I will send the PR soon :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 15:06:17 2019 From: report at bugs.python.org (Alex Itkes) Date: Tue, 24 Sep 2019 19:06:17 +0000 Subject: [issue13743] xml.dom.minidom.Document class is not documented In-Reply-To: <1326114378.06.0.424770823698.issue13743@psf.upfronthosting.co.za> Message-ID: <1569351977.35.0.35877481744.issue13743@roundup.psfhosted.org> Alex Itkes added the comment: Although the Document, Element, etc. classes are well documented in online docs, it is sometimes easier to use pydoc to view the documentation. I think documentation strings should be included to these classes. Just created a PR adding some docstrings. ---------- keywords: +patch message_count: 3.0 -> 4.0 nosy: +alexitkes nosy_count: 4.0 -> 5.0 pull_requests: +15938 stage: needs patch -> patch review versions: +Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 pull_request: https://github.com/python/cpython/pull/16335 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 15:08:44 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 24 Sep 2019 19:08:44 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls In-Reply-To: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> Message-ID: <1569352124.42.0.397361846333.issue36871@roundup.psfhosted.org> miss-islington added the comment: New changeset b5a7a4f0c20717a4c92c371583b5521b83f40f32 by Miss Islington (bot) (Samuel Freilich) in branch 'master': bpo-36871: Handle spec errors in assert_has_calls (GH-16005) https://github.com/python/cpython/commit/b5a7a4f0c20717a4c92c371583b5521b83f40f32 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 15:09:43 2019 From: report at bugs.python.org (Alex Itkes) Date: Tue, 24 Sep 2019 19:09:43 +0000 Subject: [issue13743] xml.dom.minidom.Document class is not documented In-Reply-To: <1326114378.06.0.424770823698.issue13743@psf.upfronthosting.co.za> Message-ID: <1569352183.71.0.182914338715.issue13743@roundup.psfhosted.org> Change by Alex Itkes : ---------- pull_requests: -15938 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 15:10:14 2019 From: report at bugs.python.org (Alex Itkes) Date: Tue, 24 Sep 2019 19:10:14 +0000 Subject: [issue13743] xml.dom.minidom.Document class is not documented In-Reply-To: <1326114378.06.0.424770823698.issue13743@psf.upfronthosting.co.za> Message-ID: <1569352214.74.0.569942458405.issue13743@roundup.psfhosted.org> Change by Alex Itkes : ---------- pull_requests: +15939 pull_request: https://github.com/python/cpython/pull/16355 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 15:20:41 2019 From: report at bugs.python.org (Wenzel Jakob) Date: Tue, 24 Sep 2019 19:20:41 +0000 Subject: [issue38266] Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal Message-ID: <1569352841.72.0.766028949986.issue38266@roundup.psfhosted.org> New submission from Wenzel Jakob : A commit from a few days ago and discussed in issue #37878 removed an undocumented function PyThreadState_DeleteCurrent() from Python's public API. This function was exposed for good reasons and simply removing it because it is undocumented strikes me as a somewhat brutal solution to achieve documentation coverage. This function is useful -- even essential -- to delete the current thread's thread state, which cannot be done using the still-public PyThreadState_Delete(). The documentation could simply be a line stating this explicitly. I was asked to provide an example of an actual usage: this function is used by pybind11, which is a widely used library for creating Python bindings to C++ code. pybind11 only calls PyThreadState_DeleteCurrent() in a rare set of circumstances, but there is no alternative in this case. Specifically, pybind11 can intercept a Python function call on the main() thread and delete the associated thread state, launching a new thread and continuing Python execution there (with a newly created thread state). Kind of crazy, so why is this useful? The answer is UI libraries. On some platforms, it is not legal to poll UI events on any thread other than the main thread. This means that it's impossible to implement a proper asynchronous UI event loop because Python is hogging the main thread. With the functionality in pybind11's gil_scoped_acquire, it is possible can launch an event polling loop on the main thread, continue running an interactive Python REPL on another thread, and even swap them back e.g. when the user interface is no longer needed. Best, Wenzel ---------- components: Interpreter Core messages: 353114 nosy: eric.snow, nanjekyejoannah, ncoghlan, tcaswell, vstinner, wenzel priority: normal severity: normal status: open title: Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 15:31:44 2019 From: report at bugs.python.org (Kyle Stanley) Date: Tue, 24 Sep 2019 19:31:44 +0000 Subject: [issue38267] Add thread timeout for loop.shutdown_default_executor Message-ID: <1569353504.23.0.896727230476.issue38267@roundup.psfhosted.org> New submission from Kyle Stanley : Currently, for the recently added coroutine `loop.shutdown_default_executor()`, the executor shutdown can wait indefinitely for the threads to join. Under normal circumstances, waiting on the threads is appropriate, but there should be a timeout duration in the situation that the threads unable to finish joining. The motivation for this was based on the comments from Andrew Svetlov and Yury Selivanov in GH-16284. The original idea from Andrew was to add the timeout duration as a default for a new parameter in `asyncio.run()` and `loop.shutdown_default_executor()`. However, Yury would prefer for this to be defined as a constant instead and not as a parameter for `asyncio.run()` to avoid the creation of an excessive number of parameters to tweak for the user. I will attach a PR that adds the constant and the parameter for `loop.shutdown_default_executor()`, which will passed as an argument to `thread.join()`. ---------- messages: 353115 nosy: aeros167, asvetlov, yselivanov priority: normal severity: normal status: open title: Add thread timeout for loop.shutdown_default_executor versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 15:48:27 2019 From: report at bugs.python.org (Paul Ganssle) Date: Tue, 24 Sep 2019 19:48:27 +0000 Subject: [issue35540] dataclasses.asdict breaks with defaultdict fields In-Reply-To: <1545257204.19.0.788709270274.issue35540@psf.upfronthosting.co.za> Message-ID: <1569354507.89.0.562930811554.issue35540@roundup.psfhosted.org> Paul Ganssle added the comment: I checked and it appears that `attrs` handles this by creating *all* dicts using the default dict_factory (similar to my original suggestion of just using `dict` instead of the specific type), if I'm reading this right: https://github.com/python-attrs/attrs/blob/master/src/attr/_funcs.py#L102 Using `attr.asdict` seems to bear this out, as `defaultdict` attributes are converted to `dict` when the dict factory is not specified. I think changing the default behavior like that would be a backwards-incompatible change at this point (and one that it's really hard to warn about, unfortunately), but we could still use the "fall back to dict_factory" behavior by trying to construct a `type(obj)(...)` and in the case of an exception return `dict_factory(...)`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 16:10:03 2019 From: report at bugs.python.org (Joannah Nanjekye) Date: Tue, 24 Sep 2019 20:10:03 +0000 Subject: [issue38266] Revert bpo-37878: Make PyThreadState_DeleteCurrent() Internal In-Reply-To: <1569352841.72.0.766028949986.issue38266@roundup.psfhosted.org> Message-ID: <1569355803.58.0.587068150325.issue38266@roundup.psfhosted.org> Joannah Nanjekye added the comment: I am okay with the revert but @victor may still have some reservations on this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 16:21:41 2019 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 24 Sep 2019 20:21:41 +0000 Subject: [issue38265] Update os.pread to accept the length type as size_t In-Reply-To: <1569348855.48.0.735036515408.issue38265@roundup.psfhosted.org> Message-ID: <1569356501.34.0.00287926580387.issue38265@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +15940 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16359 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 16:23:27 2019 From: report at bugs.python.org (Kyle Stanley) Date: Tue, 24 Sep 2019 20:23:27 +0000 Subject: [issue38267] Add thread timeout for loop.shutdown_default_executor In-Reply-To: <1569353504.23.0.896727230476.issue38267@roundup.psfhosted.org> Message-ID: <1569356607.56.0.477562331177.issue38267@roundup.psfhosted.org> Change by Kyle Stanley : ---------- keywords: +patch pull_requests: +15941 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16360 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 16:36:47 2019 From: report at bugs.python.org (Samuel Freilich) Date: Tue, 24 Sep 2019 20:36:47 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls In-Reply-To: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> Message-ID: <1569357407.06.0.0233340363291.issue36871@roundup.psfhosted.org> Change by Samuel Freilich : ---------- keywords: +patch pull_requests: +15942 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/16361 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 16:54:49 2019 From: report at bugs.python.org (Arno-Can Uestuensoez) Date: Tue, 24 Sep 2019 20:54:49 +0000 Subject: [issue38262] Mixins - super calls in bases of multiple-inheritance with different parameters In-Reply-To: <1569319893.51.0.228639226849.issue38262@roundup.psfhosted.org> Message-ID: <1569358488.99.0.0622742110669.issue38262@roundup.psfhosted.org> Arno-Can Uestuensoez added the comment: Hey, first of all thank you for the fast reply. Your examples reinforce exactly my issue. I prefer the KISS principle in providing isolated use-cases for transparency without extras. Which is seperated reduced flat calls only. The other point is, I develop and test shared code for Python2.7(which will be out there for a while...) and Python3.5+, thus prefer shared syntax whenever possible. The "super()" interface has changed, using the shared syntax from 2.7.16: - Python2.7.16: super(type[, object-or-type]) - Python3.7.4: super([type[, object-or-type]]) The test of your code with Python 2.7.16 requires modification. You are right with the case 4, this is the actual issue related to the MRO and the parameter passing. I did not ask for the number of calls of the common base classes, but the passing of the parameters. The call order/MRO is OK, but I doubt the passed parameter signatures. My basic assumption here is that the call routing by MRO should or even must not be intermixed with the actually passed call parameters. So I added the output of your example for "mixin_tests2.py" for Python3.6.5, tested for Python3.7.0 too. #-------------- (3.6.5) [acue at lap001 test-modified]$ python mixin_tests2.py ============================== C MRO: ['C', 'A_With_Arg', 'B_With_Arg', 'MyBase', 'object'] C:C True A_With_Arg:C True call super().__init__ with argument B_With_Arg:C True call super().__init__ with argument MyBase received 1 arguments TypeError('object.__init__() takes no parameters',) ============================== C MRO: ['C', 'B_With_Arg', 'A_With_Arg', 'MyBase', 'object'] C:C True B_With_Arg:C True call super().__init__ with argument A_With_Arg:C True call super().__init__ with argument MyBase received 1 arguments TypeError('object.__init__() takes no parameters',) ============================== C MRO: ['C', 'A_With_Arg', 'B_Without_Arg', 'MyBase', 'object'] C:C True A_With_Arg:C True call super().__init__ with argument B_Without_Arg:C True call super().__init__ without argument MyBase received 0 arguments success ============================== C MRO: ['C', 'B_Without_Arg', 'A_With_Arg', 'MyBase', 'object'] C:C True B_Without_Arg:C True call super().__init__ without argument A_With_Arg:C False success (3.6.5) [acue at lap001 test-modified]$ #----------------------- Or reduced to the focus of the actual issue and depicted the actual passed parameters. See the following "Case 4 - same as mixin_C_is_B0A1" for the essential question. ============================== Case 0 - same as mixin_C_is_A1B1 A_With_Arg:C True B_With_Arg:C True TypeError('object.__init__() takes no parameters',) Resulting in: C.__init__(True) A_With_Arg.__init__(True) B_With_Arg.__init__(True) MyBase.__init__(True) object.__init__(True) Comment: The TypeError is expected and OK. ============================== Case 1 - same as mixin_C_is_B1A1 B_With_Arg:C True A_With_Arg:C True TypeError('object.__init__() takes no parameters',) Resulting in: C.__init__(True) B_With_Arg.__init__(True) A_With_Arg.__init__(True) MyBase.__init__(True) object.__init__(True) Comment: The TypeError is expected and OK. ============================== Case 2 - same as mixin_C_is_A1B0 A_With_Arg:C True B_Without_Arg:C True MyBase received 0 arguments success Comment: The success is expected and OK. The actual call due to MRO is: C(A_With_Arg(), B_Without_Arg()) Resulting in: C.__init__(True) A_With_Arg.__init__(True) B_Without_Arg.__init__(True) MyBase.__init__(False) object.__init__() Remark: I assume, that the single call of "object.__init__()" is here intentional. ============================== Case 4 - same as mixin_C_is_B0A1 B_Without_Arg:C True A_With_Arg:C False success Comment: The success is NOT expected and as far as I can see should be treated as an Error so NOK. The actual call is: C(B_Without_Arg(), A_With_Arg()) Resulting in: Seemingly the behaviour is: C.__init__(True) B_Without_Arg.__init__(True) A_With_Arg.__init__(False) This means the call of "super(B, self).__init__()" within "B.__init__()" defines the call parameters of "A.__init__()". Even though I expect the call order as routed by the MRO, I did not expected the parameters of A to be passed from the sibling class B, but as defined by the base class C. Thus the following: C.__init__(True) B_Without_Arg() A_With_Arg.__init__(True) object.__init__(True) # this is the behaviour I expect # due to the MRO and the # parameters passed from the # base class Remark: I assume, that the single call of "object.__init__()" is here intentional. #----------------------- The essential part I doubt is given by the case 4 / same as mixin_C_is_B0A1, where the call parameter of A is defined by the sibling B, instead of by the base class C. The routing of the call order is OK. My remark with "standalone call" depicts the fact, that instanciating e.g. only your class "A_With_Arg(True)" will raise in any case a TypeError, but using it in the context "C(A_With_Arg(), B_Without_Arg())" may not because the call of the "object" class follows the right-most mixin. But anyhow, this means different parameters by the "suppressed" left-side classes/alls would be silently suppressed. Resulting from the case 4, I tend to see the aspect of the parameter passing as erroneous. ---------- Added file: https://bugs.python.org/file48624/mixin_C_is_B0A1.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 17:48:05 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 24 Sep 2019 21:48:05 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1569361685.57.0.513063476724.issue13153@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +15943 pull_request: https://github.com/python/cpython/pull/16363 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 17:58:30 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 24 Sep 2019 21:58:30 +0000 Subject: [issue36587] race in logging code when fork() In-Reply-To: <1554905678.69.0.300642105392.issue36587@roundup.psfhosted.org> Message-ID: <1569362310.91.0.474282223228.issue36587@roundup.psfhosted.org> Gregory P. Smith added the comment: i don't have context for what test was needed where anymore, but https://github.com/python/cpython/pull/12704 removed the _at_fork_acquire_release_weakset. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 18:04:32 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 24 Sep 2019 22:04:32 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls In-Reply-To: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> Message-ID: <1569362672.62.0.160570390876.issue36871@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 2180f6b058effbf49ec819f7cedbe76ddd4b700c by Gregory P. Smith (Samuel Freilich) in branch 'master': bpo-36871: Avoid duplicated 'Actual:' in assertion message (GH-16361) https://github.com/python/cpython/commit/2180f6b058effbf49ec819f7cedbe76ddd4b700c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 18:05:53 2019 From: report at bugs.python.org (miss-islington) Date: Tue, 24 Sep 2019 22:05:53 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls In-Reply-To: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> Message-ID: <1569362753.82.0.407929605836.issue36871@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15944 pull_request: https://github.com/python/cpython/pull/16364 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 18:08:50 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 24 Sep 2019 22:08:50 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1569362930.39.0.0542636738688.issue13153@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +15945 pull_request: https://github.com/python/cpython/pull/16365 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 18:11:52 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 24 Sep 2019 22:11:52 +0000 Subject: [issue38239] test_gdb fails on AMD64 Fedora Stable LTO 3.8 and AMD64 RHEL8 LTO 3.x: Unexpected gdb output In-Reply-To: <1569015160.3.0.923927814388.issue38239@roundup.psfhosted.org> Message-ID: <1569363112.91.0.13061128382.issue38239@roundup.psfhosted.org> Gregory P. Smith added the comment: The test probably has a fragile regex. I don't spend time with gdb things much myself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 18:12:24 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 24 Sep 2019 22:12:24 +0000 Subject: [issue38239] test_gdb fails on AMD64 Fedora Stable LTO 3.8 and AMD64 RHEL8 LTO 3.x: Unexpected gdb output In-Reply-To: <1569015160.3.0.923927814388.issue38239@roundup.psfhosted.org> Message-ID: <1569363144.99.0.775284925832.issue38239@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- nosy: -gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 18:14:19 2019 From: report at bugs.python.org (ppperry) Date: Tue, 24 Sep 2019 22:14:19 +0000 Subject: [issue38262] Mixins - super calls in bases of multiple-inheritance with different parameters In-Reply-To: <1569319893.51.0.228639226849.issue38262@roundup.psfhosted.org> Message-ID: <1569363259.11.0.75245853958.issue38262@roundup.psfhosted.org> Change by ppperry : ---------- type: compile error -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 18:38:20 2019 From: report at bugs.python.org (Steve Dower) Date: Tue, 24 Sep 2019 22:38:20 +0000 Subject: [issue38239] test_gdb fails on AMD64 Fedora Stable LTO 3.8 and AMD64 RHEL8 LTO 3.x: Unexpected gdb output In-Reply-To: <1569015160.3.0.923927814388.issue38239@roundup.psfhosted.org> Message-ID: <1569364700.16.0.515670389576.issue38239@roundup.psfhosted.org> Steve Dower added the comment: Um, okay then. The test already includes this: if ((sysconfig.get_config_var('PGO_PROF_USE_FLAG') or 'xxx') in (sysconfig.get_config_var('PY_CORE_CFLAGS') or '')): raise unittest.SkipTest("test_gdb is not reliable on PGO builds") Apparently this no longer works. Who understands these variables enough to fix the issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 19:15:00 2019 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 24 Sep 2019 23:15:00 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1569366900.87.0.842367752259.issue13153@roundup.psfhosted.org> Terry J. Reedy added the comment: Recap: IDLE 3.x on Windows exits with UnicodeDecodeError when pasting into editor, grep, or shell window a non-BMP astral character such as ? '\U000104a2', ?, ? '\U0001F40D', or ? '\U0001F431' UTF-8 b'\xf0\x9f\x90\xb1', UTF-16LI b'\x3d\xd8\x31\xdc'. Display issues are not directly of this issue. The exact error message has varied with the python version, but all likely result from the same error. 3.2 msg145581: traceback PyShell.main(), root.mainloop(), tk,mainloop(). 'utf8' codec can't decode bytes in position 1-2: invalid continuation byte 3.3 msg177750: traceback starts with two calls in new runpy module. 'utf-8' codec can't decode bytes in position 0-2: invalid continuation byte 3.6 to now: same traceback 'utf-8' codec can't decode byte 0xed in position 0: invalid continuation byte The initial byte is 0xed regardless of which astral char above is pasted. Tal, if the problem were utf-8 decoding uft-16le bytes, the initial byte in the error message for astral chars would (usually) be 0xd8, and there would be problems with BMP chars also. In msg145584, I speculated that the problem might be trying to decode a now illegal utf-8 encoding of a surrogate character. In msg145605, Ezio said that the first surrogate would be '\ud801' and showed that the 2.7 utf-8 'encoding' of that is b'\xed\xa0\x81' and that trying to decode that give the 3.2 error above, but with '0-1' instead of '1-2'. (0xed is the utf-8 start byte for any BMP char and continuation bytes that map to the surrogate blocks, and some others, are now invalid.) Today, b'\xed\xa0\x81'.decode('utf-8') gives exactly the current message above. In msg254165, I noted that pasting copied astral chars into a plain Text widget works in the sense that there is no error. (For me, ? is replaced by two replacement chars and the others are shown without colors, but this depends on OS and font.) I just verified this same for Entry widgets in IDLE dialogs and the Font settings sample text. As Serhiy said in msg254165, Left x 2 is needed to move back past the char and Backspace x 2 to delete it. (For me, only 1 Right is needed to move forward past the char.) But Serhiy also showed that once an astral char *is* displayed, it cannot be properly retrieved. So the question is, if windows puts utf-16le surrogates on the clipboard, and they can be pasted and displayed some in a Text, why is something trying to utf-8 decode the utf-8 encoding of each surrogate when pasting into IDLE's augmented text? In msg207381, Serhiy claimed "The root of issue is in converting strings when passed to Python-implemented callbacks. When a text is pasted in IDLE window, the callback is called (for highlighting). ...". He goes on to explain that tcl *does* encode surrogates to modified utf-8 before passing to them to callbacks and claimed that tkinter_pythoncmd_args_2.patch should fix this. Disabling Colorizer is not enough to allow astral pasting. See PR 16365. Whatever Serhiy's patch did 5 years ago, my copy does not work now. See PR 16365. Tal, we augment the x11 paste callback in pyshell.fix_x11_paste. There is no unittest and we would have to not break this with further change. I have thought about replacing the paste callback with clipboard_get, but worried that we might not be able to replicate what the system-specific tcl/tk/C code does. That sometimes includes displaying the actual astral character. I presume that tcl just passes the clipboard bytes to the graphics system, which we cannot do from python. Anyway, you have shown that clipboard.get does not currently work as we might want. From what Serhiy has said, char *s points to invalid utf-8 bytes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 19:50:05 2019 From: report at bugs.python.org (STINNER Victor) Date: Tue, 24 Sep 2019 23:50:05 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569369005.92.0.0679687749078.issue38234@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15946 pull_request: https://github.com/python/cpython/pull/16366 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 20:10:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Sep 2019 00:10:38 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569370238.61.0.237500917849.issue38234@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 52ad33abbfb6637d74932617c7013bae0ccf6e32 by Victor Stinner in branch 'master': bpo-38234: test_embed: test pyvenv.cfg and pybuilddir.txt (GH-16366) https://github.com/python/cpython/commit/52ad33abbfb6637d74932617c7013bae0ccf6e32 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 20:17:23 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 25 Sep 2019 00:17:23 +0000 Subject: [issue38262] Mixins - super calls in bases of multiple-inheritance with different parameters In-Reply-To: <1569319893.51.0.228639226849.issue38262@roundup.psfhosted.org> Message-ID: <1569370643.06.0.15868020681.issue38262@roundup.psfhosted.org> Steven D'Aprano added the comment: Apologies for the Python 2.7 incompatible syntax, I hadn't noticed that you had selected 2.7. But since 2.7 (and 3.8) are in feature freeze, any behavoural changes can only apply to 3.9 or later. I'm afraid that you haven't explained why you think the code is buggy. Does the behaviour differ from the documented behaviour in any way? "My basic assumption here is that the call routing by MRO should or even must not be intermixed with the actually passed call parameters." I'm afraid I don't understand this. "Remark: I assume, that the single call of "object.__init__()" is here intentional." Of course it is intentional, as calling a superclass method twice is incorrect behaviour. You cannot expect that all superclass methods are idempotent. Obviously, in the case of ``object`` itself, there's no harm in calling __init__ twice but think about superclasses that have side-effects, or do expensive processing, and aren't idempotent. If you call them twice in the inheritance chain, bad things can happen. Which is why languages that support multiple inheritance generally require that the MRO is linearized so that each superclass is called once and exactly once. That was the problem with Python 2 classic classes and fixing it was one of the motivations of introducing so-called "new style classes" and object. See the link I provided in my previous comment, and also: https://courses.cs.northwestern.edu/325/readings/inheritance.php Unless you can explain how and why this behaviour differs from the documented behaviour, I'm going to close this as "Not a bug". If you want to argue that the C3 linearization algorithm is "wrong", you probably should take that to the Python-Dev mailing list. The argument by KISS is probably not going to be enough: it is more important for code to be *correct* than to be simple, and the simple multiple inheritance algorithm is demonstrably incorrect. ---------- versions: +Python 3.9 -Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 20:29:20 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 25 Sep 2019 00:29:20 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls In-Reply-To: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> Message-ID: <1569371360.23.0.720324959495.issue36871@roundup.psfhosted.org> miss-islington added the comment: New changeset 1a17a054f6314ce29cd2632c28aeed317a615360 by Miss Islington (bot) in branch '3.8': [3.8] bpo-36871: Handle spec errors in assert_has_calls (GH-16005) (GH-16364) https://github.com/python/cpython/commit/1a17a054f6314ce29cd2632c28aeed317a615360 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 20:32:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Sep 2019 00:32:42 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569371562.69.0.74848615039.issue38234@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15947 pull_request: https://github.com/python/cpython/pull/16367 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 20:41:18 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Sep 2019 00:41:18 +0000 Subject: [issue38239] test_gdb fails on AMD64 Fedora Stable LTO 3.8 and AMD64 RHEL8 LTO 3.x: Unexpected gdb output In-Reply-To: <1569015160.3.0.923927814388.issue38239@roundup.psfhosted.org> Message-ID: <1569372078.14.0.743659471498.issue38239@roundup.psfhosted.org> STINNER Victor added the comment: > Apparently this no longer works. Who understands these variables enough to fix the issue? Some failures are LTO + PGO builds, but test_gdb also fails on LTO without PGO builds. The PGO_PROF_USE_FLAG check only checks for PGO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 20:54:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Sep 2019 00:54:28 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569372868.39.0.525817009084.issue38234@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 221fd84703c545408bbb4a6e0b58459651331f5c by Victor Stinner in branch 'master': bpo-38234: Cleanup getpath.c (GH-16367) https://github.com/python/cpython/commit/221fd84703c545408bbb4a6e0b58459651331f5c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 20:57:20 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Sep 2019 00:57:20 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569373040.64.0.609619743894.issue38234@roundup.psfhosted.org> STINNER Victor added the comment: The new tests fail on macOS. x86-64 High Sierra 3.x: https://buildbot.python.org/all/#/builders/145/builds/2469 ====================================================================== FAIL: test_init_pybuilddir (test.test_embed.InitConfigTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib/test/test_embed.py", line 1130, in test_init_pybuilddir self.check_all_configs("test_init_compat_config", config, File "/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib/test/test_embed.py", line 681, in check_all_configs self.check_config(configs, expected_config) File "/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib/test/test_embed.py", line 613, in check_config self.assertEqual(config, expected) AssertionError: {'_co[655 chars]ne, 'module_search_paths': ['/Users/buildbot/b[1407 chars]': 1} != {'_co[655 chars]ne, 'executable': '/var/folders/sy/9hwmqyx14s1[1383 chars]': 1} {'_config_init': 1, '_init_main': 1, '_install_importlib': 1, 'argv': [''], 'base_exec_prefix': '/Users/buildbot/buildarea/3.x.billenstein-sierra/build/target', - 'base_executable': '/private/var/folders/sy/9hwmqyx14s11577cvgzwf2v40000gt/T/tmp2a98rb5k/_testembed', ? -------- + 'base_executable': '/var/folders/sy/9hwmqyx14s11577cvgzwf2v40000gt/T/tmp2a98rb5k/_testembed', 'base_prefix': '/Users/buildbot/buildarea/3.x.billenstein-sierra/build/target', 'buffered_stdio': 1, 'bytes_warning': 0, 'check_hash_pycs_mode': 'default', 'configure_c_stdio': 0, 'dev_mode': 0, 'dump_refs': 0, 'exec_prefix': '/Users/buildbot/buildarea/3.x.billenstein-sierra/build/target', - 'executable': '/private/var/folders/sy/9hwmqyx14s11577cvgzwf2v40000gt/T/tmp2a98rb5k/_testembed', ? -------- + 'executable': '/var/folders/sy/9hwmqyx14s11577cvgzwf2v40000gt/T/tmp2a98rb5k/_testembed', 'faulthandler': 0, 'hash_seed': 0, 'home': None, 'import_time': 0, 'inspect': 0, 'install_signal_handlers': 1, 'interactive': 0, 'isolated': 0, 'malloc_stats': 0, 'module_search_paths': ['/Users/buildbot/buildarea/3.x.billenstein-sierra/build/target/lib/python39.zip', '/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib', '/Users/buildbot/buildarea/3.x.billenstein-sierra/build/build/lib.macosx-10.13-x86_64-3.9-pydebug', '/Users/buildbot/buildarea/3.x.billenstein-sierra/build/target/lib/python39.zip', '/Users/buildbot/buildarea/3.x.billenstein-sierra/build/target/lib/python3.9', - '/private/var/folders/sy/9hwmqyx14s11577cvgzwf2v40000gt/T/tmp2a98rb5k/libdir'], ? -------- + '/var/folders/sy/9hwmqyx14s11577cvgzwf2v40000gt/T/tmp2a98rb5k/libdir'], 'optimization_level': 0, 'parse_argv': 0, 'parser_debug': 0, 'pathconfig_warnings': 1, 'prefix': '/Users/buildbot/buildarea/3.x.billenstein-sierra/build/target', 'program_name': './_testembed', 'pycache_prefix': None, 'pythonpath_env': '/Users/buildbot/buildarea/3.x.billenstein-sierra/build/target/lib/python39.zip:/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib:/Users/buildbot/buildarea/3.x.billenstein-sierra/build/build/lib.macosx-10.13-x86_64-3.9-pydebug', 'quiet': 0, 'run_command': None, 'run_filename': None, 'run_module': None, 'show_alloc_count': 0, 'show_ref_count': 0, 'site_import': 1, 'skip_source_first_line': 0, 'tracemalloc': 0, 'use_environment': 1, 'use_hash_seed': 0, 'user_site_directory': 1, 'verbose': 0, 'warnoptions': [], 'write_bytecode': 1, 'xoptions': []} ====================================================================== FAIL: test_init_pyvenv_cfg (test.test_embed.InitConfigTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib/test/test_embed.py", line 1182, in test_init_pyvenv_cfg self.check_all_configs("test_init_compat_config", config, File "/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib/test/test_embed.py", line 681, in check_all_configs self.check_config(configs, expected_config) File "/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib/test/test_embed.py", line 613, in check_config self.assertEqual(config, expected) AssertionError: {'_co[655 chars]ne, 'module_search_paths': ['/Users/buildbot/b[1416 chars]': 1} != {'_co[655 chars]ne, 'executable': '/var/folders/sy/9hwmqyx14s1[1400 chars]': 1} {'_config_init': 1, '_init_main': 1, '_install_importlib': 1, 'argv': [''], 'base_exec_prefix': '/var/folders/sy/9hwmqyx14s11577cvgzwf2v40000gt/T/tmprrz3csek', - 'base_executable': '/private/var/folders/sy/9hwmqyx14s11577cvgzwf2v40000gt/T/tmpczgnz4r3/_testembed', ? -------- + 'base_executable': '/var/folders/sy/9hwmqyx14s11577cvgzwf2v40000gt/T/tmpczgnz4r3/_testembed', 'base_prefix': '/Users/buildbot/buildarea/3.x.billenstein-sierra/build/target', 'buffered_stdio': 1, 'bytes_warning': 0, 'check_hash_pycs_mode': 'default', 'configure_c_stdio': 0, 'dev_mode': 0, 'dump_refs': 0, 'exec_prefix': '/var/folders/sy/9hwmqyx14s11577cvgzwf2v40000gt/T/tmprrz3csek', - 'executable': '/private/var/folders/sy/9hwmqyx14s11577cvgzwf2v40000gt/T/tmpczgnz4r3/_testembed', ? -------- + 'executable': '/var/folders/sy/9hwmqyx14s11577cvgzwf2v40000gt/T/tmpczgnz4r3/_testembed', 'faulthandler': 0, 'hash_seed': 0, 'home': None, 'import_time': 0, 'inspect': 0, 'install_signal_handlers': 1, 'interactive': 0, 'isolated': 0, 'malloc_stats': 0, 'module_search_paths': ['/Users/buildbot/buildarea/3.x.billenstein-sierra/build/target/lib/python39.zip', '/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib', '/Users/buildbot/buildarea/3.x.billenstein-sierra/build/build/lib.macosx-10.13-x86_64-3.9-pydebug', '/Users/buildbot/buildarea/3.x.billenstein-sierra/build/target/lib/python39.zip', '/Users/buildbot/buildarea/3.x.billenstein-sierra/build/target/lib/python3.9', '/var/folders/sy/9hwmqyx14s11577cvgzwf2v40000gt/T/tmprrz3csek/lib/python3.9/lib-dynload'], 'optimization_level': 0, 'parse_argv': 0, 'parser_debug': 0, 'pathconfig_warnings': 1, 'prefix': '/Users/buildbot/buildarea/3.x.billenstein-sierra/build/target', 'program_name': './_testembed', 'pycache_prefix': None, 'pythonpath_env': '/Users/buildbot/buildarea/3.x.billenstein-sierra/build/target/lib/python39.zip:/Users/buildbot/buildarea/3.x.billenstein-sierra/build/Lib:/Users/buildbot/buildarea/3.x.billenstein-sierra/build/build/lib.macosx-10.13-x86_64-3.9-pydebug', 'quiet': 0, 'run_command': None, 'run_filename': None, 'run_module': None, 'show_alloc_count': 0, 'show_ref_count': 0, 'site_import': 1, 'skip_source_first_line': 0, 'tracemalloc': 0, 'use_environment': 1, 'use_hash_seed': 0, 'user_site_directory': 1, 'verbose': 0, 'warnoptions': [], 'write_bytecode': 1, 'xoptions': []} ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 20:58:32 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Sep 2019 00:58:32 +0000 Subject: [issue38234] The value of Py_SetPath is not used to populate the configuration In-Reply-To: <1568992794.36.0.557367208602.issue38234@roundup.psfhosted.org> Message-ID: <1569373112.99.0.661307093874.issue38234@roundup.psfhosted.org> STINNER Victor added the comment: And on FreeBSD. AMD64 FreeBSD CURRENT Shared 3.x: https://buildbot.python.org/all/#/builders/168/builds/1510 ====================================================================== FAIL: test_init_pybuilddir (test.test_embed.InitConfigTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_embed.py", line 1130, in test_init_pybuilddir self.check_all_configs("test_init_compat_config", config, File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_embed.py", line 681, in check_all_configs self.check_config(configs, expected_config) File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_embed.py", line 613, in check_config self.assertEqual(config, expected) AssertionError: {'_co[671 chars]ne, 'module_search_paths': ['/usr/home/buildbo[1297 chars]': 1} != {'_co[671 chars]ne, 'executable': '/tmp/tmpsa4mgwz2/_testembed[1285 chars]': 1} {'_config_init': 1, '_init_main': 1, '_install_importlib': 1, 'argv': [''], 'base_exec_prefix': '/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/target', - 'base_executable': '/var/tmp/tmpsa4mgwz2/_testembed', ? ---- + 'base_executable': '/tmp/tmpsa4mgwz2/_testembed', 'base_prefix': '/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/target', 'buffered_stdio': 1, 'bytes_warning': 0, 'check_hash_pycs_mode': 'default', 'configure_c_stdio': 0, 'dev_mode': 0, 'dump_refs': 0, 'exec_prefix': '/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/target', - 'executable': '/var/tmp/tmpsa4mgwz2/_testembed', ? ---- + 'executable': '/tmp/tmpsa4mgwz2/_testembed', 'faulthandler': 0, 'hash_seed': 0, 'home': None, 'import_time': 0, 'inspect': 0, 'install_signal_handlers': 1, 'interactive': 0, 'isolated': 0, 'malloc_stats': 0, 'module_search_paths': ['/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/target/lib/python39.zip', '/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib', '/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/build/lib.freebsd-13.0-CURRENT-amd64-3.9-pydebug', '/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/target/lib/python39.zip', '/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/target/lib/python3.9', - '/var/tmp/tmpsa4mgwz2/libdir'], ? ---- + '/tmp/tmpsa4mgwz2/libdir'], 'optimization_level': 0, 'parse_argv': 0, 'parser_debug': 0, 'pathconfig_warnings': 1, 'prefix': '/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/target', 'program_name': './_testembed', 'pycache_prefix': None, 'pythonpath_env': '/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/target/lib/python39.zip:/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib:/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/build/lib.freebsd-13.0-CURRENT-amd64-3.9-pydebug', 'quiet': 0, 'run_command': None, 'run_filename': None, 'run_module': None, 'show_alloc_count': 0, 'show_ref_count': 0, 'site_import': 1, 'skip_source_first_line': 0, 'tracemalloc': 0, 'use_environment': 1, 'use_hash_seed': 0, 'user_site_directory': 1, 'verbose': 0, 'warnoptions': [], 'write_bytecode': 1, 'xoptions': []} ====================================================================== FAIL: test_init_pyvenv_cfg (test.test_embed.InitConfigTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_embed.py", line 1182, in test_init_pyvenv_cfg self.check_all_configs("test_init_compat_config", config, File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_embed.py", line 681, in check_all_configs self.check_config(configs, expected_config) File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_embed.py", line 613, in check_config self.assertEqual(config, expected) AssertionError: {'_co[671 chars]ne, 'module_search_paths': ['/usr/home/buildbo[1216 chars]': 1} != {'_co[671 chars]ne, 'executable': '/tmp/tmpszvtbyq4/_testembed[1208 chars]': 1} {'_config_init': 1, '_init_main': 1, '_install_importlib': 1, 'argv': [''], 'base_exec_prefix': '/tmp/tmpr0gyjdqs', - 'base_executable': '/var/tmp/tmpszvtbyq4/_testembed', ? ---- + 'base_executable': '/tmp/tmpszvtbyq4/_testembed', 'base_prefix': '/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/target', 'buffered_stdio': 1, 'bytes_warning': 0, 'check_hash_pycs_mode': 'default', 'configure_c_stdio': 0, 'dev_mode': 0, 'dump_refs': 0, 'exec_prefix': '/tmp/tmpr0gyjdqs', - 'executable': '/var/tmp/tmpszvtbyq4/_testembed', ? ---- + 'executable': '/tmp/tmpszvtbyq4/_testembed', 'faulthandler': 0, 'hash_seed': 0, 'home': None, 'import_time': 0, 'inspect': 0, 'install_signal_handlers': 1, 'interactive': 0, 'isolated': 0, 'malloc_stats': 0, 'module_search_paths': ['/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/target/lib/python39.zip', '/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib', '/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/build/lib.freebsd-13.0-CURRENT-amd64-3.9-pydebug', '/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/target/lib/python39.zip', '/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/target/lib/python3.9', '/tmp/tmpr0gyjdqs/lib/python3.9/lib-dynload'], 'optimization_level': 0, 'parse_argv': 0, 'parser_debug': 0, 'pathconfig_warnings': 1, 'prefix': '/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/target', 'program_name': './_testembed', 'pycache_prefix': None, 'pythonpath_env': '/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/target/lib/python39.zip:/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib:/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/build/lib.freebsd-13.0-CURRENT-amd64-3.9-pydebug', 'quiet': 0, 'run_command': None, 'run_filename': None, 'run_module': None, 'show_alloc_count': 0, 'show_ref_count': 0, 'site_import': 1, 'skip_source_first_line': 0, 'tracemalloc': 0, 'use_environment': 1, 'use_hash_seed': 0, 'user_site_directory': 1, 'verbose': 0, 'warnoptions': [], 'write_bytecode': 1, 'xoptions': []} ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 21:10:13 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Sep 2019 01:10:13 +0000 Subject: [issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py In-Reply-To: <1569032250.18.0.545337961077.issue38243@roundup.psfhosted.org> Message-ID: <1569373813.68.0.832274227163.issue38243@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +mdk, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 21:29:27 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 25 Sep 2019 01:29:27 +0000 Subject: [issue38262] Mixins - super calls in bases of multiple-inheritance with different parameters In-Reply-To: <1569319893.51.0.228639226849.issue38262@roundup.psfhosted.org> Message-ID: <1569374967.31.0.250994172983.issue38262@roundup.psfhosted.org> Raymond Hettinger added the comment: > The oddity I came around is the simple case of mixins with > different parameters, where both are derived from 'object'. > It is obvious, that such a class has to comply to the parents > call interface - here object - when to be used standalone. BUT when > I ignore this and set intentionally a parameter - for test-purposes > of mixins only - the resolution algorithm seems to normalize both for the > final call without parameters - as soon as one of the mixins is a > non-parameter call. This is independent from the inheritance order > for the derived class. Sorry, this isn't a bug. In may be inconvenient but it is intrinsic to how cooperative multiple inheritance works. FWIW, the techniques for managing parameter passing are covered in this blog post: https://rhettinger.wordpress.com/2011/05/26/super-considered-super/ ---------- nosy: +rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 21:43:44 2019 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 25 Sep 2019 01:43:44 +0000 Subject: [issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py In-Reply-To: <1569032250.18.0.545337961077.issue38243@roundup.psfhosted.org> Message-ID: <1569375824.23.0.92439494382.issue38243@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 22:08:49 2019 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 25 Sep 2019 02:08:49 +0000 Subject: [issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py In-Reply-To: <1569032250.18.0.545337961077.issue38243@roundup.psfhosted.org> Message-ID: <1569377329.82.0.654433518127.issue38243@roundup.psfhosted.org> Dong-hee Na added the comment: Looks like this issue can be solved by below code changed. @@ -833,7 +834,7 @@ class XMLRPCDocGenerator: def set_server_title(self, server_title): """Set the HTML title of the generated server documentation""" - self.server_title = server_title + self.server_title = html.escape(server_title) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 22:43:36 2019 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 25 Sep 2019 02:43:36 +0000 Subject: [issue38255] Replace "method" with "attribute" in the description of super() In-Reply-To: <1569222282.28.0.777862000618.issue38255@roundup.psfhosted.org> Message-ID: <1569379415.99.0.451101171841.issue38255@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +15948 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16368 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 23:10:01 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 25 Sep 2019 03:10:01 +0000 Subject: [issue38255] Replace "method" with "attribute" in the description of super() In-Reply-To: <1569222282.28.0.777862000618.issue38255@roundup.psfhosted.org> Message-ID: <1569381001.82.0.0649213372033.issue38255@roundup.psfhosted.org> Josh Rosenberg added the comment: I prefer rhettinger's PR to your proposed PR; while super() may be useful for things other than methods, the 99% use case is methods, and deemphasizing that is a bad idea. rhettinger's PR adds a note about other use cases without interfering with super()'s primary use case. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 23:24:19 2019 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 25 Sep 2019 03:24:19 +0000 Subject: [issue36947] Fix 3.3.3.1 Metaclasses Documentation In-Reply-To: <1558103271.07.0.643884881507.issue36947@roundup.psfhosted.org> Message-ID: <1569381859.7.0.0820679448231.issue36947@roundup.psfhosted.org> Josh Rosenberg added the comment: The existing documentation is correct, just hard to understand if you don't already understand the point of metaclasses (metaclasses are hard, the language to describe them will be inherently a little klunky). At some point, it might be nice to write a proper metaclass tutorial, even if it's only targeted at advanced users (the only people who should really be considering writing their own metaclasses or even directly using existing ones; everyone else should be using more targeted tools and/or inheriting from classes that already implement the desired metaclass). The Data model docs aren't concerned with tutorials and examples though; they're just dry description, and they're doing their job here, so I think this issue can be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 23:38:48 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 25 Sep 2019 03:38:48 +0000 Subject: [issue22273] abort when passing certain structs by value using ctypes In-Reply-To: <1408988002.99.0.886549500758.issue22273@psf.upfronthosting.co.za> Message-ID: <1569382728.08.0.623491862175.issue22273@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 12f209eccb1587e8c98057d9c5f865c21f4a16c1 by Vinay Sajip in branch 'master': bpo-22273: Update ctypes to correctly handle arrays in small structur? (GH-15839) https://github.com/python/cpython/commit/12f209eccb1587e8c98057d9c5f865c21f4a16c1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 23:40:09 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 25 Sep 2019 03:40:09 +0000 Subject: [issue22273] abort when passing certain structs by value using ctypes In-Reply-To: <1408988002.99.0.886549500758.issue22273@psf.upfronthosting.co.za> Message-ID: <1569382809.9.0.370294837922.issue22273@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15949 pull_request: https://github.com/python/cpython/pull/16369 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 23:40:16 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 25 Sep 2019 03:40:16 +0000 Subject: [issue22273] abort when passing certain structs by value using ctypes In-Reply-To: <1408988002.99.0.886549500758.issue22273@psf.upfronthosting.co.za> Message-ID: <1569382815.99.0.398681543809.issue22273@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15950 pull_request: https://github.com/python/cpython/pull/16370 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 23:45:13 2019 From: report at bugs.python.org (Arno-Can Uestuensoez) Date: Wed, 25 Sep 2019 03:45:13 +0000 Subject: [issue38262] Mixins - super calls in bases of multiple-inheritance with different parameters In-Reply-To: <1569319893.51.0.228639226849.issue38262@roundup.psfhosted.org> Message-ID: <1569383113.49.0.153891358066.issue38262@roundup.psfhosted.org> Arno-Can Uestuensoez added the comment: Hi, first of all thank you both for the fast reply. The point is here, that the call routing and the parameter passing are intermixed. The MRO defines the call order, but does not define a signature change for the call within one inheritance layer. All articles I found including the mentioned blog-post(https://rhettinger.wordpress.com/2011/05/26/super-considered-super/) deal with the call order. But as far as I can see all imply silently the correctness of the call signatures defined by the derived classes - see also https://en.wikipedia.org/wiki/Object-oriented_programming#Polymorphism. Well, this is so common for me since about 1990, that I even have to think about how to explain. The simple diagram of the basic 4-class diamond depicts the call routing and the call signatures - see https://en.wikipedia.org/wiki/Multiple_inheritance#The_diamond_problem. The class hierarchy is A | +---+---+ | | B C | | +---+---+ | D with the classes A or more precise A(object) B(A) C(A) D(B, C) The resulting call routing MRO/C3 linearization - https://en.wikipedia.org/wiki/C3_linearization - is: D -> B -> C -> A See https://en.wikipedia.org/wiki/Multiple_inheritance#Mitigation, and https://www.python.org/download/releases/2.2.3/descrintro/#mro. This basic diamond structure represents the call signatures: I: for D II: for B and C III: for D The call signature of a given method interface for the implementation of class D has to be equally defined by the classes B *AND* C! Which means has to be the same - ignoring defaults here. This is how OO works. Though the called signatures of the classes B *AND* C has to be identical too! Which is completely independent from the dynamic call order - but defined by the static inheritance graph. This is in particular true due to the fact, that the single inheritance call signatures has to be identical too D(B).mthX() == D(C).mthX() or in general - related to the call signatures the following interface calls are defined to have equal call parameters(ignoring defaults here): D(B,C).mthX() == D(C,D).mthX() == D(B).mthX() == D(C).mthX() Anything else is an error. The current implementation changes the routed method calls to the following call signatures: I: for D II: for B III: for C and D So this is not just an inconvenience as you mentioned. It is simply a bug. ---------- resolution: not a bug -> postponed Added file: https://bugs.python.org/file48625/mixin_C_is_B0A1.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 23:51:51 2019 From: report at bugs.python.org (Arno-Can Uestuensoez) Date: Wed, 25 Sep 2019 03:51:51 +0000 Subject: [issue38262] Mixins - super calls in bases of multiple-inheritance with different parameters In-Reply-To: <1569319893.51.0.228639226849.issue38262@roundup.psfhosted.org> Message-ID: <1569383511.16.0.651291716883.issue38262@roundup.psfhosted.org> Arno-Can Uestuensoez added the comment: Fix two typos in my previous post: #>>> This basic diamond structure represents the call signatures: I: for D II: for B and C III: for A #<<< and #>>> The current implementation changes the routed method calls to the following call signatures: I: for D II: for B III: for C and A #<<< ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 24 23:57:51 2019 From: report at bugs.python.org (Emmanuel Arias) Date: Wed, 25 Sep 2019 03:57:51 +0000 Subject: [issue38255] Replace "method" with "attribute" in the description of super() In-Reply-To: <1569222282.28.0.777862000618.issue38255@roundup.psfhosted.org> Message-ID: <1569383871.33.0.717265155279.issue38255@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- nosy: +eamanu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 00:07:03 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 25 Sep 2019 04:07:03 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls In-Reply-To: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> Message-ID: <1569384423.15.0.0237278042738.issue36871@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15951 pull_request: https://github.com/python/cpython/pull/16371 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 00:07:09 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 25 Sep 2019 04:07:09 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls In-Reply-To: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> Message-ID: <1569384429.15.0.516034078857.issue36871@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15952 pull_request: https://github.com/python/cpython/pull/16372 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 00:10:23 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 25 Sep 2019 04:10:23 +0000 Subject: [issue22273] abort when passing certain structs by value using ctypes In-Reply-To: <1408988002.99.0.886549500758.issue22273@psf.upfronthosting.co.za> Message-ID: <1569384623.42.0.290852496845.issue22273@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset ce62dcc460cf88f663c34c4a0948c1ee1dc53f4d by Vinay Sajip (Miss Islington (bot)) in branch '3.8': bpo-22273: Update ctypes to correctly handle arrays in small structur? (GH-15839) (GH-16370) https://github.com/python/cpython/commit/ce62dcc460cf88f663c34c4a0948c1ee1dc53f4d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 00:10:46 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 25 Sep 2019 04:10:46 +0000 Subject: [issue22273] abort when passing certain structs by value using ctypes In-Reply-To: <1408988002.99.0.886549500758.issue22273@psf.upfronthosting.co.za> Message-ID: <1569384646.71.0.607756101922.issue22273@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 16c0f6df62a39f9f7712b1c0577de4eefcb4c1bf by Vinay Sajip (Miss Islington (bot)) in branch '3.7': bpo-22273: Update ctypes to correctly handle arrays in small structur? (GH-15839) (GH-16369) https://github.com/python/cpython/commit/16c0f6df62a39f9f7712b1c0577de4eefcb4c1bf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 00:23:41 2019 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 25 Sep 2019 04:23:41 +0000 Subject: [issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py In-Reply-To: <1569032250.18.0.545337961077.issue38243@roundup.psfhosted.org> Message-ID: <1569385421.46.0.194666159714.issue38243@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +15953 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16373 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 00:29:59 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 25 Sep 2019 04:29:59 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls In-Reply-To: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> Message-ID: <1569385799.18.0.829641957945.issue36871@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- pull_requests: +15954 pull_request: https://github.com/python/cpython/pull/16374 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 00:40:29 2019 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 25 Sep 2019 04:40:29 +0000 Subject: [issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py In-Reply-To: <1569032250.18.0.545337961077.issue38243@roundup.psfhosted.org> Message-ID: <1569386429.47.0.699830765672.issue38243@roundup.psfhosted.org> Dong-hee Na added the comment: I've proposed the patch on GitHub which escaping the server_title when the documenter.page is called. (It different point with msg353132. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 01:29:23 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 25 Sep 2019 05:29:23 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls In-Reply-To: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> Message-ID: <1569389363.03.0.043391952466.issue36871@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset 4042e1afd252858de53e2b79d946a51a0182d1ba by Gregory P. Smith in branch '3.7': [3.7] bpo-36871: Handle spec errors in assert_has_calls (GH-16364) (GH-16374) https://github.com/python/cpython/commit/4042e1afd252858de53e2b79d946a51a0182d1ba ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 01:39:30 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 25 Sep 2019 05:39:30 +0000 Subject: [issue36871] Misleading error from unittest.mock's assert_has_calls In-Reply-To: <1557451228.11.0.694440628534.issue36871@roundup.psfhosted.org> Message-ID: <1569389970.34.0.844408312783.issue36871@roundup.psfhosted.org> Gregory P. Smith added the comment: i believe the issues surfaces in this are fixed at this point. of note, my mock_call_test.py example now passes. i'm not entirely sure that it _should_ pass though, but that depends on what we want create_autospec of a class to do. should that autospec'd class require instantiation before methods are called? _that_ is outside the scope of this issue. As is, the current behavior is likely what people expect to find convenient. ---------- assignee: michael.foord -> gregory.p.smith resolution: -> fixed stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 01:40:24 2019 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 25 Sep 2019 05:40:24 +0000 Subject: [issue36046] support dropping privileges when running subprocesses In-Reply-To: <1550625858.55.0.53498127684.issue36046@roundup.psfhosted.org> Message-ID: <1569390024.62.0.929018503914.issue36046@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- resolution: -> fixed stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 01:47:07 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 25 Sep 2019 05:47:07 +0000 Subject: [issue38265] Update os.pread to accept the length type as size_t In-Reply-To: <1569348855.48.0.735036515408.issue38265@roundup.psfhosted.org> Message-ID: <1569390427.43.0.998379566995.issue38265@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset ad7736faf5b82a24374c601a72599adf29951080 by Serhiy Storchaka (Dong-hee Na) in branch 'master': bpo-38265: Update os.pread to accept the length type as Py_ssize_t. (GH-16359) https://github.com/python/cpython/commit/ad7736faf5b82a24374c601a72599adf29951080 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 01:53:07 2019 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 25 Sep 2019 05:53:07 +0000 Subject: [issue38265] Update os.pread to accept the length type as size_t In-Reply-To: <1569348855.48.0.735036515408.issue38265@roundup.psfhosted.org> Message-ID: <1569390787.76.0.642316459636.issue38265@roundup.psfhosted.org> Dong-hee Na added the comment: Thank you @serhiy.storchaka and Kyle Stanley for the code review and approve. This issue is now solved. I close this issue. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 02:26:18 2019 From: report at bugs.python.org (Michael Felt) Date: Wed, 25 Sep 2019 06:26:18 +0000 Subject: [issue36210] correct AIX logic in setup.py for (non-existant) optional extensions In-Reply-To: <1551877478.38.0.771456862754.issue36210@roundup.psfhosted.org> Message-ID: <1569392778.47.0.712445691633.issue36210@roundup.psfhosted.org> Change by Michael Felt : ---------- pull_requests: +15955 pull_request: https://github.com/python/cpython/pull/16376 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 02:28:07 2019 From: report at bugs.python.org (Michael Felt) Date: Wed, 25 Sep 2019 06:28:07 +0000 Subject: [issue36210] correct AIX logic in setup.py for (non-existant) optional extensions In-Reply-To: <1551877478.38.0.771456862754.issue36210@roundup.psfhosted.org> Message-ID: <1569392887.27.0.673917807467.issue36210@roundup.psfhosted.org> Michael Felt added the comment: Added a backport for 3.8. p.s. - what is the file "name of the past"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 02:30:27 2019 From: report at bugs.python.org (Pierre Quentel) Date: Wed, 25 Sep 2019 06:30:27 +0000 Subject: [issue21705] cgi.py: Multipart with more than one file is misparsed In-Reply-To: <1402401424.17.0.414317354507.issue21705@psf.upfronthosting.co.za> Message-ID: <1569393027.02.0.737337711565.issue21705@roundup.psfhosted.org> Pierre Quentel added the comment: @ethan.furman Yes, in test_cgi.py, the method test_fieldstorage_multipart_w3c https://github.com/python/cpython/blob/master/Lib/test/test_cgi.py#L316) uses a multipart content with 2 files in it (https://github.com/python/cpython/blob/master/Lib/test/test_cgi.py#L579) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 02:35:50 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 25 Sep 2019 06:35:50 +0000 Subject: [issue22273] abort when passing certain structs by value using ctypes In-Reply-To: <1408988002.99.0.886549500758.issue22273@psf.upfronthosting.co.za> Message-ID: <1569393350.2.0.222339816003.issue22273@roundup.psfhosted.org> Change by Vinay Sajip : ---------- pull_requests: +15956 pull_request: https://github.com/python/cpython/pull/16377 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 02:36:10 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 25 Sep 2019 06:36:10 +0000 Subject: [issue32820] Add and document __format__ method for IPv[46]Address In-Reply-To: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: <1569393370.7.0.667864109806.issue32820@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- pull_requests: +15957 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/16378 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 02:40:41 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 25 Sep 2019 06:40:41 +0000 Subject: [issue32820] Add and document __format__ method for IPv[46]Address In-Reply-To: <1518363954.67.0.467229070634.issue32820@psf.upfronthosting.co.za> Message-ID: <1569393641.46.0.0762677112816.issue32820@roundup.psfhosted.org> Serhiy Storchaka added the comment: PR 16378 simplifies the implementation. It also caches the compiled RE. Needed the documentation for the new feature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 02:47:03 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 25 Sep 2019 06:47:03 +0000 Subject: [issue38219] Optimize dict.__init__ and dict.update for dict argument In-Reply-To: <1568839568.62.0.894949186749.issue38219@roundup.psfhosted.org> Message-ID: <1569394023.45.0.137629119416.issue38219@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset f163aeaa8c15b806b622c9cb10bc1d2a6e034e24 by Serhiy Storchaka in branch 'master': bpo-38219: Optimize dict creating and updating by a dict. (GH-16268) https://github.com/python/cpython/commit/f163aeaa8c15b806b622c9cb10bc1d2a6e034e24 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 02:49:29 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 25 Sep 2019 06:49:29 +0000 Subject: [issue38219] Optimize dict.__init__ and dict.update for dict argument In-Reply-To: <1568839568.62.0.894949186749.issue38219@roundup.psfhosted.org> Message-ID: <1569394169.29.0.139424068184.issue38219@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 02:57:03 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 25 Sep 2019 06:57:03 +0000 Subject: [issue36947] Fix 3.3.3.1 Metaclasses Documentation In-Reply-To: <1558103271.07.0.643884881507.issue36947@roundup.psfhosted.org> Message-ID: <1569394623.75.0.942938237701.issue36947@roundup.psfhosted.org> Serhiy Storchaka added the comment: Thank you Josh. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 02:58:35 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 25 Sep 2019 06:58:35 +0000 Subject: [issue22273] abort when passing certain structs by value using ctypes In-Reply-To: <1408988002.99.0.886549500758.issue22273@psf.upfronthosting.co.za> Message-ID: <1569394715.25.0.905457534338.issue22273@roundup.psfhosted.org> Vinay Sajip added the comment: New changeset 57dc7d5ae8ebfb6da1ea2b25e61260ecb9c79faf by Vinay Sajip in branch 'master': bpo-22273: Disabled tests while investigating buildbot failures on ARM7L/PPC64. (GH-16377) https://github.com/python/cpython/commit/57dc7d5ae8ebfb6da1ea2b25e61260ecb9c79faf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 03:00:11 2019 From: report at bugs.python.org (Sophie) Date: Wed, 25 Sep 2019 07:00:11 +0000 Subject: [issue38268] Unclear definition of ceil, floor and trunc in documentation mathmodule.c Message-ID: <1569394811.85.0.726445638356.issue38268@roundup.psfhosted.org> New submission from Sophie : The functions ceil(), floor() and trunc() define their result as an Integral. But an Integral is the result of an integration calculation. Better say Integer IMHO. ---------- assignee: docs at python components: Documentation messages: 353151 nosy: Sophie, docs at python priority: normal pull_requests: 15958 severity: normal status: open title: Unclear definition of ceil, floor and trunc in documentation mathmodule.c type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 03:01:00 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 25 Sep 2019 07:01:00 +0000 Subject: [issue13153] IDLE 3.x on Windows exits when pasting non-BMP unicode In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1569394860.75.0.0433169870242.issue13153@roundup.psfhosted.org> Serhiy Storchaka added the comment: I now have an access to Windows (I did not have it 5 years ago), so I'm going to finish this issue if I have a time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 03:07:32 2019 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 25 Sep 2019 07:07:32 +0000 Subject: [issue38268] Unclear definition of ceil, floor and trunc in documentation mathmodule.c In-Reply-To: <1569394811.85.0.726445638356.issue38268@roundup.psfhosted.org> Message-ID: <1569395252.87.0.690405803459.issue38268@roundup.psfhosted.org> Serhiy Storchaka added the comment: The word "integral" has also other meaning. This is a duplicate of issue26512. ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Vocabulary: Using "integral" in library/stdtypes.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 03:40:46 2019 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 25 Sep 2019 07:40:46 +0000 Subject: [issue38269] test_venv failed on AMD64 Debian PGO 3.x Message-ID: <1569397246.19.0.5627167067.issue38269@roundup.psfhosted.org> New submission from Dong-hee Na : https://buildbot.python.org/all/#/builders/47/builds/3578 This issue was found from GH-16359 The main issue of this failure is the lack of storage space. OSError: [Errno 28] No space left on device: '/tmp/tmpnmcjxia9/bin/python' -> '/tmp/tmpnmcjxia9/bin/python3' ---------- components: Tests messages: 353154 nosy: corona10, steve.dower priority: normal severity: normal status: open title: test_venv failed on AMD64 Debian PGO 3.x versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 03:50:55 2019 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 25 Sep 2019 07:50:55 +0000 Subject: [issue38269] test_venv failed on AMD64 Debian PGO 3.x In-Reply-To: <1569397246.19.0.5627167067.issue38269@roundup.psfhosted.org> Message-ID: <1569397855.76.0.343647447656.issue38269@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I think there was a bug in the past in regrtest or tempfile where the temporary files for tests were not deleted and lead to disk space filled up in several buildbots. ---------- nosy: +pablogsal, vstinner, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 04:53:52 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 25 Sep 2019 08:53:52 +0000 Subject: [issue38260] asyncio.run documentation does not mention its return value In-Reply-To: <1569253212.87.0.131241104419.issue38260@roundup.psfhosted.org> Message-ID: <1569401632.96.0.797661942787.issue38260@roundup.psfhosted.org> miss-islington added the comment: New changeset 17deb16883fa574a86e42551cc37f044182347ad by Miss Islington (bot) (Emmanuel Arias) in branch 'master': bpo-38260: Add Docs on asyncio.run (GH-16337) https://github.com/python/cpython/commit/17deb16883fa574a86e42551cc37f044182347ad ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 04:54:12 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 25 Sep 2019 08:54:12 +0000 Subject: [issue38260] asyncio.run documentation does not mention its return value In-Reply-To: <1569253212.87.0.131241104419.issue38260@roundup.psfhosted.org> Message-ID: <1569401652.77.0.0209267029334.issue38260@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15959 pull_request: https://github.com/python/cpython/pull/16379 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 04:54:18 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 25 Sep 2019 08:54:18 +0000 Subject: [issue38260] asyncio.run documentation does not mention its return value In-Reply-To: <1569253212.87.0.131241104419.issue38260@roundup.psfhosted.org> Message-ID: <1569401658.8.0.281746391113.issue38260@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15960 pull_request: https://github.com/python/cpython/pull/16380 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 05:06:18 2019 From: report at bugs.python.org (Marco Rougeth) Date: Wed, 25 Sep 2019 09:06:18 +0000 Subject: [issue36232] Improve error message on dbm.open In-Reply-To: <1552039612.76.0.91124690084.issue36232@roundup.psfhosted.org> Message-ID: <1569402378.41.0.276379026416.issue36232@roundup.psfhosted.org> Change by Marco Rougeth : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 05:13:04 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 25 Sep 2019 09:13:04 +0000 Subject: [issue38260] asyncio.run documentation does not mention its return value In-Reply-To: <1569253212.87.0.131241104419.issue38260@roundup.psfhosted.org> Message-ID: <1569402784.24.0.109841475905.issue38260@roundup.psfhosted.org> miss-islington added the comment: New changeset d3666945d78508970002653c4d46221a4306f55b by Miss Islington (bot) in branch '3.7': bpo-38260: Add Docs on asyncio.run (GH-16337) https://github.com/python/cpython/commit/d3666945d78508970002653c4d46221a4306f55b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 05:13:04 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 25 Sep 2019 09:13:04 +0000 Subject: [issue38260] asyncio.run documentation does not mention its return value In-Reply-To: <1569253212.87.0.131241104419.issue38260@roundup.psfhosted.org> Message-ID: <1569402784.36.0.324788554579.issue38260@roundup.psfhosted.org> miss-islington added the comment: New changeset 4633355a063c7bf068bdd72dfdd32f4c22cf382f by Miss Islington (bot) in branch '3.8': bpo-38260: Add Docs on asyncio.run (GH-16337) https://github.com/python/cpython/commit/4633355a063c7bf068bdd72dfdd32f4c22cf382f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 05:13:04 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 25 Sep 2019 09:13:04 +0000 Subject: [issue38260] asyncio.run documentation does not mention its return value In-Reply-To: <1569253212.87.0.131241104419.issue38260@roundup.psfhosted.org> Message-ID: <1569402784.24.0.109841475905.issue38260@roundup.psfhosted.org> miss-islington added the comment: New changeset d3666945d78508970002653c4d46221a4306f55b by Miss Islington (bot) in branch '3.7': bpo-38260: Add Docs on asyncio.run (GH-16337) https://github.com/python/cpython/commit/d3666945d78508970002653c4d46221a4306f55b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 05:23:16 2019 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 25 Sep 2019 09:23:16 +0000 Subject: [issue38260] asyncio.run documentation does not mention its return value In-Reply-To: <1569253212.87.0.131241104419.issue38260@roundup.psfhosted.org> Message-ID: <1569403396.41.0.975182069781.issue38260@roundup.psfhosted.org> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 05:48:27 2019 From: report at bugs.python.org (Carol Willing) Date: Wed, 25 Sep 2019 09:48:27 +0000 Subject: [issue38255] Replace "method" with "attribute" in the description of super() In-Reply-To: <1569222282.28.0.777862000618.issue38255@roundup.psfhosted.org> Message-ID: <1569404907.85.0.426474584682.issue38255@roundup.psfhosted.org> Carol Willing added the comment: @maggyero Thanks for the PR and working to improve the docs. For this particular issue, I prefer PR 16368 for its brevity and common use case. I'm recommending that it be merged. ---------- nosy: +willingc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 05:51:49 2019 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 25 Sep 2019 09:51:49 +0000 Subject: [issue22273] abort when passing certain structs by value using ctypes In-Reply-To: <1408988002.99.0.886549500758.issue22273@psf.upfronthosting.co.za> Message-ID: <1569405109.82.0.530067620203.issue22273@roundup.psfhosted.org> Change by Vinay Sajip : ---------- pull_requests: +15961 pull_request: https://github.com/python/cpython/pull/16381 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 05:59:24 2019 From: report at bugs.python.org (Christian Heimes) Date: Wed, 25 Sep 2019 09:59:24 +0000 Subject: [issue2454] sha and md5 fixer In-Reply-To: <1206147643.89.0.60936055638.issue2454@psf.upfronthosting.co.za> Message-ID: <1569405564.02.0.386780418401.issue2454@roundup.psfhosted.org> Christian Heimes added the comment: The issue is already fixed. Python 3.7+ no longer import the md5 module directly. ---------- nosy: +christian.heimes resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 06:01:33 2019 From: report at bugs.python.org (Christian Heimes) Date: Wed, 25 Sep 2019 10:01:33 +0000 Subject: [issue18000] _md5 should be built if _ssl cannot be built In-Reply-To: <1368818592.85.0.0295311805267.issue18000@psf.upfronthosting.co.za> Message-ID: <1569405693.99.0.858261515839.issue18000@roundup.psfhosted.org> Christian Heimes added the comment: Python 2.7 is reaching EOL soon and this bug has been dormant for over six years. Since the problem is solved in Python 3, I'm closing this bug as WONTFIX. ---------- resolution: -> wont fix stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 06:09:58 2019 From: report at bugs.python.org (Christian Heimes) Date: Wed, 25 Sep 2019 10:09:58 +0000 Subject: [issue38270] Tests: Avoid MD5 or check for MD5 availablity Message-ID: <1569406198.76.0.145895264341.issue38270@roundup.psfhosted.org> New submission from Christian Heimes : MD5 hash digest algorithm has known security issues and is getting blocked on systems with strict security policies. Python uses MD5 in several unittests. These tests should either avoid MD5 and use SHA256 instead. Or tests that really require MD5 should check for the availability of MD5 and skip these tests. The latter are network-related tests that check for digest auth or CRAM-MD5 auth. Avoidable use of MD5: * test_hmac tests for default constructor * test_tarfile checksum Tests that require MD5: * test_urllib2_localnet digest auth * CRAM-MD5 in test_imaplib, test_poplib, test_smtplib ---------- assignee: christian.heimes components: Tests messages: 353162 nosy: christian.heimes priority: high severity: normal status: open title: Tests: Avoid MD5 or check for MD5 availablity type: resource usage versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 06:25:25 2019 From: report at bugs.python.org (Christian Heimes) Date: Wed, 25 Sep 2019 10:25:25 +0000 Subject: [issue38270] Tests: Avoid MD5 or check for MD5 availablity In-Reply-To: <1569406198.76.0.145895264341.issue38270@roundup.psfhosted.org> Message-ID: <1569407125.47.0.173551208933.issue38270@roundup.psfhosted.org> Change by Christian Heimes : ---------- keywords: +patch pull_requests: +15962 stage: -> patch review pull_request: https://github.com/python/cpython/pull/16382 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 06:28:42 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Sep 2019 10:28:42 +0000 Subject: [issue38269] AMD64 Debian PGO 3.x, AMD64 Clang UBSan 2.7 buildbots: No space left on device In-Reply-To: <1569397246.19.0.5627167067.issue38269@roundup.psfhosted.org> Message-ID: <1569407322.15.0.603453903967.issue38269@roundup.psfhosted.org> STINNER Victor added the comment: I contacted Gregory P. Smith, the buildbot worker owner, to ask him to have a look. > I think there was a bug in the past in regrtest or tempfile where the temporary files for tests were not deleted and lead to disk space filled up in several buildbots. regrtest now has a --cleanup command to remove all build/test_python_xxx directories. But this command cannot be run by buildbot on a worker which allows multiple jobs in parallel, since the command removes temporary directory of parallel jobs... I fixed many bugs in regrtest recently to reduce the risk of leaving temporary files on the disk. ---------- nosy: +gregory.p.smith title: test_venv failed on AMD64 Debian PGO 3.x -> AMD64 Debian PGO 3.x, AMD64 Clang UBSan 2.7 buildbots: No space left on device _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 06:29:04 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Sep 2019 10:29:04 +0000 Subject: [issue38269] AMD64 Debian PGO 3.x, AMD64 Clang UBSan 2.7 buildbots: No space left on device In-Reply-To: <1569397246.19.0.5627167067.issue38269@roundup.psfhosted.org> Message-ID: <1569407344.94.0.0879163247184.issue38269@roundup.psfhosted.org> STINNER Victor added the comment: https://mail.python.org/archives/list/buildbot-status at python.org/message/JCR6FQBUMLMOESWE4IVVUIATX7KTEV7C/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 06:32:13 2019 From: report at bugs.python.org (Carol Willing) Date: Wed, 25 Sep 2019 10:32:13 +0000 Subject: [issue38248] inconsistency in asyncio.Task between cancellation while running vs. cancellation immediately after it finishes In-Reply-To: <1569141924.07.0.413373545347.issue38248@roundup.psfhosted.org> Message-ID: <1569407533.27.0.742111595881.issue38248@roundup.psfhosted.org> Carol Willing added the comment: New changeset edad4d89e357c92f70c0324b937845d652b20afd by Carol Willing (Yury Selivanov) in branch 'master': bpo-38248: Fix inconsistent immediate asyncio.Task cancellation (GH-16330) https://github.com/python/cpython/commit/edad4d89e357c92f70c0324b937845d652b20afd ---------- nosy: +willingc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 06:32:23 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 25 Sep 2019 10:32:23 +0000 Subject: [issue38248] inconsistency in asyncio.Task between cancellation while running vs. cancellation immediately after it finishes In-Reply-To: <1569141924.07.0.413373545347.issue38248@roundup.psfhosted.org> Message-ID: <1569407542.99.0.154064583797.issue38248@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15963 pull_request: https://github.com/python/cpython/pull/16383 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 06:32:48 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 25 Sep 2019 10:32:48 +0000 Subject: [issue38248] inconsistency in asyncio.Task between cancellation while running vs. cancellation immediately after it finishes In-Reply-To: <1569141924.07.0.413373545347.issue38248@roundup.psfhosted.org> Message-ID: <1569407568.15.0.255590292278.issue38248@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15963, 15964 pull_request: https://github.com/python/cpython/pull/16383 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 06:33:01 2019 From: report at bugs.python.org (miss-islington) Date: Wed, 25 Sep 2019 10:33:01 +0000 Subject: [issue38248] inconsistency in asyncio.Task between cancellation while running vs. cancellation immediately after it finishes In-Reply-To: <1569141924.07.0.413373545347.issue38248@roundup.psfhosted.org> Message-ID: <1569407581.8.0.873105786712.issue38248@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +15963, 15964, 15965 pull_request: https://github.com/python/cpython/pull/16383 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 06:33:24 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Sep 2019 10:33:24 +0000 Subject: [issue38265] Update os.pread to accept the length type as size_t In-Reply-To: <1569348855.48.0.735036515408.issue38265@roundup.psfhosted.org> Message-ID: <1569407604.34.0.74013891893.issue38265@roundup.psfhosted.org> STINNER Victor added the comment: Python 3.7 and 3.8 also have os.pread(). Why not also fixing these branches? -- os.pwrite() uses Py_buffer for its argument and supports size_t size. os.preadv() and os.pwritev() use internally the C structure "struct iovec" which uses size_t for its iov_len field. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 06:55:16 2019 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 25 Sep 2019 10:55:16 +0000 Subject: [issue38262] Mixins - super calls in bases of multiple-inheritance with different parameters In-Reply-To: <1569358488.99.0.0622742110669.issue38262@roundup.psfhosted.org> Message-ID: <20190925105507.GG11150@ando.pearwood.info> Steven D'Aprano added the comment: On Tue, Sep 24, 2019 at 08:54:49PM +0000, Arno-Can Uestuensoez wrote: > Or reduced to the focus of the actual issue and depicted the actual > passed parameters. See the following "Case 4 - same as > mixin_C_is_B0A1" for the essential question. > Case 4 - same as mixin_C_is_B0A1 > > B_Without_Arg:C True > A_With_Arg:C False > > success > > Comment: > The success is NOT expected and as far as I can see should be treated as an Error so NOK. Why would it be an error when you override object.__init__ completely? object.__init__ doesn't get called at all, because A overrides it: class A(object): def __init__(self, propagate=False): if propagate: super(A, self).__init__(propagate) # this section is implied else: pass # override the superclass B_Without_Arg calls ``super().__init__`` with no arguments, so ``A.__init__`` fills in the default argument, propagate=False. [...] > This means the call of "super(B, self).__init__()" within > "B.__init__()" defines the call parameters of "A.__init__()". Yes, that's how it works in cooperative multiple inheritance. It may help to read this: https://www.artima.com/weblogs/viewpost.jsp?thread=281127 The very badly named essay "Super considered harmful" is also worth reading. It is badly named because it is not *super* which is painful, and the author eventually was forced to admit that super is the best available solution to the complications of multiple inheritance. http://fuhm.net/super-harmful/ Somewhere on Youtube you should be able to find a video of a talk given by Raymond where he discusses ways to solve multiple inheritance problems. Sorry I don't remember what it is called. > Even though I expect the call order as routed by the MRO, > I did not expected the parameters of A to be passed from the > sibling class B, but as defined by the base class C. I think I've made that same mistake too. Perhaps the documentation should make this aspect of multiple inheritance more clear. I think that we have established that, whether you expected it or not, the behaviour you show is the way Python multiple inheritance has worked since version 2.3 and is working as designed. If you want to debate that design, the bug tracker is not the right place for it, and you should take it to the Python-Dev mailing list. It might be more productive to ask the mailing list why that design choice was made, before asserting that it is wrong. If you aren't fond of mailing lists, you could try the Python Discuss: https://discuss.python.org/ but either way, I think that this issue should be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 06:54:28 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Sep 2019 10:54:28 +0000 Subject: [issue36046] support dropping privileges when running subprocesses In-Reply-To: <1550625858.55.0.53498127684.issue36046@roundup.psfhosted.org> Message-ID: <1569408868.44.0.638452428285.issue36046@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +15966 pull_request: https://github.com/python/cpython/pull/16384 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 06:55:38 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Sep 2019 10:55:38 +0000 Subject: [issue36046] support dropping privileges when running subprocesses In-Reply-To: <1550625858.55.0.53498127684.issue36046@roundup.psfhosted.org> Message-ID: <1569408938.61.0.651914697971.issue36046@roundup.psfhosted.org> STINNER Victor added the comment: Hum, this change has a big (security?) issue: import subprocess subprocess.Popen(["/usr/bin/id"], user=1000, group=1000).wait() gives: uid=1000(vstinner) gid=1000(vstinner) groupes=1000(vstinner),0(root) contexte=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 But: import subprocess subprocess.Popen(["/usr/bin/id"], user=1000, group=1000, close_fds=False).wait() gives: uid=0(root) gid=0(root) groupes=0(root) contexte=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 => user and group arguments are ignored when using close_fds=False: when subprocess uses posix_spawn(). Note: test_subprocess test_group() is skipped on my Fedora 30. I wrote PR 16384 to fix the bug and enable test_group() on my Fedora (check also for "nobody" and "nfsnobody" groups). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 06:57:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Sep 2019 10:57:43 +0000 Subject: [issue36046] subprocess: add user, group and extra_groups parameters In-Reply-To: <1550625858.55.0.53498127684.issue36046@roundup.psfhosted.org> Message-ID: <1569409063.63.0.492937578.issue36046@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: fixed -> status: closed -> open title: support dropping privileges when running subprocesses -> subprocess: add user, group and extra_groups parameters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 07:00:43 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Sep 2019 11:00:43 +0000 Subject: [issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py In-Reply-To: <1569032250.18.0.545337961077.issue38243@roundup.psfhosted.org> Message-ID: <1569409243.9.0.434234241728.issue38243@roundup.psfhosted.org> STINNER Victor added the comment: > Thanks for the report. There is a policy to report security vulnerabilities in CPython : https://www.python.org/news/security/. The private security mailing list has been contacted first and we advice to open a public issue since we consider that it's not a major security issue. To exploit this bug, the attacker has to control the XML-RPC server title. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 25 07:01:41 2019 From: report at bugs.python.org (STINNER Victor) Date: Wed, 25 Sep 2019 11:01:41 +0000 Subject: [issue38243] A reflected XSS in python/Lib/DocXMLRPCServer.py In-Reply-To: <1569032250.18.0.545337961077.issue38243@roundup.psfhosted.org> Message-ID: <1569409301.31.0.251478165049.issue38243@roundup.psfhosted.org> STINNER Victor added the comment: > I've proposed the patch on GitHub which escaping the server_title when the documenter.page is called. (It different point with msg353132. The attached poc.py seems to show that server name and server documentation are not escaped neither. server.set_server_name('test