From report at bugs.python.org Mon Feb 1 00:15:54 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 01 Feb 2021 05:15:54 +0000 Subject: [issue42688] ctypes memory error on Apple Silicon with external libffi In-Reply-To: <1608443574.61.0.0166938419217.issue42688@roundup.psfhosted.org> Message-ID: <1612156554.75.0.843804826458.issue42688@roundup.psfhosted.org> Ned Deily added the comment: New changeset 7e729978fa08a360cbf936dc215ba7dd25a06a08 by Miss Islington (bot) in branch '3.9': bpo-42688: Fix ffi alloc/free when using external libffi on macos (GH-23868) (GH-23888) https://github.com/python/cpython/commit/7e729978fa08a360cbf936dc215ba7dd25a06a08 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 01:09:56 2021 From: report at bugs.python.org (Isuru Fernando) Date: Mon, 01 Feb 2021 06:09:56 +0000 Subject: [issue43052] _dyld_shared_cache_contains_path needs SYSTEM_VERSION_COMPAT=0 In-Reply-To: <1611815996.85.0.805200252907.issue43052@roundup.psfhosted.org> Message-ID: <1612159796.36.0.902646278449.issue43052@roundup.psfhosted.org> Isuru Fernando added the comment: You are right. I think I may have accidentally used the wrong SDK. Explictly setting `SYSTEM_VERSION_COMPAT=1` is unsupported then? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 02:00:33 2021 From: report at bugs.python.org (=?utf-8?b?U3Jpbml2YXMgIFJlZGR5IFRoYXRpcGFydGh5KOCwtuCxjeCwsOCxgOCwqA==?= =?utf-8?b?4LC/4LC14LC+4LC44LGNIOCwsOCxhuCwoeCxjeCwoeCwvyDgsKTgsL7gsJ8=?= =?utf-8?b?4LC/4LCq4LCw4LGN4LCk4LC/KQ==?=) Date: Mon, 01 Feb 2021 07:00:33 +0000 Subject: [issue43089] The optional argument to random.Random() is called "x" not "seed" In-Reply-To: <1612148504.79.0.846022332701.issue43089@roundup.psfhosted.org> Message-ID: <1612162833.84.0.539445377555.issue43089@roundup.psfhosted.org> Srinivas Reddy Thatiparthy(?????????? ?????? ?????????) added the comment: I think this was discussed before. If my memory serves me right, Guido kept 'x' as is for backward compatibility reasons. Agreed that was a mistake. ---------- nosy: +thatiparthy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 02:37:47 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Feb 2021 07:37:47 +0000 Subject: [issue43016] Improve tests for curses In-Reply-To: <1611504145.81.0.962541791137.issue43016@roundup.psfhosted.org> Message-ID: <1612165067.86.0.193470518843.issue43016@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 304f9d2622fa4fd0833d60d31ddf7321a6a8141b by Miss Islington (bot) in branch '3.9': bpo-43016: Fix test_curses on platform without cursesw (GH-24405) (GH-24407) https://github.com/python/cpython/commit/304f9d2622fa4fd0833d60d31ddf7321a6a8141b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 02:37:47 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Feb 2021 07:37:47 +0000 Subject: [issue43016] Improve tests for curses In-Reply-To: <1611504145.81.0.962541791137.issue43016@roundup.psfhosted.org> Message-ID: <1612165067.93.0.204501615693.issue43016@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset aab84a58063e68cb7ff5f7b8d96c431200d0e340 by Miss Islington (bot) in branch '3.8': bpo-43016: Fix test_curses on platform without cursesw (GH-24405) (GH-24408) https://github.com/python/cpython/commit/aab84a58063e68cb7ff5f7b8d96c431200d0e340 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 02:37:47 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Feb 2021 07:37:47 +0000 Subject: [issue43016] Improve tests for curses In-Reply-To: <1611504145.81.0.962541791137.issue43016@roundup.psfhosted.org> Message-ID: <1612165067.86.0.193470518843.issue43016@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset 304f9d2622fa4fd0833d60d31ddf7321a6a8141b by Miss Islington (bot) in branch '3.9': bpo-43016: Fix test_curses on platform without cursesw (GH-24405) (GH-24407) https://github.com/python/cpython/commit/304f9d2622fa4fd0833d60d31ddf7321a6a8141b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 03:26:18 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Feb 2021 08:26:18 +0000 Subject: [issue43016] Improve tests for curses In-Reply-To: <1611504145.81.0.962541791137.issue43016@roundup.psfhosted.org> Message-ID: <1612167978.49.0.961644587697.issue43016@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 03:34:15 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 01 Feb 2021 08:34:15 +0000 Subject: [issue42972] [C API] Heap types (PyType_FromSpec) must fully implement the GC protocol In-Reply-To: <1611093266.11.0.721387186389.issue42972@roundup.psfhosted.org> Message-ID: <1612168455.64.0.939497906859.issue42972@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +23226 stage: -> patch review pull_request: https://github.com/python/cpython/pull/23428 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 03:35:07 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Feb 2021 08:35:07 +0000 Subject: [issue43089] The optional argument to random.Random() is called "x" not "seed" In-Reply-To: <1612148504.79.0.846022332701.issue43089@roundup.psfhosted.org> Message-ID: <1612168507.24.0.449887538222.issue43089@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- nosy: +mark.dickinson, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 05:42:36 2021 From: report at bugs.python.org (Mark Shannon) Date: Mon, 01 Feb 2021 10:42:36 +0000 Subject: [issue42990] Improve the C code for calling Python code: _PyEval_EvalCode() In-Reply-To: <1611245152.12.0.0348161555926.issue42990@roundup.psfhosted.org> Message-ID: <1612176156.08.0.185758459351.issue42990@roundup.psfhosted.org> Mark Shannon added the comment: New changeset 0332e569c12d3dc97171546c6dc10e42c27de34b by Mark Shannon in branch 'master': bpo-42990: Further refactoring of PyEval_ functions. (GH-24368) https://github.com/python/cpython/commit/0332e569c12d3dc97171546c6dc10e42c27de34b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 06:37:39 2021 From: report at bugs.python.org (Livio Bencik) Date: Mon, 01 Feb 2021 11:37:39 +0000 Subject: [issue43090] parseaddr (from email.utils) returns invalid input string instead of ('', '') Message-ID: <1612179459.91.0.769211579588.issue43090@roundup.psfhosted.org> New submission from Livio Bencik : ``` from email.utils import parseaddr parseaddr('randomstring') ``` returns ('', 'randomstring'), instead of ('', '') as the documentation says. ---------- components: email messages: 386062 nosy: barry, lbenc135, r.david.murray priority: normal severity: normal status: open title: parseaddr (from email.utils) returns invalid input string instead of ('', '') type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 06:59:07 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 01 Feb 2021 11:59:07 +0000 Subject: [issue43089] The optional argument to random.Random() is called "x" not "seed" In-Reply-To: <1612148504.79.0.846022332701.issue43089@roundup.psfhosted.org> Message-ID: <1612180747.42.0.76180838653.issue43089@roundup.psfhosted.org> Raymond Hettinger added the comment: > It would be better to rename "x" to "seed" but that's > not backwards compatible. As you said, this would be a breaking change, so we can't do it. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 07:20:31 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 01 Feb 2021 12:20:31 +0000 Subject: [issue43056] Use of dicts in 4.2 and 4.7 of Python tutorial a bit confusing In-Reply-To: <1611849419.6.0.947675106627.issue43056@roundup.psfhosted.org> Message-ID: <1612182031.71.0.564413680046.issue43056@roundup.psfhosted.org> Raymond Hettinger added the comment: The link to https://docs.python.org/3.9/library/stdtypes.html#typesmapping isn't a forward reference. It is a link to the main docs which is entirely appropriate and likely the only way a beginner would find that section. I concur with Terry that this should be closed. I've no evidence of an actual user ever having been confused by this presentation. ---------- nosy: +rhettinger resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 07:53:03 2021 From: report at bugs.python.org (R. David Murray) Date: Mon, 01 Feb 2021 12:53:03 +0000 Subject: [issue43090] parseaddr (from email.utils) returns invalid input string instead of ('', '') In-Reply-To: <1612179459.91.0.769211579588.issue43090@roundup.psfhosted.org> Message-ID: <1612183983.36.0.225895169013.issue43090@roundup.psfhosted.org> R. David Murray added the comment: The return value is correct. Interpreted as an email address, 'randomstring' is a local mailbox. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 08:19:10 2021 From: report at bugs.python.org (Yurii Karabas) Date: Mon, 01 Feb 2021 13:19:10 +0000 Subject: [issue43085] Loosening | and |= operator type checking restriction In-Reply-To: <1612109679.82.0.693593534177.issue43085@roundup.psfhosted.org> Message-ID: <1612185550.15.0.405958499847.issue43085@roundup.psfhosted.org> Yurii Karabas <1998uriyyo at gmail.com> added the comment: Hi Raymond, I was trying to add __or__ method for collections.abc.Mapping, __ior__ method for collections.abc.MutableMapping, link to issue - https://bugs.python.org/issue42841. I can extract code and move it to separate classes as you propose above. What do you think about that? ---------- nosy: +uriyyo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 08:28:41 2021 From: report at bugs.python.org (Julien Danjou) Date: Mon, 01 Feb 2021 13:28:41 +0000 Subject: [issue42647] Unable to use concurrent.futures in atexit hook In-Reply-To: <1608040750.56.0.960217977665.issue42647@roundup.psfhosted.org> Message-ID: <1612186121.98.0.583806521924.issue42647@roundup.psfhosted.org> Julien Danjou added the comment: > Is there a real-world situation where it's specifically necessary or even beneficial to utilize ThreadPoolExecutor at this point after thread finalization rather than earlier in the program? Not that it doesn't exist, but to me it intuitively seems very odd to utilize an executor within an atexit hook, which are intended to just be resource finalization/cleanup functions called at interpreter shutdown. Assuming there is a genuine use case I'm not seeing, it may be worth weighing against the decision to convert the executors to not use daemon threads, as I presently don't think there's a way to (safely) allow that behavior without reverting back to using daemon threads. To put that in perspective, here is the original issue that trigged this bug for me: Traceback (most recent call last): File "/root/project/ddtrace/profiling/scheduler.py", line 50, in flush exp.export(events, start, self._last_export) File "/root/project/ddtrace/profiling/exporter/http.py", line 186, in export self._upload(client, self.endpoint_path, body, headers) File "/root/project/ddtrace/profiling/exporter/http.py", line 189, in _upload self._retry_upload(self._upload_once, client, path, body, headers) File "/root/project/.tox/py39-profile-gevent/lib/python3.9/site-packages/tenacity/__init__.py", line 423, in __call__ do = self.iter(retry_state=retry_state) File "/root/project/.tox/py39-profile-gevent/lib/python3.9/site-packages/tenacity/__init__.py", line 360, in iter return fut.result() File "/root/.pyenv/versions/3.9.0/lib/python3.9/concurrent/futures/_base.py", line 433, in result return self.__get_result() File "/root/.pyenv/versions/3.9.0/lib/python3.9/concurrent/futures/_base.py", line 389, in __get_result raise self._exception File "/root/project/.tox/py39-profile-gevent/lib/python3.9/site-packages/tenacity/__init__.py", line 426, in __call__ result = fn(*args, **kwargs) File "/root/project/ddtrace/profiling/exporter/http.py", line 193, in _upload_once client.request("POST", path, body=body, headers=headers) File "/root/.pyenv/versions/3.9.0/lib/python3.9/http/client.py", line 1255, in request self._send_request(method, url, body, headers, encode_chunked) File "/root/.pyenv/versions/3.9.0/lib/python3.9/http/client.py", line 1301, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/root/.pyenv/versions/3.9.0/lib/python3.9/http/client.py", line 1250, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/root/.pyenv/versions/3.9.0/lib/python3.9/http/client.py", line 1010, in _send_output self.send(msg) File "/root/.pyenv/versions/3.9.0/lib/python3.9/http/client.py", line 950, in send self.connect() File "/root/.pyenv/versions/3.9.0/lib/python3.9/http/client.py", line 921, in connect self.sock = self._create_connection( File "/root/project/.tox/py39-profile-gevent/lib/python3.9/site-packages/gevent/socket.py", line 88, in create_connection addrs = list(getaddrinfo(host, port, 0, SOCK_STREAM)) File "/root/project/.tox/py39-profile-gevent/lib/python3.9/site-packages/gevent/_socketcommon.py", line 247, in getaddrinfo addrlist = get_hub().resolver.getaddrinfo(host, port, family, type, proto, flags) File "/root/project/.tox/py39-profile-gevent/lib/python3.9/site-packages/gevent/hub.py", line 841, in _get_resolver self._resolver = self.resolver_class(hub=self) # pylint:disable=not-callable File "/root/project/.tox/py39-profile-gevent/lib/python3.9/site-packages/gevent/resolver/thread.py", line 39, in __init__ self.pool = hub.threadpool File "/root/project/.tox/py39-profile-gevent/lib/python3.9/site-packages/gevent/hub.py", line 865, in _get_threadpool self._threadpool = self.threadpool_class(self.threadpool_size, hub=self) File "/root/project/.tox/py39-profile-gevent/lib/python3.9/site-packages/gevent/hub.py", line 860, in threadpool_class return GEVENT_CONFIG.threadpool File "/root/project/.tox/py39-profile-gevent/lib/python3.9/site-packages/gevent/_config.py", line 50, in getter return self.settings[setting_name].get() File "/root/project/.tox/py39-profile-gevent/lib/python3.9/site-packages/gevent/_config.py", line 146, in get self.value = self.validate(self._default()) File "/root/project/.tox/py39-profile-gevent/lib/python3.9/site-packages/gevent/_config.py", line 248, in validate return self._import_one_of([self.shortname_map.get(x, x) for x in value]) File "/root/project/.tox/py39-profile-gevent/lib/python3.9/site-packages/gevent/_config.py", line 223, in _import_one_of return self._import_one(candidates[-1]) File "/root/project/.tox/py39-profile-gevent/lib/python3.9/site-packages/gevent/_config.py", line 237, in _import_one module = importlib.import_module(module) File "/root/.pyenv/versions/3.9.0/lib/python3.9/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 790, in exec_module File "", line 228, in _call_with_frames_removed File "/root/project/.tox/py39-profile-gevent/lib/python3.9/site-packages/gevent/threadpool.py", line 748, in class ThreadPoolExecutor(concurrent.futures.ThreadPoolExecutor): File "/root/.pyenv/versions/3.9.0/lib/python3.9/concurrent/futures/__init__.py", line 49, in __getattr__ from .thread import ThreadPoolExecutor as te File "/root/.pyenv/versions/3.9.0/lib/python3.9/concurrent/futures/thread.py", line 37, in threading._register_atexit(_python_exit) File "/root/.pyenv/versions/3.9.0/lib/python3.9/threading.py", line 1370, in _register_atexit raise RuntimeError("can't register atexit after shutdown") RuntimeError: can't register atexit after shutdown What's happening is that the ddtrace library registers an atexit hook that does an HTTP call. As the application runs using gevent, some gevent modules that were not loaded are loaded during the atexit() hook and the loading of `concurrent.futures.thread` is done very late, at the point where the interpreter is shutting down. I'm totally fine blaming gevent here if you prefer. The problem is that there's nothing preventing any library call to be made in an atexit() hook, and any library could decide to use `concurent.futures` without the library user being able to do anything about it, except maybe, making sure `concurent.futures` is loaded very early in the program. However, having to load this library even if you don't use it to be sure it does not break would break the separation of principles. At at least, at this stage, it might be the responsibility of Python to make sure all `threading._register_at_exit` calls are done whatever if the library is used or not (i.e. that'd mean loading `concurent.futures` with `threading` unconditionally). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 08:34:01 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 01 Feb 2021 13:34:01 +0000 Subject: [issue43085] Loosening | and |= operator type checking restriction In-Reply-To: <1612109679.82.0.693593534177.issue43085@roundup.psfhosted.org> Message-ID: <1612186441.6.0.383244260762.issue43085@roundup.psfhosted.org> Raymond Hettinger added the comment: Because ABCs set minimum standards for compliance, they can't be extended without breaking existing code that registers to the ABC. Brandt added __or/ior__ support to some of the mapping classes in the standard library, but it is a fact of life that there will always be some mapping classes that don't have __or/ior__ support. It is an optional feature. It is possible add new ABC subclasses with the extra methods, but I don't think that is worth it. The effort for a mapping class maintainer to change which class it inherits from or registers to is about equal to the effort to just add the two methods. So, I think your best bet is to propose PRs for individual mapping classes on a case-by-case basis. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 08:41:43 2021 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 01 Feb 2021 13:41:43 +0000 Subject: [issue42647] Unable to use concurrent.futures in atexit hook In-Reply-To: <1608040750.56.0.960217977665.issue42647@roundup.psfhosted.org> Message-ID: <1612186903.92.0.490307462996.issue42647@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 09:00:51 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Feb 2021 14:00:51 +0000 Subject: [issue40601] [C API] Hide static types from the limited C API In-Reply-To: <1589235805.82.0.0888479979707.issue40601@roundup.psfhosted.org> Message-ID: <1612188051.93.0.866503625907.issue40601@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +23227 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24146 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 09:15:27 2021 From: report at bugs.python.org (twoone3) Date: Mon, 01 Feb 2021 14:15:27 +0000 Subject: [issue43091] console encode is not utf-8!! Message-ID: <1612188927.24.0.642164421259.issue43091@roundup.psfhosted.org> New submission from twoone3 <3197653242 at qq.com>: https://docs.python.org/3/c-api/init_config.html?highlight=pypreconfig_initpythonconfig#c.PyPreConfig When I use this api,The coding of the console has not changed,utf8_mode is 1. This is my code. PyPreConfig_InitPythonConfig(&cfg); cfg.utf8_mode = -1; Py_PreInitialize(&cfg); ---------- messages: 386069 nosy: twoone3 priority: normal severity: normal status: open title: console encode is not utf-8!! type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 09:18:47 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Feb 2021 14:18:47 +0000 Subject: [issue43091] console encode is not utf-8!! In-Reply-To: <1612188927.24.0.642164421259.issue43091@roundup.psfhosted.org> Message-ID: <1612189127.4.0.0536369272766.issue43091@roundup.psfhosted.org> Christian Heimes added the comment: What's the result of the Py_PreInitialize(&cfg) call? ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 09:25:52 2021 From: report at bugs.python.org (twoone3) Date: Mon, 01 Feb 2021 14:25:52 +0000 Subject: [issue43091] console encode is not utf-8!! In-Reply-To: <1612188927.24.0.642164421259.issue43091@roundup.psfhosted.org> Message-ID: <1612189552.38.0.232851065444.issue43091@roundup.psfhosted.org> twoone3 <3197653242 at qq.com> added the comment: PyPreConfig cfg; PyPreConfig_InitPythonConfig(&cfg); cfg.utf8_mode = -1; PyStatus status = Py_PreInitialize(&cfg); if (PyStatus_Exception(status)) { Py_ExitStatusException(status); } I use this to test,there are no exceptions ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 09:30:51 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Feb 2021 14:30:51 +0000 Subject: [issue43091] console encode is not utf-8!! In-Reply-To: <1612188927.24.0.642164421259.issue43091@roundup.psfhosted.org> Message-ID: <1612189851.36.0.142945093095.issue43091@roundup.psfhosted.org> Christian Heimes added the comment: "utf8_mode = -1" falls back to command line, env vars, locales, and eventually disables UTF-8 mode. Try "cfg.utf8_mode = 1" as documented at https://docs.python.org/3/c-api/init_config.html?highlight=pypreconfig_initpythonconfig#c.Py_PreInitializeFromArgs ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 09:45:59 2021 From: report at bugs.python.org (Yurii Karabas) Date: Mon, 01 Feb 2021 14:45:59 +0000 Subject: [issue43085] Loosening | and |= operator type checking restriction In-Reply-To: <1612109679.82.0.693593534177.issue43085@roundup.psfhosted.org> Message-ID: <1612190759.39.0.230502217067.issue43085@roundup.psfhosted.org> Change by Yurii Karabas <1998uriyyo at gmail.com>: ---------- keywords: +patch pull_requests: +23228 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24413 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 09:51:10 2021 From: report at bugs.python.org (twoone3) Date: Mon, 01 Feb 2021 14:51:10 +0000 Subject: [issue43091] console encode is not utf-8!! In-Reply-To: <1612188927.24.0.642164421259.issue43091@roundup.psfhosted.org> Message-ID: <1612191070.69.0.569110634138.issue43091@roundup.psfhosted.org> twoone3 <3197653242 at qq.com> added the comment: After I changed it to 1, the console code remained unchanged. I use' chcp 65001' first. then i use PyPreConfig and Py_initialize then i 'cout << u8"Chinese??" << endl; It is not utf-8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 09:53:55 2021 From: report at bugs.python.org (twoone3) Date: Mon, 01 Feb 2021 14:53:55 +0000 Subject: [issue43091] console encode is not utf-8!! In-Reply-To: <1612188927.24.0.642164421259.issue43091@roundup.psfhosted.org> Message-ID: <1612191235.04.0.256176610836.issue43091@roundup.psfhosted.org> twoone3 <3197653242 at qq.com> added the comment: This is out put ---------- Added file: https://bugs.python.org/file49784/Screenshot_2021_0201_225300.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 09:56:49 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Feb 2021 14:56:49 +0000 Subject: [issue43091] console encode is not utf-8!! In-Reply-To: <1612188927.24.0.642164421259.issue43091@roundup.psfhosted.org> Message-ID: <1612191409.7.0.467684009215.issue43091@roundup.psfhosted.org> STINNER Victor added the comment: PyPreConfig.utf8_mode=1 enables the *Python* UTF-8 Mode: * https://docs.python.org/dev/c-api/init_config.html?highlight=pypreconfig_initpythonconfig#c.PyPreConfig.utf8_mode * https://docs.python.org/dev/library/os.html#utf8-mode > then i 'cout << u8"Chinese??" << endl; This is C++. C++ is not aware of the Python UTF-8 Mode. You misunderstood the purpose of the Python UTF-8 Mode. std::cout must be configured differently. This is not a Python problem. I suggest to close the issue. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 10:10:13 2021 From: report at bugs.python.org (twoone3) Date: Mon, 01 Feb 2021 15:10:13 +0000 Subject: [issue43091] console encode is not utf-8!! In-Reply-To: <1612188927.24.0.642164421259.issue43091@roundup.psfhosted.org> Message-ID: <1612192213.64.0.423085439222.issue43091@roundup.psfhosted.org> twoone3 <3197653242 at qq.com> added the comment: Look it! It's really Python's problem ---------- Added file: https://bugs.python.org/file49785/389e661314157b8f.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 10:13:58 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 01 Feb 2021 15:13:58 +0000 Subject: [issue43091] console encode is not utf-8!! In-Reply-To: <1612188927.24.0.642164421259.issue43091@roundup.psfhosted.org> Message-ID: <1612192438.85.0.985241955037.issue43091@roundup.psfhosted.org> Christian Heimes added the comment: It's not a Python problem. The Python configuration API only configures Python's input/output API to UTF-8 mode. It does not affect the C++ input/output cout API. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 10:15:55 2021 From: report at bugs.python.org (twoone3) Date: Mon, 01 Feb 2021 15:15:55 +0000 Subject: [issue43091] console encode is not utf-8!! In-Reply-To: <1612188927.24.0.642164421259.issue43091@roundup.psfhosted.org> Message-ID: <1612192555.25.0.455241654432.issue43091@roundup.psfhosted.org> twoone3 <3197653242 at qq.com> added the comment: when i use python 3.6.5 There won't be this problem ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 10:51:40 2021 From: report at bugs.python.org (Daniel Colascione) Date: Mon, 01 Feb 2021 15:51:40 +0000 Subject: [issue43092] Python installation fails to install pip3 if pip, setuptools in ~/.local Message-ID: <1612194700.53.0.93300728958.issue43092@roundup.psfhosted.org> New submission from Daniel Colascione : The ensurepip module in the Python distribution bootstraps the pip package manager. The Python build system runs this module during installation so that the resulting Python installation is ready to install packages. Right now, the pip command that ensurepip installs the pip and setuptools packages only if it doesn't find them installed already. The problem is that the pip run by ensurepip checks for its bootstrap packages in ~/.local, and if it finds them there, it concludes it doesn't need to install these packages as part of bootstrap. But in various situations (e.g., installing Python into an isolated environment), these packages need to be installed anyway. ensurepip should ignore packages in ~/.local, at least when as part of the Python build system ---------- components: Installation messages: 386079 nosy: quotemstr priority: normal severity: normal status: open title: Python installation fails to install pip3 if pip, setuptools in ~/.local versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 11:06:13 2021 From: report at bugs.python.org (hai shi) Date: Mon, 01 Feb 2021 16:06:13 +0000 Subject: [issue42035] [C API] PyType_GetSlot cannot get tp_name In-Reply-To: <1602683525.08.0.938781399322.issue42035@roundup.psfhosted.org> Message-ID: <1612195573.54.0.68190949648.issue42035@roundup.psfhosted.org> hai shi added the comment: I found `type.__name__` has the implementation details in https://github.com/python/cpython/blob/master/Objects/typeobject.c#L486. IMHO, keep the consistency in `PyType_GetName()` is OK. Victor, Petr. Do you think it make senses? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 11:27:05 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Feb 2021 16:27:05 +0000 Subject: [issue42834] [subinterpreters] Convert "global" static variable caches in _json to heap variables In-Reply-To: <1609862045.06.0.177130417143.issue42834@roundup.psfhosted.org> Message-ID: <1612196825.19.0.100057571059.issue42834@roundup.psfhosted.org> STINNER Victor added the comment: New changeset b5931f1d9f1f9f907e5cb6e193154672f78c1225 by Ken Jin in branch 'master': bpo-42834: Fix _json internal caches for subinterpreters (GH-24121) https://github.com/python/cpython/commit/b5931f1d9f1f9f907e5cb6e193154672f78c1225 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 11:27:44 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Feb 2021 16:27:44 +0000 Subject: [issue42834] [subinterpreters] Convert "global" static variable caches in _json to heap variables In-Reply-To: <1609862045.06.0.177130417143.issue42834@roundup.psfhosted.org> Message-ID: <1612196864.6.0.365990194884.issue42834@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 Feb 1 12:26:07 2021 From: report at bugs.python.org (Vladimir Feinberg) Date: Mon, 01 Feb 2021 17:26:07 +0000 Subject: [issue43048] Printing RecursionError results in RecursionError In-Reply-To: <1612029611.13.0.863706484332.issue43048@roundup.psfhosted.org> Message-ID: Vladimir Feinberg added the comment: A simple catch may not work (the very first TracebackException is the one that gets the RecursionError during initialization of its __context__), but one thing I was thinking about was walking the __context__ pointers and nulling out anything past the sys.getrecursionlimit() with a warning. On Sat, Jan 30, 2021 at 10:00 AM Irit Katriel wrote: > > Change by Irit Katriel : > > > ---------- > keywords: +easy > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 12:28:35 2021 From: report at bugs.python.org (Brandt Bucher) Date: Mon, 01 Feb 2021 17:28:35 +0000 Subject: [issue43085] Loosening | and |= operator type checking restriction In-Reply-To: <1612109679.82.0.693593534177.issue43085@roundup.psfhosted.org> Message-ID: <1612200515.88.0.462278794899.issue43085@roundup.psfhosted.org> Brandt Bucher added the comment: Yurii, I agree with Raymond that it's probably not worth adding new ABCs for this. I'm happy to consider patches that add these operators to concrete stdlib mappings on a case-by-case basis. However, please be aware that we already went through a fairly comprehensive review of each dict/Mapping/MutableMapping subclass (real or virtual) in the entire stdlib to see if they would benefit here. I don't think we bothered updating *any* classes that weren't publicly documented, which is probably why "SignalDict" was left untouched. It's also important to remember that the motivating use-case for PEP 584 was binary "|", and that "|=" just logically followed from that change. In this specific case, I think just using the good ol' update method (or even item assignment) is probably good enough. I'm not very familiar with how SignalDict is used, though: do we ever actually want to create a new updated copy using binary "|"? That would probably be enough to convince me. ---------- components: +Library (Lib) -Regular Expressions versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 12:38:40 2021 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Mon, 01 Feb 2021 17:38:40 +0000 Subject: [issue43085] Loosening | and |= operator type checking restriction In-Reply-To: <1612109679.82.0.693593534177.issue43085@roundup.psfhosted.org> Message-ID: <1612201120.43.0.662409998576.issue43085@roundup.psfhosted.org> Vedran ?a?i? added the comment: @Raymond: why can't ABCs have _default_ implementation of | and |=, in terms of other supported methods (such as update)? It seems to me this would be the best of both worlds. ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 12:39:16 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 01 Feb 2021 17:39:16 +0000 Subject: [issue38307] Add .end_lineno attribute to pyclbr _Objects In-Reply-To: <1569691590.29.0.185701662636.issue38307@roundup.psfhosted.org> Message-ID: <1612201156.39.0.177789012695.issue38307@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 000cde59847beaf5fa7b73633e1f3c898fe5bf90 by Aviral Srivastava in branch 'master': bpo-38307: Add end_lineno attribute to pyclbr Objects (GH-24348) https://github.com/python/cpython/commit/000cde59847beaf5fa7b73633e1f3c898fe5bf90 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 13:07:13 2021 From: report at bugs.python.org (Brandt Bucher) Date: Mon, 01 Feb 2021 18:07:13 +0000 Subject: [issue43085] Loosening | and |= operator type checking restriction In-Reply-To: <1612109679.82.0.693593534177.issue43085@roundup.psfhosted.org> Message-ID: <1612202833.73.0.422059372209.issue43085@roundup.psfhosted.org> Brandt Bucher added the comment: Any class that registers itself as a Mapping/MutableMapping using their "register" methods (*not* through inheritance) will be lacking the new methods. This includes all C extensions. Further, binary "|" would require subclasses of these ABCs to have a concrete way of creating a new instance (we don't have anything like Set._from_iterable for this). One option could be to just call self.__class__({**self, **other}), but a cursory scan of the stdlib shows that many classes don't have compatible signatures, and the we would get lots of surprising/broken behavior if we just suddenly introduced this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 13:09:11 2021 From: report at bugs.python.org (Matej Volf) Date: Mon, 01 Feb 2021 18:09:11 +0000 Subject: [issue26455] Inconsistent behavior with KeyboardInterrupt and asyncio futures In-Reply-To: <1456689026.99.0.0359024900858.issue26455@psf.upfronthosting.co.za> Message-ID: <1612202951.98.0.453739322706.issue26455@roundup.psfhosted.org> Matej Volf added the comment: python/asyncio is archived now and there is no definitive resolution, nor a concrete workaround in that thread. has this progressed elsewhere? or is it still unresolved? could anyone please show sample workaround code? (i need to call some cleanup code which still runs in the context of the event loop) --- also, I was unable to login to this bug tracker with GitHub, because my name contains non-ascii characters. where should I report that :D ? ---------- nosy: +mvolfik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 13:13:24 2021 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 01 Feb 2021 18:13:24 +0000 Subject: [issue26455] Inconsistent behavior with KeyboardInterrupt and asyncio futures In-Reply-To: <1456689026.99.0.0359024900858.issue26455@psf.upfronthosting.co.za> Message-ID: <1612203204.11.0.536805578976.issue26455@roundup.psfhosted.org> Guido van Rossum added the comment: If you just need help, I recommend https://discuss.python.org/c/users/7 If you still have an issue with ^C, open a new issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 13:57:25 2021 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 01 Feb 2021 18:57:25 +0000 Subject: [issue43053] Speed up math.isqrt, again In-Reply-To: <1611821006.77.0.580238316666.issue43053@roundup.psfhosted.org> Message-ID: <1612205845.73.0.797045448053.issue43053@roundup.psfhosted.org> Mark Dickinson added the comment: > the complication probably amounts to no more than 10-20 extra lines of C code A net difference of 16 lines of code, as it turns out. The branch is here: https://github.com/mdickinson/cpython/tree/isqrt-performance Informal not-very-scientific timings more-or-less confirm what I expected: I _do_ get a speedup approaching a factor of 2 for huge n: getting a million digits of sqrt(2) via `n = 2*10**10**6; x = isqrt(n)` takes around 9 seconds on master and 5 seconds with this branch, on my machine. But for values with 20 digits or so, the overhead of the extra operations means that the algorithm is around 20% slower. The cutoff for me seems to be somewhere between 200 and 1000 digits. So I'm afraid I'm going to leave this as is: if speed were all we cared about then there are all sorts of things we could try, but I'd rather keep the simplicity. And it's nice that it's still *possible* to compute a million digits of sqrt(2) in a few seconds. Java's implementation of BigInteger.sqrt can't do that. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 14:04:52 2021 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 01 Feb 2021 19:04:52 +0000 Subject: [issue43053] Speed up math.isqrt, again In-Reply-To: <1611821006.77.0.580238316666.issue43053@roundup.psfhosted.org> Message-ID: <1612206292.27.0.278774300122.issue43053@roundup.psfhosted.org> Change by Mark Dickinson : ---------- keywords: +patch pull_requests: +23229 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24414 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 14:17:44 2021 From: report at bugs.python.org (Arusekk) Date: Mon, 01 Feb 2021 19:17:44 +0000 Subject: [issue43093] Make modules picklable Message-ID: <1612207064.95.0.494686404563.issue43093@roundup.psfhosted.org> New submission from Arusekk : Currently pickling functions and types stores modules by their name. So I believe it is possible to support pickling module objects with the following code (based on the logic in PyPy, which supports pickling modules): import copyreg import types import pickle import sys def picklemod(mod): if mod.__name__ in sys.modules: # real modules return (__import__, (mod.__name__, None, None, ('',))) # module objects created manually: return (types.ModuleType, (mod.__name__,), mod.__dict__) copyreg.pickle(types.ModuleType, picklemod) pickle.loads(pickle.dumps(sys)) # works import http.server pickle.loads(pickle.dumps(http.server)) # works for nested modules fakemod = types.ModuleType('fakemod') fakemod.field1 = 'whatever' # This fake type is used instead of types.ModuleType in order to re-confuse pickle back on track. # Should not have been necessary in the first place, # but types.ModuleType has misconfigured fields according to pickle # (and they are read-only). class _types_ModuleType(types.ModuleType): __module__ = 'types' __name__ = __qualname__ = 'ModuleType' _orig_types_ModuleType = types.ModuleType # bad monkey-patching, but needed for the confusion to work types.ModuleType = _types_ModuleType dump = pickle.dumps(fakemod) # not necessary, but to show unpickling is regardless correct types.ModuleType = _orig_types_ModuleType pickle.loads(dump).field1 # works Disclaimer: I do not see any specific use for this, I was just surprised while trying to port snakeoil library to PyPy, which (snakeoil) uses sys module as an example of an unpicklable object (they should switch to a traceback for instance, but that is not the scope of this issue). ---------- components: Library (Lib) messages: 386090 nosy: Arusekk priority: normal severity: normal status: open title: Make modules picklable type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 14:28:18 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 01 Feb 2021 19:28:18 +0000 Subject: [issue43074] Unable to use system proxy with HTTPS connection on Windows In-Reply-To: <1611993489.22.0.338889763746.issue43074@roundup.psfhosted.org> Message-ID: <1612207698.45.0.0599599884276.issue43074@roundup.psfhosted.org> Steve Dower added the comment: requests is a third-party library that has no obligation to use urllib's functionality. If you can show the same behaviour with urllib alone, we can treat it as an issue here. Otherwise, you'll need to report it to requests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 14:30:01 2021 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 01 Feb 2021 19:30:01 +0000 Subject: [issue43053] Speed up math.isqrt, again In-Reply-To: <1611821006.77.0.580238316666.issue43053@roundup.psfhosted.org> Message-ID: <1612207801.53.0.166148515317.issue43053@roundup.psfhosted.org> Mark Dickinson added the comment: > Java's implementation of BigInteger.sqrt can't do that. :-) Well, okay, depending on your definition of "a few", actually it can, but Python is still faster. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 14:35:15 2021 From: report at bugs.python.org (Austin Lamb) Date: Mon, 01 Feb 2021 19:35:15 +0000 Subject: [issue42825] Build libraries with "/OPT:REF" linker optimization on Windows In-Reply-To: <1609782160.13.0.0224895080942.issue42825@roundup.psfhosted.org> Message-ID: <1612208115.84.0.670008012573.issue42825@roundup.psfhosted.org> Austin Lamb added the comment: Ping - can anyone suggest either how ctypes does its exporting, or suggest tests I could run to confirm if this change affects python code? The entire test suite in the repo passes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 14:39:48 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 01 Feb 2021 19:39:48 +0000 Subject: [issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow? In-Reply-To: <1610404013.09.0.265713602389.issue42899@roundup.psfhosted.org> Message-ID: <1612208388.85.0.647835848047.issue42899@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Mark, what is the status of this issue? This is marked as a release blocker so I would prefer not to release the next alpha with this being unfixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 14:42:59 2021 From: report at bugs.python.org (Emmanuel Arias) Date: Mon, 01 Feb 2021 19:42:59 +0000 Subject: [issue42464] Pathlib resolve() resolves non-existent ".." components with strict=False In-Reply-To: <1606320449.29.0.994355220822.issue42464@roundup.psfhosted.org> Message-ID: <1612208579.06.0.0731293838367.issue42464@roundup.psfhosted.org> Emmanuel Arias added the comment: Hi, I don't understand the point here. If you go back on a folder '..', IMO has more sense remove the '..', that is a way to resolve it ---------- nosy: +eamanu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 14:44:18 2021 From: report at bugs.python.org (Arusekk) Date: Mon, 01 Feb 2021 19:44:18 +0000 Subject: [issue43093] Make modules picklable In-Reply-To: <1612207064.95.0.494686404563.issue43093@roundup.psfhosted.org> Message-ID: <1612208658.97.0.645260626964.issue43093@roundup.psfhosted.org> Arusekk added the comment: Sorry, I forgot to state what is my actual goal: for the module objects to be pickleable in native CPython (possibly from C layer) without the need to add this to every code that wants to pickle module objects. The point is that they can already be unpickled from the representation generated by the code, so it should only be necessary to implement __reduce__ in moduleobject.c, and probably to change the object's qualname / module attributes. Or to introduce a helper function, like PyPy did, for the fake module case; I just found supporting existing unpickling paths more elegant (and working across all Python versions since 2.0.0), as much as unelegant is the monkey-patching done in my example. It is possible that (for the actual module case) _compat_pickle.REVERSE_IMPORT_MAPPING should be considered as well for the old protocols (which would probably imply using __reduce_ex__ instead), but I did not explore that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 14:51:38 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 01 Feb 2021 19:51:38 +0000 Subject: [issue42825] Build libraries with "/OPT:REF" linker optimization on Windows In-Reply-To: <1609782160.13.0.0224895080942.issue42825@roundup.psfhosted.org> Message-ID: <1612209098.7.0.688451331012.issue42825@roundup.psfhosted.org> Steve Dower added the comment: On Windows it should only affect non-exported functions. Comparing "dumpbin /exports" output will tell you whether anything has changed there. The bigger concern is if it merges identical functions that are compared by function pointer. I know we've had issues with that in the past, and I forget how we've dealt with that. I thought OPT:REF would do this optimisation too (though ISTR it's known as COMDAT folding and may have its own option). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 14:59:38 2021 From: report at bugs.python.org (Emmanuel Arias) Date: Mon, 01 Feb 2021 19:59:38 +0000 Subject: [issue43063] zipfile.Path / importlib.resources raises KeyError if a file wasn't found In-Reply-To: <1611939371.43.0.787270932991.issue43063@roundup.psfhosted.org> Message-ID: <1612209578.25.0.797379618736.issue43063@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- nosy: +eamanu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 15:08:53 2021 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 01 Feb 2021 20:08:53 +0000 Subject: [issue42911] Addition chains for pow saves 5-20% time for pow(int, int) In-Reply-To: <1610463140.75.0.177431925065.issue42911@roundup.psfhosted.org> Message-ID: <1612210133.11.0.154909766265.issue42911@roundup.psfhosted.org> Mark Dickinson added the comment: Looks like Tim isn't taking the bait. :-) @Jurjen: Thank you for the suggestion and PR, but I'm going to close here; for me this ends up on the wrong side of the performance / complexity trade-off. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 15:09:42 2021 From: report at bugs.python.org (Ethan Furman) Date: Mon, 01 Feb 2021 20:09:42 +0000 Subject: [issue35815] Able to instantiate a subclass with abstract methods from __init_subclass__ of the ABC In-Reply-To: <1548316625.2.0.852101004839.issue35815@roundup.psfhosted.org> Message-ID: <1612210182.94.0.146427426713.issue35815@roundup.psfhosted.org> Ethan Furman added the comment: That patch was reject in favor of updating Enum to use `__set_name__` to do the final creation of enum members. The same thing could be done for ABC, but I lack the C skills to make it happen. ---------- assignee: ethan.furman -> superseder: __init_subclass__ should be called in __init__ -> versions: +Python 3.10 -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 15:10:10 2021 From: report at bugs.python.org (Nicholas Chammas) Date: Mon, 01 Feb 2021 20:10:10 +0000 Subject: [issue43094] sqlite3.create_function takes parameter named narg, not num_params Message-ID: <1612210210.19.0.0751315887137.issue43094@roundup.psfhosted.org> New submission from Nicholas Chammas : The doc for sqlite3.create_function shows the signature as follows: https://docs.python.org/3.9/library/sqlite3.html#sqlite3.Connection.create_function ``` create_function(name, num_params, func, *, deterministic=False) ``` But it appears that the parameter name is `narg`, not `num_params`. Trying `num_params` yields: ``` TypeError: function missing required argument 'narg' (pos 2) ``` ---------- assignee: docs at python components: Documentation messages: 386100 nosy: docs at python, nchammas priority: normal severity: normal status: open title: sqlite3.create_function takes parameter named narg, not num_params versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 15:10:16 2021 From: report at bugs.python.org (Ethan Furman) Date: Mon, 01 Feb 2021 20:10:16 +0000 Subject: [issue35815] Able to instantiate a subclass with abstract methods from __init_subclass__ of the ABC In-Reply-To: <1548316625.2.0.852101004839.issue35815@roundup.psfhosted.org> Message-ID: <1612210216.83.0.0618632505226.issue35815@roundup.psfhosted.org> Change by Ethan Furman : ---------- Removed message: https://bugs.python.org/msg386099 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 15:10:34 2021 From: report at bugs.python.org (Ethan Furman) Date: Mon, 01 Feb 2021 20:10:34 +0000 Subject: [issue35815] Able to instantiate a subclass with abstract methods from __init_subclass__ of the ABC In-Reply-To: <1548316625.2.0.852101004839.issue35815@roundup.psfhosted.org> Message-ID: <1612210234.96.0.324498011259.issue35815@roundup.psfhosted.org> Ethan Furman added the comment: That patch was rejected in favor of updating Enum to use `__set_name__` to do the final creation of enum members. The same thing could be done for ABC, but I lack the C skills to make it happen. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 15:11:04 2021 From: report at bugs.python.org (Ethan Furman) Date: Mon, 01 Feb 2021 20:11:04 +0000 Subject: [issue42727] [Enum] EnumMeta.__prepare__ needs to accept **kwds In-Reply-To: <1608781282.89.0.997821175942.issue42727@roundup.psfhosted.org> Message-ID: <1612210264.5.0.78188269614.issue42727@roundup.psfhosted.org> Change by Ethan Furman : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 15:13:25 2021 From: report at bugs.python.org (Ethan Furman) Date: Mon, 01 Feb 2021 20:13:25 +0000 Subject: [issue40042] Enum Flag: psuedo-members have None for name attribute In-Reply-To: <1589810738.21.0.092571074978.issue40042@roundup.psfhosted.org> Message-ID: <1612210405.02.0.74862932506.issue40042@roundup.psfhosted.org> Ethan Furman added the comment: This issue is fixed in #38250. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed superseder: -> enum.Flag should be more set-like _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 15:13:20 2021 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 01 Feb 2021 20:13:20 +0000 Subject: [issue43088] Regression in math.hypot In-Reply-To: <1612132425.22.0.477732752771.issue43088@roundup.psfhosted.org> Message-ID: <1612210400.36.0.836885735506.issue43088@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 15:16:33 2021 From: report at bugs.python.org (Jairo Llopis) Date: Mon, 01 Feb 2021 20:16:33 +0000 Subject: [issue43095] Windows does not raise IsADirectoryError Message-ID: <1612210593.79.0.943479970127.issue43095@roundup.psfhosted.org> New submission from Jairo Llopis : Trying to read a directory on Linux raises the expected exception: Python 3.9.1 (default, Jan 20 2021, 00:00:00) [GCC 10.2.1 20201125 (Red Hat 10.2.1-9)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import pathlib >>> pathlib.Path(".venv").read_text() Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.9/pathlib.py", line 1255, in read_text with self.open(mode='r', encoding=encoding, errors=errors) as f: File "/usr/lib64/python3.9/pathlib.py", line 1241, in open return io.open(self, mode, buffering, encoding, errors, newline, IsADirectoryError: [Errno 21] Is a directory: '.venv' Doing the same on Windows raises a misleading permission error instead: >>> import pathlib >>> pathlib.Path(".venv").read_text() Traceback (most recent call last): File "", line 1, in File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.496.0_x64__qbz5n2kfra8p0\lib\pathlib.py", line 1255, in read_text with self.open(mode='r', encoding=encoding, errors=errors) as f: File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.496.0_x64__qbz5n2kfra8p0\lib\pathlib.py", line 1241, in open return io.open(self, mode, buffering, encoding, errors, newline, File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.496.0_x64__qbz5n2kfra8p0\lib\pathlib.py", line 1109, in _opener return self._accessor.open(self, flags, mode) PermissionError: [Errno 13] Permission denied: '.venv' ---------- components: Windows messages: 386103 nosy: Jairo Llopis, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Windows does not raise IsADirectoryError versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 15:32:55 2021 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 01 Feb 2021 20:32:55 +0000 Subject: [issue41748] HTMLParser: comma in attribute values with/without space In-Reply-To: <1599602370.01.0.842812753139.issue41748@roundup.psfhosted.org> Message-ID: <1612211575.88.0.35698380016.issue41748@roundup.psfhosted.org> Ezio Melotti added the comment: New changeset 9eb11a139fac5514d8456626806a68b3e3b7eafb by Karl Dubost in branch 'master': bpo-41748: Handles unquoted attributes with commas (#24072) https://github.com/python/cpython/commit/9eb11a139fac5514d8456626806a68b3e3b7eafb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 15:33:11 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Feb 2021 20:33:11 +0000 Subject: [issue41748] HTMLParser: comma in attribute values with/without space In-Reply-To: <1599602370.01.0.842812753139.issue41748@roundup.psfhosted.org> Message-ID: <1612211591.89.0.478601211256.issue41748@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +23230 pull_request: https://github.com/python/cpython/pull/24415 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 15:33:24 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Feb 2021 20:33:24 +0000 Subject: [issue41748] HTMLParser: comma in attribute values with/without space In-Reply-To: <1599602370.01.0.842812753139.issue41748@roundup.psfhosted.org> Message-ID: <1612211604.33.0.456839093325.issue41748@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +23231 pull_request: https://github.com/python/cpython/pull/24416 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 15:35:35 2021 From: report at bugs.python.org (Eryk Sun) Date: Mon, 01 Feb 2021 20:35:35 +0000 Subject: [issue43091] console encode is not utf-8!! In-Reply-To: <1612188927.24.0.642164421259.issue43091@roundup.psfhosted.org> Message-ID: <1612211735.76.0.570627283007.issue43091@roundup.psfhosted.org> Eryk Sun added the comment: I assume you're linking to the CRT dynamically, which is shared with "python39.dll", which means you're sharing the configured locale with Python. Since you're not using an isolated configuration, the LC_CTYPE locale will be set to the current user's default locale (configured in "HKCU\Control Panel\International"). If the STDOUT low I/O file is in ANSI text mode, and the LC_CTYPE locale is not the default "C" locale, and it's a console file, then C write() does a double translated write. First, the UTF-8 byte string is decoded to wide-character UTF-16 using the current LC_CTYPE locale encoding. Then the wide-character string is encoded back to a byte string using the console output code page. The first step leads to mojibake if the locale encoding isn't UTF-8. At a minimum, you'll need to add `cfg.configure_locale = 0` in order to prevent Python from configuring the LC_CTYPE locale to the default user locale. That said, your code should be written to work in locales other than the default "C" locale. For the past few years, Windows ucrt has supported UTF-8 as a locale encoding, such as via setlocale(LC_CTYPE, ".utf8"). Alternatively, or in addition to the latter, you can use std::wcout with wide-character strings and switch stdout to UTF-8 Unicode mode via _setmode(_fileno(stdout), _O_U8TEXT). In this case, the CRT writes to the console via putwch(), which calls the wide-character WinAPI function WriteConsoleW(). If your code uses UTF-8 byte strings, you'll have to decode them to UTF-16 wide-character strings before writing to stdout. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 15:50:24 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 01 Feb 2021 20:50:24 +0000 Subject: [issue41490] Update bundled pip to 20.2.1 and setuptools to 49.2.1 In-Reply-To: <1596662779.45.0.341157838113.issue41490@roundup.psfhosted.org> Message-ID: <1612212624.09.0.873593782665.issue41490@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Friendly reminder that this issue is currently blocking the 3.10a5 release. If you are ok with waiting for the next release to include the fix, please say so here or drop me an email/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 15:50:29 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 01 Feb 2021 20:50:29 +0000 Subject: [issue42634] Incorrect line number in bytecode for try-except-finally In-Reply-To: <1607930696.05.0.974303425196.issue42634@roundup.psfhosted.org> Message-ID: <1612212629.72.0.760649258831.issue42634@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Friendly reminder that this issue is currently blocking the 3.10a5 release. If you are ok with waiting for the next release to include the fix, please say so here or drop me an email/ ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 15:50:33 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 01 Feb 2021 20:50:33 +0000 Subject: [issue38302] [3.10] __pow__ and __rpow__ are not reached when __ipow__ returns NotImplemented for **= In-Reply-To: <1569621315.69.0.377751123288.issue38302@roundup.psfhosted.org> Message-ID: <1612212633.67.0.934019740013.issue38302@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Friendly reminder that this issue is currently blocking the 3.10a5 release. If you are ok with waiting for the next release to include the fix, please say so here or drop me an email/ ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 15:52:17 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Feb 2021 20:52:17 +0000 Subject: [issue41748] HTMLParser: comma in attribute values with/without space In-Reply-To: <1599602370.01.0.842812753139.issue41748@roundup.psfhosted.org> Message-ID: <1612212737.78.0.972337344014.issue41748@roundup.psfhosted.org> STINNER Victor added the comment: Oh, thank you Karl Dubost for the fix! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 15:53:20 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 01 Feb 2021 20:53:20 +0000 Subject: [issue26455] Inconsistent behavior with KeyboardInterrupt and asyncio futures In-Reply-To: <1456689026.99.0.0359024900858.issue26455@psf.upfronthosting.co.za> Message-ID: <1612212800.49.0.154173986792.issue26455@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 15:53:23 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Feb 2021 20:53:23 +0000 Subject: [issue41748] HTMLParser: comma in attribute values with/without space In-Reply-To: <1599602370.01.0.842812753139.issue41748@roundup.psfhosted.org> Message-ID: <1612212803.33.0.867774655608.issue41748@roundup.psfhosted.org> miss-islington added the comment: New changeset 0869a713f21f4b2fe021d802cf18f1b1af53695f by Miss Islington (bot) in branch '3.8': bpo-41748: Handles unquoted attributes with commas (GH-24072) https://github.com/python/cpython/commit/0869a713f21f4b2fe021d802cf18f1b1af53695f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 15:54:46 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 01 Feb 2021 20:54:46 +0000 Subject: [issue41748] HTMLParser: comma in attribute values with/without space In-Reply-To: <1599602370.01.0.842812753139.issue41748@roundup.psfhosted.org> Message-ID: <1612212886.59.0.740555166312.issue41748@roundup.psfhosted.org> miss-islington added the comment: New changeset 0874491bcc392f7bd9c394ec2fdab183e3f320dd by Miss Islington (bot) in branch '3.9': bpo-41748: Handles unquoted attributes with commas (GH-24072) https://github.com/python/cpython/commit/0874491bcc392f7bd9c394ec2fdab183e3f320dd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 15:57:38 2021 From: report at bugs.python.org (Selim Belhaouane) Date: Mon, 01 Feb 2021 20:57:38 +0000 Subject: [issue43064] Cannot clear signal handler set with loop.add_signal_handler in forked process with signal.signal In-Reply-To: <1611949897.69.0.881699073289.issue43064@roundup.psfhosted.org> Message-ID: <1612213058.31.0.316074698838.issue43064@roundup.psfhosted.org> Selim Belhaouane added the comment: Playing with this a bit more, I found a weird workaround. By adding the following to the top of worker_sync(), Experiment 1 produces the expected result. def worker_sync(): async def clear_asyncio_signal_handlers(): loop = asyncio.get_event_loop() loop.add_signal_handler(signal.SIGINT, signal.SIG_IGN) asyncio.run(clear_asyncio_signal_handlers()) if WORKER_SIGNAL_HANDLER is WorkerSignalHandler.NONE: [...] FYI, this did *not* work (the outcome is still the same for Experiment 1): def worker_sync(): loop = asyncio.get_event_loop() loop.add_signal_handler(signal.SIGINT, signal.SIG_IGN) if WORKER_SIGNAL_HANDLER is WorkerSignalHandler.NONE: [...] Maybe this all can be flagged as "as designed". However, perhaps it could be documented? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 16:01:29 2021 From: report at bugs.python.org (Paul Moore) Date: Mon, 01 Feb 2021 21:01:29 +0000 Subject: [issue41490] Update bundled pip to 20.2.1 and setuptools to 49.2.1 In-Reply-To: <1596662779.45.0.341157838113.issue41490@roundup.psfhosted.org> Message-ID: <1612213289.61.0.472417353023.issue41490@roundup.psfhosted.org> Paul Moore added the comment: I'm not sure why, but the PR to update the bundled pip to 21.0.1 (and setuptools to 52.0.0) merged cleanly, so this may be obsolete now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 16:14:14 2021 From: report at bugs.python.org (jakirkham) Date: Mon, 01 Feb 2021 21:14:14 +0000 Subject: [issue43096] Adding `read_into` method to `asyncio.StreamReader` Message-ID: <1612214054.71.0.664238583626.issue43096@roundup.psfhosted.org> New submission from jakirkham : To allow reading into a provided buffer without copying, it would be useful to have a `read_into` method on `asyncio.StreamReader`, which takes a buffer supporting the buffer protocol and fills it. ---------- components: asyncio messages: 386114 nosy: asvetlov, jakirkham, yselivanov priority: normal severity: normal status: open title: Adding `read_into` method to `asyncio.StreamReader` type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 16:27:04 2021 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 01 Feb 2021 21:27:04 +0000 Subject: [issue41748] HTMLParser: comma in attribute values with/without space In-Reply-To: <1599602370.01.0.842812753139.issue41748@roundup.psfhosted.org> Message-ID: <1612214824.85.0.0567980747047.issue41748@roundup.psfhosted.org> Ezio Melotti added the comment: Merged! Thanks for the report and the PR! ---------- assignee: -> ezio.melotti resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 16:31:22 2021 From: report at bugs.python.org (Ned Batchelder) Date: Mon, 01 Feb 2021 21:31:22 +0000 Subject: [issue42634] Incorrect line number in bytecode for try-except-finally In-Reply-To: <1607930696.05.0.974303425196.issue42634@roundup.psfhosted.org> Message-ID: <1612215082.78.0.748779348618.issue42634@roundup.psfhosted.org> Ned Batchelder added the comment: This problem no longer appears with master (commit 9eb11a139f). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 16:33:03 2021 From: report at bugs.python.org (Eryk Sun) Date: Mon, 01 Feb 2021 21:33:03 +0000 Subject: [issue43095] Windows does not raise IsADirectoryError In-Reply-To: <1612210593.79.0.943479970127.issue43095@roundup.psfhosted.org> Message-ID: <1612215183.29.0.895300010034.issue43095@roundup.psfhosted.org> Eryk Sun added the comment: When an open attempts to access a directory as data, the error code from WinAPI CreateFileW is ERROR_ACCESS_DENIED (5), which maps to C EACCES and thus raises Python PermissionError. Python's io.FileIO() type could handle an EACCES error in Windows by checking for a directory. There's a race condition to consider in which an inaccessible file is replaced by a directory, but that seems to be a trivial concern. io.FileIO() could also use the undocumented _O_OBTAIN_DIR (0x2000) open flag. This opens with backup semantics, which allows opening directories. Then, as already implemented in POSIX, fail with EISDIR if a directory is opened. For example: >>> fd = os.open('C:/Temp', 0x2000) >>> stat.S_ISDIR(os.fstat(fd).st_mode) True ---------- components: +IO nosy: +eryksun type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 16:53:05 2021 From: report at bugs.python.org (Eryk Sun) Date: Mon, 01 Feb 2021 21:53:05 +0000 Subject: [issue42464] Pathlib resolve() resolves non-existent ".." components with strict=False In-Reply-To: <1606320449.29.0.994355220822.issue42464@roundup.psfhosted.org> Message-ID: <1612216385.12.0.116199964881.issue42464@roundup.psfhosted.org> Eryk Sun added the comment: I'd prefer to leave ".." in the path, at least with PosixPath. (It doesn't matter with WindowsPath.) The "there" component may be a symlink that's currently inaccessible. That said, Python's os.path.realpath() has a long history of naively resolving ".." components in the remainder. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 17:30:00 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 01 Feb 2021 22:30:00 +0000 Subject: [issue38078] IDLE: Don't run internal code in user namespace. In-Reply-To: <1568079471.24.0.207748043003.issue38078@roundup.psfhosted.org> Message-ID: <1612218600.91.0.55231270335.issue38078@roundup.psfhosted.org> Terry J. Reedy added the comment: Zachery, thank you for the PR to test. It turns out that the proposed change is more dangerous the the possible error it prevent. I could have easily missed the problem (not setting __file__, see PR). Before considering this again, I need to list ways to run user code with Python and what envivonment (cwd, path, dir() results. Then see what IDLE does in corresponding situations. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 17:34:47 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 01 Feb 2021 22:34:47 +0000 Subject: [issue43094] sqlite3.create_function takes parameter named narg, not num_params In-Reply-To: <1612210210.19.0.0751315887137.issue43094@roundup.psfhosted.org> Message-ID: <1612218887.27.0.445854858552.issue43094@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: There's also a discrepancy between the docs and the signature for create_aggregate(): https://docs.python.org/3.9/library/sqlite3.html#sqlite3.Connection.create_aggregate create_aggregate(name, num_params, aggregate_class) The second parameter is named n_arg, here with an underscore. I'm not sure what's the best fix; fixing the docs or the signatures. If we fix the signatures, we'll at least get a kind of consistency. ---------- nosy: +berker.peksag, erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 17:35:06 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 01 Feb 2021 22:35:06 +0000 Subject: [issue43094] sqlite3.create_function takes parameter named narg, not num_params In-Reply-To: <1612210210.19.0.0751315887137.issue43094@roundup.psfhosted.org> Message-ID: <1612218906.3.0.709687064158.issue43094@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 18:38:55 2021 From: report at bugs.python.org (Mark Shannon) Date: Mon, 01 Feb 2021 23:38:55 +0000 Subject: [issue42634] Incorrect line number in bytecode for try-except-finally In-Reply-To: <1607930696.05.0.974303425196.issue42634@roundup.psfhosted.org> Message-ID: <1612222735.5.0.310538326577.issue42634@roundup.psfhosted.org> Mark Shannon added the comment: Sorry. I forgot the close the issue when it was fixed. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 18:46:11 2021 From: report at bugs.python.org (twoone3) Date: Mon, 01 Feb 2021 23:46:11 +0000 Subject: [issue43091] console encode is not utf-8!! In-Reply-To: <1612188927.24.0.642164421259.issue43091@roundup.psfhosted.org> Message-ID: <1612223171.3.0.666199304695.issue43091@roundup.psfhosted.org> twoone3 <3197653242 at qq.com> added the comment: Thank you for solving my problem ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 19:03:23 2021 From: report at bugs.python.org (Mark Shannon) Date: Tue, 02 Feb 2021 00:03:23 +0000 Subject: [issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow? In-Reply-To: <1610404013.09.0.265713602389.issue42899@roundup.psfhosted.org> Message-ID: <1612224203.12.0.529573757396.issue42899@roundup.psfhosted.org> Mark Shannon added the comment: The differences between allowing the optimiser to remove truly redundant (in terms of control flow) boolean tests, or not, is slight. It only matters for __bool__() calls that have side effects. Like __hash__(), __bool__() should not produce side effects. There are three options, each with their own issues. 1. Freely remove redundant boolean checks, which means that b = B() try: if b: pass except: print("This won't happen, but it used to") will not print anything. 2. Don't remove redundant boolean checks, which prevents optimizations to remove repeated checks in short-circuiting operators, and would be a regression in terms of efficiency. 3. Attempt some sort of complex compromise. This is hard to get right, especially once the optimizer has started to transform the code. It is also likely to produce inconsistencies, in that `True or b` might behave differently from `b or True`. Both are true, but one might raise an exception, whereas the other might not. I favour option 1. It is already implemented. It is consistent both with itself, and with optimizations up to 3.9. PEP 626 means that it will generally only be applied to short-circuiting operators and will not eliminate entire lines. Note: b = B() try: if b: pass except: print("This will still happen") Will print, as PEP 626 requires the execution of the pass statement to be observable, as it is on a line by itself. Consequently the test must be performed. Given that this is quite obscure, I don't think it is a problem to release an alpha with this unresolved. I would like to resolve it before beta. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 19:10:18 2021 From: report at bugs.python.org (Mark Shannon) Date: Tue, 02 Feb 2021 00:10:18 +0000 Subject: [issue42990] Improve the C code for calling Python code: _PyEval_EvalCode() In-Reply-To: <1611245152.12.0.0348161555926.issue42990@roundup.psfhosted.org> Message-ID: <1612224618.98.0.806382755372.issue42990@roundup.psfhosted.org> Change by Mark Shannon : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 19:30:52 2021 From: report at bugs.python.org (Brett Cannon) Date: Tue, 02 Feb 2021 00:30:52 +0000 Subject: [issue38302] [3.10] __pow__ and __rpow__ are not reached when __ipow__ returns NotImplemented for **= In-Reply-To: <1569621315.69.0.377751123288.issue38302@roundup.psfhosted.org> Message-ID: <1612225852.73.0.879393200208.issue38302@roundup.psfhosted.org> Brett Cannon added the comment: I'm totally fine with pushing this until b1 since this has been broken for ages. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 19:38:04 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 02 Feb 2021 00:38:04 +0000 Subject: [issue43048] Printing RecursionError results in RecursionError In-Reply-To: <1611798337.38.0.626995188313.issue43048@roundup.psfhosted.org> Message-ID: <1612226284.61.0.211320336989.issue43048@roundup.psfhosted.org> Irit Katriel added the comment: I meant to catch the exception in the constructor?s recursive call, and if necessary then the same again in format (if there are more function calls per exception in format, it will be necessary. The unit test from the 3.10 patch will tell). Would that not work? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 19:38:42 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 02 Feb 2021 00:38:42 +0000 Subject: [issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow? In-Reply-To: <1612224203.12.0.529573757396.issue42899@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: I still favor (3) -- I don't want to renege on the promise we made when we allowed overloading comparisons to return something other than a bool. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 20:28:38 2021 From: report at bugs.python.org (Vladimir Feinberg) Date: Tue, 02 Feb 2021 01:28:38 +0000 Subject: [issue43048] Printing RecursionError results in RecursionError In-Reply-To: <1612226284.61.0.211320336989.issue43048@roundup.psfhosted.org> Message-ID: Vladimir Feinberg added the comment: Oh, yes, I suppose, that'll truncate to just the first TracebackException. On Mon, Feb 1, 2021 at 4:38 PM Irit Katriel wrote: > > Irit Katriel added the comment: > > I meant to catch the exception in the constructor?s recursive call, and if > necessary then the same again in format (if there are more function calls > per exception in format, it will be necessary. The unit test from the 3.10 > patch will tell). > > Would that not work? > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 23:07:52 2021 From: report at bugs.python.org (wyz23x2) Date: Tue, 02 Feb 2021 04:07:52 +0000 Subject: [issue43097] IndexError msg of random.choice() not helpful Message-ID: <1612238872.93.0.407149232495.issue43097@roundup.psfhosted.org> New submission from wyz23x2 : When you apply `random.choice` on empty sequences: >>> import random >>> random.choice([]) Traceback (most recent call last): File "", line 2, in return seq[self._randbelow(len(seq))] IndexError: list index out of range This message doesn't clearly state the real problem -- an empty seq. Meanwhile, many other methods give messages. >>> [].pop() Traceback (most recent call last): File "", line 3, in IndexError: pop from empty list >>> import collections >>> collections.deque().popleft() Traceback (most recent call last): File "", line 5, in IndexError: pop from an empty deque >>> random.randrange(0, 0) Traceback (most recent call last): File "", line 1, in File "C:\Program Files\Python39\lib\random.py", line 316, in randrange raise ValueError("empty range for randrange() (%d, %d, %d)" % (istart, istop, width)) ValueError: empty range for randrange() (0, 0, 0) P.S. Both are empty sequences/ranges, randrange() raises ValueError, while choice() raises IndexError. ---------- components: Library (Lib) messages: 386128 nosy: wyz23x2 priority: normal severity: normal status: open title: IndexError msg of random.choice() not helpful versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 23:28:32 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 02 Feb 2021 04:28:32 +0000 Subject: [issue43097] IndexError msg of random.choice() not helpful In-Reply-To: <1612238872.93.0.407149232495.issue43097@roundup.psfhosted.org> Message-ID: <1612240112.38.0.134291481692.issue43097@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +mark.dickinson, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 1 23:35:47 2021 From: report at bugs.python.org (Val Shkolnikov) Date: Tue, 02 Feb 2021 04:35:47 +0000 Subject: [issue43098] tarfile list() method does not show file type Message-ID: <1612240547.16.0.611621491067.issue43098@roundup.psfhosted.org> New submission from Val Shkolnikov : The list() method of TarFile tarfile object shows question mark in place of file type in verbose mode. For instance python3 -m tarfile -v -l my.tar ?rwxr-xr-x vals/users 0 2021-01-16 18:28:30 bin/ ?rwxr-x--- vals/users 266 2021-01-16 18:28:30 bin/backmine.sh ?rwxr-xr-x vals/users 950 2018-01-02 10:39:18 bin/tm.sh ?rwxrwxrwx vals/users 0 2021-01-16 11:49:36 bin/source-highlight -> ../source-highlight/bin/source-highlight ?rwxr-xr-x vals/users 435 2011-03-27 15:38:06 bin/dd.sh This is because the call stat.filemode(tarinfo.mode) does not pass tarinfo.type to stat.filemode. The type needs to be properly encoded and added to the argument. My patch is attached. Verified under Linux, Cygwin and Windows. ---------- files: patch messages: 386129 nosy: val.shkolnikov priority: normal severity: normal status: open title: tarfile list() method does not show file type type: behavior versions: Python 3.7, Python 3.8 Added file: https://bugs.python.org/file49786/patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 03:06:03 2021 From: report at bugs.python.org (iqanansoft) Date: Tue, 02 Feb 2021 08:06:03 +0000 Subject: [issue43099] Deleted positions lists Message-ID: <1612253163.41.0.307973043012.issue43099@roundup.psfhosted.org> New submission from iqanansoft : Hello, in a list, when using the slice notation, if a higher rank is placed than the new data, the positions of the list are removed list_test=[0,1,2,3,4,5,6] list_test[2:4]=["two","three"] result-->[0,1,'two','three',4,5,6] this is correct, but this list_test=[0,1,2,3,4,5,6] list_test[2:21]=["two","three"] result-->[0,1,'two','three'] deleted last positions ---------- messages: 386130 nosy: iqanansoft priority: normal severity: normal status: open title: Deleted positions lists type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 03:19:10 2021 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 02 Feb 2021 08:19:10 +0000 Subject: [issue43099] Deleted positions lists In-Reply-To: <1612253163.41.0.307973043012.issue43099@roundup.psfhosted.org> Message-ID: <1612253950.2.0.937369138289.issue43099@roundup.psfhosted.org> Eric V. Smith added the comment: That's the correct behavior. The elements given by the start and end range are replaced by what's on the right hand side of the assignment. They don't need to be the same length. >>> list_test=[0,1,2,3,4,5,6] >>> list_test[2:5] = ['two', 'three'] >>> list_test [0, 1, 'two', 'three', 5, 6] ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 03:35:40 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 02 Feb 2021 08:35:40 +0000 Subject: [issue43048] Printing RecursionError results in RecursionError In-Reply-To: <1611798337.38.0.626995188313.issue43048@roundup.psfhosted.org> Message-ID: <1612254940.31.0.280689498312.issue43048@roundup.psfhosted.org> Irit Katriel added the comment: It should truncate at the call that raised the recursion error, not the first one. Do you want to create a patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 05:40:02 2021 From: report at bugs.python.org (Matej Cepl) Date: Tue, 02 Feb 2021 10:40:02 +0000 Subject: [issue36302] distutils creates unreproducible .so files In-Reply-To: <1552653033.32.0.635728597537.issue36302@roundup.psfhosted.org> Message-ID: <1612262402.85.0.949164195513.issue36302@roundup.psfhosted.org> Matej Cepl added the comment: > In particular, I sort the source list by age when working on larger extensions, this makes sure that the source files I edited last get compiled first, which speeds up edit/build cycles. On the one hand, this sounds creepily like https://xkcd.com/1172, but on the other: why do we need to sort those extensions by name? Wouldn?t sorting by some attribute of those extensions (including their size) be better? ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 05:48:12 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Feb 2021 10:48:12 +0000 Subject: [issue36302] distutils creates unreproducible .so files In-Reply-To: <1552653033.32.0.635728597537.issue36302@roundup.psfhosted.org> Message-ID: <1612262892.47.0.154971889981.issue36302@roundup.psfhosted.org> STINNER Victor added the comment: > Why do we need to sort those extensions by name? Because calling sorted() is easy. Any other arbitrary choice would make sense. But giving the ability to build sources in a specific order, add dependencies, or something else, would a new features. Also, distutils is now deprecated in the stdlib: the steering council approved https://www.python.org/dev/peps/pep-0632/ You should now report distutils issues to setuptools. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 05:49:04 2021 From: report at bugs.python.org (Divyanshu) Date: Tue, 02 Feb 2021 10:49:04 +0000 Subject: [issue43100] Python fails to execute shiv pyz files greater than 2 GB Message-ID: <1612262944.94.0.282319257878.issue43100@roundup.psfhosted.org> New submission from Divyanshu : Issue with shiv packages greater than 2GBs. Any shiv package(.pyz) greater than 2 GB fails to execute on python. Getting the below error with a simple shiv package that contains a main file that prints Hello World, and some random data files crossing the 2GB mark (can be a data file, a zip file or whatever unrelated) Error - cannot find 'main' module in abc.pyz On removing some of the redundant data files so that the size becomes less than 2 GB, the package becomes functional again. ---------- messages: 386135 nosy: divyanshurastogi4 priority: normal severity: normal status: open title: Python fails to execute shiv pyz files greater than 2 GB type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 06:52:54 2021 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 02 Feb 2021 11:52:54 +0000 Subject: [issue43100] Python fails to execute shiv pyz files greater than 2 GB In-Reply-To: <1612262944.94.0.282319257878.issue43100@roundup.psfhosted.org> Message-ID: <1612266774.96.0.99559775395.issue43100@roundup.psfhosted.org> Mark Dickinson added the comment: This sounds as though it should be reported to the Shiv maintainers. (This tracker is for core Python, and Shiv isn't part of core Python.) If the Shiv problem turns out to be due to an underlying core Python bug, this issue can be re-opened with more details. ---------- nosy: +mark.dickinson resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 06:56:05 2021 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 02 Feb 2021 11:56:05 +0000 Subject: [issue43100] Python fails to execute shiv pyz files greater than 2 GB In-Reply-To: <1612262944.94.0.282319257878.issue43100@roundup.psfhosted.org> Message-ID: <1612266965.55.0.565109655635.issue43100@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 07:08:18 2021 From: report at bugs.python.org (Mark Shannon) Date: Tue, 02 Feb 2021 12:08:18 +0000 Subject: [issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow? In-Reply-To: <1610404013.09.0.265713602389.issue42899@roundup.psfhosted.org> Message-ID: <1612267698.72.0.289875105766.issue42899@roundup.psfhosted.org> Mark Shannon added the comment: Option 3 with what semantics exactly? https://docs.python.org/3/reference/datamodel.html#object.__bool__ says that __bool__ should return True or False. If we don't allow the optimizer the freedom to assume that __bool__ is self-consistent and has no side effects, then we need to define what happens for stuff like: class FlipFlop: def __init__(self): self.val = random.choice((True, False)) def __bool__(self): self.val = not self.val return self.val Saying that only the second test can be removed is hard to define in a way that we can reliably implement. For example, it makes the simplification of `x = True and y` to `x = y` problematic. We routinely remove any tests of `if True:` or `while True:`, but the removal of `if True:` and the simplification of `x = True and y` to `x = y` is basically the same thing in the CFG. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 07:28:43 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Feb 2021 12:28:43 +0000 Subject: [issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow? In-Reply-To: <1610404013.09.0.265713602389.issue42899@roundup.psfhosted.org> Message-ID: <1612268923.11.0.136961475152.issue42899@roundup.psfhosted.org> Serhiy Storchaka added the comment: `True or b` is always True and differs from `b or True`. `x = True and y` is always equivalent to `x = y`. What is the use case of your optimization? Can you provide examples of real code which would benefit from removing all boolean tests (not only the repeated one) of non-constants? If there are not such examples or they are not common, there is no need of this optimization. Just revert that changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 07:52:41 2021 From: report at bugs.python.org (Gereon Kremer) Date: Tue, 02 Feb 2021 12:52:41 +0000 Subject: [issue43101] Add deprecation of float limits for resource to documentation Message-ID: <1612270361.12.0.132616199639.issue43101@roundup.psfhosted.org> New submission from Gereon Kremer : While the documentation always (as in: at least since 3.5) required to pass "a tuple (soft, hard) of two integers" to resource.setrlimit(), passing floats worked just fine until 3.9. This behavior was deprecated in 3.8 and removed in 3.10. I see that the implementation was merely fixed to do what the documentation says. Nevertheless, I think this change of behavior should be mentioned in the documentation. In my use-case for resource (within preexec_fn of subprocess.Popen), this deprecation warning only showed up in 3.9 for some reason (as you can see here: https://github.com/nafur/python-playground/runs/1814573503) and is now hidden by a generic "subprocess.SubprocessError: Exception occurred in preexec_fn." message. A hint in the documentation would have helped significantly... ---------- messages: 386139 nosy: nafur priority: normal severity: normal status: open title: Add deprecation of float limits for resource to documentation versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 07:55:47 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Feb 2021 12:55:47 +0000 Subject: [issue43101] Add deprecation of float limits for resource to documentation In-Reply-To: <1612270361.12.0.132616199639.issue43101@roundup.psfhosted.org> Message-ID: <1612270547.34.0.18696044604.issue43101@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 07:57:14 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Feb 2021 12:57:14 +0000 Subject: [issue43097] IndexError msg of random.choice() not helpful In-Reply-To: <1612238872.93.0.407149232495.issue43097@roundup.psfhosted.org> Message-ID: <1612270634.36.0.643036783338.issue43097@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 08:12:53 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 02 Feb 2021 13:12:53 +0000 Subject: [issue40601] [C API] Hide static types from the limited C API In-Reply-To: <1589235805.82.0.0888479979707.issue40601@roundup.psfhosted.org> Message-ID: <1612271573.38.0.235251337608.issue40601@roundup.psfhosted.org> Petr Viktorin added the comment: Sorry, I lost this bug in my TODO list :( > > I don't think it's necessary here. > > Did you read my rationale (first message)? Do you mean that per-interpreter GIL is not worth it? Right, I mean that it it is not worth breaking the C-API for all existing modules. Instead, I think that it can be done as an addition: only modules that don't use things like these static types would be allowed in subinterpreters that have their own GIL. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 08:25:33 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Feb 2021 13:25:33 +0000 Subject: [issue43097] IndexError msg of random.choice() not helpful In-Reply-To: <1612238872.93.0.407149232495.issue43097@roundup.psfhosted.org> Message-ID: <1612272333.44.0.766329665022.issue43097@roundup.psfhosted.org> Raymond Hettinger added the comment: -1 on changing this because we would have to gum-up and slow down the code with an extra try-except to catch and reraise the exception with a different error message: def choice(self, seq): """Choose a random element from a non-empty sequence.""" try: return seq[self._randbelow(len(seq))] except IndexError: raise IndexError('Cannot choose from an empty sequence') from None We rarely do that elsewhere in the code. The norm in pure python code is that indexing into an empty list shows "IndexError: list index out of range" without further elaboration on what it means for the list to be empty. FWIW, this behavior is very old and doesn't seem to have been a problem in practice. Here is what the code looked like in Python 2.1: def choice(self, seq): """Choose a random element from a non-empty sequence.""" return seq[int(self.random() * len(seq))] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 08:25:49 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 02 Feb 2021 13:25:49 +0000 Subject: [issue43094] sqlite3.create_function takes parameter named narg, not num_params In-Reply-To: <1612210210.19.0.0751315887137.issue43094@roundup.psfhosted.org> Message-ID: <1612272349.03.0.448448615401.issue43094@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 08:38:53 2021 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 02 Feb 2021 13:38:53 +0000 Subject: [issue43053] Speed up math.isqrt, again In-Reply-To: <1611821006.77.0.580238316666.issue43053@roundup.psfhosted.org> Message-ID: <1612273133.79.0.0877546747613.issue43053@roundup.psfhosted.org> Change by Mark Dickinson : ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 09:06:06 2021 From: report at bugs.python.org (Mark Shannon) Date: Tue, 02 Feb 2021 14:06:06 +0000 Subject: [issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow? In-Reply-To: <1610404013.09.0.265713602389.issue42899@roundup.psfhosted.org> Message-ID: <1612274766.35.0.668530997596.issue42899@roundup.psfhosted.org> Mark Shannon added the comment: It isn't a specific optimization at all, but the combination of several. I will change the behavior to match what appears to be the consensus. BUT, we need to define what the semantics should be. Otherwise implementing the compiler is just guesswork. As for a definition of what is legal, the best I can come up with is: "Repeated bool() checks of a value in short-circuiting expressions ('and' and 'or') may be eliminated if the result can be deduced using boolean algebra." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 09:29:38 2021 From: report at bugs.python.org (Mark Shannon) Date: Tue, 02 Feb 2021 14:29:38 +0000 Subject: [issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow? In-Reply-To: <1610404013.09.0.265713602389.issue42899@roundup.psfhosted.org> Message-ID: <1612276178.4.0.43024968275.issue42899@roundup.psfhosted.org> Change by Mark Shannon : ---------- keywords: +patch pull_requests: +23232 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24417 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 09:41:37 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 02 Feb 2021 14:41:37 +0000 Subject: [issue41490] Update bundled pip to 20.2.1 and setuptools to 49.2.1 In-Reply-To: <1596662779.45.0.341157838113.issue41490@roundup.psfhosted.org> Message-ID: <1612276897.36.0.628824211882.issue41490@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Do we need to wait for PR 22779 or can it be closed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 09:45:46 2021 From: report at bugs.python.org (Paul Moore) Date: Tue, 02 Feb 2021 14:45:46 +0000 Subject: [issue41490] Update bundled pip to 20.2.1 and setuptools to 49.2.1 In-Reply-To: <1596662779.45.0.341157838113.issue41490@roundup.psfhosted.org> Message-ID: <1612277146.61.0.0139185325986.issue41490@roundup.psfhosted.org> Paul Moore added the comment: It can be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 09:46:44 2021 From: report at bugs.python.org (Douglas Raillard) Date: Tue, 02 Feb 2021 14:46:44 +0000 Subject: [issue43102] namedtuple's __new__.__globals__['__builtins__'] is None Message-ID: <1612277204.9.0.79430264778.issue43102@roundup.psfhosted.org> New submission from Douglas Raillard : When creating a namedtuple such as this one: from collections import namedtuple class C(namedtuple('C', ('hello', 'world'))): pass print(C.__new__.__globals__) The globals' dict of __new__ contains a "__builtins__" key which is set to None in collections/__init__.py: namespace = { '_tuple_new': tuple_new, '__builtins__': None, '__name__': f'namedtuple_{typename}', } When such globals are used with eval(), it will raise a TypeError such as: >>> eval('X', {'__builtins__': None}) Traceback (most recent call last): File "", line 1, in File "", line 1, in TypeError: 'NoneType' object is not subscriptable If an empty dict was used instead, we get the expected exception: >>> eval('X', {'__builtins__': {}}) Traceback (most recent call last): File "", line 1, in File "", line 1, in NameError: name 'X' is not defined Given that both ways allow preventing references to any builtin, please consider switching to an empty dict. Also, even though this is documented as implementation detail, this would agree more with the current documentation stating: The value of __builtins__ is normally either this module or the value of this module?s __dict__ attribute https://docs.python.org/3/library/builtins.html ---------- components: Library (Lib) messages: 386145 nosy: douglas-raillard-arm priority: normal severity: normal status: open title: namedtuple's __new__.__globals__['__builtins__'] is None type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 09:49:38 2021 From: report at bugs.python.org (Paul Moore) Date: Tue, 02 Feb 2021 14:49:38 +0000 Subject: [issue41490] Update bundled pip to 20.2.1 and setuptools to 49.2.1 In-Reply-To: <1596662779.45.0.341157838113.issue41490@roundup.psfhosted.org> Message-ID: <1612277378.68.0.244610511318.issue41490@roundup.psfhosted.org> Paul Moore added the comment: That's specifically the ensurepip PR, which is now outdated since pip 21.0.1 is in master. But for this bug report, Steve said "I still consider the changes a release blocking regression, but if it's not blocking ensurepip then I guess the updated packages can go in now" so I don't know if he considers there to be something else that this issue should still track. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 09:57:28 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Feb 2021 14:57:28 +0000 Subject: [issue43102] namedtuple's __new__.__globals__['__builtins__'] is None In-Reply-To: <1612277204.9.0.79430264778.issue43102@roundup.psfhosted.org> Message-ID: <1612277848.67.0.171550536855.issue43102@roundup.psfhosted.org> Raymond Hettinger added the comment: Thanks for the report. I'll look at it in detail this evening. Off-hand the suggest sounds reasonable. ---------- assignee: -> rhettinger nosy: +rhettinger versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 10:23:22 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 02 Feb 2021 15:23:22 +0000 Subject: [issue43042] Delete or merge redundant tutorial sentence. In-Reply-To: <1611772942.43.0.309900316345.issue43042@roundup.psfhosted.org> Message-ID: <1612279402.65.0.790285483505.issue43042@roundup.psfhosted.org> Terry J. Reedy added the comment: Ramond, any opinion on this? We could just close this, but I consider either alternative enough of an improvement to write a PR and merge it. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 10:23:47 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Feb 2021 15:23:47 +0000 Subject: [issue43103] Add configure option to disable build libpython.a and don't install python.o Message-ID: <1612279427.78.0.51879378101.issue43103@roundup.psfhosted.org> New submission from STINNER Victor : Currently, "make install" copies Programs/python.o to $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/: see bpo-42307. This file is only useful to build a static Python executable with libpython3.10.a. libpython3.10.a is also copied to $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/. Most users don't build a static Python executable, so I propose to no longer build "static Python" by default and add --with-static-python option to the configure script. --- Fedora has a downstream patch to not build libpythonX.Y.a for 11 years: https://src.fedoraproject.org/rpms/python3.10/blob/master/f/00111-no-static-lib.patch It is needed to respect the Fedora packaging guideline. The patch was introduced in Fedora to fix "python : does not adhere to Static Library Packaging Guideline" issue: https://bugzilla.redhat.com/show_bug.cgi?id=556092 """ The package is in need of an update because it does not adhere to the guidelines for packaging static libraries: http://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Static_Libraries The -devel package contains both the shared and the static build of a library. That makes it possible to link statically with the -devel package as a build requirement instead of having to build-require a special-purpose -static subpackage. Correct would be to either disable/delete the static libraries at build-time, or to %exclude them in the %files section, or to split off a -static subpackage (if there is a compelling reason as why the static libs should be made available). Please consult the guidelines for the details. [...] python-devel /usr/lib/python2.6/config/libpython2.6.so <=> /usr/lib/python2.6/config/libpython2.6.a """ ---------- components: Build messages: 386149 nosy: vstinner priority: normal severity: normal status: open title: Add configure option to disable build libpython.a and don't install python.o versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 10:24:07 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Feb 2021 15:24:07 +0000 Subject: [issue42307] make install must not copy python.o into $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/ In-Reply-To: <1605005380.13.0.93741295392.issue42307@roundup.psfhosted.org> Message-ID: <1612279447.88.0.402292609089.issue42307@roundup.psfhosted.org> STINNER Victor added the comment: I created bpo-43103 "Add configure option to disable build libpython.a and don't install python.o". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 10:51:43 2021 From: report at bugs.python.org (=?utf-8?q?Tobias_M=C3=BCllner?=) Date: Tue, 02 Feb 2021 15:51:43 +0000 Subject: [issue43104] csv package in class Message-ID: <1612281103.22.0.0770164385179.issue43104@roundup.psfhosted.org> New submission from Tobias M?llner : Hello I want to use the csv package in a class. If I use the writer instance as local variable in the class it works perfectly but if I use it as class-variable (self.writer) it does not work anymore. Does anyone have the same behaviour? Yours Toby By the way, sorry for my bad English :( ---------- messages: 386151 nosy: tobias.muellner250502 priority: normal severity: normal status: open title: csv package in class type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 11:27:56 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 02 Feb 2021 16:27:56 +0000 Subject: [issue41490] Update bundled pip to 20.2.1 and setuptools to 49.2.1 In-Reply-To: <1596662779.45.0.341157838113.issue41490@roundup.psfhosted.org> Message-ID: <1612283276.6.0.839504545601.issue41490@roundup.psfhosted.org> Steve Dower added the comment: I closed the PR. Jason's fix deals with it, so this is now resolved. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 11:32:05 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Feb 2021 16:32:05 +0000 Subject: [issue43103] Add configure option to disable build libpython.a and don't install python.o In-Reply-To: <1612279427.78.0.51879378101.issue43103@roundup.psfhosted.org> Message-ID: <1612283525.94.0.0329873506219.issue43103@roundup.psfhosted.org> STINNER Victor added the comment: "./configure --enable-shared --prefix /opt/py310 && make && make install" installs multiple files which are only useful to create a static Python binary: $ ls /opt/py310/lib/python3.10/config-3.10-x86_64-linux-gnu/ -1 config.c config.c.in install-sh* libpython3.10.a Makefile makesetup* __pycache__/ python-config.py* python.o Setup Setup.local $ ls /opt/py310/lib/ -1 libpython3.10.so@ libpython3.10.so.1.0* libpython3.so* pkgconfig/ python3.10/ libpython3.10.a is a big file: 15 MB. Without --enable-shared, /opt/py310/lib/ contains a second copy of libpython3.10.a! Example with the Ubuntu libpython3.6-dev package: $ dpkg -L libpython3.6-dev|grep config- /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/Makefile /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/Setup /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/Setup.config /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/Setup.local /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/config.c /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/config.c.in /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/install-sh /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m-pic.a /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/makesetup /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/python-config.py /usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/python.o --- By the way, it seems like many files of /opt/py310/lib/python3.10/config-3.10-x86_64-linux-gnu/ are useless. The most useful one is python-config.py script. Makefile is no longer used by sysconfig which creates _sysconfigdata__linux_x86_64-linux-gnu.py (in /opt/py310/lib/python3.10/) instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 11:50:55 2021 From: report at bugs.python.org (Vladimir Feinberg) Date: Tue, 02 Feb 2021 16:50:55 +0000 Subject: [issue43048] Printing RecursionError results in RecursionError In-Reply-To: <1612254940.31.0.280689498312.issue43048@roundup.psfhosted.org> Message-ID: Vladimir Feinberg added the comment: Yep, you're right. I'd be happy to (but I've never done it before, so please give me some time). On Tue, Feb 2, 2021 at 12:35 AM Irit Katriel wrote: > > Irit Katriel added the comment: > > It should truncate at the call that raised the recursion error, not the > first one. Do you want to create a patch? > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 12:03:00 2021 From: report at bugs.python.org (Simon Munday) Date: Tue, 02 Feb 2021 17:03:00 +0000 Subject: [issue43105] Can't import extension modules resolved via relative paths in sys.path on Windows don't don't Message-ID: <1612285380.24.0.495785451269.issue43105@roundup.psfhosted.org> New submission from Simon Munday : If I attempt to import an extension module via something like this: from pkg import extmodule and it happens that "pkg" is found in a folder that is given in sys.path as a relative path, then the import fails, with ImportError: DLL load failed while importing extmodule: The parameter is incorrect. This only happens with 3.8 and later. AFAICS the reason is that if the module resolution is done via a relative path, it results in dynload_win.c:_PyImport_FindSharedFuncptrWindows attempting to feed LoadLibraryExW a relative path for the .pyd file. But LoadLibraryExW treats relative paths completely differently from absolute ones, in that it searches for the given path relative to the library search path entries rather than simply loading the DLL at that path. But as of 3.8 the current directory is removed from the search path, so the .pyd is never found. Since Python knows the specific file it wants LoadLibraryExW to load, having just resolved it via the import mechanism, I guess it ought to ensure it only ever calls LoadLibraryExW with an absolute path. (I'm assuming use of relative paths in sys.path is officially supported, since nothing I've found in the docs says otherwise.) ---------- components: Extension Modules messages: 386155 nosy: smunday priority: normal severity: normal status: open title: Can't import extension modules resolved via relative paths in sys.path on Windows don't don't type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 12:04:14 2021 From: report at bugs.python.org (Simon Munday) Date: Tue, 02 Feb 2021 17:04:14 +0000 Subject: [issue43105] Can't import extension modules resolved via relative paths in sys.path on Windows In-Reply-To: <1612285380.24.0.495785451269.issue43105@roundup.psfhosted.org> Message-ID: <1612285454.37.0.51265831108.issue43105@roundup.psfhosted.org> Change by Simon Munday : ---------- title: Can't import extension modules resolved via relative paths in sys.path on Windows don't don't -> Can't import extension modules resolved via relative paths in sys.path on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 13:12:54 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Feb 2021 18:12:54 +0000 Subject: [issue43103] Add configure option to disable build libpython.a and don't install python.o In-Reply-To: <1612279427.78.0.51879378101.issue43103@roundup.psfhosted.org> Message-ID: <1612289574.68.0.0634045302103.issue43103@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +23233 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24418 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 13:29:34 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 02 Feb 2021 18:29:34 +0000 Subject: [issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow? In-Reply-To: <1610404013.09.0.265713602389.issue42899@roundup.psfhosted.org> Message-ID: <1612290574.68.0.453478545047.issue42899@roundup.psfhosted.org> Guido van Rossum added the comment: I don't care about the flipflop at all. I only care about the third possible outcome, an exception. I thought the compromise semantics you proposed earlier sounded nice. As Serhiy already explained, 'b or True' vs. 'True or b' is unrelated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 13:50:21 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 02 Feb 2021 18:50:21 +0000 Subject: [issue42971] Some errnos for BSD/OSX are missing from errno module In-Reply-To: <1611089796.05.0.463787343348.issue42971@roundup.psfhosted.org> Message-ID: <1612291821.37.0.940889819363.issue42971@roundup.psfhosted.org> Ronald Oussoren added the comment: I've checked all three and all of them are present in errnomodule.c, and all of them are defined in the errno module (macOS 11, Python 3.9.1 "universal2" build). On first glance all errno values in the macOS 11 SDK are present in errnomodule.c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 13:50:36 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 02 Feb 2021 18:50:36 +0000 Subject: [issue42971] Some errnos for BSD/OSX are missing from errno module In-Reply-To: <1611089796.05.0.463787343348.issue42971@roundup.psfhosted.org> Message-ID: <1612291836.17.0.358418115698.issue42971@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- resolution: -> not a bug stage: -> resolved status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 14:02:26 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 02 Feb 2021 19:02:26 +0000 Subject: [issue42971] Some errnos for BSD/OSX are missing from errno module In-Reply-To: <1611089796.05.0.463787343348.issue42971@roundup.psfhosted.org> Message-ID: <1612292546.37.0.370528578479.issue42971@roundup.psfhosted.org> Ronald Oussoren added the comment: I was too quick, EQFULL appears to be missing: #define EQFULL 106 /* Interface output queue is full */ If the script I'm using to check for this is correct this is the only missing errno with the macOS 11 SDK. ---------- resolution: not a bug -> stage: resolved -> needs patch status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 14:14:51 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 02 Feb 2021 19:14:51 +0000 Subject: [issue42971] Some errnos for BSD/OSX are missing from errno module In-Reply-To: <1611089796.05.0.463787343348.issue42971@roundup.psfhosted.org> Message-ID: <1612293291.67.0.980531202878.issue42971@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- keywords: +patch pull_requests: +23234 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/24419 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 14:26:29 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 02 Feb 2021 19:26:29 +0000 Subject: [issue43106] Some macOS open flags are missing from posixmodule.c Message-ID: <1612293989.13.0.0432139377352.issue43106@roundup.psfhosted.org> New submission from Ronald Oussoren : The following O_* flags are present in the macOS 11 SDK, but aren't provided by posixmodule.c: O_FSYNC (alias for O_SYNC) O_EVTONLY O_SYMLINK O_NOFOLLOW_ANY ---------- components: Extension Modules, macOS keywords: easy (C) messages: 386159 nosy: ned.deily, ronaldoussoren priority: normal severity: normal stage: needs patch status: open title: Some macOS open flags are missing from posixmodule.c type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 14:34:13 2021 From: report at bugs.python.org (Ofek Lev) Date: Tue, 02 Feb 2021 19:34:13 +0000 Subject: [issue18617] AIA chasing for missing intermediate certificates on TLS connections In-Reply-To: <1375376317.99.0.429350247521.issue18617@psf.upfronthosting.co.za> Message-ID: <1612294453.06.0.47955543842.issue18617@roundup.psfhosted.org> Ofek Lev added the comment: Any update on this? ---------- nosy: +Ofekmeister _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 14:34:51 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 02 Feb 2021 19:34:51 +0000 Subject: [issue43106] Some macOS open flags are missing from posixmodule.c In-Reply-To: <1612293989.13.0.0432139377352.issue43106@roundup.psfhosted.org> Message-ID: <1612294491.59.0.741104526745.issue43106@roundup.psfhosted.org> Ronald Oussoren added the comment: Likewise for O_POPUP and O_ALERT, although I don't understand what these are supposed to do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 14:38:36 2021 From: report at bugs.python.org (=?utf-8?b?5Y+M6I2J6YW46YWv?=) Date: Tue, 02 Feb 2021 19:38:36 +0000 Subject: [issue43074] Unable to use system proxy with HTTPS connection on Windows In-Reply-To: <1611993489.22.0.338889763746.issue43074@roundup.psfhosted.org> Message-ID: <1612294716.44.0.237584069588.issue43074@roundup.psfhosted.org> ???? added the comment: Oh sorry I forgot requests is a third party library. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 14:51:09 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Feb 2021 19:51:09 +0000 Subject: [issue43102] namedtuple's __new__.__globals__['__builtins__'] is None In-Reply-To: <1612277204.9.0.79430264778.issue43102@roundup.psfhosted.org> Message-ID: <1612295469.45.0.205856716818.issue43102@roundup.psfhosted.org> Raymond Hettinger added the comment: Out of curiosity, how did you find this? Did it arise in the course of trying to solve a real problem or were you just reading the code and and thought you might do it differently? Unless there's a real problem, I prefer None because it is immutable (safer), because it doesn't incur the time and memory cost of creating a new object, and because it does a good job of indicating that builtins are shut-off and not intended to be accessed. The primary reason the line is there at all is to make eval() as safe as possible. There is no public named tuple functionality that depends on it, so no user should ever encounter it unless they are just investigating implementation details. In particular, they should never see the error message in your post. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 14:54:31 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 02 Feb 2021 19:54:31 +0000 Subject: [issue42997] Improve error message for missing : before suites In-Reply-To: <1611278405.38.0.0749709348669.issue42997@roundup.psfhosted.org> Message-ID: <1612295671.21.0.148238769814.issue42997@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 58fb156edda1a0e924a38bfed494bd06cb09c9a3 by Pablo Galindo in branch 'master': bpo-42997: Improve error message for missing : before suites (GH-24292) https://github.com/python/cpython/commit/58fb156edda1a0e924a38bfed494bd06cb09c9a3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 14:57:31 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 02 Feb 2021 19:57:31 +0000 Subject: [issue42997] Improve error message for missing : before suites In-Reply-To: <1611278405.38.0.0749709348669.issue42997@roundup.psfhosted.org> Message-ID: <1612295851.66.0.619630983279.issue42997@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 14:58:28 2021 From: report at bugs.python.org (Yotam Medini) Date: Tue, 02 Feb 2021 19:58:28 +0000 Subject: [issue43107] RotatingFileHandler with multi processes creates too small backup files Message-ID: <1612295908.37.0.851347106037.issue43107@roundup.psfhosted.org> New submission from Yotam Medini : Using RotatingFileHandler by multi-processes when they reach a point for rotation (roll-over) they continue on separate files. Two problems: 1. Eventually some backup files are left with sizes much less than the maxBytes configuration. 2. Intertwining events are not logged together, but separated by processes. ---------- components: Library (Lib) messages: 386165 nosy: yotam priority: normal severity: normal status: open title: RotatingFileHandler with multi processes creates too small backup files type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 15:02:14 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 02 Feb 2021 20:02:14 +0000 Subject: [issue43108] test_curses is leaking references Message-ID: <1612296134.53.0.710661977317.issue43108@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : ? ./python -m test test_curses -uall -R : 0:00:00 load avg: 3.77 Run tests sequentially 0:00:00 load avg: 3.77 [1/1] test_curses beginning 9 repetitions 123456789 . test_curses leaked [4, 4, 4, 4] references, sum=16 test_curses failed == Tests result: FAILURE == 1 test failed: test_curses Total duration: 2.5 sec Tests result: FAILURE https://buildbot.python.org/all/#/builders/75/builds/168/steps/5/logs/stdio ---------- components: Tests messages: 386166 nosy: pablogsal priority: normal severity: normal status: open title: test_curses is leaking references versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 15:06:24 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 02 Feb 2021 20:06:24 +0000 Subject: [issue41552] uuid.uuid1() on certain Macs does not generate unique IDs In-Reply-To: <1597398238.17.0.874687707711.issue41552@roundup.psfhosted.org> Message-ID: <1612296384.74.0.598440290903.issue41552@roundup.psfhosted.org> Ronald Oussoren added the comment: I got feedback on FB8895555: Apple says they have fixed the issue (they don't mention in what version, but I expect 11.2). I haven't checked this yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 15:07:48 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 02 Feb 2021 20:07:48 +0000 Subject: [issue43108] test_curses is leaking references In-Reply-To: <1612296134.53.0.710661977317.issue43108@roundup.psfhosted.org> Message-ID: <1612296468.71.0.151821781401.issue43108@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: d64fd4bb5bb4fd2e3277f39d3ad99b5a8d193e1b is the first bad commit commit d64fd4bb5bb4fd2e3277f39d3ad99b5a8d193e1b Author: Serhiy Storchaka Date: Sun Jan 31 17:22:27 2021 +0200 bpo-43016: Rewrite tests for curses (GH-24312) Lib/test/test_curses.py | 1002 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 787 insertions(+), 215 deletions(-) ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 15:23:06 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 02 Feb 2021 20:23:06 +0000 Subject: [issue43108] test_curses is leaking references In-Reply-To: <1612296134.53.0.710661977317.issue43108@roundup.psfhosted.org> Message-ID: <1612297386.45.0.908737626182.issue43108@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +23235 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24420 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 15:24:31 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 02 Feb 2021 20:24:31 +0000 Subject: [issue41149] Threads can fail to start In-Reply-To: <1593360064.64.0.828598087215.issue41149@roundup.psfhosted.org> Message-ID: <1612297471.59.0.0211031225879.issue41149@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 01c4fddc4b2ac707f226e0bd92679588d2252cc4 by BarneyStratford in branch 'master': bpo-41149: Fix a bug in threading that causes fals-y threads callables to fail to start. (GH-21201) https://github.com/python/cpython/commit/01c4fddc4b2ac707f226e0bd92679588d2252cc4 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 15:24:38 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 02 Feb 2021 20:24:38 +0000 Subject: [issue41149] Threads can fail to start In-Reply-To: <1593360064.64.0.828598087215.issue41149@roundup.psfhosted.org> Message-ID: <1612297478.56.0.0670377322124.issue41149@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 15:38:34 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 02 Feb 2021 20:38:34 +0000 Subject: [issue43108] test_curses is leaking references In-Reply-To: <1612296134.53.0.710661977317.issue43108@roundup.psfhosted.org> Message-ID: <1612298314.24.0.267589443374.issue43108@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset bb739ec922c6992a2be38f9fd3c544c2cc322dde by Pablo Galindo in branch 'master': bpo-43108: Fix a reference leak in the curses module (GH-24420) https://github.com/python/cpython/commit/bb739ec922c6992a2be38f9fd3c544c2cc322dde ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 16:03:36 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 02 Feb 2021 21:03:36 +0000 Subject: [issue40956] Use Argument Clinic in sqlite3 In-Reply-To: <1591956335.72.0.553737405887.issue40956@roundup.psfhosted.org> Message-ID: <1612299816.42.0.252775468753.issue40956@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +23236 pull_request: https://github.com/python/cpython/pull/24421 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 16:07:07 2021 From: report at bugs.python.org (Ethan Furman) Date: Tue, 02 Feb 2021 21:07:07 +0000 Subject: [issue8264] [doc] hasattr doesn't show private (double underscore) attributes exist In-Reply-To: <1269946346.53.0.630682854213.issue8264@psf.upfronthosting.co.za> Message-ID: <1612300027.42.0.923136357636.issue8264@roundup.psfhosted.org> Ethan Furman added the comment: New changeset 2edaf6a4fb7e20324dde1423232f07211347f092 by Ken Jin in branch 'master': bpo-8264: Document hasattr and getattr behavior for private attributes (GH-23513) https://github.com/python/cpython/commit/2edaf6a4fb7e20324dde1423232f07211347f092 ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 16:39:14 2021 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 02 Feb 2021 21:39:14 +0000 Subject: [issue43104] csv package in class In-Reply-To: <1612281103.22.0.0770164385179.issue43104@roundup.psfhosted.org> Message-ID: <1612301954.27.0.612406933575.issue43104@roundup.psfhosted.org> Eric V. Smith added the comment: This isn't a forum for helping users with questions about Python, it's for reporting bugs in Python. I suggest you ask this question on the python-list mailing list: https://mail.python.org/mailman/listinfo/python-list And when you do ask your question there, you should include the code that shows what you have tried and what error you're getting. Good luck! And your English is perfectly fine! ---------- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 16:41:29 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 02 Feb 2021 21:41:29 +0000 Subject: [issue29086] Document C API that is not part of the limited API In-Reply-To: <1482865319.03.0.627052322458.issue29086@psf.upfronthosting.co.za> Message-ID: <1612302089.66.0.659942545919.issue29086@roundup.psfhosted.org> Petr Viktorin added the comment: The bigger problem is that currently, it's not clear what is limited API and what is not. I am working to propose a PEP to fix this. It will also cover documentation: https://discuss.python.org/t/pre-pep-maintaining-the-stable-abi/6986 ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 16:51:25 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 02 Feb 2021 21:51:25 +0000 Subject: [issue43108] test_curses is leaking references In-Reply-To: <1612296134.53.0.710661977317.issue43108@roundup.psfhosted.org> Message-ID: <1612302685.88.0.829844055897.issue43108@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 17:52:49 2021 From: report at bugs.python.org (Andrew C. Morrow) Date: Tue, 02 Feb 2021 22:52:49 +0000 Subject: [issue43109] When using Apple Clang, --with-lto builds should not check for llvm-ar Message-ID: <1612306369.28.0.04507829507.issue43109@roundup.psfhosted.org> New submission from Andrew C. Morrow : When building with `--with-lto`, an explicit check for `llvm-ar` is performed as part of the configure step. However, Apple does not ship `llvm-ar` as part of Xcode, so when building with Apple Clang this check fails and prevents using `--with-lto`. However, using the builtin `ar` seems to work just fine, and it can be selected by passing `LLVM_AR=/path/to/ar` to `configure`. It would be nice to see the `configure` script updated to know that system `ar` is sufficient when using Apple Clang on macOS. Please see https://github.com/Homebrew/homebrew-core/pull/70177 for additional background. ---------- components: Build messages: 386174 nosy: acmorrow priority: normal severity: normal status: open title: When using Apple Clang, --with-lto builds should not check for llvm-ar type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 18:54:50 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 02 Feb 2021 23:54:50 +0000 Subject: [issue43109] When using Apple Clang, --with-lto builds should not check for llvm-ar In-Reply-To: <1612306369.28.0.04507829507.issue43109@roundup.psfhosted.org> Message-ID: <1612310090.73.0.24832070974.issue43109@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 19:31:20 2021 From: report at bugs.python.org (Bradley Miller) Date: Wed, 03 Feb 2021 00:31:20 +0000 Subject: [issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition In-Reply-To: <1471355745.98.0.805545529346.issue27777@psf.upfronthosting.co.za> Message-ID: <1612312280.7.0.259912769941.issue27777@roundup.psfhosted.org> Bradley Miller added the comment: Thanks Jakub, Your patch fixed an increasingly frequent problem with my site. How can I help to get this merged so I don't have to have a custom version of cgi.py?? ---------- nosy: +bnmnetp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 22:28:57 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 03 Feb 2021 03:28:57 +0000 Subject: [issue43082] descriptor howto: typo in "Definition and introduction" In-Reply-To: <1612079819.98.0.888102810331.issue43082@roundup.psfhosted.org> Message-ID: <1612322937.4.0.685257496858.issue43082@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset a98fe02d735e7bfe369fc5ce6efb6c9d82adf3b7 by diegoe in branch 'master': bpo-43082: Remove redundant 'the' in Descriptor howto (GH-24394) https://github.com/python/cpython/commit/a98fe02d735e7bfe369fc5ce6efb6c9d82adf3b7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 22:29:03 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Feb 2021 03:29:03 +0000 Subject: [issue43082] descriptor howto: typo in "Definition and introduction" In-Reply-To: <1612079819.98.0.888102810331.issue43082@roundup.psfhosted.org> Message-ID: <1612322943.15.0.170052265495.issue43082@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +23237 pull_request: https://github.com/python/cpython/pull/24427 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 22:33:41 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 03 Feb 2021 03:33:41 +0000 Subject: [issue43082] descriptor howto: typo in "Definition and introduction" In-Reply-To: <1612079819.98.0.888102810331.issue43082@roundup.psfhosted.org> Message-ID: <1612323221.09.0.974117261111.issue43082@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset f02ef7afcf67db52f169f809a1b0babb80ec8370 by Miss Islington (bot) in branch '3.9': bpo-43082: Remove redundant 'the' in Descriptor howto (GH-24394) (GH-24427) https://github.com/python/cpython/commit/f02ef7afcf67db52f169f809a1b0babb80ec8370 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 2 22:34:11 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 03 Feb 2021 03:34:11 +0000 Subject: [issue43082] descriptor howto: typo in "Definition and introduction" In-Reply-To: <1612079819.98.0.888102810331.issue43082@roundup.psfhosted.org> Message-ID: <1612323251.42.0.439666573315.issue43082@roundup.psfhosted.org> Raymond Hettinger added the comment: Thank you. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 02:07:34 2021 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 03 Feb 2021 07:07:34 +0000 Subject: [issue43106] Some macOS open flags are missing from posixmodule.c In-Reply-To: <1612293989.13.0.0432139377352.issue43106@roundup.psfhosted.org> Message-ID: <1612336054.66.0.951172625109.issue43106@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 02:33:43 2021 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 03 Feb 2021 07:33:43 +0000 Subject: [issue43106] Some macOS open flags are missing from posixmodule.c In-Reply-To: <1612293989.13.0.0432139377352.issue43106@roundup.psfhosted.org> Message-ID: <1612337623.78.0.210067341833.issue43106@roundup.psfhosted.org> Dong-hee Na added the comment: I can see some users use such flags with manual mapping Looks good to support it :) https://github.com/TaskEvolution/Task-Coach-Evolution/blob/master/taskcoach/taskcoachlib/filesystem/fs_darwin.py#L27 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 03:07:54 2021 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 03 Feb 2021 08:07:54 +0000 Subject: [issue43106] Some macOS open flags are missing from posixmodule.c In-Reply-To: <1612293989.13.0.0432139377352.issue43106@roundup.psfhosted.org> Message-ID: <1612339674.21.0.443046379896.issue43106@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +23238 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/24428 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 03:31:31 2021 From: report at bugs.python.org (Giovanni Wijaya) Date: Wed, 03 Feb 2021 08:31:31 +0000 Subject: [issue43110] import aiohttp crash closes Python from Windows Installer Message-ID: <1612341091.34.0.557735217217.issue43110@roundup.psfhosted.org> New submission from Giovanni Wijaya : Since Python 3.10.0a4, importing aiohttp crash closes Python, only on Python installed from Windows Installer x64. Python installed in Debian (both from source and otherwise) does not produce this issue. ---------- components: Windows messages: 386180 nosy: giovanniwijaya, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: import aiohttp crash closes Python from Windows Installer versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 03:34:27 2021 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 03 Feb 2021 08:34:27 +0000 Subject: [issue43106] Some macOS open flags are missing from posixmodule.c In-Reply-To: <1612293989.13.0.0432139377352.issue43106@roundup.psfhosted.org> Message-ID: <1612341267.85.0.122874262725.issue43106@roundup.psfhosted.org> Dong-hee Na added the comment: O_FSYNC could be used as an alias of O_SYNC. O_EVTONLY is used for kqueue API. but other flags I don't know where to use it. So I submit the patch to add O_FSYNC and O_EVTONLY only. If other flags should be added, please let me know ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 04:21:34 2021 From: report at bugs.python.org (hans.meine) Date: Wed, 03 Feb 2021 09:21:34 +0000 Subject: [issue43111] webbrowser.py triggers unwanted XQuartz startup Message-ID: <1612344094.48.0.0202402812851.issue43111@roundup.psfhosted.org> New submission from hans.meine : For a long time, I wondered why opening Jupyter notebooks through nbopen always led to XQuartz starting. Now, I found the reason: nbopen uses webbrowser.py to open a web page, and webbrowser.py sees the `DISPLAY` variable being set and calls xdg-settings (which I installed via the xdg-utils port / MacPorts). Apparently, in order to be able to fire up XQuartz on demand and to allow people starting X11 applications, `DISPLAY` is set to a string like `/private/tmp/com.apple.launchd./org.xquartz:0`. I am using Safari and find this starting of XQuartz undesirable (causes a delay, uses system resources, leads to a new running program in the Dock / task switcher). On the other hand I can totally understand that the code makes sense. As a workaround, I can unset DISPLAY, or uninstall xdg-utils (although it is useful, and may be a dependency of other ports), but I thought I should also bring it up here for discussion. ---------- components: Library (Lib), macOS messages: 386182 nosy: hans-meine, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: webbrowser.py triggers unwanted XQuartz startup type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 04:26:13 2021 From: report at bugs.python.org (Natanael Copa) Date: Wed, 03 Feb 2021 09:26:13 +0000 Subject: [issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc Message-ID: <1612344373.45.0.663786135841.issue43112@roundup.psfhosted.org> New submission from Natanael Copa : The SOABI does not make any difference between GNU libc and musl libc. Using official docker images: # debian build with GNU libc $ docker run --rm python:slim python -c 'import sysconfig;print(sysconfig.get_config_var("SOABI"))' cpython-39-x86_64-linux-gnu # alpine build with musl libc $ docker run --rm python:alpine python -c 'import sysconfig;print(sysconfig.get_config_var("SOABI"))' cpython-39-x86_64-linux-gnu Both ends with `-gnu`, while it would be expected that with musl it would end with `-musl` This affects the extension suffix: $ docker run --rm python:slim python-config --extension-suffix .cpython-39-x86_64-linux-gnu.so $ docker run --rm python:alpine python-config --extension-suffix .cpython-39-x86_64-linux-gnu.so Which again affects the pre-compiled binary wheels, and binary modules built with musl libc gets mixed up with the GNU libc modules due to the -gnu.so suffix. The source of the problem is that the `configure.ac` file assumes that all defined(__linux__) is -gnu when detecting the PLATFORM_TRIPLET. ``` ... #if defined(__ANDROID__) # Android is not a multiarch system. #elif defined(__linux__) # if defined(__x86_64__) && defined(__LP64__) x86_64-linux-gnu # elif defined(__x86_64__) && defined(__ILP32__) x86_64-linux-gnux32 # elif defined(__i386__) ... ``` So when building python with musl libc the PLATFORM_TRIPLET always sets `*-linux-gnu`. output from configure run on musl system: ``` ... checking for a sed that does not truncate output... /bin/sed checking for --with-cxx-main=... no checking for the platform triplet based on compiler characteristics... x86_64-linux-gnu ... ``` A first step in fixing this would be to make sure that we only set -gnu when __GLIBC__ is defined: ```diff diff --git a/configure.ac b/configure.ac index 1f5a008388..1b4690c90f 100644 --- a/configure.ac +++ b/configure.ac @@ -726,7 +726,7 @@ cat >> conftest.c < _______________________________________ From report at bugs.python.org Wed Feb 3 04:47:54 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 03 Feb 2021 09:47:54 +0000 Subject: [issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc In-Reply-To: <1612344373.45.0.663786135841.issue43112@roundup.psfhosted.org> Message-ID: <1612345674.1.0.784888629518.issue43112@roundup.psfhosted.org> Christian Heimes added the comment: The suffix "-gnu" does not stand for "glibc". The triplet defines the calling convention. For example x86_64-linux-gnu means x86_64 / AMD64 CPU architecture, Linux, with standard GNU / GCC calling convention. Other calling conventions are "x86_64-linux-gnux32" for X32 on AMD64 and "arm-linux-gnueabihf" for 32bit ARM with extended ABI and hardware float support. The triplets are standardized beyond Python. Debian's multiarch page lists and explains a large amount of triplets, https://wiki.debian.org/Multiarch/Tuples ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 05:16:59 2021 From: report at bugs.python.org (Douglas Raillard) Date: Wed, 03 Feb 2021 10:16:59 +0000 Subject: [issue43102] namedtuple's __new__.__globals__['__builtins__'] is None In-Reply-To: <1612277204.9.0.79430264778.issue43102@roundup.psfhosted.org> Message-ID: <1612347419.45.0.310069573601.issue43102@roundup.psfhosted.org> Douglas Raillard added the comment: I did hit the issue while porting a tool to Python 3.9: https://github.com/ARM-software/lisa/pull/1585/commits/a4cd3aa1ad339ebfe59cc9e2ae290bb3788c900d It basically infers valid Python expressions from type annotations (some sort of inverse type checker) and run them while serializing all intermediate subexpressions for debugging. This allows a whole test suite to be plain classes and functions (usable out of context) to be assembled into "pipelines" without extra user work. The reason I ran into that problem are: 1. I'm scanning whole modules for annotations, so it is exposed to lots of things 2. In order to be able to infer expressions, it has to augment existing annotations when it is unambiguous. In our case, since __new__ is more or less a classmethod (i.e. it takes the class as first argument even if strictly speaking it's a staticmethod), it added an annotation with the class name (extracted from __qualname__). It implements PEP563 to evaluate the annotions, which describes how to get the globals for a function and class and that they can be fed to eval(). Using typing.get_type_hints() is not really possible since annotations need to be augmented, and fancy type hints like Optional are unusable for my purpose since there typing.get_args() was only added to Python 3.8 (I need to support >= 3.6). Maybe an alternative would be to use a module-level types.MappingProxyType instance ? This way there is no extra object created for each namedtuple and since it's read-only it should be as safe as None. ---------- versions: +Python 3.9 -Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 05:41:15 2021 From: report at bugs.python.org (Natanael Copa) Date: Wed, 03 Feb 2021 10:41:15 +0000 Subject: [issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc In-Reply-To: <1612344373.45.0.663786135841.issue43112@roundup.psfhosted.org> Message-ID: <1612348875.2.0.330380348376.issue43112@roundup.psfhosted.org> Natanael Copa added the comment: Does this mean that the SOABI should be the same for python built with musl libc and GNU libc? They are not really ABI compatible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 05:43:05 2021 From: report at bugs.python.org (Tomas Orsava) Date: Wed, 03 Feb 2021 10:43:05 +0000 Subject: [issue43113] os.posix_spawn errors with wrong information when shebang does not exist Message-ID: <1612348984.98.0.934369937347.issue43113@roundup.psfhosted.org> New submission from Tomas Orsava : os.posix_spawn fails with a wrong error information when executing an existing file with shebang pointing to a non-existing file. $ cat demo #!/usr/bin/hugo $ ./demo bash: ./demo: /usr/bin/hugo: bad interpreter: No such file or directory $ cat repro.py import os os.posix_spawn("./demo", ["./demo"], {}) $ python3.10 repro.py Traceback (most recent call last): File "/home/torsava/mess-old/2021-02/python-popen/repro.py", line 2, in os.posix_spawn("./demo", ["./demo"], {}) FileNotFoundError: [Errno 2] No such file or directory: './demo' The same problem exists when `demo` is on the PATH. $ export PATH=".:$PATH" $ demo bash: ./demo: /usr/bin/hugo: bad interpreter: No such file or directory $ cat repro_path.py import os os.posix_spawn("demo", ["demo"], {}) $ python3.10 repro_path.py Traceback (most recent call last): File "/home/torsava/mess-old/2021-02/python-popen/repro_path.py", line 2, in os.posix_spawn("demo", ["demo"], {}) FileNotFoundError: [Errno 2] No such file or directory: 'demo' ---------- components: Library (Lib) messages: 386187 nosy: torsava priority: normal severity: normal status: open title: os.posix_spawn errors with wrong information when shebang does not exist type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 05:45:11 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Wed, 03 Feb 2021 10:45:11 +0000 Subject: [issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file In-Reply-To: <1612348984.98.0.934369937347.issue43113@roundup.psfhosted.org> Message-ID: <1612349111.81.0.246789391691.issue43113@roundup.psfhosted.org> Change by Miro Hron?ok : ---------- nosy: +hroncok title: os.posix_spawn errors with wrong information when shebang does not exist -> os.posix_spawn errors with wrong information when shebang points to not-existing file _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 05:53:06 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Wed, 03 Feb 2021 10:53:06 +0000 Subject: [issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file In-Reply-To: <1612348984.98.0.934369937347.issue43113@roundup.psfhosted.org> Message-ID: <1612349586.94.0.0966317357407.issue43113@roundup.psfhosted.org> Miro Hron?ok added the comment: I don't think posix_spawn actually reads $PATH (hence the second example is pretty much doing the same as the first one), but this problem also manifests with subprocess (which does). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 05:55:40 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Feb 2021 10:55:40 +0000 Subject: [issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file In-Reply-To: <1612348984.98.0.934369937347.issue43113@roundup.psfhosted.org> Message-ID: <1612349740.52.0.228040816054.issue43113@roundup.psfhosted.org> STINNER Victor added the comment: os.posix_spawn() is a thin wrapper to posix_spawn(). Python doesn't try to change its behavior on purpose. So I don't think that this issue is a Python bug. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 05:56:56 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Feb 2021 10:56:56 +0000 Subject: [issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file In-Reply-To: <1612348984.98.0.934369937347.issue43113@roundup.psfhosted.org> Message-ID: <1612349816.44.0.0630730600169.issue43113@roundup.psfhosted.org> STINNER Victor added the comment: If you want to look for the "demo" program in the PATH environment variable, use os.posix_spawnp() instead: https://docs.python.org/dev/library/os.html#os.posix_spawnp ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 06:00:35 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Feb 2021 11:00:35 +0000 Subject: [issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file In-Reply-To: <1612348984.98.0.934369937347.issue43113@roundup.psfhosted.org> Message-ID: <1612350035.92.0.0235565570155.issue43113@roundup.psfhosted.org> STINNER Victor added the comment: > FileNotFoundError: [Errno 2] No such file or directory: './demo' './demo' filename is set with the following code in Modules/posixmodule.c: if (err_code) { errno = err_code; PyErr_SetFromErrnoWithFilenameObject(PyExc_OSError, path->object); goto exit; } I understand that Tomas wants to raise the OSError with no filename. I add Pablo and Joannah in the loop, they worked on exposing posix_spawn function in Python. ---------- nosy: +nanjekyejoannah, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 06:03:37 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Wed, 03 Feb 2021 11:03:37 +0000 Subject: [issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file In-Reply-To: <1612348984.98.0.934369937347.issue43113@roundup.psfhosted.org> Message-ID: <1612350217.24.0.856811836155.issue43113@roundup.psfhosted.org> Miro Hron?ok added the comment: Ideally, the error would say: FileNotFoundError: ./demo: /usr/bin/hugo: bad interpreter: No such file or directory ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 06:03:39 2021 From: report at bugs.python.org (Natanael Copa) Date: Wed, 03 Feb 2021 11:03:39 +0000 Subject: [issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc In-Reply-To: <1612344373.45.0.663786135841.issue43112@roundup.psfhosted.org> Message-ID: <1612350219.76.0.1483548408.issue43112@roundup.psfhosted.org> Natanael Copa added the comment: The referenced https://wiki.debian.org/Multiarch/Tuples doc says: > we require unique identifiers for each architecture that identifies an incompatible set of libraries that we want to be co-installed. Since GNU libc and musl libc are not ABI compatible they can not share same unique identifier. I think replacing -gnu with -musl makes sense. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 06:02:22 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 03 Feb 2021 11:02:22 +0000 Subject: [issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc In-Reply-To: <1612344373.45.0.663786135841.issue43112@roundup.psfhosted.org> Message-ID: <1612350142.91.0.857420020917.issue43112@roundup.psfhosted.org> Christian Heimes added the comment: SOABI basically contains the CPU architecture and Kernel ABI. The libc ABI is yet another dimension that is not encoded in the shared library ABI. The libc ABI is more complex than just glibc or musl. You need to include the ABI version of all core components. For example manylinux2014 defines the ABI for glibc as GLIBC_2.17, CXXABI_1.3.7, CXXABI_TM_1, GLIBCXX_3.4.19, GCC_4.8.0. As a rule of thumb, a SOABI like ".cpython-39-x86_64-linux-gnu.so" only works the current host. You cannot safely move the file to another host or bump the SO version of any library, unless you ensure that the ABIs of all libraries are compatible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 06:07:51 2021 From: report at bugs.python.org (Giovanni Wijaya) Date: Wed, 03 Feb 2021 11:07:51 +0000 Subject: [issue43110] import aiohttp crash closes Python from Windows Installer In-Reply-To: <1612341091.34.0.557735217217.issue43110@roundup.psfhosted.org> Message-ID: <1612350471.97.0.629352335576.issue43110@roundup.psfhosted.org> Giovanni Wijaya added the comment: Update: I tried installing Python from source in x64, and same issue persists. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 06:21:34 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 03 Feb 2021 11:21:34 +0000 Subject: [issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc In-Reply-To: <1612344373.45.0.663786135841.issue43112@roundup.psfhosted.org> Message-ID: <1612351294.24.0.247408097726.issue43112@roundup.psfhosted.org> Christian Heimes added the comment: Do you have glibc and musl installed side by side? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 06:53:09 2021 From: report at bugs.python.org (Natanael Copa) Date: Wed, 03 Feb 2021 11:53:09 +0000 Subject: [issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc In-Reply-To: <1612344373.45.0.663786135841.issue43112@roundup.psfhosted.org> Message-ID: <1612353189.34.0.565645217954.issue43112@roundup.psfhosted.org> Natanael Copa added the comment: > Do you have glibc and musl installed side by side? No. But there is nothing preventing me to have the libc runtimes installed in parallel with glibc. /lib/libc.so.6 /lib/libc.musl-x86_64.so.1 And it is not common that people copy libc.so.6 (with friends) to their alpine docker images to run both in same container. If that is a good idea is other discussion. I do understand that full ABI compatibility also may involve libc ABI version, but I think that is a slightly different problem. Newer versions of glibc and musl libc are backwards compatible. You can expect a binary built with old libc version to run with new libc. But you cannot expect a binary built with musl libc to run with gnu libc. gcc recognizes -linux-musl as a valid platform tuple different that differs from -linux-gnu: https://github.com/gcc-mirror/gcc/blob/master/gcc/config/t-musl The standard autotools' config.guess[1] also recognizes -musl as different platform. $ ./config.guess x86_64-pc-linux-musl [1]: https://github.com/python/cpython/blob/12d0a7642fc552fa17b1608fe135306cddec5f4e/config.guess#L158 So I think it makes sense to treat *-linux-musl as a different platform than *-linux-gnu. If you still insist that this is only about calling convention and not platform, then I think you should at least clarify that in the configure.ac script to avoid confusion: sed -i -e 's/PLATFORM_TRIPLET/CALLING_CONVENTION_TRIPLET/g' -e 's/platform triplet/calling convention triplet/g' configure.ac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 07:00:36 2021 From: report at bugs.python.org (hpant) Date: Wed, 03 Feb 2021 12:00:36 +0000 Subject: [issue43114] Python 3.6 MSI Installer for Windows Message-ID: <1612353636.85.0.649798003305.issue43114@roundup.psfhosted.org> New submission from hpant : Hi Team, We would lie to have python 3.6 MSI Installer for Azure VDI. so that it will be applicablefor all users in azure. Please provide installation file ---------- components: Installation messages: 386198 nosy: hpant priority: normal severity: normal status: open title: Python 3.6 MSI Installer for Windows type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 07:01:44 2021 From: report at bugs.python.org (hpant) Date: Wed, 03 Feb 2021 12:01:44 +0000 Subject: [issue43114] Python 3.6 MSI Installer for Windows In-Reply-To: <1612353636.85.0.649798003305.issue43114@roundup.psfhosted.org> Message-ID: <1612353704.82.0.0676058959294.issue43114@roundup.psfhosted.org> hpant added the comment: We would like to have python 3.6 MSI Installer for Azure VDI. so that it will be applicablefor all users in azure. Please provide installation file ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 07:39:21 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 03 Feb 2021 12:39:21 +0000 Subject: [issue43114] Python 3.6 MSI Installer for Windows In-Reply-To: <1612353636.85.0.649798003305.issue43114@roundup.psfhosted.org> Message-ID: <1612355961.24.0.307142381154.issue43114@roundup.psfhosted.org> Christian Heimes added the comment: Python 3.6 is in security fix-only mode. We no longer provide binaries for it. We also dropped MSI installers a while ago. I let Steve explains the details. ---------- assignee: -> steve.dower nosy: +christian.heimes, steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 08:16:05 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Feb 2021 13:16:05 +0000 Subject: [issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file In-Reply-To: <1612348984.98.0.934369937347.issue43113@roundup.psfhosted.org> Message-ID: <1612358165.18.0.475773473122.issue43113@roundup.psfhosted.org> STINNER Victor added the comment: > FileNotFoundError: ./demo: /usr/bin/hugo: bad interpreter: No such file or directory Python has no knowledge of executable formats, shell or anything. It only calls posix_spawn() and raises an OSError on error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 08:17:58 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Feb 2021 13:17:58 +0000 Subject: [issue43108] test_curses is leaking references In-Reply-To: <1612296134.53.0.710661977317.issue43108@roundup.psfhosted.org> Message-ID: <1612358278.76.0.78470651976.issue43108@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +23239 pull_request: https://github.com/python/cpython/pull/24429 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 08:18:08 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Feb 2021 13:18:08 +0000 Subject: [issue43108] test_curses is leaking references In-Reply-To: <1612296134.53.0.710661977317.issue43108@roundup.psfhosted.org> Message-ID: <1612358288.63.0.565118304962.issue43108@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +23240 pull_request: https://github.com/python/cpython/pull/24430 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 08:41:17 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Feb 2021 13:41:17 +0000 Subject: [issue43108] test_curses is leaking references In-Reply-To: <1612296134.53.0.710661977317.issue43108@roundup.psfhosted.org> Message-ID: <1612359677.18.0.197205351532.issue43108@roundup.psfhosted.org> miss-islington added the comment: New changeset 12bfc595c49ef9681265407fe33b53b7a3623abc by Miss Islington (bot) in branch '3.9': bpo-43108: Fix a reference leak in the curses module (GH-24420) https://github.com/python/cpython/commit/12bfc595c49ef9681265407fe33b53b7a3623abc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 08:42:50 2021 From: report at bugs.python.org (Anders Munch) Date: Wed, 03 Feb 2021 13:42:50 +0000 Subject: [issue43115] locale.getlocale fails if locale is set Message-ID: <1612359770.32.0.137300123748.issue43115@roundup.psfhosted.org> New submission from Anders Munch : getlocale fails with an exception when the string returned by _setlocale is already an RFC 1766 language tag. Example: Python 3.10.0a4 (tags/v3.10.0a4:445f7f5, Jan 4 2021, 19:55:53) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import locale >>> locale.setlocale(locale.LC_ALL, 'en-US') 'en-US' >>> locale.getlocale() Traceback (most recent call last): File "", line 1, in File "C:\flonidan\env\Python310\lib\locale.py", line 593, in getlocale return _parse_localename(localename) File "C:\flonidan\env\Python310\lib\locale.py", line 501, in _parse_localename raise ValueError('unknown locale: %s' % localename) ValueError: unknown locale: en-US Expected result: ('en-US', None) See https://github.com/wxWidgets/Phoenix/issues/1637 for an example of the ensuing problems. wx.Locale calls C setlocale directly, but, as far as I can see, correctly, using dashes in the language code which is consistent with not only RFC 1766 but also the examples in Microsoft's documentation (https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/setlocale-wsetlocale?view=msvc-160). CPython seems to assume underscored names such as 'en_US' instead, as shown by getdefaultlocale inserting an underscore. ---------- components: Library (Lib), Windows messages: 386203 nosy: AndersMunch, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: locale.getlocale fails if locale is set versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 08:49:36 2021 From: report at bugs.python.org (Johannes) Date: Wed, 03 Feb 2021 13:49:36 +0000 Subject: [issue43116] Integer division numerical error Message-ID: <1612360176.06.0.161858956958.issue43116@roundup.psfhosted.org> New submission from Johannes : I'm a bit confused because this seems to be too obvious to be a bug: [code] >>> -2094820900 // 1298 -1613884 >>> -2094820900 // -1298 1613883 [/code] Obviously there is a +/- 1 difference in the result. Tested with Python 3.7, 3.8 and 3.9 on Debian Bullseye. Am I missing something? ---------- messages: 386204 nosy: jfu33.4 priority: normal severity: normal status: open title: Integer division numerical error type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 08:49:44 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Feb 2021 13:49:44 +0000 Subject: [issue43103] Add configure option to disable build libpython.a and don't install python.o In-Reply-To: <1612279427.78.0.51879378101.issue43103@roundup.psfhosted.org> Message-ID: <1612360184.9.0.320755354239.issue43103@roundup.psfhosted.org> STINNER Victor added the comment: About the option name, I consider to rename it to: --with-static-libpython, since technically it doesn't build a static "python" executable, but a static "libpython" (.a). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 08:51:18 2021 From: report at bugs.python.org (Alexey Izbyshev) Date: Wed, 03 Feb 2021 13:51:18 +0000 Subject: [issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file In-Reply-To: <1612348984.98.0.934369937347.issue43113@roundup.psfhosted.org> Message-ID: <1612360278.38.0.705835171408.issue43113@roundup.psfhosted.org> Alexey Izbyshev added the comment: > Ideally, the error would say: > FileNotFoundError: ./demo: /usr/bin/hugo: bad interpreter: No such file or directory The kernel simply returns ENOENT on an attempt to execve() a file with non-existing hash-bang interpreter. The same occurs on an attempt to run a dynamically linked ELF executable with INTERP program header containing a non-existing path. And, of course, the same error is returned if the executable file itself doesn't exist, so there is no simple way to distinguish such cases. Bash simply assumes[1] that if a file contains a hash-bang and the error from execve() is not recognized otherwise, it's a "bad interpreter". Note that all of the above is completely unrelated to os.posix_spawn(): subprocess or os.execve() would produce the same message. [1] https://git.savannah.gnu.org/cgit/bash.git/tree/execute_cmd.c?h=bash-5.1#n5854 ---------- nosy: +izbyshev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 08:52:06 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Wed, 03 Feb 2021 13:52:06 +0000 Subject: [issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file In-Reply-To: <1612348984.98.0.934369937347.issue43113@roundup.psfhosted.org> Message-ID: <1612360326.62.0.525600734975.issue43113@roundup.psfhosted.org> Miro Hron?ok added the comment: That was "ideal" error message. If we don't have all the information, we cannot have the ideal error message. But we need to adapt the default error message to not be misleading. What about: FileNotFoundError: [Errno 2] No such file or directory: Either './demo' or the interpreter of './demo' not found. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 08:56:34 2021 From: report at bugs.python.org (Scott Talbert) Date: Wed, 03 Feb 2021 13:56:34 +0000 Subject: [issue43115] locale.getlocale fails if locale is set In-Reply-To: <1612359770.32.0.137300123748.issue43115@roundup.psfhosted.org> Message-ID: <1612360594.56.0.123498216398.issue43115@roundup.psfhosted.org> Change by Scott Talbert : ---------- nosy: +swt2c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 09:03:28 2021 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 03 Feb 2021 14:03:28 +0000 Subject: [issue43116] Integer division numerical error In-Reply-To: <1612360176.06.0.161858956958.issue43116@roundup.psfhosted.org> Message-ID: <1612361008.17.0.132399818797.issue43116@roundup.psfhosted.org> Mark Dickinson added the comment: Python's `//` operator does floor division: that is, the (true) quotient is converted to an integer by taking the floor (rounding towards -infinity) instead of truncating (rounding towards zero). So indeed it's not a bug. The behaviour is documented here: https://docs.python.org/3/reference/expressions.html#binary-arithmetic-operations See also #43034 ---------- nosy: +mark.dickinson resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 09:12:16 2021 From: report at bugs.python.org (chen-y0y0) Date: Wed, 03 Feb 2021 14:12:16 +0000 Subject: [issue43117] Translation Mistakes Message-ID: <1612361536.13.0.0607210393018.issue43117@roundup.psfhosted.org> New submission from chen-y0y0 : A example in this picture: In the red circles, the texts should not be translated. They should be their original states. Because these texts are options that programmers will input into their programs. If these texts are translated and input by that, the program will raise an error. In the green circke, the texts are not translated. ---------- assignee: docs at python components: Documentation files: 1E42294E-CA8F-4CAC-9AA7-79F3B05EE9D1.jpeg messages: 386209 nosy: docs at python, prasechen priority: normal severity: normal status: open title: Translation Mistakes type: behavior versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file49787/1E42294E-CA8F-4CAC-9AA7-79F3B05EE9D1.jpeg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 09:16:46 2021 From: report at bugs.python.org (Alexey Izbyshev) Date: Wed, 03 Feb 2021 14:16:46 +0000 Subject: [issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file In-Reply-To: <1612348984.98.0.934369937347.issue43113@roundup.psfhosted.org> Message-ID: <1612361806.57.0.669902289796.issue43113@roundup.psfhosted.org> Alexey Izbyshev added the comment: > FileNotFoundError: [Errno 2] No such file or directory: Either './demo' or the interpreter of './demo' not found. This doesn't sound good to me because a very probable and a very improbable reasons are combined together without any distinction. Another possible issue is that usage of the word "interpreter" in this narrow sense might be non-obvious for users. ISTM that the most minimal way to check for the possibility of interpreter issue would be do something like `access(exe_path, X_OK)` in case of ENOENT: if it's successful, then a "bad interpreter" condition is likely. But in case of os.posix_spawnp(), the search in PATH is performed by libc, so CPython doesn't know exe_path. OTOH, subprocess and os.exec*p do perform their own search in PATH, but in case of subprocess it happens in the context of the child process, so we'll probably need to devise a separate error code to report to the parent via the error pipe to distinguish this condition. So far, I'm not convinced that the result is worth it, but I do agree that such mysterious "No such file" errors are not user-friendly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 09:56:48 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 03 Feb 2021 14:56:48 +0000 Subject: [issue43102] namedtuple's __new__.__globals__['__builtins__'] is None In-Reply-To: <1612277204.9.0.79430264778.issue43102@roundup.psfhosted.org> Message-ID: <1612364208.74.0.744652015426.issue43102@roundup.psfhosted.org> Raymond Hettinger added the comment: Wow, your project looks super interesting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 10:04:12 2021 From: report at bugs.python.org (Komiya Takeshi) Date: Wed, 03 Feb 2021 15:04:12 +0000 Subject: [issue43118] inspect.signature() raises RuntimeError on failed to resolve the default argument value Message-ID: <1612364652.22.0.413597788447.issue43118@roundup.psfhosted.org> New submission from Komiya Takeshi : inspect.signature() raises RuntimeError on failed to resolve the default argument value. For example, it fails to inspect a subclass of io.BufferedReader: Example: ``` import inspect import io class MyBufferedReader(io.BufferedReader): """buffer reader class.""" inspect.signature(MyBufferedReader) ``` Result: ``` Traceback (most recent call last): File "/Users/tkomiya/.pyenv/versions/3.9.1/lib/python3.9/inspect.py", line 2042, in wrap_value value = eval(s, module_dict) File "", line 1, in NameError: name 'DEFAULT_BUFFER_SIZE' is not defined During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/tkomiya/.pyenv/versions/3.9.1/lib/python3.9/inspect.py", line 2045, in wrap_value value = eval(s, sys_module_dict) File "", line 1, in NameError: name 'DEFAULT_BUFFER_SIZE' is not defined During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/tkomiya/work/tmp/doc/example.py", line 9, in inspect.signature(MyBufferedReader) File "/Users/tkomiya/.pyenv/versions/3.9.1/lib/python3.9/inspect.py", line 3130, in signature return Signature.from_callable(obj, follow_wrapped=follow_wrapped) File "/Users/tkomiya/.pyenv/versions/3.9.1/lib/python3.9/inspect.py", line 2879, in from_callable return _signature_from_callable(obj, sigcls=cls, File "/Users/tkomiya/.pyenv/versions/3.9.1/lib/python3.9/inspect.py", line 2397, in _signature_from_callable return _signature_fromstr(sigcls, obj, text_sig) File "/Users/tkomiya/.pyenv/versions/3.9.1/lib/python3.9/inspect.py", line 2095, in _signature_fromstr p(name, default) File "/Users/tkomiya/.pyenv/versions/3.9.1/lib/python3.9/inspect.py", line 2077, in p default_node = RewriteSymbolics().visit(default_node) File "/Users/tkomiya/.pyenv/versions/3.9.1/lib/python3.9/ast.py", line 407, in visit return visitor(node) File "/Users/tkomiya/.pyenv/versions/3.9.1/lib/python3.9/inspect.py", line 2069, in visit_Name return wrap_value(node.id) File "/Users/tkomiya/.pyenv/versions/3.9.1/lib/python3.9/inspect.py", line 2047, in wrap_value raise RuntimeError() RuntimeError ``` In my investigation, inspect.signature() tries to evaluate the default argument value of the class constructor. But it fails to evaluate because of the 2nd argument of the constructor takes a constant; `DEFAULT_BUFFER_SIZE`, but it is not found on the current context. I think it would be better to search the constants for the modules of the base classes. I just made a simple patch to resolve this bug. ---------- components: Library (Lib) files: inspect.patch keywords: patch messages: 386212 nosy: i.tkomiya priority: normal severity: normal status: open title: inspect.signature() raises RuntimeError on failed to resolve the default argument value versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file49788/inspect.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 10:07:05 2021 From: report at bugs.python.org (Andre Roberge) Date: Wed, 03 Feb 2021 15:07:05 +0000 Subject: [issue43117] Translation Mistakes In-Reply-To: <1612361536.13.0.0607210393018.issue43117@roundup.psfhosted.org> Message-ID: <1612364825.72.0.63876330481.issue43117@roundup.psfhosted.org> Andre Roberge added the comment: A similar error exists in the table for the French documentation where "valeurs" is indicated to be one of the options https://docs.python.org/fr/3.8/library/tkinter.ttk.html#widget ---------- nosy: +aroberge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 10:07:05 2021 From: report at bugs.python.org (Komiya Takeshi) Date: Wed, 03 Feb 2021 15:07:05 +0000 Subject: [issue43118] inspect.signature() raises RuntimeError on failed to resolve the default argument value In-Reply-To: <1612364652.22.0.413597788447.issue43118@roundup.psfhosted.org> Message-ID: <1612364825.14.0.438642767338.issue43118@roundup.psfhosted.org> Komiya Takeshi added the comment: FWIW, I succeeded to inspect the class with importing the constant from the base module as a workaround: ``` import inspect import io from io import DEFAULT_BUFFER_SIZE class MyBufferedReader(io.BufferedReader): """buffer reader class.""" inspect.signature(MyBufferedReader) ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 10:38:14 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 03 Feb 2021 15:38:14 +0000 Subject: [issue43103] Add configure option to disable build libpython.a and don't install python.o In-Reply-To: <1612279427.78.0.51879378101.issue43103@roundup.psfhosted.org> Message-ID: <1612366694.86.0.359049898721.issue43103@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: There are some build systems and downstream distributors that expect the .a to be there, so I propose to at least not changing the default. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 10:41:30 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Feb 2021 15:41:30 +0000 Subject: [issue43103] Add configure --without-static-libpython to not build libpython3.10.a In-Reply-To: <1612279427.78.0.51879378101.issue43103@roundup.psfhosted.org> Message-ID: <1612366890.2.0.617015287092.issue43103@roundup.psfhosted.org> STINNER Victor added the comment: I rewrote my PR to leave the default behavior unchanged and I renamed the option to --without-static-libpython (python => libpython). ---------- title: Add configure option to disable build libpython.a and don't install python.o -> Add configure --without-static-libpython to not build libpython3.10.a _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 10:53:03 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Feb 2021 15:53:03 +0000 Subject: [issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file In-Reply-To: <1612348984.98.0.934369937347.issue43113@roundup.psfhosted.org> Message-ID: <1612367583.86.0.90223836097.issue43113@roundup.psfhosted.org> STINNER Victor added the comment: IMO the fix is simple: only create OSError from the errno, never pass a filename. posix_spawn() is really complex function which can fail in many different ways. Only in some very specific cases the filename is correct. """ ERRORS The posix_spawn() and posix_spawnp() functions fail only in the case where the underlying fork(2), vfork(2) or clone(2) call fails; in these cases, these functions return an error number, which will be one of the errors described for fork(2), vfork(2) or clone(2). In addition, these functions fail if: ENOSYS Function not supported on this system. """ https://man7.org/linux/man-pages/man3/posix_spawn.3.html Hum. I'm not sure that manual page is up to date. In the glic, it can also report exec() failure using a pipe, if I recall correctly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 11:56:28 2021 From: report at bugs.python.org (Alexey Izbyshev) Date: Wed, 03 Feb 2021 16:56:28 +0000 Subject: [issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file In-Reply-To: <1612348984.98.0.934369937347.issue43113@roundup.psfhosted.org> Message-ID: <1612371388.79.0.601797154827.issue43113@roundup.psfhosted.org> Alexey Izbyshev added the comment: > IMO the fix is simple: only create OSError from the errno, never pass a filename. This will remove a normally helpful piece of the error message in exchange to being marginally less confusing in a rare case of non-existing interpreter (the user will still be left wondering why the file they tried to run exists, but "No such file or directory" is reported). So the only "win" here would be for CPython developers because users will be less likely to report a bug like this one. > posix_spawn() is really complex function which can fail in many different ways. This issue is not specific to posix_spawn(): subprocess and os.execve() report the filename too. Any fix would need to change those too for consistency. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 12:09:55 2021 From: report at bugs.python.org (Mariatta) Date: Wed, 03 Feb 2021 17:09:55 +0000 Subject: [issue43117] Translation Mistakes In-Reply-To: <1612361536.13.0.0607210393018.issue43117@roundup.psfhosted.org> Message-ID: <1612372195.99.0.38399354469.issue43117@roundup.psfhosted.org> Mariatta added the comment: Thanks for reporting this issue. The translations are worked on separate repositories and they have their own issue tracker. Please check the following table in the DevGuide to find the issue tracker for the translation group. You would need to report this issue there. https://devguide.python.org/documenting/#translating I'm closing this since it's considered "third-party". ---------- nosy: +Mariatta resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 12:23:03 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 17:23:03 +0000 Subject: [issue43110] import aiohttp crash closes Python from Windows Installer In-Reply-To: <1612341091.34.0.557735217217.issue43110@roundup.psfhosted.org> Message-ID: <1612372983.07.0.82897985899.issue43110@roundup.psfhosted.org> Steve Dower added the comment: Do you know whether aiohttp has released updated packages for the later alphas yet? Or have you rebuilt it from source as well? Alphas are not backwards compatible with each other, so extension modules need to be rebuilt for each update (and I'm pretty sure aiohttp relies on extension modules). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 12:35:59 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 03 Feb 2021 17:35:59 +0000 Subject: [issue42988] [security] Information disclosure via pydoc -p: /getfile?key=path allows to read arbitrary file on the filesystem In-Reply-To: <1611231517.86.0.296188996897.issue42988@roundup.psfhosted.org> Message-ID: <1612373759.78.0.108122899045.issue42988@roundup.psfhosted.org> STINNER Victor added the comment: While this vulnerability is bad, it only impacts very few users who run pydoc server. I suggest to not hold the incoming Python release (remove the "release blocker" priority) just for this one. If it's fixed before: great! But IMO it can wait for another Python release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 12:37:51 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Wed, 03 Feb 2021 17:37:51 +0000 Subject: [issue42988] [security] Information disclosure via pydoc -p: /getfile?key=path allows to read arbitrary file on the filesystem In-Reply-To: <1611231517.86.0.296188996897.issue42988@roundup.psfhosted.org> Message-ID: <1612373871.0.0.64335974376.issue42988@roundup.psfhosted.org> Miro Hron?ok added the comment: I agree. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 12:40:40 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 17:40:40 +0000 Subject: [issue43114] Python 3.6 MSI Installer for Windows In-Reply-To: <1612353636.85.0.649798003305.issue43114@roundup.psfhosted.org> Message-ID: <1612374040.79.0.548721144915.issue43114@roundup.psfhosted.org> Steve Dower added the comment: Christian covered it sufficiently: there are no new releases for Python 3.6, and the installer bundle is what it is. The last build released from python.org was 3.6.8: https://www.python.org/downloads/release/python-368/ If you need a newer build, you'll have to look into doing it yourself. If you're part of a team at Microsoft, then look me up internally and we can discuss it. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 12:51:39 2021 From: report at bugs.python.org (Ned Deily) Date: Wed, 03 Feb 2021 17:51:39 +0000 Subject: [issue42988] [security] Information disclosure via pydoc -p: /getfile?key=path allows to read arbitrary file on the filesystem In-Reply-To: <1611231517.86.0.296188996897.issue42988@roundup.psfhosted.org> Message-ID: <1612374699.55.0.654427523527.issue42988@roundup.psfhosted.org> Change by Ned Deily : ---------- priority: release blocker -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:01:15 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:01:15 +0000 Subject: [issue43035] FileNotFoundError in distutils\file_util.py copy_tree In-Reply-To: <1611746436.35.0.546212642615.issue43035@roundup.psfhosted.org> Message-ID: <1612375275.2.0.844778407369.issue43035@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:01:21 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:01:21 +0000 Subject: [issue42865] sysconfig appends CFLAGS to LD In-Reply-To: <1610078438.84.0.384790848261.issue42865@roundup.psfhosted.org> Message-ID: <1612375281.82.0.985039875594.issue42865@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:03:17 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:03:17 +0000 Subject: [issue42605] dir_util.copy_tree crashes if folder it previously created is removed In-Reply-To: <1607476103.38.0.0125735789387.issue42605@roundup.psfhosted.org> Message-ID: <1612375397.75.0.10485909713.issue42605@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:03:19 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:03:19 +0000 Subject: [issue39825] EXT_SUFFIX inconsistent between sysconfig and distutils.sysconfig (Windows) In-Reply-To: <1583156407.62.0.364374237882.issue39825@roundup.psfhosted.org> Message-ID: <1612375399.22.0.993972532158.issue39825@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:03:15 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:03:15 +0000 Subject: [issue42616] C Extensions on Darwin that link against libpython are likely to crash In-Reply-To: <1607631684.88.0.776282381427.issue42616@roundup.psfhosted.org> Message-ID: <1612375395.66.0.931228532262.issue42616@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:03:22 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:03:22 +0000 Subject: [issue23023] ./Modules/ld_so_aix not found on AIX during test_distutils In-Reply-To: <1418214633.02.0.849905032386.issue23023@psf.upfronthosting.co.za> Message-ID: <1612375402.49.0.673716632941.issue23023@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:03:20 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:03:20 +0000 Subject: [issue42554] distutils.util.get_platform() depends on minor version for macOS 11 In-Reply-To: <1607001108.52.0.506559643874.issue42554@roundup.psfhosted.org> Message-ID: <1612375400.85.0.943131648374.issue42554@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:03:24 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:03:24 +0000 Subject: [issue13962] multiple lib and include directories on Linux In-Reply-To: <1328631387.63.0.77049382306.issue13962@psf.upfronthosting.co.za> Message-ID: <1612375404.06.0.334886705824.issue13962@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:03:25 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:03:25 +0000 Subject: [issue42278] Remove usage of tempfile.mktemp in stdlib In-Reply-To: <1604674672.14.0.368213492276.issue42278@roundup.psfhosted.org> Message-ID: <1612375405.43.0.898241749684.issue42278@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:03:27 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:03:27 +0000 Subject: [issue16879] distutils.command.config uses fragile constant temporary file name In-Reply-To: <1357476277.46.0.0647034504115.issue16879@psf.upfronthosting.co.za> Message-ID: <1612375407.05.0.0827606563874.issue16879@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:04:28 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:04:28 +0000 Subject: [issue9023] distutils relative path errors In-Reply-To: <1276850851.53.0.471987336824.issue9023@psf.upfronthosting.co.za> Message-ID: <1612375468.72.0.85692019213.issue9023@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:04:25 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:04:25 +0000 Subject: [issue24908] sysconfig.py and distutils.sysconfig.py disagree on directory spelling on Windows In-Reply-To: <1440156019.56.0.0846148968613.issue24908@psf.upfronthosting.co.za> Message-ID: <1612375465.84.0.539968343659.issue24908@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:04:25 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:04:25 +0000 Subject: [issue42204] "import setuptools" Results in "ModuleNotFoundError: No module named '_distutils_hack'" Message-ID: <1612375465.88.0.998297991685.issue42204@roundup.psfhosted.org> New submission from Steve Dower : Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:04:30 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:04:30 +0000 Subject: [issue1479255] Fix building with SWIG's -c++ option set in setup.py Message-ID: <1612375470.16.0.557598571776.issue1479255@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:04:27 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:04:27 +0000 Subject: [issue27226] distutils: unable to compile both .opt-1.pyc and .opt2.pyc simultaneously In-Reply-To: <1465106608.99.0.622112847685.issue27226@psf.upfronthosting.co.za> Message-ID: <1612375467.31.0.0142510274362.issue27226@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:04:23 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:04:23 +0000 Subject: [issue38727] setup.py sdist --format=gztar should use (equivalent of) `gzip -n` In-Reply-To: <1573071278.89.0.711333419595.issue38727@roundup.psfhosted.org> Message-ID: <1612375463.2.0.487480339084.issue38727@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:04:28 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:04:28 +0000 Subject: [issue16926] setup.py register does not always respect --repository In-Reply-To: <1357878241.89.0.365738814483.issue16926@psf.upfronthosting.co.za> Message-ID: <1612375468.72.0.188311417599.issue16926@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:04:27 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:04:27 +0000 Subject: [issue763043] unable to specify another compiler Message-ID: <1612375467.27.0.831941132541.issue763043@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:05:43 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:05:43 +0000 Subject: [issue41601] Performance issue using isspace() in extension module on Windows In-Reply-To: <1597941059.18.0.402030297208.issue41601@roundup.psfhosted.org> Message-ID: <1612375543.28.0.527388504537.issue41601@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:05:45 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:05:45 +0000 Subject: [issue41154] test_pkgutil:test_name_resolution fails on macOS HFS+ file systems In-Reply-To: <1593413801.07.0.974965447149.issue41154@roundup.psfhosted.org> Message-ID: <1612375545.94.0.997137839036.issue41154@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:05:49 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:05:49 +0000 Subject: [issue41880] Get Python include directories from sysconfigdata In-Reply-To: <1601324156.19.0.410608433996.issue41880@roundup.psfhosted.org> Message-ID: <1612375549.4.0.138324245713.issue41880@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:05:48 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:05:48 +0000 Subject: [issue919238] Recursive variable definition causes sysconfig infinite loop Message-ID: <1612375548.15.0.413489086279.issue919238@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:05:43 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:05:43 +0000 Subject: [issue25229] distutils doesn't add "-Wl, " prefix to "-R" on Linux if the C compiler isn't named 'gcc' In-Reply-To: <1443130331.16.0.912755488197.issue25229@psf.upfronthosting.co.za> Message-ID: <1612375543.91.0.774200956011.issue25229@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:05:48 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:05:48 +0000 Subject: [issue40530] distutils/cygwinccompiler.py doesn't support recent msvc versions In-Reply-To: <1588768743.33.0.586739194503.issue40530@roundup.psfhosted.org> Message-ID: <1612375548.63.0.152560544466.issue40530@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:05:51 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:05:51 +0000 Subject: [issue41143] distutils uses the locale encoding for the .pypirc file In-Reply-To: <1593270849.73.0.549348582361.issue41143@roundup.psfhosted.org> Message-ID: <1612375551.47.0.00547683877579.issue41143@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:05:50 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:05:50 +0000 Subject: [issue41882] CCompiler.has_function does not delete temporary files In-Reply-To: <1601334248.35.0.2911303448.issue41882@roundup.psfhosted.org> Message-ID: <1612375550.38.0.433457217002.issue41882@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:06:06 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:06:06 +0000 Subject: [issue41134] distutils.dir_util.copy_tree FileExistsError when updating symlinks In-Reply-To: <1593228362.42.0.387933635808.issue41134@roundup.psfhosted.org> Message-ID: <1612375566.61.0.85583021648.issue41134@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- dependencies: -Add race-free os.link and os.symlink wrapper / helper nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:05:50 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:05:50 +0000 Subject: [issue42009] Unable to compile with message compiler due to source order In-Reply-To: <1602483942.71.0.834700001861.issue42009@roundup.psfhosted.org> Message-ID: <1612375550.82.0.409639990554.issue42009@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:07:49 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:07:49 +0000 Subject: [issue38711] setup parameter 'distclass' ignored for configuration files In-Reply-To: <1573016557.67.0.586139729549.issue38711@roundup.psfhosted.org> Message-ID: <1612375669.4.0.295473122605.issue38711@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:07:53 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:07:53 +0000 Subject: [issue36383] Virtual environment sysconfig.get_path() and distutils.sysconfig.get_python_inc() reports base Python include directory In-Reply-To: <1553100828.16.0.35045767323.issue36383@roundup.psfhosted.org> Message-ID: <1612375673.09.0.703141442391.issue36383@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:07:53 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:07:53 +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: <1612375673.79.0.224611065729.issue37916@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:07:50 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:07:50 +0000 Subject: [issue38718] query of global metadata options delivers error messages even when successful In-Reply-To: <1573042079.22.0.765143606638.issue38718@roundup.psfhosted.org> Message-ID: <1612375670.88.0.81298089305.issue38718@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:07:57 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:07:57 +0000 Subject: [issue18987] distutils.utils.get_platform() for 32-bit Python on a 64-bit machine In-Reply-To: <1378731781.77.0.0136191125302.issue18987@psf.upfronthosting.co.za> Message-ID: <1612375677.21.0.154140568357.issue18987@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:07:48 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:07:48 +0000 Subject: [issue38714] setup command alias erroneous for names with hyphens In-Reply-To: <1573018415.75.0.591711986593.issue38714@roundup.psfhosted.org> Message-ID: <1612375668.4.0.641503189087.issue38714@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:07:55 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:07:55 +0000 Subject: [issue8987] Distutils doesn't quote Windows command lines properly In-Reply-To: <1276406573.22.0.576013989845.issue8987@psf.upfronthosting.co.za> Message-ID: <1612375675.93.0.779833460972.issue8987@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:07:52 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:07:52 +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: <1612375672.4.0.932184894798.issue35981@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:07:50 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:07:50 +0000 Subject: [issue38709] distutils - setuptools - alias command removes comments from setup.cfg In-Reply-To: <1573012152.1.0.450153006571.issue38709@roundup.psfhosted.org> Message-ID: <1612375670.15.0.96563866189.issue38709@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:07:55 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:07:55 +0000 Subject: [issue39286] Configure includes LIBS but does not pass it to distutils In-Reply-To: <1578657299.08.0.201349832459.issue39286@roundup.psfhosted.org> Message-ID: <1612375675.24.0.367578046118.issue39286@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:07:54 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:07:54 +0000 Subject: [issue39260] distutils.spawn: find_executable() Fails To Find Many Executables on Windows In-Reply-To: <1578498792.76.0.781232335261.issue39260@roundup.psfhosted.org> Message-ID: <1612375674.45.0.870365278754.issue39260@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:07:51 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:07:51 +0000 Subject: [issue38569] Unknown distribution option: 'license_files' In-Reply-To: <1571860665.03.0.77407877223.issue38569@roundup.psfhosted.org> Message-ID: <1612375671.62.0.249888870604.issue38569@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:07:59 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:07:59 +0000 Subject: [issue14106] Distutils manifest: recursive-(include|exclude) matches suffix instead of full filename In-Reply-To: <1330094795.44.0.467789061974.issue14106@psf.upfronthosting.co.za> Message-ID: <1612375679.93.0.310031664243.issue14106@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:08:02 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:08:02 +0000 Subject: [issue37247] swap distutils build_ext and build_py commands to allow proper SWIG extension installation In-Reply-To: <1560341496.09.0.819646109086.issue37247@roundup.psfhosted.org> Message-ID: <1612375682.25.0.492210969528.issue37247@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:08:03 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:08:03 +0000 Subject: [issue38597] C Extension import limit In-Reply-To: <1572119300.64.0.0138111717141.issue38597@roundup.psfhosted.org> Message-ID: <1612375683.19.0.0932382495116.issue38597@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:07:57 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:07:57 +0000 Subject: [issue40478] allow finding nmake.exe executable in MSVCCompiler In-Reply-To: <1588472619.67.0.562367362064.issue40478@roundup.psfhosted.org> Message-ID: <1612375677.88.0.248592728076.issue40478@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:07:56 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:07:56 +0000 Subject: [issue39917] new_compiler() called 2nd time causes error In-Reply-To: <1583784112.25.0.514690253102.issue39917@roundup.psfhosted.org> Message-ID: <1612375676.62.0.25640982255.issue39917@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:08:04 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:08:04 +0000 Subject: [issue38632] setup.py sdist should honor SOURCE_DATE_EPOCH In-Reply-To: <1572354197.87.0.67466678891.issue38632@roundup.psfhosted.org> Message-ID: <1612375684.05.0.649533460817.issue38632@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:08:05 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:08:05 +0000 Subject: [issue41027] get_version() fails to return gcc version for gcc-7 In-Reply-To: <1592501907.65.0.64967213393.issue41027@roundup.psfhosted.org> Message-ID: <1612375685.38.0.923636452701.issue41027@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:08:04 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:08:04 +0000 Subject: [issue40963] distutils make_zipfile uses random order In-Reply-To: <1591983020.96.0.753934283459.issue40963@roundup.psfhosted.org> Message-ID: <1612375684.65.0.275458353978.issue40963@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:09:23 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:09:23 +0000 Subject: [issue29708] support reproducible Python builds In-Reply-To: <1488540966.18.0.904677570473.issue29708@psf.upfronthosting.co.za> Message-ID: <1612375763.81.0.978626474191.issue29708@roundup.psfhosted.org> Steve Dower added the comment: This doesn't seem to necessarily impact distutils, so I'm leaving it open despite PEP 632. ---------- components: -Distutils dependencies: -Reproducible pyc: FLAG_REF is not stable., Reproducible pyc: frozenset is not serialized in a deterministic order nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:10:31 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:10:31 +0000 Subject: [issue1382562] --install-base not honored on win32 Message-ID: <1612375831.36.0.849589246528.issue1382562@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:10:30 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:10:30 +0000 Subject: [issue15266] Perform the same checks as PyPI for Description field In-Reply-To: <1341614489.26.0.385769914645.issue15266@psf.upfronthosting.co.za> Message-ID: <1612375830.82.0.826164354764.issue15266@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:10:29 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:10:29 +0000 Subject: [issue37794] Replace /Ox with /O2 In-Reply-To: <1565284442.44.0.244166862045.issue37794@roundup.psfhosted.org> Message-ID: <1612375829.75.0.688665645807.issue37794@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:10:33 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:10:33 +0000 Subject: [issue1371826] distutils is silent about multiple -I/-L/-R Message-ID: <1612375833.44.0.61220340613.issue1371826@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:10:28 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:10:28 +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: <1612375828.91.0.818647876582.issue36998@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:10:32 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:10:32 +0000 Subject: [issue13317] building with 2to3 generates wrong import paths because build_ext is run after build_py In-Reply-To: <1320183133.27.0.209500697705.issue13317@psf.upfronthosting.co.za> Message-ID: <1612375832.05.0.827104311884.issue13317@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:10:34 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:10:34 +0000 Subject: [issue6114] distutils build_ext path comparison only based on strings In-Reply-To: <1243335359.03.0.865660639037.issue6114@psf.upfronthosting.co.za> Message-ID: <1612375834.95.0.924237054076.issue6114@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: accepted -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:10:32 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:10:32 +0000 Subject: =?utf-8?q?=5Bissue1011113=5D_Make_=E2=80=9Cinstall=E2=80=9D_find_the_buil?= =?utf-8?q?d=5Fbase_directory?= Message-ID: <1612375832.76.0.560216004564.issue1011113@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:10:54 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:10:54 +0000 Subject: [issue24935] LDSHARED is not set according when CC is set. In-Reply-To: <1440517644.33.0.785597906757.issue24935@psf.upfronthosting.co.za> Message-ID: <1612375854.38.0.684127484111.issue24935@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:10:55 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:10:55 +0000 Subject: [issue7202] "python setup.py cmd --verbose" does not set verbosity In-Reply-To: <1256481428.97.0.691214379627.issue7202@psf.upfronthosting.co.za> Message-ID: <1612375855.02.0.389655410246.issue7202@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:10:55 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:10:55 +0000 Subject: [issue37570] [Windows] distutils.util.byte_compile() fails indirect byte compiling with non-ASCII full-path In-Reply-To: <1562898531.08.0.918115667827.issue37570@roundup.psfhosted.org> Message-ID: <1612375855.94.0.258826786068.issue37570@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:10:49 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:10:49 +0000 Subject: =?utf-8?q?=5Bissue9322=5D_Don=E2=80=99t_fail_silently_if_ext=5Fmodules_us?= =?utf-8?q?e_absolute_paths?= In-Reply-To: <1279721130.09.0.919872519995.issue9322@psf.upfronthosting.co.za> Message-ID: <1612375849.68.0.615921164913.issue9322@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:11:00 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:11:00 +0000 Subject: [issue36768] distutils.util.convert_path mangles windows paths with forward slashes In-Reply-To: <1556719316.49.0.543223746824.issue36768@roundup.psfhosted.org> Message-ID: <1612375860.16.0.502798877019.issue36768@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:10:58 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:10:58 +0000 Subject: [issue32223] distutils doesn't correctly read UTF-8 content from config files In-Reply-To: <1512492386.04.0.213398074469.issue32223@psf.upfronthosting.co.za> Message-ID: <1612375858.74.0.993762931885.issue32223@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:10:56 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:10:56 +0000 Subject: [issue37541] get_python_lib() returns incorrect path for site-packages In-Reply-To: <1562749374.67.0.365304267455.issue37541@roundup.psfhosted.org> Message-ID: <1612375856.83.0.855586731984.issue37541@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:10:54 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:10:54 +0000 Subject: [issue37680] distutils appends LDFLAGS environment variable before object file names In-Reply-To: <1564060967.95.0.321651965491.issue37680@roundup.psfhosted.org> Message-ID: <1612375854.4.0.000624008444518.issue37680@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:10:57 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:10:57 +0000 Subject: [issue35893] distutils fails to build extension on windows when it is a package.__init__ In-Reply-To: <1549228211.63.0.529262209714.issue35893@roundup.psfhosted.org> Message-ID: <1612375857.98.0.744707440587.issue35893@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:10:52 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:10:52 +0000 Subject: [issue10932] distutils.core.setup - data_files misbehaviour ? In-Reply-To: <1295353825.23.0.755300594789.issue10932@psf.upfronthosting.co.za> Message-ID: <1612375852.71.0.140997217973.issue10932@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:10:47 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:10:47 +0000 Subject: [issue5977] distutils build_ext.get_outputs returns wrong result In-Reply-To: <1241875790.11.0.581973280056.issue5977@psf.upfronthosting.co.za> Message-ID: <1612375847.4.0.854577286539.issue5977@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:11:00 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:11:00 +0000 Subject: [issue5243] Missing dependency in distutils build In-Reply-To: <1234519029.27.0.18013582736.issue5243@psf.upfronthosting.co.za> Message-ID: <1612375860.1.0.604396978259.issue5243@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:15 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:15 +0000 Subject: [issue9912] Fail when vsvarsall.bat produces stderr In-Reply-To: <1285082676.18.0.058541871992.issue9912@psf.upfronthosting.co.za> Message-ID: <1612376175.3.0.0423646580246.issue9912@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:16 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:16 +0000 Subject: [issue15018] Incomplete Python LDFLAGS and CPPFLAGS used for extension modules on posix In-Reply-To: <1338987103.32.0.200789346526.issue15018@psf.upfronthosting.co.za> Message-ID: <1612376176.1.0.570632918106.issue15018@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:21 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:21 +0000 Subject: [issue10374] distutils[2] should recreate scripts in the build tree In-Reply-To: <1289308289.62.0.579780588392.issue10374@psf.upfronthosting.co.za> Message-ID: <1612376181.43.0.376857943619.issue10374@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:17 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:17 +0000 Subject: [issue2698] Extension module build fails for MinGW: missing vcvarsall.bat In-Reply-To: <1209230424.66.0.154562223128.issue2698@psf.upfronthosting.co.za> Message-ID: <1612376177.36.0.162383833375.issue2698@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: accepted -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:21 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:21 +0000 Subject: [issue8384] Better error message for executables not found In-Reply-To: <1271121338.06.0.379239271673.issue8384@psf.upfronthosting.co.za> Message-ID: <1612376181.95.0.240186489172.issue8384@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:16 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:16 +0000 Subject: [issue17274] distutils silently omits relative symlinks In-Reply-To: <1361525653.88.0.944877368203.issue17274@psf.upfronthosting.co.za> Message-ID: <1612376176.76.0.501121062994.issue17274@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:18 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:18 +0000 Subject: [issue7182] For non-debug builds, the cygwinccompiler.py should define NDEBUG In-Reply-To: <1256147342.16.0.0286188762329.issue7182@psf.upfronthosting.co.za> Message-ID: <1612376178.0.0.738430643754.issue7182@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:18 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:18 +0000 Subject: [issue36640] distutils.sysconfig.get_python_lib behaves incorrectly when pip cache is enabled In-Reply-To: <1555406571.1.0.830957588596.issue36640@roundup.psfhosted.org> Message-ID: <1612376178.59.0.288980470438.issue36640@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:20 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:20 +0000 Subject: [issue33875] Allow dynamic password evaluation in pypirc configuration file. In-Reply-To: <1529117678.87.0.56676864532.issue33875@psf.upfronthosting.co.za> Message-ID: <1612376180.85.0.480847387498.issue33875@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:19 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:19 +0000 Subject: [issue21710] --install-base option ignored? In-Reply-To: <1402436563.61.0.260081261103.issue21710@psf.upfronthosting.co.za> Message-ID: <1612376179.74.0.197008233607.issue21710@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:20 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:20 +0000 Subject: [issue36353] rpath incorrectly handled on OSX by build_ext In-Reply-To: <1552930315.65.0.323972395891.issue36353@roundup.psfhosted.org> Message-ID: <1612376180.26.0.412553073037.issue36353@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:19 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:19 +0000 Subject: [issue22269] Resolve distutils option conflicts with priorities In-Reply-To: <1408919544.9.0.398406846461.issue22269@psf.upfronthosting.co.za> Message-ID: <1612376179.16.0.409199507387.issue22269@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:25 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:25 +0000 Subject: [issue13055] Distutils tries to handle null versions but fails In-Reply-To: <1317238322.67.0.925527851228.issue13055@psf.upfronthosting.co.za> Message-ID: <1612376185.83.0.331745735987.issue13055@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:28 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:28 +0000 Subject: [issue27004] Handle script shbang options In-Reply-To: <1462995550.58.0.0858558226193.issue27004@psf.upfronthosting.co.za> Message-ID: <1612376188.02.0.947132667483.issue27004@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:24 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:24 +0000 Subject: [issue33990] CPPFLAGS during ./configure are not passed-through in sysconfig.customize_compiler In-Reply-To: <1530213218.16.0.56676864532.issue33990@psf.upfronthosting.co.za> Message-ID: <1612376184.2.0.663026216018.issue33990@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:29 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:29 +0000 Subject: [issue20397] distutils --record option does not validate existence of byte-compiled files In-Reply-To: <1390746014.88.0.900467086198.issue20397@psf.upfronthosting.co.za> Message-ID: <1612376189.41.0.378829290473.issue20397@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:27 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:27 +0000 Subject: [issue35718] Cannot initialize the distutils "force" command-option In-Reply-To: <1547222486.48.0.811316963234.issue35718@roundup.psfhosted.org> Message-ID: <1612376187.44.0.651887032134.issue35718@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:22 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:22 +0000 Subject: [issue828450] sdist generates bad MANIFEST on Windows Message-ID: <1612376182.52.0.306273125284.issue828450@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:23 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:23 +0000 Subject: [issue8908] friendly errors for UAC misbehavior in windows installers In-Reply-To: <1275756301.53.0.564921810654.issue8908@psf.upfronthosting.co.za> Message-ID: <1612376183.06.0.993013987249.issue8908@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:23 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:23 +0000 Subject: [issue11601] UnixCCompiler always uses compiler_so, not compiler In-Reply-To: <1300475054.67.0.598192564175.issue11601@psf.upfronthosting.co.za> Message-ID: <1612376183.65.0.219742957942.issue11601@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:24 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:24 +0000 Subject: [issue4459] bdist_rpm should enable --fix-python by default In-Reply-To: <1227969751.28.0.990351219395.issue4459@psf.upfronthosting.co.za> Message-ID: <1612376184.76.0.927572702212.issue4459@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:25 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:25 +0000 Subject: [issue36238] distutils complains "package init file 'xxx/__init__.py' not found (or not a regular file)" when using Cythonized __init__.pyx In-Reply-To: <1552048999.95.0.516949912161.issue36238@roundup.psfhosted.org> Message-ID: <1612376185.31.0.0716044367119.issue36238@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:28 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:28 +0000 Subject: [issue35172] Add support for other MSVC compiler versions to distutils. distutils makes two incorrect assumption that MSVC compiler versions scale linearly and that the crt's are the same. In-Reply-To: <1541460788.89.0.788709270274.issue35172@psf.upfronthosting.co.za> Message-ID: <1612376188.95.0.347157919057.issue35172@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:31 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:31 +0000 Subject: [issue14894] distutils.LooseVersion fails to compare number and a word In-Reply-To: <1337805749.61.0.661955519892.issue14894@psf.upfronthosting.co.za> Message-ID: <1612376191.35.0.687854205379.issue14894@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:26 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:26 +0000 Subject: [issue35882] distutils fails with UnicodeEncodeError with strange filename in package_data In-Reply-To: <1549034691.01.0.592197242815.issue35882@roundup.psfhosted.org> Message-ID: <1612376186.89.0.391399464365.issue35882@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:28 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:28 +0000 Subject: [issue35244] Allow to setup Clang as default compiler for modules build In-Reply-To: <1542197312.07.0.788709270274.issue35244@psf.upfronthosting.co.za> Message-ID: <1612376188.85.0.553376400277.issue35244@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:31 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:31 +0000 Subject: [issue33457] python-config ldflags, PEP 513 and explicit linking to libpython in python extensions In-Reply-To: <1525966955.19.0.682650639539.issue33457@psf.upfronthosting.co.za> Message-ID: <1612376191.41.0.589383204084.issue33457@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:26 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:26 +0000 Subject: [issue993766] bdist_dumb and --relative on Windows fails Message-ID: <1612376186.35.0.824126874542.issue993766@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:16:31 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:16:31 +0000 Subject: [issue31551] test_distutils fails if current directory contains spaces In-Reply-To: <1506076771.77.0.41123566285.issue31551@psf.upfronthosting.co.za> Message-ID: <1612376191.42.0.980259281588.issue31551@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:19:05 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:19:05 +0000 Subject: [issue31211] distutils/util.py get_platform() does not identify linux-i686 platforms In-Reply-To: <1502814030.02.0.254840991446.issue31211@psf.upfronthosting.co.za> Message-ID: <1612376345.7.0.394193853548.issue31211@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:19:06 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:19:06 +0000 Subject: [issue31332] Building modules by Clang with Microsoft CodeGen In-Reply-To: <1504410017.01.0.560044317715.issue31332@psf.upfronthosting.co.za> Message-ID: <1612376346.34.0.278899055911.issue31332@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:19:07 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:19:07 +0000 Subject: [issue2445] Use The CygwinCCompiler Under Cygwin In-Reply-To: <1206117698.01.0.240143600903.issue2445@psf.upfronthosting.co.za> Message-ID: <1612376347.6.0.417770377811.issue2445@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: accepted -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:19:06 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:19:06 +0000 Subject: [issue20464] Update distutils sample config file in Doc/install/index.rst In-Reply-To: <1391201711.97.0.184979826347.issue20464@psf.upfronthosting.co.za> Message-ID: <1612376346.97.0.263751062493.issue20464@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:19:23 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:19:23 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1612376363.98.0.888426935785.issue16202@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:19:21 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:19:21 +0000 Subject: [issue32054] Creating RPM on Python 2 works, but Python 3 fails because of sys.implementation.cache_tag In-Reply-To: <1510870022.27.0.213398074469.issue32054@psf.upfronthosting.co.za> Message-ID: <1612376361.96.0.519645994941.issue32054@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:19:26 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:19:26 +0000 Subject: [issue33168] distutils build/build_ext and --debug In-Reply-To: <1522246881.58.0.467229070634.issue33168@psf.upfronthosting.co.za> Message-ID: <1612376366.25.0.222479792606.issue33168@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:19:19 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:19:19 +0000 Subject: [issue4032] distutils doesn't search ".dll.a" as library on cygwin In-Reply-To: <1223055534.39.0.439061882395.issue4032@psf.upfronthosting.co.za> Message-ID: <1612376359.25.0.969549092274.issue4032@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:19:25 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:19:25 +0000 Subject: [issue23102] distutils: isinstance checks fail with setuptools-monkeypatched Extension/Distribution In-Reply-To: <1419316588.75.0.487755278973.issue23102@psf.upfronthosting.co.za> Message-ID: <1612376365.66.0.143149344766.issue23102@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:19:22 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:19:22 +0000 Subject: [issue13420] newer() function in dep_util.py discard changes in the same second In-Reply-To: <1321529038.98.0.0841934486822.issue13420@psf.upfronthosting.co.za> Message-ID: <1612376362.61.0.466088072704.issue13420@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:19:23 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:19:23 +0000 Subject: [issue32597] Bad detection of clang In-Reply-To: <1516367732.86.0.467229070634.issue32597@psf.upfronthosting.co.za> Message-ID: <1612376363.29.0.441432992249.issue32597@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:19:28 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:19:28 +0000 Subject: [issue34012] No option to include system headers in distutils.core.Extension In-Reply-To: <1530372554.62.0.56676864532.issue34012@psf.upfronthosting.co.za> Message-ID: <1612376368.65.0.829670068709.issue34012@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:19:29 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:19:29 +0000 Subject: [issue24691] out of memory in distutils.upload with large files In-Reply-To: <1437644652.98.0.268496303546.issue24691@psf.upfronthosting.co.za> Message-ID: <1612376369.11.0.785697180322.issue24691@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:19:27 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:19:27 +0000 Subject: [issue33969] "copytree" refuses to copy to a mount point In-Reply-To: <1530014691.54.0.56676864532.issue33969@psf.upfronthosting.co.za> Message-ID: <1612376367.71.0.545373150524.issue33969@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:19:28 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:19:28 +0000 Subject: =?utf-8?q?=5Bissue33466=5D_Distutils_does_not_support_the_compilation_of_?= =?utf-8?b?T2JqZWN0aXZlLUMrKyAo4oCcLm1t4oCdKSBmaWxlcw==?= In-Reply-To: <1526057984.85.0.682650639539.issue33466@psf.upfronthosting.co.za> Message-ID: <1612376368.17.0.356652117761.issue33466@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:19:31 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:19:31 +0000 Subject: [issue18454] distutils crashes when uploading to PyPI having only the username (no pw) defined In-Reply-To: <1373822688.67.0.938925989206.issue18454@psf.upfronthosting.co.za> Message-ID: <1612376371.01.0.678441695374.issue18454@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:19:25 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:19:25 +0000 Subject: [issue32957] distutils.command.install checks truthiness of .ext_modules instead of calling .has_ext_modules() In-Reply-To: <1519658682.25.0.467229070634.issue32957@psf.upfronthosting.co.za> Message-ID: <1612376365.1.0.240609027627.issue32957@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:19:26 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:19:26 +0000 Subject: [issue30613] Distutils register command creates non-standard multipart data In-Reply-To: <1497009325.99.0.168340984159.issue30613@psf.upfronthosting.co.za> Message-ID: <1612376366.74.0.253498633282.issue30613@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:19:27 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:19:27 +0000 Subject: [issue33637] pip cannot build extensions for debug Python In-Reply-To: <1527181847.69.0.682650639539.issue33637@psf.upfronthosting.co.za> Message-ID: <1612376367.2.0.935898395846.issue33637@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:19:24 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:19:24 +0000 Subject: [issue32716] setup.py register --repository is broken In-Reply-To: <1517266728.23.0.467229070634.issue32716@psf.upfronthosting.co.za> Message-ID: <1612376364.52.0.147701669956.issue32716@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:19:33 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:19:33 +0000 Subject: [issue34322] modification to Lib/distutils/ccompiler.py to simplify handling of compile arguments by subclasses In-Reply-To: <1533220278.22.0.56676864532.issue34322@psf.upfronthosting.co.za> Message-ID: <1612376373.48.0.852653630284.issue34322@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:19:34 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:19:34 +0000 Subject: [issue32773] distutils should NOT preserve timestamps In-Reply-To: <1517846476.27.0.467229070634.issue32773@psf.upfronthosting.co.za> Message-ID: <1612376374.12.0.105024183914.issue32773@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:19:34 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:19:34 +0000 Subject: [issue4508] distutils compiler not handling spaces in path to output/src files In-Reply-To: <1228341537.43.0.522254260997.issue4508@psf.upfronthosting.co.za> Message-ID: <1612376374.76.0.861378735417.issue4508@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:19:35 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:19:35 +0000 Subject: [issue1016626] distutils support for swig is under par Message-ID: <1612376375.33.0.956286489067.issue1016626@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:19:32 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:19:32 +0000 Subject: [issue33980] distutils upload: SSL Error when uploading package to your own pypi In-Reply-To: <1530102486.37.0.56676864532.issue33980@psf.upfronthosting.co.za> Message-ID: <1612376372.8.0.303599054813.issue33980@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:22 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:21:22 +0000 Subject: [issue27790] test_distutils spews linker messages on Windows In-Reply-To: <1471468881.84.0.977496152734.issue27790@psf.upfronthosting.co.za> Message-ID: <1612376482.7.0.223924662532.issue27790@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:25 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:21:25 +0000 Subject: [issue29408] Add timestamp-based dependency system to build_clib In-Reply-To: <1485912008.84.0.925111372259.issue29408@psf.upfronthosting.co.za> Message-ID: <1612376485.92.0.91866662272.issue29408@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:23 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:21:23 +0000 Subject: [issue29225] distutils.command.install_lib.get_outputs() wrong with extensions built inplace In-Reply-To: <1484062635.84.0.0152072002193.issue29225@psf.upfronthosting.co.za> Message-ID: <1612376483.38.0.343348024369.issue29225@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:28 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:21:28 +0000 Subject: [issue2943] Distutils should generate a better error message when the SDK is not installed In-Reply-To: <1211455981.94.0.404413935613.issue2943@psf.upfronthosting.co.za> Message-ID: <1612376488.46.0.644910143791.issue2943@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:26 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:21:26 +0000 Subject: [issue29313] msi by bdist_msi will fail execute install-scripts if space in present in python path In-Reply-To: <1484768319.35.0.107822358832.issue29313@psf.upfronthosting.co.za> Message-ID: <1612376486.4.0.422705446187.issue29313@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:26 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:21:26 +0000 Subject: [issue29320] bdist_msi install_script fail to execute if alt python location specified In-Reply-To: <1484830420.95.0.711337585743.issue29320@psf.upfronthosting.co.za> Message-ID: <1612376486.98.0.350399344604.issue29320@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:22 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:21:22 +0000 Subject: [issue20754] Distribution.parse_config_files uses interpolation In-Reply-To: <1393201670.58.0.749043113933.issue20754@psf.upfronthosting.co.za> Message-ID: <1612376482.35.0.947379809221.issue20754@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:23 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:21:23 +0000 Subject: [issue30925] RPM build lacks ability to include other files similar to doc_files In-Reply-To: <1499968728.03.0.295292899472.issue30925@psf.upfronthosting.co.za> Message-ID: <1612376483.82.0.160919398011.issue30925@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:25 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:21:25 +0000 Subject: [issue15797] bdist_msi does not pass -install/remove flags to install_script In-Reply-To: <1346147472.01.0.0635028414042.issue15797@psf.upfronthosting.co.za> Message-ID: <1612376485.4.0.979530109873.issue15797@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:29 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:21:29 +0000 Subject: [issue7412] distutils install race condition In-Reply-To: <1259571666.51.0.555227768726.issue7412@psf.upfronthosting.co.za> Message-ID: <1612376489.07.0.199576392772.issue7412@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:29 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:21:29 +0000 Subject: [issue6087] distutils.sysconfig.get_python_lib gives surprising result when used with a Python build In-Reply-To: <1242995950.24.0.540152639281.issue6087@psf.upfronthosting.co.za> Message-ID: <1612376489.68.0.388184639887.issue6087@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:31 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:21:31 +0000 Subject: [issue22888] ensurepip and distutils' build_scripts fails on Windows when path to Python contains accented characters In-Reply-To: <1416189805.26.0.501870497437.issue22888@psf.upfronthosting.co.za> Message-ID: <1612376491.34.0.00859838464585.issue22888@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:25 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:21:25 +0000 Subject: [issue26876] Extend MSVCCompiler class to respect environment variables In-Reply-To: <1461866719.82.0.2605655084.issue26876@psf.upfronthosting.co.za> Message-ID: <1612376485.42.0.015176522562.issue26876@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:24 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:21:24 +0000 Subject: [issue29895] Distutils blows up with an incorrect pypirc, should be caught In-Reply-To: <1490365473.69.0.662081207985.issue29895@psf.upfronthosting.co.za> Message-ID: <1612376484.38.0.427013703762.issue29895@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:30 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:21:30 +0000 Subject: [issue28209] Exe or MSI unable to find Py3.5 In-Reply-To: <1474324486.65.0.502468498808.issue28209@psf.upfronthosting.co.za> Message-ID: <1612376490.34.0.0943573042757.issue28209@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:27 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:21:27 +0000 Subject: [issue28981] distutils/check.py overzealous catch block hides errors In-Reply-To: <1481825288.28.0.614509725219.issue28981@psf.upfronthosting.co.za> Message-ID: <1612376487.4.0.333553276112.issue28981@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:27 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:21:27 +0000 Subject: [issue26786] bdist_msi duplicates directories with names in ALL CAPS to a bogus location In-Reply-To: <1460844390.43.0.520967711704.issue26786@psf.upfronthosting.co.za> Message-ID: <1612376487.99.0.735404154403.issue26786@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:30 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:21:30 +0000 Subject: [issue27919] Deprecate and remove extra_path distribution kwarg In-Reply-To: <1472670374.61.0.857588658064.issue27919@psf.upfronthosting.co.za> Message-ID: <1612376490.93.0.63923625521.issue27919@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:45 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:21:45 +0000 Subject: [issue25544] cleanup temporary files in distutils.has_function In-Reply-To: <1446560146.63.0.814875607484.issue25544@psf.upfronthosting.co.za> Message-ID: <1612376505.09.0.529934808791.issue25544@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:53 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:21:53 +0000 Subject: [issue25392] setup.py --quiet doesn't silence "no previously-included directories" warnings from MANIFEST.in In-Reply-To: <1444736729.8.0.451337139853.issue25392@psf.upfronthosting.co.za> Message-ID: <1612376513.7.0.450322378816.issue25392@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:54 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:21:54 +0000 Subject: [issue26872] Default ConfigParser in python is not able to load values habing percent in them In-Reply-To: <1461790285.78.0.75016384493.issue26872@psf.upfronthosting.co.za> Message-ID: <1612376514.21.0.713838779496.issue26872@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:52 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:21:52 +0000 Subject: [issue27123] Allow `install_headers` command to follow specific directory structure In-Reply-To: <1464186275.75.0.908359845764.issue27123@psf.upfronthosting.co.za> Message-ID: <1612376512.53.0.488166406177.issue27123@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:55 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 03 Feb 2021 18:21:55 +0000 Subject: [issue16202] sys.path[0] security issues In-Reply-To: <1349986223.57.0.879834971708.issue16202@psf.upfronthosting.co.za> Message-ID: <1612376515.38.0.040270189914.issue16202@roundup.psfhosted.org> Change by Christian Heimes : ---------- components: -Distutils resolution: out of date -> stage: resolved -> status: closed -> open versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:53 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:21:53 +0000 Subject: [issue27317] Handling data_files: too much is removed in uninstall In-Reply-To: <1465904970.17.0.774152551079.issue27317@psf.upfronthosting.co.za> Message-ID: <1612376513.1.0.712279246789.issue27317@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:48 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:21:48 +0000 Subject: [issue26689] Add `has_flag` method to `distutils.CCompiler` In-Reply-To: <1459643481.74.0.720699620632.issue26689@psf.upfronthosting.co.za> Message-ID: <1612376508.74.0.321015781792.issue26689@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:21:51 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:21:51 +0000 Subject: [issue8027] distutils fail to determine c++ linker with unixcompiler if using ccache In-Reply-To: <1267284243.46.0.756608052144.issue8027@psf.upfronthosting.co.za> Message-ID: <1612376511.73.0.471383445111.issue8027@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:26:06 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:26:06 +0000 Subject: [issue6792] Distutils-based installer does not detect 64bit versions of Python In-Reply-To: <1251449540.11.0.0670330819334.issue6792@psf.upfronthosting.co.za> Message-ID: <1612376766.87.0.568709051865.issue6792@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:26:17 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:26:17 +0000 Subject: [issue25187] bdist_rpm fails due to wrong hardcoded assumption about RPM filename format In-Reply-To: <1442715156.03.0.0265256317041.issue25187@psf.upfronthosting.co.za> Message-ID: <1612376777.23.0.861453444151.issue25187@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:26:17 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:26:17 +0000 Subject: [issue25627] distutils : file "bdist_rpm.py" does not quote filenames when executing the rpm command In-Reply-To: <1447535612.69.0.122030151224.issue25627@psf.upfronthosting.co.za> Message-ID: <1612376777.32.0.333952815036.issue25627@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:26:20 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:26:20 +0000 Subject: [issue25531] greenlet header file is missing inside virtualenv In-Reply-To: <1446407383.6.0.829207834021.issue25531@psf.upfronthosting.co.za> Message-ID: <1612376780.63.0.559908641238.issue25531@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:26:19 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:26:19 +0000 Subject: [issue20337] bdist_rpm should support %config(noreplace) In-Reply-To: <1390343812.97.0.521102464448.issue20337@psf.upfronthosting.co.za> Message-ID: <1612376779.02.0.662304018202.issue20337@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:26:20 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:26:20 +0000 Subject: [issue25100] Test_distutils fails instead of skipping if no VS2015 In-Reply-To: <1442205767.42.0.746068733086.issue25100@psf.upfronthosting.co.za> Message-ID: <1612376780.83.0.576815414765.issue25100@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:26:08 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:26:08 +0000 Subject: [issue26790] bdist_msi package duplicates everything to a bogus location when run with /passive or /q In-Reply-To: <1460909520.55.0.0242536179929.issue26790@psf.upfronthosting.co.za> Message-ID: <1612376768.15.0.128914660206.issue26790@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:26:22 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:26:22 +0000 Subject: [issue7546] msvc9compiler.py: add .asm extension In-Reply-To: <1261241045.73.0.563579401037.issue7546@psf.upfronthosting.co.za> Message-ID: <1612376782.68.0.871991425183.issue7546@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:26:20 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:26:20 +0000 Subject: [issue25385] Spurious warning when compiling extension module In-Reply-To: <1444671317.42.0.28476348382.issue25385@psf.upfronthosting.co.za> Message-ID: <1612376780.7.0.623527538231.issue25385@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:26:25 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:26:25 +0000 Subject: [issue24239] Allow to configure which gpg to use in distutils upload In-Reply-To: <1432040808.9.0.641361051221.issue24239@psf.upfronthosting.co.za> Message-ID: <1612376785.68.0.233140241547.issue24239@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:26:19 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:26:19 +0000 Subject: [issue26425] 'TypeError: object of type 'NoneType' has no len()' in 'splitdrive' In-Reply-To: <1456308879.88.0.0764113291168.issue26425@psf.upfronthosting.co.za> Message-ID: <1612376779.03.0.0874157715531.issue26425@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:26:24 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:26:24 +0000 Subject: [issue24673] distutils/_msvccompiler does not remove /DLL during link(CCompiler.EXECUTABLE) In-Reply-To: <1437390319.85.0.740517640624.issue24673@psf.upfronthosting.co.za> Message-ID: <1612376784.09.0.219888686987.issue24673@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:26:27 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:26:27 +0000 Subject: [issue18654] modernize mingw&cygwin compiler classes In-Reply-To: <1375621500.14.0.511859388859.issue18654@psf.upfronthosting.co.za> Message-ID: <1612376787.75.0.814203860913.issue18654@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:26:31 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:26:31 +0000 Subject: [issue13719] bdist_msi upload fails In-Reply-To: <1325855918.9.0.207720990162.issue13719@psf.upfronthosting.co.za> Message-ID: <1612376791.2.0.858166898106.issue13719@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:26:25 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:26:25 +0000 Subject: [issue24591] offer option to suppress "clean --all" output relating to nonexistent dirs In-Reply-To: <1436369598.14.0.821351953958.issue24591@psf.upfronthosting.co.za> Message-ID: <1612376785.68.0.377252275529.issue24591@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:26:27 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:26:27 +0000 Subject: [issue16108] Include maintainer information in register/upload In-Reply-To: <1349154240.01.0.151032575778.issue16108@psf.upfronthosting.co.za> Message-ID: <1612376787.79.0.675857367362.issue16108@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:26:33 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:26:33 +0000 Subject: [issue16779] Fix compiler warning when building extension modules on 64-bit Windows In-Reply-To: <1356460734.84.0.660480375945.issue16779@psf.upfronthosting.co.za> Message-ID: <1612376793.06.0.274529502417.issue16779@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:26:27 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:26:27 +0000 Subject: [issue6377] distutils compiler switch ignored In-Reply-To: <1246299740.9.0.786372120366.issue6377@psf.upfronthosting.co.za> Message-ID: <1612376787.98.0.0369771783913.issue6377@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: accepted -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:26:35 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:26:35 +0000 Subject: [issue21821] The function cygwinccompiler.is_cygwingcc leads to FileNotFoundError under Windows 7 In-Reply-To: <1403361356.73.0.508496637116.issue21821@psf.upfronthosting.co.za> Message-ID: <1612376795.67.0.647218756244.issue21821@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:26:31 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:26:31 +0000 Subject: [issue7562] Custom order for the subcommands of build In-Reply-To: <1261492513.72.0.435888181618.issue7562@psf.upfronthosting.co.za> Message-ID: <1612376791.19.0.358666399455.issue7562@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:26:36 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:26:36 +0000 Subject: [issue22309] distutils/spawn.py handle fork() not implemented. In-Reply-To: <1409433037.52.0.225577593966.issue22309@psf.upfronthosting.co.za> Message-ID: <1612376796.45.0.416205510138.issue22309@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:26:37 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:26:37 +0000 Subject: [issue2200] find_executable fails to find .bat files on win32 In-Reply-To: <1204206733.81.0.37749013909.issue2200@psf.upfronthosting.co.za> Message-ID: <1612376797.25.0.792502018212.issue2200@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: accepted -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:26:37 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:26:37 +0000 Subject: [issue8170] Wrong Paths for distutils build --plat-name=win-amd64 In-Reply-To: <1268913333.33.0.305416760988.issue8170@psf.upfronthosting.co.za> Message-ID: <1612376797.98.0.267381253893.issue8170@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:26:29 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:26:29 +0000 Subject: [issue22990] bdist installation dialog In-Reply-To: <1417646795.33.0.270415129525.issue22990@psf.upfronthosting.co.za> Message-ID: <1612376789.89.0.466518888889.issue22990@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:26:31 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:26:31 +0000 Subject: [issue20106] warn_dir is always true for install_data, even if an install_dir is specified In-Reply-To: <1388657979.45.0.323765356952.issue20106@psf.upfronthosting.co.za> Message-ID: <1612376791.12.0.0263764501795.issue20106@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:28:59 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:28:59 +0000 Subject: [issue818201] distutils: clean does not use build_base option from build Message-ID: <1612376939.57.0.979996690997.issue818201@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:29:01 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:29:01 +0000 Subject: [issue21749] pkgutil ImpLoader does not support frozen modules In-Reply-To: <1402668511.45.0.703803525132.issue21749@psf.upfronthosting.co.za> Message-ID: <1612376941.22.0.968158332964.issue21749@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:29:00 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:29:00 +0000 Subject: [issue2437] Distutils runtime_library_dirs broken on Windows In-Reply-To: <1206044595.46.0.100105317073.issue2437@psf.upfronthosting.co.za> Message-ID: <1612376940.15.0.995336214625.issue2437@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:29:00 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:29:00 +0000 Subject: [issue12259] Document which compilers can be created on which platform In-Reply-To: <1307121595.57.0.945178123037.issue12259@psf.upfronthosting.co.za> Message-ID: <1612376940.68.0.26773971235.issue12259@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:29:02 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:29:02 +0000 Subject: [issue21410] setup.py check --restructuredtext -- appears to pass if docutils not installed In-Reply-To: <1398976049.52.0.00446636547039.issue21410@psf.upfronthosting.co.za> Message-ID: <1612376942.26.0.131882452522.issue21410@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:29:01 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:29:01 +0000 Subject: [issue21453] Support of RPM subpackages in distutils In-Reply-To: <1399570920.1.0.821068791606.issue21453@psf.upfronthosting.co.za> Message-ID: <1612376941.75.0.584717897329.issue21453@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:29:03 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:29:03 +0000 Subject: [issue1887] Document that distutils doesn't support out-of-source builds In-Reply-To: <1200961919.23.0.699852435444.issue1887@psf.upfronthosting.co.za> Message-ID: <1612376943.32.0.6233852921.issue1887@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:28:58 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:28:58 +0000 Subject: [issue644744] bdist_rpm fails when installing man pages Message-ID: <1612376938.98.0.988787009223.issue644744@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:29:03 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:29:03 +0000 Subject: [issue809163] Can't add files with spaces under bdist_rpm Message-ID: <1612376943.87.0.96660180592.issue809163@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:29:04 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:29:04 +0000 Subject: [issue8763] py3K bdist_msi wrongly installs itself in ALL python versions In-Reply-To: <1274264391.85.0.389216005018.issue8763@psf.upfronthosting.co.za> Message-ID: <1612376944.43.0.966067746194.issue8763@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:29:05 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:29:05 +0000 Subject: [issue7677] upload: improve display for error messages from gpg In-Reply-To: <1263223354.89.0.290474495181.issue7677@psf.upfronthosting.co.za> Message-ID: <1612376945.51.0.650662188548.issue7677@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:29:04 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:29:04 +0000 Subject: [issue6145] distutils.extension.read_setup_file misinterprets -C switch In-Reply-To: <1243634822.12.0.843073903173.issue6145@psf.upfronthosting.co.za> Message-ID: <1612376944.96.0.276261093026.issue6145@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:29:07 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:29:07 +0000 Subject: [issue5926] bdist_msi: add support for minimum Python version for pure Python projects In-Reply-To: <1241465384.5.0.639061880588.issue5926@psf.upfronthosting.co.za> Message-ID: <1612376947.14.0.406958104594.issue5926@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:29:06 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:29:06 +0000 Subject: [issue20212] distutils: fix build_ext check to find whether we're building Python or not In-Reply-To: <1389308587.95.0.49928374838.issue20212@psf.upfronthosting.co.za> Message-ID: <1612376946.05.0.952296073253.issue20212@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:29:07 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:29:07 +0000 Subject: [issue5936] Add MSI suport for uninstalling individual versions In-Reply-To: <1241490601.47.0.970158126843.issue5936@psf.upfronthosting.co.za> Message-ID: <1612376947.68.0.499041756495.issue5936@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:29:08 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:29:08 +0000 Subject: [issue2942] mingw/cygwin do not accept asm file as extension source In-Reply-To: <1211451880.92.0.894703588073.issue2942@psf.upfronthosting.co.za> Message-ID: <1612376948.21.0.626510566373.issue2942@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:29:06 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:29:06 +0000 Subject: [issue6040] bdist_msi does not deal with pre-release version In-Reply-To: <1242472106.67.0.523299229524.issue6040@psf.upfronthosting.co.za> Message-ID: <1612376946.61.0.192192493741.issue6040@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:29:09 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:29:09 +0000 Subject: [issue5300] distutils should preserve +x bit on data files In-Reply-To: <1234907694.25.0.317480697226.issue5300@psf.upfronthosting.co.za> Message-ID: <1612376949.33.0.817267508719.issue5300@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:29:08 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:29:08 +0000 Subject: [issue11723] Add support for mingw64 compiler In-Reply-To: <1301503307.11.0.347710648609.issue11723@psf.upfronthosting.co.za> Message-ID: <1612376948.75.0.589397773348.issue11723@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:29:09 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:29:09 +0000 Subject: [issue5572] distutils should respect the LIBS configure env var In-Reply-To: <1238095013.07.0.627782689433.issue5572@psf.upfronthosting.co.za> Message-ID: <1612376949.99.0.20140985776.issue5572@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:29:16 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:29:16 +0000 Subject: [issue1109658] distutils dry-run breaks when attempting to bytecompile Message-ID: <1612376956.96.0.175215116594.issue1109658@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:29:19 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:29:19 +0000 Subject: [issue8501] setup.py install --dry-run option doesn't work In-Reply-To: <1271972145.51.0.00309332974734.issue8501@psf.upfronthosting.co.za> Message-ID: <1612376959.99.0.795005172168.issue8501@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:29:02 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:29:02 +0000 Subject: [issue21409] setup.py check - should fail and retrun a non 0 exit code In-Reply-To: <1398974831.77.0.0130360706808.issue21409@psf.upfronthosting.co.za> Message-ID: <1612376942.79.0.394296272897.issue21409@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:29:23 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:29:23 +0000 Subject: [issue7219] Unhelpful error message when a distutils package install fails due to a permissions error In-Reply-To: <1256647071.1.0.815334810123.issue7219@psf.upfronthosting.co.za> Message-ID: <1612376963.14.0.378842301043.issue7219@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:30:35 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:30:35 +0000 Subject: [issue20705] distutils.extension.Extension with empty 'sources' list In-Reply-To: <1392923294.74.0.945315907553.issue20705@psf.upfronthosting.co.za> Message-ID: <1612377035.38.0.55907903838.issue20705@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:30:38 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:30:38 +0000 Subject: [issue18640] mingw: generalization of posix build in distutils/sysconfig.py In-Reply-To: <1375472959.93.0.699092056169.issue18640@psf.upfronthosting.co.za> Message-ID: <1612377038.49.0.0216269497032.issue18640@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:30:38 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:30:38 +0000 Subject: [issue18639] mingw: avoid circular dependency from time module during native build of extentions In-Reply-To: <1375472743.5.0.167328971816.issue18639@psf.upfronthosting.co.za> Message-ID: <1612377038.04.0.333345050444.issue18639@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:30:38 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:30:38 +0000 Subject: [issue1052827] filelist.findall should not fail on dangling symlinks Message-ID: <1612377038.87.0.369072815562.issue1052827@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:30:39 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:30:39 +0000 Subject: [issue14030] Be more careful about selecting the compiler in distutils In-Reply-To: <1329385035.22.0.0715283153402.issue14030@psf.upfronthosting.co.za> Message-ID: <1612377039.28.0.374411927078.issue14030@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:30:39 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:30:39 +0000 Subject: [issue832159] Bad value for Mingw32Compiler.compiler_cxx Message-ID: <1612377039.68.0.412546909502.issue832159@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:30:34 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:30:34 +0000 Subject: [issue19549] PKG-INFO is created with CRLF on Windows In-Reply-To: <1384145228.19.0.594572636685.issue19549@psf.upfronthosting.co.za> Message-ID: <1612377034.02.0.403111632445.issue19549@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:30:34 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:30:34 +0000 Subject: [issue20819] reinitialize_command doesn't clear install_lib on install and install_lib commands In-Reply-To: <1393720136.29.0.00108856788876.issue20819@psf.upfronthosting.co.za> Message-ID: <1612377034.45.0.0639601870573.issue20819@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:30:37 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:30:37 +0000 Subject: [issue11928] fail on filename with space at the end In-Reply-To: <1303836707.17.0.285457821827.issue11928@psf.upfronthosting.co.za> Message-ID: <1612377037.59.0.815613596247.issue11928@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:30:34 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:30:34 +0000 Subject: [issue20788] distutils.msvccompiler - flags are hidden inside initialize() In-Reply-To: <1393454229.75.0.568305276882.issue20788@psf.upfronthosting.co.za> Message-ID: <1612377034.93.0.520529794156.issue20788@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:30:33 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:30:33 +0000 Subject: [issue18970] run_setup() behavior differs from cli invocation of setup.py In-Reply-To: <1378647391.64.0.940770484425.issue18970@psf.upfronthosting.co.za> Message-ID: <1612377033.49.0.429506339476.issue18970@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:30:37 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:30:37 +0000 Subject: [issue16472] Distutils+mingw links agains msvcr90, while python27.dll is linked agains msvcrt In-Reply-To: <1352900041.91.0.554679168644.issue16472@psf.upfronthosting.co.za> Message-ID: <1612377037.16.0.467392526991.issue16472@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:30:35 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:30:35 +0000 Subject: [issue1254718] GCC detection for runtime_library_dirs when ccache is used Message-ID: <1612377035.82.0.411498235996.issue1254718@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:30:36 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:30:36 +0000 Subject: [issue12585] distutils dereferences symlinks for zip but not for bztar/gztar target In-Reply-To: <1311084837.3.0.496870465183.issue12585@psf.upfronthosting.co.za> Message-ID: <1612377036.71.0.747136648772.issue12585@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:30:40 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:30:40 +0000 Subject: [issue4010] configure options don't trickle down to distutils In-Reply-To: <1222879433.22.0.765704464081.issue4010@psf.upfronthosting.co.za> Message-ID: <1612377040.49.0.211977075189.issue4010@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:30:40 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:30:40 +0000 Subject: [issue17144] Distutils: "sdist register upload" ignores -r argument In-Reply-To: <1360167032.54.0.0794749413911.issue17144@psf.upfronthosting.co.za> Message-ID: <1612377040.14.0.949866043408.issue17144@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:30:36 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:30:36 +0000 Subject: =?utf-8?q?=5Bissue13943=5D_distutils=E2=80=99_build=5Fpy_fails_when_packa?= =?utf-8?q?ge_string_is_unicode?= In-Reply-To: <1328388068.27.0.743003863578.issue13943@psf.upfronthosting.co.za> Message-ID: <1612377036.31.0.809541301828.issue13943@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:37:41 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:37:41 +0000 Subject: [issue13486] msvc9compiler.py doesn't properly generate manifest files. In-Reply-To: <1322344783.33.0.460870481781.issue13486@psf.upfronthosting.co.za> Message-ID: <1612377461.84.0.497252510834.issue13486@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:37:35 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:37:35 +0000 Subject: [issue16466] register command forgets password if no config file is created In-Reply-To: <1352829759.7.0.8937255807.issue16466@psf.upfronthosting.co.za> Message-ID: <1612377455.03.0.0656060098997.issue16466@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:37:38 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:37:38 +0000 Subject: [issue8954] wininst regression: errors when building on linux In-Reply-To: <1276093244.44.0.895217979727.issue8954@psf.upfronthosting.co.za> Message-ID: <1612377458.88.0.815217003482.issue8954@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:37:35 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:37:35 +0000 Subject: [issue15205] distutils dereferences symlinks on Mac OS X but not on Linux In-Reply-To: <1340801621.17.0.778641533675.issue15205@psf.upfronthosting.co.za> Message-ID: <1612377455.77.0.54141294809.issue15205@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:37:43 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:37:43 +0000 Subject: [issue7509] AttributeError: MSVCCompiler instance has no attribute '_MSVCCompiler__root' In-Reply-To: <1260858289.28.0.0186938090611.issue7509@psf.upfronthosting.co.za> Message-ID: <1612377463.81.0.543517677108.issue7509@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: accepted -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:37:36 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:37:36 +0000 Subject: [issue11600] PY_CFLAGS and PY_CPPFLAGS inconsistent In-Reply-To: <1300474039.66.0.607700128709.issue11600@psf.upfronthosting.co.za> Message-ID: <1612377456.48.0.896919336644.issue11600@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:37:45 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:37:45 +0000 Subject: [issue11376] Solaris/GCC/shared lib problem In-Reply-To: <1299082769.75.0.912514538655.issue11376@psf.upfronthosting.co.za> Message-ID: <1612377465.01.0.943129775231.issue11376@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:37:41 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:37:41 +0000 Subject: [issue14530] distutils's build_wininst command fails to correctly interpret the data_files argument In-Reply-To: <1333907900.33.0.191070589139.issue14530@psf.upfronthosting.co.za> Message-ID: <1612377461.14.0.454178698296.issue14530@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:37:34 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:37:34 +0000 Subject: [issue15182] find_library_file() should try to link In-Reply-To: <1340631736.41.0.714328941122.issue15182@psf.upfronthosting.co.za> Message-ID: <1612377454.39.0.397571968021.issue15182@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:37:44 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:37:44 +0000 Subject: [issue11472] upload command fails to read auth information from .pypirc In-Reply-To: <1299882429.66.0.49580074551.issue11472@psf.upfronthosting.co.za> Message-ID: <1612377464.4.0.999406863594.issue11472@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:37:43 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:37:43 +0000 Subject: [issue1112955] move_file()'s return value when dry_run=1 unclear Message-ID: <1612377463.18.0.204565257953.issue1112955@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:37:45 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:37:45 +0000 Subject: [issue6863] Wrong linker command if CXX set to "ccache g++" In-Reply-To: <1252415139.67.0.192610915526.issue6863@psf.upfronthosting.co.za> Message-ID: <1612377465.64.0.5875958878.issue6863@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:37:40 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:37:40 +0000 Subject: [issue14529] distutils's build_msi command ignores the data_files argument In-Reply-To: <1333907359.21.0.0116056941941.issue14529@psf.upfronthosting.co.za> Message-ID: <1612377460.4.0.176358705048.issue14529@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:37:46 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:37:46 +0000 Subject: [issue2624] swig support in distutils should use the build and temp dirs In-Reply-To: <1208004805.0.0.253675871958.issue2624@psf.upfronthosting.co.za> Message-ID: <1612377466.34.0.0453106996606.issue2624@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:37:42 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:37:42 +0000 Subject: [issue9995] "setup.py register sdist upload" requires pass to be saved In-Reply-To: <1285838842.84.0.5702466564.issue9995@psf.upfronthosting.co.za> Message-ID: <1612377462.51.0.78612305825.issue9995@roundup.psfhosted.org> Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If you believe it still requires a fix, most likely the issue should be re-reported at https://github.com/pypa/setuptools ---------- nosy: +steve.dower resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 13:59:10 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 18:59:10 +0000 Subject: [issue41282] Deprecate and remove distutils In-Reply-To: <1594542625.3.0.789939298104.issue41282@roundup.psfhosted.org> Message-ID: <1612378750.84.0.784734884088.issue41282@roundup.psfhosted.org> Steve Dower added the comment: Everyone probably noticed, but I closed all the other distutils-tagged issues (as stated in the PEP), so now this is the only one left. Anything new that is opened that relates to distutils either needs to be a release blocker (very unlikely), or closed and directed to setuptools instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 14:11:17 2021 From: report at bugs.python.org (Jeffrey Armstrong) Date: Wed, 03 Feb 2021 19:11:17 +0000 Subject: [issue11723] Add support for mingw64 compiler In-Reply-To: <1301503307.11.0.347710648609.issue11723@psf.upfronthosting.co.za> Message-ID: <1612379477.49.0.0493951253429.issue11723@roundup.psfhosted.org> Change by Jeffrey Armstrong : ---------- nosy: -Jeffrey.Armstrong _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 14:12:12 2021 From: report at bugs.python.org (Jeffrey Armstrong) Date: Wed, 03 Feb 2021 19:12:12 +0000 Subject: [issue17226] libintl should also check for libiconv In-Reply-To: <1361203207.64.0.112739633546.issue17226@psf.upfronthosting.co.za> Message-ID: <1612379532.12.0.676505517648.issue17226@roundup.psfhosted.org> Change by Jeffrey Armstrong : ---------- nosy: -Jeffrey.Armstrong _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 14:24:48 2021 From: report at bugs.python.org (Mariusz Felisiak) Date: Wed, 03 Feb 2021 19:24:48 +0000 Subject: [issue20408] memoryview() constructor documentation error In-Reply-To: <1390823591.54.0.904712473888.issue20408@psf.upfronthosting.co.za> Message-ID: <1612380288.84.0.01152653215.issue20408@roundup.psfhosted.org> Change by Mariusz Felisiak : ---------- nosy: +felixxm nosy_count: 6.0 -> 7.0 pull_requests: +23241 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/24431 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 14:41:22 2021 From: report at bugs.python.org (Spencer Nelson) Date: Wed, 03 Feb 2021 19:41:22 +0000 Subject: [issue43119] asyncio.Queue.put never yields if the queue is unbounded Message-ID: <1612381282.49.0.371079618361.issue43119@roundup.psfhosted.org> New submission from Spencer Nelson : I am writing some software that reads records from a very large file (~hundreds of GB), putting them in an `asyncio.Queue` as it goes, and a chain of consumers handle each record and do stuff over the network. To my surprise, my program runs out of memory because the Queue producer coroutine never yields control. I think (but am not sure) that the asyncio.Queue.put method has no preemption point if the queue is not full; I was using an unbounded Queue, so it was _never_ full, so my coroutine was never unscheduled. I have attached a file with a minimal reproducer. It creates an unbounded queue. A 'publish' task calls `queue.put` from an infinite sequence. A 'subscribe' task calls `queue.get`, and prints each item. Nothing gets printed if I run this, because the `queue.put` never blocks. I would expect that `await queue.put` would occasionally cede execution to any other runnable coroutines, even if the queue is unbounded. ---------- components: asyncio files: never_yields.py messages: 386454 nosy: asvetlov, spenczar, yselivanov priority: normal severity: normal status: open title: asyncio.Queue.put never yields if the queue is unbounded type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file49789/never_yields.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 15:12:04 2021 From: report at bugs.python.org (Aaron Meurer) Date: Wed, 03 Feb 2021 20:12:04 +0000 Subject: [issue21821] The function cygwinccompiler.is_cygwingcc leads to FileNotFoundError under Windows 7 In-Reply-To: <1403361356.73.0.508496637116.issue21821@psf.upfronthosting.co.za> Message-ID: <1612383124.37.0.835223713124.issue21821@roundup.psfhosted.org> Aaron Meurer added the comment: Is find_executable() going to be extracted from distutils to somewhere else? It's one of those functions that is useful outside of packaging, and indeed, I've seen it imported in quite a few codes that aren't related to packaging. If so, the patch I mentioned could still be relevant for it (if it hasn't been fixed already). ---------- nosy: +asmeurer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 15:17:43 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 03 Feb 2021 20:17:43 +0000 Subject: [issue43120] Some OSX syslog facilities are missing from syslog module Message-ID: <1612383463.54.0.705802596515.issue43120@roundup.psfhosted.org> New submission from Ronald Oussoren : The following syslog facility constants on macOS are missing from the syslog module: * LOG_FTP * LOG_NETINFO * LOG_REMOTEAUTH * LOG_INSTALL * LOG_RAS * LOG_LAUNCHD I'm working on a PR ---------- components: Extension Modules, macOS messages: 386456 nosy: ned.deily, ronaldoussoren priority: normal severity: normal stage: needs patch status: open title: Some OSX syslog facilities are missing from syslog module type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 15:34:01 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 03 Feb 2021 20:34:01 +0000 Subject: [issue43120] Some OSX syslog facilities are missing from syslog module In-Reply-To: <1612383463.54.0.705802596515.issue43120@roundup.psfhosted.org> Message-ID: <1612384441.49.0.450166103911.issue43120@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- keywords: +patch pull_requests: +23242 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/24432 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 15:36:03 2021 From: report at bugs.python.org (E. Paine) Date: Wed, 03 Feb 2021 20:36:03 +0000 Subject: [issue42278] Remove usage of tempfile.mktemp in stdlib In-Reply-To: <1604674672.14.0.368213492276.issue42278@roundup.psfhosted.org> Message-ID: <1612384563.22.0.521899198617.issue42278@roundup.psfhosted.org> Change by E. Paine : ---------- components: -Distutils resolution: out of date -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 15:41:38 2021 From: report at bugs.python.org (Spencer Nelson) Date: Wed, 03 Feb 2021 20:41:38 +0000 Subject: [issue43119] asyncio.Queue.put never yields if the queue is unbounded In-Reply-To: <1612381282.49.0.371079618361.issue43119@roundup.psfhosted.org> Message-ID: <1612384898.81.0.855418305705.issue43119@roundup.psfhosted.org> Change by Spencer Nelson : ---------- keywords: +patch pull_requests: +23243 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24433 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 16:05:50 2021 From: report at bugs.python.org (Andre Roberge) Date: Wed, 03 Feb 2021 21:05:50 +0000 Subject: [issue43121] Incorrect SyntaxError message for missing comma (3.10.a5) Message-ID: <1612386350.35.0.116114193403.issue43121@roundup.psfhosted.org> New submission from Andre Roberge : A missing comma between list items results in an incorrect message. Python 3.10.0a5 (tags/v3.10.0a5:b0478d7, Feb 3 2021, 01:44:54) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> a = [1, 2 3] File "", line 1 a = [1, 2 3] ^ SyntaxError: did you forget parentheses around the comprehension target? ---------- messages: 386457 nosy: aroberge priority: normal severity: normal status: open title: Incorrect SyntaxError message for missing comma (3.10.a5) type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 16:13:22 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 03 Feb 2021 21:13:22 +0000 Subject: [issue43121] Incorrect SyntaxError message for missing comma (3.10.a5) In-Reply-To: <1612386350.35.0.116114193403.issue43121@roundup.psfhosted.org> Message-ID: <1612386802.78.0.203041763965.issue43121@roundup.psfhosted.org> Change by Irit Katriel : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 16:42:22 2021 From: report at bugs.python.org (Tom Birch) Date: Wed, 03 Feb 2021 21:42:22 +0000 Subject: [issue42616] C Extensions on Darwin that link against libpython are likely to crash In-Reply-To: <1607631684.88.0.776282381427.issue42616@roundup.psfhosted.org> Message-ID: <1612388542.76.0.955788730679.issue42616@roundup.psfhosted.org> Tom Birch added the comment: Steve Dower: this issue is independent of distutils, reopening ---------- components: -Distutils status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 16:44:00 2021 From: report at bugs.python.org (Tom Birch) Date: Wed, 03 Feb 2021 21:44:00 +0000 Subject: [issue42616] C Extensions on Darwin that link against libpython are likely to crash In-Reply-To: <1607631684.88.0.776282381427.issue42616@roundup.psfhosted.org> Message-ID: <1612388640.42.0.448665939081.issue42616@roundup.psfhosted.org> Change by Tom Birch : ---------- components: +C API, Extension Modules _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 16:44:38 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 21:44:38 +0000 Subject: [issue21821] The function cygwinccompiler.is_cygwingcc leads to FileNotFoundError under Windows 7 In-Reply-To: <1403361356.73.0.508496637116.issue21821@psf.upfronthosting.co.za> Message-ID: <1612388678.01.0.839637978022.issue21821@roundup.psfhosted.org> Steve Dower added the comment: shutil.which is the supported replacement for that function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 17:24:05 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 03 Feb 2021 22:24:05 +0000 Subject: [issue43121] Incorrect SyntaxError message for missing comma (3.10.a5) In-Reply-To: <1612386350.35.0.116114193403.issue43121@roundup.psfhosted.org> Message-ID: <1612391045.53.0.825049428761.issue43121@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Thanks Andre for the report. Will fix it soon ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 17:33:17 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 03 Feb 2021 22:33:17 +0000 Subject: [issue43121] Incorrect SyntaxError message for missing comma (3.10.a5) In-Reply-To: <1612386350.35.0.116114193403.issue43121@roundup.psfhosted.org> Message-ID: <1612391597.78.0.304719714577.issue43121@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +23244 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24436 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 17:35:25 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 03 Feb 2021 22:35:25 +0000 Subject: [issue43121] Incorrect SyntaxError message for missing comma (3.10.a5) In-Reply-To: <1612386350.35.0.116114193403.issue43121@roundup.psfhosted.org> Message-ID: <1612391725.33.0.580510967175.issue43121@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Andre, could you check if this works in your test suite correctly? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 17:37:32 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Feb 2021 22:37:32 +0000 Subject: [issue43110] import aiohttp crash closes Python from Windows Installer In-Reply-To: <1612341091.34.0.557735217217.issue43110@roundup.psfhosted.org> Message-ID: <1612391852.48.0.305015635739.issue43110@roundup.psfhosted.org> Steve Dower added the comment: I just installed aiohttp into 3.10.0a5 without issue, though some packages did have to rebuild. I'm very much leaning towards marking this as external, but interested to hear whether Giovanni has done something different that should have worked. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 17:42:49 2021 From: report at bugs.python.org (Andre Roberge) Date: Wed, 03 Feb 2021 22:42:49 +0000 Subject: [issue43121] Incorrect SyntaxError message for missing comma (3.10.a5) In-Reply-To: <1612386350.35.0.116114193403.issue43121@roundup.psfhosted.org> Message-ID: <1612392169.23.0.586126510498.issue43121@roundup.psfhosted.org> Andre Roberge added the comment: Pablo: I have almost exactly the same 4 test cases that you added in the test suite, so it would pass my tests too. I would consider it to be resolved. (For example: https://aroberge.github.io/friendly-traceback-docs/docs/html/syntax_tracebacks_en_3.9.html#missing-comma-in-a-set -- although I need to fix the suggestions I offer in my own code as they are currently wrong.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 17:47:34 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 03 Feb 2021 22:47:34 +0000 Subject: [issue43121] Incorrect SyntaxError message for missing comma (3.10.a5) In-Reply-To: <1612386350.35.0.116114193403.issue43121@roundup.psfhosted.org> Message-ID: <1612392454.18.0.328775918229.issue43121@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Pablo: I have almost exactly the same 4 test cases that you added in the test suite, so it would pass my tests too. I would consider it to be resolved. Fantastic. Also, for the future, could you indicate how could I run the test suite of friendly-traceback? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 18:16:16 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Feb 2021 23:16:16 +0000 Subject: [issue42773] build.yml workflow not testing on pushes In-Reply-To: <1609194687.05.0.86275810312.issue42773@roundup.psfhosted.org> Message-ID: <1612394176.79.0.29885924887.issue42773@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +23245 pull_request: https://github.com/python/cpython/pull/24437 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 18:16:26 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Feb 2021 23:16:26 +0000 Subject: [issue42773] build.yml workflow not testing on pushes In-Reply-To: <1609194687.05.0.86275810312.issue42773@roundup.psfhosted.org> Message-ID: <1612394186.42.0.509390699855.issue42773@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +23246 pull_request: https://github.com/python/cpython/pull/24438 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 18:29:33 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 03 Feb 2021 23:29:33 +0000 Subject: [issue43121] Incorrect SyntaxError message for missing comma (3.10.a5) In-Reply-To: <1612386350.35.0.116114193403.issue43121@roundup.psfhosted.org> Message-ID: <1612394973.06.0.776319908207.issue43121@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset d4e6ed7e5fb43320ea714d7436bc11667c624d43 by Pablo Galindo in branch 'master': bpo-43121: Fix incorrect SyntaxError message for missing comma (GH-24436) https://github.com/python/cpython/commit/d4e6ed7e5fb43320ea714d7436bc11667c624d43 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 18:29:42 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 03 Feb 2021 23:29:42 +0000 Subject: [issue43121] Incorrect SyntaxError message for missing comma (3.10.a5) In-Reply-To: <1612386350.35.0.116114193403.issue43121@roundup.psfhosted.org> Message-ID: <1612394982.6.0.897667121528.issue43121@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 18:33:02 2021 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 03 Feb 2021 23:33:02 +0000 Subject: [issue43106] Some macOS open flags are missing from posixmodule.c In-Reply-To: <1612293989.13.0.0432139377352.issue43106@roundup.psfhosted.org> Message-ID: <1612395182.59.0.488646557714.issue43106@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset f917c243c52d62a787738379fb9b97acbed02c17 by Dong-hee Na in branch 'master': bpo-43106: Add os.O_EVTONLY/O_FSYNC/O_SYMLINK/O_NOFOLLOW_ANY (GH-24428) https://github.com/python/cpython/commit/f917c243c52d62a787738379fb9b97acbed02c17 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 18:34:24 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Feb 2021 23:34:24 +0000 Subject: [issue42773] build.yml workflow not testing on pushes In-Reply-To: <1609194687.05.0.86275810312.issue42773@roundup.psfhosted.org> Message-ID: <1612395264.51.0.328086355415.issue42773@roundup.psfhosted.org> miss-islington added the comment: New changeset d29dbb122d8b8ee22b2d826af4d234a2c2cf7ba2 by Miss Islington (bot) in branch '3.8': bpo-42773: fix tests not being run on pushes (GH-24004) https://github.com/python/cpython/commit/d29dbb122d8b8ee22b2d826af4d234a2c2cf7ba2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 18:39:02 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 03 Feb 2021 23:39:02 +0000 Subject: [issue42773] build.yml workflow not testing on pushes In-Reply-To: <1609194687.05.0.86275810312.issue42773@roundup.psfhosted.org> Message-ID: <1612395542.17.0.85166927436.issue42773@roundup.psfhosted.org> miss-islington added the comment: New changeset 0898dcb3a0400d3c93e27f9feb4c2207eb1a996d by Miss Islington (bot) in branch '3.9': bpo-42773: fix tests not being run on pushes (GH-24004) https://github.com/python/cpython/commit/0898dcb3a0400d3c93e27f9feb4c2207eb1a996d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 19:15:43 2021 From: report at bugs.python.org (Andre Roberge) Date: Thu, 04 Feb 2021 00:15:43 +0000 Subject: [issue43121] Incorrect SyntaxError message for missing comma (3.10.a5) In-Reply-To: <1612386350.35.0.116114193403.issue43121@roundup.psfhosted.org> Message-ID: <1612397743.76.0.674707599219.issue43121@roundup.psfhosted.org> Andre Roberge added the comment: Pablo: to run the friendly-traceback test suite is simply a matter of typing "pytest" from the root directory of the repository (after installing the dependencies). However, it would not be helpful for the purpose of CPython development, as likely more failing tests would be due to Friendly-traceback itself. As a first step, Friendly-traceback tries to make use of the information given by Python (for example, the new "expected ':'"); if it does not recognize the message, or if the message is "invalid syntax", it uses some heuristics to guess what might be the probable cause. Improvements to the messages given by CPython are likely going to initially result in failed tests for Friendly-traceback, whether the information provided by CPython is valid (most of the time) or not. The test suite I use includes things that I imagine a beginner might write. For example, using "else if" instead of "elif". With one of the newest additions of CPython ("expected ':'") which is accurate in most cases, this specific unit test would likely fail until I make the appropriate adjustement to Friendly-traceback. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 19:20:23 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 04 Feb 2021 00:20:23 +0000 Subject: [issue43121] Incorrect SyntaxError message for missing comma (3.10.a5) In-Reply-To: <1612386350.35.0.116114193403.issue43121@roundup.psfhosted.org> Message-ID: <1612398023.28.0.048301766905.issue43121@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Thanks Andre for the thorough explanation! The reason I was interested in running it myself is that as you are running on syntax errors, is a good corpus of things that fail with error messages, which is something that we have not been able to find as much as possible when trying new developments and proof of concepts. I am more interested in extracting the error cases and such so we can use them in future improvements. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 19:27:07 2021 From: report at bugs.python.org (Andre Roberge) Date: Thu, 04 Feb 2021 00:27:07 +0000 Subject: [issue43121] Incorrect SyntaxError message for missing comma (3.10.a5) In-Reply-To: <1612386350.35.0.116114193403.issue43121@roundup.psfhosted.org> Message-ID: <1612398427.99.0.660388666097.issue43121@roundup.psfhosted.org> Andre Roberge added the comment: Pablo: The tests are in https://github.com/aroberge/friendly-traceback/tree/master/tests/syntax I plan to soon add at least two dozen more based on recent contributions. The full results can be seen on the documentation site; for example https://aroberge.github.io/friendly-traceback-docs/docs/html/syntax_tracebacks_en_3.9.html I track changes in error messages from CPython: https://aroberge.github.io/friendly-traceback-docs/docs/html/compare.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 19:31:29 2021 From: report at bugs.python.org (Giovanni Wijaya) Date: Thu, 04 Feb 2021 00:31:29 +0000 Subject: [issue43110] import aiohttp crash closes Python from Windows Installer In-Reply-To: <1612341091.34.0.557735217217.issue43110@roundup.psfhosted.org> Message-ID: <1612398689.41.0.414513860212.issue43110@roundup.psfhosted.org> Giovanni Wijaya added the comment: I'm not sure whether aiohttp has released packages specifically for the alphas, but I tried rebuilding aiohttp and its extension modules and it currently works. Thank you for the solution. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 19:32:49 2021 From: report at bugs.python.org (Joshua Bronson) Date: Thu, 04 Feb 2021 00:32:49 +0000 Subject: [issue14757] INCA: Inline Caching meets Quickening in Python 3.3 In-Reply-To: <1336498675.39.0.776636251166.issue14757@psf.upfronthosting.co.za> Message-ID: <1612398769.42.0.307263385804.issue14757@roundup.psfhosted.org> Change by Joshua Bronson : ---------- nosy: +jab _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 20:03:35 2021 From: report at bugs.python.org (Kevin) Date: Thu, 04 Feb 2021 01:03:35 +0000 Subject: [issue43122] Python Launcher doesn't open a terminal window Message-ID: <1612400615.64.0.789800326005.issue43122@roundup.psfhosted.org> New submission from Kevin : Machine: new MacBook Air with M1 chip, running Big Sur Downloaded: Python versions 2.7, 3.8, and 3.9 Situation: Programs run just fine IF I run them out of a terminal window (/usr/local/bin/python name-of-python-program). Also programs that use Tkinter windows and don't require a terminal window for input or output run properly. Problem: Can't launch programs by double-clicking on them. When I try, Python Launcher starts and displays its preferences and there is a microsecond flash of something on the screen that appears to descend into the program icon that was clicked on. Note: Playing with a shebang in the program made no difference. Everything works fine when the programs are opened and run in IDLE. ---------- messages: 386473 nosy: kjw priority: normal severity: normal status: open title: Python Launcher doesn't open a terminal window type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 20:12:53 2021 From: report at bugs.python.org (Kubilay Kocak) Date: Thu, 04 Feb 2021 01:12:53 +0000 Subject: [issue43068] test_subprocess: test_specific_shell() fails on AMD64 FreeBSD Shared 3.x In-Reply-To: <1611956940.56.0.594651223595.issue43068@roundup.psfhosted.org> Message-ID: <1612401173.93.0.505364639705.issue43068@roundup.psfhosted.org> Kubilay Kocak added the comment: FreeBSD base was updated on the FreeBSD workers, between versions that changes the way the base curses library was built, and what it built. The net results was that any software (from ports) linked against base curses needed to be rebuilt, and until then would fail to load with the following error: ld-elf.so.1: Shared object "libncursesw.so.6" not found, required by "foo" The test suite should guard/test for the inability to execute (successfully load/run) the required commands/functions. The following tests also failed for the same reason: ====================================================================== ERROR: test_deactivate_with_strict_bash_opts (test.test_venv.BasicTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.9.koobs-freebsd-564d/build/Lib/test/test_venv.py", line 391, in test_deactivate_with_strict_bash_opts out, err = check_output([bash, test_script]) File "/usr/home/buildbot/python/3.9.koobs-freebsd-564d/build/Lib/test/test_venv.py", line 44, in check_output raise subprocess.CalledProcessError( subprocess.CalledProcessError: Command '['/usr/local/bin/bash', '/var/tmp/tmprk2_yuoe/test_strict.sh']' returned non-zero exit status 1. 0:14:07 load avg: 1.31 Re-running test_gdb in verbose mode test test_gdb crashed -- Traceback (most recent call last): File "/usr/home/buildbot/python/3.9.koobs-freebsd-564d/build/Lib/test/libregrtest/runtest.py", line 270, in _runtest_inner refleak = _runtest_inner2(ns, test_name) File "/usr/home/buildbot/python/3.9.koobs-freebsd-564d/build/Lib/test/libregrtest/runtest.py", line 221, in _runtest_inner2 the_module = importlib.import_module(abstest) File "/usr/home/buildbot/python/3.9.koobs-freebsd-564d/build/Lib/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 790, in exec_module File "", line 228, in _call_with_frames_removed File "/usr/home/buildbot/python/3.9.koobs-freebsd-564d/build/Lib/test/test_gdb.py", line 48, in gdb_version, gdb_major_version, gdb_minor_version = get_gdb_version() File "/usr/home/buildbot/python/3.9.koobs-freebsd-564d/build/Lib/test/test_gdb.py", line 29, in get_gdb_version raise Exception(f"Command {' '.join(cmd)!r} failed " Exception: Command 'gdb -nx --version' failed with exit code 1: stdout='' stderr='ld-elf.so.1: Shared object "libncursesw.so.6" not found, required by "gdb"\n' Would you like me to rebuild bash/gdb to fix the error, or wait for the tests to be fixed so that they can handle the error condition? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 20:13:54 2021 From: report at bugs.python.org (Dong-hee Na) Date: Thu, 04 Feb 2021 01:13:54 +0000 Subject: [issue43106] Some macOS open flags are missing from posixmodule.c In-Reply-To: <1612293989.13.0.0432139377352.issue43106@roundup.psfhosted.org> Message-ID: <1612401234.29.0.0253287764453.issue43106@roundup.psfhosted.org> Change by Dong-hee Na : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 21:40:40 2021 From: report at bugs.python.org (Andre Roberge) Date: Thu, 04 Feb 2021 02:40:40 +0000 Subject: [issue43008] IDLE ignores sys.excepthook in normal, subprocess mode In-Reply-To: <1611401446.12.0.0532585832167.issue43008@roundup.psfhosted.org> Message-ID: <1612406440.97.0.698864219334.issue43008@roundup.psfhosted.org> Andre Roberge added the comment: Terry: as per your earlier comment, I have tried to use Friendly-traceback with the latest version. While it does set the exception hook correctly, it is not useful. Friendly-traceback (FT) needs to have access to the code that was executed. FT's REPL caches the code (similarly to what IPython does, but not CPython) prior to execution so that it can retrieve it correctly, have access to the relevant execution frame, etc. This is not possible when using IDLE's REPL. In fact, for some types of exceptions, when FT tries to get access to the code, it ends up triggering secondary exceptions. However, using the method describe in FT's documentation (with relies on FT's own console) still works correctly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 3 22:27:52 2021 From: report at bugs.python.org (William Pickard) Date: Thu, 04 Feb 2021 03:27:52 +0000 Subject: [issue43122] Python Launcher doesn't open a terminal window In-Reply-To: <1612400615.64.0.789800326005.issue43122@roundup.psfhosted.org> Message-ID: <1612409272.98.0.783017332283.issue43122@roundup.psfhosted.org> William Pickard added the comment: That quick flash would be your terminal window if I have to guess (based on no Mac experience, but Windows). ---------- nosy: +WildCard65 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 02:00:04 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 04 Feb 2021 07:00:04 +0000 Subject: [issue43102] namedtuple's __new__.__globals__['__builtins__'] is None In-Reply-To: <1612277204.9.0.79430264778.issue43102@roundup.psfhosted.org> Message-ID: <1612422004.05.0.359964003856.issue43102@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +23247 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24439 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 04:11:58 2021 From: report at bugs.python.org (Ken Jin) Date: Thu, 04 Feb 2021 09:11:58 +0000 Subject: [issue43119] asyncio.Queue.put never yields if the queue is unbounded In-Reply-To: <1612381282.49.0.371079618361.issue43119@roundup.psfhosted.org> Message-ID: <1612429918.79.0.204982706852.issue43119@roundup.psfhosted.org> Ken Jin added the comment: Thanks for the minimal reproducer. I've tested it on 3.9.0 and 3.10a4 and they seem to exhibit the same behavior too. Out of genuine curiosity (I don't mean to question if this *is* a bug, it seems like a trap for users): why not place an ``await asyncio.sleep(0)`` after ``queue.put`` line to force a switch in the producer? Eg, from your example code, instead of : while True: await q.put(i) maybe this: while True: await q.put(i) await asyncio.sleep(0) With that workaround, your example starts printing each item and the consumer tasks don't seem to get blocked. ---------- nosy: +kj versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 07:29:42 2021 From: report at bugs.python.org (Dima Pasechnik) Date: Thu, 04 Feb 2021 12:29:42 +0000 Subject: [issue19733] Setting image parameter of a button crashes with Cocoa Tk In-Reply-To: <1385212186.78.0.599244063108.issue19733@psf.upfronthosting.co.za> Message-ID: <1612441782.36.0.1371108651.issue19733@roundup.psfhosted.org> Dima Pasechnik added the comment: was it tested on macOS 11.2 ? Tests fail there with Python 3.9.1 ---------- nosy: +Dima Pasechnik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 07:48:46 2021 From: report at bugs.python.org (Martin Ortner) Date: Thu, 04 Feb 2021 12:48:46 +0000 Subject: [issue43123] email MIME splitting Message-ID: <1612442926.7.0.976451859836.issue43123@roundup.psfhosted.org> New submission from Martin Ortner : // reported via PSRT email (see timeline) // external reference: https://consensys.net/diligence/vulnerabilities/private/jcchhpke7usq8wo45vloy282phwpd9fj41imumhb8varxahz2bf9afw5mcno84gx/ cve: vendor: python vendorUrl: https://www.python.org/ authors: tintinweb affectedVersions: [at least <= 3.8.3, <=3.7.7, <=2.7.18] vulnClass: CWE-93 # Vulnerability Note ## Summary >Python is a programming language that lets you work more quickly and integrate your systems more effectively. The python `email.mime` package fails to properly encode or reject `CR-LF` control sequences in MIME header values allowing for MIME splitting and header injection attacks. * `MIMEText[headerKey] = headerValue` - `headerValue` accepts `CR-LF` in the value, allowing an attacker in control of part of the header value to perform a MIME splitting attack. * `MIMEText[headerKey] = headerValue` - `headerKey` is not checked for `CR-LF` allowing an attacker in control of part of a header key to inject arbitrary MIME headers. * `MIMEText.add_header(headerKey, headerValue)` - `headerKey` is not checked for `CR-LF` allowing an attacker in control of part of a header key to inject arbitrary MIME headers. ## Details ### MIME-Splitting with `CR-LF` in header value: * Note: `CR-LF` injection in `To` header pushes an invalid header and may force a MIME split (depending on the parsing library) pushing following header values into the body when being parsed with the `email.message_from_string()` method. ```python # Import the email modules we'll need from email.mime.text import MIMEText # Open a plain text file for reading. For this example, assume that # the text file contains only ASCII characters. msg = MIMEText("REAL_MSG_BODY_BEGIN\n...\nREAL_MSG_BODY_END") msg['Subject'] = 'The contents of is this...' msg['To'] = "TO toAddress at oststrom.com\r\nX-SPLIT-MSG-TO-BODY\r\n" msg['From'] = "FROM fromAddress at oststrom.com" msg['MyHEader'] = "hi :: hi" print(msg) print(repr(msg)) print("=========================") import email msg = email.message_from_string(str(msg)) print(msg) print("-> FROM: %s" % msg.get("From")) print("-> TO: %s" % msg["To"]) print("-> MSG: " + repr(msg.get_payload())) ``` Output: * Output before the `===========` is the constructed message * Output after the `===========` is the parsed message * Note: that after parsing the message some headers end up in the body (`from`, `myheader`). Note that `msg[from]` is empty. ``` ? python3 a.py Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: The contents of is this... To: TO toAddress at oststrom.com X-SPLIT-MSG-TO-BODY From: FROM fromAddress at oststrom.com MyHEader: hi :: hi REAL_MSG_BODY_BEGIN ... REAL_MSG_BODY_END ========================= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: The contents of is this... To: TO toAddress at oststrom.com X-SPLIT-MSG-TO-BODY From: FROM fromAddress at oststrom.com MyHEader: hi :: hi REAL_MSG_BODY_BEGIN ... REAL_MSG_BODY_END -> FROM: None -> TO: TO toAddress at oststrom.com -> MSG: 'X-SPLIT-MSG-TO-BODY\nFrom: FROM fromAddress at oststrom.com\nMyHEader: hi :: hi\n\nREAL_MSG_BODY_BEGIN\n...\nREAL_MSG_BODY_END' ``` ### `CR-LF` injection in header keys. Note: this is unlikely to be exploited, however, there might be scenarios where part of the header key is exposed to user input. A `CR-LF` character in the header key should throw instead. ```python # Import the email modules we'll need from email.mime.text import MIMEText # Open a plain text file for reading. For this example, assume that # the text file contains only ASCII characters. msg = MIMEText("REAL_MSG_BODY_BEGIN\n...\nREAL_MSG_BODY_END") # me == the sender's email address # you == the recipient's email address msg['Subject'] = 'The contents of is this...' msg['To'] = "TO toAddress at oststrom.com" msg['From'] = "FROM fromAddress at oststrom.com" msg['MyHEader'] = "hi :: hi" msg["m\r\nh"] = "yo" print(msg) print(repr(msg)) print("=========================") import email msg = email.message_from_string(str(msg)) msg.add_header("CUSTOM-HEADER: yo\r\n\nX-INJECTED: injected-header\r\naa","data") print(msg) print("-> FROM: %s" % msg.get("From")) print("-> TO: %s" % msg["To"]) print("-> MSG: " + repr(msg.get_payload())) ``` Output: `h: yo` and `X-INJECTED:` are injected ``` ? python3 a.py Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: The contents of is this... To: TO toAddress at oststrom.com From: FROM fromAddress at oststrom.com MyHEader: hi :: hi m h: yo REAL_MSG_BODY_BEGIN ... REAL_MSG_BODY_END ========================= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: The contents of is this... To: TO toAddress at oststrom.com From: FROM fromAddress at oststrom.com MyHEader: hi :: hi CUSTOM-HEADER: yo X-INJECTED: injected-header aa: data m h: yo REAL_MSG_BODY_BEGIN ... REAL_MSG_BODY_END -> FROM: FROM fromAddress at oststrom.com -> TO: TO toAddress at oststrom.com -> MSG: 'm\r\nh: yo\n\nREAL_MSG_BODY_BEGIN\n...\nREAL_MSG_BODY_END' ``` ## Proposed Fix - reject `\n` in header keys - encode `\n` in header values to `\n\s+...` to signal a continuation of the header value. reject `\n+` ## Vendor Response Vendor response: ``` I discussed the vulnerability in private with one of the email module maintainers and he considers that it's not a vulnerability. Would you mind opening a public issue at https://bugs.python.org/ so the discussion can be recorded in public? Victor ``` ### Timeline ``` JUL/02/2020 - contact psrt; provided details, PoC, proposed patch AUG/20/2020 - vendor response: forwarded to maintainer of module SEP/15/2020 - vendor response: not a security issue ``` ## References * [1] https://www.python.org/ * [2] https://www.python.org/downloads/ ---------- components: email messages: 386479 nosy: barry, martin.ortner, r.david.murray priority: normal severity: normal status: open title: email MIME splitting type: security versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 07:56:44 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Feb 2021 12:56:44 +0000 Subject: [issue43068] test_subprocess: test_specific_shell() fails on AMD64 FreeBSD Shared 3.x In-Reply-To: <1611956940.56.0.594651223595.issue43068@roundup.psfhosted.org> Message-ID: <1612443404.54.0.78876803727.issue43068@roundup.psfhosted.org> STINNER Victor added the comment: > Would you like me to rebuild bash/gdb to fix the error, or wait for the tests to be fixed so that they can handle the error condition? I don't think that Python test suite should handle the case of a broken FreeBSD setup. Could you either disable the buildbot worker or fix it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 08:05:34 2021 From: report at bugs.python.org (Martin Ortner) Date: Thu, 04 Feb 2021 13:05:34 +0000 Subject: [issue43124] smtplib multiple CRLF injection Message-ID: <1612443934.09.0.696762333019.issue43124@roundup.psfhosted.org> New submission from Martin Ortner : // reported via PSRT email (see timeline; last contact: Alex/PSRT) // external reference: http://consensys.net/diligence/vulnerabilities/private/z5kxjgfmja4offxbrw1miuxwezggajjfswlz9g2hfuh77we5dy727hqy5x9ii43e/ cve: vendor: python vendorUrl: https://www.python.org/ authors: tintinweb affectedVersions: [at least 3.8.3, <=3.7.8, <=3.6.11, <=3.5.9, <=2.7.18] vulnClass: CWE-93 # Vulnerability Note ## Summary >Python is a programming language that lets you work more quickly and integrate your systems more effectively. Two CR-LF injection points have been discovered in the Python standard library for `SMTP` interaction (client perspective) named `smtplib` that may allow a malicious user with direct access to `smtplib.SMTP(..., local_hostname, ..)` or `smtplib.SMTP(...).mail(..., options)` to inject a CR-LF control sequence to inject arbitrary `SMTP` commands into the protocol stream. The root cause of this is likely to be found in the design of the `putcmd(cmd, args)` method, that fails to validate that `cmd` nor `args` contains any protocol control sequences (i.e. `CR-LF`). It is recommended to reject or encode `\r\n` in `putcmd()` and enforce that potential multi-line commands call `putcmd()` multiple times to avoid that malicious input breaks the expected context of the method and hence cause unexpected behavior. For reference, the `DATA` command (multi-line) would not be affected by this change as it calls `putcmd()` only once and continues with directly interacting with the socket to submit the body. ## Details ### Description The root cause of this (and probably also some earlier reported CR-LF injections) is the method `putcmd()` in `lib/smtplib.py`[3]. The method is called by multiple commands and does not validate that neither `cmd` nor `args` contains any `CRLF` sequences. ```python def putcmd(self, cmd, args=""): """Send a command to the server.""" if args == "": str = '%s%s' % (cmd, CRLF) else: str = '%s %s%s' % (cmd, args, CRLF) self.send(str) ``` However, the issue was initially found in `mail(..., options)` [4] which fails to ensure that none of the provided `options` contains `CRLF` characters. The method only ensures that provides mail addresses are quoted, `optionslist` is untouched: ```python self.putcmd("mail", "FROM:%s%s" % (quoteaddr(sender), optionlist)) ``` A similar issue was found with `smtplib.SMTP(...,local_hostname)` (and `helo(name)`, `ehlo(name)`) which may potentially contain `CRLF` sequences and, therefore, can be used to inject `SMTP` commands. Here's a snipped of `helo` [5] ```python def helo(self, name=''): """SMTP 'helo' command. Hostname to send for this command defaults to the FQDN of the local host. """ self.putcmd("helo", name or self.local_hostname) (code, msg) = self.getreply() self.helo_resp = msg return (code, msg) ``` We highly recommend, fixing this issue once and for all directly in `putcmd()` and enforce that the interface can only send one command at a time, rejecting arguments that contain `CRLF` sequences or properly encoding them to avoid injection. ## Proof of Concept 1. set-up a local tcp listener `? nc -l 10001` 2. run the following PoC and replay the server part as outline in 3. ```python import smtplib server = smtplib.SMTP('localhost', 10001, "hi\nX-INJECTED") # localhostname CRLF injection server.set_debuglevel(1) server.sendmail("hi at me.com", "you at me.com", "wazzuuup\nlinetwo") server.mail("hi at me.com",["X-OPTION\nX-INJECTED-1","X-OPTION2\nX-INJECTED-2"]) # options CRLF injection ``` 3. interact with `smtplib`, check for `X-INJECTED` ``` ? nc -l 10001 nc -l 10001 220 yo ehlo hi X-INJECTED 250-AUTH PLAIN 250 mail FROM: 250 ok rcpt TO: 250 ok data 354 End data with . wazzuuup linetwo . 250 ok mail FROM: X-OPTION X-INJECTED-1 X-OPTION2 X-INJECTED-2 250 ok quit 250 ok ``` ### Proposed Fix * enforce that `putcmd` emits exactly one command at a time and encode `\n -> \\n`. ```diff diff --git a/Lib/smtplib.py b/Lib/smtplib.py index e2dbbbc..9c16e7d 100755 --- a/Lib/smtplib.py +++ b/Lib/smtplib.py @@ -365,10 +365,10 @@ class SMTP: def putcmd(self, cmd, args=""): """Send a command to the server.""" if args == "": - str = '%s%s' % (cmd, CRLF) + str = cmd else: - str = '%s %s%s' % (cmd, args, CRLF) - self.send(str) + str = '%s %s' % (cmd, args) + self.send('%s%s' % (str.replace('\n','\\n'), CRLF)) ``` ## Vendor Response Vendor response: gone silent ### Timeline ``` JUL/02/2020 - contact psrt; provided details, PoC, proposed patch JUL/04/2020 - confirmed that vulnerability note was received SEP/10/2020 - requested status update. ``` ## References * [1] https://www.python.org/ * [2] https://www.python.org/downloads/ * [3] https://github.com/python/cpython/blob/1da648aceb2496c672aff82ba37ee071ac6054ac/Lib/smtplib.py#L365-L371 * [4] https://github.com/python/cpython/blob/1da648aceb2496c672aff82ba37ee071ac6054ac/Lib/smtplib.py#L520 * [5] https://github.com/python/cpython/blob/1da648aceb2496c672aff82ba37ee071ac6054ac/Lib/smtplib.py#L428-L445 ---------- components: email messages: 386481 nosy: barry, martin.ortner, r.david.murray priority: normal severity: normal status: open title: smtplib multiple CRLF injection type: security versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 08:23:28 2021 From: report at bugs.python.org (Michael L. Boom) Date: Thu, 04 Feb 2021 13:23:28 +0000 Subject: [issue43125] Trying To Concatenate Bytes and String in SMTPLIB Message-ID: <1612445008.73.0.955251739992.issue43125@roundup.psfhosted.org> New submission from Michael L. Boom : The space is string, and either mechanism and/or response are bytes. smtplib.py:634 response = encode_base64(initial_response.encode('ascii'), eol='') (code, resp) = self.docmd("AUTH", mechanism + " " + response) import smtplib, ssl port = 587 smtp_server = "---------------" smtpserver = smtplib.SMTP(smtp_server, port) smtpserver.set_debuglevel(2) smtpserver.ehlo() smtpserver.starttls() smtpserver.ehlo smtpserver.login("", "") ----------------------------------------------------- 12:40:37.614737 send: 'ehlo [10.60.69.196]\r\n' 12:40:37.665528 reply: b'250-MWHPR20CA0007.outlook.office365.com Hello [65.54.12.68]\r\n' 12:40:37.665666 reply: b'250-SIZE 157286400\r\n' 12:40:37.665761 reply: b'250-PIPELINING\r\n' 12:40:37.665788 reply: b'250-DSN\r\n' 12:40:37.665806 reply: b'250-ENHANCEDSTATUSCODES\r\n' 12:40:37.665825 reply: b'250-STARTTLS\r\n' 12:40:37.665842 reply: b'250-8BITMIME\r\n' 12:40:37.665859 reply: b'250-BINARYMIME\r\n' 12:40:37.665876 reply: b'250-CHUNKING\r\n' 12:40:37.665893 reply: b'250 SMTPUTF8\r\n' 12:40:37.665919 reply: retcode (250); Msg: b'MWHPR20CA0007.outlook.office365.com Hello [65.54.12.68]\nSIZE 157286400\nPIPELINING\nDSN\nENHANCEDSTATUSCODES\nSTARTTLS\n8BITMIME\nBINARYMIME\nCHUNKING\nSMTPUTF8' 12:40:37.666440 send: 'STARTTLS\r\n' 12:40:37.716214 reply: b'220 2.0.0 SMTP server ready\r\n' 12:40:37.716265 reply: retcode (220); Msg: b'2.0.0 SMTP server ready' 12:40:37.878320 send: 'ehlo [10.60.69.196]\r\n' 12:40:37.928198 reply: b'250-MWHPR20CA0007.outlook.office365.com Hello [65.54.12.68]\r\n' 12:40:37.928259 reply: b'250-SIZE 157286400\r\n' 12:40:37.928285 reply: b'250-PIPELINING\r\n' 12:40:37.928304 reply: b'250-DSN\r\n' 12:40:37.928323 reply: b'250-ENHANCEDSTATUSCODES\r\n' 12:40:37.928437 reply: b'250-AUTH LOGIN XOAUTH2\r\n' 12:40:37.928461 reply: b'250-8BITMIME\r\n' 12:40:37.928494 reply: b'250-BINARYMIME\r\n' 12:40:37.928511 reply: b'250-CHUNKING\r\n' 12:40:37.928528 reply: b'250 SMTPUTF8\r\n' 12:40:37.928552 reply: retcode (250); Msg: b'MWHPR20CA0007.outlook.office365.com Hello [65.54.12.68]\nSIZE 157286400\nPIPELINING\nDSN\nENHANCEDSTATUSCODES\nAUTH LOGIN XOAUTH2\n8BITMIME\nBINARYMIME\nCHUNKING\nSMTPUTF8' Traceback (most recent call last): File "mail9.py", line 18, in smtpserver.login("", "") File "/aae/msio_install_release1.9/scoring_engine.20201201.3.8.3/lib/python3.8/smtplib.py", line 723, in login (code, resp) = self.auth( File "/aae/msio_install_release1.9/scoring_engine.20201201.3.8.3/lib/python3.8/smtplib.py", line 635, in auth (code, resp) = self.docmd("AUTH", mechanism + " " + response) TypeError: can only concatenate str (not "bytes") to str ---------- components: Interpreter Core messages: 386482 nosy: boom0192 priority: normal severity: normal status: open title: Trying To Concatenate Bytes and String in SMTPLIB type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 08:58:08 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Feb 2021 13:58:08 +0000 Subject: [issue43124] [security] smtplib multiple CRLF injection In-Reply-To: <1612443934.09.0.696762333019.issue43124@roundup.psfhosted.org> Message-ID: <1612447088.5.0.265038613916.issue43124@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: smtplib multiple CRLF injection -> [security] smtplib multiple CRLF injection _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 09:15:47 2021 From: report at bugs.python.org (Kevin) Date: Thu, 04 Feb 2021 14:15:47 +0000 Subject: [issue43122] Python Launcher doesn't open a terminal window In-Reply-To: <1612409272.98.0.783017332283.issue43122@roundup.psfhosted.org> Message-ID: Kevin added the comment: William, Thanks for your comment. I assumed the same thing, but it goes by so fast I am never sure.. > On Feb 3, 2021, at 10:27 PM, William Pickard wrote: > > > William Pickard added the comment: > > That quick flash would be your terminal window if I have to guess (based on no Mac experience, but Windows). > > ---------- > nosy: +WildCard65 > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 09:28:07 2021 From: report at bugs.python.org (Martin Larralde) Date: Thu, 04 Feb 2021 14:28:07 +0000 Subject: [issue43126] IOBase.readlines(0) behaviour is inconsistent with documentation Message-ID: <1612448887.77.0.51336599468.issue43126@roundup.psfhosted.org> New submission from Martin Larralde : The documentation for `IOBase.readlines` states that the `hint` optional argument should be used like so (https://docs.python.org/3/library/io.html#io.IOBase.readlines): > Read and return a list of lines from the stream. hint can be specified to control the number of lines read: no more lines will be read if the total size (in bytes/characters) of all lines so far exceeds hint. So in the case where `hint` is null, I would expect `readlines` to return an empty list. However, this is neither the case for `io.BytesIO` nor for `io.FileIO`: ``` import io io.BytesIO(b"abc\ndef\nghi\n").readlines(0) # this evaluates to [b"abc\n", b"def\n", b"ghi\n"] ``` If this is the intended behaviour, the documentation should be updated, otherwise the code from the `io` module should be fixed. ---------- assignee: docs at python components: Documentation messages: 386484 nosy: althonos2, docs at python priority: normal severity: normal status: open title: IOBase.readlines(0) behaviour is inconsistent with documentation type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 11:53:25 2021 From: report at bugs.python.org (Adrian Lloyd) Date: Thu, 04 Feb 2021 16:53:25 +0000 Subject: [issue43127] Unable to install Python 3.9.1 - Windows 10 Message-ID: <1612457605.05.0.029864468293.issue43127@roundup.psfhosted.org> New submission from Adrian Lloyd : I get the following error when I try to install Python 3.9.1 on windows 10 0x80070659 The installation is forbidden by system policy. The log gives more information: [13A0:0FC0][2021-02-04T16:41:04]e000: Error 0x80070659: Failed to install MSI package. [13A0:0FC0][2021-02-04T16:41:04]e000: Error 0x80070659: Failed to configure per-user MSI package. [13A0:0FC0][2021-02-04T16:41:04]i319: Applied execute package: core_JustForMe, result: 0x80070659, restart: None [13A0:0FC0][2021-02-04T16:41:04]e000: Error 0x80070659: Failed to execute MSI package. I have looked on earlier posts and stack overflow and all suggest a registry fix to set DisableMSI = 0 in the registry, but according to windows documentation this doesn't apply to windows 10. Also the Installer folder which would contain this parameter doesn't exist. Can you help? ---------- messages: 386485 nosy: adrian.e.d.lloyd priority: normal severity: normal status: open title: Unable to install Python 3.9.1 - Windows 10 versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 12:12:35 2021 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 04 Feb 2021 17:12:35 +0000 Subject: [issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file In-Reply-To: <1612348984.98.0.934369937347.issue43113@roundup.psfhosted.org> Message-ID: <1612458755.3.0.416334289621.issue43113@roundup.psfhosted.org> Eric V. Smith added the comment: I suggest making no change here, except maybe documenting it somewhere. Removing the filename would make this problem even harder to diagnose. And adding additional code to an error condition just increases the chance of something failing. The error reporting should be as simple as possible. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 12:48:45 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 Feb 2021 17:48:45 +0000 Subject: [issue43008] IDLE ignores sys.excepthook in normal, subprocess mode In-Reply-To: <1611401446.12.0.0532585832167.issue43008@roundup.psfhosted.org> Message-ID: <1612460925.17.0.238986710886.issue43008@roundup.psfhosted.org> Terry J. Reedy added the comment: IDLE also caches shell input. Off topic here, I sent Andre an email about how FT could access it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 12:49:27 2021 From: report at bugs.python.org (Spencer Nelson) Date: Thu, 04 Feb 2021 17:49:27 +0000 Subject: [issue43119] asyncio.Queue.put never yields if the queue is unbounded In-Reply-To: <1612381282.49.0.371079618361.issue43119@roundup.psfhosted.org> Message-ID: <1612460967.93.0.938832079405.issue43119@roundup.psfhosted.org> Spencer Nelson added the comment: Thanks for testing on more Python versions. Yes, adding asyncio.sleep(0) after each put is an effective workaround - it's certainly possible to manually yield like that. I just think that that's what asyncio.Queue.put ought to be doing - in fact, that's my proposed change in the associated PR: https://github.com/python/cpython/pull/24433/files#diff-22a6bcb03e783378149a3e9411c185b13c908e61886ffd55145634b7ab12caacR141 I suppose that, more broadly, I would have expected that _any_ `await f()` call would be a preemptible point, but I think that's a much, much larger discussion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 12:51:00 2021 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Feb 2021 17:51:00 +0000 Subject: [issue43107] RotatingFileHandler with multi processes creates too small backup files In-Reply-To: <1612295908.37.0.851347106037.issue43107@roundup.psfhosted.org> Message-ID: <1612461060.5.0.396881500296.issue43107@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +23248 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24442 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 13:02:38 2021 From: report at bugs.python.org (Alex Osterman) Date: Thu, 04 Feb 2021 18:02:38 +0000 Subject: [issue43128] make test fails Lib/test/test_httpservers.py on 3.9.1 Message-ID: <1612461758.14.0.954062785063.issue43128@roundup.psfhosted.org> New submission from Alex Osterman : While compiling 3.9.1 on CentOS 8, test_httpservers.py throws multiple errors in the vein of "OSError: [Errno 39] Directory not empty: '/tmp/tmp70ip355o'" from line 707, in teardown. Examining the directories I see that they all contain only a gmon.out. Adding this code to teardown() before "os.rmdir(self.parent_dir)" seems to resolve the issue and should not introduce any issues on other platforms: if os.path.isfile(pathlib.Path(self.parent_dir).joinpath('gmon.out')): os.remove(pathlib.Path(self.parent_dir).joinpath('gmon.out')) ---------- components: Tests files: Python3 Makefile.txt messages: 386489 nosy: ostermana priority: normal severity: normal status: open title: make test fails Lib/test/test_httpservers.py on 3.9.1 type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file49790/Python3 Makefile.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 14:10:36 2021 From: report at bugs.python.org (Austin Lamb) Date: Thu, 04 Feb 2021 19:10:36 +0000 Subject: [issue42825] Build libraries with "/OPT:REF" linker optimization on Windows In-Reply-To: <1609782160.13.0.0224895080942.issue42825@roundup.psfhosted.org> Message-ID: <1612465836.69.0.522968024883.issue42825@roundup.psfhosted.org> Austin Lamb added the comment: You're right to think that folding is a problem Steve, but thankfully my PR does not enable COMDAT folding for that very reason :). /OPT:ICF enables identical COMDAT folding, but surprisingly-to-me /OPT:REF seems to still enable a small amount of folding (I confirmed with the linker dev at Microsoft that this is true). Thus, just /OPT:REF alone caused test failures as there are test cases verifying COMDAT folding didn't occur. Thus, in my PR I am using /OPT:REF,NOICF to explicitly disable any ICF'ing at all and I see no folding occurring anywhere, and those COMDAT-folding-sensitive tests pass with that flag. The dumpbin /exports output is identical after this change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 14:18:34 2021 From: report at bugs.python.org (Ned Deily) Date: Thu, 04 Feb 2021 19:18:34 +0000 Subject: [issue19733] Setting image parameter of a button crashes with Cocoa Tk In-Reply-To: <1385212186.78.0.599244063108.issue19733@psf.upfronthosting.co.za> Message-ID: <1612466314.58.0.169074184582.issue19733@roundup.psfhosted.org> Ned Deily added the comment: > was it tested on macOS 11.2 ? > Tests fail there with Python 3.9.1 The change to re-enable the previously crashing test will first be released in 3.9.2 and AFAICT no longer causes a crash. There are other Tk-related test failures on macOS with Tk 8.6.11 but no crashes like this as far as I know. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 14:19:58 2021 From: report at bugs.python.org (Ned Deily) Date: Thu, 04 Feb 2021 19:19:58 +0000 Subject: [issue19733] Setting image parameter of a button crashes with Cocoa Tk In-Reply-To: <1385212186.78.0.599244063108.issue19733@psf.upfronthosting.co.za> Message-ID: <1612466398.5.0.433117915474.issue19733@roundup.psfhosted.org> Ned Deily added the comment: > The change to re-enable the previously crashing test will first be released in 3.9.2 It's also in the recently-released 3.10.0a5 release preview. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 14:42:12 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 04 Feb 2021 19:42:12 +0000 Subject: [issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file In-Reply-To: <1612348984.98.0.934369937347.issue43113@roundup.psfhosted.org> Message-ID: <1612467732.19.0.713061057628.issue43113@roundup.psfhosted.org> Gregory P. Smith added the comment: That bash produces a nicer error message is because bash happens to implement its own special logic to try and figure out why an exec failed with an error other than ENOEXEC. The OS kernel & libc do not give it that information, there is no such errno. Bash inspects the executable itself for a #! in some error paths, extracts an interpreter from that and constructs an error message involving it. (bash's execute_cmd.c and HAVE_HASH_BANG_EXEC logic) I agree with Eric. I don't think we should do anything here. This isn't posix_spawn, subprocess, or os.exec* specific. It's just how posix-y OSes that have the concept of a #! line interpreter for executable files work. The errno that comes back from an exec failure is not super informative. If someone disagrees, the way to move forward on this is to implement equivalent logic in a central place and have it called from all of the relevant places within the posixmodule (os) and the _posixsubprocess module. With tests of all possible errno cases and code paths for each. And make a PR out of that. If you're going to take that on; do _not_ look at the bash source code. That's GPL, we cannot copy it. Just go by this description. To me, this seems over complicated to get right and maintain. I'd rather not do this within Python. But if someone is going to make a PR for it, I'll at least look at it to see if it seems like something we could accept maintenance of. I cannot guarantee we'd accept it. ---------- resolution: -> not a bug stage: -> needs patch status: open -> closed type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 14:57:06 2021 From: report at bugs.python.org (Ammar Askar) Date: Thu, 04 Feb 2021 19:57:06 +0000 Subject: [issue42773] build.yml workflow not testing on pushes In-Reply-To: <1609194687.05.0.86275810312.issue42773@roundup.psfhosted.org> Message-ID: <1612468626.37.0.433612657889.issue42773@roundup.psfhosted.org> Change by Ammar Askar : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 15:46:09 2021 From: report at bugs.python.org (Chih-Hsuan Yen) Date: Thu, 04 Feb 2021 20:46:09 +0000 Subject: [issue33990] CPPFLAGS during ./configure are not passed-through in sysconfig.customize_compiler In-Reply-To: <1530213218.16.0.56676864532.issue33990@psf.upfronthosting.co.za> Message-ID: <1612471569.49.0.968891437253.issue33990@roundup.psfhosted.org> Change by Chih-Hsuan Yen : ---------- nosy: -yan12125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 16:25:49 2021 From: report at bugs.python.org (Matthieu Dartiailh) Date: Thu, 04 Feb 2021 21:25:49 +0000 Subject: [issue43129] Number of object on stack required by opcode Message-ID: <1612473949.46.0.297177775699.issue43129@roundup.psfhosted.org> New submission from Matthieu Dartiailh : When constructing bytecode object manually as can be done using the bytecode library (https://github.com/MatthieuDartiailh/bytecode which was first developed by V Stinner), one can use dis.stack_effect to compute the required stack size, thus avoiding stack overflows. However it can be interesting for those manually built bytecode object to also check that no underflow can occur. This computation is straightforward once one knows the number of element on the stack a specific opcode expects. This works has been done manually in the bytecode project, but it may interesting to provide a way in the dis module to access this information with an interface similar to dis.stack_effect. If there is an interest in such a feature I would be happy to contribute it. I would however like some opinion on how to do that in an optimal manner. I assume it would require to add the implementation in https://github.com/python/cpython/blob/master/Python/compile.c and expose it in a similar manner to stack_effect. ---------- components: Library (Lib) messages: 386494 nosy: mdartiailh priority: normal severity: normal status: open title: Number of object on stack required by opcode type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 16:30:21 2021 From: report at bugs.python.org (John Rey Osano) Date: Thu, 04 Feb 2021 21:30:21 +0000 Subject: [issue42825] Build libraries with "/OPT:REF" linker optimization on Windows In-Reply-To: <1609782160.13.0.0224895080942.issue42825@roundup.psfhosted.org> Message-ID: <1612474221.74.0.708063159072.issue42825@roundup.psfhosted.org> Change by John Rey Osano : ---------- components: +C API, Extension Modules, IO type: performance -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 16:50:40 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 04 Feb 2021 21:50:40 +0000 Subject: [issue21728] Confusing error message when initialising type inheriting object.__init__ In-Reply-To: <1402524417.59.0.0212668512702.issue21728@psf.upfronthosting.co.za> Message-ID: <1612475440.12.0.477489445317.issue21728@roundup.psfhosted.org> Irit Katriel added the comment: Looks like this was fixed under issue31506. In any case it works for me now: >>> A(42) Traceback (most recent call last): File "", line 1, in TypeError: A() takes no arguments ---------- nosy: +iritkatriel resolution: -> fixed status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 16:52:27 2021 From: report at bugs.python.org (Tony Ladd) Date: Thu, 04 Feb 2021 21:52:27 +0000 Subject: [issue43130] Should this construct throw an exception? Message-ID: <1612475547.01.0.970042498842.issue43130@roundup.psfhosted.org> New submission from Tony Ladd : The expression "1 and 2" evaluates to 2. Actually for most combinations of data type it returns the second object. Of course its a senseless construction (a beginning student made it) but why no exception? ---------- components: Interpreter Core messages: 386496 nosy: tladd priority: normal severity: normal status: open title: Should this construct throw an exception? type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 16:57:31 2021 From: report at bugs.python.org (=?utf-8?q?Yussuf_=C3=96zkan?=) Date: Thu, 04 Feb 2021 21:57:31 +0000 Subject: [issue30077] Support Apple AIFF-C pseudo compression in aifc.py In-Reply-To: <1492281879.16.0.0196863971193.issue30077@psf.upfronthosting.co.za> Message-ID: <1612475851.37.0.988644900928.issue30077@roundup.psfhosted.org> Yussuf ?zkan added the comment: If you read a normal uncompressed AIFF with aifc, the samples are in big-endian order and need to be converted before they can be played on little-endian systems. As all other compression schemes produce big-endian data, so should 'SOWT' encoded AIFF. Therefore, the bytes of each sample should be swapped on read and write. See also: https://en.wikipedia.org/wiki/Audio_Interchange_File_Format#AIFF_on_Mac_OS_X ---------- components: +macOS keywords: +patch message_count: 4.0 -> 5.0 nosy: +ned.deily, ronaldoussoren, yussuf.ozkan nosy_count: 3.0 -> 6.0 pull_requests: +23249 pull_request: https://github.com/python/cpython/pull/24449 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 17:06:50 2021 From: report at bugs.python.org (Ken Jin) Date: Thu, 04 Feb 2021 22:06:50 +0000 Subject: [issue42882] Restarting the interpreter causes UB on 3.10.0a4 In-Reply-To: <1610283618.64.0.475556781159.issue42882@roundup.psfhosted.org> Message-ID: <1612476410.91.0.908258352059.issue42882@roundup.psfhosted.org> Change by Ken Jin : ---------- nosy: +kj nosy_count: 2.0 -> 3.0 pull_requests: +23250 pull_request: https://github.com/python/cpython/pull/24440 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 17:07:28 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Thu, 04 Feb 2021 22:07:28 +0000 Subject: [issue43130] Should this construct throw an exception? In-Reply-To: <1612475547.01.0.970042498842.issue43130@roundup.psfhosted.org> Message-ID: <1612476448.94.0.897062391055.issue43130@roundup.psfhosted.org> Dennis Sweeney added the comment: This is the expected behavior. >From https://docs.python.org/3/tutorial/introduction.html#first-steps-towards-programming """ In Python, like in C, any non-zero integer value is true; zero is false. The condition may also be a string or list value, in fact any sequence; anything with a non-zero length is true, empty sequences are false. """ >From https://docs.python.org/3/tutorial/datastructures.html?highlight=short%20circuit#more-on-conditions """ The Boolean operators and and or are so-called short-circuit operators: their arguments are evaluated from left to right, and evaluation stops as soon as the outcome is determined. For example, if A and C are true but B is false, A and B and C does not evaluate the expression C. When used as a general value and not as a Boolean, the return value of a short-circuit operator is the last evaluated argument. """ ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 17:08:11 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 04 Feb 2021 22:08:11 +0000 Subject: [issue42882] Restarting the interpreter causes UB on 3.10.0a4 In-Reply-To: <1610283618.64.0.475556781159.issue42882@roundup.psfhosted.org> Message-ID: <1612476491.62.0.325991593979.issue42882@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 196d4deaf4810a0bba75ba537dd40f2d71a5a634 by Ken Jin in branch 'master': bpo-42882: Fix MSVC warnings in pystate.c (GH-24440) https://github.com/python/cpython/commit/196d4deaf4810a0bba75ba537dd40f2d71a5a634 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 17:43:18 2021 From: report at bugs.python.org (Tony Ladd) Date: Thu, 04 Feb 2021 22:43:18 +0000 Subject: [issue43130] Should this construct throw an exception? In-Reply-To: <1612475547.01.0.970042498842.issue43130@roundup.psfhosted.org> Message-ID: <1612478598.7.0.121565064905.issue43130@roundup.psfhosted.org> Tony Ladd added the comment: Dennis Thanks for the explanation. Sorry to post a fake report. Python is relentlessly logical but sometimes confusing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 17:45:15 2021 From: report at bugs.python.org (Paul Swirhun) Date: Thu, 04 Feb 2021 22:45:15 +0000 Subject: [issue43131] MMAP duplicate reads and writes on ARM64 platform Message-ID: <1612478715.17.0.31458005009.issue43131@roundup.psfhosted.org> New submission from Paul Swirhun : mmap (example, as used in python-periphery) duplicates writes, compared to devmem and a c-periphery on an ARM64 platform (Zynq/Petalinux/Yocto). There are various other reports of duplicated writes using mmap suggesting it is a bug. Example: fd = os.open("/dev/mem", os.O_RDWR | os.O_SYNC) mapping = mmap.mmap(fd, 4096, flags=mmap.MAP_SHARED, prot=(mmap.PROT_READ | mmap.PROT_WRITE), offset=0x80000000) mapping.write(bytearray([0x0,]* 4)) # results in 2 writes, should be 1 mapping.write(bytearray([0x0,]* 8)) # results in 4 writes, should be 1-2 depending on bus width (32b vs 64b) # OR: mapping[0:4] = struct.pack("=L", 0x0) # results in 2 writes, should be 1 ---------- components: Library (Lib) messages: 386501 nosy: psswirhun priority: normal severity: normal status: open title: MMAP duplicate reads and writes on ARM64 platform versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 18:02:15 2021 From: report at bugs.python.org (Paul Swirhun) Date: Thu, 04 Feb 2021 23:02:15 +0000 Subject: [issue43131] MMAP duplicate reads and writes on ARM64 platform In-Reply-To: <1612478715.17.0.31458005009.issue43131@roundup.psfhosted.org> Message-ID: <1612479735.84.0.0858749069189.issue43131@roundup.psfhosted.org> Paul Swirhun added the comment: A workaround is using memoryview (as reported here: https://stackoverflow.com/questions/53492716/python-writing-to-memory-in-a-single-operation). This results in only 1 transaction on the bus for some reason. import os, mmap fd = os.open("/dev/mem", os.O_RDWR | os.O_SYNC) mapping = mmap.mmap(fd, 4096, flags=mmap.MAP_SHARED, prot=(mmap.PROT_READ | mmap.PROT_WRITE), offset=0x80000000) mv = memoryview(mapping) mv_as_int32 = mv.cast('I') # Note "I" works as intended, "L" still results in duplicate writes; "LL" is not an option mv_as_int32[0x0 // 4] = 0xDEADBEEF # this works; results in 1 write issued on the AXI bus ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 18:42:03 2021 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 04 Feb 2021 23:42:03 +0000 Subject: [issue43130] Should this construct throw an exception? In-Reply-To: <1612475547.01.0.970042498842.issue43130@roundup.psfhosted.org> Message-ID: <1612482123.46.0.24059443787.issue43130@roundup.psfhosted.org> Change by Eric V. Smith : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 18:48:01 2021 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 04 Feb 2021 23:48:01 +0000 Subject: [issue43132] Incorrect handling of PyObject_RichCompareBool() in the _zoneinfo module Message-ID: <1612482481.94.0.955863254817.issue43132@roundup.psfhosted.org> New submission from Zackery Spytz : PyObject_RichCompareBool() returns -1 on error, but this case is not handled by the find_in_strong_cache() function. ---------- components: Extension Modules messages: 386503 nosy: ZackerySpytz priority: normal severity: normal status: open title: Incorrect handling of PyObject_RichCompareBool() in the _zoneinfo module versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 18:50:52 2021 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 04 Feb 2021 23:50:52 +0000 Subject: [issue43132] Incorrect handling of PyObject_RichCompareBool() in the _zoneinfo module In-Reply-To: <1612482481.94.0.955863254817.issue43132@roundup.psfhosted.org> Message-ID: <1612482652.27.0.792186272451.issue43132@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +23251 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24450 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 18:52:23 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 04 Feb 2021 23:52:23 +0000 Subject: [issue43102] namedtuple's __new__.__globals__['__builtins__'] is None In-Reply-To: <1612277204.9.0.79430264778.issue43102@roundup.psfhosted.org> Message-ID: <1612482743.38.0.780600306528.issue43102@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset b6d68aa08baebb753534a26d537ac3c0d2c21c79 by Raymond Hettinger in branch 'master': bpo-43102: Set namedtuple __new__'s internal builtins to a dict. (GH-24439) https://github.com/python/cpython/commit/b6d68aa08baebb753534a26d537ac3c0d2c21c79 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 18:52:32 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 04 Feb 2021 23:52:32 +0000 Subject: [issue43102] namedtuple's __new__.__globals__['__builtins__'] is None In-Reply-To: <1612277204.9.0.79430264778.issue43102@roundup.psfhosted.org> Message-ID: <1612482752.83.0.84231163202.issue43102@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +23252 pull_request: https://github.com/python/cpython/pull/24452 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 19:12:45 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 05 Feb 2021 00:12:45 +0000 Subject: [issue43102] namedtuple's __new__.__globals__['__builtins__'] is None In-Reply-To: <1612277204.9.0.79430264778.issue43102@roundup.psfhosted.org> Message-ID: <1612483965.05.0.294598902878.issue43102@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 29584aa6acbc70091dc23636db51ee1696e65072 by Miss Islington (bot) in branch '3.9': bpo-43102: Set namedtuple __new__'s internal builtins to a dict. (GH-24439) (GH-24452) https://github.com/python/cpython/commit/29584aa6acbc70091dc23636db51ee1696e65072 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 19:13:47 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 05 Feb 2021 00:13:47 +0000 Subject: [issue43102] namedtuple's __new__.__globals__['__builtins__'] is None In-Reply-To: <1612277204.9.0.79430264778.issue43102@roundup.psfhosted.org> Message-ID: <1612484027.28.0.910233466314.issue43102@roundup.psfhosted.org> Raymond Hettinger added the comment: Okay, it's done. Thanks for the motivating use case. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 20:54:52 2021 From: report at bugs.python.org (Kubilay Kocak) Date: Fri, 05 Feb 2021 01:54:52 +0000 Subject: [issue43068] test_subprocess: test_specific_shell() fails on AMD64 FreeBSD Shared 3.x In-Reply-To: <1611956940.56.0.594651223595.issue43068@roundup.psfhosted.org> Message-ID: <1612490092.8.0.695614576716.issue43068@roundup.psfhosted.org> Kubilay Kocak added the comment: The failure mode is a generic "an external dependency expected by a test suite is not available or doesn't run", applying to many core Python test that invokes an external utilities, and not specific to OS. As far as I'm aware, the best practice and recommendation for these cases is that 'tests should not test dependencies', and to skip/skipif these (external) dependencies are not available or fail to load/run. Of course, the call is yours :) I'll rebuild gdb/bash if you decide you don't want the error to remain to test improving the test suite. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 22:48:07 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 05 Feb 2021 03:48:07 +0000 Subject: [issue43097] IndexError msg of random.choice() not helpful In-Reply-To: <1612238872.93.0.407149232495.issue43097@roundup.psfhosted.org> Message-ID: <1612496887.27.0.683204116474.issue43097@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 22:53:56 2021 From: report at bugs.python.org (Inada Naoki) Date: Fri, 05 Feb 2021 03:53:56 +0000 Subject: [issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred In-Reply-To: <1542888764.29.0.788709270274.issue35295@psf.upfronthosting.co.za> Message-ID: <1612497236.86.0.523813470935.issue35295@roundup.psfhosted.org> Inada Naoki added the comment: > 1a. Declare both functions equally acceptable. Remove comments claiming that PyUnicode_AsUTF8AndSize() should be avoided. > > 1b. 1a, and change the implementation of PyUnicode_AsUTF8AndSize() to avoid allocating the string twice if it needs to be materialized, so that PyUnicode_AsUTF8AndSize() is never significantly slower than PyUnicode_AsUTF8String(). I think 1b is the best approach. PyUnicode_AsUTF8AndSize() is optimized already. See GH-18327. And it becomes limited API. See bpo-41784. So we should just remove the outdated comments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 22:54:11 2021 From: report at bugs.python.org (Inada Naoki) Date: Fri, 05 Feb 2021 03:54:11 +0000 Subject: [issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred In-Reply-To: <1542888764.29.0.788709270274.issue35295@psf.upfronthosting.co.za> Message-ID: <1612497251.81.0.79574176226.issue35295@roundup.psfhosted.org> Change by Inada Naoki : ---------- versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 22:55:35 2021 From: report at bugs.python.org (Inada Naoki) Date: Fri, 05 Feb 2021 03:55:35 +0000 Subject: [issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred In-Reply-To: <1542888764.29.0.788709270274.issue35295@psf.upfronthosting.co.za> Message-ID: <1612497335.16.0.568255084842.issue35295@roundup.psfhosted.org> Change by Inada Naoki : ---------- keywords: +patch pull_requests: +23253 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24453 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 23:21:39 2021 From: report at bugs.python.org (Inada Naoki) Date: Fri, 05 Feb 2021 04:21:39 +0000 Subject: [issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred In-Reply-To: <1542888764.29.0.788709270274.issue35295@psf.upfronthosting.co.za> Message-ID: <1612498899.25.0.646473221875.issue35295@roundup.psfhosted.org> Inada Naoki added the comment: New changeset d938816acf71a74f1bd13fdf0534b3d9ea962e44 by Inada Naoki in branch 'master': bpo-35295: Remove outdated comment. (GH-24453) https://github.com/python/cpython/commit/d938816acf71a74f1bd13fdf0534b3d9ea962e44 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 23:22:00 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Feb 2021 04:22:00 +0000 Subject: [issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred In-Reply-To: <1542888764.29.0.788709270274.issue35295@psf.upfronthosting.co.za> Message-ID: <1612498920.72.0.170455782809.issue35295@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +23254 pull_request: https://github.com/python/cpython/pull/24454 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 23:36:25 2021 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 05 Feb 2021 04:36:25 +0000 Subject: [issue43133] Accept file mode "rw" to open-or-create a file and seek to the start Message-ID: <1612499785.75.0.541398375839.issue43133@roundup.psfhosted.org> New submission from Nick Coghlan : After yet again trying to use "rw" to open a file in read/write mode, having it fail, and then having to look up the docs to remind myself that the correct spelling is "r+", I'm finally filing this to suggest we make the obvious "rw" spelling actually work. Rather than making it an alias for any of the existing modes, I'd suggest that it combine the features of "r+" and "a+": * like "r+" it would start the file pointer at the beginning of the file * like "a+" it would create the file if it didn't exist, while leaving existing files alone ---------- messages: 386510 nosy: ncoghlan priority: low severity: normal status: open title: Accept file mode "rw" to open-or-create a file and seek to the start type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 23:44:24 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Feb 2021 04:44:24 +0000 Subject: [issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred In-Reply-To: <1542888764.29.0.788709270274.issue35295@psf.upfronthosting.co.za> Message-ID: <1612500264.63.0.827275220184.issue35295@roundup.psfhosted.org> miss-islington added the comment: New changeset b0b01811bb28d3d6c70846e47fa2f6ba03ed03f1 by Miss Islington (bot) in branch '3.9': bpo-35295: Remove outdated comment. (GH-24453) https://github.com/python/cpython/commit/b0b01811bb28d3d6c70846e47fa2f6ba03ed03f1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 23:46:47 2021 From: report at bugs.python.org (Josh Rosenberg) Date: Fri, 05 Feb 2021 04:46:47 +0000 Subject: [issue43119] asyncio.Queue.put never yields if the queue is unbounded In-Reply-To: <1612381282.49.0.371079618361.issue43119@roundup.psfhosted.org> Message-ID: <1612500407.16.0.769286007772.issue43119@roundup.psfhosted.org> Josh Rosenberg added the comment: Making literally every await equivalent to: await asyncio.sleep(0) followed by the actual await (which is effectively what you're proposing when you expect all await to be preemptible) means adding non-trivial overhead to all async operations (asyncio is based on system calls of the select/poll/epoll/kpoll variety, which add meaningful overhead when we're talking about an operation that is otherwise equivalent to an extremely cheap simple collections.deque.append call). It also breaks many reasonable uses of asyncio.wait and asyncio.as_completed, where the caller can reasonably expect to be able to await the known-complete tasks without being preempted (if you know the coroutine is actually done, it could be quite surprising/problematic when you await it and get preempted, potentially requiring synchronization that wouldn't be necessary otherwise). Making all await yield to the event loop would be like releasing the GIL before acquiring an uncontended lock; it makes an extremely cheap operation *much* higher overhead to, at best, fix a problem with poorly designed code. In real life, if whatever you're feeding the queue with is infinite and requires no awaiting to produce each value, you should probably just avoid the queue and have the consumer consume the iterable directly. Or just apply a maximum size to the queue; since the source of data to put is infinite and not-awaitable, there's no benefit to an unbounded queue, you may as well use a bound roughly fitted to the number of consumers, because any further items are just wasting memory well ahead of when it's needed. Point is, regular queue puts only block (and potentially release the GIL early) when they're full or, as a necessary consequence of threading being less predictable than asyncio, when there is contention on the lock protecting the queue internals (which is usually resolved quickly); why would asyncio queues go out of their way to block when they don't need to? ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 4 23:48:09 2021 From: report at bugs.python.org (Inada Naoki) Date: Fri, 05 Feb 2021 04:48:09 +0000 Subject: [issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred In-Reply-To: <1542888764.29.0.788709270274.issue35295@psf.upfronthosting.co.za> Message-ID: <1612500489.85.0.452644371648.issue35295@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 00:00:08 2021 From: report at bugs.python.org (Christoph Anton Mitterer) Date: Fri, 05 Feb 2021 05:00:08 +0000 Subject: [issue39617] max_workers argument to concurrent.futures.ProcessPoolExecutor is not flexible enough In-Reply-To: <1581528064.43.0.461449541499.issue39617@roundup.psfhosted.org> Message-ID: <1612501208.43.0.0781392433339.issue39617@roundup.psfhosted.org> Change by Christoph Anton Mitterer : ---------- nosy: +calestyo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 00:21:11 2021 From: report at bugs.python.org (Fantix King) Date: Fri, 05 Feb 2021 05:21:11 +0000 Subject: [issue39951] Ignore specific errors when closing ssl connections In-Reply-To: <1584070801.03.0.867475481059.issue39951@roundup.psfhosted.org> Message-ID: <1612502471.86.0.0264629871662.issue39951@roundup.psfhosted.org> Fantix King added the comment: This should/will be fixed by GH-17975 I think - like suggested in the OpenSSL comments, the proposed change will always try to run SSL_read() before SSL_shutdown(), even after the close_notify is sent. ---------- nosy: +fantix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 02:44:45 2021 From: report at bugs.python.org (Dima Tisnek) Date: Fri, 05 Feb 2021 07:44:45 +0000 Subject: [issue39951] Ignore specific errors when closing ssl connections In-Reply-To: <1584070801.03.0.867475481059.issue39951@roundup.psfhosted.org> Message-ID: <1612511085.43.0.221893102021.issue39951@roundup.psfhosted.org> Dima Tisnek added the comment: @fantix alas, no: ~/cpython (asvetlov--new-ssl|?1) [1] > ./python.exe ~/repro-39951.py Traceback (most recent call last): File "/Users/dima.tisnek/repro-39951.py", line 33, in asyncio.run(test()) File "/Users/dima.tisnek/cpython/Lib/asyncio/runners.py", line 43, in run return loop.run_until_complete(main) File "/Users/dima.tisnek/cpython/Lib/asyncio/base_events.py", line 642, in run_until_complete return future.result() File "/Users/dima.tisnek/repro-39951.py", line 30, in test await w.wait_closed() File "/Users/dima.tisnek/cpython/Lib/asyncio/streams.py", line 359, in wait_closed await self._protocol._get_close_waiter(self) File "/Users/dima.tisnek/cpython/Lib/asyncio/sslproto.py", line 638, in _do_shutdown self._sslobj.unwrap() File "/Users/dima.tisnek/cpython/Lib/ssl.py", line 948, in unwrap return self._sslobj.shutdown() ssl.SSLError: [SSL: KRB5_S_INIT] application data after close notify (_ssl.c:2730) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 02:45:15 2021 From: report at bugs.python.org (Dima Tisnek) Date: Fri, 05 Feb 2021 07:45:15 +0000 Subject: [issue39951] Ignore specific errors when closing ssl connections In-Reply-To: <1584070801.03.0.867475481059.issue39951@roundup.psfhosted.org> Message-ID: <1612511115.52.0.05041137609.issue39951@roundup.psfhosted.org> Dima Tisnek added the comment: Added 3.10 target. ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 03:08:37 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Feb 2021 08:08:37 +0000 Subject: [issue39951] Ignore specific errors when closing ssl connections In-Reply-To: <1584070801.03.0.867475481059.issue39951@roundup.psfhosted.org> Message-ID: <1612512517.06.0.681836436177.issue39951@roundup.psfhosted.org> Christian Heimes added the comment: 3.7 is in security fix-only mode. APPLICATION_DATA_AFTER_CLOSE_NOTIFY is a protocol violation in any TLS version. It's not related to TLS 1.3. The error occurs when one side wants to close the connection, but the other sides keeps sending user data. It's bug in higher level application could. The ssl module cannot ignore this error condition. https://github.com/openssl/openssl/blob/76624df15fef0725f28a8b9d0f31256946669b1a/ssl/record/rec_layer_s3.c#L1635-L1648 ---------- assignee: -> christian.heimes components: +SSL, asyncio -Extension Modules, Library (Lib) nosy: +asvetlov, yselivanov stage: resolved -> type: -> behavior versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 03:25:47 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 05 Feb 2021 08:25:47 +0000 Subject: [issue43132] Incorrect handling of PyObject_RichCompareBool() in the _zoneinfo module In-Reply-To: <1612482481.94.0.955863254817.issue43132@roundup.psfhosted.org> Message-ID: <1612513547.42.0.471443051221.issue43132@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +23255 pull_request: https://github.com/python/cpython/pull/24457 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 03:25:45 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Feb 2021 08:25:45 +0000 Subject: [issue43132] Incorrect handling of PyObject_RichCompareBool() in the _zoneinfo module In-Reply-To: <1612482481.94.0.955863254817.issue43132@roundup.psfhosted.org> Message-ID: <1612513545.17.0.749451101325.issue43132@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset effaec0bb54f381db8ccfa62514bc26b00946b40 by Zackery Spytz in branch 'master': bpo-43132: Fix incorrect handling of PyObject_RichCompareBool() in _zoneinfo (GH-24450) https://github.com/python/cpython/commit/effaec0bb54f381db8ccfa62514bc26b00946b40 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 03:29:23 2021 From: report at bugs.python.org (Dima Tisnek) Date: Fri, 05 Feb 2021 08:29:23 +0000 Subject: [issue39951] Ignore specific errors when closing ssl connections In-Reply-To: <1584070801.03.0.867475481059.issue39951@roundup.psfhosted.org> Message-ID: <1612513763.24.0.586921297535.issue39951@roundup.psfhosted.org> Dima Tisnek added the comment: Thank you, Christian, for removing 3.7 target, I was not up to date on Python support schedule. Regarding protocol violation, let me explain what I've dug up so far... I am not an expert, please feel free to correct me. TLS up to 1.2 Closing a connection (sending close notifies) closes both directions at once. However, something like a data race is possible: Let's say "our" side sent close notify at t0, which arrives at "their" side at t1, and the packet that "their" sent at "t1" arrives back to "us" at t2. "Their" side can legitimately continue to send data during t0..t1, as it has not received the close notify yet. This data can arrive at "our" side anywhere within t0...t2 period. Current implementation treats this data as protocol violation. I don't believe it should, because the data was legitimate at the time it was sent. It should most likely be discarded though. TLS 1.3 and later Closing a connection only closes one half of the connection, the other half is closed after the round trip. (I'm not clear whether that's always the case, or if that's an option). Current implementation is simply unprepared for half-closed connections (I think) and thus in a way, unprepared for TLS 1.3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 05:03:20 2021 From: report at bugs.python.org (Douglas Raillard) Date: Fri, 05 Feb 2021 10:03:20 +0000 Subject: [issue43102] namedtuple's __new__.__globals__['__builtins__'] is None In-Reply-To: <1612277204.9.0.79430264778.issue43102@roundup.psfhosted.org> Message-ID: <1612519400.09.0.301164758779.issue43102@roundup.psfhosted.org> Douglas Raillard added the comment: Thanks for looking into this issue ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 05:08:33 2021 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Feb 2021 10:08:33 +0000 Subject: [issue39951] Ignore specific errors when closing ssl connections In-Reply-To: <1584070801.03.0.867475481059.issue39951@roundup.psfhosted.org> Message-ID: <1612519713.85.0.4029380971.issue39951@roundup.psfhosted.org> Christian Heimes added the comment: TLS 1.2 has one-way close notify. For example typical HTTP clients like curl send a close_notify and then shut down the TCP connection. HTTP servers may not reply with close_notify or may not wait for the client to confirm the server-side close notify. Python's ssl module does not support one-way close yet. It's an unfortunate limitation of the API that predates my involvement in the ssl module. The unwrap() methods always performs a blocking two-way shutdown. unwrap() calls SSL_shutdown() twice to downgrade a TLS connection to a plain TCP connection. The unwrap() API also requires cooperation from both parties. https://tools.ietf.org/html/rfc5246#section-7.2.1 https://www.openssl.org/docs/manmaster/man3/SSL_shutdown.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 05:12:23 2021 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 05 Feb 2021 10:12:23 +0000 Subject: [issue43107] RotatingFileHandler with multi processes creates too small backup files In-Reply-To: <1612295908.37.0.851347106037.issue43107@roundup.psfhosted.org> Message-ID: <1612519943.86.0.613283541719.issue43107@roundup.psfhosted.org> Vinay Sajip added the comment: This is not a bug. See https://docs.python.org/3/howto/logging-cookbook.html#logging-to-a-single-file-from-multiple-processes You should use SocketHandler or QueueHandler to deal with a situation where multiple processes log to files (whether rotating or not). ---------- nosy: +vinay.sajip resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 05:20:50 2021 From: report at bugs.python.org (Masoud Azizi) Date: Fri, 05 Feb 2021 10:20:50 +0000 Subject: [issue43134] (list have item) instate (item in list) Message-ID: <1612520450.63.0.525292396869.issue43134@roundup.psfhosted.org> New submission from Masoud Azizi : Please append a code to reverse check?like that? print([input() for i in'_'*10] have input()) Instade of: print(input() in [input() for i in'_'*10] ) i want to check that: is last input in the inputs or not! ---------- messages: 386522 nosy: mablue priority: normal severity: normal status: open title: (list have item) instate (item in list) type: behavior versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 05:43:07 2021 From: report at bugs.python.org (Marusoftware) Date: Fri, 05 Feb 2021 10:43:07 +0000 Subject: [issue43135] Can't input Japanese. Message-ID: <1612521787.32.0.923503717653.issue43135@roundup.psfhosted.org> New submission from Marusoftware : Can't input Japanese text to idle on MacOS. I think this caused by "https://core.tcl-lang.org/tk/tktview?name=39de9677aa". So, builtin tk&tcl upgrade is required. ---------- assignee: terry.reedy components: IDLE, Tkinter messages: 386523 nosy: Marusoftware, terry.reedy priority: normal severity: normal status: open title: Can't input Japanese. type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 05:45:10 2021 From: report at bugs.python.org (Marusoftware) Date: Fri, 05 Feb 2021 10:45:10 +0000 Subject: [issue43135] Can't input Japanese on idle (MacOS). In-Reply-To: <1612521787.32.0.923503717653.issue43135@roundup.psfhosted.org> Message-ID: <1612521910.34.0.231643462282.issue43135@roundup.psfhosted.org> Change by Marusoftware : ---------- title: Can't input Japanese. -> Can't input Japanese on idle (MacOS). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 06:01:02 2021 From: report at bugs.python.org (Jan Steinke) Date: Fri, 05 Feb 2021 11:01:02 +0000 Subject: [issue42853] `OverflowError: signed integer is greater than maximum` in ssl.py for files larger than 2GB In-Reply-To: <1610006589.59.0.311109371799.issue42853@roundup.psfhosted.org> Message-ID: <1612522862.12.0.781879001938.issue42853@roundup.psfhosted.org> Change by Jan Steinke : ---------- nosy: +jan-xyz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 06:07:53 2021 From: report at bugs.python.org (E. Paine) Date: Fri, 05 Feb 2021 11:07:53 +0000 Subject: [issue43135] Can't input Japanese on idle (MacOS). In-Reply-To: <1612521787.32.0.923503717653.issue43135@roundup.psfhosted.org> Message-ID: <1612523273.77.0.327379840935.issue43135@roundup.psfhosted.org> E. Paine added the comment: Can you please test to see whether this occurs on 3.10.0a5 using the Universal2 installer? ---------- nosy: +epaine _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 07:03:06 2021 From: report at bugs.python.org (Louis Sautier) Date: Fri, 05 Feb 2021 12:03:06 +0000 Subject: [issue43136] multiprocessing.Queue.get(block=False) can raise queue.Empty on non-empty queue Message-ID: <1612526586.24.0.699070484965.issue43136@roundup.psfhosted.org> New submission from Louis Sautier : Hello, I have noticed that when multiple processes try to simultaneously get items from a multiprocessing queue with block=False, it will raise queue.Empty even though there are still items in it. Adding a multiprocessing lock around calls to Queue.get fixes the problem. Please consider the attached reproducer script and its output: $ ./queue_test.py using processes 2021-02-05T12:48:21.742728 worker 0 got 0, queue size was 100 2021-02-05T12:48:21.743702 worker 1 got 1, queue size was 99 2021-02-05T12:48:21.744059 worker 2 got 2, queue size was 98 2021-02-05T12:48:21.745352 worker 3 got 3, queue size was 97 2021-02-05T12:48:22.743905 worker 1 queue is EMPTY, size was 96 2021-02-05T12:48:22.744064 worker 0 got 4, queue size was 96 2021-02-05T12:48:22.746525 worker 3 queue is EMPTY, size was 95 2021-02-05T12:48:22.749573 worker 2 got 5, queue size was 95 2021-02-05T12:48:23.744474 worker 0 got 6, queue size was 94 2021-02-05T12:48:23.750728 worker 2 got 7, queue size was 93 2021-02-05T12:48:24.745852 worker 0 got 8, queue size was 92 2021-02-05T12:48:24.751827 worker 2 got 9, queue size was 91 [?] I have been able to reproduce this problem with Python 2.7 and 3.5 through 3.9 (3.10 untested). When using threads and queue.Queue instead of their multiprocessing counterparts, the problem is not present ("./queue_test.py thread" ? no spurious exceptions until the queue is actually empty). ---------- components: Library (Lib) files: queue_test.py messages: 386525 nosy: sbraz priority: normal severity: normal status: open title: multiprocessing.Queue.get(block=False) can raise queue.Empty on non-empty queue type: behavior versions: Python 3.6, Python 3.7, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file49791/queue_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 07:04:16 2021 From: report at bugs.python.org (Louis Sautier) Date: Fri, 05 Feb 2021 12:04:16 +0000 Subject: [issue43136] multiprocessing.Queue.get(block=False) can raise queue.Empty on non-empty queue In-Reply-To: <1612526586.24.0.699070484965.issue43136@roundup.psfhosted.org> Message-ID: <1612526656.67.0.868810189389.issue43136@roundup.psfhosted.org> Change by Louis Sautier : ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 07:26:34 2021 From: report at bugs.python.org (Matthias Klose) Date: Fri, 05 Feb 2021 12:26:34 +0000 Subject: [issue43137] webbrowser to support "gio open " Message-ID: <1612527994.14.0.364284995735.issue43137@roundup.psfhosted.org> New submission from Matthias Klose : [forwarded from https://bugs.debian.org/969776] """ rust-webbrowser tries to open URLs via "gvfs-open $URL" and "gnome-open $URL". Both are obsolete; the replacement is "gio open $URL", using the gio(1) tool from the libglib2.0-bin package. The gvfs-open tool was superseded by gio(1) in 2015, and removed from upstream GNOME in 2018. The version in Debian is currently a Debian-specific patch, which we would like to remove before Debian 11. The gnome-open tool was superseded by gvfs-open in 2008, ceased to be part of GNOME releases after about 2011, most recently appeared in a Debian stable release as part of Debian 9, and was finally removed from Debian in 2019. """ The current list of browser could need some cleanup, e.g.: - remove "The Netscape and old Mozilla browsers" - remove grail? - remove gvfs-open - gnome-open? - can't find galeon anymore, but epiphany ---------- components: Library (Lib) messages: 386526 nosy: doko priority: normal severity: normal status: open title: webbrowser to support "gio open " versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 07:33:16 2021 From: report at bugs.python.org (Marcin Kowalczyk) Date: Fri, 05 Feb 2021 12:33:16 +0000 Subject: [issue35295] Please clarify whether PyUnicode_AsUTF8AndSize() or PyUnicode_AsUTF8String() is preferred In-Reply-To: <1542888764.29.0.788709270274.issue35295@psf.upfronthosting.co.za> Message-ID: <1612528396.68.0.205687445368.issue35295@roundup.psfhosted.org> Marcin Kowalczyk added the comment: Thank you! This means that I can continue to use PyUnicode_AsUTF8AndSize() without worries: https://github.com/google/riegeli/commit/17ab36bfdd6cc55f37cfbb729bd43c9cbff4cd22 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 10:20:21 2021 From: report at bugs.python.org (Julien Palard) Date: Fri, 05 Feb 2021 15:20:21 +0000 Subject: [issue43136] multiprocessing.Queue.get(block=False) can raise queue.Empty on non-empty queue In-Reply-To: <1612526586.24.0.699070484965.issue43136@roundup.psfhosted.org> Message-ID: <1612538421.16.0.671325512618.issue43136@roundup.psfhosted.org> Julien Palard added the comment: I can reproduce it in 3.10 too. ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 10:45:06 2021 From: report at bugs.python.org (Marusoftware) Date: Fri, 05 Feb 2021 15:45:06 +0000 Subject: [issue43135] Can't input Japanese on idle (MacOS). In-Reply-To: <1612521787.32.0.923503717653.issue43135@roundup.psfhosted.org> Message-ID: <1612539906.32.0.941469673896.issue43135@roundup.psfhosted.org> Marusoftware added the comment: Thank you for replying. I tried as you said. This issue is not occurs on 3.10.0a5. Thank you very much. But when want to use python 3.8 or 3.9 and others, I can't use this... If you are OK, generate patches. But this is really hard... So, this is optionally. Anyway this issue is solved by using 3.10. But, 3.10 is now preview...I'm wait for release... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 10:46:15 2021 From: report at bugs.python.org (Marusoftware) Date: Fri, 05 Feb 2021 15:46:15 +0000 Subject: [issue43135] Can't input Japanese on idle (MacOS). In-Reply-To: <1612521787.32.0.923503717653.issue43135@roundup.psfhosted.org> Message-ID: <1612539975.23.0.769746977677.issue43135@roundup.psfhosted.org> Change by Marusoftware : ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 11:33:12 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 05 Feb 2021 16:33:12 +0000 Subject: [issue43129] Number of object on stack required by opcode In-Reply-To: <1612473949.46.0.297177775699.issue43129@roundup.psfhosted.org> Message-ID: <1612542792.48.0.657556464203.issue43129@roundup.psfhosted.org> Irit Katriel added the comment: stack_effect is implemented in compile.c because it is used there. If you need something for an application like bytecode, it doesn't need to be in the cpython c code. It can be in the standard library in opcode.py, or even in bytecode library itself. The question is of course how to keep it up to date, and this is pretty much the same problem whether it's part of compile.c, the standard library or an external application. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 12:14:02 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Feb 2021 17:14:02 +0000 Subject: [issue43132] Incorrect handling of PyObject_RichCompareBool() in the _zoneinfo module In-Reply-To: <1612482481.94.0.955863254817.issue43132@roundup.psfhosted.org> Message-ID: <1612545242.58.0.815746778306.issue43132@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 12:14:11 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Feb 2021 17:14:11 +0000 Subject: [issue43132] Incorrect handling of PyObject_RichCompareBool() in the _zoneinfo module In-Reply-To: <1612482481.94.0.955863254817.issue43132@roundup.psfhosted.org> Message-ID: <1612545251.25.0.550246618326.issue43132@roundup.psfhosted.org> Serhiy Storchaka added the comment: New changeset c8b4375fe1aca1188f57ecf482547abd77e3ef91 by Miss Islington (bot) in branch '3.9': bpo-43132: Fix incorrect handling of PyObject_RichCompareBool() in _zoneinfo (GH-24450) (GH-24457) https://github.com/python/cpython/commit/c8b4375fe1aca1188f57ecf482547abd77e3ef91 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 12:33:31 2021 From: report at bugs.python.org (Dirk Herrmann) Date: Fri, 05 Feb 2021 17:33:31 +0000 Subject: [issue43138] [doc] Inconsistent / confusing documentation regarding importing submodules Message-ID: <1612546411.0.0.965001930731.issue43138@roundup.psfhosted.org> New submission from Dirk Herrmann : In the language reference, section "7.11 The import statement" is is explained in the example section: import foo.bar.baz # foo.bar.baz imported, foo bound locally When looking at "5.3. Searching", it is stated that regarding foo.bar.baz: In this case, Python first tries to import foo, then foo.bar, and finally foo.bar.baz. I find this confusing. Assuming that 5.3 is correct, the examples in 7.11 could be improved, like, for the sample line mentioned above: import foo.bar.baz # foo, foo.bar and foo.bar.baz imported, foo bound locally ---------- assignee: docs at python components: Documentation messages: 386532 nosy: Dirk Herrmann, docs at python priority: normal severity: normal status: open title: [doc] Inconsistent / confusing documentation regarding importing submodules type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 12:49:28 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Feb 2021 17:49:28 +0000 Subject: [issue43133] Accept file mode "rw" to open-or-create a file and seek to the start In-Reply-To: <1612499785.75.0.541398375839.issue43133@roundup.psfhosted.org> Message-ID: <1612547368.71.0.756669505682.issue43133@roundup.psfhosted.org> Serhiy Storchaka added the comment: Open modes "r", "r+", "w", "w+", "a", "a+" are supported by C function fopen() and similar functions in other languages. Would not "rw" be confusing? Are there fopen-like functions in other programming languages which support this mode? Are there any examples in the stdlib which would benefit from this feature? The closest that I found is in mailbox and combines "rb+" with "wb+" and "rb", and I seen combinations of "rb+" and "xb+" in third-party code, but they are different cases. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 12:55:26 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Fri, 05 Feb 2021 17:55:26 +0000 Subject: [issue43134] (list have item) instate (item in list) In-Reply-To: <1612520450.63.0.525292396869.issue43134@roundup.psfhosted.org> Message-ID: <1612547726.71.0.881206702369.issue43134@roundup.psfhosted.org> Dennis Sweeney added the comment: You could express this as: a = [input() for i in range(10)] x = input() print(x in a) This is more clear IMO, because if you want to have something happen before something else, it's clearest to put them on separate lines, one after the other. I also don't like using "a have x" to duplicate the behavior of "x in a", because, per PEP 20: "There should be one-- and preferably only one --obvious way to do it." ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 13:00:15 2021 From: report at bugs.python.org (Paul Ganssle) Date: Fri, 05 Feb 2021 18:00:15 +0000 Subject: [issue43132] Incorrect handling of PyObject_RichCompareBool() in the _zoneinfo module In-Reply-To: <1612482481.94.0.955863254817.issue43132@roundup.psfhosted.org> Message-ID: <1612548015.86.0.551694336911.issue43132@roundup.psfhosted.org> Paul Ganssle added the comment: Re-opening because this was merged without tests. @ZackerySpytz would you mind adding tests to hit these error cases? I've spent some time satisfying myself that it's indeed possible, and I've detailed a general outline here: https://github.com/python/cpython/pull/24450#issuecomment-774190609 ---------- nosy: +p-ganssle resolution: fixed -> stage: resolved -> needs patch status: closed -> open type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 13:07:42 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 05 Feb 2021 18:07:42 +0000 Subject: [issue43134] (list have item) instate (item in list) In-Reply-To: <1612520450.63.0.525292396869.issue43134@roundup.psfhosted.org> Message-ID: <1612548462.62.0.203614266978.issue43134@roundup.psfhosted.org> Irit Katriel added the comment: I agree with Dennis' comments. New syntax should make the language more powerful, not reduce 2 lines to a 1-liner. ---------- nosy: +iritkatriel resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 13:38:53 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 05 Feb 2021 18:38:53 +0000 Subject: [issue30915] distutils sometimes assumes wrong C compiler In-Reply-To: <1499895803.65.0.564820520089.issue30915@psf.upfronthosting.co.za> Message-ID: <1612550333.94.0.518318578797.issue30915@roundup.psfhosted.org> Change by Irit Katriel : ---------- components: +Distutils nosy: +dstufft, eric.araujo, steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 14:05:03 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Feb 2021 19:05:03 +0000 Subject: [issue43135] Can't input Japanese on idle (MacOS). In-Reply-To: <1612521787.32.0.923503717653.issue43135@roundup.psfhosted.org> Message-ID: <1612551903.07.0.803160210181.issue43135@roundup.psfhosted.org> Terry J. Reedy added the comment: The change in 3.10 is installing tk 8.6.11 instead of 8.6.8. This would have been or would be backported if and only if Ned and Ronald think it both possible and wise. As with most tkinter issues, this affects IDLE but is not an IDLE issue as such. The universal2 installer is still listed as experimental, though now it seems to be pretty solid. ---------- components: +macOS -IDLE nosy: +ned.deily, ronaldoussoren stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 14:08:12 2021 From: report at bugs.python.org (Felix Yan) Date: Fri, 05 Feb 2021 19:08:12 +0000 Subject: [issue43139] test_ttk test_compound and test_tk test_type fails with Tk 8.6.11.1 Message-ID: <1612552092.14.0.798552929042.issue43139@roundup.psfhosted.org> New submission from Felix Yan : ====================================================================== FAIL: test_compound (tkinter.test.test_ttk.test_widgets.ButtonTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/build/python/src/Python-3.9.1/Lib/tkinter/test/test_ttk/test_widgets.py", line 173, in test_compound self.checkEnumParam(widget, 'compound', File "/build/python/src/Python-3.9.1/Lib/tkinter/test/widget_tests.py", line 152, in checkEnumParam self.checkInvalidParam(widget, name, '', File "/build/python/src/Python-3.9.1/Lib/tkinter/test/widget_tests.py", line 75, in checkInvalidParam widget[name] = value AssertionError: TclError not raised ===================================================================== FAIL: test_type (tkinter.test.test_tkinter.test_widgets.MenuTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/build/python/src/Python-3.9.1/Lib/tkinter/test/test_tkinter/test_widgets.py", line 1245, in test_type self.checkEnumParam(widget, 'type', File "/build/python/src/Python-3.9.1/Lib/tkinter/test/widget_tests.py", line 152, in checkEnumParam self.checkInvalidParam(widget, name, '', File "/build/python/src/Python-3.9.1/Lib/tkinter/test/widget_tests.py", line 75, in checkInvalidParam widget[name] = value AssertionError: TclError not raised ---------------------------------------------------------------------- ---------- components: Tests messages: 386538 nosy: felixonmars priority: normal severity: normal status: open title: test_ttk test_compound and test_tk test_type fails with Tk 8.6.11.1 type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 14:52:14 2021 From: report at bugs.python.org (Spencer Nelson) Date: Fri, 05 Feb 2021 19:52:14 +0000 Subject: [issue43119] asyncio.Queue.put never yields if the queue is unbounded In-Reply-To: <1612381282.49.0.371079618361.issue43119@roundup.psfhosted.org> Message-ID: <1612554734.9.0.110196707322.issue43119@roundup.psfhosted.org> Spencer Nelson added the comment: Josh, > Making literally every await equivalent to: > > await asyncio.sleep(0) > > followed by the actual await (which is effectively what you're proposing when you expect all await to be preemptible) means adding non-trivial overhead to all async operations (asyncio is based on system calls of the select/poll/epoll/kpoll variety, which add meaningful overhead when we're talking about an operation that is otherwise equivalent to an extremely cheap simple collections.deque.append call). A few things: First, I don't think I proposed that. I was simply saying that my expectations on behavior were incorrect, which points towards documentation. Second, I don't think making a point "preemptible" is the same as actually executing a cooperative-style yield to the scheduler. I just expected that it would always be in the cards - that it would always be a potential point where I'd get scheduled away. Third, I don't think that await asyncio.sleep(0) triggers a syscall, but I certainly could be mistaken. It looks to me like it is special-cased in asyncio, from my reading of the source. Again - could be wrong. Fourth, I think that the idea of non-cooperative preempting scheduling is not nearly as bizarre as you make it sound. There's certainly plenty of prior art on preemptive schedulers out there. Go uses a sort of partial preemption at function call sites *because* it's a particularly efficient way to do things. But anyway - I didn't really want to discuss this. As I said above, it's obviously a way way way bigger design discussion than my specific issue. > It also breaks many reasonable uses of asyncio.wait and asyncio.as_completed, where the caller can reasonably expect to be able to await the known-complete tasks without being preempted (if you know the coroutine is actually done, it could be quite surprising/problematic when you await it and get preempted, potentially requiring synchronization that wouldn't be necessary otherwise). I think this cuts both ways. Without reading the source code of asyncio.Queue, I don't see how it's possible to know whether its put method yields. Because of this, I tend to assume synchronization is necessary everywhere. The way I know for sure that a function call can complete without yielding is supposed to be that it isn't an `async` function, right? That's why asyncio.Queue.put_nowait exists and isn't asynchronous. > In real life, if whatever you're feeding the queue with is infinite and requires no awaiting to produce each value, you should probably just avoid the queue and have the consumer consume the iterable directly. The stuff I'm feeding the queue doesn't require awaiting, but I *wish* it did. It's just a case of not having the libraries for asynchronicity yet on the source side. I was hoping that the queue would let me pace my work in a way that would let me do more concurrent work. > Or just apply a maximum size to the queue; since the source of data to put is infinite and not-awaitable, there's no benefit to an unbounded queue, you may as well use a bound roughly fitted to the number of consumers, because any further items are just wasting memory well ahead of when it's needed. The problem isn't really that put doesn't yield for unbounded queues - it's that put doesn't yield *unless the queue is full*. That means that, if I use a very high maximum size for the queue, I'll still spend a big chunk of time filling up the queue, and only then will consumers start doing work. I could pick a small queue bound, but then I'm more likely to waste time doing nothing if consumers are slower than the producer - I'll sit there with a full-but-tiny queue. Work-units in the queue can take wildly different amounts of time, so consumers will often be briefly slow, so the producer races ahead - until it hits its tiny limit. But then new work units arrive, and so the consumers are fast again - and they're quickly starved for work because the producer didn't build a good backlog. So, the problem still remains, if work takes an uncertain amount of time which would seem to be the common reason for using a queue in the first place. > Point is, regular queue puts only block (and potentially release the GIL early) when they're full or, as a necessary consequence of threading being less predictable than asyncio, when there is contention on the lock protecting the queue internals (which is usually resolved quickly); why would asyncio queues go out of their way to block when they don't need to? I think you have it backwards. asyncio.Queue.put *always* blocks other coroutines' execution for unbounded queues. Why do they always block? If I wanted that, I wouldn't use anything in asyncio.Queue. I'd just use a collections.deque. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 16:29:13 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 05 Feb 2021 21:29:13 +0000 Subject: [issue30915] distutils sometimes assumes wrong C compiler In-Reply-To: <1499895803.65.0.564820520089.issue30915@psf.upfronthosting.co.za> Message-ID: <1612560553.8.0.597123045316.issue30915@roundup.psfhosted.org> Steve Dower added the comment: Existing distutils bugs are closed under PEP 632. New issues will be considered if they are release blockers, but (by definition) no existing issue meets this bar. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 17:24:45 2021 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 05 Feb 2021 22:24:45 +0000 Subject: =?utf-8?q?=5Bissue42919=5D_Blank_in_multiline_=E2=80=9Cif_expressions?= =?utf-8?q?=E2=80=9D_will_lead_to_EOF_errors?= In-Reply-To: <1610517945.87.0.376741027563.issue42919@roundup.psfhosted.org> Message-ID: <1612563885.06.0.0731598719484.issue42919@roundup.psfhosted.org> Lysandros Nikolaou added the comment: I can't really understand if this should be considered a bug or not. It's definitely consistent with 3.8 and my inclination that it is not. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 18:11:24 2021 From: report at bugs.python.org (Lysandros Nikolaou) Date: Fri, 05 Feb 2021 23:11:24 +0000 Subject: [issue42918] Nested multi-line expression will lead to "compile()" fails In-Reply-To: <1610517717.73.0.740461753555.issue42918@roundup.psfhosted.org> Message-ID: <1612566684.93.0.8227914633.issue42918@roundup.psfhosted.org> Lysandros Nikolaou added the comment: Thanks a lot for the report, Xinmeng! This is a bug in how we're checking for bad single statements in bad_single_statement and it's not trivial to fix due to the string shenanigans we're doing there in newline_in_string, which does not account for many edge cases. I'll try to dig a bit deeper during the weekend. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 5 18:23:10 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 05 Feb 2021 23:23:10 +0000 Subject: =?utf-8?q?=5Bissue42919=5D_Blank_in_multiline_=E2=80=9Cif_expressions?= =?utf-8?q?=E2=80=9D_will_lead_to_EOF_errors?= In-Reply-To: <1610517945.87.0.376741027563.issue42919@roundup.psfhosted.org> Message-ID: <1612567390.33.0.0968133130773.issue42919@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Yeah, I also believe this doesn't look like a bug and the fact that is consistent with 3.8 makes me more confident to say that is not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 00:16:14 2021 From: report at bugs.python.org (Cake Xu) Date: Sat, 06 Feb 2021 05:16:14 +0000 Subject: [issue43140] build-in open() doesn't use whatever locale.getpreferredencoding() returns as default encoding. Message-ID: <1612588574.22.0.21834147948.issue43140@roundup.psfhosted.org> New submission from Cake Xu : In the document about build-in function open() https://docs.python.org/3/library/functions.html#open, it says that "encoding is the name of the encoding used to decode or encode the file. This should only be used in text mode. The default encoding is platform dependent (whatever locale.getpreferredencoding() returns), but any text encoding supported by Python can be used. See the codecs module for the list of supported encodings. " But as I tried, I found that after I set locale using locale.setlocale(), the default encoding used by open() was changed and thus sometimes led to a UnicodeDecodeError. So I think that the default encoding used by open() is the second element of whatever locale returned by locale.getlocale(). ---------- assignee: docs at python components: Documentation messages: 386544 nosy: docs at python, smallbigcake priority: normal severity: normal status: open title: build-in open() doesn't use whatever locale.getpreferredencoding() returns as default encoding. versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 00:16:32 2021 From: report at bugs.python.org (Cake Xu) Date: Sat, 06 Feb 2021 05:16:32 +0000 Subject: [issue43140] build-in open() doesn't use whatever locale.getpreferredencoding() returns as default encoding. In-Reply-To: <1612588574.22.0.21834147948.issue43140@roundup.psfhosted.org> Message-ID: <1612588592.57.0.175042471371.issue43140@roundup.psfhosted.org> Change by Cake Xu : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 00:32:51 2021 From: report at bugs.python.org (Vladimir Feinberg) Date: Sat, 06 Feb 2021 05:32:51 +0000 Subject: [issue43048] Printing RecursionError results in RecursionError In-Reply-To: <1611798337.38.0.626995188313.issue43048@roundup.psfhosted.org> Message-ID: <1612589571.15.0.887430604504.issue43048@roundup.psfhosted.org> Change by Vladimir Feinberg : ---------- keywords: +patch pull_requests: +23256 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/24460 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 00:46:54 2021 From: report at bugs.python.org (Evgeny Naumov) Date: Sat, 06 Feb 2021 05:46:54 +0000 Subject: [issue43141] `asdict` fails with frozen dataclass keys; tries to use raw dict form as key Message-ID: <1612590414.63.0.106701107905.issue43141@roundup.psfhosted.org> New submission from Evgeny Naumov : A simple example is documented here: https://github.com/samuelcolvin/pydantic/issues/2233 but it doesn't look like it was actually filed as a bug against CPython... Copy paste of the minimal reproducing example: from dataclasses import asdict, dataclass @dataclass(eq=True, frozen=True) class A: a: str @dataclass(eq=True, frozen=True) class B: b: dict[A, str] asdict(B({A("x"):"y"})) The offending code are these lines in dataclasses.py: elif isinstance(obj, dict): return type(obj)((_asdict_inner(k, dict_factory), _asdict_inner(v, dict_factory)) The _asdict_inner(k, dict_factory) [correctly] turns dataclasses into dicts... which are not hashable. I assume there is a good reason the _asdict_inner function is called on the key, but its failure in this case looks like a (rather annoying!) error. ---------- components: Library (Lib) messages: 386545 nosy: enaumov priority: normal severity: normal status: open title: `asdict` fails with frozen dataclass keys; tries to use raw dict form as key type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 00:50:31 2021 From: report at bugs.python.org (Sanchit) Date: Sat, 06 Feb 2021 05:50:31 +0000 Subject: [issue43142] Do not add duplicate FDs to list in duplicate_for_child() Message-ID: <1612590631.17.0.238793980684.issue43142@roundup.psfhosted.org> New submission from Sanchit : While spawning, if a process having code built on top of Python's multiprocessing module calls multiprocessing.reduction.DupFd() (in /Lib/multiprocessing/reduction.py) multiple times on the same File descriptor by mistake, then it ends up invoking duplicate_for_child(fd)) of the class Popen, which, in turn, adds a duplicate FD to a list. This list is then used in spawnv_passfds() in /Lib/multiprocessing/util.py, which uses that list as an argument in a call of _posixsubprocess.fork_exec(). In Modules/_posixsubprocess.c, checks exist to ensure that all the FDs in the list are unique, positive, and in a sorted order. If duplicate entries are found, a ValueError: bad value(s) in fds_to_keep exception is raised, and the execution is terminated. Even if this exception were somehow handled, a developer can't change the aforementioned FD list in Python without breaking modularity. It's better to let developers get away with calling multiprocessing.reduction.DupFd() (in /Lib/multiprocessing/reduction.py) on by not accepting duplicate entries in the first place, so that spawning a process can be successful. ---------- components: Library (Lib) messages: 386546 nosy: sanchit priority: normal severity: normal status: open title: Do not add duplicate FDs to list in duplicate_for_child() type: behavior versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 00:54:24 2021 From: report at bugs.python.org (Sanchit) Date: Sat, 06 Feb 2021 05:54:24 +0000 Subject: [issue43142] Do not add duplicate FDs to list in duplicate_for_child() In-Reply-To: <1612590631.17.0.238793980684.issue43142@roundup.psfhosted.org> Message-ID: <1612590864.38.0.683865013112.issue43142@roundup.psfhosted.org> Change by Sanchit : ---------- keywords: +patch pull_requests: +23257 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24461 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 01:07:09 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 06 Feb 2021 06:07:09 +0000 Subject: [issue43141] `asdict` fails with frozen dataclass keys; tries to use raw dict form as key In-Reply-To: <1612590414.63.0.106701107905.issue43141@roundup.psfhosted.org> Message-ID: <1612591629.92.0.327416860099.issue43141@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 01:39:41 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 06 Feb 2021 06:39:41 +0000 Subject: [issue43140] build-in open() doesn't use whatever locale.getpreferredencoding() returns as default encoding. In-Reply-To: <1612588574.22.0.21834147948.issue43140@roundup.psfhosted.org> Message-ID: <1612593581.97.0.493609874304.issue43140@roundup.psfhosted.org> Eryk Sun added the comment: On most platforms, unless UTF-8 mode is enabled, locale.getpreferredencoding(False) returns the LC_CTYPE encoding of the current locale. For example, in Linux: >>> locale.setlocale(locale.LC_CTYPE, 'en_US.UTF-8') 'en_US.UTF-8' >>> locale.getpreferredencoding(False) 'UTF-8' >>> locale.setlocale(locale.LC_CTYPE, 'en_US.iso-88591') 'en_US.iso-88591' >>> locale.getpreferredencoding(False) 'ISO-8859-1' If the designers of the io module had wanted the preferred encoding to always be the default encoding from setlocale(LC_CTYPE, ""), they would have used and documented locale.getpreferredencoding(True). --- In Windows, locale.getpreferredencoding(False) always returns the default encoding from locale.getdefaultlocale(), which is the process active (ANSI) code page. Changing it to track the LC_CTYPE locale would be convenient for applications and scripts running in Windows 10, for which the CRT's POSIX locale implementation has supported UTF-8 since spring of 2018. The base behavior can't be changed at this point, but a -X option and/or environment variable could enable locale.getpreferredencoding(False) -- i.e. locale._get_locale_encoding() -- to return the current LC_CTYPE encoding in Windows, as it does in POSIX. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 01:42:38 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 06 Feb 2021 06:42:38 +0000 Subject: [issue43140] built-in open() doesn't use locale.getpreferredencoding() as the default encoding In-Reply-To: <1612588574.22.0.21834147948.issue43140@roundup.psfhosted.org> Message-ID: <1612593758.3.0.166978473588.issue43140@roundup.psfhosted.org> Change by Eryk Sun : ---------- components: +IO, Library (Lib) title: build-in open() doesn't use whatever locale.getpreferredencoding() returns as default encoding. -> built-in open() doesn't use locale.getpreferredencoding() as the default encoding versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 02:21:46 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Feb 2021 07:21:46 +0000 Subject: [issue43132] Incorrect handling of PyObject_RichCompareBool() in the _zoneinfo module In-Reply-To: <1612482481.94.0.955863254817.issue43132@roundup.psfhosted.org> Message-ID: <1612596106.88.0.568510313469.issue43132@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 02:23:21 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Feb 2021 07:23:21 +0000 Subject: [issue43132] Incorrect handling of PyObject_RichCompareBool() in the _zoneinfo module In-Reply-To: <1612482481.94.0.955863254817.issue43132@roundup.psfhosted.org> Message-ID: <1612596201.53.0.925657555436.issue43132@roundup.psfhosted.org> Serhiy Storchaka added the comment: Sorry, I thought I just forgot to close this issue. ---------- resolution: fixed -> stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 02:43:35 2021 From: report at bugs.python.org (Sunny) Date: Sat, 06 Feb 2021 07:43:35 +0000 Subject: [issue42804] Unable to compile the cpython code x86 windows In-Reply-To: <1609524007.28.0.23660757957.issue42804@roundup.psfhosted.org> Message-ID: <1612597415.03.0.552825785626.issue42804@roundup.psfhosted.org> Sunny added the comment: Got it fixed with following the below steps a. Delete external folder b. Run the below build command build.bat -k -E -p x64 -k killed the existing python build process -E skipped the external libraries fetching -p mentioned the platform closing the ticket as it worked ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 02:53:32 2021 From: report at bugs.python.org (Cake Xu) Date: Sat, 06 Feb 2021 07:53:32 +0000 Subject: [issue43140] built-in open() doesn't use locale.getpreferredencoding() as the default encoding In-Reply-To: <1612588574.22.0.21834147948.issue43140@roundup.psfhosted.org> Message-ID: <1612598012.65.0.82764402281.issue43140@roundup.psfhosted.org> Cake Xu added the comment: Thank Eryk for answering my question. So I get it now. I use this in Linux. If my understanding is right, the open() will invoke locale.getpreferredencoding() by setting the do_setlocale=False -- i.e. locale.getpreferredencoding(False) -- to avoid invoking setlocale(LC_CTYPE, ""). Previously I had thought it's locale.getpreferredencoding(True) that invoked. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 03:13:07 2021 From: report at bugs.python.org (Paul Sokolovsky) Date: Sat, 06 Feb 2021 08:13:07 +0000 Subject: [issue43143] Allow multiple assignment (i.e. tuple on LHS) in walrus operator Message-ID: <1612599187.49.0.372598222393.issue43143@roundup.psfhosted.org> New submission from Paul Sokolovsky : Currently (CPython 3.10.0a4) having a tuple on left-hand side of assignment expression/operator (aka walrus operator) is not allowed: >>> ((a, b) := (1, 2)) File "", line 1 ((a, b) := (1, 2)) ^ SyntaxError: cannot use assignment expressions with tuple As far as can tell, there's no explicit consideration of this case in the PEP572. There closest it has is under the https://www.python.org/dev/peps/pep-0572/#differences-between-assignment-expressions-and-assignment-statements section, "Iterable packing and unpacking (both regular or extended forms) are not supported". But note that the usecase presented above is better seen as "parallel assignment", not as "iterable unpacking". Next issue: PEP572 puts heavy emphasis on the "named expression" usecase. I would like to emphasize, that "naming an expression" seems like *just one of usecases* for assignment operator. First and foremost assignment operator is, well, assignment. With that in mind, ((a, b) := (1, 2)) is compatible with "naming expressions" idea, it "gives names" to multiple expressions at once. There's a temptation to suggest that the above could be rewritten as: ((a := 1), (b := 2)) , and for the "naming" usecase, that would be true. But as noted above, "naming" is just *one* of the usecases. Following can't be "sequentialized" like that: ((b, a) := (a, b)) And for as long as someone considers the following acceptable: func(a := val) There's little point to prohibit the following: min((b, a) := (a, b)) And that's the main argument - consistency between assignment statement and assignment operator. For as long as this is allowed: a, b = b, c it makes sense to allow: ((a, b) := (b,c)) (Extra parens account for different in grammar and precedence for the operator). This issue is posted to capture discussion initially posted to python-ideas/python-dev: https://mail.python.org/archives/list/python-ideas at python.org/thread/6IFDG7PAFPHVPGULANOQDAHP2X743HCE/ https://mail.python.org/archives/list/python-ideas at python.org/thread/X3LNCCO6PHTLAQXHEAP6T3FFW5ZW5GR5/ https://mail.python.org/archives/list/python-dev at python.org/thread/6IFDG7PAFPHVPGULANOQDAHP2X743HCE/ , to serve as a reference to whoever may be searching the bugtracker for this case. ---------- components: Interpreter Core messages: 386551 nosy: pfalcon priority: normal severity: normal status: open title: Allow multiple assignment (i.e. tuple on LHS) in walrus operator _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 03:34:12 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Feb 2021 08:34:12 +0000 Subject: [issue43071] IDLE: Windows 7 - Trackpad two-finger vertical scrolling is not recognized In-Reply-To: <1611977169.85.0.900313540733.issue43071@roundup.psfhosted.org> Message-ID: <1612600452.34.0.296127951333.issue43071@roundup.psfhosted.org> Terry J. Reedy added the comment: Python has nothing to do with interpreting finger movements. ---------- resolution: -> third party stage: -> resolved status: open -> closed versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 03:44:20 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Feb 2021 08:44:20 +0000 Subject: [issue43111] webbrowser.py triggers unwanted XQuartz startup In-Reply-To: <1612344094.48.0.0202402812851.issue43111@roundup.psfhosted.org> Message-ID: <1612601060.48.0.0273470803697.issue43111@roundup.psfhosted.org> Terry J. Reedy added the comment: 3.7 is a few years old and only gets security fixes. Can you either test on current releases or whether code is still same? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 03:50:09 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Feb 2021 08:50:09 +0000 Subject: [issue43127] Unable to install Python 3.9.1 - Windows 10 In-Reply-To: <1612457605.05.0.029864468293.issue43127@roundup.psfhosted.org> Message-ID: <1612601409.78.0.656544131889.issue43127@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- components: +Installation, Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 05:48:06 2021 From: report at bugs.python.org (=?utf-8?q?Arkadiusz_Mi=C5=9Bkiewicz?=) Date: Sat, 06 Feb 2021 10:48:06 +0000 Subject: [issue43144] test_unicodedata: test_normalization uses network but doesn't depend on network resource Message-ID: <1612608486.69.0.149718284588.issue43144@roundup.psfhosted.org> New submission from Arkadiusz Mi?kiewicz : Hello. test_normalization uses network but doesn't depend on network resource, so it tries to run even when network is disabled when running tests (-u-network) FAIL: test_normalization (test.test_unicodedata.NormalizationTest) socket.gaierror: [Errno -3] Temporary failure in name resolution urllib.error.URLError: AssertionError: Could not retrieve http://www.pythontest.net/unicode/13.0.0/NormalizationTest.txt ---------- components: Tests messages: 386554 nosy: arekm priority: normal severity: normal status: open title: test_unicodedata: test_normalization uses network but doesn't depend on network resource type: compile error versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 06:03:40 2021 From: report at bugs.python.org (=?utf-8?q?Arkadiusz_Mi=C5=9Bkiewicz?=) Date: Sat, 06 Feb 2021 11:03:40 +0000 Subject: [issue43144] test_unicodedata: test_normalization uses network but doesn't depend on network resource In-Reply-To: <1612608486.69.0.149718284588.issue43144@roundup.psfhosted.org> Message-ID: <1612609420.9.0.760964054857.issue43144@roundup.psfhosted.org> Change by Arkadiusz Mi?kiewicz : ---------- keywords: +patch Added file: https://bugs.python.org/file49792/unicodedata-no-network.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 06:25:33 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Feb 2021 11:25:33 +0000 Subject: [issue43111] webbrowser.py triggers unwanted XQuartz startup In-Reply-To: <1612344094.48.0.0202402812851.issue43111@roundup.psfhosted.org> Message-ID: <1612610733.69.0.685990515504.issue43111@roundup.psfhosted.org> Ronald Oussoren added the comment: The same code is present in trunk. I'm in favour of disabling usage of X11 browsers of macOS, that's almost certainly not what users want. I no longer have XQuartz installed on my machine, but when I did I only used it for running X11 GUIs on remote Linux systems. What I'm not entirely sure about: is this something we should back port or just apply to the trunk (3.10)? This is a behaviour change and as such I'd be inclined to only apply to trunk. ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 06:31:24 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Feb 2021 11:31:24 +0000 Subject: [issue43135] Can't input Japanese on idle (MacOS). In-Reply-To: <1612521787.32.0.923503717653.issue43135@roundup.psfhosted.org> Message-ID: <1612611084.43.0.859219555771.issue43135@roundup.psfhosted.org> Ronald Oussoren added the comment: As the issue is gone with the 3.10 universal2 installer it should also be gone with the 3.9.1 universal installer. I'd expect that the difference is in the use of a newer version of Tcl/Tk. We haven't used the newer versions of Tcl/Tk with the regular 3.9 installer because we (or rather Ned) have run into various issues when building recent versions of Tcl/Tk on ancient versions of macOS. The universal2 installer is build on macOS 11 and hence avoids those build issues. Testing if Tcl/Tk 8.6.11 works correctly when build on macOS 10.9 could be an interesting experiment if someone is up to this, but is something I don't intend to do. I rarely use Tkinter myself and this requires manual testing to verify behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 07:18:37 2021 From: report at bugs.python.org (hans.meine) Date: Sat, 06 Feb 2021 12:18:37 +0000 Subject: [issue43111] webbrowser.py triggers unwanted XQuartz startup In-Reply-To: <1612344094.48.0.0202402812851.issue43111@roundup.psfhosted.org> Message-ID: <1612613917.65.0.0675040843039.issue43111@roundup.psfhosted.org> hans.meine added the comment: I was trying to be very honest, because I am still running 3.7 for production. However, I have carefully checked and the webbrowser.py has only seen (clearly) unrelated changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 08:02:37 2021 From: report at bugs.python.org (Boris Staletic) Date: Sat, 06 Feb 2021 13:02:37 +0000 Subject: [issue43145] Leak of locks in a subprocess Message-ID: <1612616557.31.0.756365409942.issue43145@roundup.psfhosted.org> New submission from Boris Staletic : The following C code leaks 7 locks allocated with PyThread_allocate_lock: #include int main() { Py_Initialize(); PyObject* multiprocessing = PyImport_ImportModule("multiprocessing"); PyObject* Process = PyObject_GetAttrString(multiprocessing, "Process"); PyObject* args = PyTuple_New(0); PyObject* kw = PyDict_New(); PyDict_SetItemString(kw, "target", Process); PyObject* p = PyObject_Call(Process, args, kw); PyObject* start = PyObject_GetAttrString(p, "start"); PyObject* join = PyObject_GetAttrString(p, "join"); PyObject_CallNoArgs(start); PyObject_CallNoArgs(join); Py_DECREF(join); Py_DECREF(start); Py_DECREF(p); Py_DECREF(kw); Py_DECREF(args); Py_DECREF(Process); Py_DECREF(multiprocessing); Py_Finalize(); } The following locks are leaked: 1. https://github.com/python/cpython/blob/196d4deaf4810a0bba75ba537dd40f2d71a5a634/Python/pystate.c#L78 2. https://github.com/python/cpython/blob/196d4deaf4810a0bba75ba537dd40f2d71a5a634/Python/pystate.c#L84 3. https://github.com/python/cpython/blob/196d4deaf4810a0bba75ba537dd40f2d71a5a634/Python/pystate.c#L90 4. https://github.com/python/cpython/blob/master/Python/ceval.c#L810 5. https://github.com/python/cpython/blob/master/Python/import.c#L126 6. and 7. https://github.com/python/cpython/blob/master/Modules/_threadmodule.c#L597 In the attachment is valgrind's output. ---------- components: C API files: log messages: 386558 nosy: bstaletic priority: normal severity: normal status: open title: Leak of locks in a subprocess type: resource usage versions: Python 3.10, Python 3.9 Added file: https://bugs.python.org/file49793/log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 08:34:30 2021 From: report at bugs.python.org (Boris Staletic) Date: Sat, 06 Feb 2021 13:34:30 +0000 Subject: [issue43145] Leak of locks in a subprocess In-Reply-To: <1612616557.31.0.756365409942.issue43145@roundup.psfhosted.org> Message-ID: <1612618470.32.0.534032388095.issue43145@roundup.psfhosted.org> Boris Staletic added the comment: Slightly simpler C example: #include int main() { Py_Initialize(); PyObject* multiprocessing = PyImport_ImportModule("multiprocessing"); PyObject* Process = PyObject_GetAttrString(multiprocessing, "Process"); PyObject* p = PyObject_CallNoArgs(Process); PyObject* start = PyObject_GetAttrString(p, "start"); PyObject* join = PyObject_GetAttrString(p, "join"); Py_DECREF(PyObject_CallNoArgs(start)); Py_DECREF(PyObject_CallNoArgs(join)); Py_DECREF(join); Py_DECREF(start); Py_DECREF(p); Py_DECREF(Process); Py_DECREF(multiprocessing); Py_Finalize(); } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 09:33:41 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 06 Feb 2021 14:33:41 +0000 Subject: [issue41552] uuid.uuid1() on certain Macs does not generate unique IDs In-Reply-To: <1597398238.17.0.874687707711.issue41552@roundup.psfhosted.org> Message-ID: <1612622021.92.0.666902113326.issue41552@roundup.psfhosted.org> Ronald Oussoren added the comment: @terrygreeniaus: Are you running macOS 11 on your MacBook Pro? If so, could you verify the hardware address of the iBridge interface? I've checked to libc sources on opensource.apple.com and those don't seem to contain code to treat the iBridge interface specially. I've also attached a small program that dumps the Mac addresses of interfaces using the same mechanism as used by the UUID code in libc. If the Mac address is unchanged they may have done something that affects that code. ---------- Added file: https://bugs.python.org/file49794/dumpaddr.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 10:00:27 2021 From: report at bugs.python.org (Greg) Date: Sat, 06 Feb 2021 15:00:27 +0000 Subject: [issue43071] IDLE: Windows 7 - Trackpad two-finger vertical scrolling is not recognized In-Reply-To: <1611977169.85.0.900313540733.issue43071@roundup.psfhosted.org> Message-ID: <1612623627.99.0.408398755302.issue43071@roundup.psfhosted.org> Greg added the comment: That wasn't the case with https://bugs.python.org/issue34047 Was it not clear that I'm having this issue in (and only in) IDLE? Given that it's the interpreter bundled with python, it seems like it has *something* to do with it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 10:54:16 2021 From: report at bugs.python.org (Florian Bruhin) Date: Sat, 06 Feb 2021 15:54:16 +0000 Subject: [issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py Message-ID: <1612626856.83.0.902540623753.issue43146@roundup.psfhosted.org> New submission from Florian Bruhin : After upgrading to 3.10a5, calling logging.exception("test") results in: --- Logging error --- Traceback (most recent call last): File "/usr/lib/python3.10/logging/__init__.py", line 1094, in emit msg = self.format(record) File "/usr/lib/python3.10/logging/__init__.py", line 938, in format return fmt.format(record) File "/usr/lib/python3.10/logging/__init__.py", line 682, in format record.exc_text = self.formatException(record.exc_info) File "/usr/lib/python3.10/logging/__init__.py", line 632, in formatException traceback.print_exception(ei[0], ei[1], tb, None, sio) File "/usr/lib/python3.10/traceback.py", line 113, in print_exception te = TracebackException(type(value), value, tb, limit=limit, compact=True) File "/usr/lib/python3.10/traceback.py", line 531, in __init__ need_context = cause is None and not e.__suppress_context__ AttributeError: 'NoneType' object has no attribute '__suppress_context__' That method is documented as "This function should only be called from an exception handler.", but the same also happens when e.g. calling traceback.print_exc() (without a current exception) or traceback.print_exception(None, None, None). Both worked fine before 3.10 Alpha 5, the code seems to do None-checks in other places, and typeshed also marks those arguments as Optional. This seems to have been introduced in https://github.com/python/cpython/pull/24179 for bpo-42877. ---------- components: Library (Lib) messages: 386562 nosy: The Compiler, iritkatriel, vinay.sajip priority: normal severity: normal status: open title: 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 11:02:38 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 06 Feb 2021 16:02:38 +0000 Subject: [issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py In-Reply-To: <1612626856.83.0.902540623753.issue43146@roundup.psfhosted.org> Message-ID: <1612627358.72.0.691493653036.issue43146@roundup.psfhosted.org> Irit Katriel added the comment: Thanks, I?ll add the None check. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 12:40:51 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 Feb 2021 17:40:51 +0000 Subject: [issue43143] Allow multiple assignment (i.e. tuple on LHS) in walrus operator In-Reply-To: <1612599187.49.0.372598222393.issue43143@roundup.psfhosted.org> Message-ID: <1612633251.95.0.378868061732.issue43143@roundup.psfhosted.org> Raymond Hettinger added the comment: +0 I think this is with worth considering. Whenever the use case arises, the workaround is awkward. Code would be clearer if assignment expressions were liberalized to allow unpacking. The PEP aspired to avoid complex lvalues that might be hard to read or that had tricky semantics. Unpacking is one the simpler cases and would be mostly harmless and sometimes beneficial (and not just for the uncommon case of wanting simultaneous assignment). ---------- nosy: +emilyemorehouse, gvanrossum, rhettinger, tim.peters versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 12:54:36 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 06 Feb 2021 17:54:36 +0000 Subject: [issue43071] IDLE: Windows 7 - Trackpad two-finger vertical scrolling is not recognized In-Reply-To: <1611977169.85.0.900313540733.issue43071@roundup.psfhosted.org> Message-ID: <1612634076.96.0.874278729283.issue43071@roundup.psfhosted.org> Terry J. Reedy added the comment: This issue appears to be quite different from #34047. The latter partly involved two then recent tcl/tk versions known to still be buggy on Mac. It then determined to be directly a matter of how IDLE was interpreting the delta attribute of tk mousewheel events on Mac, where its meaning is confusingly different from what .delta means on Windows and Linux. For this issue, tk Text scrolling in IDLE is known to work on Windows when using a functioning mouse with functioning wheel and functioning driver. You, on the otherhand, are using a 'notably bad' driver for a non-mouse device. My conclusion is that tcl/tk is not sending proper mousewheel events to tkinter in response vertical double finger motions. I strongly suspect that it is not getting proper mousewheel events from Windows. #34047 was determined to very likely be an IDLE issue when I posted test file tk_scroll.py that had no IDLE code and Tal responded in msg321258 that scrolling worked fine when running that file. (It should work the same whether run directly with Python or from an IDLE editor.) Please run the same test on your system. (The follow-up tk_scroll2.py added a bit of IDLE code to see it *that* were the culprit.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 14:26:08 2021 From: report at bugs.python.org (Greg) Date: Sat, 06 Feb 2021 19:26:08 +0000 Subject: [issue43071] IDLE: Windows 7 - Trackpad two-finger vertical scrolling is not recognized In-Reply-To: <1611977169.85.0.900313540733.issue43071@roundup.psfhosted.org> Message-ID: <1612639568.74.0.398517249627.issue43071@roundup.psfhosted.org> Greg added the comment: I tested out tk_scroll.py (and tk_scroll2.py, for kicks) and I couldn't get that to scroll either. I tried both with and without the ttk line commented. To my shame, it looks like that means you're spot on, and that it's an issue between my machine and tcl/tk. Thanks for the help, and sorry to waste your time! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 14:35:44 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 Feb 2021 19:35:44 +0000 Subject: [issue43147] Remove mention of "subcontrary mean" from the docs Message-ID: <1612640144.35.0.427315747662.issue43147@roundup.psfhosted.org> New submission from Raymond Hettinger : Let's improve the readability of the docs by removing the archaic term "subcontrary mean". That is a bit saying that capacitors are sometimes called condensers. I checked with a stats professor and he had never heard of the term. Likewise, there was no mention in any of my stats books or math references (such as the CRC). The docs for scipy.stats.hmean() do not use the term. Googling for "subcontrary mean" only turns up a cross-reference in Wolfram Alpha". ---------- assignee: steven.daprano components: Documentation messages: 386567 nosy: rhettinger, steven.daprano priority: normal severity: normal status: open title: Remove mention of "subcontrary mean" from the docs versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 14:47:13 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 06 Feb 2021 19:47:13 +0000 Subject: [issue43147] Remove mention of "subcontrary mean" from the docs In-Reply-To: <1612640144.35.0.427315747662.issue43147@roundup.psfhosted.org> Message-ID: <1612640833.96.0.0128251733925.issue43147@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +23260 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24462 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 15:17:45 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 06 Feb 2021 20:17:45 +0000 Subject: [issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py In-Reply-To: <1612626856.83.0.902540623753.issue43146@roundup.psfhosted.org> Message-ID: <1612642665.11.0.268568459904.issue43146@roundup.psfhosted.org> Irit Katriel added the comment: There's another such issue due to PR 22610 // issue 26389: >>> traceback.format_exception(None) Traceback (most recent call last): File "", line 1, in File "C:\Users\User\src\cpython-dev\lib\traceback.py", line 128, in format_exception value, tb = _parse_value_tb(exc, value, tb) File "C:\Users\User\src\cpython-dev\lib\traceback.py", line 94, in _parse_value_tb return exc, exc.__traceback__ AttributeError: 'NoneType' object has no attribute '__traceback__' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 15:35:07 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 06 Feb 2021 20:35:07 +0000 Subject: [issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py In-Reply-To: <1612626856.83.0.902540623753.issue43146@roundup.psfhosted.org> Message-ID: <1612643707.46.0.718426685351.issue43146@roundup.psfhosted.org> Change by Irit Katriel : ---------- nosy: +ZackerySpytz, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 15:55:56 2021 From: report at bugs.python.org (Julian Berman) Date: Sat, 06 Feb 2021 20:55:56 +0000 Subject: [issue43148] Call sys.unraisablehook in the REPL when sys.excepthook is broken Message-ID: <1612644956.56.0.525565389562.issue43148@roundup.psfhosted.org> New submission from Julian Berman : At the REPL, when sys.excepthook is broken (below by setting it to a non-callable), one sees: ``` ? python3.9 julian at Airm Python 3.9.1 (default, Feb 2 2021, 22:54:59) [Clang 12.0.0 (clang-1200.0.32.29)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sys; sys.excepthook = object(); asdf Error in sys.excepthook: TypeError: 'object' object is not callable Original exception was: Traceback (most recent call last): File "", line 1, in NameError: name 'asdf' is not defined ``` The implementation (https://github.com/python/cpython/blob/5f18c223391eef8c7d01241b51a7b2429609dd84/Python/pythonrun.c#L805-L817) seems to do so by reimplementing something like 3.8+'s sys.unraisablehook (well, technically it predates sys.unraisablehook by quite a while). Seems like now that it exists, that code should now call sys.unraisablehook. ---------- messages: 386569 nosy: Julian, vstinner priority: normal severity: normal status: open title: Call sys.unraisablehook in the REPL when sys.excepthook is broken versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 15:58:32 2021 From: report at bugs.python.org (Carl Friedrich Bolz-Tereick) Date: Sat, 06 Feb 2021 20:58:32 +0000 Subject: [issue43148] Call sys.unraisablehook in the REPL when sys.excepthook is broken In-Reply-To: <1612644956.56.0.525565389562.issue43148@roundup.psfhosted.org> Message-ID: <1612645112.08.0.901396799479.issue43148@roundup.psfhosted.org> Change by Carl Friedrich Bolz-Tereick : ---------- nosy: +Carl.Friedrich.Bolz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 16:12:52 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 06 Feb 2021 21:12:52 +0000 Subject: [issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py In-Reply-To: <1612626856.83.0.902540623753.issue43146@roundup.psfhosted.org> Message-ID: <1612645972.11.0.973473921098.issue43146@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +patch pull_requests: +23261 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24463 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 17:54:08 2021 From: report at bugs.python.org (Andre Roberge) Date: Sat, 06 Feb 2021 22:54:08 +0000 Subject: [issue43149] Misleading error message for except with missing parens (3.10.a5) Message-ID: <1612652048.28.0.775062089825.issue43149@roundup.psfhosted.org> New submission from Andre Roberge : The following: try: pass except ValueError, NameError as err: pass results in: except ValueError, NameError as err: ^ SyntaxError: expected ':' However, what is missing here are some parentheses surrounding the exception types. ---------- messages: 386570 nosy: aroberge priority: normal severity: normal status: open title: Misleading error message for except with missing parens (3.10.a5) type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 18:40:03 2021 From: report at bugs.python.org (Yannick Jadoul) Date: Sat, 06 Feb 2021 23:40:03 +0000 Subject: [issue43145] Leak of locks in a subprocess In-Reply-To: <1612616557.31.0.756365409942.issue43145@roundup.psfhosted.org> Message-ID: <1612654803.41.0.39877395474.issue43145@roundup.psfhosted.org> Change by Yannick Jadoul : ---------- nosy: +YannickJadoul _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 20:01:52 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 07 Feb 2021 01:01:52 +0000 Subject: [issue43149] Misleading error message for except with missing parens (3.10.a5) In-Reply-To: <1612652048.28.0.775062089825.issue43149@roundup.psfhosted.org> Message-ID: <1612659712.88.0.890031837313.issue43149@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +lys.nikolaou, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 21:16:14 2021 From: report at bugs.python.org (Kumar Makala) Date: Sun, 07 Feb 2021 02:16:14 +0000 Subject: [issue43150] Last empty string not removed in a list Message-ID: <1612664174.69.0.83130833391.issue43150@roundup.psfhosted.org> New submission from Kumar Makala : # Last empty string not removed from the list str_list = ["Emma", "Jon", "", "Kelly","Eric", "", "","KXN",""] for item in str_list: if len(item) == 0: str_list.remove(item) print(len(str_list[-1])) #Output ['Emma', 'Jon', 'Kelly', 'Eric', 'KXN', ''] ---------- messages: 386571 nosy: kumarmakala priority: normal severity: normal status: open title: Last empty string not removed in a list type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 22:00:20 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 07 Feb 2021 03:00:20 +0000 Subject: [issue43150] Last empty string not removed in a list In-Reply-To: <1612664174.69.0.83130833391.issue43150@roundup.psfhosted.org> Message-ID: <1612666820.59.0.876676107453.issue43150@roundup.psfhosted.org> Steven D'Aprano added the comment: This is not a language bug, it is a bug in your code: you are modifying the list as you iterate over it. There are lots of ways to do that task correctly, perhaps the easiest is with a filter: str_list = list(filter(bool, str_list)) or a list comprehension: str_list = [s for s in str_list if s] or by iterating over a copy of the list: for item in str_list[:]: # use slice syntax to make a copy ... ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 22:22:00 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 07 Feb 2021 03:22:00 +0000 Subject: [issue43150] Last empty string not removed in a list In-Reply-To: <1612664174.69.0.83130833391.issue43150@roundup.psfhosted.org> Message-ID: <1612668120.74.0.901132975099.issue43150@roundup.psfhosted.org> Steven D'Aprano added the comment: The problem here is that you are shortening the list as you walk along it, which means you skip items. You expected to visit: "Emma", "Jon", "", "Kelly","Eric", "", "", "KXN", "" in that order, but after visiting Emma, Jon and the first empty string, you delete the first empty string, which pushes every item down one position: "Emma", "Jon", "Kelly","Eric", "", "", "KXN", "" The next item is now Eric, not Kelly, because Kelly is in the position already visited. So the *string* Kelly gets skipped. After visiting Eric and the next empty string, everything gets pushed down another spot: "Emma", "Jon", "Kelly","Eric", "", "KXN", "" which moves the second empty string into the position that was already visited. The next item is now KXN, then the final empty string, which then deletes the *first remaining* empty string: "Emma", "Jon", "Kelly","Eric", "KXN", "" and now you have reached the end of the string and there is nothing more to do. You can see for yourself the items which are visited: >>> for item in str_list: ... print('item =', repr(item)) ... if len(item) == 0: ... str_list.remove(item) ... item = 'Emma' item = 'Jon' item = '' item = 'Eric' item = '' item = 'KXN' item = '' Here is perhaps a more clear way to see what you are doing wrong: >>> str_list = ['a', 'x', 'b', 'x', 'c', 'x', 'd', 'x', 'e', 'f'] >>> for item in str_list: ... print(item, ''.join(str_list)) ... if item == 'x': ... str_list.remove(item) ... a axbxcxdxef x axbxcxdxef x abxcxdxef x abcxdxef x abcdxef f abcdef Every time you delete an item, the list shrinks, everything moves down one position, and the next item gets skipped because it has been moved into the slot already looked at. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 22:28:28 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 07 Feb 2021 03:28:28 +0000 Subject: [issue43149] Misleading error message for except with missing parens (3.10.a5) In-Reply-To: <1612652048.28.0.775062089825.issue43149@roundup.psfhosted.org> Message-ID: <1612668508.53.0.462477172011.issue43149@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +23262 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24467 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 22:36:57 2021 From: report at bugs.python.org (Kumar Makala) Date: Sun, 07 Feb 2021 03:36:57 +0000 Subject: [issue43150] Last empty string not removed in a list In-Reply-To: <1612664174.69.0.83130833391.issue43150@roundup.psfhosted.org> Message-ID: <1612669017.06.0.940787085211.issue43150@roundup.psfhosted.org> Kumar Makala added the comment: Thanks Steven! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 23:07:32 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Feb 2021 04:07:32 +0000 Subject: [issue16781] execfile/exec execution in other than global scope uses locals(), leading to undefined behavior In-Reply-To: <1356480950.95.0.0708133666827.issue16781@psf.upfronthosting.co.za> Message-ID: <1612670852.14.0.369877067828.issue16781@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +23263 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/24469 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 6 23:40:14 2021 From: report at bugs.python.org (Gary Litvin) Date: Sun, 07 Feb 2021 04:40:14 +0000 Subject: [issue43151] is with literals in 3.8 release Message-ID: <1612672813.96.0.169918993587.issue43151@roundup.psfhosted.org> New submission from Gary Litvin : >>> x = 'a' >>> x is 'a' True >>> if x is 'a': print(x) SyntaxError: "is" with a literal. Did you mean "=="? How come? ---------- messages: 386575 nosy: garylitvin priority: normal severity: normal status: open title: is with literals in 3.8 release versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 00:29:06 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Feb 2021 05:29:06 +0000 Subject: [issue16781] execfile/exec execution in other than global scope uses locals(), leading to undefined behavior In-Reply-To: <1356480950.95.0.0708133666827.issue16781@psf.upfronthosting.co.za> Message-ID: <1612675746.2.0.969442995161.issue16781@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 0ec57e25c918b859b9f8d464e34e0ac859c2f8b3 by Terry Jan Reedy in branch 'master': bpo-16781: In 'exec' doc, add 'nonlocal' to 'yield' and 'return' (GH-2446) https://github.com/python/cpython/commit/0ec57e25c918b859b9f8d464e34e0ac859c2f8b3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 00:29:13 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Feb 2021 05:29:13 +0000 Subject: [issue16781] execfile/exec execution in other than global scope uses locals(), leading to undefined behavior In-Reply-To: <1356480950.95.0.0708133666827.issue16781@psf.upfronthosting.co.za> Message-ID: <1612675753.18.0.487509515523.issue16781@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 6.0 -> 7.0 pull_requests: +23264 pull_request: https://github.com/python/cpython/pull/24470 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 00:29:20 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Feb 2021 05:29:20 +0000 Subject: [issue16781] execfile/exec execution in other than global scope uses locals(), leading to undefined behavior In-Reply-To: <1356480950.95.0.0708133666827.issue16781@psf.upfronthosting.co.za> Message-ID: <1612675760.75.0.824109963529.issue16781@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +23265 pull_request: https://github.com/python/cpython/pull/24471 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 00:30:38 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Feb 2021 05:30:38 +0000 Subject: [issue16781] execfile/exec execution in other than global scope uses locals(), leading to undefined behavior In-Reply-To: <1356480950.95.0.0708133666827.issue16781@psf.upfronthosting.co.za> Message-ID: <1612675838.63.0.867015811036.issue16781@roundup.psfhosted.org> Terry J. Reedy added the comment: PR is based on 'Note:...' directly above. I am still thinking about a patch for the namespace paragraph. ---------- nosy: -miss-islington stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 00:38:57 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 07 Feb 2021 05:38:57 +0000 Subject: [issue16781] execfile/exec execution in other than global scope uses locals(), leading to undefined behavior In-Reply-To: <1356480950.95.0.0708133666827.issue16781@psf.upfronthosting.co.za> Message-ID: <1612676337.57.0.806131841055.issue16781@roundup.psfhosted.org> miss-islington added the comment: New changeset 920bf6a3a656e329c2bcbb761eb8c13c46c8cd05 by Miss Islington (bot) in branch '3.8': bpo-16781: In 'exec' doc, add 'nonlocal' to 'yield' and 'return' (GH-2446) https://github.com/python/cpython/commit/920bf6a3a656e329c2bcbb761eb8c13c46c8cd05 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 00:40:26 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 07 Feb 2021 05:40:26 +0000 Subject: [issue43151] is with literals in 3.8 release In-Reply-To: <1612672813.96.0.169918993587.issue43151@roundup.psfhosted.org> Message-ID: <1612676426.18.0.189903759139.issue43151@roundup.psfhosted.org> Dennis Sweeney added the comment: This was a very intentional change from the commit 3bcbedc9f1471d957a30a90f9d1251516b422416 It's not safe to check `x is y` when x and y are strings. You should always use `x == y` for strings instead. In CPython, if the names x and y both refer to the same underlying object, then `x is y` will return True. In CPython, if the names x and y refer to two distinct string objects with equal values, then `x is y` will return False. Which case happens is an implementation detail, and alternate Python implementations like PyPy could behave unexpectedly with such code. As such, to prevent more incorrect code, this was changed to emit a SyntaxWarning in Python 3.8. This is documented here: https://docs.python.org/3/whatsnew/3.8.html#changes-in-python-behavior In a python REPL, I believe SyntaxWarnings are by default promoted to SyntaxErrors. But when running a file with `python -Wa`, you just get the warning: $ python -Wa ./a.py .../a.py:2: SyntaxWarning: "is" with a literal. Did you mean "=="? if x is 'a': a ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 00:49:33 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 07 Feb 2021 05:49:33 +0000 Subject: [issue43151] is with literals in 3.8 release In-Reply-To: <1612672813.96.0.169918993587.issue43151@roundup.psfhosted.org> Message-ID: <1612676973.56.0.718129930968.issue43151@roundup.psfhosted.org> Raymond Hettinger added the comment: As Dennis says, this is an intentional behavior and will help you avoid bugs. ---------- nosy: +rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 01:02:03 2021 From: report at bugs.python.org (Gary Litvin) Date: Sun, 07 Feb 2021 06:02:03 +0000 Subject: [issue43151] is with literals in 3.8 release In-Reply-To: <1612676973.56.0.718129930968.issue43151@roundup.psfhosted. org> Message-ID: <7.0.1.0.2.20210207005829.05e3e060@skylit.com> Gary Litvin added the comment: Thank you for your responses. I understand the difference between == and "is" and the intentional change in 3.8. My question is about what seems to be inconsistent treatment in x is 'a' and if a is 'a': ... At 12:49 AM 2/7/2021, Raymond Hettinger wrote: >Raymond Hettinger added the comment: > >As Dennis says, this is an intentional behavior and will help you avoid bugs. > >---------- >nosy: +rhettinger >resolution: -> not a bug >stage: -> resolved >status: open -> closed > >_______________________________________ >Python tracker > >_______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 01:28:57 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 07 Feb 2021 06:28:57 +0000 Subject: [issue43144] test_unicodedata: test_normalization uses network but doesn't depend on network resource In-Reply-To: <1612608486.69.0.149718284588.issue43144@roundup.psfhosted.org> Message-ID: <1612679337.22.0.980595773697.issue43144@roundup.psfhosted.org> Dong-hee Na added the comment: @arekm Would you like to submit the patch through Github? ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 01:30:43 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 07 Feb 2021 06:30:43 +0000 Subject: [issue43144] test_unicodedata: test_normalization uses network but doesn't depend on network resource In-Reply-To: <1612608486.69.0.149718284588.issue43144@roundup.psfhosted.org> Message-ID: <1612679443.78.0.180100395082.issue43144@roundup.psfhosted.org> Change by Dong-hee Na : ---------- versions: +Python 3.10, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 02:17:02 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 07 Feb 2021 07:17:02 +0000 Subject: [issue43152] warning: unused variable 'code' Message-ID: <1612682222.13.0.322888481152.issue43152@roundup.psfhosted.org> New submission from Dong-hee Na : Python/ceval.c:4747:19: warning: unused variable 'code' [-Wunused-variable] PyCodeObject *code = (PyCodeObject *)_co; Very nit compiler warning but should be fixed ;) ---------- components: Interpreter Core messages: 386583 nosy: Mark.Shannon, corona10 priority: normal severity: normal status: open title: warning: unused variable 'code' versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 02:17:27 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 07 Feb 2021 07:17:27 +0000 Subject: [issue43152] warning: unused variable 'code' In-Reply-To: <1612682222.13.0.322888481152.issue43152@roundup.psfhosted.org> Message-ID: <1612682247.87.0.177533047171.issue43152@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +23266 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24473 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 02:39:36 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 07 Feb 2021 07:39:36 +0000 Subject: [issue43151] is with literals in 3.8 release In-Reply-To: <1612672813.96.0.169918993587.issue43151@roundup.psfhosted.org> Message-ID: <1612683576.68.0.478005888258.issue43151@roundup.psfhosted.org> Steven D'Aprano added the comment: Gary, I cannot replicate that inconsistency in 3.9.0. >>> x = "abc" >>> x is "abc" :1: SyntaxWarning: "is" with a literal. Did you mean "=="? True >>> if x is "abc": pass ... :1: SyntaxWarning: "is" with a literal. Did you mean "=="? I don't believe that you should be getting a SyntaxError at all, and both cases should give the same warning. Can you double-check your code, and if you confirm that they give a different result or a SyntaxError, let us know here. Otherwise Raymond and Dennis are correct: this is working correctly. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 03:37:01 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 07 Feb 2021 08:37:01 +0000 Subject: [issue43151] is with literals in 3.8 release In-Reply-To: <1612672813.96.0.169918993587.issue43151@roundup.psfhosted.org> Message-ID: <1612687021.77.0.982173122216.issue43151@roundup.psfhosted.org> Dennis Sweeney added the comment: There may be reason to re-open this. With Python 3.9.0, I see the inconsistent behavior that Gary describes only when using IDLE. So this is likely an IDLE issue. I attached a screenshot of the difference. ---------- Added file: https://bugs.python.org/file49795/idle_vs_console.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 03:41:14 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 07 Feb 2021 08:41:14 +0000 Subject: [issue43151] is with literals in 3.8 release In-Reply-To: <1612672813.96.0.169918993587.issue43151@roundup.psfhosted.org> Message-ID: <1612687274.55.0.308622814211.issue43151@roundup.psfhosted.org> Dennis Sweeney added the comment: I think the strangeness is happening because sometimes, the warning is printed to stderr, while other times, IDLE's parser notices the "is " anti-pattern and raises a SyntaxError. See the attached screenshot for the IDLE output versus the console output for a recent 3.10 build. ---------- Added file: https://bugs.python.org/file49796/idle_stderr.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 04:52:44 2021 From: report at bugs.python.org (Oleg Navolotsky) Date: Sun, 07 Feb 2021 09:52:44 +0000 Subject: [issue43153] tempfile seems to treat a file as a directory when processing an exception in the onerror() Message-ID: <1612691564.38.0.627288937354.issue43153@roundup.psfhosted.org> New submission from Oleg Navolotsky : >>> import sys, tempfile, os >>> sys.version '3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)]' >>> folder = tempfile.TemporaryDirectory() >>> file = open(os.path.join(folder.name, "example.txt"), 'wb') >>> folder.cleanup() Traceback (most recent call last): File "C:\Users\user0\AppData\Local\Programs\Python\Python39\lib\shutil.py", line 616, in _rmtree_unsafe os.unlink(fullname) PermissionError: [WinError 32] ??????? ?? ????? ???????? ?????? ? ?????, ??? ??? ???? ???? ????? ?????? ?????????: 'C:\\Users\\user0\\AppData\\Local\\Temp\\tmpin8xeb9b\\example.txt' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\user0\AppData\Local\Programs\Python\Python39\lib\tempfile.py", line 801, in onerror _os.unlink(path) PermissionError: [WinError 32] ??????? ?? ????? ???????? ?????? ? ?????, ??? ??? ???? ???? ????? ?????? ?????????: 'C:\\Users\\user0\\AppData\\Local\\Temp\\tmpin8xeb9b\\example.txt' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "C:\Users\user0\AppData\Local\Programs\Python\Python39\lib\tempfile.py", line 830, in cleanup self._rmtree(self.name) File "C:\Users\user0\AppData\Local\Programs\Python\Python39\lib\tempfile.py", line 812, in _rmtree _shutil.rmtree(name, onerror=onerror) File "C:\Users\user0\AppData\Local\Programs\Python\Python39\lib\shutil.py", line 740, in rmtree return _rmtree_unsafe(path, onerror) File "C:\Users\user0\AppData\Local\Programs\Python\Python39\lib\shutil.py", line 618, in _rmtree_unsafe onerror(os.unlink, fullname, sys.exc_info()) File "C:\Users\user0\AppData\Local\Programs\Python\Python39\lib\tempfile.py", line 804, in onerror cls._rmtree(path) File "C:\Users\user0\AppData\Local\Programs\Python\Python39\lib\tempfile.py", line 812, in _rmtree _shutil.rmtree(name, onerror=onerror) File "C:\Users\user0\AppData\Local\Programs\Python\Python39\lib\shutil.py", line 740, in rmtree return _rmtree_unsafe(path, onerror) File "C:\Users\user0\AppData\Local\Programs\Python\Python39\lib\shutil.py", line 599, in _rmtree_unsafe onerror(os.scandir, path, sys.exc_info()) File "C:\Users\user0\AppData\Local\Programs\Python\Python39\lib\shutil.py", line 596, in _rmtree_unsafe with os.scandir(path) as scandir_it: NotADirectoryError: [WinError 267] ??????? ?????? ??? ?????: 'C:\\Users\\user0\\AppData\\Local\\Temp\\tmpin8xeb9b\\example.txt' ---------- components: Library (Lib) messages: 386587 nosy: mehwhatever0 priority: normal severity: normal status: open title: tempfile seems to treat a file as a directory when processing an exception in the onerror() type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 07:22:47 2021 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 07 Feb 2021 12:22:47 +0000 Subject: [issue43147] Remove mention of "subcontrary mean" from the docs In-Reply-To: <1612640144.35.0.427315747662.issue43147@roundup.psfhosted.org> Message-ID: <1612700567.22.0.953599767583.issue43147@roundup.psfhosted.org> Mark Dickinson added the comment: Sounds good to me. I don't recall ever meeting the term. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 08:19:33 2021 From: report at bugs.python.org (Ross Rhodes) Date: Sun, 07 Feb 2021 13:19:33 +0000 Subject: [issue43123] email MIME splitting In-Reply-To: <1612442926.7.0.976451859836.issue43123@roundup.psfhosted.org> Message-ID: <1612703973.23.0.534759495074.issue43123@roundup.psfhosted.org> Change by Ross Rhodes : ---------- keywords: +patch nosy: +trrhodes nosy_count: 3.0 -> 4.0 pull_requests: +23267 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24475 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 08:23:23 2021 From: report at bugs.python.org (Ross Rhodes) Date: Sun, 07 Feb 2021 13:23:23 +0000 Subject: [issue43123] email MIME splitting In-Reply-To: <1612442926.7.0.976451859836.issue43123@roundup.psfhosted.org> Message-ID: <1612704203.63.0.55298725209.issue43123@roundup.psfhosted.org> Ross Rhodes added the comment: Hi Martin, Looking into this further, it appears we already catch CR-LF characters in header values, but your test case shows that we do not run the same checks on header names. I've opened a PR to rectify this - feel free to leave feedback. Ross ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 08:34:01 2021 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 07 Feb 2021 13:34:01 +0000 Subject: [issue43132] Incorrect handling of PyObject_RichCompareBool() in the _zoneinfo module In-Reply-To: <1612482481.94.0.955863254817.issue43132@roundup.psfhosted.org> Message-ID: <1612704841.88.0.102843731931.issue43132@roundup.psfhosted.org> Zackery Spytz added the comment: Okay, I will add some tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 09:14:23 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Feb 2021 14:14:23 +0000 Subject: [issue16781] execfile/exec execution in other than global scope uses locals(), leading to undefined behavior In-Reply-To: <1356480950.95.0.0708133666827.issue16781@psf.upfronthosting.co.za> Message-ID: <1612707263.55.0.285980212831.issue16781@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 863eb7170b3017399fb2b786a1e3feb6457e54c2 by Miss Islington (bot) in branch '3.9': bpo-16781: In 'exec' doc, add 'nonlocal' to 'yield' and 'return' (GH-2446) https://github.com/python/cpython/commit/863eb7170b3017399fb2b786a1e3feb6457e54c2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 09:41:48 2021 From: report at bugs.python.org (Gary Litvin) Date: Sun, 07 Feb 2021 14:41:48 +0000 Subject: [issue43151] is with literals in 3.8 release In-Reply-To: <1612687274.55.0.308622814211.issue43151@roundup.psfhosted. org> Message-ID: <7.0.1.0.2.20210207093115.05e3e438@skylit.com> Gary Litvin added the comment: I noticed it in IDLE 3.8. I installed 3.8 because it is a fairly recent release described as "stable." Thanks to everyone for considering this. At 03:41 AM 2/7/2021, you wrote: >Dennis Sweeney added the comment: > >I think the strangeness is happening because sometimes, the warning >is printed to stderr, while other times, IDLE's parser notices the >"is " anti-pattern and raises a SyntaxError. > >See the attached screenshot for the IDLE output versus the console >output for a recent 3.10 build. > >---------- >Added file: https://bugs.python.org/file49796/idle_stderr.jpg > >_______________________________________ >Python tracker > >_______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 11:26:30 2021 From: report at bugs.python.org (Carl Friedrich Bolz-Tereick) Date: Sun, 07 Feb 2021 16:26:30 +0000 Subject: [issue43154] code.InteractiveConsole can crash if sys.excepthook is broken Message-ID: <1612715190.56.0.748623074825.issue43154@roundup.psfhosted.org> New submission from Carl Friedrich Bolz-Tereick : When using code.InteractiveConsole to implement a Python shell (like PyPy is doing), having a broken sys.excepthook set can crash the console (see attached terminal log). Instead, it should catch errors and report then ignore them (using sys.unraisablehook I would think, but right now it's not that simple to call unraisablehook from python code). Related to https://bugs.python.org/issue43148 ---------- files: crash.log messages: 386593 nosy: Carl.Friedrich.Bolz priority: normal severity: normal status: open title: code.InteractiveConsole can crash if sys.excepthook is broken Added file: https://bugs.python.org/file49797/crash.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 11:33:29 2021 From: report at bugs.python.org (Julian Berman) Date: Sun, 07 Feb 2021 16:33:29 +0000 Subject: [issue43154] code.InteractiveConsole can crash if sys.excepthook is broken In-Reply-To: <1612715190.56.0.748623074825.issue43154@roundup.psfhosted.org> Message-ID: <1612715609.87.0.320800160903.issue43154@roundup.psfhosted.org> Change by Julian Berman : ---------- nosy: +Julian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 12:51:46 2021 From: report at bugs.python.org (doublex) Date: Sun, 07 Feb 2021 17:51:46 +0000 Subject: [issue43065] Delegating to thread and process stucks in 3.9.1 In-Reply-To: <1611950599.0.0.548007285224.issue43065@roundup.psfhosted.org> Message-ID: <1612720306.43.0.332805814611.issue43065@roundup.psfhosted.org> Change by doublex : ---------- components: +Library (Lib) -Interpreter Core title: 'concurrent.futures' stucks in 3.9.1 -> Delegating to thread and process stucks in 3.9.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 12:52:30 2021 From: report at bugs.python.org (doublex) Date: Sun, 07 Feb 2021 17:52:30 +0000 Subject: [issue43065] Delegating to thread and process deadlocks In-Reply-To: <1611950599.0.0.548007285224.issue43065@roundup.psfhosted.org> Message-ID: <1612720350.02.0.957798319388.issue43065@roundup.psfhosted.org> Change by doublex : ---------- title: Delegating to thread and process stucks in 3.9.1 -> Delegating to thread and process deadlocks _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 13:00:39 2021 From: report at bugs.python.org (=?utf-8?q?Gr=C3=A9gory_Starck?=) Date: Sun, 07 Feb 2021 18:00:39 +0000 Subject: [issue43125] Trying To Concatenate Bytes and String in SMTPLIB In-Reply-To: <1612445008.73.0.955251739992.issue43125@roundup.psfhosted.org> Message-ID: <1612720839.52.0.709573274975.issue43125@roundup.psfhosted.org> Gr?gory Starck added the comment: I reproduced directly. by using a valid smtp server. ---------- nosy: +g.starck at gmail.com _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 13:05:58 2021 From: report at bugs.python.org (Barry Alan Scott) Date: Sun, 07 Feb 2021 18:05:58 +0000 Subject: [issue43155] PyCMethod_New not defined in python3.lib Message-ID: <1612721158.76.0.287250699598.issue43155@roundup.psfhosted.org> New submission from Barry Alan Scott : When using the limited API PyCMethod_New is not defined in python3.lib. This leads to a link error. This error is in 3.9 and 3.10a5 Discovered when I improved the PyCXX test suite. Example output: Link obj\simple.pyd cl /nologo /W4 /LD /Zi /MT /EHsc /Zi /MT /EHsc -I. -ISrc -IC:\Python310.win64\include -D_CRT_NONSTDC_NO_DEPRECATE -U_DEBUG -DNDEBUG -DPy_LIMITED_API=0x3090000 /Feobj\simple.pyd /Fdobj\simple.pdf obj\simple.obj obj\cxxsupport.obj obj\cxx_extensions.obj obj\cxx_exceptions.obj obj\cxxextensions.obj obj\IndirectPythonInterface.obj C:\Python310.win64\libs\python3.lib Creating library obj\simple.lib and object obj\simple.exp simple.obj : error LNK2019: unresolved external symbol __imp_PyCMethod_New referenced in function "protected: virtual class Py::Object __cdecl Py::PythonExtension::getattr_methods(char const *)" (?getattr_methods@?$PythonExtension at Vold_style_class@@@Py@@MEAA?AVObject at 2@PEBD at Z) obj\simple.pyd : fatal error LNK1120: 1 unresolved externals NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\cl.EXE"' : return code '0x2' Stop. ---------- messages: 386595 nosy: barry-scott priority: normal severity: normal status: open title: PyCMethod_New not defined in python3.lib versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 13:06:52 2021 From: report at bugs.python.org (Johannes Reiff) Date: Sun, 07 Feb 2021 18:06:52 +0000 Subject: [issue41402] email: ContentManager.set_content calls nonexistent method encode() on bytes In-Reply-To: <1595786356.19.0.0772009953039.issue41402@roundup.psfhosted.org> Message-ID: <1612721212.6.0.190195957362.issue41402@roundup.psfhosted.org> Johannes Reiff added the comment: Could someone comment on the way forward? Or ideally just merge my PR (it was approved on GitHub)? I am still very much interested in this bug getting fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 13:09:50 2021 From: report at bugs.python.org (=?utf-8?q?Gr=C3=A9gory_Starck?=) Date: Sun, 07 Feb 2021 18:09:50 +0000 Subject: [issue43125] Trying To Concatenate Bytes and String in SMTPLIB In-Reply-To: <1612445008.73.0.955251739992.issue43125@roundup.psfhosted.org> Message-ID: <1612721390.57.0.212311416854.issue43125@roundup.psfhosted.org> Gr?gory Starck added the comment: problem seems to/could be in /usr/lib/python3.8/email/base64mime.py ``` def body_encode(s, maxlinelen=76, eol=NL): r"""Encode a string with base64. Each line will be wrapped at, at most, maxlinelen characters (defaults to 76 characters). Each line of encoded text will end with eol, which defaults to "\n". Set this to "\r\n" if you will be using the result of this function directly in an email. """ if not s: return s ``` If function is supposed to return str for any bytes input, then there it is returning the original bytes instance.. which is the trouble. it should return `""` and that's it ? I would like to work/contribute on this issue.. I'll further investigate this issue and possible solution and comes with a patch rather sooner than later.. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 13:15:28 2021 From: report at bugs.python.org (Barry Alan Scott) Date: Sun, 07 Feb 2021 18:15:28 +0000 Subject: [issue43156] Python windows installer has a confusing name - add setup to its name Message-ID: <1612721728.1.0.320173776813.issue43156@roundup.psfhosted.org> New submission from Barry Alan Scott : New users of Python on Windows frequently confuse the Python installation program with Python itself. They also can end up with the wrong 32 or 64 bit version. I suggest that the installation program name is changed to include "setup" in its name. This seems to be the usually convention many Windows installation programs use. Further users may know they are need windows 64 bit or windows 32 bit compatible software. The python installer naming is not obvious. The windows 32 installer has no additional text to show it is targeted at windows 32. The windows 64 uses amd64 - does not mean not for Intel CPU's for example? Examples with both suggestions: python-3.10.0a5.exe becomes python-setup-win32-3.10.0a5.exe python-3.10.0a5-amd64.exe becomes python-setup-win64-3.10.0a5.exe Barry ---------- messages: 386598 nosy: barry-scott priority: normal severity: normal status: open title: Python windows installer has a confusing name - add setup to its name _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 13:25:48 2021 From: report at bugs.python.org (=?utf-8?q?Gr=C3=A9gory_Starck?=) Date: Sun, 07 Feb 2021 18:25:48 +0000 Subject: [issue43125] Trying To Concatenate Bytes and String in SMTPLIB In-Reply-To: <1612445008.73.0.955251739992.issue43125@roundup.psfhosted.org> Message-ID: <1612722348.21.0.181752831966.issue43125@roundup.psfhosted.org> Change by Gr?gory Starck : ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 13:28:42 2021 From: report at bugs.python.org (Matthew Barnett) Date: Sun, 07 Feb 2021 18:28:42 +0000 Subject: [issue43156] Python windows installer has a confusing name - add setup to its name In-Reply-To: <1612721728.1.0.320173776813.issue43156@roundup.psfhosted.org> Message-ID: <1612722522.97.0.460689785257.issue43156@roundup.psfhosted.org> Matthew Barnett added the comment: Sorry to bikeshed, but I think it would be clearer to keep the version next to the "python" and the "setup" at the end: python-3.10.0a5-win32-setup.exe python-3.10.0a5-win64-setup.exe ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 13:31:48 2021 From: report at bugs.python.org (Barry Alan Scott) Date: Sun, 07 Feb 2021 18:31:48 +0000 Subject: [issue43156] Python windows installer has a confusing name - add setup to its name In-Reply-To: <1612721728.1.0.320173776813.issue43156@roundup.psfhosted.org> Message-ID: <1612722708.87.0.2847516494.issue43156@roundup.psfhosted.org> Barry Alan Scott added the comment: I happy with your names. I think they are better then my version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 13:40:28 2021 From: report at bugs.python.org (=?utf-8?q?Gr=C3=A9gory_Starck?=) Date: Sun, 07 Feb 2021 18:40:28 +0000 Subject: [issue43125] Trying To Concatenate Bytes and String in SMTPLIB In-Reply-To: <1612445008.73.0.955251739992.issue43125@roundup.psfhosted.org> Message-ID: <1612723228.71.0.110362514265.issue43125@roundup.psfhosted.org> Change by Gr?gory Starck : ---------- keywords: +patch pull_requests: +23268 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24476 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 13:42:28 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 07 Feb 2021 18:42:28 +0000 Subject: [issue43149] Misleading error message for except with missing parens (3.10.a5) In-Reply-To: <1612652048.28.0.775062089825.issue43149@roundup.psfhosted.org> Message-ID: <1612723348.06.0.91746047911.issue43149@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 206cbdab16cb054e859597a562e2f6ab35e99766 by Pablo Galindo in branch 'master': bpo-43149: Improve error message for exception group without parentheses (GH-24467) https://github.com/python/cpython/commit/206cbdab16cb054e859597a562e2f6ab35e99766 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 13:42:41 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 07 Feb 2021 18:42:41 +0000 Subject: [issue43149] Misleading error message for except with missing parens (3.10.a5) In-Reply-To: <1612652048.28.0.775062089825.issue43149@roundup.psfhosted.org> Message-ID: <1612723361.53.0.905922909433.issue43149@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 14:08:50 2021 From: report at bugs.python.org (sandeep kumar) Date: Sun, 07 Feb 2021 19:08:50 +0000 Subject: [issue43157] Bug in methods of creating the list Message-ID: <1612724930.5.0.70990671335.issue43157@roundup.psfhosted.org> New submission from sandeep kumar : def generateMatrix(A): d=A-1 data=1 B=[[0]*A]*A for l in range(int(A/2)): i=l j=l for a in range(d): B[i][j]=data print("{0}:{1}:{2}".format(i,j,B[i][j]),end=" ") data+=1 j+=1 print() for a in range(d): B[i][j]=data print("{0}:{1}:{2}".format(i,j,B[i][j]),end=" ") data+=1 i+=1 print() for a in range(d): B[i][j]=data print("{0}:{1}:{2}".format(i,j,B[i][j]),end=" ") data+=1 j-=1 print() for a in range(d): B[i][j]=data print("{0}:{1}:{2}".format(i,j,B[i][j]),end=" ") data+=1 i-=1 print() d=d-2 print(d) print(B) if d==0: B[int(A/2)][int(A/2)]=data print(B[int(A/2)][int(A/2)]) print(B) return B ##if i'm using different approach to create 2d list . Then i'm getting right output . in above code i used B=[[0]*A]*A and getting wrong output . A is positive integer. ##If i'm using for i in range(A-1): B.append([0]*A) then i'm getting correct output. but the 2d list generated using both the approach are same. 2d list from approach 1== 2d list from approach 2 ------->it is true ---------- messages: 386602 nosy: samrajput1143 priority: normal severity: normal status: open title: Bug in methods of creating the list versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 14:10:15 2021 From: report at bugs.python.org (sandeep kumar) Date: Sun, 07 Feb 2021 19:10:15 +0000 Subject: [issue43157] Bug in methods of creating the 2d list In-Reply-To: <1612724930.5.0.70990671335.issue43157@roundup.psfhosted.org> Message-ID: <1612725015.57.0.723738457943.issue43157@roundup.psfhosted.org> Change by sandeep kumar : ---------- title: Bug in methods of creating the list -> Bug in methods of creating the 2d list _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 14:12:10 2021 From: report at bugs.python.org (sandeep kumar) Date: Sun, 07 Feb 2021 19:12:10 +0000 Subject: [issue43157] Bug in methods of creating the 2d list In-Reply-To: <1612724930.5.0.70990671335.issue43157@roundup.psfhosted.org> Message-ID: <1612725130.15.0.430855994537.issue43157@roundup.psfhosted.org> sandeep kumar added the comment: def generateMatrix(A): d=A-1 data=1 B=[[0]*A]*A for l in range(int(A/2)): i=l j=l for a in range(d): B[i][j]=data print("{0}:{1}:{2}".format(i,j,B[i][j]),end=" ") data+=1 j+=1 print() for a in range(d): B[i][j]=data print("{0}:{1}:{2}".format(i,j,B[i][j]),end=" ") data+=1 i+=1 print() for a in range(d): B[i][j]=data print("{0}:{1}:{2}".format(i,j,B[i][j]),end=" ") data+=1 j-=1 print() for a in range(d): B[i][j]=data print("{0}:{1}:{2}".format(i,j,B[i][j]),end=" ") data+=1 i-=1 print() d=d-2 print(d) print(B) if d==0: B[int(A/2)][int(A/2)]=data print(B[int(A/2)][int(A/2)]) print(B) return B #This code is for generating spiral matrix ##if i'm using different approach to create 2d list . Then i'm getting right output . in above code i used B=[[0]*A]*A and getting wrong output . A is positive integer. ##If i'm using for i in range(A-1): B.append([0]*A) then i'm getting correct output. but the 2d list generated using both the approach are same. 2d list from approach 1== 2d list from approach 2 ------->it is true ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 14:30:20 2021 From: report at bugs.python.org (=?utf-8?q?Gr=C3=A9gory_Starck?=) Date: Sun, 07 Feb 2021 19:30:20 +0000 Subject: [issue43125] Trying To Concatenate Bytes and String in SMTPLIB In-Reply-To: <1612445008.73.0.955251739992.issue43125@roundup.psfhosted.org> Message-ID: <1612726220.03.0.206251721819.issue43125@roundup.psfhosted.org> Gr?gory Starck added the comment: I filled the PR https://github.com/python/cpython/pull/24476 feel free to comment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 15:32:14 2021 From: report at bugs.python.org (Illia Volochii) Date: Sun, 07 Feb 2021 20:32:14 +0000 Subject: [issue42982] Update suggested number of iterations for pbkdf2_hmac() In-Reply-To: <1611173199.26.0.961948207202.issue42982@roundup.psfhosted.org> Message-ID: <1612729934.99.0.094419940589.issue42982@roundup.psfhosted.org> Illia Volochii added the comment: Clock rate is not the only indicator. Some new instructions supporting SHA were introduced during the last decade. https://software.intel.com/content/www/us/en/develop/articles/intel-sha-extensions.html https://software.intel.com/content/www/us/en/develop/articles/improving-openssl-performance.html https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/sha-256-implementations-paper.pdf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 15:33:15 2021 From: report at bugs.python.org (=?utf-8?b?2KfYs9iq2KfYsCDYqNi02YrYsSDZg9mH2LHYqNin2KbZig==?=) Date: Sun, 07 Feb 2021 20:33:15 +0000 Subject: [issue36028] Integer Division discrepancy with float In-Reply-To: <1550520914.92.0.84005909816.issue36028@roundup.psfhosted.org> Message-ID: <1612729995.07.0.866418503274.issue36028@roundup.psfhosted.org> Change by ????? ???? ??????? : ---------- nosy: +ba5367125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 15:35:58 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 07 Feb 2021 20:35:58 +0000 Subject: [issue43157] Bug in methods of creating the 2d list In-Reply-To: <1612724930.5.0.70990671335.issue43157@roundup.psfhosted.org> Message-ID: <1612730158.98.0.249123197432.issue43157@roundup.psfhosted.org> Steven D'Aprano added the comment: This is not a bug, it is working correctly, as designed. List multiplication does not *copy* the list, it replicates the reference to the same list object. So [[0]]*5 does not make five different sublists, but the same list repeated five times. Exactly the same as this: a = [0] mylist = [a, a, a, a, a] ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 15:44:19 2021 From: report at bugs.python.org (Larry Hastings) Date: Sun, 07 Feb 2021 20:44:19 +0000 Subject: [issue43158] uuid won't build when libuuid is installed in a non-standard place Message-ID: <1612730659.9.0.347520018019.issue43158@roundup.psfhosted.org> New submission from Larry Hastings : I'm building Python for a mildly-embedded ARM system. The system is running Linux, but doesn't have a native toolchain installed. So I'm building in a Docker container using a native toolchain (virtualizing the CPU). The toolchain I'm given has a bunch of stuff preinstalled, but not "util-linux", so it doesn't have /usr/include/uuid/uuid.h or /usr/include/uuid.h . I built and installed it myself in my PREFIX directory. But Python's build process has *two* bugs that prevented me from building the uuid module: * configure doesn't look in PREFIX for uuid/uuid.h or uuid.h. I assume it's only looking in /usr/include. This means it doesn't define any of the HAVE_UUID_* defines. * detect_uuid() in setup.py, which actually builds the module, *does* seem to check the prefix directory, but only for $PREFIX/uuid.h, not for $PREFIX/uuid/uuid.h. I hacked both of these manually and was rewarded with the uuid module building and working fine on the embedded system. So I assert this is a bug in Python's build process, if a minor one. ---------- components: Build messages: 386607 nosy: larry priority: low severity: normal stage: needs patch status: open title: uuid won't build when libuuid is installed in a non-standard place type: compile error versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 15:50:05 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 07 Feb 2021 20:50:05 +0000 Subject: [issue43157] Bug in methods of creating the 2d list In-Reply-To: <1612724930.5.0.70990671335.issue43157@roundup.psfhosted.org> Message-ID: <1612731005.01.0.094347832032.issue43157@roundup.psfhosted.org> Steven D'Aprano added the comment: There is also an FAQ about this: https://docs.python.org/3/faq/programming.html#how-do-i-create-a-multidimensional-list See also: https://docs.python.org/3/faq/programming.html#why-did-changing-list-y-also-change-list-x By the way, for future bug reports, please take the time to make a *minimal* example please: http://www.sscce.org/ https://stackoverflow.com/help/minimal-reproducible-example In this case a minimal example would be: mylist = [[0]]*2 mylist[0][0] = 1 print(mylist) # expect [[1], [0]] but get [[1], [1]] Thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 15:57:23 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 07 Feb 2021 20:57:23 +0000 Subject: [issue43151] is with literals in 3.8 release In-Reply-To: <1612672813.96.0.169918993587.issue43151@roundup.psfhosted.org> Message-ID: <1612731443.29.0.699993006132.issue43151@roundup.psfhosted.org> Steven D'Aprano added the comment: Terry, this may be an IDLE issue, can you confirm whether or not the difference in behaviour is intentional? ---------- nosy: +terry.reedy resolution: not a bug -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 19:11:09 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 08 Feb 2021 00:11:09 +0000 Subject: [issue32509] doctest syntax ambiguity between continuation line and ellipsis In-Reply-To: <1515297917.31.0.467229070634.issue32509@psf.upfronthosting.co.za> Message-ID: <1612743069.97.0.721301572304.issue32509@roundup.psfhosted.org> Jason R. Coombs added the comment: Today I encountered another situation where it would be convenient to allow an ellipsis at the beginning of the syntax: >>> pathlib.Path('abc') ...Path('abc') Because pathlib.Path resolves to `PosixPath` and `WindowsPath` depending on the platform, it would be nice to match both. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 19:45:06 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 Feb 2021 00:45:06 +0000 Subject: [issue43147] Remove mention of "subcontrary mean" from the docs In-Reply-To: <1612640144.35.0.427315747662.issue43147@roundup.psfhosted.org> Message-ID: <1612745106.06.0.548877226587.issue43147@roundup.psfhosted.org> Raymond Hettinger added the comment: New changeset 30a8b2839646c849371c7f8411132571cd8bf17c by Raymond Hettinger in branch 'master': bpo-43147: Remove archaic terminology. (GH-24462) https://github.com/python/cpython/commit/30a8b2839646c849371c7f8411132571cd8bf17c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 19:45:32 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 Feb 2021 00:45:32 +0000 Subject: [issue43147] Remove mention of "subcontrary mean" from the docs In-Reply-To: <1612640144.35.0.427315747662.issue43147@roundup.psfhosted.org> Message-ID: <1612745132.79.0.961324478342.issue43147@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 21:09:56 2021 From: report at bugs.python.org (JiKwon Kim) Date: Mon, 08 Feb 2021 02:09:56 +0000 Subject: [issue43159] pathlib with_suffix() should accept suffix not start with dot Message-ID: <1612750196.13.0.830563915902.issue43159@roundup.psfhosted.org> New submission from JiKwon Kim : Currently pathlib with_suffix() function only accepts suffix starts with dot("."). Consider this code; some_pathlib_path.with_suffix("jpg") This should change suffix to ".jpg", not raising ValueError. ---------- components: Library (Lib) messages: 386612 nosy: elbarkwon priority: normal severity: normal status: open title: pathlib with_suffix() should accept suffix not start with dot versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 21:36:58 2021 From: report at bugs.python.org (Paul Bryan) Date: Mon, 08 Feb 2021 02:36:58 +0000 Subject: [issue42269] Add ability to set __slots__ in dataclasses In-Reply-To: <1604590694.08.0.0173517280171.issue42269@roundup.psfhosted.org> Message-ID: <1612751818.06.0.392350990513.issue42269@roundup.psfhosted.org> Change by Paul Bryan : ---------- nosy: +pbryan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 22:16:05 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 08 Feb 2021 03:16:05 +0000 Subject: [issue40692] Adjust test_concurrent_futures to run more of its tests if multiprocessing.synchronize is missing In-Reply-To: <1589922464.68.0.792694033918.issue40692@roundup.psfhosted.org> Message-ID: <1612754165.36.0.756247609808.issue40692@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset bf2e7e55d7306b1e2fce7dce767e8df5ff42cf1c by Asheesh Laroia in branch 'master': bpo-40692: Run more test_concurrent_futures tests (GH-20239) https://github.com/python/cpython/commit/bf2e7e55d7306b1e2fce7dce767e8df5ff42cf1c ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 22:16:20 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 08 Feb 2021 03:16:20 +0000 Subject: [issue40692] Adjust test_concurrent_futures to run more of its tests if multiprocessing.synchronize is missing In-Reply-To: <1589922464.68.0.792694033918.issue40692@roundup.psfhosted.org> Message-ID: <1612754180.24.0.052589315001.issue40692@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 23:12:31 2021 From: report at bugs.python.org (Tony Lykke) Date: Mon, 08 Feb 2021 04:12:31 +0000 Subject: [issue43160] argparse: add extend_const action Message-ID: <1612757551.9.0.453042152988.issue43160@roundup.psfhosted.org> New submission from Tony Lykke : I submitted this to the python-ideas mailing list early last year: https://mail.python.org/archives/list/python-ideas at python.org/thread/7ZHY7HFFQHIX3YWWCIJTNB4DRG2NQDOV/. Recently I had some time to implement it (it actually turned out to be pretty trivial), so thought I'd put forward a PR. Here's the summary from the mailing list submission: I have found myself a few times in a position where I have a repeated argument that uses the append action, along with some convenience arguments that append a specific const to that same dest (eg: --filter-x being made equivalent to --filter x via append_const). This is particularly useful in cli apps that expose some kind of powerful-but-verbose filtering capability, while also providing shorter aliases for common invocations. I'm sure there are other use cases, but this is the one I'm most familiar with. The natural extension to this filtering idea are convenience args that set two const values (eg: --filter x --filter y being equivalent to --filter-x-y), but there is no extend_const action to enable this. While this is possible (and rather straight forward) to add via a custom action, I feel like this should be a built-in action instead. append has append_const, it seems intuitive and reasonable to expect extend to have extend_const too (my anecdotal experience the first time I came across this need was that I simply tried using extend_const without checking the docs, assuming it already existed). Here's an excerpt from the docs I drafted for this addition that hopefully convey the intent and use case clearly. +* ``'extend_const'`` - This stores a list, and extends each argument value to the list. + The ``'extend_const'`` action is typically useful when you want to provide an alias + that is the combination of multiple other arguments. For example:: + + >>> parser = argparse.ArgumentParser() + >>> parser.add_argument('--str', dest='types', action='append_const', const=str) + >>> parser.add_argument('--int', dest='types', action='append_const', const=int) + >>> parser.add_argument('--both', dest='types', action='extend_const', const=(str, int)) + >>> parser.parse_args('--str --int'.split()) + Namespace(types=[, ]) + >>> parser.parse_args('--both'.split()) + Namespace(types=[, ]) ---------- components: Library (Lib) messages: 386614 nosy: rhettinger, roganartu priority: normal severity: normal status: open title: argparse: add extend_const action type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 23:25:42 2021 From: report at bugs.python.org (Tony Lykke) Date: Mon, 08 Feb 2021 04:25:42 +0000 Subject: [issue43160] argparse: add extend_const action In-Reply-To: <1612757551.9.0.453042152988.issue43160@roundup.psfhosted.org> Message-ID: <1612758342.32.0.781269245256.issue43160@roundup.psfhosted.org> Change by Tony Lykke : ---------- keywords: +patch pull_requests: +23269 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24478 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 7 23:41:39 2021 From: report at bugs.python.org (hai shi) Date: Mon, 08 Feb 2021 04:41:39 +0000 Subject: [issue43160] argparse: add extend_const action In-Reply-To: <1612757551.9.0.453042152988.issue43160@roundup.psfhosted.org> Message-ID: <1612759299.38.0.994232138336.issue43160@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 01:23:08 2021 From: report at bugs.python.org (George) Date: Mon, 08 Feb 2021 06:23:08 +0000 Subject: [issue43161] Taking sum of massive list comprehension results in total system crash. Message-ID: <1612765388.88.0.878759110904.issue43161@roundup.psfhosted.org> New submission from George : I tried running the following command in the interpreter, and without fail it will completely crash my entire computer. Python 3.8.7 (default, Jan 20 2021, 00:00:00) [GCC 10.2.1 20201125 (Red Hat 10.2.1-9)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> sum([i for i in range(10**8 + 10**9)]) My kernel is 5.10.12-100 I am running on Fedora 32 with Cinnamon Desktop if it helps. Let me know if you need any other information. I eagerly await resolution of this bug, as I want to know the result of the computation. Unless, of course it is harebrained, then we should ignore because Guido already discussed such computations. George ---------- messages: 386615 nosy: U9dB37BPZx priority: normal severity: normal status: open title: Taking sum of massive list comprehension results in total system crash. type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 01:40:03 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Feb 2021 06:40:03 +0000 Subject: [issue43161] Taking sum of massive list comprehension results in total system crash. In-Reply-To: <1612765388.88.0.878759110904.issue43161@roundup.psfhosted.org> Message-ID: <1612766403.72.0.650643239271.issue43161@roundup.psfhosted.org> Christian Heimes added the comment: You are using a list comprehension that consumes a LOT of memory very fast. The line requires more physical RAM than available on a typical user system. This causes your computer to become unresponsive to input. You can rewrite tie list comprehension as generator expression: sum(i for i in range(10**8 + 10**9)) It will consume far less memory, but it's slow and inefficient. You could use the triangular number algorithm instead: n = 10**8 + 10**9 n * (n-1) // 2 ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 01:56:39 2021 From: report at bugs.python.org (George) Date: Mon, 08 Feb 2021 06:56:39 +0000 Subject: [issue43161] Taking sum of massive list comprehension results in total system crash. In-Reply-To: <1612765388.88.0.878759110904.issue43161@roundup.psfhosted.org> Message-ID: <1612767399.82.0.217790325247.issue43161@roundup.psfhosted.org> George added the comment: Thanks Christian for the solutions. I am guessing that since it is my entire machine that crashes, and python is not simply killed for requesting so much memory, that this is an operating system problem. Should I submit this as a bug to the kernel project then? George ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 02:10:25 2021 From: report at bugs.python.org (Masoud Azizi) Date: Mon, 08 Feb 2021 07:10:25 +0000 Subject: [issue43134] (list have item) instate (item in list) In-Reply-To: <1612520450.63.0.525292396869.issue43134@roundup.psfhosted.org> Message-ID: <1612768225.52.0.234195859617.issue43134@roundup.psfhosted.org> Masoud Azizi added the comment: English is a powerful language too. In English we have just one way to say someone have something too. there is one way to say that are you have this or not cuz of that: in this one line simple code we check the search keyword after all 10 inputs print([input() for i in'_'*10] have input()) but in this code we get the search keyword first so we get 10 value!and it have mistake print(input() in [input() for i in'_'*10] ) and i said that want to check that: is last input in the inputs or not!(secend code is not true code for do that) Have is not a duplicated command its a natural way that all people use it in his life in his powerful language like English, Turkish, Persian and etc... Its a powerful command to write codes and think and speak better and/or different! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 02:23:11 2021 From: report at bugs.python.org (Paul Sokolovsky) Date: Mon, 08 Feb 2021 07:23:11 +0000 Subject: [issue43143] Allow multiple assignment (i.e. tuple on LHS) in walrus operator In-Reply-To: <1612599187.49.0.372598222393.issue43143@roundup.psfhosted.org> Message-ID: <1612768991.33.0.924929468133.issue43143@roundup.psfhosted.org> Change by Paul Sokolovsky : ---------- nosy: +lys.nikolaou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 02:23:28 2021 From: report at bugs.python.org (Masoud Azizi) Date: Mon, 08 Feb 2021 07:23:28 +0000 Subject: [issue43134] (list have item) instate (item in list) In-Reply-To: <1612520450.63.0.525292396869.issue43134@roundup.psfhosted.org> Message-ID: <1612769008.99.0.960707119468.issue43134@roundup.psfhosted.org> Masoud Azizi added the comment: powerful languages always reduces multi-lines to one line. like python than make it ease to say a,b=1,3 and now we shroud have a command to say that i want to search in some one that i know him but still i did not know what i want to search I'm waiting to get that. like a human that we know that we will speak about him but still we don't know what we want to say about it! its a root communication skill that we tell some one that: I have many things,tell me What do you want from me? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 02:31:26 2021 From: report at bugs.python.org (Paul Sokolovsky) Date: Mon, 08 Feb 2021 07:31:26 +0000 Subject: [issue43143] Allow multiple assignment (i.e. tuple on LHS) in walrus operator In-Reply-To: <1612599187.49.0.372598222393.issue43143@roundup.psfhosted.org> Message-ID: <1612769486.58.0.0125347748732.issue43143@roundup.psfhosted.org> Paul Sokolovsky added the comment: Thanks. I would like to put this ticket in the context of other grammar-related tickets/elaboration for the assignment operator: https://bugs.python.org/issue42316 - allow foo[a:=1] instead of foo[(a:=1)] https://bugs.python.org/issue42374 - allow (c := i for i in b) instead of ((c := i) for i in b) https://bugs.python.org/issue42381 - allow {i := 0 for i in b} instead of {(i := 0) for i in b} All of the above were implemented. Of course, allow parallel assignment, which was previously disabled, is somewhat a bigger change then allowing unparenthesized assignment usage. But from the grammar point of view, they are of the same nature (using walrus-aware term at right place). The initial patch I have on my hands is: named_expression[expr_ty]: - | a=NAME ':=' ~ b=expression { _Py_NamedExpr(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), b, EXTRA) } + | a=star_targets ':=' ~ b=expression { _Py_NamedExpr(CHECK(expr_ty, _PyPegen_set_expr_context(p, a, Store)), b, EXTRA) } And let's review the 'foo[(a := 1)]' case from more angles. C had assignment as expression from the very beginning, but in all fairness, I never saw "foo[a = 1]" in my whole life (well, maybe in https://www.ioccc.org/ submissions). But we see that with Python, people are not too shy to use that. And they even submit issues like "hey, I don't want to write foo[(a := 1)], I want to write foo[a := 1] !" And they don't get replies like "you know, doing assignment in index would hamper readability/maintainability; and those extra parens are there exactly to hint you more about this fact". Instead, the case is getting acked and fixed. So, under such circumstances, I don't think that writing "min((a, b) := (b, a))" should be considered "much worse" than "foo[a := 1]", and should be kept disallowed (as again, fix for both is of the same nature). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 02:34:41 2021 From: report at bugs.python.org (Jozef Grajciar) Date: Mon, 08 Feb 2021 07:34:41 +0000 Subject: [issue11717] conflicting definition of ssize_t in pyconfig.h In-Reply-To: <1301443864.94.0.799403342642.issue11717@psf.upfronthosting.co.za> Message-ID: <1612769681.43.0.656435099653.issue11717@roundup.psfhosted.org> Change by Jozef Grajciar : ---------- nosy: +JoeyGrajciar nosy_count: 7.0 -> 8.0 pull_requests: +23271 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24479 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 02:38:18 2021 From: report at bugs.python.org (Masoud Azizi) Date: Mon, 08 Feb 2021 07:38:18 +0000 Subject: [issue43134] (list have item) instate (item in list) In-Reply-To: <1612520450.63.0.525292396869.issue43134@roundup.psfhosted.org> Message-ID: <1612769898.39.0.362944112872.issue43134@roundup.psfhosted.org> Change by Masoud Azizi : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 03:20:06 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Feb 2021 08:20:06 +0000 Subject: [issue43151] SyntaxWarning for 'is ' In-Reply-To: <1612672813.96.0.169918993587.issue43151@roundup.psfhosted.org> Message-ID: <1612772406.92.0.829795440312.issue43151@roundup.psfhosted.org> Terry J. Reedy added the comment: I verified that there are two discrepancies in IDLE versus the standard REPL on Windows with 3.10.0a5. The latter first (which does not converted warnings to errors). Python 3.10.0a4+ (heads/master:0332e569c1, Feb 1 2021, 09:19:58) [MSC v.1900 64 bit (AMD64)] on win32 >>> x = 'a' >>> x is 'a' :1: SyntaxWarning: "is" with a literal. Did you mean "=="? True >>> if x is 'a': print('executed') ... :1: SyntaxWarning: "is" with a literal. Did you mean "=="? executed versus, with IDLE, >>> x = 'a' >>> x is 'a' # No warning, also executed. True >>> if x is 'a': pass # Error instead of warning, hence not executed. SyntaxError: "is" with a literal. Did you mean "=="? There is no "IDLE parser" for interactive input. IDLE's Shell uses a subclass of code.InteractiveInterpreter, which calls codeop.CommandCompiler. The latter calls codeop._maybe_compile, which calls compile() 3 times for the source as is, with '\n' appended, and with '\n\n' appended. #40807 fixed the issue of getting 3 warnings instead of 1. For the comparison "x is 'a'", all three compiles emit SyntaxWarning before _maybe_compile returns a code object. The last two warnings are suppressed. IDLE not printing Shell input warnings it is the subject of #37824. Compiling the if statement without a final \n raises SyntaxError: unexpected EOF while parsing Adding '\n' results in the warning (converted to error in _maybe_compile) and a code object. I think there is a bug in the revised _maybe_compile but I need to add prints or breakpoints to properly understand it. And have someone locate and explain the REPL C code. If I decide _maybe_compile should be patched, I will open a new issue. --- PS Gary, when replying by email, please delete what you are responding to, except possibly for a line or two. When posted on the web page below what you respond to, the full quote is redundant noise. Also, questions like 'How come?' should better be asked on python-list (or other question-asking forums). Discussion there can lead to specific issues here. ---------- assignee: -> terry.reedy components: +IDLE resolution: -> not a bug stage: -> resolved status: open -> closed title: is with literals in 3.8 release -> SyntaxWarning for 'is ' type: -> behavior versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 03:38:45 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Feb 2021 08:38:45 +0000 Subject: [issue37824] IDLE: Handle Shell input SyntaxWarning & DeprecationWarning In-Reply-To: <1565541132.63.0.273797082992.issue37824@roundup.psfhosted.org> Message-ID: <1612773525.69.0.16663742445.issue37824@roundup.psfhosted.org> Terry J. Reedy added the comment: #43151 asked about 'is ' syntax warnings in REPL. Discussion noted that IDLE Shell does note print it for "x is 'a'" (known here) and that for "if x is 'a': print('executed')" there is a syntax error and no execution. The conversion to SyntaxError was supposedly fixed by PR-15500, but it appears that the patch for #40807 introduced it into codeop._maybe_compile. msg386621 has summary and discussion. I need to add debug prints or breakpoints into _maybe_compile to understand it better, and maybe improve it. Before printing syntax warnings in Shell, I want to stop expanding them from 1 to 4 lines. We could just not import the replacement from run.py, but I think the default format could be improved even with 1 or 2 lines. ---------- title: IDLE: Handle Shell input warnings properly. -> IDLE: Handle Shell input SyntaxWarning & DeprecationWarning _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 03:43:27 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 08 Feb 2021 08:43:27 +0000 Subject: [issue43111] webbrowser.py triggers unwanted XQuartz startup In-Reply-To: <1612344094.48.0.0202402812851.issue43111@roundup.psfhosted.org> Message-ID: <1612773807.88.0.65087141826.issue43111@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- keywords: +patch pull_requests: +23272 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24480 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 03:44:31 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 08 Feb 2021 08:44:31 +0000 Subject: [issue43111] webbrowser.py triggers unwanted XQuartz startup In-Reply-To: <1612344094.48.0.0202402812851.issue43111@roundup.psfhosted.org> Message-ID: <1612773871.5.0.197377121125.issue43111@roundup.psfhosted.org> Ronald Oussoren added the comment: I've created a PR for this. Open question: Is this a bug fix (with back ports to 3.9 and 3.8) or a feature (no back ports)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 03:44:29 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 08 Feb 2021 08:44:29 +0000 Subject: [issue40077] Convert static types to heap types: use PyType_FromSpec() In-Reply-To: <1585238684.65.0.246012172449.issue40077@roundup.psfhosted.org> Message-ID: <1612773869.8.0.543719363469.issue40077@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +23273 pull_request: https://github.com/python/cpython/pull/24481 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 03:52:41 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 08 Feb 2021 08:52:41 +0000 Subject: [issue42686] include built-in Math functions in SQLite to 3.35.0 of march 2021 In-Reply-To: <1608391961.58.0.717857253057.issue42686@roundup.psfhosted.org> Message-ID: <1612774361.29.0.251799534075.issue42686@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Steve, I've put up a PR that prepares the Windows build for this. Would you mind taking a look at it? ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 04:04:26 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Feb 2021 09:04:26 +0000 Subject: [issue43111] webbrowser.py triggers unwanted XQuartz startup In-Reply-To: <1612344094.48.0.0202402812851.issue43111@roundup.psfhosted.org> Message-ID: <1612775066.64.0.775559509437.issue43111@roundup.psfhosted.org> Terry J. Reedy added the comment: webbrowser is 'generous' at to what browsers it will open, some of which are not what hardly anyone would want. So I would call this an 'enhancement' (really 'disenchantment', like all removals;-) unless there were a technical reason other than those given for the exclusion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 05:12:12 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 08 Feb 2021 10:12:12 +0000 Subject: [issue43122] Python Launcher doesn't open a terminal window In-Reply-To: <1612400615.64.0.789800326005.issue43122@roundup.psfhosted.org> Message-ID: <1612779132.83.0.76513826461.issue43122@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- components: +macOS nosy: +ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 07:10:20 2021 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 08 Feb 2021 12:10:20 +0000 Subject: [issue42686] include built-in Math functions in SQLite to 3.35.0 of march 2021 In-Reply-To: <1608391961.58.0.717857253057.issue42686@roundup.psfhosted.org> Message-ID: <1612786220.77.0.628836423645.issue42686@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 07:22:59 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 08 Feb 2021 12:22:59 +0000 Subject: [issue43162] Enum regression: AttributeError when accessing class variables on instances Message-ID: <1612786979.73.0.896348338765.issue43162@roundup.psfhosted.org> New submission from Miro Hron?ok : I believe I found a regression in Enum in Python 3.10.0a5. This is Python 3.9: >>> import enum >>> class C(enum.Enum): ... A = 0 ... B = 1 ... >>> C.A >>> C.B >>> C(0).A >>> C(0).B >>> The Enum instances can access class-attributes via dot, like normal instances do. While in Python 3.10.0a5: >>> import enum >>> class C(enum.Enum): ... A = 0 ... B = 1 ... >>> C.A >>> C.B >>> C(0).A Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.10/enum.py", line 146, in __get__ raise AttributeError( AttributeError: C: no attribute 'A' >>> C(0).B Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.10/enum.py", line 146, in __get__ raise AttributeError( AttributeError: C: no attribute 'B' In real word situations, it breaks meson: https://github.com/mesonbuild/meson/blob/398df5629863e913fa603cbf02c525a9f501f8a8/mesonbuild/backend/backends.py#L52-L78 The __str__ method does: if self is self.EXITCODE: ... And it fails with: AttributeError: TestProtocol: no attribute 'EXITCODE' This worked with 3.10.0a4. If this is a deliberate backwards incompatible change of behavior, I don't think it is documented in the changelog or what's new in Python 3.10, nor that it was deprecated in Python 3.9 and 3.8. ---------- components: Library (Lib) messages: 386626 nosy: hroncok priority: normal severity: normal status: open title: Enum regression: AttributeError when accessing class variables on instances type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 07:32:55 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 08 Feb 2021 12:32:55 +0000 Subject: [issue32824] Docs: Using Python on a Macintosh has bad info per Apple site In-Reply-To: <1518392554.24.0.467229070634.issue32824@psf.upfronthosting.co.za> Message-ID: <1612787575.62.0.233299464232.issue32824@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- components: +macOS nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 07:36:29 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 08 Feb 2021 12:36:29 +0000 Subject: [issue40361] Darwin systems using win settings for webbrowser.py In-Reply-To: <1587578180.28.0.28235895563.issue40361@roundup.psfhosted.org> Message-ID: <1612787789.83.0.51773062149.issue40361@roundup.psfhosted.org> Ronald Oussoren added the comment: This is a duplicate of #41754. ---------- nosy: +ronaldoussoren resolution: -> duplicate stage: patch review -> resolved superseder: -> Webbrowser Module Cannot Find xdg-settings on OSX _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 07:41:12 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 08 Feb 2021 12:41:12 +0000 Subject: [issue43162] Enum regression: AttributeError when accessing class variables on instances In-Reply-To: <1612786979.73.0.896348338765.issue43162@roundup.psfhosted.org> Message-ID: <1612788072.61.0.998193978145.issue43162@roundup.psfhosted.org> Miro Hron?ok added the comment: Git bisect: c314e60388282d9829762fb6c30b12e2807caa19 is the first new commit commit c314e60388282d9829762fb6c30b12e2807caa19 Author: Ethan Furman Date: Tue Jan 12 23:47:57 2021 -0800 bpo-42901: [Enum] move member creation to `__set_name__` (GH-24196) `type.__new__` calls `__set_name__` and `__init_subclass__`, which means that any work metaclasses do after calling `super().__new__()` will not be available to those two methods. In particular, `Enum` classes that want to make use of `__init_subclass__` will not see any members. Almost all customization is therefore moved to before the `type.__new__()` call, including changing all members to a proto member descriptor with a `__set_name__` that will do the final conversion of a member to be an instance of the `Enum` class. Lib/enum.py | 297 +++++++++++++-------- Lib/inspect.py | 2 +- Lib/test/test_enum.py | 15 +- .../2021-01-11-17-36-59.bpo-42901.gFd-ta.rst | 3 + 4 files changed, 207 insertions(+), 110 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2021-01-11-17-36-59.bpo-42901.gFd-ta.rst ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 07:41:34 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 08 Feb 2021 12:41:34 +0000 Subject: [issue42901] [Enum] move member creation to __set_name__ in order to support __init_subclass__ In-Reply-To: <1610414848.42.0.389708219553.issue42901@roundup.psfhosted.org> Message-ID: <1612788094.23.0.857872156931.issue42901@roundup.psfhosted.org> Miro Hron?ok added the comment: I found a possible regression: https://bugs.python.org/issue43162 ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 08:10:38 2021 From: report at bugs.python.org (Gianni Tedesco) Date: Mon, 08 Feb 2021 13:10:38 +0000 Subject: [issue42683] asyncio should handle keyboard interrupt while the event loop is running In-Reply-To: <1608377188.51.0.0510456786918.issue42683@roundup.psfhosted.org> Message-ID: <1612789838.08.0.623388443447.issue42683@roundup.psfhosted.org> Change by Gianni Tedesco : ---------- nosy: +scaramanga _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 09:42:40 2021 From: report at bugs.python.org (Xie Jingyi) Date: Mon, 08 Feb 2021 14:42:40 +0000 Subject: [issue43163] code.interact() unexpected raises exception when there may be more code Message-ID: <1612795360.14.0.727480587245.issue43163@roundup.psfhosted.org> Change by Xie Jingyi : ---------- nosy: hsfzxjy priority: normal severity: normal status: open title: code.interact() unexpected raises exception when there may be more code type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 09:46:07 2021 From: report at bugs.python.org (Xie Jingyi) Date: Mon, 08 Feb 2021 14:46:07 +0000 Subject: [issue43163] code.interact() unexpected raises exception when there may be more code Message-ID: <1612795567.03.0.987191957566.issue43163@roundup.psfhosted.org> New submission from Xie Jingyi : In Python3.10.0a5, `code.interact()` will raise unexpected SyntaxError even if there should be more code. ``` Python 3.10.0a5 (default, Feb 7 2021, 20:14:10) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import code >>> code.interact() Python 3.10.0a5 (default, Feb 7 2021, 20:14:10) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> print([1, ... 2, File "", line 1 print([1, ^ SyntaxError: '[' was never closed >>> ``` Similar things also happen in IDLE. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 09:47:31 2021 From: report at bugs.python.org (Xie Jingyi) Date: Mon, 08 Feb 2021 14:47:31 +0000 Subject: [issue43163] code.interact() unexpected raises exception when there may be more code In-Reply-To: <1612795567.03.0.987191957566.issue43163@roundup.psfhosted.org> Message-ID: <1612795651.33.0.447904341872.issue43163@roundup.psfhosted.org> Change by Xie Jingyi : ---------- assignee: -> terry.reedy components: +IDLE, Library (Lib) nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 09:57:09 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 08 Feb 2021 14:57:09 +0000 Subject: [issue40168] import pandas error[python 3.8.] In-Reply-To: <1585901328.18.0.45804352886.issue40168@roundup.psfhosted.org> Message-ID: <1612796229.49.0.0549005852437.issue40168@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 10:08:40 2021 From: report at bugs.python.org (Xie Jingyi) Date: Mon, 08 Feb 2021 15:08:40 +0000 Subject: [issue43163] code.interact() unexpectedly raises exception when there may be more code In-Reply-To: <1612795567.03.0.987191957566.issue43163@roundup.psfhosted.org> Message-ID: <1612796920.13.0.587641130813.issue43163@roundup.psfhosted.org> Change by Xie Jingyi : ---------- title: code.interact() unexpected raises exception when there may be more code -> code.interact() unexpectedly raises exception when there may be more code _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 10:27:33 2021 From: report at bugs.python.org (Andre Roberge) Date: Mon, 08 Feb 2021 15:27:33 +0000 Subject: [issue43163] code.interact() unexpectedly raises exception when there may be more code In-Reply-To: <1612795567.03.0.987191957566.issue43163@roundup.psfhosted.org> Message-ID: <1612798053.76.0.583752079327.issue43163@roundup.psfhosted.org> Change by Andre Roberge : ---------- nosy: +aroberge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 10:36:27 2021 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 08 Feb 2021 15:36:27 +0000 Subject: [issue43164] test_nntplib.NetworkedNNTP_SSLTests fails on "AMD64 RHEL8 FIPS Only Blake2 Builtin Hash" buildbot Message-ID: <1612798587.66.0.557577709319.issue43164@roundup.psfhosted.org> New submission from Charalampos Stratakis : This is one of the unstable buildbots, running under FIPS mode. One of the tests is failing at the moment. ====================================================================== ERROR: setUpClass (test.test_nntplib.NetworkedNNTP_SSLTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/test/test_nntplib.py", line 321, in setUpClass cls.server = cls.NNTP_CLASS(cls.NNTP_HOST, File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/nntplib.py", line 1025, in __init__ super().__init__(host, port, user, password, readermode, File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/nntplib.py", line 334, in __init__ self.sock = self._create_socket(timeout) File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/nntplib.py", line 1031, in _create_socket sock = _encrypt_on(sock, self.ssl_context, self.host) File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/nntplib.py", line 292, in _encrypt_on return context.wrap_socket(sock, server_hostname=hostname) File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/ssl.py", line 1040, in _create self.do_handshake() File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-fips-x86_64.no-builtin-hashes-except-blake2/build/Lib/ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() ssl.SSLError: [SSL: BAD_DH_VALUE] bad dh value (_ssl.c:1122) ---------------------------------------------------------------------- ---------- assignee: christian.heimes components: SSL, Tests messages: 386631 nosy: christian.heimes, cstratak priority: normal severity: normal status: open title: test_nntplib.NetworkedNNTP_SSLTests fails on "AMD64 RHEL8 FIPS Only Blake2 Builtin Hash" buildbot versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 12:07:14 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Feb 2021 17:07:14 +0000 Subject: [issue41754] Webbrowser Module Cannot Find xdg-settings on OSX In-Reply-To: <1599718531.77.0.777287973454.issue41754@roundup.psfhosted.org> Message-ID: <1612804034.26.0.338176525127.issue41754@roundup.psfhosted.org> Serhiy Storchaka added the comment: Is it possible that your PATH contains a non-directory? Because it can give results a NotADirectoryError: >>> subprocess.check_output(['xdg-settings', 'get', 'default-web-browser'], env={'PATH': '/etc/hosts'}) Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython/Lib/subprocess.py", line 429, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/home/serhiy/py/cpython/Lib/subprocess.py", line 510, in run with Popen(*popenargs, **kwargs) as process: File "/home/serhiy/py/cpython/Lib/subprocess.py", line 962, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/home/serhiy/py/cpython/Lib/subprocess.py", line 1840, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) NotADirectoryError: [Errno 20] Not a directory: 'xdg-settings' Reopened because I afraid that there may be a severe configuration error hidden by silencing NotADirectoryError. Could you please show os.environ['PATH'] on your computer? ---------- nosy: +serhiy.storchaka status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 12:07:52 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Feb 2021 17:07:52 +0000 Subject: [issue40361] Darwin systems using win settings for webbrowser.py In-Reply-To: <1587578180.28.0.28235895563.issue40361@roundup.psfhosted.org> Message-ID: <1612804072.08.0.381903364379.issue40361@roundup.psfhosted.org> Change by Serhiy Storchaka : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 12:28:41 2021 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 08 Feb 2021 17:28:41 +0000 Subject: [issue43134] (list have item) instate (item in list) In-Reply-To: <1612520450.63.0.525292396869.issue43134@roundup.psfhosted.org> Message-ID: <1612805321.98.0.933889176173.issue43134@roundup.psfhosted.org> Mark Dickinson added the comment: @Masoud: There's a significant cost to introducing new syntax into Python; there need to be really significant benefits to justify that cost. In this case, the benefits are slight, and nowhere near the threshold needed to justify introducing a new keyword into the language. Closing again; free free to comment further, but please don't re-open the issue. ---------- nosy: +mark.dickinson status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 12:32:01 2021 From: report at bugs.python.org (Milan Balazs) Date: Mon, 08 Feb 2021 17:32:01 +0000 Subject: [issue43165] Support the same files with new param in shutil.copyfile Message-ID: <1612805521.88.0.931585192254.issue43165@roundup.psfhosted.org> New submission from Milan Balazs : The "shutil.copyfile" raises a "SameFileError" exception if the src and dts files are the same. There is no option to allow the same files(like in case of shutil.copytree(dirs_exist_ok=False)). For example: import shutil shutil.copyfile("test.txt", "test.txt") Output: >>> python3 test.py Traceback (most recent call last): File "test.py", line 3, in shutil.copyfile("test.txt", "test.txt") File "/usr/lib/python3.6/shutil.py", line 104, in copyfile raise SameFileError("{!r} and {!r} are the same file".format(src, dst)) shutil.SameFileError: 'test.txt' and 'test.txt' are the same file ---------- components: Library (Lib) messages: 386634 nosy: milanbalazs priority: normal severity: normal status: open title: Support the same files with new param in shutil.copyfile type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 12:37:08 2021 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 08 Feb 2021 17:37:08 +0000 Subject: [issue43060] Convert _decimal C API from pointer array to struct In-Reply-To: <1611913613.83.0.451385849535.issue43060@roundup.psfhosted.org> Message-ID: <1612805828.36.0.428428789134.issue43060@roundup.psfhosted.org> Mark Dickinson added the comment: Can you explain what problem this would be solving? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 12:41:16 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Feb 2021 17:41:16 +0000 Subject: [issue43101] Add deprecation of float limits for resource to documentation In-Reply-To: <1612270361.12.0.132616199639.issue43101@roundup.psfhosted.org> Message-ID: <1612806076.43.0.991791557306.issue43101@roundup.psfhosted.org> Serhiy Storchaka added the comment: This change was indirectly documented in What's New for 3.8 (deprecation) https://docs.python.org/3.8/whatsnew/3.8.html#build-and-c-api-changes: """ Functions that convert Python number to C integer like PyLong_AsLong() and argument parsing functions like PyArg_ParseTuple() with integer converting format units like 'i' will now use the __index__() special method instead of __int__(), if available. The deprecation warning will be emitted for objects with the __int__() method but without the __index__() method (like Decimal and Fraction). PyNumber_Check() will now return 1 for objects implementing __index__(). PyNumber_Long(), PyNumber_Float() and PyFloat_AsDouble() also now use the __index__() method if available. """ and for 3.10 (removing) https://docs.python.org/3.10/whatsnew/3.10.html#other-language-changes: """ Builtin and extension functions that take integer arguments no longer accept Decimals, Fractions and other objects that can be converted to integers only with a loss (e.g. that have the __int__() method but do not have the __index__() method). """ It was impractical to document it for every affected function, because there may be many tens of such functions in the stdlib, and it is difficult to find all functions which directly or indirectly use PyLong_AsLong() and similar C API. In any case accepting non-integer numbers was not intentional. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 12:55:17 2021 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 08 Feb 2021 17:55:17 +0000 Subject: [issue43101] Add deprecation of float limits for resource to documentation In-Reply-To: <1612270361.12.0.132616199639.issue43101@roundup.psfhosted.org> Message-ID: <1612806917.54.0.25871603721.issue43101@roundup.psfhosted.org> Mark Dickinson added the comment: Agreed with Serhiy that it's not practical to document all the affected functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 13:03:16 2021 From: report at bugs.python.org (Milan Balazs) Date: Mon, 08 Feb 2021 18:03:16 +0000 Subject: [issue43165] Support the same files with new param in shutil.copyfile In-Reply-To: <1612805521.88.0.931585192254.issue43165@roundup.psfhosted.org> Message-ID: <1612807396.1.0.369922298131.issue43165@roundup.psfhosted.org> Change by Milan Balazs : ---------- keywords: +patch pull_requests: +23274 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24482 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 13:12:07 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 08 Feb 2021 18:12:07 +0000 Subject: [issue43165] Support the same files with new param in shutil.copyfile In-Reply-To: <1612805521.88.0.931585192254.issue43165@roundup.psfhosted.org> Message-ID: <1612807927.19.0.0832776143601.issue43165@roundup.psfhosted.org> Serhiy Storchaka added the comment: You can use try/except. try: shutil.copyfile("test.txt", "test.txt") except SameFileError: pass ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 13:11:55 2021 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 08 Feb 2021 18:11:55 +0000 Subject: [issue43161] Taking sum of massive list comprehension results in total system crash. In-Reply-To: <1612765388.88.0.878759110904.issue43161@roundup.psfhosted.org> Message-ID: <1612807915.56.0.59247052715.issue43161@roundup.psfhosted.org> Mark Dickinson added the comment: The list you're attempting to create needs around 41GB of RAM (28 bytes for the actual object, rounded up to 32 bytes per object for alignment reasons, plus 8 bytes for each pointer in the list). Assuming you don't have that much memory on your system, it'll likely start swapping at that point. > Should I submit this as a bug to the kernel project then? That's up to you. The effect is well known and well documented - see for example https://bugzilla.redhat.com/show_bug.cgi?id=1577528 . You may want to consider using `ulimit` to limit the amount of RAM that the Python process can use. In any case, closing here, since this isn't a Python bug. ---------- nosy: +mark.dickinson resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 13:12:56 2021 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 08 Feb 2021 18:12:56 +0000 Subject: [issue43161] Taking sum of massive list comprehension results in total system crash. In-Reply-To: <1612765388.88.0.878759110904.issue43161@roundup.psfhosted.org> Message-ID: <1612807976.47.0.986082138349.issue43161@roundup.psfhosted.org> Mark Dickinson added the comment: > 28 bytes for the actual object Gah. I should proof-read before hitting "Submit Changes". That should say "28 bytes for each int object". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 13:18:32 2021 From: report at bugs.python.org (Milan Balazs) Date: Mon, 08 Feb 2021 18:18:32 +0000 Subject: [issue43165] Support the same files with new param in shutil.copyfile In-Reply-To: <1612805521.88.0.931585192254.issue43165@roundup.psfhosted.org> Message-ID: <1612808312.27.0.380842052208.issue43165@roundup.psfhosted.org> Milan Balazs added the comment: Sure, you can use try/except but it would be nice if the "shutil.copyfile" function supports the same files. If I have many files (more thousand), I don't want to check them with a try/except. Furthermore if I want to cover the unexpected exceptions as well I need to use nested try/except (I guess it's not the most elegant way). Eg.: try: shutil.copyfile("test.txt", "test.txt") except SameFileError: pass except Exception as unexpected_exception: raise unexpected_exception ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 13:32:58 2021 From: report at bugs.python.org (Ethan Furman) Date: Mon, 08 Feb 2021 18:32:58 +0000 Subject: [issue43162] Enum regression: AttributeError when accessing class variables on instances In-Reply-To: <1612786979.73.0.896348338765.issue43162@roundup.psfhosted.org> Message-ID: <1612809178.68.0.85044959806.issue43162@roundup.psfhosted.org> Ethan Furman added the comment: The code for that `__str__` seems very inefficient -- why doesn't it just do: return self.name ? ----- The issue is not being able to access class attributes, the issue is whether one enum member should be seen as an attribute of another: EnumClass.RED.BLUE and the answer is no. That wasn't possible when Enum was first introduced in 3.4, and was an unfortunate side-effect of speeding up member access in 3.5 (or 3.6). The docs have always warned against it. A deprecation warning is an easier transition, though, so I'll do that for 3.10, and in 3.11 it will become an error. Thank you for reporting! :-) ---------- assignee: -> ethan.furman stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 13:40:37 2021 From: report at bugs.python.org (Gereon Kremer) Date: Mon, 08 Feb 2021 18:40:37 +0000 Subject: [issue43101] Add deprecation of float limits for resource to documentation In-Reply-To: <1612270361.12.0.132616199639.issue43101@roundup.psfhosted.org> Message-ID: <1612809637.34.0.205724377828.issue43101@roundup.psfhosted.org> Gereon Kremer added the comment: Hm, I see. For methods that do not intercept exceptions or run code in a different process or alike, the deprecation warning and the TypeError should be sufficient. Given that identifying this issue can be particularly nasty for setrlimit (if used within preexec_fn), could we document this particular affected function anyway? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 14:08:11 2021 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 08 Feb 2021 19:08:11 +0000 Subject: [issue43101] Add deprecation of float limits for resource to documentation In-Reply-To: <1612270361.12.0.132616199639.issue43101@roundup.psfhosted.org> Message-ID: <1612811291.46.0.493692493409.issue43101@roundup.psfhosted.org> Mark Dickinson added the comment: Maybe the better fix is to have better reporting of the `preexec_fn` error, so that it's not entirely hidden by the `SubprocessError`? On the other hand, given that `preexec_fn` may be going away entirely soon (see #38435), that may not be worth it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 14:29:33 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 08 Feb 2021 19:29:33 +0000 Subject: [issue43060] Convert _decimal C API from pointer array to struct In-Reply-To: <1611913613.83.0.451385849535.issue43060@roundup.psfhosted.org> Message-ID: <1612812573.44.0.567280678908.issue43060@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: In my opinion, an array of pointers is a bad API; using a struct (like most of the other API's) is an improvement. Ref. discussions on GH-24186 (https://github.com/python/cpython/pull/24186#discussion_r560834060) and bpo-43009. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 14:48:37 2021 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 08 Feb 2021 19:48:37 +0000 Subject: [issue43166] Unused letters in Windows-specific pragma optimize Message-ID: <1612813717.65.0.159919254593.issue43166@roundup.psfhosted.org> New submission from Guido van Rossum : A coworker happened to look at our use of #pragma optimize() for Windows (VS 2017) and noticed: unless there?s something I?m missing, the ?a? and ?w? portions of the string being passed to the optimize pragma are not doing anything; I?m pretty sure they?ve been useless for 10+ years. The ?g? means turn on global optimizations and the ?t? means optimize for ?time? (i.e. speed). See the documentation at https://docs.microsoft.com/en-us/cpp/preprocessor/optimize?view=msvc-160 ---------- messages: 386646 nosy: gvanrossum priority: normal severity: normal status: open title: Unused letters in Windows-specific pragma optimize versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 14:48:49 2021 From: report at bugs.python.org (Barry Alan Scott) Date: Mon, 08 Feb 2021 19:48:49 +0000 Subject: [issue43167] macOS python install need mechanism to prevent editing shell profile files Message-ID: <1612813729.04.0.380298765117.issue43167@roundup.psfhosted.org> New submission from Barry Alan Scott : By default the python macOS installer will edit .bash_profile and .zsh_profile to add Python to the path. For many users this is a problem that requires the added lines to be removed after each install. I suggest that there is a mechanism that the user can use to tell the installer to leave the files as is. Once option could be to add a marker in the profile files that when present turns off the editing. For example a comment like: # python: no-path-edit Another possiblity is for the user to create a marker file that is checked for: touch ~/Library/Preferences/org.python.no-path.edit Any reasonable mechinism would be a great help. ---------- components: Installation messages: 386647 nosy: barry-scott priority: normal severity: normal status: open title: macOS python install need mechanism to prevent editing shell profile files versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 14:49:55 2021 From: report at bugs.python.org (Zachary Ware) Date: Mon, 08 Feb 2021 19:49:55 +0000 Subject: [issue43166] Unused letters in Windows-specific pragma optimize In-Reply-To: <1612813717.65.0.159919254593.issue43166@roundup.psfhosted.org> Message-ID: <1612813795.74.0.0134409665683.issue43166@roundup.psfhosted.org> Change by Zachary Ware : ---------- assignee: -> steve.dower components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 14:52:34 2021 From: report at bugs.python.org (Faisal Mahmood) Date: Mon, 08 Feb 2021 19:52:34 +0000 Subject: [issue42861] ipaddress - add ability to get next closet network of any prefix size In-Reply-To: <1610065851.06.0.929191666424.issue42861@roundup.psfhosted.org> Message-ID: <1612813954.35.0.999831721016.issue42861@roundup.psfhosted.org> Faisal Mahmood added the comment: Bump :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 14:57:04 2021 From: report at bugs.python.org (Barry Alan Scott) Date: Mon, 08 Feb 2021 19:57:04 +0000 Subject: [issue43168] macOS python install shares /usr/local with homebrew and can conflict Message-ID: <1612814224.94.0.081336615563.issue43168@roundup.psfhosted.org> New submission from Barry Alan Scott : The popular homebrew system installs its binaries into /usr/local/bin. The macOS python install also defaults to /usr/local/bin where it puts symlinks to Python like: % ls -l /usr/local/bin/python3.10 lrwxr-xr-x 1 root 73 8 Feb 19:45:50 2021 /usr/local/bin/python3.10@ -> ../../../Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 I understand that there are issues when homebrew installed code requires home brew's python but finds the python.org version. Having installation options to control both where the symlinks are installed or not having any symlinks installed would help. This would make it easier to work with both python.org and homebrew. >From researching it seems that homebrew cannot be configure to use another folder for its installation. ---------- components: Installation messages: 386649 nosy: barry-scott priority: normal severity: normal status: open title: macOS python install shares /usr/local with homebrew and can conflict versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 15:03:41 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Feb 2021 20:03:41 +0000 Subject: [issue43167] macOS python install need mechanism to prevent editing shell profile files In-Reply-To: <1612813729.04.0.380298765117.issue43167@roundup.psfhosted.org> Message-ID: <1612814621.92.0.251848096507.issue43167@roundup.psfhosted.org> Ned Deily added the comment: There already is a mechanism to do that: on the "Installation Type" window of the macOS installer app sequeence, select "Customize" and then deselect the "Shell profile update" package. Another option is to use the macOS "installer" command line tool instead and supply it with a choice changes file that deselects the package. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 15:04:56 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Feb 2021 20:04:56 +0000 Subject: [issue43167] macOS python install need mechanism to prevent editing shell profile files In-Reply-To: <1612813729.04.0.380298765117.issue43167@roundup.psfhosted.org> Message-ID: <1612814696.05.0.753271048804.issue43167@roundup.psfhosted.org> Change by Ned Deily : ---------- components: +macOS nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 15:11:05 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Feb 2021 20:11:05 +0000 Subject: [issue43163] codeop prematurely raises SyntaxError when ']' is needed In-Reply-To: <1612795567.03.0.987191957566.issue43163@roundup.psfhosted.org> Message-ID: <1612815065.22.0.34717058889.issue43163@roundup.psfhosted.org> Terry J. Reedy added the comment: IDLE is a Python program that wraps the Python interpreter. Before blaming IDLE for how code is executed, one should first execute the same code directly in Python. The example above shows that one should also try code.interact, especially for compilaition issues. (Xie, thank you for this reminder.) IDLE and code.interact use the same code and codeop infrastructure. Most relevant here is codeop.CommandCompiler, which should act the same as codeop.compile_command in the absence of __future__ imports. The codeop functions, including _maybe_compile, are intended to imitate in python the C REPL code that decides whether to execute, get more input, or raise. It doesn't always. (I think it would be good if a C expert compared it to the *current* C code.) >>> CC = codeop.CommandCompiler >>> cc("print([1,") # Returns None, meaning, 'Get more input'. >>> cc("print([1,\n2,") Traceback (most recent call last): File "", line 1, in File "F:\dev\3x\lib\codeop.py", line 132, in compile_command return _maybe_compile(_compile, source, filename, symbol) File "F:\dev\3x\lib\codeop.py", line 106, in _maybe_compile raise err1 File "F:\dev\3x\lib\codeop.py", line 93, in _maybe_compile code1 = compiler(source + "\n", filename, symbol) File "F:\dev\3x\lib\codeop.py", line 111, in _compile return compile(source, filename, symbol, PyCF_DONT_IMPLY_DEDENT) File "", line 1 print([1, ^ SyntaxError: '[' was never closed If the opening '[' is removed, then ']' is replaced with (. If '[' is replaced with '{' and the items adjusted, ']' is replaced with '}'. In all three cases, CC should return None to ask for more, as the REPL does. ---------- components: -IDLE nosy: +pablogsal title: code.interact() unexpectedly raises exception when there may be more code -> codeop prematurely raises SyntaxError when ']' is needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 15:11:19 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Feb 2021 20:11:19 +0000 Subject: [issue43163] codeop prematurely raises SyntaxError when closer is needed In-Reply-To: <1612795567.03.0.987191957566.issue43163@roundup.psfhosted.org> Message-ID: <1612815079.09.0.236466922813.issue43163@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- title: codeop prematurely raises SyntaxError when ']' is needed -> codeop prematurely raises SyntaxError when closer is needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 15:14:12 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Feb 2021 20:14:12 +0000 Subject: [issue43168] macOS python install shares /usr/local with homebrew and can conflict In-Reply-To: <1612814224.94.0.081336615563.issue43168@roundup.psfhosted.org> Message-ID: <1612815252.31.0.0798652688457.issue43168@roundup.psfhosted.org> Ned Deily added the comment: Similar to Issue43167, there already is a mechanism to do that: on the "Installation Type" window of the macOS installer app sequeence, select "Customize" and then deselect the "UNIX command-line tools" package. Another option is to use the macOS "installer" command line tool instead and supply it with a choice changes file that deselects the package. Noted in passing: apparently Homebrew has moved to using /opt/homebrew as its root for installs on Apple Silicon Macs rather than /usr/local. And it is possible to use other prefixes as long as you are willing to let homebrew build the packages from source (admittedly not as convenient). ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 15:15:24 2021 From: report at bugs.python.org (Barry Alan Scott) Date: Mon, 08 Feb 2021 20:15:24 +0000 Subject: [issue43167] macOS python install need mechanism to prevent editing shell profile files In-Reply-To: <1612813729.04.0.380298765117.issue43167@roundup.psfhosted.org> Message-ID: <1612815324.93.0.562983107145.issue43167@roundup.psfhosted.org> Barry Alan Scott added the comment: It was not obvious that I could do that with Customise. Indeed I installed 3.10a5 just so that I could remind myself of what the installer did. It would help is the Installation type page told the user why they might want to use the Customise for. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 15:21:23 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Feb 2021 20:21:23 +0000 Subject: [issue43167] macOS python install need mechanism to prevent editing shell profile files In-Reply-To: <1612813729.04.0.380298765117.issue43167@roundup.psfhosted.org> Message-ID: <1612815683.28.0.230117878655.issue43167@roundup.psfhosted.org> Ned Deily added the comment: I'm not sure that the text on the "Installation Type" window can be customized but we could add something to either the "Introduction" or "Read Me" windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 15:22:02 2021 From: report at bugs.python.org (Barry Alan Scott) Date: Mon, 08 Feb 2021 20:22:02 +0000 Subject: [issue43168] macOS python install shares /usr/local with homebrew and can conflict In-Reply-To: <1612814224.94.0.081336615563.issue43168@roundup.psfhosted.org> Message-ID: <1612815722.87.0.718943539503.issue43168@roundup.psfhosted.org> Barry Alan Scott added the comment: >From "UNIX command-line tools" its not clear to me that that prevents symlinks in /usr/local/bin. Maybe word it as "Add python to /usr/local/bin". Is this documented anywhere? I just looked at the download page https://www.python.org/downloads/macOS and did not seen any linked pages that might explain the options. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 15:25:10 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Feb 2021 20:25:10 +0000 Subject: [issue43167] Add a note to the macOS installer welcome window about customize options In-Reply-To: <1612813729.04.0.380298765117.issue43167@roundup.psfhosted.org> Message-ID: <1612815910.87.0.710564269454.issue43167@roundup.psfhosted.org> Change by Ned Deily : ---------- assignee: -> ned.deily stage: -> needs patch title: macOS python install need mechanism to prevent editing shell profile files -> Add a note to the macOS installer welcome window about customize options _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 15:27:34 2021 From: report at bugs.python.org (Barry Alan Scott) Date: Mon, 08 Feb 2021 20:27:34 +0000 Subject: [issue43167] Add a note to the macOS installer welcome window about customize options In-Reply-To: <1612813729.04.0.380298765117.issue43167@roundup.psfhosted.org> Message-ID: <1612816054.15.0.919612382657.issue43167@roundup.psfhosted.org> Barry Alan Scott added the comment: The readme page is a good 2nd best is PKG install has not option to control the text on the INstallation type page. My guess is that the info would need be in visible without scrolling for people to notice it. (UX is hard). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 15:28:29 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Feb 2021 20:28:29 +0000 Subject: [issue43168] macOS python install shares /usr/local with homebrew and can conflict In-Reply-To: <1612814224.94.0.081336615563.issue43168@roundup.psfhosted.org> Message-ID: <1612816109.5.0.917687039808.issue43168@roundup.psfhosted.org> Ned Deily added the comment: On the Installation Type -> Customize window in the installer, there is an explanation of a package when you can click on it. For Unix command-line tools package, the explanation (at the bottom of the window) is: "This package installs the unix tools in /usr/local/bin for compatibility with older releases of Python. This package is not necessary to use Python." This also appears in the output from the installer command-line tool. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 15:28:53 2021 From: report at bugs.python.org (Ross Rhodes) Date: Mon, 08 Feb 2021 20:28:53 +0000 Subject: [issue42916] Support for DICOM image file format in imghdr module In-Reply-To: <1610497726.98.0.199039272928.issue42916@roundup.psfhosted.org> Message-ID: <1612816133.91.0.977105104119.issue42916@roundup.psfhosted.org> Ross Rhodes added the comment: Looking for input from other contributors here. Naturally with a PR already open I?m inclined to keep these changes, but if the majority agree that it is too specific a format then I?m happy to hear alternative suggestions? Ross ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 15:30:51 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Feb 2021 20:30:51 +0000 Subject: [issue43163] codeop prematurely raises SyntaxError when closer is needed In-Reply-To: <1612795567.03.0.987191957566.issue43163@roundup.psfhosted.org> Message-ID: <1612816251.85.0.11068900613.issue43163@roundup.psfhosted.org> Terry J. Reedy added the comment: test.test_codeop's test_incomplete is incomplete in that it tests several missing-closer single lines, like the above and "[x for x in (", all of which pass, but no corresponding multiple line snippets, like the above. The only multiple line snippets are for compound statements. As far as I could see, the same is true for test_valid. Are there similar tests for the REPL? Are they more complete? Should not both get the same tests? ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 15:32:07 2021 From: report at bugs.python.org (Ross Rhodes) Date: Mon, 08 Feb 2021 20:32:07 +0000 Subject: [issue42778] Add follow_symlinks=True parameter to both os.path.samefile() and Path.samefile() In-Reply-To: <1609228261.66.0.888283704166.issue42778@roundup.psfhosted.org> Message-ID: <1612816327.79.0.770625941485.issue42778@roundup.psfhosted.org> Ross Rhodes added the comment: Thanks for sharing the alternative approach, Serhiy. Sounds like the proposed changes aren?t necessary if the combined use of samestat and lstat achieve the desired behaviour. Any objections if I close the open PR? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 15:33:51 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Feb 2021 20:33:51 +0000 Subject: [issue43163] codeop prematurely raises on 2nd line when closer is needed In-Reply-To: <1612795567.03.0.987191957566.issue43163@roundup.psfhosted.org> Message-ID: <1612816431.08.0.553035381098.issue43163@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- title: codeop prematurely raises SyntaxError when closer is needed -> codeop prematurely raises on 2nd line when closer is needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 15:39:13 2021 From: report at bugs.python.org (Barry Alan Scott) Date: Mon, 08 Feb 2021 20:39:13 +0000 Subject: [issue43168] macOS python install shares /usr/local with homebrew and can conflict In-Reply-To: <1612814224.94.0.081336615563.issue43168@roundup.psfhosted.org> Message-ID: <1612816753.87.0.580888075425.issue43168@roundup.psfhosted.org> Barry Alan Scott added the comment: I was wondering what the bottom text box was for. The usual UX for check boxes is to toggle when the text of the control is clicked. Because of that I avoid clicking on check boxes that I do not know if I want to change. Hence I did not get to see the description of the options. The PKG installer is odd in not having that behaviour. To check I remember this correctly I use Apple Mail Preferences and click the text on a check box item. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 15:40:56 2021 From: report at bugs.python.org (pkkm) Date: Mon, 08 Feb 2021 20:40:56 +0000 Subject: [issue43169] argparse: support options similar to find's -exec Message-ID: <1612816856.78.0.546559572107.issue43169@roundup.psfhosted.org> New submission from pkkm : This is a feature request for options that would work like the "find" program's "-exec" option, which takes the arguments following it unconditionally until it encounters a ";" or a "+". There are multiple ways to achieve this, but I think a good general solution would be to let "nargs" take a function. This function would receive a list of all arguments following the current one and return the number of arguments that the current one should take. An example usage would be: def command_nargs(args_after): for i, arg in enumerate(args_after): if arg in [';', '+']: return i + 1 raise argparse.ArgumentTypeError( 'Expected a command terminated with `;` or `+`.') parser = argparse.ArgumentParser() parser.add_argument('--command', nargs=command_nargs) parser.add_argument('--option') parser.parse_args(['--command', 'echo', 'hello', ';', '--option', 'value']) # => Namespace(command=['echo', 'hello', ';'], option='value') parser.parse_args(['--command', 'program', '--option', '+']) # => Namespace(command=['program', '--option', '+'], option=None) The crucial difference between this and the current behavior of "nargs" is that the requested number of arguments would be taken unconditionally, even if the arguments looked like options: parser = argparse.ArgumentParser() parser.add_argument('--nargs-function', nargs=lambda _: 1) parser.add_argument('--nargs-number', nargs=1) parser.add_argument('--option') parser.parse_args(['--nargs-function', '--option']) # => Namespace(nargs_function=['--option'], option=None) parser.parse_args(['--nargs-number', '--option']) # => error: argument --nargs-number: expected 1 argument Alternatively, if the difference between the behavior of "nargs=number" and "nargs=function" is judged to be too large, an optional argument "greedy" could be added to "ArgumentParser" and "add_argument". With "greedy=False" (the default), argparse would behave like it currently does. With "greedy=True", options would be processed left to right and would be assigned values unconditionally, even if these values looked like other options. An option with "nargs='*', greedy=True" or "nargs='+', greedy=True" would take all arguments to its right. An option with "nargs=function, greedy=False" would stop taking arguments when it encountered an option, while with "greedy=True" it would have the behavior proposed in the previous paragraphs. An example usage would then be: parser = argparse.ArgumentParser() parser.add_argument('--nargs-function', nargs=lambda _: 1) parser.add_argument('--nargs-number', nargs=1) parser.add_argument('--option') parser.parse_args(['--nargs-function', '--option']) # => error: argument --nargs-function: expected 1 argument parser.parse_args(['--nargs-number', '--option']) # => error: argument --nargs-number: expected 1 argument #################### parser = argparse.ArgumentParser() parser.add_argument('--nargs-function', nargs=lambda _: 1, greedy=True) parser.add_argument('--nargs-number', nargs=1, greedy=True) parser.add_argument('--option') parser.parse_args(['--nargs-function', '--option']) # => Namespace(nargs_function=['--option'], option=None) parser.parse_args(['--nargs-number', '--option']) # => Namespace(nargs_number=['--option'], option=None) and: parser = argparse.ArgumentParser() parser.add_argument('--command', nargs=command_nargs) parser.add_argument('--option') parser.add_argument('arg', nargs='?') parser.parse_args(['--command', 'program', '--option', 'value', '+']) # => Namespace(arg='+', command=['program'], option='value') #################### parser = argparse.ArgumentParser(greedy=True) parser.add_argument('--command', nargs=command_nargs) parser.add_argument('--option') parser.add_argument('arg', nargs='?') parser.parse_args(['--command', 'program', '--option', 'value', '+']) # => Namespace(arg=None, command=['program', '--option', 'value', '+'], option=None) Both of the alternatives in this feature request have the upside of making the behaviors requested in #9334 and #14364 possible. ---------- components: Library (Lib) messages: 386662 nosy: pkkm priority: normal severity: normal status: open title: argparse: support options similar to find's -exec type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 15:42:33 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Feb 2021 20:42:33 +0000 Subject: [issue43168] macOS python install shares /usr/local with homebrew and can conflict In-Reply-To: <1612814224.94.0.081336615563.issue43168@roundup.psfhosted.org> Message-ID: <1612816953.33.0.697401259256.issue43168@roundup.psfhosted.org> Ned Deily added the comment: > I was wondering what the bottom text box was for. [...] I suggest you take that UX issue up with Apple as we have no control over the macOS Installer app and it has worked that way for a long, long time :) If the proposed solution in Issue43167 of adding some text to the installer Welcome or ReadMe windows is sufficient, we can close this as a duplicate thereof. ---------- components: +macOS nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 15:44:09 2021 From: report at bugs.python.org (Zachary Ware) Date: Mon, 08 Feb 2021 20:44:09 +0000 Subject: [issue43169] argparse: support options similar to find's -exec In-Reply-To: <1612816856.78.0.546559572107.issue43169@roundup.psfhosted.org> Message-ID: <1612817049.52.0.642102678626.issue43169@roundup.psfhosted.org> Change by Zachary Ware : ---------- nosy: +paul.j3, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 15:58:27 2021 From: report at bugs.python.org (John Reese) Date: Mon, 08 Feb 2021 20:58:27 +0000 Subject: [issue41100] Support macOS 11 and Apple Silicon Macs In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1612817907.04.0.538419395366.issue41100@roundup.psfhosted.org> John Reese added the comment: Is there an ETA for having Big Sur support backported to the 3.8 branch, or is it already there and I'm just not seeing it here? ---------- nosy: +jreese _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 15:59:52 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 08 Feb 2021 20:59:52 +0000 Subject: [issue43163] codeop prematurely raises on 2nd line when closer is needed In-Reply-To: <1612795567.03.0.987191957566.issue43163@roundup.psfhosted.org> Message-ID: <1612817992.01.0.370136405133.issue43163@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > (I think it would be good if a C expert compared it to the *current* C code.) That would be very beneficial but is quite a big task, specially given that codeop design is quite surprising. I personally find quite confusing the way codeop is handling the decisions on continuing or not (is based on compiling the code with different levels of new lines and then checking the repr() of the exceptions). It would be good if someone familiar with "codeop" design can take a look on what's the best way to proceed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 16:02:02 2021 From: report at bugs.python.org (Noah Steinberg) Date: Mon, 08 Feb 2021 21:02:02 +0000 Subject: [issue43170] wintypes.SIZE is 8bytes on 32 bit machines Message-ID: <1612818122.48.0.291280714647.issue43170@roundup.psfhosted.org> New submission from Noah Steinberg : Noticed while debugging a problem with a test running on Windows 10 x86 that sizeof(wintypes.SIZE)==8 when I believe it should be 4. While using kernel32.CreateRemoteThread.argtypes = [wintypes.HANDLE, wintypes.LPCVOID, wintypes.DWORD, wintypes.LPCVOID, wintypes.LPCVOID, wintypes.DWORD, wintypes.LPDWORD] and kernel32.CreateRemoteThread(h_process, 0, 0, 0xbadadd, 0, 4, byref(thread_id)) It caused CreateRemoteThread to recieve 4 as the last argument, resulting in an access denied ---------- components: ctypes messages: 386666 nosy: nnstein priority: normal severity: normal status: open title: wintypes.SIZE is 8bytes on 32 bit machines type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 16:11:25 2021 From: report at bugs.python.org (Frank AK) Date: Mon, 08 Feb 2021 21:11:25 +0000 Subject: [issue43171] Counter not supported add in Python 3.x Message-ID: <1612818685.55.0.0888259271118.issue43171@roundup.psfhosted.org> New submission from Frank AK : In python 3.10, you couldn't plus two Counter instance, you will got the below tip: ``` >>> from collections import Counter >>> x={1:['a','b','c']} >>> y={1:['d','e','f'],2:['g']} >>> Counter(y) + Counter(x) Traceback (most recent call last): File "", line 1, in File "/Users/frank/github.com/cpython/Lib/collections/__init__.py", line 797, in __add__ if newcount > 0: TypeError: '>' not supported between instances of 'list' and 'int' ``` But in Python 2, you got the desire result like : ``` >>> from collections import Counter >>> x={1:['a','b','c']} >>> y={1:['d','e','f'],2:['g']} >>> Counter(x) + Counter(y) Counter({2: ['g'], 1: ['a', 'b', 'c', 'd', 'e', 'f']}) ``` ---------- messages: 386667 nosy: landpack priority: normal severity: normal status: open title: Counter not supported add in Python 3.x versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 16:18:14 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 08 Feb 2021 21:18:14 +0000 Subject: [issue43163] codeop prematurely raises on 2nd line when closer is needed In-Reply-To: <1612795567.03.0.987191957566.issue43163@roundup.psfhosted.org> Message-ID: <1612819094.31.0.633801664528.issue43163@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +23275 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/24483 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 17:09:57 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 08 Feb 2021 22:09:57 +0000 Subject: [issue43162] Enum regression: AttributeError when accessing class variables on instances In-Reply-To: <1612786979.73.0.896348338765.issue43162@roundup.psfhosted.org> Message-ID: <1612822197.07.0.358443474969.issue43162@roundup.psfhosted.org> Miro Hron?ok added the comment: Thanks. In the meantime, I've opened https://github.com/mesonbuild/meson/issues/8318 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 17:32:40 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Feb 2021 22:32:40 +0000 Subject: [issue43156] Python windows installer has a confusing name - add setup to its name In-Reply-To: <1612721728.1.0.320173776813.issue43156@roundup.psfhosted.org> Message-ID: <1612823560.34.0.415357701186.issue43156@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- components: +Installation, Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware stage: -> needs patch versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 17:39:31 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 08 Feb 2021 22:39:31 +0000 Subject: [issue43156] Python windows installer has a confusing name - add setup to its name In-Reply-To: <1612721728.1.0.320173776813.issue43156@roundup.psfhosted.org> Message-ID: <1612823971.22.0.389495831297.issue43156@roundup.psfhosted.org> Terry J. Reedy added the comment: I agree with the idea and Matthew's version. This continuing problem is worth doing experiments. I marked this as 'enhancement' and 3.10 only because this might break code that hardcodes the complete name. This might also, unfortunately, be a reason to reject, but we have changed the installer name before. Or the Windows people might decide that backports are OK. ---------- nosy: +terry.reedy type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 18:04:30 2021 From: report at bugs.python.org (Eryk Sun) Date: Mon, 08 Feb 2021 23:04:30 +0000 Subject: [issue43170] wintypes.SIZE is 8bytes on 32 bit machines In-Reply-To: <1612818122.48.0.291280714647.issue43170@roundup.psfhosted.org> Message-ID: <1612825470.69.0.163775254676.issue43170@roundup.psfhosted.org> Eryk Sun added the comment: The SIZE [1] type for a rectangle has nothing to do with SIZE_T [2], the integer type that's returned by C sizeof(). SIZE_T isn't defined in wintypes. A new issue can be opened to add more of the common data types to wintypes. Here's an example for defining CreateRemoteThread: import ctypes from ctypes import wintypes kernel32 = ctypes.WinDLL('kernel32', use_last_error=True) SIZE_T = ctypes.c_size_t LPSECURITY_ATTRIBUTES = ctypes.c_void_p LPTHREAD_START_ROUTINE = ctypes.WINFUNCTYPE(wintypes.DWORD, wintypes.LPVOID) kernel32.CreateRemoteThread.restype = wintypes.HANDLE kernel32.CreateRemoteThread.argtypes = ( wintypes.HANDLE, # hProcess LPSECURITY_ATTRIBUTES, # lpThreadAttributes SIZE_T, # dwStackSize LPTHREAD_START_ROUTINE, # lpStartAddress wintypes.LPVOID, # lpParameter wintypes.DWORD, # dwCreationFlags wintypes.LPDWORD) # lpThreadId --- [1] https://docs.microsoft.com/en-us/windows/win32/api/windef/ns-windef-size [2] https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types#SIZE_T ---------- nosy: +eryksun resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 19:08:52 2021 From: report at bugs.python.org (Trevor Newton) Date: Tue, 09 Feb 2021 00:08:52 +0000 Subject: [issue13508] ctypes' find_library breaks with ARM ABIs In-Reply-To: <1322664873.68.0.763423976883.issue13508@psf.upfronthosting.co.za> Message-ID: <1612829332.46.0.988648420471.issue13508@roundup.psfhosted.org> Trevor Newton added the comment: I am still encountering this issue when using pyudev on Python 3.8.5. ---------- nosy: +trevor.newton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 19:32:48 2021 From: report at bugs.python.org (Ethan Furman) Date: Tue, 09 Feb 2021 00:32:48 +0000 Subject: [issue43162] Enum regression: AttributeError when accessing class variables on instances In-Reply-To: <1612786979.73.0.896348338765.issue43162@roundup.psfhosted.org> Message-ID: <1612830768.93.0.532868217093.issue43162@roundup.psfhosted.org> Change by Ethan Furman : ---------- keywords: +patch pull_requests: +23276 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/24486 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 19:43:36 2021 From: report at bugs.python.org (Dylan Baker) Date: Tue, 09 Feb 2021 00:43:36 +0000 Subject: [issue43162] Enum regression: AttributeError when accessing class variables on instances In-Reply-To: <1612786979.73.0.896348338765.issue43162@roundup.psfhosted.org> Message-ID: <1612831416.44.0.250326958621.issue43162@roundup.psfhosted.org> Dylan Baker added the comment: Author of said meson code here. I use this pattern when the enum names and values are implementation details, but the string values are user visible. In this case the enum itself is used internally to represent what kind of test we're doing, but we're initializing it from user input. There might be reasons in the future that the names of the enum members and the string values being passed in aren't the same anymore, say because we map two string values to one enum value. I guess I could accomplish the same thing with a staticmethod or helper function, but the code is effectively an alternate initializer, and follows that pattern using a classmethod. ---------- nosy: +baker.dylan.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 19:45:00 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 09 Feb 2021 00:45:00 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1612831500.49.0.644161816616.issue42128@roundup.psfhosted.org> Guido van Rossum added the comment: The PEP has been accepted. I propose that we use separate PRs for docs (and incremental improvements to the code) but tie them all together using the same issue number (this will require adding "skip news" to later PRs). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 20:00:37 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Tue, 09 Feb 2021 01:00:37 +0000 Subject: [issue43162] Enum regression: AttributeError when accessing class variables on instances In-Reply-To: <1612786979.73.0.896348338765.issue43162@roundup.psfhosted.org> Message-ID: <1612832437.17.0.16833871333.issue43162@roundup.psfhosted.org> Miro Hron?ok added the comment: Ethan, should the depreciation exist for 2 releases prior to removal? Dylan, even in that case, I guess the proper way to access the other members is supposed to be type(self).FOO or ClassName.FOO, not self.FOO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 20:06:01 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 09 Feb 2021 01:06:01 +0000 Subject: [issue13501] Make libedit support more generic; port readline / libedit to FreeBSD In-Reply-To: <1322579942.3.0.601983912656.issue13501@psf.upfronthosting.co.za> Message-ID: <1612832761.56.0.589201212301.issue13501@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset e1f77695132e814728cda982f11342a2e3c7272c by Roland Hieber in branch 'master': bpo-13501: allow choosing between readline and libedit (GH-24189) https://github.com/python/cpython/commit/e1f77695132e814728cda982f11342a2e3c7272c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 20:06:01 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 09 Feb 2021 01:06:01 +0000 Subject: [issue38634] Symbol resolution conflict when embeding python in an application using libedit In-Reply-To: <1572362225.21.0.644355885677.issue38634@roundup.psfhosted.org> Message-ID: <1612832761.78.0.642817639047.issue38634@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset e1f77695132e814728cda982f11342a2e3c7272c by Roland Hieber in branch 'master': bpo-13501: allow choosing between readline and libedit (GH-24189) https://github.com/python/cpython/commit/e1f77695132e814728cda982f11342a2e3c7272c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 20:08:37 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 09 Feb 2021 01:08:37 +0000 Subject: [issue13501] Make libedit support more generic; port readline / libedit to FreeBSD In-Reply-To: <1322579942.3.0.601983912656.issue13501@psf.upfronthosting.co.za> Message-ID: <1612832917.51.0.503481841401.issue13501@roundup.psfhosted.org> Gregory P. Smith added the comment: I'm closing this as I believe everything we need done is done at this point. Open new issues if there are remaining libedit vs libreadline things to take care of. Thanks everyone! ---------- resolution: -> fixed stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 20:10:37 2021 From: report at bugs.python.org (Kubilay Kocak) Date: Tue, 09 Feb 2021 01:10:37 +0000 Subject: [issue43068] test_subprocess: test_specific_shell() fails on AMD64 FreeBSD Shared 3.x In-Reply-To: <1611956940.56.0.594651223595.issue43068@roundup.psfhosted.org> Message-ID: <1612833037.22.0.230815470923.issue43068@roundup.psfhosted.org> Kubilay Kocak added the comment: Rebuilding bash & gdb now to pickup new/updated ncurses library. Still suggest picking up "subprocess.CalledProcessError" generically in test framework for tests that use subprocess/external commands ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 20:12:14 2021 From: report at bugs.python.org (Kubilay Kocak) Date: Tue, 09 Feb 2021 01:12:14 +0000 Subject: [issue13501] Make libedit support more generic; port readline / libedit to FreeBSD In-Reply-To: <1322579942.3.0.601983912656.issue13501@psf.upfronthosting.co.za> Message-ID: <1612833134.86.0.626879629962.issue13501@roundup.psfhosted.org> Kubilay Kocak added the comment: Would we like the freebsd worker CI configurations to be modified to use ports/package versions of libedit (or readline, or whatever) to ensure converage? Right now the defaults are used (whatever edit library that entails) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 20:33:00 2021 From: report at bugs.python.org (Ethan Furman) Date: Tue, 09 Feb 2021 01:33:00 +0000 Subject: [issue43162] Enum regression: AttributeError when accessing class variables on instances In-Reply-To: <1612786979.73.0.896348338765.issue43162@roundup.psfhosted.org> Message-ID: <1612834380.61.0.288303577363.issue43162@roundup.psfhosted.org> Ethan Furman added the comment: New changeset d65b9033d6d092552775f6f5e41e7647100f9f2c by Ethan Furman in branch 'master': bpo-43162: [Enum] deprecate enum member.member access (GH-24486) https://github.com/python/cpython/commit/d65b9033d6d092552775f6f5e41e7647100f9f2c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 20:40:34 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 09 Feb 2021 01:40:34 +0000 Subject: [issue43172] Fix test_readline when compiled using --with-readline=edit Message-ID: <1612834834.05.0.814516616916.issue43172@roundup.psfhosted.org> New submission from Gregory P. Smith : https://bugs.python.org/issue13501 added configure --with-readline=edit support so that the readline module can build and link against libedit on any platform instead of only using libreadline. Building Python that way on Debian Linux and running test_readline results in a variety of test failure for me: ``` == CPython 3.10.0a5+ (heads/master-dirty:e1f7769513, Feb 9 2021, 01:20:59) [GCC 10.2.1 20210110] == cwd: /home/gps/oss/cpython/b/build/test_python_1681021? == CPU count: 16 == encodings: locale=UTF-8, FS=utf-8 0:00:00 load avg: 0.47 Run tests sequentially 0:00:00 load avg: 0.47 [1/1] test_readline readline version: 0x402 readline runtime version: 0x402 readline library version: 'EditLine wrapper' use libedit emulation? True testHistoryUpdates (test.test_readline.TestHistoryManipulation) ... ERROR test_nonascii_history (test.test_readline.TestHistoryManipulation) ... FAIL test_write_read_append (test.test_readline.TestHistoryManipulation) ... FAIL test_auto_history_disabled (test.test_readline.TestReadline) ... ok test_auto_history_enabled (test.test_readline.TestReadline) ... ok test_history_size (test.test_readline.TestReadline) ... skipped 'this readline version does not support history-size' test_init (test.test_readline.TestReadline) ... ok test_nonascii (test.test_readline.TestReadline) ... FAIL ====================================================================== ERROR: testHistoryUpdates (test.test_readline.TestHistoryManipulation) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/gps/oss/cpython/gpshead/Lib/test/test_readline.py", line 59, in testHistoryUpdates readline.replace_history_item(0, "replaced line") ValueError: No history item at position 0 ====================================================================== FAIL: test_nonascii_history (test.test_readline.TestHistoryManipulation) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/gps/oss/cpython/gpshead/Lib/test/test_readline.py", line 127, in test_nonascii_history self.assertEqual(readline.get_history_item(1), "entr?e 1") AssertionError: 'entr?e 22' != 'entr?e 1' - entr?e 22 ? ^^ + entr?e 1 ? ^ ====================================================================== FAIL: test_write_read_append (test.test_readline.TestHistoryManipulation) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/gps/oss/cpython/gpshead/Lib/test/test_readline.py", line 98, in test_write_read_append self.assertEqual(readline.get_current_history_length(), 3) AssertionError: 4 != 3 ====================================================================== FAIL: test_nonascii (test.test_readline.TestReadline) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/gps/oss/cpython/gpshead/Lib/test/test_readline.py", line 231, in test_nonascii self.assertIn(b"indexes 11 13\r\n", output) AssertionError: b'indexes 11 13\r\n' not found in bytearray(b"^A^B^B^B^B^B^B^B\t\tx\t\r\n[\xc3\xafnserted]|t\xc3\xab[after]\x08\x08\x08\x08\x08\x08\x08text \'t\\xeb\'\r\nline \'[\\xefnserted]|t\\xeb[after]\'\r\nindexes 10 12\r\n\x07\r\x1b[14Gtext \'t\\xeb\'\r\nline \'[\\xefnserted]|t\\xeb[after]\'\r\nindexes 10 12\r\n\r\nt\xc3\xabnt t\xc3\xabxt\r\n\r\x1b[K[\xc3\xafnserted]|t\xc3\xab[after]\x1b[14G\r\x1b[14G\x1b[1 at x[\x08\x07\r\x1b[15G\x1b[1 at t[\x08\r\nresult \'[\\xefnserted]|t\\xebxt[after]\'\r\nhistory \'[\\xefnserted]|t\\xebxt[after]\'\r\n") ---------------------------------------------------------------------- Ran 8 tests in 0.123s FAILED (failures=3, errors=1, skipped=1) ``` I suspect these are just behavior differences in the library and some tests need to be skipped or test alternate behavior in this situation? ---------- assignee: gregory.p.smith components: Library (Lib), Tests messages: 386681 nosy: gregory.p.smith priority: normal severity: normal stage: needs patch status: open title: Fix test_readline when compiled using --with-readline=edit type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 20:41:36 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 09 Feb 2021 01:41:36 +0000 Subject: [issue43172] Fix test_readline when compiled using --with-readline=edit In-Reply-To: <1612834834.05.0.814516616916.issue43172@roundup.psfhosted.org> Message-ID: <1612834896.96.0.741496355352.issue43172@roundup.psfhosted.org> Gregory P. Smith added the comment: Motivation: I want to add --with-readline=edit to the configure flags of one of my buildbot configs via an edit to https://github.com/python/buildmaster-config/tree/master/master/custom ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 20:43:24 2021 From: report at bugs.python.org (Ethan Furman) Date: Tue, 09 Feb 2021 01:43:24 +0000 Subject: [issue43162] Enum regression: AttributeError when accessing class variables on instances In-Reply-To: <1612786979.73.0.896348338765.issue43162@roundup.psfhosted.org> Message-ID: <1612835004.71.0.902678798624.issue43162@roundup.psfhosted.org> Ethan Furman added the comment: Dylan, it's not the `from_str()` method, but the `__str__` method that is the problem. Instead of def __str__(self): if self is self.EXITCODE: return 'exitcode' it should be def __str__(self): cls = self.__class__ if self is cls.EXITCODE: return 'exitcode' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 20:44:00 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 09 Feb 2021 01:44:00 +0000 Subject: [issue13501] Make libedit support more generic; port readline / libedit to FreeBSD In-Reply-To: <1322579942.3.0.601983912656.issue13501@psf.upfronthosting.co.za> Message-ID: <1612835040.69.0.97067611761.issue13501@roundup.psfhosted.org> Gregory P. Smith added the comment: That seems like a good idea to prevent regressions if anyone knows how to do that. For python.org/dev/'s buildbot fleet, the configuration of what configure and make flags happens via https://github.com/python/buildmaster-config/tree/master/master/custom - note the 'def setup' overriding that needs to be done in factories.py so that older branches {'3.7', '3.8', '3.9'} are not configured using the flag. Coordinate with the owner of a particular buildbot to make sure the system has the requisite installed libraries and headers. I manually tested a Linux build against libedit, it builds and works. But test_readline has failures. tracking those in https://bugs.python.org/issue43172 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 20:46:45 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 09 Feb 2021 01:46:45 +0000 Subject: [issue43172] Fix test_readline when compiled using --with-readline=edit In-Reply-To: <1612834834.05.0.814516616916.issue43172@roundup.psfhosted.org> Message-ID: <1612835205.16.0.716326272334.issue43172@roundup.psfhosted.org> Gregory P. Smith added the comment: https://github.com/python/buildmaster-config/pull/229 tracks my buildbot config update ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 20:58:24 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 09 Feb 2021 01:58:24 +0000 Subject: [issue43171] Counter not supported add in Python 3.x In-Reply-To: <1612818685.55.0.0888259271118.issue43171@roundup.psfhosted.org> Message-ID: <1612835904.24.0.827718332722.issue43171@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 20:58:56 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 09 Feb 2021 01:58:56 +0000 Subject: [issue41824] Docs for typing.ForwardRef don't state that it was added in 3.7 In-Reply-To: <1600706127.1.0.52497874592.issue41824@roundup.psfhosted.org> Message-ID: <1612835936.64.0.130259145931.issue41824@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset da21f7b6e1fd5bd3e78931a06c5eb694f6335233 by Ken Jin in branch 'master': bpo-41824: Add versionadded for typing.ForwardRef docs (#24224) https://github.com/python/cpython/commit/da21f7b6e1fd5bd3e78931a06c5eb694f6335233 ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 21:02:39 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 09 Feb 2021 02:02:39 +0000 Subject: [issue42377] allow typing.cast with TYPE_CHECKING In-Reply-To: <1605556237.18.0.0550967152781.issue42377@roundup.psfhosted.org> Message-ID: <1612836159.9.0.03602297575.issue42377@roundup.psfhosted.org> Change by Guido van Rossum : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 21:39:22 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 09 Feb 2021 02:39:22 +0000 Subject: [issue43172] Fix test_readline when compiled using --with-readline=edit In-Reply-To: <1612834834.05.0.814516616916.issue43172@roundup.psfhosted.org> Message-ID: <1612838362.31.0.320954085162.issue43172@roundup.psfhosted.org> Gregory P. Smith added the comment: examining the behaviors being tested, it seems there are differences in 0 and 1 based indexing behaviors between libreadline and libedit. libedit frankly seems more consistent. but the Python readline module docs document the 0 and 1 based quirks as part of the module API. We may need to adjust for these based on direct libedit use vs libreadline within the module code. it appears code doing such adjustments already exists on macOS (i haven't yet looked in the module code or if Darwin as a platform does it in their readline shim around libedit). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 21:45:15 2021 From: report at bugs.python.org (Ethan Furman) Date: Tue, 09 Feb 2021 02:45:15 +0000 Subject: [issue43162] Enum regression: AttributeError when accessing class variables on instances In-Reply-To: <1612786979.73.0.896348338765.issue43162@roundup.psfhosted.org> Message-ID: <1612838715.73.0.473959311292.issue43162@roundup.psfhosted.org> Change by Ethan Furman : ---------- pull_requests: +23277 pull_request: https://github.com/python/cpython/pull/24487 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 21:45:38 2021 From: report at bugs.python.org (Jeff Moguillansky) Date: Tue, 09 Feb 2021 02:45:38 +0000 Subject: [issue43173] Python Windows DLL search paths Message-ID: <1612838738.77.0.220121925422.issue43173@roundup.psfhosted.org> New submission from Jeff Moguillansky : Hi, What's the correct way to set the DLL search path when running a python script? It seems that it doesn't search the directories specified in PATH environment variable. FYI: For debugging the DLL loading issues, I'm using "Process Monitor" from sysinternals: https://docs.microsoft.com/en-us/sysinternals/downloads/procmon, but please share any tips if you have a better approach. Also, the Python error message is not very informative: when loading a python module (built using Cython), if it fails to load a specific DLL, it says "import module failed, DLL not found" but it doesn't say the name of the actual DLL that is not found. It would be helpful if it listed the actual name of the DLL that it cannot find. ---------- components: Windows messages: 386688 nosy: jmoguill2, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Python Windows DLL search paths type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 21:59:02 2021 From: report at bugs.python.org (Inada Naoki) Date: Tue, 09 Feb 2021 02:59:02 +0000 Subject: [issue43174] Windows: Use /utf-8 compiler flag Message-ID: <1612839542.96.0.0701004170388.issue43174@roundup.psfhosted.org> New submission from Inada Naoki : When building Python on Windows Japanese environment, several warnings are shown. ``` C:\Users\songo\source\repos\cpython\Modules\_sha3\kcp\KeccakSponge.h(1,1): warning C4819: ???????????? ??? (932) ??????????????????????????????????? Unicode ???????????? [C:\Users\songo\source\repos\cpython\PCbuild\pythoncore.vcxproj] C:\Users\songo\source\repos\cpython\Modules\_statisticsmodule.c(1,1): warning C4819: ???????????? ??? (932) ????????????? ?????????????????????? Unico de ???????????? [C:\Users\songo\source\repos\cpython\PCbuild\pythoncore.vcxproj] C:\Users\songo\source\repos\cpython\Modules\_zoneinfo.c(1,1): warning C4819: ???????????? ??? (932) ????????????????? ?????????????????? Unicode ????? ??????? [C:\Users\songo\source\repos\cpython\PCbuild\_zoneinfo.vcxproj] C:\Users\songo\source\repos\cpython\Modules\_zoneinfo.c(1028,1): warning C4819: ???????????? ??? (932) ??????????????????????????????????? Unicode ?? ?????????? [C:\Users\songo\source\repos\cpython\PCbuild\_zoneinfo.vcxproj] C:\Users\songo\source\repos\cpython\Modules\_zoneinfo.c(1970,1): warning C4819: ???????????? ??? (932) ??????????????????????????????????? Unicode ?? ?????????? [C:\Users\songo\source\repos\cpython\PCbuild\_zoneinfo.vcxproj] C:\Users\songo\source\repos\cpython\Modules\expat\xmltok.c(1,1): warning C4819: ???????????? ??? (932) ??????????????????????????????????? Unicode ?? ?????????? [C:\Users\songo\source\repos\cpython\PCbuild\_elementtree.vcxproj] C:\Users\songo\source\repos\cpython\Modules\expat\xmltok.c(1,1): warning C4819: ???????????? ??? (932) ??????????????????????????????????? Unicode ?? ?????????? [C:\Users\songo\source\repos\cpython\PCbuild\pyexpat.vcxproj] C:\Users\songo\source\repos\cpython\Modules\_lzmamodule.c(1,1): warning C4819: ???????????? ??? (932) ???????????????? ??????????????????? Unicode ??? ????????? [C:\Users\songo\source\repos\cpython\PCbuild\_lzma.vcxproj] ``` These warnings are shown because source code is written in UTF-8 but compiler assume it's encoded in current code page. I don't know what is the best way to fix the warning, but I can fix it by adding /utf-8 flag. ``` diff --git a/PCbuild/_zoneinfo.vcxproj b/PCbuild/_zoneinfo.vcxproj index 6e6389c377..4602e45ce5 100644 --- a/PCbuild/_zoneinfo.vcxproj +++ b/PCbuild/_zoneinfo.vcxproj @@ -91,6 +91,11 @@ <_ProjectFileVersion>10.0.30319.1 + + + /utf-8 %(AdditionalOptions) + + ``` ---------- components: Build messages: 386689 nosy: methane priority: normal severity: normal status: open title: Windows: Use /utf-8 compiler flag versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 22:00:28 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 09 Feb 2021 03:00:28 +0000 Subject: [issue43174] Windows: Use /utf-8 compiler flag In-Reply-To: <1612839542.96.0.0701004170388.issue43174@roundup.psfhosted.org> Message-ID: <1612839628.48.0.36181231536.issue43174@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 Mon Feb 8 22:54:36 2021 From: report at bugs.python.org (paul j3) Date: Tue, 09 Feb 2021 03:54:36 +0000 Subject: [issue43160] argparse: add extend_const action In-Reply-To: <1612757551.9.0.453042152988.issue43160@roundup.psfhosted.org> Message-ID: <1612842876.29.0.173492667393.issue43160@roundup.psfhosted.org> paul j3 added the comment: It's not clear what your patch does that the existing 'store_const' doesn't. Even 'append_const' does the same except for a extra level of list/tuple nesting. But I'll admit that I didn't much need for 'extend' addition, but others, including the original developer liked it. I suspect users of your addition will get a surprise if they aren't careful to provide a list or tuple 'const': const='foobar' const=str ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 8 23:29:25 2021 From: report at bugs.python.org (Eryk Sun) Date: Tue, 09 Feb 2021 04:29:25 +0000 Subject: [issue43173] Python Windows DLL search paths In-Reply-To: <1612838738.77.0.220121925422.issue43173@roundup.psfhosted.org> Message-ID: <1612844965.67.0.138996977709.issue43173@roundup.psfhosted.org> Eryk Sun added the comment: > What's the correct way to set the DLL search path when running a python script? If possible, the simplest approach is to put dependent DLLs in the same directory as the extension module. In 3.8+, the search path for the dependent DLLs of a normally imported extension module includes the following directories: * the loaded extension module's directory * the application directory (e.g. that of python.exe) * the user DLL search directories that get added by SetDllDirectory() and AddDllDirectory(), such as with os.add_dll_directory() * %SystemRoot%\System32 Note that the above list does not include the current working directory or %PATH% directories. > It would be helpful if it listed the actual name of > the DLL that it cannot find. WinAPI LoadLibraryExW() doesn't have an out parameter to get the missing DLL or procedure name that caused the call to fail. All we have is the error code to report, such as ERROR_MOD_NOT_FOUND (126) and ERROR_PROC_NOT_FOUND (127). Using a debugger, you can see the name of the missing DLL or procedure if loader snaps are enabled for the application. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 00:36:37 2021 From: report at bugs.python.org (suresh) Date: Tue, 09 Feb 2021 05:36:37 +0000 Subject: [issue43175] filecmp is not working for UTF-8 BOM file. Message-ID: <1612848997.29.0.320825258569.issue43175@roundup.psfhosted.org> New submission from suresh : Python base package filecmp is not working properly for 'UTF-8 BOM' css files. I am using python version 3.6 and windows 10 OS. while running the below code getting as False always.However the file content are same. Code : import filecmp filecmp.clear_cache() boolfile=filecmp.cmp(r'C:\Users\suresh.n\python\RPA\Page\Sowmiya\downloads\destination.txt',r'C:\Users\suresh.n\python\RPA\Page\Sowmiya\source\source,r'C:\Users\suresh.n\python\RPA\Page\Sowmiya\downloads.txt',shallow=False) print(boolfile) ---------- components: Windows files: source.txt hgrepos: 397 messages: 386692 nosy: paul.moore, steve.dower, suresh, tim.golden, zach.ware priority: normal severity: normal status: open title: filecmp is not working for UTF-8 BOM file. type: behavior versions: Python 3.6 Added file: https://bugs.python.org/file49798/source.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 00:43:56 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 09 Feb 2021 05:43:56 +0000 Subject: [issue43171] Counter not supported add in Python 3.x In-Reply-To: <1612818685.55.0.0888259271118.issue43171@roundup.psfhosted.org> Message-ID: <1612849436.65.0.511161479863.issue43171@roundup.psfhosted.org> Irit Katriel added the comment: That?s correct. This changed in python 3. See section about ordering comparisons in https://docs.python.org/3.0/whatsnew/3.0.html ---------- nosy: +iritkatriel resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 01:37:28 2021 From: report at bugs.python.org (Kubilay Kocak) Date: Tue, 09 Feb 2021 06:37:28 +0000 Subject: [issue13501] Make libedit support more generic; port readline / libedit to FreeBSD In-Reply-To: <1322579942.3.0.601983912656.issue13501@psf.upfronthosting.co.za> Message-ID: <1612852648.17.0.323333312233.issue13501@roundup.psfhosted.org> Kubilay Kocak added the comment: @Gregory I'm the worker owner and can coordinate buildbot worker changes with Zach or Victor FreeBSD has: editline (in FreeBSD base, installed in /usr/ ) libedit in ports/packages (installs in /usr/local) readline in ports/packages (installs in /usr/local) Which combination would get us the best coverage? Also, if both libedit and readline are installed from ports, does configure have a preference/default or will it barf? Primary motivation behind the questions is that the Python build system is notoriously flaky with respect to third party libs in various locations (we've had issues with gettext, ssl, expat, among a few others) I'm happy to install whatever you'd like on the workers at your convenience to the tests can be run as a custom build (if they haven't been already) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 02:12:39 2021 From: report at bugs.python.org (Iurii Kemaev) Date: Tue, 09 Feb 2021 07:12:39 +0000 Subject: [issue43176] Dataclasses derived from empty frozen bases skip immutability checks Message-ID: <1612854759.36.0.400211114548.issue43176@roundup.psfhosted.org> New submission from Iurii Kemaev : Dataclasses derived from empty frozen bases skip immutability checks. Repro snippet: ``` import dataclasses @dataclasses.dataclass(frozen=True) class Base: pass @dataclasses.dataclass class Derived(Base): a: int d = Derived(2) # OK ``` Usecase: sometimes developers define an empty frozen base dataclass with detailed docs and require other dataclasses to inherit from it as a code contract to avoid accidental in-place modifications. This bug makes this strategy ineffective. Affects all versions of Python that support dataclasses (including the backport for py3.6). ---------- components: Library (Lib) messages: 386695 nosy: hbq1 priority: normal pull_requests: 23278 severity: normal status: open title: Dataclasses derived from empty frozen bases skip immutability checks type: behavior versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 02:14:17 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 09 Feb 2021 07:14:17 +0000 Subject: [issue43176] Dataclasses derived from empty frozen bases skip immutability checks In-Reply-To: <1612854759.36.0.400211114548.issue43176@roundup.psfhosted.org> Message-ID: <1612854857.12.0.714673646601.issue43176@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 02:51:49 2021 From: report at bugs.python.org (Tony Lykke) Date: Tue, 09 Feb 2021 07:51:49 +0000 Subject: [issue43160] argparse: add extend_const action In-Reply-To: <1612757551.9.0.453042152988.issue43160@roundup.psfhosted.org> Message-ID: <1612857109.18.0.918573572956.issue43160@roundup.psfhosted.org> Tony Lykke added the comment: Perhaps the example I added to the docs isn't clear enough and should be changed because you're right, that specific one can be served by store_const. Turns out coming up with examples that are minimal but not too contrived is hard! Let me try again with a longer example that hopefully shows more clearly how the existing action's behaviours differ from my patch. parser = argparse.ArgumentParser() parser.add_argument("--foo", action="append", default=[]) ? parser.add_argument("--append", action="append_const", dest="foo", const=["a", "b"]) ? parser.add_argument("--store", action="store_const", dest="foo", const=["a", "b"]) When run on master the following behaviour is observed: --foo a --foo b --foo c Namespace(foo=['a', 'b', 'c']) --foo c --append Namespace(foo=['c', ['a', 'b']]) --foo c --store Namespace(foo=['a', 'b']) --store --foo a Namespace(foo=['a', 'b', 'c']) If we then add the following: parser.add_argument("--extend", action="extend_const", dest="foo", const=["a", "b"]) and then run it with my patch the following can be observed: --foo c --extend Namespace(foo=['c', 'a', 'b']) --extend --foo c Namespace(foo=['a', 'b', 'c']) store_const is actually a pretty close fit, but the way it makes order significant (specifically in that it will silently drop prev values) seems like it'd be rather surprising to users and makes it a big enough footgun for this use case that I don't think it's a satisfactory alternative. > I suspect users of your addition will get a surprise if they aren't careful to provide a list or tuple 'const' I did consider that, but I don't think they'd get any more of a surprise than for doing the same with list.extend vs list.append. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 02:54:04 2021 From: report at bugs.python.org (Tony Lykke) Date: Tue, 09 Feb 2021 07:54:04 +0000 Subject: [issue43160] argparse: add extend_const action In-Reply-To: <1612757551.9.0.453042152988.issue43160@roundup.psfhosted.org> Message-ID: <1612857244.62.0.427616401189.issue43160@roundup.psfhosted.org> Tony Lykke added the comment: Sorry, there's a typo in my last comment. --store --foo a Namespace(foo=['a', 'b', 'c']) from the first set of examples should have been --store --foo c Namespace(foo=['a', 'b', 'c']) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 03:40:00 2021 From: report at bugs.python.org (Ganesh Kathiresan) Date: Tue, 09 Feb 2021 08:40:00 +0000 Subject: [issue43177] How to use `long double` as a PyObject? Message-ID: <1612860000.51.0.99318031959.issue43177@roundup.psfhosted.org> New submission from Ganesh Kathiresan : I wanted to know if there is a way to parse and store c `long double`. I only found `PyFloat_FromDouble` and in the same page, `PyFloat_GetMax` returns: > Return the maximum representable finite float DBL_MAX as C double. Meaning, there is no scope of `long double`. Can you please tell me how I can do something like `PyFloat_FromLongDouble` ---------- components: ctypes messages: 386698 nosy: ganesh3597 priority: normal severity: normal status: open title: How to use `long double` as a PyObject? type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 03:40:30 2021 From: report at bugs.python.org (Peleg Shilo) Date: Tue, 09 Feb 2021 08:40:30 +0000 Subject: [issue43178] Redundant method overrides in queue Message-ID: <1612860030.43.0.826526861331.issue43178@roundup.psfhosted.org> New submission from Peleg Shilo : PriorityQueue and LIFOQueue override the _qsize method without actually changing it. They should just inherit it normally. ---------- components: Library (Lib) messages: 386699 nosy: peleg2 priority: normal severity: normal status: open title: Redundant method overrides in queue type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 03:58:18 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Tue, 09 Feb 2021 08:58:18 +0000 Subject: [issue43162] Enum regression: AttributeError when accessing class variables on instances In-Reply-To: <1612786979.73.0.896348338765.issue43162@roundup.psfhosted.org> Message-ID: <1612861098.01.0.764884032806.issue43162@roundup.psfhosted.org> Miro Hron?ok added the comment: "Wait for the warning to appear in at least two major Python versions. It's fine to wait more than two releases." https://www.python.org/dev/peps/pep-0387/#basic-policy-for-backwards-compatibility So indeed, if you add the warning in 3.10, the behavior can be removed from 3.12 earliest. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 04:57:06 2021 From: report at bugs.python.org (Ben Avrahami) Date: Tue, 09 Feb 2021 09:57:06 +0000 Subject: [issue36517] typing.NamedTuple does not support mixins In-Reply-To: <1554296850.04.0.71784053328.issue36517@roundup.psfhosted.org> Message-ID: <1612864626.56.0.487205262672.issue36517@roundup.psfhosted.org> Ben Avrahami added the comment: The patch PR blocks out a useful idiom: generic Nametuple >>> class LLNode(NamedTuple, Generic[T]): ... value :T ... next: Optional[LLNode[T]] I put forward that, at the least, NamedTuple should accept do-nothing bases like Generic. ---------- nosy: +avrahami.ben _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 04:58:43 2021 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Feb 2021 09:58:43 +0000 Subject: [issue43178] Redundant method overrides in queue In-Reply-To: <1612860030.43.0.826526861331.issue43178@roundup.psfhosted.org> Message-ID: <1612864723.83.0.396090310488.issue43178@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 1.0 -> 2.0 pull_requests: +23279 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24488 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 05:08:09 2021 From: report at bugs.python.org (Ken Jin) Date: Tue, 09 Feb 2021 10:08:09 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1612865289.23.0.0789644457476.issue42128@roundup.psfhosted.org> Ken Jin added the comment: Guido and Brandt, may I take a stab at the docs for this? I'll probably base most of it off PEP 636's tutorial. Relevant parts of the docs that I've identified: reference/lexical_analysis.rst reference/compound_stmts.rst reference/grammar.rst # this probably needs a summarized version for non-technical users whatsnew/3.10.rst If I missed anything, please point them out :). ---------- nosy: +kj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 05:38:31 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Feb 2021 10:38:31 +0000 Subject: [issue43148] Call sys.unraisablehook in the REPL when sys.excepthook is broken In-Reply-To: <1612644956.56.0.525565389562.issue43148@roundup.psfhosted.org> Message-ID: <1612867111.04.0.454681290392.issue43148@roundup.psfhosted.org> STINNER Victor added the comment: It makes sense to call _PyErr_WriteUnraisableMsg() when sys.excepthook raise a new exception. Do you want to propose a PR for that? sys.excepthook documentation mentions sys.unraisablehook: https://docs.python.org/dev/library/sys.html#sys.excepthook threading._make_invoke_excepthook logs threading.excepthook failure using sys.excepthook. Note: Carl also suggested to add a way to invoke sys.unraisablehook explicitly, not only for testing purpose. It would help in some cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 05:40:32 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Feb 2021 10:40:32 +0000 Subject: [issue43068] test_subprocess: test_specific_shell() fails on AMD64 FreeBSD Shared 3.x In-Reply-To: <1611956940.56.0.594651223595.issue43068@roundup.psfhosted.org> Message-ID: <1612867232.1.0.0741952827801.issue43068@roundup.psfhosted.org> STINNER Victor added the comment: > As far as I'm aware, the best practice and recommendation for these cases is that 'tests should not test dependencies', and to skip/skipif these (external) dependencies are not available or fail to load/run. In theory, we should limit external dependencies. In practice, it's too convenient to make the assumption that some Unix programs are available and work properly. But PRs are welcome to reduce dependencies to external tools ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 05:44:13 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Feb 2021 10:44:13 +0000 Subject: [issue13508] ctypes' find_library breaks with ARM ABIs In-Reply-To: <1322664873.68.0.763423976883.issue13508@psf.upfronthosting.co.za> Message-ID: <1612867453.98.0.377023644747.issue13508@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 05:45:14 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 09 Feb 2021 10:45:14 +0000 Subject: [issue5846] Deprecate obsolete functions in unittest In-Reply-To: <1240703100.05.0.329458142097.issue5846@psf.upfronthosting.co.za> Message-ID: <1612867514.84.0.365335986483.issue5846@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: > I'm sure Gerhard wouldn't say no to changing the sqlite3 test prefix to "test_"... FYI, the sqlite3 tests have now been cleaned up (GH-20538). Remaining occurrences in Lib/test: Lib/test/test_pdb.py: unittest.makeSuite(PdbTestCase), Lib/test/test_dbm.py: suites = [unittest.makeSuite(c) for c in classes] Lib/test/test_io.py: suite = unittest.TestSuite([unittest.makeSuite(test) for test in tests]) Lib/test/test_threading_local.py: suite.addTest(unittest.makeSuite(ThreadLocalTest)) Lib/test/test_threading_local.py: suite.addTest(unittest.makeSuite(PyThreadingLocalTest)) Lib/test/test_zipimport.py: # item in a list sorted by name, like unittest.makeSuite() does.) Lib/test/support/__init__.py: suite.addTest(unittest.findTestCases(sys.modules[cls])) Lib/test/support/__init__.py: suite.addTest(unittest.makeSuite(cls)) Lib/test/support/testresult.py: suite.addTest(unittest.makeSuite(TestTests)) Lib/test/test_email/torture_test.py: suite.addTest(unittest.makeSuite(testclass)) Lib/test/test_math.py: suite.addTest(unittest.makeSuite(MathTests)) Lib/test/test_math.py: suite.addTest(unittest.makeSuite(IsCloseTests)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 05:49:32 2021 From: report at bugs.python.org (Kubilay Kocak) Date: Tue, 09 Feb 2021 10:49:32 +0000 Subject: [issue43068] test_subprocess: test_specific_shell() fails on AMD64 FreeBSD Shared 3.x In-Reply-To: <1611956940.56.0.594651223595.issue43068@roundup.psfhosted.org> Message-ID: <1612867772.78.0.0836041757041.issue43068@roundup.psfhosted.org> Kubilay Kocak added the comment: Note: Not suggesting dep removals, just a try-except-skip block in the (hopefully) one place the sub-process handler in the test framework that runs then :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 05:49:53 2021 From: report at bugs.python.org (Kubilay Kocak) Date: Tue, 09 Feb 2021 10:49:53 +0000 Subject: [issue43068] test_subprocess: test_specific_shell() fails on AMD64 FreeBSD Shared 3.x In-Reply-To: <1611956940.56.0.594651223595.issue43068@roundup.psfhosted.org> Message-ID: <1612867793.54.0.239386969453.issue43068@roundup.psfhosted.org> Kubilay Kocak added the comment: P.S gdb and bash have been rebuilt :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 05:58:02 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 09 Feb 2021 10:58:02 +0000 Subject: [issue43094] sqlite3.create_function takes parameter named narg, not num_params In-Reply-To: <1612210210.19.0.0751315887137.issue43094@roundup.psfhosted.org> Message-ID: <1612868282.89.0.63534826093.issue43094@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Quoting from Victor Stinner's reply on python-dev (https://mail.python.org/archives/list/python-dev at python.org/message/X6SZIVOZ233TLLJV43UQEHMV3ELGP34S/): If there are applications relying on the parameter name, it's better to trust the Python implementation, rather than the documentation. It would be better to make these parameters positional only in the first place, but now it's too late for such backward incompatible change :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 06:03:10 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 09 Feb 2021 11:03:10 +0000 Subject: [issue43094] sqlite3.create_function takes parameter named narg, not num_params In-Reply-To: <1612210210.19.0.0751315887137.issue43094@roundup.psfhosted.org> Message-ID: <1612868590.21.0.11524871922.issue43094@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +23280 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24489 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 06:37:11 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 09 Feb 2021 11:37:11 +0000 Subject: [issue42686] include built-in Math functions in SQLite to 3.35.0 of march 2021 In-Reply-To: <1608391961.58.0.717857253057.issue42686@roundup.psfhosted.org> Message-ID: <1612870631.34.0.909334253263.issue42686@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- components: +Library (Lib), Windows nosy: +paul.moore, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 06:41:13 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Feb 2021 11:41:13 +0000 Subject: [issue43179] Remove s390 support Message-ID: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> New submission from Christian Heimes : configure.ac contains triplet definitions for s390 and s390x mainframes. While s390x (Linux on IBM Z) is still widely supported, s390 is not. s390 was released in 1990 and discontinued in 1998, https://en.wikipedia.org/wiki/IBM_System/390 Ariadne Conill from Alpine pointed out that: Linux has not supported booting on traditional 31-bit s390 since Linux 4.1 in 2015. If you can't boot s390 (not s390x) with a modern kernel, it is absurd to demand that other projects support s390. https://github.com/pyca/cryptography/issues/5771#issuecomment-775872483 I propose to remove check for __s390__ from configure.ac and configure. We might also want to remove __alpha__, __hppa__, and __m68k__ at a later point. DEC hasn't been around for a long time. ---------- components: Interpreter Core messages: 386709 nosy: christian.heimes priority: normal severity: normal status: open title: Remove s390 support versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 06:52:28 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 09 Feb 2021 11:52:28 +0000 Subject: [issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc In-Reply-To: <1612344373.45.0.663786135841.issue43112@roundup.psfhosted.org> Message-ID: <1612871548.11.0.705768838468.issue43112@roundup.psfhosted.org> Christian Heimes added the comment: I stand corrected. The last element in the platform triplet does seem to indicate libc. Is there any formal definition of the platform triplet or is it defined by GCC's reference implementation? A quick search didn't reveal any decisive results. The next steps here would be: - document the platform triplet in regards of musl libc (and potentially other libcs like uclibc and embedded newlibc) - buildbot with Alpine musl Let's continue this on https://discuss.python.org/t/wheels-for-musl-alpine/7084 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 07:43:08 2021 From: report at bugs.python.org (=?utf-8?q?Lum=C3=ADr_Balhar?=) Date: Tue, 09 Feb 2021 12:43:08 +0000 Subject: [issue41282] Deprecate and remove distutils In-Reply-To: <1594542625.3.0.789939298104.issue41282@roundup.psfhosted.org> Message-ID: <1612874588.21.0.966263959808.issue41282@roundup.psfhosted.org> Change by Lum?r Balhar : ---------- nosy: +frenzy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 07:56:59 2021 From: report at bugs.python.org (Nir Soffer) Date: Tue, 09 Feb 2021 12:56:59 +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: <1612875419.15.0.476349402356.issue29988@roundup.psfhosted.org> Nir Soffer added the comment: Does https://github.com/python/cpython/pull/1799 solve this issue for synchronous with? with closing(this), closing(that): If it does, can we backport this fix to python 3.6? 3.6 is used as system python for RHEL/Centos 8, will be used for at least 5 years or so. ---------- nosy: +nirs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 08:41:19 2021 From: report at bugs.python.org (Daniel Moisset) Date: Tue, 09 Feb 2021 13:41:19 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1612878079.76.0.526282233906.issue42128@roundup.psfhosted.org> Daniel Moisset added the comment: Hey Ken, I was about to take on this myself, but I wouldn't mind a bit of help. Your list seems ok, I would add to it a section about PM in the python tutorial (which was explicitly mentioned in the SC acceptance notice). Regarding the grammar, I believe that one is autogenerated from the parser, so it's likely that no changes are required there. Correct me if I'm wrong here. I'll set up a branch in github and add you as a collaborator so we can prepare a PR. I'll base the branch of Brandt's implementation PR. If you give me your github id I can add you as collaborator so we can work there. ---------- nosy: +Daniel Moisset _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 09:01:16 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 09 Feb 2021 14:01:16 +0000 Subject: [issue36859] sqlite3 dml statement detection does not account for CTEs In-Reply-To: <1557356904.4.0.529350025795.issue36859@roundup.psfhosted.org> Message-ID: <1612879275.99.0.659027624695.issue36859@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: I believe GH-13216 would be an improvement. I see that your original branch is unavailable, Charles; would you mind if I cherry-picked it and rebased it onto master? The sqlite3 module now requires SQLite >= 3.7.15 which simplifies the change a lot. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 09:12:03 2021 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 09 Feb 2021 14:12:03 +0000 Subject: [issue43177] How to use `long double` as a PyObject? In-Reply-To: <1612860000.51.0.99318031959.issue43177@roundup.psfhosted.org> Message-ID: <1612879923.09.0.193256350328.issue43177@roundup.psfhosted.org> Mark Dickinson added the comment: You're correct that there's nothing in the C-API to handle a C `long double`. (Similarly, there's very little for C `float` values.) You've added "ctypes" as a component, but in the message you're talking about the C-API. Can you clarify what you're doing? Are you writing C extensions for Python, or are you using ctypes? ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 09:14:31 2021 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 09 Feb 2021 14:14:31 +0000 Subject: [issue43177] How to use `long double` as a PyObject? In-Reply-To: <1612860000.51.0.99318031959.issue43177@roundup.psfhosted.org> Message-ID: <1612880071.44.0.919166317656.issue43177@roundup.psfhosted.org> Change by Mark Dickinson : ---------- versions: +Python 3.10 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 09:15:00 2021 From: report at bugs.python.org (Ganesh Kathiresan) Date: Tue, 09 Feb 2021 14:15:00 +0000 Subject: [issue43177] How to use `long double` as a PyObject? In-Reply-To: <1612860000.51.0.99318031959.issue43177@roundup.psfhosted.org> Message-ID: <1612880100.53.0.810939188146.issue43177@roundup.psfhosted.org> Ganesh Kathiresan added the comment: Ohh ok, thanks for the info Mark. Any plans to add it in the future? My bad, sorry, will change to C-API. ---------- components: +C API -ctypes versions: +Python 3.7 -Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 09:26:42 2021 From: report at bugs.python.org (Charles) Date: Tue, 09 Feb 2021 14:26:42 +0000 Subject: [issue36859] sqlite3 dml statement detection does not account for CTEs In-Reply-To: <1557356904.4.0.529350025795.issue36859@roundup.psfhosted.org> Message-ID: <1612880802.04.0.560171256227.issue36859@roundup.psfhosted.org> Charles added the comment: Yeah, go for it erlendaasland - I abandoned all hope of getting it merged, and have just been maintaining my own pysqlite3 which simplifies my life greatly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 09:29:26 2021 From: report at bugs.python.org (Ken Jin) Date: Tue, 09 Feb 2021 14:29:26 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1612880966.05.0.538112263223.issue42128@roundup.psfhosted.org> Ken Jin added the comment: Hi Daniel, wow thanks for the offer! My GitHub username is Fidget-Spinner. I'm not sure about the grammar file either. Oh, thanks for mentioning the tutorial recommendation by the SC, I'll keep that in mind.? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 09:33:47 2021 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 09 Feb 2021 14:33:47 +0000 Subject: [issue43177] How to use `long double` as a PyObject? In-Reply-To: <1612860000.51.0.99318031959.issue43177@roundup.psfhosted.org> Message-ID: <1612881227.19.0.784137434952.issue43177@roundup.psfhosted.org> Mark Dickinson added the comment: > Any plans to add it in the future? It depends - it's not really clear to me what you're asking for. If you just want to get a Python `float` from a C long double, then cast to double in the C code and then use `PyFloat_FromDouble`. Obviously that loses any extra precision that the C long double had. If you're asking for Python to grow a new type of "float" with long double precision, that's a *much* bigger ask, and realistically it's not going to happen in the forseeable future. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 09:34:28 2021 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 09 Feb 2021 14:34:28 +0000 Subject: [issue43177] How to use `long double` as a PyObject? In-Reply-To: <1612860000.51.0.99318031959.issue43177@roundup.psfhosted.org> Message-ID: <1612881268.87.0.163905878327.issue43177@roundup.psfhosted.org> Mark Dickinson added the comment: I'm setting the Python version to 3.10 here: this is a request for a new feature, and as such it can't go into already-released Python versions. ---------- versions: +Python 3.10 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 09:35:17 2021 From: report at bugs.python.org (Lysandros Nikolaou) Date: Tue, 09 Feb 2021 14:35:17 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1612881317.0.0.629472567286.issue42128@roundup.psfhosted.org> Lysandros Nikolaou added the comment: The grammar is indeed auto-generated by reading the actual Grammar file, python.gram. Here's the lexer Pablo had developed for doing the syntax-highlighting. https://github.com/python/cpython/blob/master/Doc/tools/extensions/peg_highlight.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 09:36:32 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 09 Feb 2021 14:36:32 +0000 Subject: [issue36859] sqlite3 dml statement detection does not account for CTEs In-Reply-To: <1557356904.4.0.529350025795.issue36859@roundup.psfhosted.org> Message-ID: <1612881392.12.0.0506714955134.issue36859@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Thanks, Charles. I'll give it a shot and see if get can provoke a response :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 09:37:52 2021 From: report at bugs.python.org (Natanael Copa) Date: Tue, 09 Feb 2021 14:37:52 +0000 Subject: [issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc In-Reply-To: <1612344373.45.0.663786135841.issue43112@roundup.psfhosted.org> Message-ID: <1612881472.23.0.142680710231.issue43112@roundup.psfhosted.org> Natanael Copa added the comment: This mentions some examples for musl triplets/tuples: https://wiki.musl-libc.org/getting-started.html It points to https://github.com/richfelker/musl-cross-make/blob/master/README.md#supported-targets which I think is the best documentation. (Rich Felker is the author and lead developer or musl libc). I'm not sure its worth spend time on uClibc which does not seem to have any commits at all since 2015. https://git.uclibc.org/uClibc/log/ We will work on our side on buildbot with Alpine linux. Thank you for being understanding. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 09:38:11 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 09 Feb 2021 14:38:11 +0000 Subject: [issue36859] sqlite3 dml statement detection does not account for CTEs In-Reply-To: <1557356904.4.0.529350025795.issue36859@roundup.psfhosted.org> Message-ID: <1612881491.93.0.813661473705.issue36859@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +23282 pull_request: https://github.com/python/cpython/pull/24492 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 09:39:24 2021 From: report at bugs.python.org (Ganesh Kathiresan) Date: Tue, 09 Feb 2021 14:39:24 +0000 Subject: [issue43177] How to use `long double` as a PyObject? In-Reply-To: <1612860000.51.0.99318031959.issue43177@roundup.psfhosted.org> Message-ID: <1612881564.78.0.952686972571.issue43177@roundup.psfhosted.org> Ganesh Kathiresan added the comment: Oh I see. Yeah my ask is particularly around support for long double precision in python. What I am trying to do is essentially attempt to speed up the comparison of NumPy scalars: https://github.com/numpy/numpy/pull/17970. We have support for float128 in NumPy, but when I was trying to cast it to a C variable, was having a hard time doing so without losing precision. Please feel free to close the issue, hopefully will see long double support sometime in the future. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 09:43:00 2021 From: report at bugs.python.org (Ganesh Kathiresan) Date: Tue, 09 Feb 2021 14:43:00 +0000 Subject: [issue43177] How to use `long double` as a PyObject? In-Reply-To: <1612860000.51.0.99318031959.issue43177@roundup.psfhosted.org> Message-ID: <1612881780.54.0.636260520196.issue43177@roundup.psfhosted.org> Ganesh Kathiresan added the comment: Oh apologies for changing the version, makes sense for 3.10. I had it opened before the change and sort of conflicted into taking my old preset 3.7 on the page ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 11:02:17 2021 From: report at bugs.python.org (Mike Siegel) Date: Tue, 09 Feb 2021 16:02:17 +0000 Subject: [issue43180] Lists without commas? Message-ID: <1612886537.53.0.750473306106.issue43180@roundup.psfhosted.org> New submission from Mike Siegel : Perhaps I'm missing something here but this behavior seems unexpected to me. "Lists The items of a list are arbitrary Python objects. Lists are formed by placing a *comma-separated* list of expressions in square brackets. (Note that there are no special cases needed to form lists of length 0 or 1.)" >>> import sys >>> print(sys.version) 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0] >>> test = [ "foo" "bar" ] >>> type(test) >>> print(test) ['foobar'] >>> import json >>> json.dumps({ "foo": test }) '{"foo": ["foobar"]}' >>> In a complex dict structure this is an easy way to shoot yourself in the foot. ---------- messages: 386725 nosy: mikesiegel priority: normal severity: normal status: open title: Lists without commas? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 11:06:59 2021 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 09 Feb 2021 16:06:59 +0000 Subject: [issue43180] Lists without commas? In-Reply-To: <1612886537.53.0.750473306106.issue43180@roundup.psfhosted.org> Message-ID: <1612886819.7.0.714464063813.issue43180@roundup.psfhosted.org> Mark Dickinson added the comment: This is by design. It's not really to do with lists, but to do with placing two string literals next to each other. See: https://docs.python.org/3/reference/lexical_analysis.html#string-literal-concatenation See also https://www.python.org/dev/peps/pep-3126/ . I'll close here. ---------- nosy: +mark.dickinson resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 11:08:56 2021 From: report at bugs.python.org (Tianon) Date: Tue, 09 Feb 2021 16:08:56 +0000 Subject: [issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc In-Reply-To: <1612344373.45.0.663786135841.issue43112@roundup.psfhosted.org> Message-ID: <1612886936.88.0.84191910145.issue43112@roundup.psfhosted.org> Change by Tianon : ---------- nosy: +tianon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 11:08:56 2021 From: report at bugs.python.org (Brandt Bucher) Date: Tue, 09 Feb 2021 16:08:56 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1612886936.05.0.735189982179.issue42128@roundup.psfhosted.org> Brandt Bucher added the comment: Also, see my msg379831 above. We can't entirely rely on the PEPs, of course, but I think we could still get some decent reuse out of them. BTW, has the new docs WG started up yet? I keep hearing about it every once in a while, but I'm not sure if it's fully-formed yet. Could be good to loop them in for review and such, if so. +nosy Carol since I'm pretty sure she's involved with that. ---------- nosy: +willingc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 11:29:47 2021 From: report at bugs.python.org (Ken Jin) Date: Tue, 09 Feb 2021 16:29:47 +0000 Subject: [issue41824] Docs for typing.ForwardRef don't state that it was added in 3.7 In-Reply-To: <1600706127.1.0.52497874592.issue41824@roundup.psfhosted.org> Message-ID: <1612888187.13.0.879168996678.issue41824@roundup.psfhosted.org> Change by Ken Jin : ---------- pull_requests: +23283 pull_request: https://github.com/python/cpython/pull/24493 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 11:34:43 2021 From: report at bugs.python.org (Ken Jin) Date: Tue, 09 Feb 2021 16:34:43 +0000 Subject: [issue41824] Docs for typing.ForwardRef don't state that it was added in 3.7 In-Reply-To: <1600706127.1.0.52497874592.issue41824@roundup.psfhosted.org> Message-ID: <1612888483.43.0.324806470598.issue41824@roundup.psfhosted.org> Change by Ken Jin : ---------- pull_requests: +23284 pull_request: https://github.com/python/cpython/pull/24494 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 11:55:38 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 09 Feb 2021 16:55:38 +0000 Subject: [issue41824] Docs for typing.ForwardRef don't state that it was added in 3.7 In-Reply-To: <1600706127.1.0.52497874592.issue41824@roundup.psfhosted.org> Message-ID: <1612889738.41.0.267980823372.issue41824@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset 917eca700aa341f8544ace43b75d41b477e98b72 by Ken Jin in branch '3.9': bpo-41824: Add versionadded for typing.ForwardRef docs (#24224) (#24493) https://github.com/python/cpython/commit/917eca700aa341f8544ace43b75d41b477e98b72 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 11:55:49 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 09 Feb 2021 16:55:49 +0000 Subject: [issue41824] Docs for typing.ForwardRef don't state that it was added in 3.7 In-Reply-To: <1600706127.1.0.52497874592.issue41824@roundup.psfhosted.org> Message-ID: <1612889749.22.0.125940583301.issue41824@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset c8a48c6d0417cc8f256a40142962825febdc2e20 by Ken Jin in branch '3.8': [3.8] bpo-41824: Add versionadded for typing.ForwardRef docs (#24224) (#24494) https://github.com/python/cpython/commit/c8a48c6d0417cc8f256a40142962825febdc2e20 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 12:14:02 2021 From: report at bugs.python.org (Ken Jin) Date: Tue, 09 Feb 2021 17:14:02 +0000 Subject: [issue41824] Docs for typing.ForwardRef don't state that it was added in 3.7 In-Reply-To: <1600706127.1.0.52497874592.issue41824@roundup.psfhosted.org> Message-ID: <1612890842.49.0.351072652813.issue41824@roundup.psfhosted.org> Change by Ken Jin : ---------- pull_requests: +23285 pull_request: https://github.com/python/cpython/pull/24495 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 12:56:55 2021 From: report at bugs.python.org (Barry Alan Scott) Date: Tue, 09 Feb 2021 17:56:55 +0000 Subject: [issue43156] Python windows installer has a confusing name - add setup to its name In-Reply-To: <1612721728.1.0.320173776813.issue43156@roundup.psfhosted.org> Message-ID: <1612893415.74.0.754370288204.issue43156@roundup.psfhosted.org> Barry Alan Scott added the comment: Understood that changing the status quo may have problems. Maybe you do an HTTP redirect from the old name to the new name? Or have the installed available under both names but only advertise the new name? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 12:57:54 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 09 Feb 2021 17:57:54 +0000 Subject: [issue41824] Docs for typing.ForwardRef don't state that it was added in 3.7 In-Reply-To: <1600706127.1.0.52497874592.issue41824@roundup.psfhosted.org> Message-ID: <1612893474.07.0.590875101477.issue41824@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset 822f7c266f886677047338e8b167ba39a6abd91e by Ken Jin in branch '3.8': [3.8] bpo-41824: Fix indentation issue in ForwardRef docs (#24495) https://github.com/python/cpython/commit/822f7c266f886677047338e8b167ba39a6abd91e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 13:09:47 2021 From: report at bugs.python.org (Ken Jin) Date: Tue, 09 Feb 2021 18:09:47 +0000 Subject: [issue41824] Docs for typing.ForwardRef don't state that it was added in 3.7 In-Reply-To: <1600706127.1.0.52497874592.issue41824@roundup.psfhosted.org> Message-ID: <1612894187.05.0.865287172707.issue41824@roundup.psfhosted.org> Ken Jin added the comment: I think we can close this now. Thanks for reporting it Dominic, and thanks Guido for all your help! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 13:11:11 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 09 Feb 2021 18:11:11 +0000 Subject: [issue43127] Unable to install Python 3.9.1 - Windows 10 In-Reply-To: <1612457605.05.0.029864468293.issue43127@roundup.psfhosted.org> Message-ID: <1612894271.5.0.301648803877.issue43127@roundup.psfhosted.org> Steve Dower added the comment: Yeah, system policy is not something we can work around. If you can, maybe try installing for all users? (Under customised install options.) You might have to right click the installer and run as an administrator, which sometimes helps get around these policies. There's almost certainly nothing we can change that would prevent this, so we'll eventually close this issue as not a bug. But will leave it open for now to see if we can get you going. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 13:11:52 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 09 Feb 2021 18:11:52 +0000 Subject: [issue43127] Unable to install Python 3.9.1 - Windows 10 In-Reply-To: <1612457605.05.0.029864468293.issue43127@roundup.psfhosted.org> Message-ID: <1612894312.44.0.875821278141.issue43127@roundup.psfhosted.org> Steve Dower added the comment: Oh, you might also be able to install Python from the Microsoft Store more easily - open the Store app and search for it. It's identical, just packaged differently. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 13:13:07 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 09 Feb 2021 18:13:07 +0000 Subject: [issue43166] Unused letters in Windows-specific pragma optimize In-Reply-To: <1612813717.65.0.159919254593.issue43166@roundup.psfhosted.org> Message-ID: <1612894387.35.0.678509978992.issue43166@roundup.psfhosted.org> Change by Steve Dower : ---------- keywords: +patch pull_requests: +23286 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24485 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 13:13:51 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 09 Feb 2021 18:13:51 +0000 Subject: [issue43166] Unused letters in Windows-specific pragma optimize In-Reply-To: <1612813717.65.0.159919254593.issue43166@roundup.psfhosted.org> Message-ID: <1612894431.08.0.510576150315.issue43166@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 Feb 9 13:14:19 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 09 Feb 2021 18:14:19 +0000 Subject: [issue43166] Unused letters in Windows-specific pragma optimize In-Reply-To: <1612813717.65.0.159919254593.issue43166@roundup.psfhosted.org> Message-ID: <1612894459.44.0.717336084737.issue43166@roundup.psfhosted.org> Steve Dower added the comment: New changeset b74396c3167cc780f01309148db02709bc37b432 by Steve Dower in branch 'master': bpo-43166: Disable ceval.c optimisations for Windows debug builds (GH-24485) https://github.com/python/cpython/commit/b74396c3167cc780f01309148db02709bc37b432 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 13:16:16 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 09 Feb 2021 18:16:16 +0000 Subject: [issue43173] Python Windows DLL search paths In-Reply-To: <1612838738.77.0.220121925422.issue43173@roundup.psfhosted.org> Message-ID: <1612894576.81.0.709574631616.issue43173@roundup.psfhosted.org> Steve Dower added the comment: Eryk answered the question sufficiently, here's the link to the add_dll_directory docs: https://docs.python.org/library/os.html#os.add_dll_directory ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 13:20:17 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 09 Feb 2021 18:20:17 +0000 Subject: [issue43156] Python windows installer has a confusing name - add setup to its name In-Reply-To: <1612721728.1.0.320173776813.issue43156@roundup.psfhosted.org> Message-ID: <1612894817.63.0.198978271114.issue43156@roundup.psfhosted.org> Steve Dower added the comment: In principle I agree, but need to spend some time thinking about the compatibility implications. We've already changed the download page for 3.10, so changing the download names as well won't hurt too much - I don't think there's a real need for redirects. If someone wants to prepare a patch, feel free. It'll probably impact publishing, so adding the RM for awareness. ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 13:26:07 2021 From: report at bugs.python.org (Jeff Moguillansky) Date: Tue, 09 Feb 2021 18:26:07 +0000 Subject: [issue43173] Python Windows DLL search paths In-Reply-To: <1612844965.67.0.138996977709.issue43173@roundup.psfhosted.org> Message-ID: Jeff Moguillansky added the comment: Thanks for the feedback On Mon, Feb 8, 2021, 8:29 PM Eryk Sun wrote: > > Eryk Sun added the comment: > > > What's the correct way to set the DLL search path when running a python > script? > > If possible, the simplest approach is to put dependent DLLs in the same > directory as the extension module. > > In 3.8+, the search path for the dependent DLLs of a normally imported > extension module includes the following directories: > > * the loaded extension module's directory > * the application directory (e.g. that of python.exe) > * the user DLL search directories that get added by > SetDllDirectory() and AddDllDirectory(), such as with > os.add_dll_directory() > * %SystemRoot%\System32 > > Note that the above list does not include the current working directory or > %PATH% directories. > > > It would be helpful if it listed the actual name of > > the DLL that it cannot find. > > WinAPI LoadLibraryExW() doesn't have an out parameter to get the missing > DLL or procedure name that caused the call to fail. All we have is the > error code to report, such as ERROR_MOD_NOT_FOUND (126) and > ERROR_PROC_NOT_FOUND (127). Using a debugger, you can see the name of the > missing DLL or procedure if loader snaps are enabled for the application. > > ---------- > nosy: +eryksun > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 13:38:34 2021 From: report at bugs.python.org (Olivier Le Floch) Date: Tue, 09 Feb 2021 18:38:34 +0000 Subject: [issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc In-Reply-To: <1612344373.45.0.663786135841.issue43112@roundup.psfhosted.org> Message-ID: <1612895914.27.0.102902698969.issue43112@roundup.psfhosted.org> Change by Olivier Le Floch : ---------- nosy: +olivierlefloch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 14:02:00 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 09 Feb 2021 19:02:00 +0000 Subject: [issue41824] Docs for typing.ForwardRef don't state that it was added in 3.7 In-Reply-To: <1600706127.1.0.52497874592.issue41824@roundup.psfhosted.org> Message-ID: <1612897320.45.0.40532625883.issue41824@roundup.psfhosted.org> Change by Guido van Rossum : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 14:26:49 2021 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 09 Feb 2021 19:26:49 +0000 Subject: [issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc In-Reply-To: <1612344373.45.0.663786135841.issue43112@roundup.psfhosted.org> Message-ID: <1612898809.63.0.88045734665.issue43112@roundup.psfhosted.org> Arfrever Frehtes Taifersar Arahesis added the comment: While original uClibc is not maintained, its fork called uClibc-ng is supposedly binary-compatible with uClibc and is still somehow maintained: https://uclibc-ng.org/ https://repo.or.cz/w/uclibc-ng.git https://www.uclibc.org/news.html also says: "While uClibc releases are on hold, you may use uClibc-ng" libc part of platform tuple on uClibc-ng systems is expected to be "uclibc". ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 14:45:14 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 09 Feb 2021 19:45:14 +0000 Subject: [issue41100] Support macOS 11 and Apple Silicon Macs In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1612899914.84.0.423032265753.issue41100@roundup.psfhosted.org> Ronald Oussoren added the comment: There is no ETA. I'm spending more time away from the computer and on other projects when I'm not at work. I also have no personal need for 3.8 support. If anyone else is up to the job: the back port to 3.9 should be a good starting point, but I don't trust the output of the cherry_picker tool to 3.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 14:55:00 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 09 Feb 2021 19:55:00 +0000 Subject: [issue43094] Update sqlite3 docs and docstrings to reflect implementation In-Reply-To: <1612210210.19.0.0751315887137.issue43094@roundup.psfhosted.org> Message-ID: <1612900500.53.0.157103032313.issue43094@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Module level function discrepancies: register_converter(), register_adapter(), and enable_callback_tracebacks() docstrings were unintentionally altered in recent AC updates. Docstrings should be restored. Docs are ok. adapt() is not documented, but docstrings were unintentionally altered in recent AC updates. Docstrings should be restored. connect() and enable_shared_cache() (latter is undocumented) are ok. complete_statement() docs should be updated to reflect implementation. ---------- title: sqlite3.create_function takes parameter named narg, not num_params -> Update sqlite3 docs and docstrings to reflect implementation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 15:03:08 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 09 Feb 2021 20:03:08 +0000 Subject: [issue31751] Support for C++ 11 and/or C++ 14 in python.org installer In-Reply-To: <1507661476.93.0.213398074469.issue31751@psf.upfronthosting.co.za> Message-ID: <1612900988.72.0.264137969247.issue31751@roundup.psfhosted.org> Ronald Oussoren added the comment: Can this be closed as out of date? 1. universal2 installers are build using Xcode 12 2. the regular installers are build on macOS 10.9 and the system compilers on that system should support C++ 11 and 14. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 15:07:54 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 09 Feb 2021 20:07:54 +0000 Subject: [issue43163] codeop prematurely raises on 2nd line when closer is needed In-Reply-To: <1612795567.03.0.987191957566.issue43163@roundup.psfhosted.org> Message-ID: <1612901274.27.0.977044899831.issue43163@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 15:08:14 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 09 Feb 2021 20:08:14 +0000 Subject: [issue43163] codeop prematurely raises on 2nd line when closer is needed In-Reply-To: <1612795567.03.0.987191957566.issue43163@roundup.psfhosted.org> Message-ID: <1612901294.77.0.230174547701.issue43163@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset dbb228189b4eb7ab41f326eb79dae669b2c81177 by Pablo Galindo in branch 'master': bpo-43163: Handle unclosed parentheses in codeop (GH-24483) https://github.com/python/cpython/commit/dbb228189b4eb7ab41f326eb79dae669b2c81177 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 15:48:10 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 09 Feb 2021 20:48:10 +0000 Subject: [issue43174] Windows: Use /utf-8 compiler flag In-Reply-To: <1612839542.96.0.0701004170388.issue43174@roundup.psfhosted.org> Message-ID: <1612903690.21.0.768472081002.issue43174@roundup.psfhosted.org> Steve Dower added the comment: The new property should go into PCbuild/pyproject.props, but otherwise seems like an okay change. It *will* cause any string literals (const char *) to be UTF-8, but they ought to all be ASCII anyway. It shouldn't affect resource files, because those have a code page override in the source files. (Potentially a "#pragma code_page(1252)" might make more sense for our build, but I'm not sure, and I'm just as happy to got to UTF-8 if it doesn't break anything.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 15:50:25 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 09 Feb 2021 20:50:25 +0000 Subject: [issue43175] filecmp is not working for UTF-8 BOM file. In-Reply-To: <1612848997.29.0.320825258569.issue43175@roundup.psfhosted.org> Message-ID: <1612903825.6.0.512265796506.issue43175@roundup.psfhosted.org> Steve Dower added the comment: I think you copy-pasted that code snippet incorrectly, because it has mismatched quotes. Can you paste the correct code? Also, please attach both files that are not comparing equal, ideally in a ZIP file (to avoid any modifications in transit), so that we can reproduce the issue. ---------- components: +Library (Lib) -Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 16:14:17 2021 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 09 Feb 2021 21:14:17 +0000 Subject: [issue43179] Remove s390 support In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1612905257.95.0.403267898399.issue43179@roundup.psfhosted.org> Change by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 17:05:50 2021 From: report at bugs.python.org (Vitaliy) Date: Tue, 09 Feb 2021 22:05:50 +0000 Subject: =?utf-8?q?=5Bissue43181=5D_Python_macros_don=E2=80=99t_shield_arguments?= Message-ID: <1612908350.59.0.954965139249.issue43181@roundup.psfhosted.org> New submission from Vitaliy : There is a lot of macros like: #define PyObject_TypeCheck(ob, tp) \ (Py_IS_TYPE(ob, tp) || PyType_IsSubtype(Py_TYPE(ob), (tp))) These work fine until an argument happen to contain a comma. That?s possible as a result of other macro?s expansion. E.g. if U(x) is defined as x, PyObject_TypeCheck(ob, U(f(c))) expands to (Py_IS_TYPE(ob, f(c)) || ...) but < and > aren?t treated as brackets by the preprocessor so Py_IS_TYPE is now invoked with 3 arguments instead of just 2, breaking module compilation. As arguments are expected to be values, surrounding each with parentheses solves the problem. But there are many such macros so that?s not an one-line fix. Note: the example is from PyGLM (simplified), it doesn?t compile on 3.9 due to this issue. ---------- components: C API messages: 386746 nosy: numberZero priority: normal severity: normal status: open title: Python macros don?t shield arguments versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 17:29:47 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 09 Feb 2021 22:29:47 +0000 Subject: =?utf-8?q?=5Bissue42919=5D_Blank_in_multiline_=E2=80=9Cif_expressions?= =?utf-8?q?=E2=80=9D_will_lead_to_EOF_errors?= In-Reply-To: <1610517945.87.0.376741027563.issue42919@roundup.psfhosted.org> Message-ID: <1612909787.45.0.662979012887.issue42919@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Closing as "not a bug" as per the previous discussion. If someone sees new information here, please, feel free to re-open. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 18:56:11 2021 From: report at bugs.python.org (Daniel Moisset) Date: Tue, 09 Feb 2021 23:56:11 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1612914971.84.0.653399236947.issue42128@roundup.psfhosted.org> Daniel Moisset added the comment: @Ken: I've invited you to the repo. For tracking the WIP, https://github.com/dmoisset/cpython/tree/patma-docs Do you want to see if you can base the reference/compound_stmts.rst changes in PEP 634? I'll try to fit a variant of the Appendix A of PEP 636 into the tutorial and make something up for the reference/lexical_analysis.rst (which needs a section of soft keywords which are not in the PEP trilogy. Perhaps I can rescue something from PEP 622) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 19:20:59 2021 From: report at bugs.python.org (Inada Naoki) Date: Wed, 10 Feb 2021 00:20:59 +0000 Subject: [issue42217] compiler: merge co_code and co_lnotab In-Reply-To: <1604130602.05.0.173247705477.issue42217@roundup.psfhosted.org> Message-ID: <1612916459.95.0.848968214993.issue42217@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 19:21:17 2021 From: report at bugs.python.org (Inada Naoki) Date: Wed, 10 Feb 2021 00:21:17 +0000 Subject: [issue42217] compiler: merge co_code and co_lnotab In-Reply-To: <1604130602.05.0.173247705477.issue42217@roundup.psfhosted.org> Message-ID: <1612916477.64.0.395018562258.issue42217@roundup.psfhosted.org> Inada Naoki added the comment: New changeset bdb941be423bde8b02a5695ccf51c303d6204bed by Inada Naoki in branch 'master': bpo-42217: compiler: merge same co_code and co_linetable objects (GH-23056) https://github.com/python/cpython/commit/bdb941be423bde8b02a5695ccf51c303d6204bed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 19:36:45 2021 From: report at bugs.python.org (Bruce Fuda) Date: Wed, 10 Feb 2021 00:36:45 +0000 Subject: [issue43182] TURTLE: Default values for basic Turtle commands Message-ID: <1612917405.69.0.155307623071.issue43182@roundup.psfhosted.org> New submission from Bruce Fuda : Since Python is being taught to students of all ages and in particular younger kids (i.e. 6 - 10 yo) who are learning not just python, but many related things for the first time, the need to include values as arguments to basic Turtle functions like: forward() backward() left() right() adds additional complexity. The natural starting point for these types of activities with kids is a transition from the physical world of devices such as the Bee-bot (https://www.tts-international.com/bee-bot-programmable-floor-robot/1015268.html) which have pre-defined lengths (i.e. 15cm) and turn angles (i.e. 90 degrees) so that they can focus primarily on sequencing and learning commands without the cognitive load of additional information. It would be an ideal starting point for the forward(), backward(), left() and right() commands to be overloaded such that there is a default value. This reduces the cognitive load for young students, because it instead means they can focus on learning basic commands, sequencing and syntax without also needing to understand angles and relative lengths. Suggestion would be to set a default value for movement (i.e. forward and backward) of 50, and default angles for turning (left and right) of 90 degrees. This simple (and trivial) change would massively help thousands of students get started with Python, without in any way impacting existing use of Turtle. ---------- components: Library (Lib) messages: 386750 nosy: Bruce1979 priority: normal severity: normal status: open title: TURTLE: Default values for basic Turtle commands type: enhancement versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 20:42:49 2021 From: report at bugs.python.org (Bob) Date: Wed, 10 Feb 2021 01:42:49 +0000 Subject: [issue43183] Asyncio can't close sockets properly on Linux cause CLOSE_WAIT Message-ID: <1612921369.93.0.425645131908.issue43183@roundup.psfhosted.org> Change by Bob : ---------- components: asyncio nosy: Bob_2021, asvetlov, yselivanov priority: normal severity: normal status: open title: Asyncio can't close sockets properly on Linux cause CLOSE_WAIT type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 20:43:45 2021 From: report at bugs.python.org (Kevin Purrone) Date: Wed, 10 Feb 2021 01:43:45 +0000 Subject: [issue38946] IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched In-Reply-To: <1575141041.2.0.751349559914.issue38946@roundup.psfhosted.org> Message-ID: <1612921425.09.0.875495952406.issue38946@roundup.psfhosted.org> Kevin Purrone added the comment: I have little experience posting in forums, so if this post is in the wrong place, please let me know. I am running Python3.9, with Apple OS 10.15.7 I was using IDLE successfully for a class in Python for the past three weeks, although I was rarely able to open a file by double clicking it. It actually worked a few times, but most of the time, nothing happened, and I would open IDLE first, and then open a file from its file menu. But today, IDLE will not open. When I click on the icon in the dock like I usually did, it seems to open for about .5 seconds, and then quits. Also, now when I double click on a .py file, IDLE will open for about .5 seconds and then quits. I reinstalled the package, but no change. However, in terminal I can launch python with this command: python3.9. Then I can launch IDLE with this command: import idlelib.idle. The IDLE window opens, and I can open files from the file menu and they run as before. However, the title of the file menu is now "Python" where before, it was "IDLE" ---------- nosy: +KevinPurrone versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 20:48:51 2021 From: report at bugs.python.org (Kevin Purrone) Date: Wed, 10 Feb 2021 01:48:51 +0000 Subject: [issue38946] IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched In-Reply-To: <1575141041.2.0.751349559914.issue38946@roundup.psfhosted.org> Message-ID: <1612921731.55.0.892764770178.issue38946@roundup.psfhosted.org> Kevin Purrone added the comment: Sorry, I meant to say the title of the PROGRAM in the menu items is now Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 20:56:34 2021 From: report at bugs.python.org (Bob) Date: Wed, 10 Feb 2021 01:56:34 +0000 Subject: [issue43183] Asyncio can't close sockets properly on Linux cause CLOSE_WAIT Message-ID: <1612922194.82.0.214805555542.issue43183@roundup.psfhosted.org> New submission from Bob : I wrote a simple proxy with Python3.8 and Asyncio, but I found it couldn't handle passive close correctly, a lot of CLOSE_WAIT sockets couldn't be released. I had trouble shot it for a long time with no progress. netstat -anop tcp | grep CLOSE_WAIT tcp6 0 0 64.XXX.XXX.XXX:80 113.58.229.12:46996 CLOSE_WAIT 10486/python3.8 off (0.00/0/0) tcp6 0 0 64.XXX.XXX.XXX:80 222.137.35.237:54914 CLOSE_WAIT 10485/python3.8 off (0.00/0/0) tcp6 0 0 64.XXX.XXX.XXX:80 119.39.47.229:53882 CLOSE_WAIT 10486/python3.8 off (0.00/0/0) tcp6 0 0 64.XXX.XXX.XXX:80 123.14.254.238:49262 CLOSE_WAIT 10486/python3.8 off (0.00/0/0) tcp6 0 0 64.XXX.XXX.XXX:80 121.57.230.51:35036 CLOSE_WAIT 10486/python3.8 off (0.00/0/0) tcp6 0 0 64.XXX.XXX.XXX:80 124.235.138.253:44882 CLOSE_WAIT 10486/python3.8 off (0.00/0/0) tcp6 0 0 64.XXX.XXX.XXX:80 36.5.157.219:38006 CLOSE_WAIT 10486/python3.8 off (0.00/0/0) tcp6 0 0 64.XXX.XXX.XXX:80 150.255.5.121:39288 CLOSE_WAIT 10486/python3.8 off (0.00/0/0) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 21:25:16 2021 From: report at bugs.python.org (Bob) Date: Wed, 10 Feb 2021 02:25:16 +0000 Subject: [issue43183] Asyncio can't close sockets properly on Linux cause CLOSE_WAIT In-Reply-To: <1612922194.82.0.214805555542.issue43183@roundup.psfhosted.org> Message-ID: <1612923916.21.0.277274945126.issue43183@roundup.psfhosted.org> Change by Bob : Added file: https://bugs.python.org/file49799/server.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 22:00:11 2021 From: report at bugs.python.org (William Pickard) Date: Wed, 10 Feb 2021 03:00:11 +0000 Subject: =?utf-8?q?=5Bissue43181=5D_Python_macros_don=E2=80=99t_shield_arguments?= In-Reply-To: <1612908350.59.0.954965139249.issue43181@roundup.psfhosted.org> Message-ID: <1612926011.2.0.567589488444.issue43181@roundup.psfhosted.org> William Pickard added the comment: This feels like it's more of an issue with the C++ compiler you're using. (I can tell it's C++ because of template syntax) ---------- nosy: +WildCard65 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 22:06:22 2021 From: report at bugs.python.org (Tony Martin Berbel) Date: Wed, 10 Feb 2021 03:06:22 +0000 Subject: [issue43001] python3.9.1 test_embed test_tabnanny failed In-Reply-To: <1611315338.64.0.350030617212.issue43001@roundup.psfhosted.org> Message-ID: <1612926382.41.0.74346135249.issue43001@roundup.psfhosted.org> Tony Martin Berbel added the comment: I had the same error I ran the make test command with >&log But I don't know where to look for the log file ---------- nosy: +wingarmac _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 22:15:27 2021 From: report at bugs.python.org (Tony Martin Berbel) Date: Wed, 10 Feb 2021 03:15:27 +0000 Subject: [issue43001] python3.9.1 test_embed test_tabnanny failed In-Reply-To: <1611315338.64.0.350030617212.issue43001@roundup.psfhosted.org> Message-ID: <1612926927.53.0.622693309382.issue43001@roundup.psfhosted.org> Tony Martin Berbel added the comment: I found lastlog and attached it ! ---------- Added file: https://bugs.python.org/file49800/lastlog _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 22:24:33 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 10 Feb 2021 03:24:33 +0000 Subject: [issue38946] IDLE on macOS 10.15 Catalina does not open double-clicked files if app already launched In-Reply-To: <1575141041.2.0.751349559914.issue38946@roundup.psfhosted.org> Message-ID: <1612927473.85.0.160166326157.issue38946@roundup.psfhosted.org> Terry J. Reedy added the comment: Yes, the program title depends on what 'app' you start. I presume that this is normal for Mac. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 22:35:22 2021 From: report at bugs.python.org (Bob) Date: Wed, 10 Feb 2021 03:35:22 +0000 Subject: [issue43183] Asyncio can't close sockets properly on Linux cause CLOSE_WAIT In-Reply-To: <1612922194.82.0.214805555542.issue43183@roundup.psfhosted.org> Message-ID: <1612928122.32.0.173068878836.issue43183@roundup.psfhosted.org> Change by Bob : ---------- assignee: -> christian.heimes components: +SSL nosy: +christian.heimes versions: +Python 3.10, Python 3.7, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 22:50:08 2021 From: report at bugs.python.org (Eli Schwartz) Date: Wed, 10 Feb 2021 03:50:08 +0000 Subject: [issue27640] Add --disable-test-modules configure option to not build nor install tests In-Reply-To: <1469700317.99.0.84265252625.issue27640@psf.upfronthosting.co.za> Message-ID: <1612929008.16.0.715231682652.issue27640@roundup.psfhosted.org> Eli Schwartz added the comment: I have a slightly different interest in declining to install tests... Arch Linux provides the tests as a split subpackage with currently some hacky shell globbing to delete the tests after make install, then do a second libinstall and delete everything but the tests. It would be more convenient if we had a Makefile option to install the tests separately. It's now possible to disable installing tests with a filthy hack: make install TEST_MODULES= TESTSUBDIRS= However, it's not possible to similarly hack make libinstall LIBSUBDIRS= Because it installs some toplevel stuff, then runs lib2to3.pgen2.driver on the grammar that got skipped by the LIBSUBDIRS= hack. Thoughts on maybe splitting this up at install time? Would probably mean duplicating some of libinstall as testinstall... ---------- nosy: +eschwartz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 9 22:59:54 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 10 Feb 2021 03:59:54 +0000 Subject: [issue43001] python3.9.1 test_embed test_tabnanny failed In-Reply-To: <1611315338.64.0.350030617212.issue43001@roundup.psfhosted.org> Message-ID: <1612929594.61.0.557624358756.issue43001@roundup.psfhosted.org> Terry J. Reedy added the comment: A 300 KB file of unknown type that has to be downloaded and opened with an unknown program is pretty useless. Please state system/OS, exact Python release, command run, and copy-paste the errors here on the web page. I do not see test_embed or test_tabnanny errors on Windows or Mac. Are you 2 on *nix? For test_embed, all tests are skipped for me because _testembed.exe does not exist. I am guessing that this is normal since the first line of the file says # Run the tests in Programs/_testembed.c (tests for the CPython embedding APIs) This suggests that it should never fail when running the test suite normally. Victor? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 00:13:09 2021 From: report at bugs.python.org (Inada Naoki) Date: Wed, 10 Feb 2021 05:13:09 +0000 Subject: [issue43174] Windows: Use /utf-8 compiler flag In-Reply-To: <1612839542.96.0.0701004170388.issue43174@roundup.psfhosted.org> Message-ID: <1612933989.24.0.0122876268188.issue43174@roundup.psfhosted.org> Change by Inada Naoki : ---------- keywords: +patch pull_requests: +23287 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24498 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 01:17:51 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 10 Feb 2021 06:17:51 +0000 Subject: [issue43172] Fix test_readline when compiled using --with-readline=edit In-Reply-To: <1612834834.05.0.814516616916.issue43172@roundup.psfhosted.org> Message-ID: <1612937871.48.0.180246783164.issue43172@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- keywords: +patch pull_requests: +23288 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/24499 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 02:24:50 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 10 Feb 2021 07:24:50 +0000 Subject: =?utf-8?q?=5Bissue43181=5D_Python_macros_don=E2=80=99t_shield_arguments?= In-Reply-To: <1612908350.59.0.954965139249.issue43181@roundup.psfhosted.org> Message-ID: <1612941890.18.0.0299766787697.issue43181@roundup.psfhosted.org> Gregory P. Smith added the comment: This bug is valid, that macro and likely others aren't up to best practices. C macros are a PITA to get right. ---------- keywords: +3.9regression nosy: +gregory.p.smith stage: -> needs patch type: -> compile error versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 02:26:15 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 10 Feb 2021 07:26:15 +0000 Subject: =?utf-8?q?=5Bissue43181=5D_Python_macros_don=E2=80=99t_shield_arguments?= In-Reply-To: <1612908350.59.0.954965139249.issue43181@roundup.psfhosted.org> Message-ID: <1612941975.41.0.890544712463.issue43181@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 02:29:09 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 10 Feb 2021 07:29:09 +0000 Subject: [issue31751] Support for C++ 11 and/or C++ 14 in macOS python.org installer In-Reply-To: <1507661476.93.0.213398074469.issue31751@psf.upfronthosting.co.za> Message-ID: <1612942149.28.0.00991915261199.issue31751@roundup.psfhosted.org> Gregory P. Smith added the comment: seems likely. reopen if this is still relevant to any modern release. ---------- nosy: +gregory.p.smith resolution: -> out of date stage: -> resolved status: open -> closed title: Support for C++ 11 and/or C++ 14 in python.org installer -> Support for C++ 11 and/or C++ 14 in macOS python.org installer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 03:37:11 2021 From: report at bugs.python.org (Yoav Palti) Date: Wed, 10 Feb 2021 08:37:11 +0000 Subject: [issue43184] Missing docs for LoggerAdapter manager and name property Message-ID: <1612946231.77.0.582069652374.issue43184@roundup.psfhosted.org> New submission from Yoav Palti : I found the following issue which added manager and name properties to logging.LoggerAdapter on version 3.6: https://bugs.python.org/issue31457 However the current docs don't have them documented: https://docs.python.org/3.6/library/logging.html#logging.LoggerAdapter ---------- assignee: docs at python components: Documentation messages: 386762 nosy: docs at python, yoavp10 priority: normal severity: normal status: open title: Missing docs for LoggerAdapter manager and name property versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 03:46:43 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 10 Feb 2021 08:46:43 +0000 Subject: [issue43184] Missing docs for LoggerAdapter manager and name property In-Reply-To: <1612946231.77.0.582069652374.issue43184@roundup.psfhosted.org> Message-ID: <1612946803.69.0.543480837009.issue43184@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 04:00:08 2021 From: report at bugs.python.org (Yang Feng) Date: Wed, 10 Feb 2021 09:00:08 +0000 Subject: [issue43185] AssertRaises() causes core dump in handling recursion Message-ID: <1612947608.83.0.497141724591.issue43185@roundup.psfhosted.org> New submission from Yang Feng : Seeing the following program, in the second assertRaises(), function "test_invalid_adpcm_state()" is recursively called. Then a fatal Python error shows up and the Python interpreter crashes. ++++++++++++++++++++++++++++++++++++++ import unittest import audioop class TestAudioop(unittest.TestCase): pass def test_invalid_adpcm_state(): TestAudioop.assertRaises(TypeError, audioop.lin2adpcm, b'\x00', 1, 555) TestAudioop.assertRaises(test_invalid_adpcm_state(), audioop.adpcm2lin, b'\x00', 1, (0, (- 1))) TestAudioop = TestAudioop() test_invalid_adpcm_state() +++++++++++++++++++++++++++++++++++++++ System Info: Ubuntu 16.04 Python Version: Python 3.9.1 ---------- components: Library (Lib) messages: 386763 nosy: CharlesFengY priority: normal severity: normal status: open title: AssertRaises() causes core dump in handling recursion type: crash versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 04:06:51 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 10 Feb 2021 09:06:51 +0000 Subject: [issue43145] Leak of locks from multiprocessing.Process In-Reply-To: <1612616557.31.0.756365409942.issue43145@roundup.psfhosted.org> Message-ID: <1612948011.48.0.53558250952.issue43145@roundup.psfhosted.org> Change by Gregory P. Smith : ---------- title: Leak of locks in a subprocess -> Leak of locks from multiprocessing.Process _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 04:14:27 2021 From: report at bugs.python.org (Yang Feng) Date: Wed, 10 Feb 2021 09:14:27 +0000 Subject: [issue43186] Recursive call causes core dump in assertRaises Message-ID: <1612948467.97.0.883928038728.issue43186@roundup.psfhosted.org> New submission from Yang Feng : In following teststr.py, class MyString is nestedly instanced in method __getattr__(). This script will lead to a "core dump" in Python interpreter. My Python version is 3.9.1 and my operating system is Ubuntu 16.04. teststr.py +++++++++++++++++++++++++++++++++++++++++++ class StrError(str): pass class MyString: def __init__(self, istr): self.__mystr__ = istr def __getattr__(self, content): with self: return MyString(getattr(self.__mystr__, content)) def __setattr__(self, content, sstr): setattr(self.__mystr__, content) def __enter__(self): return self def __exit__(self, exc_type, exc_val, exc_tb): raise StrError(self.__mystr__) return True MyString("hello") +++++++++++++++++++++++++++++++++++++++++ ---------- components: Library (Lib) messages: 386764 nosy: CharlesFengY priority: normal severity: normal status: open title: Recursive call causes core dump in assertRaises versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 04:19:35 2021 From: report at bugs.python.org (Yang Feng) Date: Wed, 10 Feb 2021 09:19:35 +0000 Subject: [issue43187] Dict creation in recursive function cause interpreter crashes. Message-ID: <1612948775.51.0.474463250225.issue43187@roundup.psfhosted.org> New submission from Yang Feng : In the following programs, dict is created in recursive calls. Then a core dump is reported by Python interpreter. +++++++++++++++++++++++++++++++++++++++++++ def test_equal_operator_modifying_operand(): class X(): def __del__(DictTest): dict_b.clear() def __eq__(DictTest, other): dict_a.clear() return True def __hash__(DictTest): return 13 dict_d = {X(): 0} class Y(): def __eq__(DictTest, other): dict_d.clear() return True dict_d = {0: Y()} # dict_c = {0: set()} test_equal_operator_modifying_operand() test_equal_operator_modifying_operand() +++++++++++++++++++++++++++++++++++++++++ ---------- components: Interpreter Core messages: 386765 nosy: CharlesFengY priority: normal severity: normal status: open title: Dict creation in recursive function cause interpreter crashes. type: crash versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 04:44:21 2021 From: report at bugs.python.org (Yang Feng) Date: Wed, 10 Feb 2021 09:44:21 +0000 Subject: [issue43188] multiple operations of dict causes core dump of Python interpreter. Message-ID: <1612950261.11.0.487883893903.issue43188@roundup.psfhosted.org> New submission from Yang Feng : In the following programs, we call check_reentrant_insertion("s") twice, after multiple of update and clear of dict, the Python interpreter crashes. +++++++++++++++++++++++++++++++++++++++++++ def check_reentrant_insertion(mutate): class Mutating: def __del__(self): mutate(d) d = {k: Mutating() for k in 'abcdefghijklmnopqr'} for k in list(d): d[k] = k def test_reentrant_insertion(): check_reentrant_insertion("s") def mutate(d): d.update(DictTest.__dict__) d.clear() check_reentrant_insertion(test_reentrant_insertion()) test_reentrant_insertion() +++++++++++++++++++++++++++++++++++++++++ System Info: Ubuntu 16.04 Python Version: Python 3.9.1 ---------- components: Interpreter Core messages: 386766 nosy: CharlesFengY priority: normal severity: normal status: open title: multiple operations of dict causes core dump of Python interpreter. type: crash versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 04:46:08 2021 From: report at bugs.python.org (Yang Feng) Date: Wed, 10 Feb 2021 09:46:08 +0000 Subject: [issue43189] decorator function run_with_locale() crashes Python interpreter Message-ID: <1612950368.13.0.435126330801.issue43189@roundup.psfhosted.org> New submission from Yang Feng : We use run_with_locale() as decorator function, then we recursively call test_float__format__locale in the following example. Python interpreter crashes. +++++++++++++++++++++++++++++++++++++++++++ from test.support import run_with_locale @run_with_locale('LC_NUMERIC', 'en_US.UTF8') def test_float__format__locale(): test_float__format__locale() test_float__format__locale() +++++++++++++++++++++++++++++++++++++++++ System Info: Ubuntu 16.04 Python Version: Python 3.9.1 ---------- components: Tests messages: 386767 nosy: CharlesFengY priority: normal severity: normal status: open title: decorator function run_with_locale() crashes Python interpreter type: crash versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 04:48:58 2021 From: report at bugs.python.org (Yang Feng) Date: Wed, 10 Feb 2021 09:48:58 +0000 Subject: [issue43190] < test.support > check_free_after_iterating( ) causes core dump in handling iteration. Message-ID: <1612950537.99.0.387983574304.issue43190@roundup.psfhosted.org> New submission from Yang Feng : In the following program, we call check_free_after_iterating( ) twice, in the second time, we recursively call function test_free_after_iterating(). Python interpreter crashes. +++++++++++++++++++++++++++++++++++++++++++ import unittest import test.support class UnicodeTest(unittest.TestCase): pass def test_free_after_iterating(): ut = UnicodeTest() test.support.check_free_after_iterating(ut, iter, str) test.support.check_free_after_iterating(str, test_free_after_iterating(), str) test_free_after_iterating() +++++++++++++++++++++++++++++++++++++++++ System Info: Ubuntu 16.04 Python Version: Python 3.9.1 ---------- components: Library (Lib) messages: 386768 nosy: CharlesFengY priority: normal severity: normal status: open title: < test.support > check_free_after_iterating( ) causes core dump in handling iteration. type: crash versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 05:13:44 2021 From: report at bugs.python.org (Hannah Busshoff) Date: Wed, 10 Feb 2021 10:13:44 +0000 Subject: [issue43191] Shared Memory for array of object Message-ID: <1612952024.75.0.333597228356.issue43191@roundup.psfhosted.org> New submission from Hannah Busshoff : Dear all, When seeking to put an object of type -- Array of object -- into shared memory when doing multiprocessing via starmap, I am encountering problems -- in that sense that the program does not finish running but apparently gets stuck. I attached a minimal example. Many thanks for your help. I sincerely hope I have not overlooked that this issue has been raised by somebody else. I am happy to provide further input! Cheers, Hannah ---------- files: example.py messages: 386769 nosy: hannahbusshoff priority: normal severity: normal status: open title: Shared Memory for array of object type: crash versions: Python 3.8 Added file: https://bugs.python.org/file49801/example.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 05:20:31 2021 From: report at bugs.python.org (Bob) Date: Wed, 10 Feb 2021 10:20:31 +0000 Subject: [issue43183] Asyncio can't close sockets properly on Linux cause CLOSE_WAIT In-Reply-To: <1612922194.82.0.214805555542.issue43183@roundup.psfhosted.org> Message-ID: <1612952431.98.0.172114132412.issue43183@roundup.psfhosted.org> Change by Bob : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 05:24:37 2021 From: report at bugs.python.org (Clint Olsen) Date: Wed, 10 Feb 2021 10:24:37 +0000 Subject: [issue43192] Argparse complains argument required when default is provided Message-ID: <1612952677.32.0.0422896967903.issue43192@roundup.psfhosted.org> New submission from Clint Olsen : When I run the following program, I expect args.run to be 'foo' if no argument is specified on the command-line. parser = argparse.ArgumentParser() parser.add_argument('foo', default='bar') args = parser.parse_args() $ ./test usage: test [-h] foo test: error: the following arguments are required: foo However if I specify nargs='*' this error goes away. Maybe I'm missing something obvious, but this seems non-intuitive to me. ---------- components: Library (Lib) messages: 386770 nosy: Clint Olsen priority: normal severity: normal status: open title: Argparse complains argument required when default is provided type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 05:26:12 2021 From: report at bugs.python.org (Clint Olsen) Date: Wed, 10 Feb 2021 10:26:12 +0000 Subject: [issue43192] Argparse complains argument required when default is provided In-Reply-To: <1612952677.32.0.0422896967903.issue43192@roundup.psfhosted.org> Message-ID: <1612952772.48.0.899638394458.issue43192@roundup.psfhosted.org> Clint Olsen added the comment: Sorry, I meant to say args.foo should be 'bar'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 05:41:31 2021 From: report at bugs.python.org (Muhammad Hussein Ammari) Date: Wed, 10 Feb 2021 10:41:31 +0000 Subject: [issue43193] Installer for All users Message-ID: <1612953691.92.0.275565504526.issue43193@roundup.psfhosted.org> New submission from Muhammad Hussein Ammari : I installed Python for All users Installer make below file to %LocalAppData% (Instead of %ProgramData%) "%LocalAppData%\Package Cache\{b2be55ad-3177-42aa-a6c2-53004684e4ea}" Now other user can't unistalling Python. Please fix this issue. ---------- components: Windows messages: 386772 nosy: paul.moore, steve.dower, tim.golden, xmha97, zach.ware priority: normal severity: normal status: open title: Installer for All users type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 05:41:40 2021 From: report at bugs.python.org (Tomas Orsava) Date: Wed, 10 Feb 2021 10:41:40 +0000 Subject: [issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file In-Reply-To: <1612348984.98.0.934369937347.issue43113@roundup.psfhosted.org> Message-ID: <1612953700.59.0.637971619715.issue43113@roundup.psfhosted.org> Tomas Orsava added the comment: I agree that at least documenting the behaviour is a good idea. This bug has seriously confused our QE person with years of experience, and then me when debugging with him. Chances are it's going to confuse somebody else too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 06:10:23 2021 From: report at bugs.python.org (h-vetinari) Date: Wed, 10 Feb 2021 11:10:23 +0000 Subject: [issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc In-Reply-To: <1612344373.45.0.663786135841.issue43112@roundup.psfhosted.org> Message-ID: <1612955423.19.0.897099575475.issue43112@roundup.psfhosted.org> Change by h-vetinari : ---------- nosy: +h-vetinari _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 06:19:02 2021 From: report at bugs.python.org (Zackery Spytz) Date: Wed, 10 Feb 2021 11:19:02 +0000 Subject: [issue43155] PyCMethod_New not defined in python3.lib In-Reply-To: <1612721158.76.0.287250699598.issue43155@roundup.psfhosted.org> Message-ID: <1612955942.23.0.599754385471.issue43155@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 1.0 -> 2.0 pull_requests: +23289 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24500 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 06:20:06 2021 From: report at bugs.python.org (Boris Staletic) Date: Wed, 10 Feb 2021 11:20:06 +0000 Subject: [issue43145] Leak of locks from multiprocessing.Process In-Reply-To: <1612616557.31.0.756365409942.issue43145@roundup.psfhosted.org> Message-ID: <1612956006.24.0.11506183498.issue43145@roundup.psfhosted.org> Boris Staletic added the comment: The `multiprocessing.Process`, on Linux, ends up doing something like this: pid = os.fork() if pid == 0: os._exit() Translated to C: int main() { Py_Initialize(); PyOS_BeforeFork(); pid_t pid = fork(); if (pid == 0) { PyOS_AfterFork_Child(); // Reinitializes stuff. _exit(0); // Child process exits without cleanup. } PyOS_AfterFork_Parent(); Py_Finalize(); } The call to `_exit()` happens in Lib/multiprocessing/popen_fork.py#L73 My attempts at cleaning this up resulted in even more problems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 06:55:45 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 10 Feb 2021 11:55:45 +0000 Subject: [issue43185] AssertRaises() causes core dump in handling recursion In-Reply-To: <1612947608.83.0.497141724591.issue43185@roundup.psfhosted.org> Message-ID: <1612958145.02.0.94195057658.issue43185@roundup.psfhosted.org> Irit Katriel added the comment: Reproduced on master as well. Simplified script: ------------------------------------------ import unittest def f(): raise TypeError class TestAudioop(unittest.TestCase): def test_invalid_adpcm_state(self): self.assertRaises(TypeError, f) self.test_invalid_adpcm_state() TestAudioop().test_invalid_adpcm_state() ------------------------------------------ ---------- nosy: +Mark.Shannon, iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 06:56:09 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 10 Feb 2021 11:56:09 +0000 Subject: [issue43185] AssertRaises() causes core dump in handling recursion In-Reply-To: <1612947608.83.0.497141724591.issue43185@roundup.psfhosted.org> Message-ID: <1612958169.98.0.779574747855.issue43185@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 07:27:30 2021 From: report at bugs.python.org (Yang Feng) Date: Wed, 10 Feb 2021 12:27:30 +0000 Subject: [issue43185] AssertRaises() causes core dump in handling recursion In-Reply-To: <1612947608.83.0.497141724591.issue43185@roundup.psfhosted.org> Message-ID: <1612960050.57.0.8056378118.issue43185@roundup.psfhosted.org> Yang Feng added the comment: Could you please tell me your secret method of getting the minimal script? I will try to provide minimal ones in our following work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 08:05:42 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 10 Feb 2021 13:05:42 +0000 Subject: [issue43185] AssertRaises() causes core dump in handling recursion In-Reply-To: <1612947608.83.0.497141724591.issue43185@roundup.psfhosted.org> Message-ID: <1612962342.59.0.174889829245.issue43185@roundup.psfhosted.org> Mark Shannon added the comment: 3.9 crashes. On master, I'm not seeing a crash, just a RecursionError. >>> import unittest >>> >>> def f(): ... raise TypeError ... >>> class TestAudioop(unittest.TestCase): ... def test_invalid_adpcm_state(self): ... self.assertRaises(TypeError, f) ... self.test_invalid_adpcm_state() ... >>> TestAudioop().test_invalid_adpcm_state() Traceback (most recent call last): File "", line 1, in File "", line 4, in test_invalid_adpcm_state File "", line 4, in test_invalid_adpcm_state File "", line 4, in test_invalid_adpcm_state [Previous line repeated 992 more times] File "", line 3, in test_invalid_adpcm_state File "/home/mark/repos/cpython/Lib/unittest/case.py", line 730, in assertRaises context = _AssertRaisesContext(expected_exception, self) File "/home/mark/repos/cpython/Lib/unittest/case.py", line 168, in __init__ _BaseTestCaseContext.__init__(self, test_case) RecursionError: maximum recursion depth exceeded ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 08:21:42 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 10 Feb 2021 13:21:42 +0000 Subject: [issue43185] AssertRaises() causes core dump in handling recursion In-Reply-To: <1612947608.83.0.497141724591.issue43185@roundup.psfhosted.org> Message-ID: <1612963302.74.0.446661425922.issue43185@roundup.psfhosted.org> Irit Katriel added the comment: Yang - no secret really, just trial and error. Mark - right I wasn't on master, sorry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 08:25:07 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 10 Feb 2021 13:25:07 +0000 Subject: [issue43185] AssertRaises() causes core dump in handling recursion In-Reply-To: <1612947608.83.0.497141724591.issue43185@roundup.psfhosted.org> Message-ID: <1612963507.64.0.658503498512.issue43185@roundup.psfhosted.org> Mark Shannon added the comment: I think this was fixed by https://github.com/python/cpython/pull/23568 The root cause seems to be the same as #42500, so I'm going to backport https://github.com/python/cpython/pull/23568 to 3.9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 08:49:19 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 10 Feb 2021 13:49:19 +0000 Subject: [issue42500] crash with unbounded recursion in except statement In-Reply-To: <1606635563.54.0.549807759752.issue42500@roundup.psfhosted.org> Message-ID: <1612964959.23.0.964303531095.issue42500@roundup.psfhosted.org> Change by Mark Shannon : ---------- pull_requests: +23290 pull_request: https://github.com/python/cpython/pull/24501 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 08:49:45 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 10 Feb 2021 13:49:45 +0000 Subject: [issue43191] Shared Memory for array of object In-Reply-To: <1612952024.75.0.333597228356.issue43191@roundup.psfhosted.org> Message-ID: <1612964985.23.0.382849681103.issue43191@roundup.psfhosted.org> Eric V. Smith added the comment: This looks like a numpy usage question, not a python bug. I suggest you ask on Stackoverflow or a numpy user forum. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 08:53:54 2021 From: report at bugs.python.org (Mark Shannon) Date: Wed, 10 Feb 2021 13:53:54 +0000 Subject: [issue43185] AssertRaises() causes core dump in handling recursion In-Reply-To: <1612947608.83.0.497141724591.issue43185@roundup.psfhosted.org> Message-ID: <1612965234.9.0.615537409628.issue43185@roundup.psfhosted.org> Change by Mark Shannon : ---------- assignee: -> Mark.Shannon components: +Interpreter Core -Library (Lib) versions: -Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 09:27:41 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 10 Feb 2021 14:27:41 +0000 Subject: [issue43192] Argparse complains argument required when default is provided In-Reply-To: <1612952677.32.0.0422896967903.issue43192@roundup.psfhosted.org> Message-ID: <1612967261.53.0.0460436047504.issue43192@roundup.psfhosted.org> Eric V. Smith added the comment: Providing a default value does not imply setting nargs, so you need to specify both. I think it's not clear what nargs would default to, if you wanted to change the behavior if default= is supplied.. In your example you probably want nargs='?', not '*'. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 09:37:21 2021 From: report at bugs.python.org (JiKwon Kim) Date: Wed, 10 Feb 2021 14:37:21 +0000 Subject: [issue43194] Add JFXX as jpeg marker in imghdr module Message-ID: <1612967841.33.0.0362829630893.issue43194@roundup.psfhosted.org> New submission from JiKwon Kim : Currently imghdr module only finds "JFIF" or "Exif" in specific position. However there's some jpeg images with "JFXX" marker. I had some image with this marker and imghdr.what() returned None. Refer to: https://www.ecma-international.org/wp-content/uploads/ECMA_TR-98_1st_edition_june_2009.pdf (Section 10.1 JFIF Extension APP0 Marker Segment) ---------- components: Library (Lib) messages: 386782 nosy: elbarkwon priority: normal pull_requests: 23291 severity: normal status: open title: Add JFXX as jpeg marker in imghdr module type: enhancement versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 09:48:12 2021 From: report at bugs.python.org (Hannah Busshoff) Date: Wed, 10 Feb 2021 14:48:12 +0000 Subject: [issue43191] Shared Memory for array of object In-Reply-To: <1612952024.75.0.333597228356.issue43191@roundup.psfhosted.org> Message-ID: <1612968492.83.0.0732595645729.issue43191@roundup.psfhosted.org> Hannah Busshoff added the comment: Hi Eric, Thanks for your quick reply. The numpy operation was only an attempt to serialize the nested list and make it available as a shared memory object. As is written in the documentation, the SharedList() does not take nested lists as an input. I posed the question as well on Stackoverflow with a slightly longer example. Feel free to check it out: https://stackoverflow.com/questions/66138235/multiprocessing-with-array-of-objects-in-shared-memory. Thanks again. Cheers, Hannah ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 10:04:10 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 10 Feb 2021 15:04:10 +0000 Subject: [issue43190] < test.support > check_free_after_iterating( ) causes core dump in handling iteration. In-Reply-To: <1612950537.99.0.387983574304.issue43190@roundup.psfhosted.org> Message-ID: <1612969450.87.0.171041091742.issue43190@roundup.psfhosted.org> Irit Katriel added the comment: This looks similar to 43185. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 10:14:53 2021 From: report at bugs.python.org (Ned Deily) Date: Wed, 10 Feb 2021 15:14:53 +0000 Subject: [issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1612970093.38.0.481972142408.issue42967@roundup.psfhosted.org> Ned Deily added the comment: Ping. This issue has been delaying 3.7.x and 3.6.x security releases. I would prefer to have it resolved before releasing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 10:28:37 2021 From: report at bugs.python.org (Alexey Izbyshev) Date: Wed, 10 Feb 2021 15:28:37 +0000 Subject: [issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file In-Reply-To: <1612348984.98.0.934369937347.issue43113@roundup.psfhosted.org> Message-ID: <1612970917.57.0.515289995356.issue43113@roundup.psfhosted.org> Alexey Izbyshev added the comment: How do you propose to approach documentation of such behavior? The underlying cause is the ambiguity of ENOENT error code from execve() returned by the kernel, so it applies to all places where Python can call execve(), including os.posixspawn(), os.execve() and subprocess, so it's not clear to me where such documentation should be placed. And, of course, this behavior is not specific to CPython. The Linux man pages mention various causes of this error[1], though POSIX doesn't[2]. While ENOENT ambiguity is indeed confusing, one of the top results of my DDG search on "linux no such file or directory but script exists" is this link[3]. [1] https://man7.org/linux/man-pages/man2/execve.2.html [2] https://pubs.opengroup.org/onlinepubs/9699919799/functions/execve.html [3] https://stackoverflow.com/questions/3949161/no-such-file-or-directory-but-it-exists ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 10:40:33 2021 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 10 Feb 2021 15:40:33 +0000 Subject: [issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1612971633.46.0.126364500452.issue42967@roundup.psfhosted.org> Senthil Kumaran added the comment: Sorry for that, Ned. I will take a decision on this by Saturday (13-Feb). I did some research, but could come way conclusively. I have not heard any opinions (+ves or -ves) on this. This will be a breaking change, so necessary to support it with documentation, alerts etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 10:41:52 2021 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 10 Feb 2021 15:41:52 +0000 Subject: [issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1612971712.46.0.637666844853.issue42967@roundup.psfhosted.org> Senthil Kumaran added the comment: I meant, "I did some research, but couldn't come away conclusively". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 11:44:42 2021 From: report at bugs.python.org (RhinosF1) Date: Wed, 10 Feb 2021 16:44:42 +0000 Subject: [issue42744] pkg_resources seems to treat python 3.10 as python 3.1 In-Reply-To: <1608924920.91.0.314661686668.issue42744@roundup.psfhosted.org> Message-ID: <1612975482.21.0.997616058231.issue42744@roundup.psfhosted.org> RhinosF1 added the comment: Adding log before it gets cleaned up as too old. 2020-12-25T17:42:03.0730305Z Traceback (most recent call last): 2020-12-25T17:42:03.0733282Z File "/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py", line 584, in _build_master 2020-12-25T17:42:03.0736279Z ws.require(__requires__) 2020-12-25T17:42:03.0737901Z File "/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py", line 901, in require 2020-12-25T17:42:03.0739330Z needed = self.resolve(parse_requirements(requirements)) 2020-12-25T17:42:03.0742242Z File "/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py", line 792, in resolve 2020-12-25T17:42:03.0744366Z raise VersionConflict(dist, req).with_context(dependent_req) 2020-12-25T17:42:03.0747963Z pkg_resources.ContextualVersionConflict: (geoip2 4.1.0 (/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages), Requirement.parse('geoip2<3.0'), {'sopel'}) 2020-12-25T17:42:03.0754140Z 2020-12-25T17:42:03.0754883Z During handling of the above exception, another exception occurred: 2020-12-25T17:42:03.0755487Z 2020-12-25T17:42:03.0756004Z Traceback (most recent call last): 2020-12-25T17:42:03.0757250Z File "/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/bin/sopel", line 6, in 2020-12-25T17:42:03.0758216Z from pkg_resources import load_entry_point 2020-12-25T17:42:03.0759775Z File "/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3262, in 2020-12-25T17:42:03.0760984Z def _initialize_master_working_set(): 2020-12-25T17:42:03.0762804Z File "/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3245, in _call_aside 2020-12-25T17:42:03.0763832Z f(*args, **kwargs) 2020-12-25T17:42:03.0765396Z File "/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3274, in _initialize_master_working_set 2020-12-25T17:42:03.0766668Z working_set = WorkingSet._build_master() 2020-12-25T17:42:03.0768222Z File "/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py", line 586, in _build_master 2020-12-25T17:42:03.0769460Z return cls._build_from_requirements(__requires__) 2020-12-25T17:42:03.0771154Z File "/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py", line 599, in _build_from_requirements 2020-12-25T17:42:03.0772389Z dists = ws.resolve(reqs, Environment()) 2020-12-25T17:42:03.0773911Z File "/opt/hostedtoolcache/Python/3.10.0-alpha.3/x64/lib/python3.10/site-packages/pkg_resources/__init__.py", line 787, in resolve 2020-12-25T17:42:03.0775227Z raise DistributionNotFound(req, requirers) 2020-12-25T17:42:03.0776843Z pkg_resources.DistributionNotFound: The 'geoip2<3.0' distribution was not found and is required by sopel 2020-12-25T17:42:03.0924206Z ##[error]Process completed with exit code 1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 11:50:25 2021 From: report at bugs.python.org (RhinosF1) Date: Wed, 10 Feb 2021 16:50:25 +0000 Subject: [issue42744] pkg_resources seems to treat python 3.10 as python 3.1 In-Reply-To: <1608924920.91.0.314661686668.issue42744@roundup.psfhosted.org> Message-ID: <1612975825.7.0.790392938222.issue42744@roundup.psfhosted.org> RhinosF1 added the comment: Can't seem to reproduce on alpha 5. https://github.com/MirahezeBots/MirahezeBots/pull/431/checks?check_run_id=1873007567 https://github.com/python/cpython/compare/v3.10.0a3...v3.10.0a5 doesn't load for me so not sure when it was fixed. ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 11:51:48 2021 From: report at bugs.python.org (RhinosF1) Date: Wed, 10 Feb 2021 16:51:48 +0000 Subject: [issue42744] pkg_resources seems to treat python 3.10 as python 3.1 In-Reply-To: <1608924920.91.0.314661686668.issue42744@roundup.psfhosted.org> Message-ID: <1612975908.61.0.578700859656.issue42744@roundup.psfhosted.org> Change by RhinosF1 : ---------- type: compile error -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 12:00:30 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Wed, 10 Feb 2021 17:00:30 +0000 Subject: [issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file In-Reply-To: <1612348984.98.0.934369937347.issue43113@roundup.psfhosted.org> Message-ID: <1612976430.91.0.0656772134567.issue43113@roundup.psfhosted.org> Miro Hron?ok added the comment: Note that ENOENT is ambiguous, but the exception message is very specific about what file is not found. And it is not always correct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 12:06:40 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 10 Feb 2021 17:06:40 +0000 Subject: [issue42744] pkg_resources seems to treat python 3.10 as python 3.1 In-Reply-To: <1608924920.91.0.314661686668.issue42744@roundup.psfhosted.org> Message-ID: <1612976800.25.0.433265011011.issue42744@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: setuptools and pip were upgraded in alpha 5 which could have fixed this : https://github.com/python/cpython/commit/4d11ecbb5ed78e6259ee27289c7638aad795f473 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 12:17:26 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 10 Feb 2021 17:17:26 +0000 Subject: [issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file In-Reply-To: <1612348984.98.0.934369937347.issue43113@roundup.psfhosted.org> Message-ID: <1612977446.18.0.687940337758.issue43113@roundup.psfhosted.org> Eric V. Smith added the comment: I agree with @hroncok, and maybe we could tweak the message to say FileNotFoundError: [Errno 2] No such file or directory: while executing './demo'. Maybe bad shebang, or missing file? Or something to that effect. I realize that listing all possible error reasons is a fool's errand, and there are cases where it might make things more confusing. This reminds me of the old MS-DOS errors like "A duplicate file name exists, or the file cannot be found": as a user, I always wanted to scream "you know which one, tell me!". Sadly, you can't always get the OS to give you the info. Which is also like Windows "can't load DLL" errors: which one?! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 12:22:42 2021 From: report at bugs.python.org (RhinosF1) Date: Wed, 10 Feb 2021 17:22:42 +0000 Subject: [issue42744] pkg_resources seems to treat python 3.10 as python 3.1 In-Reply-To: <1608924920.91.0.314661686668.issue42744@roundup.psfhosted.org> Message-ID: <1612977762.7.0.183034389197.issue42744@roundup.psfhosted.org> RhinosF1 added the comment: Thanks. Very likely! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 12:30:09 2021 From: report at bugs.python.org (Julien Palard) Date: Wed, 10 Feb 2021 17:30:09 +0000 Subject: [issue29249] Pathlib glob ** bug In-Reply-To: <1484216394.04.0.57434547579.issue29249@psf.upfronthosting.co.za> Message-ID: <1612978209.64.0.945351776936.issue29249@roundup.psfhosted.org> Julien Palard added the comment: I'm +1 on adding ** to match. My first bet would be to add it to match, not adding a new method, nor a flag, as it should not break compatibility: It would only break iif someone have a `**` in a match AND does *not* expect it to be recursive (as it would continue to match the previous files, it may just match more). Would this break something I did not foresee? ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 12:34:57 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 10 Feb 2021 17:34:57 +0000 Subject: [issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py In-Reply-To: <1612626856.83.0.902540623753.issue43146@roundup.psfhosted.org> Message-ID: <1612978497.04.0.172969355319.issue43146@roundup.psfhosted.org> Irit Katriel added the comment: Marking as blocker because these are 3.10 regressions. ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 12:52:30 2021 From: report at bugs.python.org (Natanael Copa) Date: Wed, 10 Feb 2021 17:52:30 +0000 Subject: [issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc In-Reply-To: <1612344373.45.0.663786135841.issue43112@roundup.psfhosted.org> Message-ID: <1612979550.86.0.182111636672.issue43112@roundup.psfhosted.org> Change by Natanael Copa : ---------- keywords: +patch pull_requests: +23292 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24502 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 13:09:55 2021 From: report at bugs.python.org (Natanael Copa) Date: Wed, 10 Feb 2021 18:09:55 +0000 Subject: [issue43112] SOABI on Linux does not distinguish between GNU libc and musl libc In-Reply-To: <1612344373.45.0.663786135841.issue43112@roundup.psfhosted.org> Message-ID: <1612980595.54.0.712573993445.issue43112@roundup.psfhosted.org> Natanael Copa added the comment: I created a PR for this https://github.com/python/cpython/pull/24502 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 13:16:24 2021 From: report at bugs.python.org (Alexey Izbyshev) Date: Wed, 10 Feb 2021 18:16:24 +0000 Subject: [issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file In-Reply-To: <1612348984.98.0.934369937347.issue43113@roundup.psfhosted.org> Message-ID: <1612980984.3.0.109262200813.issue43113@roundup.psfhosted.org> Alexey Izbyshev added the comment: I generally agree, but getting a good, short error message seems to be the hard part here. I previously complained[1] about the following proposal by @hroncok: FileNotFoundError: [Errno 2] No such file or directory: Either './demo' or the interpreter of './demo' not found. But may be it's just me. Does anybody else feel that mentioning "the interpreter" is this way could be confusing in prevalent cases when the actual problem is missing './demo' itself? If we can come up with a good message, I can look into turning it into a PR. The error message above also reads to me like there are no other possible reasons of ENOENT. On Linux, binfmt_misc[2] provides a way to run arbitrary code on execve(). This is used, for example, to transparently run binaries for foreign arches via qemu-user, so probably ENOENT would be returned if QEMU itself it missing. QEMU *may* be thought as a kind of interpreter here, though it's completely unrelated to a hash-bang or an ELF interpreter. But I don't know about other POSIX platforms. As a theoretical example, if the dynamic library loader is implemented in the kernel, the system call could return ENOENT in case of a missing library. Do we need to worry about it? Does anybody know about the situation on macOS, where posix_spawn() is a system call too? [1] https://bugs.python.org/issue43113#msg386210 [2] https://en.wikipedia.org/wiki/Binfmt_misc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 14:14:39 2021 From: report at bugs.python.org (Clint Olsen) Date: Wed, 10 Feb 2021 19:14:39 +0000 Subject: [issue43192] Argparse complains argument required when default is provided In-Reply-To: <1612952677.32.0.0422896967903.issue43192@roundup.psfhosted.org> Message-ID: <1612984479.19.0.277075261473.issue43192@roundup.psfhosted.org> Clint Olsen added the comment: Do you think it's unreasonable/unintuitive to infer nargs from the default value? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 14:16:19 2021 From: report at bugs.python.org (Barry Alan Scott) Date: Wed, 10 Feb 2021 19:16:19 +0000 Subject: [issue43155] PyCMethod_New not defined in python3.lib In-Reply-To: <1612721158.76.0.287250699598.issue43155@roundup.psfhosted.org> Message-ID: <1612984579.33.0.595904742562.issue43155@roundup.psfhosted.org> Barry Alan Scott added the comment: Is there a test suite that checks that the limited API functions can all be linked against? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 14:19:01 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 10 Feb 2021 19:19:01 +0000 Subject: [issue43192] Argparse complains argument required when default is provided In-Reply-To: <1612952677.32.0.0422896967903.issue43192@roundup.psfhosted.org> Message-ID: <1612984741.33.0.748945972553.issue43192@roundup.psfhosted.org> Eric V. Smith added the comment: Would you infer it to be ??? or ?*?? I?m not completely opposed, but I haven?t thought it through or looked at the code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 14:30:28 2021 From: report at bugs.python.org (Clint Olsen) Date: Wed, 10 Feb 2021 19:30:28 +0000 Subject: [issue43192] Argparse complains argument required when default is provided In-Reply-To: <1612952677.32.0.0422896967903.issue43192@roundup.psfhosted.org> Message-ID: <1612985428.46.0.568256403488.issue43192@roundup.psfhosted.org> Clint Olsen added the comment: I think your original suggestion makes sense: '?' My intuition is that nargs helps argparse discern whether it's dealing with single or multiple values. That may not be what was intended. There probably shouldn't be multiple ways of indicating an argument is optional. It seems that required= and nargs='?'|'*' combinations could lead to conflicting requirements. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 14:31:09 2021 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 10 Feb 2021 19:31:09 +0000 Subject: [issue43191] Shared Memory for array of object In-Reply-To: <1612952024.75.0.333597228356.issue43191@roundup.psfhosted.org> Message-ID: <1612985469.18.0.177118690648.issue43191@roundup.psfhosted.org> Eric V. Smith added the comment: If you could demonstrate the problem without numpy, then we could probably help you here. I don't know much about numpy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 15:05:35 2021 From: report at bugs.python.org (Christoph Reiter) Date: Wed, 10 Feb 2021 20:05:35 +0000 Subject: [issue43195] Same userbase for 32bit and 64bit install on Windows causing conflicts Message-ID: <1612987535.89.0.745521676506.issue43195@roundup.psfhosted.org> New submission from Christoph Reiter : I'm sure this is already filed somewhere, but I couldn't find anything. Currently when installing packages with pip using a 64bit Python to --user and then starting a 32bit Python things fail because they look up packages from the same location: .\python.exe -m site --user-base C:\Users\user\AppData\Roaming\Python For example trying to import numpy from a 32bit Python when it was installed with 64bit: >>> import numpy Traceback (most recent call last): File "", line 1, in File "C:\Users\user\AppData\Roaming\Python\Python39\site-packages\numpy\__init__.py", line 143, in from . import _distributor_init File "C:\Users\user\AppData\Roaming\Python\Python39\site-packages\numpy\_distributor_init.py", line 26, in WinDLL(os.path.abspath(filename)) File "C:\Python39-32\lib\ctypes\__init__.py", line 374, in __init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 193] %1 is not a valid Win32 application I guess this isn't a very common problem, but in MSYS2 we are facing this issue because users can easily switch between 32bit/64bit Python. We could patch things, but I'm wondering if there are any plans to fix this in CPython itself so we don't invent our own thing. thanks ---------- components: Windows messages: 386804 nosy: lazka, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Same userbase for 32bit and 64bit install on Windows causing conflicts versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 15:45:36 2021 From: report at bugs.python.org (Ellis Percival) Date: Wed, 10 Feb 2021 20:45:36 +0000 Subject: [issue43196] logging.config.dictConfig shuts down socket for existing SysLogHandlers Message-ID: <1612989936.74.0.764522656943.issue43196@roundup.psfhosted.org> New submission from Ellis Percival : Since https://github.com/python/cpython/commit/b6c1989168efeb8b6320bec958e7e339270ac0ce dictConfig (and presumably fileConfig) has called logging.shutdown() on the existing handlers. This causes existing SysLogHandlers' sockets to be closed, which then causes a BadFileDescriptor error when you try to use it: --- Logging error --- Traceback (most recent call last): File "/usr/lib/python3.8/logging/handlers.py", line 940, in emit self.socket.sendto(msg, self.address) OSError: [Errno 9] Bad file descriptor Call stack: File "/home/flyte/workspaces/python/test.py", line 18, in log.warning("Breaks") Reproduce the error with the following code: import logging.config import socket from logging.handlers import SysLogHandler log = logging.getLogger("logtest") syslog_handler = SysLogHandler(("127.0.0.1", 12345), socktype=socket.SOCK_DGRAM) log.addHandler(syslog_handler) log.warning("Works") logging.config.dictConfig( { "version": 1, "disable_existing_loggers": False, } ) log.warning("Breaks") This causes issues such as https://github.com/benoitc/gunicorn/issues/2073 where gunicorn sets up a SysLogHandler, then when any app (Django does it by default) calls dictConfig() it closes the socket used by gunicorn's SysLogHandler. Assuming this also affects Python 3.9 and 3.10, but untested. ---------- components: Library (Lib) messages: 386805 nosy: flyte priority: normal severity: normal status: open title: logging.config.dictConfig shuts down socket for existing SysLogHandlers type: crash versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 15:54:17 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 10 Feb 2021 20:54:17 +0000 Subject: [issue40956] Use Argument Clinic in sqlite3 In-Reply-To: <1591956335.72.0.553737405887.issue40956@roundup.psfhosted.org> Message-ID: <1612990457.8.0.966363903215.issue40956@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +23293 pull_request: https://github.com/python/cpython/pull/24503 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 16:07:23 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 10 Feb 2021 21:07:23 +0000 Subject: [issue43094] sqlite3 signature discrepancies between documentation and implementation In-Reply-To: <1612210210.19.0.0751315887137.issue43094@roundup.psfhosted.org> Message-ID: <1612991243.27.0.0516431528935.issue43094@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: sqlite3.Connection.set_progress_handler() docs: set_progress_handler(handler, n) impl: set_progress_handler(progress_handler, n) Apart from that, the rest of sqlite3.Connection seems to be ok. There's an ongoing discussion at python-dev about how to resolve this issue. I'm in favour of normalising the create_*() methods to be positional only (like create_collation() is now). sqlite3.Cursor and sqlite3.Row methods seems to be ok as well. ---------- title: Update sqlite3 docs and docstrings to reflect implementation -> sqlite3 signature discrepancies between documentation and implementation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 16:14:22 2021 From: report at bugs.python.org (Pablo) Date: Wed, 10 Feb 2021 21:14:22 +0000 Subject: [issue43197] random.shuffle() returning None Message-ID: <1612991662.12.0.189430879843.issue43197@roundup.psfhosted.org> New submission from Pablo : import random mylist = ["apple", "banana", "cherry"] print(random.shuffle(mylist)) Result: None Expected result: A shuffle list It works in Python 3.7.3 but it fails in Python 3.8.5 (Ubuntu 20.04.2) ---------- messages: 386807 nosy: pablonana priority: normal severity: normal status: open title: random.shuffle() returning None type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 16:15:37 2021 From: report at bugs.python.org (Pablo) Date: Wed, 10 Feb 2021 21:15:37 +0000 Subject: [issue43197] random.shuffle() returning None In-Reply-To: <1612991662.12.0.189430879843.issue43197@roundup.psfhosted.org> Message-ID: <1612991737.39.0.659228101575.issue43197@roundup.psfhosted.org> Pablo added the comment: ``` import random mylist = ["apple", "banana", "cherry"] print(random.shuffle(mylist)) ``` Result: None Expected result: A shuffled list It works in Python 3.7.3 but it fails in Python 3.8.5 (Ubuntu 20.04.2) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 16:22:40 2021 From: report at bugs.python.org (Pablo) Date: Wed, 10 Feb 2021 21:22:40 +0000 Subject: [issue43197] random.shuffle() returning None In-Reply-To: <1612991662.12.0.189430879843.issue43197@roundup.psfhosted.org> Message-ID: <1612992160.55.0.989611899792.issue43197@roundup.psfhosted.org> Pablo added the comment: random shuffle is supposed to change the list in place. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 16:37:12 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 10 Feb 2021 21:37:12 +0000 Subject: [issue43178] Redundant method overrides in queue In-Reply-To: <1612860030.43.0.826526861331.issue43178@roundup.psfhosted.org> Message-ID: <1612993032.92.0.996499380965.issue43178@roundup.psfhosted.org> Raymond Hettinger added the comment: I prefer to keep the code as-is. It is microscopically faster than than just inheriting the methods, but more importantly it makes it easier to read the code and know that it is correct. We're instructing people to override all four methods when subclassing and we don't make any promises about how the parent method is implemented. At this point, the implementations happen to be the same, but that isn't guaranteed. We could at some point change the implementation of the parent class method and wouldn't want the subclasses to break. So, let's keep the loose coupling, the self-contained code that follows the rules, code that is slightly faster, and code that is easy to read. Thank you for the suggestion, but this micro-factoring doesn't make us better off. ---------- nosy: +rhettinger resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 16:44:32 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 10 Feb 2021 21:44:32 +0000 Subject: [issue43188] multiple operations of dict causes core dump of Python interpreter. In-Reply-To: <1612950261.11.0.487883893903.issue43188@roundup.psfhosted.org> Message-ID: <1612993472.48.0.329365822712.issue43188@roundup.psfhosted.org> Raymond Hettinger added the comment: I can confirm this crashes. ---------- nosy: +methane, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 16:51:08 2021 From: report at bugs.python.org (Inada Naoki) Date: Wed, 10 Feb 2021 21:51:08 +0000 Subject: [issue43188] multiple operations of dict causes core dump of Python interpreter. In-Reply-To: <1612950261.11.0.487883893903.issue43188@roundup.psfhosted.org> Message-ID: <1612993868.73.0.830426253456.issue43188@roundup.psfhosted.org> Inada Naoki added the comment: Is this the crash you are reporting? ``` Exception ignored in: .Mutating.__del__ at 0x100d35af0> Traceback (most recent call last): File "/Users/methane/work/python/cpython/PC/xxx.py", line 5, in __del__ mutate(d) TypeError: 'str' object is not callable Exception ignored in: .Mutating.__del__ at 0x100d35c10> Traceback (most recent call last): File "/Users/methane/work/python/cpython/PC/xxx.py", line 5, in __del__ Fatal Python error: _Py_CheckRecursiveCall: Cannot recover from stack overflow. Python runtime state: initialized Current thread 0x000000010072bd40 (most recent call first): File "/Users/methane/work/python/cpython/xxx.py", line 9 in check_reentrant_insertion File "/Users/methane/work/python/cpython/xxx.py", line 13 in test_reentrant_insertion File "/Users/methane/work/python/cpython/xxx.py", line 18 in test_reentrant_insertion ... ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 17:27:29 2021 From: report at bugs.python.org (Berker Peksag) Date: Wed, 10 Feb 2021 22:27:29 +0000 Subject: [issue43094] sqlite3 signature discrepancies between documentation and implementation In-Reply-To: <1612210210.19.0.0751315887137.issue43094@roundup.psfhosted.org> Message-ID: <1612996049.79.0.878647592404.issue43094@roundup.psfhosted.org> Berker Peksag added the comment: The problem is that sqlite3 isn't the only module where there are discrepancies between documentation and implementation. If we are going to change public sqlite3 APIs in to be positional-only, I'd prefer writing a PEP and fix all modules once and for all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 18:04:26 2021 From: report at bugs.python.org (Berker Peksag) Date: Wed, 10 Feb 2021 23:04:26 +0000 Subject: [issue40956] Use Argument Clinic in sqlite3 In-Reply-To: <1591956335.72.0.553737405887.issue40956@roundup.psfhosted.org> Message-ID: <1612998266.11.0.755632118949.issue40956@roundup.psfhosted.org> Berker Peksag added the comment: New changeset ea46579067fd2d4e164d6605719ffec690c4d621 by Erlend Egeberg Aasland in branch 'master': bpo-40956: Fix segfault when Connection.backup is called without target (GH-24503) https://github.com/python/cpython/commit/ea46579067fd2d4e164d6605719ffec690c4d621 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 19:15:07 2021 From: report at bugs.python.org (Eric Martin) Date: Thu, 11 Feb 2021 00:15:07 +0000 Subject: [issue43198] Operations on sets more than hundred times less efficient with python3.9 than with previous versions Message-ID: <1613002507.49.0.48232719319.issue43198@roundup.psfhosted.org> New submission from Eric Martin : Run on a MacBook Pro (15-inch, 2019) 2.3 GHz 8-Core Intel Core i9 16 GB 2400 MHz DDR4 Python 3.8.7 (default, Dec 24 2020, 19:07:18) [Clang 12.0.0 (clang-1200.0.32.27)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from timeit import timeit >>> S = set(range(10_000)) >>> timeit('S.remove(5000); S.add(5000)', globals=globals(), number=100_000) 0.01933291699999984 $ python3.9 Python 3.9.1 (default, Dec 8 2020, 13:10:53) [Clang 12.0.0 (clang-1200.0.32.27)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from timeit import timeit >>> S = set(range(10_000)) >>> timeit('S.remove(5000); S.add(5000)', globals=globals(), number=100_000) 3.8517225489999998 ---------- components: Interpreter Core messages: 386815 nosy: eamartin priority: normal severity: normal status: open title: Operations on sets more than hundred times less efficient with python3.9 than with previous versions type: performance versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 19:31:49 2021 From: report at bugs.python.org (Zachary Ware) Date: Thu, 11 Feb 2021 00:31:49 +0000 Subject: [issue43198] Operations on sets more than hundred times less efficient with python3.9 than with previous versions In-Reply-To: <1613002507.49.0.48232719319.issue43198@roundup.psfhosted.org> Message-ID: <1613003509.73.0.456648849683.issue43198@roundup.psfhosted.org> Zachary Ware added the comment: Can reproduce on Linux: $ for python in /usr/bin/python3.? /usr/local/bin/python3.? do $python -VV $python -m timeit -r 10 -n 100_000 -u usec -s 'S = set(range(10_000))' 'S.remove(5000);S.add(5000)' done Python 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0] 100000 loops, best of 10: 0.0831 usec per loop Python 3.6.11 (tags/v3.6.11:d56cd4006a, Jul 1 2020, 10:47:06) [GCC 9.3.0] 100000 loops, best of 10: 0.0968 usec per loop Python 3.7.9 (tags/v3.7.9:13c94747c7, Oct 19 2020, 23:50:03) [GCC 9.3.0] 100000 loops, best of 10: 0.0935 usec per loop Python 3.9.0 (tags/v3.9.0:9cf6752276, Nov 14 2020, 15:41:20) [GCC 9.3.0] 100000 loops, best of 10: 50.2 usec per loop ---------- nosy: +rhettinger, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 22:27:04 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Thu, 11 Feb 2021 03:27:04 +0000 Subject: [issue43198] Operations on sets more than hundred times less efficient with python3.9 than with previous versions In-Reply-To: <1613002507.49.0.48232719319.issue43198@roundup.psfhosted.org> Message-ID: <1613014024.96.0.483758756934.issue43198@roundup.psfhosted.org> Dennis Sweeney added the comment: I bisected the change to here: https://github.com/python/cpython/pull/19881 commit 3dd2157febae5087ca3333d24f69b6de9cbd13cd Author: Raymond Hettinger Date: Sun May 3 04:51:05 2020 -0700 Simplify set entry insertion logic. (GH-19881) """Dictionaries no longer reuse dummy entries. Instead, dummies accumulate until cleared by resizes. That is a good strategy because it tightens the inner search loop and it makes the code cleaner. Here, we do the same thing for sets""" It looks like this was a deliberate change to speed up lookups, but it also looks like it adversely affected this case. With dictionaries, mutation typically occurs as setting a different value for the same key---no dummy entries get created, so dummy entries are less common. But with sets, mutation can only come from adding/discarding, so maybe this optimization is less worthwhile for sets. ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 10 22:58:20 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 11 Feb 2021 03:58:20 +0000 Subject: [issue43195] Same userbase for 32bit and 64bit install on Windows causing conflicts In-Reply-To: <1612987535.89.0.745521676506.issue43195@roundup.psfhosted.org> Message-ID: <1613015900.08.0.515400308146.issue43195@roundup.psfhosted.org> Eryk Sun added the comment: The conflict between 32-bit and 64-bit user site-packages was resolved in issue 41627, starting with Python 3.10. It's not practical to backport this change to existing 3.9 installations. The "nt_user" install scheme was changed to use the config variable "py_version_nodot_plat". For example: >>> sysconfig.get_path('purelib', 'nt_user', expand=False) '{userbase}/Python{py_version_nodot_plat}/site-packages' This variable is based on sys.winver (i.e. the version number of the Python DLL), which includes a "-32" suffix in 32-bit Python. For example: >>> sys.winver '3.10-32' >>> sysconfig.get_config_var('py_version_nodot_plat') '310-32' ---------- nosy: +eryksun resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Relocate user site packages on Windows 32-bit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 00:40:22 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Feb 2021 05:40:22 +0000 Subject: [issue43198] Operations on sets more than hundred times less efficient with python3.9 than with previous versions In-Reply-To: <1613002507.49.0.48232719319.issue43198@roundup.psfhosted.org> Message-ID: <1613022022.13.0.947826571002.issue43198@roundup.psfhosted.org> Raymond Hettinger added the comment: This only affects the contrived case of adding and removing exactly the same element in a tight loop, when the set is large. Optimizing that one corner case came at the expense of all other cases. The code is now simpler and slightly faster than before. This is also what we do for dictionaries. $ python3.8 -m timeit -r 11 -s 's=set(range(10_000))' 'for i in range(10_000): (s.discard(i), s.add(10_000 - i))' 200 loops, best of 11: 1.72 msec per loop $ python3.9 -m timeit -r 11 -s 's=set(range(10_000))' 'for i in range(10_000): (s.discard(i), s.add(10_000 - i))' 200 loops, best of 11: 1.09 msec per loop Thank you for the report, but this was an intended change. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 02:53:47 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Feb 2021 07:53:47 +0000 Subject: [issue43001] python3.9.1 test_embed test_tabnanny failed In-Reply-To: <1611315338.64.0.350030617212.issue43001@roundup.psfhosted.org> Message-ID: <1613030027.26.0.952191473639.issue43001@roundup.psfhosted.org> STINNER Victor added the comment: Try to run directly the two failing tests in verbose mode, copy/paste the output into a file and attach the file here: python -m test test_embed test_tabnanny -v ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 02:56:35 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Feb 2021 07:56:35 +0000 Subject: [issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file In-Reply-To: <1612348984.98.0.934369937347.issue43113@roundup.psfhosted.org> Message-ID: <1613030195.36.0.382798951399.issue43113@roundup.psfhosted.org> STINNER Victor added the comment: > Note that ENOENT is ambiguous, but the exception message is very specific about what file is not found. And it is not always correct. If you want to be extra nice, you can try to check if the file exists. If it exists, add a message about the shebang. The problem is that the code to generate the exception is quite generic, it creates an OSError exception object from an errno (int) and a filename (str). It's not trivial to change the exception message. Is it worth it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 03:00:16 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Feb 2021 08:00:16 +0000 Subject: =?utf-8?q?=5Bissue43181=5D_Python_macros_don=E2=80=99t_shield_arguments?= In-Reply-To: <1612908350.59.0.954965139249.issue43181@roundup.psfhosted.org> Message-ID: <1613030416.54.0.629322957218.issue43181@roundup.psfhosted.org> STINNER Victor added the comment: I'm replacing macros with static inline functions to avoid issues like this one (ex: bpo-35059). Are you interested to convert the PyObject_TypeCheck() macro to a static inline function? """ There is a lot of macros like: #define PyObject_TypeCheck(ob, tp) \ (Py_IS_TYPE(ob, tp) || PyType_IsSubtype(Py_TYPE(ob), (tp))) These work fine until an argument happen to contain a comma. """ This macro also has a common bug of macros: if one argument has a side effect, it is executed twice! For example, if an argument is a function call, the function is called twice. See: * https://gcc.gnu.org/onlinedocs/cpp/Macro-Pitfalls.html * https://vstinner.github.io/split-include-directory-python38.html "Convert macros to static inline functions" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 03:02:06 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Feb 2021 08:02:06 +0000 Subject: [issue27640] Add --disable-test-modules configure option to not build nor install tests In-Reply-To: <1469700317.99.0.84265252625.issue27640@psf.upfronthosting.co.za> Message-ID: <1613030526.77.0.351771660208.issue27640@roundup.psfhosted.org> STINNER Victor added the comment: > It would be more convenient if we had a Makefile option to install the tests separately. While this use case is tighly coupled to this feature, would you mind to open a separate issue for your use case? IMO it makes sense and it sounds easy to implement it (especially after --disable-test-modules feature has been implemented). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 03:08:25 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Thu, 11 Feb 2021 08:08:25 +0000 Subject: [issue43113] os.posix_spawn errors with wrong information when shebang points to not-existing file In-Reply-To: <1612348984.98.0.934369937347.issue43113@roundup.psfhosted.org> Message-ID: <1613030905.85.0.429813754192.issue43113@roundup.psfhosted.org> Miro Hron?ok added the comment: At the very least, it's worth documenting in all places that can give you the exception, such as subprocess etc. Whether it's worth to try to fix the exception message I don't really know. Confused users on one side, fragile complex heuristic on the other. Honestly, I think it is worth it to at least try to brainstorm how to improve the message without making it needlessly complicated. I've attempted that with: Either demo or interpreter of demo. It's not perfect and maybe another file is missing. So let's go further: FileNotFoundError: [Errno 2] No such file or directory while attempting to execute './demo'. This means './demo' or other files needed to run it don't exist. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 03:48:06 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 11 Feb 2021 08:48:06 +0000 Subject: =?utf-8?q?=5Bissue43181=5D_Python_macros_don=E2=80=99t_shield_arguments?= In-Reply-To: <1612908350.59.0.954965139249.issue43181@roundup.psfhosted.org> Message-ID: <1613033286.51.0.236596644131.issue43181@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 04:44:53 2021 From: report at bugs.python.org (=?utf-8?q?Mikael_L=C3=B6vqvist?=) Date: Thu, 11 Feb 2021 09:44:53 +0000 Subject: [issue43199] FAQ about goto lacks answer Message-ID: <1613036693.06.0.0717598867229.issue43199@roundup.psfhosted.org> New submission from Mikael L?vqvist : In the FAQ there is a question "Why is there no goto?" but the answer addresses how to use exceptions to do something akin to goto. I think the documentation could benefit from the reasons why there is no goto or that the question is changed, perhaps "How to approximate goto?". Reference: https://docs.python.org/3/faq/design.html#why-is-there-no-goto ---------- assignee: docs at python components: Documentation messages: 386825 nosy: docs at python, mlovqvist priority: normal severity: normal status: open title: FAQ about goto lacks answer type: enhancement versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 05:17:16 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 11 Feb 2021 10:17:16 +0000 Subject: [issue43094] sqlite3 signature discrepancies between documentation and implementation In-Reply-To: <1612210210.19.0.0751315887137.issue43094@roundup.psfhosted.org> Message-ID: <1613038636.19.0.799247086875.issue43094@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: > If we are going to change public sqlite3 APIs in to be positional-only, I'd prefer writing a PEP and fix all modules once and for all. Right. I assume you mean that such a PEP would contain a set of guidelines for how to handle these dilemmas? It would be almost impossible to create a set of strict rules that can handle all cases, AFAICS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 05:38:00 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Feb 2021 10:38:00 +0000 Subject: [issue43154] code.InteractiveConsole can crash if sys.excepthook is broken In-Reply-To: <1612715190.56.0.748623074825.issue43154@roundup.psfhosted.org> Message-ID: <1613039880.43.0.763002581246.issue43154@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 05:41:10 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 11 Feb 2021 10:41:10 +0000 Subject: =?utf-8?q?=5Bissue43181=5D_Python_macros_don=E2=80=99t_shield_arguments?= In-Reply-To: <1612908350.59.0.954965139249.issue43181@roundup.psfhosted.org> Message-ID: <1613040070.59.0.335128752238.issue43181@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: > Are you interested to convert the PyObject_TypeCheck() macro to a static inline function? I'd like to give it a shot if it's ok for you all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 06:21:32 2021 From: report at bugs.python.org (nikkie) Date: Thu, 11 Feb 2021 11:21:32 +0000 Subject: [issue43200] link to copy module in shutil document, not to shutil.copy Message-ID: <1613042492.32.0.484655059288.issue43200@roundup.psfhosted.org> New submission from nikkie : "copy()" is not a link to shutil.copy, but a link to the copy module. https://docs.python.org/3/library/shutil.html#platform-dependent-efficient-copy-operations >Starting from Python 3.8 all functions involving a file copy (copyfile(), copy(), copy2(), copytree(), and move()) may use ... # As is https://docs.python.org/3/library/copy.html#module-copy # To be https://docs.python.org/3/library/shutil.html#shutil.copy The reference of :func:`copy` does not seem to be resolved properly. https://github.com/python/cpython/blob/ea46579067fd2d4e164d6605719ffec690c4d621/Doc/library/shutil.rst#platform-dependent-efficient-copy-operations ---------- assignee: docs at python components: Documentation messages: 386828 nosy: docs at python, nikkie priority: normal severity: normal status: open title: link to copy module in shutil document, not to shutil.copy versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 07:15:17 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 11 Feb 2021 12:15:17 +0000 Subject: [issue43200] link to copy module in shutil document, not to shutil.copy In-Reply-To: <1613042492.32.0.484655059288.issue43200@roundup.psfhosted.org> Message-ID: <1613045717.13.0.152973227444.issue43200@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch nosy: +erlendaasland nosy_count: 2.0 -> 3.0 pull_requests: +23294 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24504 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 07:15:42 2021 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 11 Feb 2021 12:15:42 +0000 Subject: [issue43200] link to copy module in shutil document, not to shutil.copy In-Reply-To: <1613042492.32.0.484655059288.issue43200@roundup.psfhosted.org> Message-ID: <1613045742.42.0.251867714678.issue43200@roundup.psfhosted.org> Change by Zackery Spytz : ---------- nosy: +ZackerySpytz nosy_count: 3.0 -> 4.0 pull_requests: +23295 pull_request: https://github.com/python/cpython/pull/24505 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 09:02:21 2021 From: report at bugs.python.org (Jason Madden) Date: Thu, 11 Feb 2021 14:02:21 +0000 Subject: [issue43196] logging.config.dictConfig shuts down socket for existing SysLogHandlers In-Reply-To: <1612989936.74.0.764522656943.issue43196@roundup.psfhosted.org> Message-ID: <1613052141.38.0.87566670442.issue43196@roundup.psfhosted.org> Change by Jason Madden : ---------- nosy: +jmadden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 09:06:15 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Thu, 11 Feb 2021 14:06:15 +0000 Subject: [issue43196] logging.config.dictConfig shuts down socket for existing SysLogHandlers In-Reply-To: <1612989936.74.0.764522656943.issue43196@roundup.psfhosted.org> Message-ID: <1613052375.01.0.663393196729.issue43196@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +vinay.sajip, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 10:43:59 2021 From: report at bugs.python.org (Christoph Reiter) Date: Thu, 11 Feb 2021 15:43:59 +0000 Subject: [issue43195] Same userbase for 32bit and 64bit install on Windows causing conflicts In-Reply-To: <1612987535.89.0.745521676506.issue43195@roundup.psfhosted.org> Message-ID: <1613058239.48.0.00368434052627.issue43195@roundup.psfhosted.org> Christoph Reiter added the comment: Ah, wonderful. We'll do something similar then. Thanks for the info and the pointer to the resolved issue. Much appreciated! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 11:31:42 2021 From: report at bugs.python.org (Tony Martin Berbel) Date: Thu, 11 Feb 2021 16:31:42 +0000 Subject: [issue43001] python3.9.1 test_embed test_tabnanny failed In-Reply-To: <1612926382.41.0.74346135249.issue43001@roundup.psfhosted.org> Message-ID: Tony Martin Berbel added the comment: My system crashed completely. I reinstalled Ubuntu. Sorry I couldn't help more ... :( ___________________________________________ MARTIN BERBEL, Tony GSM: +32 (0) 477 / 33.12.48 ------------------------------ Le mer. 10 f?vr. 2021 ? 04:06, Tony Martin Berbel a ?crit : > > Tony Martin Berbel added the comment: > > I had the same error > I ran the make test command with >&log > But I don't know where to look for the log file > > ---------- > nosy: +wingarmac > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 13:24:57 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 11 Feb 2021 18:24:57 +0000 Subject: [issue43001] python3.9.1 test_embed test_tabnanny failed In-Reply-To: <1611315338.64.0.350030617212.issue43001@roundup.psfhosted.org> Message-ID: <1613067897.39.0.775348563609.issue43001@roundup.psfhosted.org> STINNER Victor added the comment: Ok, I close the issue. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 14:27:12 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Feb 2021 19:27:12 +0000 Subject: [issue43198] Operations on sets more than hundred times less efficient with python3.9 than with previous versions In-Reply-To: <1613002507.49.0.48232719319.issue43198@roundup.psfhosted.org> Message-ID: <1613071632.17.0.919184232603.issue43198@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 15:23:58 2021 From: report at bugs.python.org (Tyler Reed) Date: Thu, 11 Feb 2021 20:23:58 +0000 Subject: [issue43201] sqlite3 import * ImportError: DLL load failed while importing _sqlite3: The specified module could not be found. Message-ID: <1613075038.27.0.260449225949.issue43201@roundup.psfhosted.org> New submission from Tyler Reed : Running on a new, updated Windows 10 machine with no virtual environment. After removing all previous Python installations, rebooting and performing a fresh install if Python 3.9.1. I run the python console and type: import sqlite3 I receive the following error: Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 17:08:21) [MSC v.1927 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import sqlite3 Traceback (most recent call last): File "", line 1, in File "C:\Program Files\Python39\lib\sqlite3\__init__.py", line 23, in from sqlite3.dbapi2 import * File "C:\Program Files\Python39\lib\sqlite3\dbapi2.py", line 27, in from _sqlite3 import * ImportError: DLL load failed while importing _sqlite3: The specified module could not be found. I verified that the sqlite3.dll file does exist in C:\Program Files\Python39\DLLs ---------- messages: 386832 nosy: ZenSkunkworx priority: normal severity: normal status: open title: sqlite3 import * ImportError: DLL load failed while importing _sqlite3: The specified module could not be found. type: crash versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 15:30:58 2021 From: report at bugs.python.org (Zachary Ware) Date: Thu, 11 Feb 2021 20:30:58 +0000 Subject: [issue43201] sqlite3 import * ImportError: DLL load failed while importing _sqlite3: The specified module could not be found. In-Reply-To: <1613075038.27.0.260449225949.issue43201@roundup.psfhosted.org> Message-ID: <1613075458.12.0.422977955145.issue43201@roundup.psfhosted.org> Zachary Ware added the comment: That looks more like `_sqlite3.pyd` is missing. You're sure no changes have been to the installation directory? Does repairing the installation help at all? I imagine we would have been flooded with issue reports if the installer was missing this module, so without that it does seem that something fishy is going on in your particular case. ---------- components: +Installation, Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 15:49:39 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 11 Feb 2021 20:49:39 +0000 Subject: [issue43163] codeop prematurely raises on 2nd line when closer is needed In-Reply-To: <1612795567.03.0.987191957566.issue43163@roundup.psfhosted.org> Message-ID: <1613076579.47.0.40860470531.issue43163@roundup.psfhosted.org> Terry J. Reedy added the comment: This issue is for 3.10 only since the never-closed message was only added for 3.10.0a5 and not backported. Pablo, Is there any sane possibility that the compiler could, at least sometimes, raise an IncompleteSyntax subclass of SyntaxError when code is merely incomplete, as opposed to wrong? Do you happen to know where the REPL code is? (If not, I will ask elsewhere.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 15:55:17 2021 From: report at bugs.python.org (Tyler Reed) Date: Thu, 11 Feb 2021 20:55:17 +0000 Subject: [issue43201] sqlite3 import * ImportError: DLL load failed while importing _sqlite3: The specified module could not be found. In-Reply-To: <1613075038.27.0.260449225949.issue43201@roundup.psfhosted.org> Message-ID: <1613076917.36.0.632443623829.issue43201@roundup.psfhosted.org> Tyler Reed added the comment: It was an environment issue. There were pre-existing files (pyd and pyc) in the application folder (from builds done with Kivy) and apparently python was loading those instead of the libraries in the python39 folder. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 16:06:56 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 11 Feb 2021 21:06:56 +0000 Subject: [issue43202] Cleanup codeop._maybe_compile Message-ID: <1613077616.54.0.579438220954.issue43202@roundup.psfhosted.org> New submission from Terry J. Reedy : Following-up on discussion in #43163 and PR-24483, this issue is limited to changes that are expected to not affect the return value. Therefore, do not backport unless and until needed as part of a bugfix. First is moving the code return to immediately after it is successfully created. Everything done after is ignored and useless. This move makes the function return sooner and renders initialization of 'code' unnecessary. ---------- assignee: terry.reedy components: Library (Lib) messages: 386836 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: Cleanup codeop._maybe_compile type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 16:15:05 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 11 Feb 2021 21:15:05 +0000 Subject: [issue43202] Cleanup codeop._maybe_compile In-Reply-To: <1613077616.54.0.579438220954.issue43202@roundup.psfhosted.org> Message-ID: <1613078105.91.0.829936542446.issue43202@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +23296 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/24508 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 16:39:50 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 11 Feb 2021 21:39:50 +0000 Subject: [issue43163] codeop prematurely raises on 2nd line when closer is needed In-Reply-To: <1612795567.03.0.987191957566.issue43163@roundup.psfhosted.org> Message-ID: <1613079590.56.0.904684706182.issue43163@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: >Pablo, Is there any sane possibility that the compiler could, at least sometimes, raise an IncompleteSyntax subclass of SyntaxError when code is merely incomplete, as opposed to wrong? I'm assuming you mean the parser (when the compiler runs the code must have been correct or otherwise the parser would have raised before). In case of the parser, I'm not sure but the answer is generally no. The parser doesn't have a concept of "partial Syntax" so that should be defined. There is also the problem that some of these syntax error come from the tokenizer which has its own rules. We could probably do more in the tokenizer than in the parser but this would add considerable complexity in the general case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 17:51:34 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 11 Feb 2021 22:51:34 +0000 Subject: [issue27835] SystemExit in setUpClass etc. terminates test run In-Reply-To: <1471945955.42.0.0930690369777.issue27835@psf.upfronthosting.co.za> Message-ID: <1613083894.37.0.0860642946696.issue27835@roundup.psfhosted.org> Irit Katriel added the comment: I can't reproduce the issue. I think it was fixed in issue24412. ---------- nosy: +iritkatriel resolution: -> fixed status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 17:59:34 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 11 Feb 2021 22:59:34 +0000 Subject: [issue15108] ERROR: SystemError: ./../Objects/tupleobject.c:118: bad argument to internal function In-Reply-To: <1340142734.59.0.259692259195.issue15108@psf.upfronthosting.co.za> Message-ID: <1613084374.06.0.604725091167.issue15108@roundup.psfhosted.org> Irit Katriel added the comment: Is there anything left to do here? Looks like a 3rd party issue. ---------- nosy: +iritkatriel status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 18:06:45 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 11 Feb 2021 23:06:45 +0000 Subject: [issue15108] ERROR: SystemError: ./../Objects/tupleobject.c:118: bad argument to internal function In-Reply-To: <1340142734.59.0.259692259195.issue15108@psf.upfronthosting.co.za> Message-ID: <1613084805.95.0.111628660268.issue15108@roundup.psfhosted.org> Irit Katriel added the comment: oops, wrong ticket. Sorry about the noise. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 18:12:45 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 11 Feb 2021 23:12:45 +0000 Subject: [issue15108] ERROR: SystemError: ./../Objects/tupleobject.c:118: bad argument to internal function In-Reply-To: <1340142734.59.0.259692259195.issue15108@psf.upfronthosting.co.za> Message-ID: <1613085165.77.0.320536668071.issue15108@roundup.psfhosted.org> Irit Katriel added the comment: Still happening in 3.10: Python 3.10.0a5+ (heads/master:bf2e7e55d7, Feb 11 2021, 23:09:25) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import gc >>> TAG = object() >>> >>> def monitor(): ... lst = [x for x in gc.get_referrers(TAG) ... if isinstance(x, tuple)] ... t = lst[0] # this *is* the result tuple ... print(t) # full of nulls ! ... return t # Keep it alive for some time ... >>> def my_iter(): ... yield TAG # 'tag' gets stored in the result tuple ... t = monitor() ... for x in range(10): ... yield x # SystemError when the tuple needs to be resized ... >>> tuple(my_iter()) (, , , , , , , , , ) Traceback (most recent call last): File "", line 1, in SystemError: C:\Users\User\src\cpython-dev\Objects\tupleobject.c:963: bad argument to internal function >>> ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 18:12:55 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 11 Feb 2021 23:12:55 +0000 Subject: [issue15108] ERROR: SystemError: ./../Objects/tupleobject.c:118: bad argument to internal function In-Reply-To: <1340142734.59.0.259692259195.issue15108@psf.upfronthosting.co.za> Message-ID: <1613085175.49.0.846600859309.issue15108@roundup.psfhosted.org> Change by Irit Katriel : ---------- Removed message: https://bugs.python.org/msg386840 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 18:12:57 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 11 Feb 2021 23:12:57 +0000 Subject: [issue15108] ERROR: SystemError: ./../Objects/tupleobject.c:118: bad argument to internal function In-Reply-To: <1340142734.59.0.259692259195.issue15108@psf.upfronthosting.co.za> Message-ID: <1613085177.24.0.0532257165463.issue15108@roundup.psfhosted.org> Change by Irit Katriel : ---------- Removed message: https://bugs.python.org/msg386839 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 19:06:58 2021 From: report at bugs.python.org (Inada Naoki) Date: Fri, 12 Feb 2021 00:06:58 +0000 Subject: [issue43174] Windows: Use /utf-8 compiler flag In-Reply-To: <1612839542.96.0.0701004170388.issue43174@roundup.psfhosted.org> Message-ID: <1613088418.96.0.702813363842.issue43174@roundup.psfhosted.org> Inada Naoki added the comment: New changeset fedd86df2448370cdf62a229fd6f31dc92daf379 by Inada Naoki in branch 'master': bpo-43174: Windows: Use /utf-8 compiler option. (GH-24498) https://github.com/python/cpython/commit/fedd86df2448370cdf62a229fd6f31dc92daf379 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 19:08:03 2021 From: report at bugs.python.org (Inada Naoki) Date: Fri, 12 Feb 2021 00:08:03 +0000 Subject: [issue43174] Windows: Use /utf-8 compiler flag In-Reply-To: <1612839542.96.0.0701004170388.issue43174@roundup.psfhosted.org> Message-ID: <1613088483.18.0.0880032989969.issue43174@roundup.psfhosted.org> Inada Naoki added the comment: May I backport this for Python 3.9? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 19:31:18 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Feb 2021 00:31:18 +0000 Subject: [issue43202] Cleanup codeop._maybe_compile In-Reply-To: <1613077616.54.0.579438220954.issue43202@roundup.psfhosted.org> Message-ID: <1613089878.58.0.288473312681.issue43202@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 2068b261e95e9fe9c4041f0102c9e931692dd5aa by Terry Jan Reedy in branch 'master': bpo-43202: Immediately return code object in codeop._maybe_compile (GH-24508) https://github.com/python/cpython/commit/2068b261e95e9fe9c4041f0102c9e931692dd5aa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 19:42:30 2021 From: report at bugs.python.org (Samuel Marks) Date: Fri, 12 Feb 2021 00:42:30 +0000 Subject: [issue43203] Default value incorrectly read with unittests on Windows & macOS but not Linux Message-ID: <1613090550.2.0.513992790523.issue43203@roundup.psfhosted.org> New submission from Samuel Marks : Had a couple of commits to try and fix it on GitHub Actions (as I was unable to replicate locally), ended up with this very easy fix for Windows: https://github.com/SamuelMarks/doctrans/commit/98203e9fee3e0a888ab1f4128011dde5fad98f63 To completely remove the default value. The only thing I can assume happened is that a different test in the same class?which set the default value to something else?changed the default value of the function. This was all very confusing, and I can only think it to be a bug on python, or in GitHub Actions deployment thereof. PS: The macOS builds are still failing with the previous issue :\ ---------- components: Windows, macOS messages: 386845 nosy: ned.deily, paul.moore, ronaldoussoren, samuelmarks, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Default value incorrectly read with unittests on Windows & macOS but not Linux versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 19:50:00 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 12 Feb 2021 00:50:00 +0000 Subject: [issue43174] Windows: Use /utf-8 compiler flag In-Reply-To: <1612839542.96.0.0701004170388.issue43174@roundup.psfhosted.org> Message-ID: <1613091000.04.0.618251463356.issue43174@roundup.psfhosted.org> Steve Dower added the comment: I think so, yeah. We shouldn't have any string literals that are non-ASCII, but if we do then it's almost certainly an improvement for them to be UTF-8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 19:58:25 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 12 Feb 2021 00:58:25 +0000 Subject: [issue15108] ERROR: SystemError: ./../Objects/tupleobject.c:118: bad argument to internal function In-Reply-To: <1340142734.59.0.259692259195.issue15108@psf.upfronthosting.co.za> Message-ID: <1613091505.42.0.136485632711.issue15108@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch nosy: +pablogsal nosy_count: 8.0 -> 9.0 pull_requests: +23297 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24510 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 20:52:51 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Feb 2021 01:52:51 +0000 Subject: [issue43202] Cleanup codeop._maybe_compile In-Reply-To: <1613077616.54.0.579438220954.issue43202@roundup.psfhosted.org> Message-ID: <1613094771.66.0.688015424166.issue43202@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +23298 pull_request: https://github.com/python/cpython/pull/24512 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 21:21:04 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Feb 2021 02:21:04 +0000 Subject: [issue43174] Windows: Use /utf-8 compiler flag In-Reply-To: <1612839542.96.0.0701004170388.issue43174@roundup.psfhosted.org> Message-ID: <1613096464.87.0.441443779299.issue43174@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +23299 pull_request: https://github.com/python/cpython/pull/24513 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 21:45:54 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Feb 2021 02:45:54 +0000 Subject: [issue43198] Operations on sets more than hundred times less efficient with python3.9 than with previous versions In-Reply-To: <1613002507.49.0.48232719319.issue43198@roundup.psfhosted.org> Message-ID: <1613097954.42.0.141957374193.issue43198@roundup.psfhosted.org> Raymond Hettinger added the comment: Addenda. Top use cases for sets (roughly in order of commonality): 1. Eliminate duplicates from an iterable input and loop over the result. 2. Store elements in a set just once but do many membership tests. 3. Perform data analysis on multiple sets using union, intersection, difference, and isdisjoint. 4. Remove elements from a set, one at a time, until it is empty. 5. Algorithms and that alternately add and remove different elements over time (toposort, NFA, DFA, etc). The first three are all penalized by an extra inner loop test and the loss of the register to track the freeslot. Those use cases get no offsetting benefit. Case 4 doesn't exercise the dummy reuse at all. So, it is unaffected. The last is approximately a net wash. It pays the inner loop price, suffers the loss of a register, and incurs an extra test outside the loop, but it occasionally gets lucky and reuses a freeslot. The benefit for reuse is that it is delays the inevitable resize which would have reclaimed the dummy entries earlier. (The comparable use case for dicts is LRU/LFU caches where new entries are added at the same rate as old entries are removed. That use case also showed a net wash when freeslot tracking was removed from dicts). Not on the list at all is the case of a large set, where exactly the same element is added and removed in a tight loop. The payoff for this case is that the O(n) resize step never occurs; however, this case is so rare that there is no reason to preference it over the common cases. It now has the same performance as case 5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 21:52:36 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Feb 2021 02:52:36 +0000 Subject: [issue43198] Operations on sets more than hundred times less efficient with python3.9 than with previous versions In-Reply-To: <1613002507.49.0.48232719319.issue43198@roundup.psfhosted.org> Message-ID: <1613098356.97.0.621956084875.issue43198@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- Removed message: https://bugs.python.org/msg386847 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 22:04:30 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Feb 2021 03:04:30 +0000 Subject: [issue43198] Operations on sets more than hundred times less efficient with python3.9 than with previous versions In-Reply-To: <1613002507.49.0.48232719319.issue43198@roundup.psfhosted.org> Message-ID: <1613099070.93.0.280343346537.issue43198@roundup.psfhosted.org> Raymond Hettinger added the comment: Addenda [reposted to fix a premature submission]. Top use cases for sets (roughly in order of commonality): 1. Eliminate duplicates from an iterable input and loop over the result. 2. Store elements in a set just once but do many membership tests. 3. Perform data analysis on multiple sets using union, intersection, difference, and isdisjoint. 4. Remove elements from a set, one at a time, until it is empty. 5. Algorithms and that alternately add and remove different elements over time (toposort, NFA, DFA, etc). The first three are all penalized by an extra inner loop test and the loss of the register to track the freeslot. Those use cases get no offsetting benefit. Case 4 doesn't exercise the dummy reuse at all. So, it is unaffected. The last is approximately a net wash. It pays the inner loop price, suffers the loss of a register, and incurs an extra test outside the loop, but it occasionally gets lucky and reuses a freeslot. The benefit for reuse is that it is delays the inevitable resize which would have reclaimed the dummy entries earlier. (The comparable use case for dicts is LRU/LFU caches where new entries are added at the same rate as old entries are removed. That use case also showed a net wash when freeslot tracking was removed from dicts). Not on the list at all is the case of a large set, where exactly the same element is added and removed in a tight loop. The payoff for this case is that the O(n) resize step never occurs; however, this case is so rare that there is no reason to preference it over the common cases. If the addition and removal of the same element happens only a few times, with no other set updates, the performance is about the same as case 5. However, if there are many such updates and the set is large (as in the OP's code sample), the add() operation becomes quadratic because the chain of dummy or used entries grows larger and larger with each reinsertion. (FWIW, dicts also face the same issue and some additional ones related to maintaining insertion order). The question is whether this unhappy case is worth burdening all of the normal use cases. If this turns out to be a real issue in practice, we can reopen this; otherwise, let's stick with what we have. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 22:40:53 2021 From: report at bugs.python.org (Eric Martin) Date: Fri, 12 Feb 2021 03:40:53 +0000 Subject: [issue43198] Operations on sets more than hundred times less efficient with python3.9 than with previous versions In-Reply-To: <1613002507.49.0.48232719319.issue43198@roundup.psfhosted.org> Message-ID: <1613101253.88.0.084387753808.issue43198@roundup.psfhosted.org> Eric Martin added the comment: Many thanks Raymond for these insights and thorough explanations, I appreciate it very much. Your conclusions are of course most reasonable. For me, I cannot say that it is a real issue in practice. I have teaching notes in which I illustrate with plots the differences in complexity when working with sets versus lists. One such plot showed that the cost of removing an element from a set does not depend on what the element is (which is why I reused the same element again and again) and is orders of magnitude less than for removing an element from the middle of a list. I just found out that something had changed with Python3.9 when I last run the cell of the jupyter notebook in which that plot was produced... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 22:52:50 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Feb 2021 03:52:50 +0000 Subject: [issue43042] Augment tutorial sentence. In-Reply-To: <1611772942.43.0.309900316345.issue43042@roundup.psfhosted.org> Message-ID: <1613101970.61.0.169231525509.issue43042@roundup.psfhosted.org> Terry J. Reedy added the comment: https://docs.python.org/3/tutorial/controlflow.html#defining-functions I decided to augment the sentence as suggested by Jesse, and see what any reviewers think. ---------- assignee: docs at python -> terry.reedy nosy: -rhettinger title: Delete or merge redundant tutorial sentence. -> Augment tutorial sentence. versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 22:53:41 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Feb 2021 03:53:41 +0000 Subject: [issue43042] Augment tutorial sentence. In-Reply-To: <1611772942.43.0.309900316345.issue43042@roundup.psfhosted.org> Message-ID: <1613102021.6.0.991060104173.issue43042@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +23300 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/24514 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 23:20:13 2021 From: report at bugs.python.org (fireattack) Date: Fri, 12 Feb 2021 04:20:13 +0000 Subject: [issue39658] Include user scripts folder to PATH on Windows In-Reply-To: <1581891148.96.0.449800548141.issue39658@roundup.psfhosted.org> Message-ID: <1613103613.39.0.122824826684.issue39658@roundup.psfhosted.org> Change by fireattack : ---------- nosy: +fireattack _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 23:33:43 2021 From: report at bugs.python.org (Inada Naoki) Date: Fri, 12 Feb 2021 04:33:43 +0000 Subject: [issue43174] Windows: Use /utf-8 compiler flag In-Reply-To: <1612839542.96.0.0701004170388.issue43174@roundup.psfhosted.org> Message-ID: <1613104423.65.0.241841340096.issue43174@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 68d6bc798b34eccabdfbf94e563273759c4cef1f by Miss Islington (bot) in branch '3.9': bpo-43174: Windows: Use /utf-8 compiler option. (GH-24498) https://github.com/python/cpython/commit/68d6bc798b34eccabdfbf94e563273759c4cef1f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 11 23:44:41 2021 From: report at bugs.python.org (Inada Naoki) Date: Fri, 12 Feb 2021 04:44:41 +0000 Subject: [issue43174] Windows: Use /utf-8 compiler flag In-Reply-To: <1612839542.96.0.0701004170388.issue43174@roundup.psfhosted.org> Message-ID: <1613105081.81.0.502879970972.issue43174@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 01:41:46 2021 From: report at bugs.python.org (suresh) Date: Fri, 12 Feb 2021 06:41:46 +0000 Subject: [issue43175] filecmp is not working for UTF-8 BOM file. In-Reply-To: <1612848997.29.0.320825258569.issue43175@roundup.psfhosted.org> Message-ID: <1613112106.15.0.378591589948.issue43175@roundup.psfhosted.org> suresh added the comment: Please find the below Code and attached the files, expecting true as output and getting as false: "import filecmp filecmp.clear_cache() boolfile=filecmp.cmp(r'C:\destination.css',r'C:\source.css',shallow=False) print(boolfile)" ---------- hgrepos: +398 Added file: https://bugs.python.org/file49802/files.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 05:12:26 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 12 Feb 2021 10:12:26 +0000 Subject: [issue43054] What does the existence of a struct in a header file imply about the C-API In-Reply-To: <1611832325.97.0.674198865532.issue43054@roundup.psfhosted.org> Message-ID: <1613124746.26.0.194358480037.issue43054@roundup.psfhosted.org> Ronald Oussoren added the comment: To channel Victor: Another thing to look into is to introduce accessors for struct fields in category 1 and 2 so that the struct can be made private in the future. The difference between category 1 and 2 is sadly not very clear cut. Anything defined in public headers could be used 3th-party code. In this particular instance there is no documentation for the fields of the struct, which may indicate that the struct is private. However, this struct is used by code outside of the stdlib and there are currently no accessors that can replace this usage. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 05:27:23 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 12 Feb 2021 10:27:23 +0000 Subject: [issue43204] Fix LibTom URL's in hashlib comments Message-ID: <1613125643.6.0.405533024429.issue43204@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : The comments in Modules/md5module.c, Modules/sha1module.c, Modules/sha256module.c, and Modules/sha512module.c all point to http://libtom.org. However the LibTom website has in fairly recent years been relaunched at https://libtom.net. The old URL is now used by a blog called "Libations Tom" and has no connection to LibTomCrypt. ---------- components: Library (Lib) messages: 386854 nosy: christian.heimes, erlendaasland priority: normal severity: normal status: open title: Fix LibTom URL's in hashlib comments versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 05:27:50 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 12 Feb 2021 10:27:50 +0000 Subject: [issue43204] Fix LibTom URL's in hashlib comments In-Reply-To: <1613125643.6.0.405533024429.issue43204@roundup.psfhosted.org> Message-ID: <1613125670.92.0.384365866129.issue43204@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +23301 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24507 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 05:34:14 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Feb 2021 10:34:14 +0000 Subject: [issue43204] Fix LibTom URL's in hashlib comments In-Reply-To: <1613125643.6.0.405533024429.issue43204@roundup.psfhosted.org> Message-ID: <1613126054.8.0.565873600755.issue43204@roundup.psfhosted.org> miss-islington added the comment: New changeset 5ec7d535581bc99918e032891167a96abd224ed6 by Erlend Egeberg Aasland in branch 'master': bpo-43204: Fix LibTomCrypt URL in md5module.c and sha*module.c comments (GH-24507) https://github.com/python/cpython/commit/5ec7d535581bc99918e032891167a96abd224ed6 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 05:34:56 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Feb 2021 10:34:56 +0000 Subject: [issue43204] Fix LibTom URL's in hashlib comments In-Reply-To: <1613125643.6.0.405533024429.issue43204@roundup.psfhosted.org> Message-ID: <1613126096.51.0.152231312508.issue43204@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +23303 pull_request: https://github.com/python/cpython/pull/24516 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 05:34:45 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Feb 2021 10:34:45 +0000 Subject: [issue43204] Fix LibTom URL's in hashlib comments In-Reply-To: <1613125643.6.0.405533024429.issue43204@roundup.psfhosted.org> Message-ID: <1613126085.9.0.355407726436.issue43204@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +23302 pull_request: https://github.com/python/cpython/pull/24515 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 05:39:02 2021 From: report at bugs.python.org (Mark Shannon) Date: Fri, 12 Feb 2021 10:39:02 +0000 Subject: [issue43054] What does the existence of a struct in a header file imply about the C-API In-Reply-To: <1611832325.97.0.674198865532.issue43054@roundup.psfhosted.org> Message-ID: <1613126342.11.0.344759544554.issue43054@roundup.psfhosted.org> Mark Shannon added the comment: Why do you think the distinction between category 1 and 2 is not clear? If the struct if not produced, or initialized, by an API function, then it cannot be accessed in the first place. If you can't access the struct in the first place, then you can't access its fields. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 06:19:16 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 12 Feb 2021 11:19:16 +0000 Subject: [issue43204] Fix LibTom URL's in hashlib comments In-Reply-To: <1613125643.6.0.405533024429.issue43204@roundup.psfhosted.org> Message-ID: <1613128756.64.0.889778769706.issue43204@roundup.psfhosted.org> miss-islington added the comment: New changeset df2197f2ec410817299f671e353c2fb0a3d61cbd by Miss Islington (bot) in branch '3.9': bpo-43204: Fix LibTomCrypt URL in md5module.c and sha*module.c comments (GH-24507) https://github.com/python/cpython/commit/df2197f2ec410817299f671e353c2fb0a3d61cbd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 06:28:24 2021 From: report at bugs.python.org (Mr Johnson) Date: Fri, 12 Feb 2021 11:28:24 +0000 Subject: [issue43205] Python Turtle Colour Message-ID: <1613129304.56.0.0860365755934.issue43205@roundup.psfhosted.org> New submission from Mr Johnson : An incredibly small annoyance, but as a teacher in the UK, using the Turtle library to teach students how to code, I spend more time explaining that they should use "color" instead of "colour" then actually teaching them coding! Would it be possible to add a duplicated function to each "color" function in the python turtle that uses the UK spelling, "colour"? They would behave exactly the same, you could have the "colour" functions just call the "color" function, it would just save a lot of hassle in class! ---------- components: Demos and Tools messages: 386858 nosy: Johnson.S priority: normal severity: normal status: open title: Python Turtle Colour type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 06:57:55 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 12 Feb 2021 11:57:55 +0000 Subject: [issue42624] sqlite3 package document mistake In-Reply-To: <1607762869.89.0.42414804314.issue42624@roundup.psfhosted.org> Message-ID: <1613131075.61.0.14030764504.issue42624@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Exception originates from _pysqlite_seterror() in Modules/_sqlite/util.c, line 64: https://github.com/python/cpython/blob/master/Modules/_sqlite/util.c#L64 Error code 1 (SQLITE_ERROR, https://sqlite.org/rescode.html#error) is a generic sqlite3 error. Changing the default sqlite3 exception for this error code may not be what we want. Anyway, we should clean up the error handling in the sqlite3 module. There are other inconsistencies apart from this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 06:58:28 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 12 Feb 2021 11:58:28 +0000 Subject: [issue42624] sqlite3 package document mistake In-Reply-To: <1607762869.89.0.42414804314.issue42624@roundup.psfhosted.org> Message-ID: <1613131108.1.0.454061774488.issue42624@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Ref. bpo-24139 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 06:59:14 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 12 Feb 2021 11:59:14 +0000 Subject: [issue42624] sqlite3 package document mistake In-Reply-To: <1607762869.89.0.42414804314.issue42624@roundup.psfhosted.org> Message-ID: <1613131154.37.0.135032212837.issue42624@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: ... and also bpo-16379 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 07:00:09 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 12 Feb 2021 12:00:09 +0000 Subject: [issue42624] sqlite3 package document mistake In-Reply-To: <1607762869.89.0.42414804314.issue42624@roundup.psfhosted.org> Message-ID: <1613131209.64.0.151732843526.issue42624@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: *error handling => exception emitted ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 07:24:21 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 12 Feb 2021 12:24:21 +0000 Subject: [issue43205] Python Turtle Colour In-Reply-To: <1613129304.56.0.0860365755934.issue43205@roundup.psfhosted.org> Message-ID: <1613132661.16.0.758381492353.issue43205@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- nosy: +gregorlingl, willingc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 07:41:28 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 12 Feb 2021 12:41:28 +0000 Subject: [issue43193] Installer for All users In-Reply-To: <1612953691.92.0.275565504526.issue43193@roundup.psfhosted.org> Message-ID: <1613133688.76.0.488171663964.issue43193@roundup.psfhosted.org> Steve Dower added the comment: I don't think this is resolvable without either being fixed by WiX Toolset or us completely rewriting the installer. And they've already shown very little interest in fixing this. That said, WiX Toolset was eventually funded to fix the MSI hijacking issue that they initially dismissed, so it could happen. What I'd *love* to see happen is some other group take up the responsibility for user-friendly Python distributions. If that happened, the python.org installer could go back to being a trivial installer for admins, rather than trying to handle every user scenario perfectly (and leading to literal abuse and defamation towards our maintainers from "famous" people because of their faulty memories... okay, maybe that's just for me to get over on my own time...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 08:30:29 2021 From: report at bugs.python.org (Abhilash Jindal) Date: Fri, 12 Feb 2021 13:30:29 +0000 Subject: [issue43206] Optional parameter got passed even when not in the call Message-ID: <1613136629.64.0.932416781552.issue43206@roundup.psfhosted.org> New submission from Abhilash Jindal : Seeing a very unexpected behavior. A call to __init__ method is receiving extra arguments not present in the caller. Following is a debugger session to demonstrate. Notice that "data_dict" is not being passed in the caller, yet the callee is receiving it! ```python (Pdb) bt /Users/apple/Library/Python/3.8/bin/celery(10)() -> sys.exit(main()) /Users/apple/Library/Python/3.8/lib/python/site-packages/celery/__main__.py(15)main() -> sys.exit(_main()) /Users/apple/Library/Python/3.8/lib/python/site-packages/celery/bin/celery.py(213)main() -> return celery(auto_envvar_prefix="CELERY") /Users/apple/Library/Python/3.8/lib/python/site-packages/click/core.py(829)__call__() -> return self.main(*args, **kwargs) /Users/apple/Library/Python/3.8/lib/python/site-packages/click/core.py(782)main() -> rv = self.invoke(ctx) /Users/apple/Library/Python/3.8/lib/python/site-packages/click/core.py(1259)invoke() -> return _process_result(sub_ctx.command.invoke(sub_ctx)) /Users/apple/Library/Python/3.8/lib/python/site-packages/click/core.py(1066)invoke() -> return ctx.invoke(self.callback, **ctx.params) /Users/apple/Library/Python/3.8/lib/python/site-packages/click/core.py(610)invoke() -> return callback(*args, **kwargs) /Users/apple/Library/Python/3.8/lib/python/site-packages/click/decorators.py(21)new_func() -> return f(get_current_context(), *args, **kwargs) /Users/apple/Library/Python/3.8/lib/python/site-packages/celery/bin/base.py(132)caller() -> return f(ctx, *args, **kwargs) /Users/apple/Library/Python/3.8/lib/python/site-packages/celery/bin/worker.py(327)worker() -> worker.start() /Users/apple/Library/Python/3.8/lib/python/site-packages/celery/worker/worker.py(203)start() -> self.blueprint.start(self) /Users/apple/Library/Python/3.8/lib/python/site-packages/celery/bootsteps.py(116)start() -> step.start(parent) /Users/apple/Library/Python/3.8/lib/python/site-packages/celery/bootsteps.py(365)start() -> return self.obj.start() /Users/apple/Library/Python/3.8/lib/python/site-packages/celery/concurrency/base.py(129)start() -> self.on_start() /Users/apple/Library/Python/3.8/lib/python/site-packages/celery/concurrency/prefork.py(107)on_start() -> P = self._pool = Pool(processes=self.limit, /Users/apple/Library/Python/3.8/lib/python/site-packages/celery/concurrency/asynpool.py(460)__init__() -> super().__init__(processes, *args, **kwargs) /Users/apple/Library/Python/3.8/lib/python/site-packages/billiard/pool.py(1046)__init__() -> self._create_worker_process(i) /Users/apple/Library/Python/3.8/lib/python/site-packages/celery/concurrency/asynpool.py(477)_create_worker_process() -> return super()._create_worker_process(i) /Users/apple/Library/Python/3.8/lib/python/site-packages/billiard/pool.py(1158)_create_worker_process() -> w.start() /Users/apple/Library/Python/3.8/lib/python/site-packages/billiard/process.py(124)start() -> self._popen = self._Popen(self) /Users/apple/Library/Python/3.8/lib/python/site-packages/billiard/context.py(333)_Popen() -> return Popen(process_obj) /Users/apple/Library/Python/3.8/lib/python/site-packages/billiard/popen_fork.py(24)__init__() -> self._launch(process_obj) /Users/apple/Library/Python/3.8/lib/python/site-packages/billiard/popen_fork.py(79)_launch() -> code = process_obj._bootstrap() /Users/apple/Library/Python/3.8/lib/python/site-packages/billiard/process.py(327)_bootstrap() -> self.run() /Users/apple/Library/Python/3.8/lib/python/site-packages/billiard/process.py(114)run() -> self._target(*self._args, **self._kwargs) /Users/apple/Library/Python/3.8/lib/python/site-packages/billiard/pool.py(292)__call__() -> sys.exit(self.workloop(pid=pid)) /Users/apple/Library/Python/3.8/lib/python/site-packages/billiard/pool.py(362)workloop() -> result = (True, prepare_result(fun(*args, **kwargs))) /Users/apple/Library/Python/3.8/lib/python/site-packages/celery/app/trace.py(580)_trace_task_ret() -> R, I, T, Rstr = trace_task(app.tasks[name], /Users/apple/Library/Python/3.8/lib/python/site-packages/celery/app/trace.py(536)trace_task() -> return task.__trace__(uuid, args, kwargs, request) /Users/apple/Library/Python/3.8/lib/python/site-packages/celery/app/trace.py(405)trace_task() -> R = retval = fun(*args, **kwargs) /Users/apple/Library/Python/3.8/lib/python/site-packages/celery/app/trace.py(697)__protected_call__() -> return self.run(*args, **kwargs) /Users/apple/Documents/research/hint/code/scope/core/nodes.py(23)process() -> processor(idx) /Users/apple/Documents/research/hint/code/scope/core/nodes.py(96)__call__() -> k = next(iter(self.named_in_edges)) > /Users/apple/Documents/research/hint/code/scope/examples/word_count.py(55)__call__() -> out_row = Row(node_name, self.schema, from_rows=[input_row]) /Users/apple/Documents/research/hint/code/scope/model/row.py(21)__init__() -> self.lnode_name = lnode_name (Pdb) l. 50 def __call__(self, input_row: Row, *args: Any, **kwargs: Any) -> Generator[Row, None, None]: 51 node_name = kwargs['node_name'] 52 line, _ = input_row.pget(self.in_col) 53 words = line.split(self.separator) 54 for word in words: 55 -> out_row = Row(node_name, self.schema, from_rows=[input_row]) 56 out_row.pset(self.out_col, word.strip(' \t\r\n,!?.')) 57 yield out_row 58 59 60 class LowerCase(Processor): (Pdb) d > /Users/apple/Documents/research/hint/code/scope/model/row.py(21)__init__() -> self.lnode_name = lnode_name (Pdb) l. 17 def __init__(self, lnode_name, schema, id = '*', data_dict = {}, read_only = False, from_rows = None): 18 # type(str, Schema, str, Dict[bytes, bytes], bool, List[Row]) 19 if lnode_name == 'processor-1': 20 from celery.contrib import rdb; rdb.set_trace() 21 -> self.lnode_name = lnode_name 22 self._schema = schema 23 self.id = id 24 self.data_dict = data_dict 25 26 self.parents = RowRelations(self, RelationType.PARENT) (Pdb) lnode_name 'processor-1' (Pdb) data_dict {b'line': b'When will you realize... Vienna waits for you?'} (Pdb) from_rows [] (Pdb) from_rows[0] (Pdb) id '*' (Pdb) read_only False (Pdb) ``` ---------- components: macOS messages: 386864 nosy: ajindal, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Optional parameter got passed even when not in the call type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 09:33:50 2021 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 12 Feb 2021 14:33:50 +0000 Subject: [issue43206] Optional parameter got passed even when not in the call In-Reply-To: <1613136629.64.0.932416781552.issue43206@roundup.psfhosted.org> Message-ID: <1613140430.89.0.0599514510343.issue43206@roundup.psfhosted.org> Eric V. Smith added the comment: It's hard to tell because you didn't show the whole program, but this looks like a mutable default argument problem. Basically you're changing the default value in a different call to Row(). https://docs.python.org/3/faq/programming.html#why-are-default-values-shared-between-objects ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 09:40:00 2021 From: report at bugs.python.org (Jun) Date: Fri, 12 Feb 2021 14:40:00 +0000 Subject: [issue43207] InspectLoader.is_package is not an abstract method Message-ID: <1613140800.67.0.306485673538.issue43207@roundup.psfhosted.org> New submission from Jun : In the documentation of importlib: https://docs.python.org/3/library/importlib.html#importlib.abc.InspectLoader It says InspectLoader.is_package is an abstract method while it is not in the implementation. @abc.abstractmethod decorator was removed with this commit https://github.com/python/cpython/commit/b523f8433a8982e10eb41a3e2b37ee0e6d6a6e00 ---------- assignee: docs at python components: Documentation messages: 386866 nosy: Jun, docs at python priority: normal severity: normal status: open title: InspectLoader.is_package is not an abstract method versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 09:44:57 2021 From: report at bugs.python.org (Thijs Miedema) Date: Fri, 12 Feb 2021 14:44:57 +0000 Subject: [issue43208] Ctypes._FuncPtr.restype doesn't handle NoneType correctly Message-ID: <1613141097.76.0.252191412274.issue43208@roundup.psfhosted.org> New submission from Thijs Miedema : When setting the restype of a ctypes._FuncPtr you can use None to indicate a void function. However, I use inspect.signature to dynamically bind python functions to a DLL, and that doesn't return None but NoneType if the type hint return type is None starting at python 3.10. This change caused me to set the restype to NoneType, which makes ctypes cause a cryptic "TypeError: NoneType takes no arguments" upon returning from a successfully executed C function. The included example demonstrates the differing results from inspect, a working example, a failing example and an example that works in 3.9 but fails in 3.10. Proposed solution: Treat NoneType as None for ctypes._FuncPtr.restype ---------- components: ctypes files: minimal_example_ctypes_nonetype_behaviour.py messages: 386867 nosy: thijsmiedema94 priority: normal severity: normal status: open title: Ctypes._FuncPtr.restype doesn't handle NoneType correctly type: behavior versions: Python 3.10 Added file: https://bugs.python.org/file49803/minimal_example_ctypes_nonetype_behaviour.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 09:48:40 2021 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Feb 2021 14:48:40 +0000 Subject: [issue43207] InspectLoader.is_package is not an abstract method In-Reply-To: <1613140800.67.0.306485673538.issue43207@roundup.psfhosted.org> Message-ID: <1613141320.05.0.3173837758.issue43207@roundup.psfhosted.org> Change by Roundup Robot : ---------- keywords: +patch nosy: +python-dev nosy_count: 2.0 -> 3.0 pull_requests: +23304 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24517 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 10:17:12 2021 From: report at bugs.python.org (Abhilash Jindal) Date: Fri, 12 Feb 2021 15:17:12 +0000 Subject: [issue43206] Optional parameter got passed even when not in the call In-Reply-To: <1613136629.64.0.932416781552.issue43206@roundup.psfhosted.org> Message-ID: <1613143032.7.0.93948073235.issue43206@roundup.psfhosted.org> Abhilash Jindal added the comment: Aah TIL. Thanks. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 13:15:12 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 12 Feb 2021 18:15:12 +0000 Subject: [issue43203] Default value incorrectly read with unittests on Windows & macOS but not Linux In-Reply-To: <1613090550.2.0.513992790523.issue43203@roundup.psfhosted.org> Message-ID: <1613153712.38.0.728686746893.issue43203@roundup.psfhosted.org> Steve Dower added the comment: I'm afraid there's nowhere near enough context in your post for us to look into this. Can you provide some code that you think *should* work but does not? Ideally in a post (as in, it should be that short) or as an attachment? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 13:21:22 2021 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 12 Feb 2021 18:21:22 +0000 Subject: [issue43155] PyCMethod_New not defined in python3.lib In-Reply-To: <1612721158.76.0.287250699598.issue43155@roundup.psfhosted.org> Message-ID: <1613154082.12.0.508934171307.issue43155@roundup.psfhosted.org> Petr Viktorin added the comment: > Is there a test suite that checks that the limited API functions can all be linked against? Not yet. There's not even consensus about exactly what functions are part of the limited API. I plan to address both issues in PEP 652 (currently in Draft status). ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 14:33:14 2021 From: report at bugs.python.org (robert j richardson) Date: Fri, 12 Feb 2021 19:33:14 +0000 Subject: [issue43209] system cannot find the file specified in subprocess.py Message-ID: <1613158394.2.0.196076436453.issue43209@roundup.psfhosted.org> New submission from robert j richardson : When using >python synth.py in the directory google-api-java-client-services-master python returns: synthtool > Cloning https://github.com/googleapis/discovery-artifact-manager.git. synthtool > Cleaning output directory. Traceback (most recent call last): File "D:\google-api-java-client-services-master\synth.py", line 47, in shell.run("rm -rf .cache".split(), cwd=repository) File "C:\Users\rober\AppData\Local\Programs\Python\Python39\lib\site-packages\synthtool\shell.py", line 27, in run return subprocess.run( File "C:\Users\rober\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 501, in run with Popen(*popenargs, **kwargs) as process: File "C:\Users\rober\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 947, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\rober\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 1416, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] The system cannot find the file specified ---------- components: Windows messages: 386871 nosy: paul.moore, robertjrichardson, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: system cannot find the file specified in subprocess.py type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 14:43:12 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 12 Feb 2021 19:43:12 +0000 Subject: [issue30799] Improved test coverage Lib/_osx_support.py 99% In-Reply-To: <1499326167.93.0.491914452114.issue30799@psf.upfronthosting.co.za> Message-ID: <1613158992.15.0.464068575535.issue30799@roundup.psfhosted.org> Change by Ronald Oussoren : ---------- components: +macOS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 14:45:36 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 12 Feb 2021 19:45:36 +0000 Subject: [issue43209] system cannot find the file specified in subprocess.py In-Reply-To: <1613158394.2.0.196076436453.issue43209@roundup.psfhosted.org> Message-ID: <3d53d5ca-985a-2752-f9d1-37a500cce9d1@python.org> Steve Dower added the comment: This line won't work on Windows: shell.run("rm -rf .cache".split(), cwd=repository) You should probably use shutil.rmtree(".cache") instead if you want it to be cross platform. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 14:45:59 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 12 Feb 2021 19:45:59 +0000 Subject: [issue43210] Fix inaccurate byteswap comment in sha512.module.c Message-ID: <1613159159.15.0.0115331421083.issue43210@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : Include/internal/pycore_bitutils.h is included bco. _Py_bswap64(), not _Py_bswap32(). ---------- components: Library (Lib) messages: 386873 nosy: christian.heimes, erlendaasland priority: normal severity: normal status: open title: Fix inaccurate byteswap comment in sha512.module.c versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 14:46:28 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 12 Feb 2021 19:46:28 +0000 Subject: [issue43210] Fix inaccurate byteswap comment in sha512.module.c In-Reply-To: <1613159159.15.0.0115331421083.issue43210@roundup.psfhosted.org> Message-ID: <1613159188.11.0.929047493628.issue43210@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +23305 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24518 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 14:49:05 2021 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Fri, 12 Feb 2021 19:49:05 +0000 Subject: [issue43205] Python Turtle Colour In-Reply-To: <1613129304.56.0.0860365755934.issue43205@roundup.psfhosted.org> Message-ID: <1613159345.86.0.653727801952.issue43205@roundup.psfhosted.org> Vedran ?a?i? added the comment: It is just a matter of a different (though not very different) language. As such, it is a duplicate of https://bugs.python.org/issue24990. ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 14:49:27 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 12 Feb 2021 19:49:27 +0000 Subject: [issue43210] Fix inaccurate byteswap comment in sha512module.c In-Reply-To: <1613159159.15.0.0115331421083.issue43210@roundup.psfhosted.org> Message-ID: <1613159367.08.0.533811027624.issue43210@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- title: Fix inaccurate byteswap comment in sha512.module.c -> Fix inaccurate byteswap comment in sha512module.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 15:01:14 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 12 Feb 2021 20:01:14 +0000 Subject: [issue19094] urljoin should raise a TypeError if URL is not a string In-Reply-To: <1380142541.83.0.560775690833.issue19094@psf.upfronthosting.co.za> Message-ID: <1613160074.26.0.298138867434.issue19094@roundup.psfhosted.org> Irit Katriel added the comment: Still broken in 3.10: Running Release|x64 interpreter... Python 3.10.0a5+ (heads/master:bf2e7e55d7, Feb 11 2021, 23:09:25) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import urllib.parse >>> urllib.parse.urljoin('foo', []) 'foo' >>> ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 15:04:59 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 12 Feb 2021 20:04:59 +0000 Subject: [issue43172] Fix test_readline when compiled using --with-readline=edit In-Reply-To: <1612834834.05.0.814516616916.issue43172@roundup.psfhosted.org> Message-ID: <1613160299.94.0.60502542324.issue43172@roundup.psfhosted.org> Gregory P. Smith added the comment: New changeset fd053fdd39fbdf114b4218ea4309666bafa95788 by Gregory P. Smith in branch 'master': bpo-43172: readline now passes its tests when built against libedit (GH-24499) https://github.com/python/cpython/commit/fd053fdd39fbdf114b4218ea4309666bafa95788 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 15:05:25 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 12 Feb 2021 20:05:25 +0000 Subject: [issue43172] Fix test_readline when compiled using --with-readline=edit In-Reply-To: <1612834834.05.0.814516616916.issue43172@roundup.psfhosted.org> Message-ID: <1613160325.74.0.370478069178.issue43172@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 Fri Feb 12 15:21:47 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 12 Feb 2021 20:21:47 +0000 Subject: [issue43210] Fix inaccurate byteswap comment in sha512module.c In-Reply-To: <1613159159.15.0.0115331421083.issue43210@roundup.psfhosted.org> Message-ID: <1613161307.84.0.0109382699219.issue43210@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Introduced by 1ae035b7e847064d09df01ca62b8a761e9b5aae3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 16:09:46 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Feb 2021 21:09:46 +0000 Subject: [issue43139] test_ttk test_compound and test_tk test_type fails with Tk 8.6.11.1 In-Reply-To: <1612552092.14.0.798552929042.issue43139@roundup.psfhosted.org> Message-ID: <1613164186.6.0.373500612241.issue43139@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- components: +Tkinter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 16:14:00 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Feb 2021 21:14:00 +0000 Subject: [issue43139] test_ttk test_compound and test_tk test_type fails with Tk 8.6.11.1 In-Reply-To: <1612552092.14.0.798552929042.issue43139@roundup.psfhosted.org> Message-ID: <1613164440.44.0.142811321085.issue43139@roundup.psfhosted.org> Terry J. Reedy added the comment: When system? It appears to be some *nix. Is this a buildbot? Whose tcl/tk? Distributed with system or locally compiled? ---------- nosy: +serhiy.storchaka, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 16:16:13 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Feb 2021 21:16:13 +0000 Subject: [issue43140] built-in open() doesn't use locale.getpreferredencoding() as the default encoding In-Reply-To: <1612588574.22.0.21834147948.issue43140@roundup.psfhosted.org> Message-ID: <1613164573.84.0.922704257363.issue43140@roundup.psfhosted.org> Terry J. Reedy added the comment: Eryk, are you suggesting that this should be closed as 'Not a bug'? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 16:40:32 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Feb 2021 21:40:32 +0000 Subject: [issue43141] `asdict` fails with frozen dataclass keys, using raw dict form In-Reply-To: <1612590414.63.0.106701107905.issue43141@roundup.psfhosted.org> Message-ID: <1613166032.78.0.217248032537.issue43141@roundup.psfhosted.org> Terry J. Reedy added the comment: On freshly compiled master on Win10, the example code gives "TypeError: unhashable type: 'dict'". ---------- nosy: +terry.reedy title: `asdict` fails with frozen dataclass keys; tries to use raw dict form as key -> `asdict` fails with frozen dataclass keys, using raw dict form versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 16:43:22 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Feb 2021 21:43:22 +0000 Subject: [issue43142] Do not add duplicate FDs to list in duplicate_for_child() In-Reply-To: <1612590631.17.0.238793980684.issue43142@roundup.psfhosted.org> Message-ID: <1613166202.26.0.833322106365.issue43142@roundup.psfhosted.org> Terry J. Reedy added the comment: 3.7 and before only get security fixes. ---------- nosy: +davin, pitrou, terry.reedy versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 16:55:12 2021 From: report at bugs.python.org (Diasy Barrett) Date: Fri, 12 Feb 2021 21:55:12 +0000 Subject: [issue43211] Python is not responding after running program Message-ID: <1613166912.2.0.538494691419.issue43211@roundup.psfhosted.org> New submission from Diasy Barrett : Good day all I am very new to Python programming so forgive me. The Python application is not responding after I run my program. ---------- components: macOS files: Screen Shot 2021-02-12 at 23.55.56.png messages: 386882 nosy: diasybarrett, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Python is not responding after running program type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file49804/Screen Shot 2021-02-12 at 23.55.56.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 16:55:37 2021 From: report at bugs.python.org (Diasy Barrett) Date: Fri, 12 Feb 2021 21:55:37 +0000 Subject: [issue43211] Python is not responding after running program In-Reply-To: <1613166912.2.0.538494691419.issue43211@roundup.psfhosted.org> Message-ID: <1613166937.2.0.755885829765.issue43211@roundup.psfhosted.org> Change by Diasy Barrett : Added file: https://bugs.python.org/file49805/Screen Shot 2021-02-12 at 23.56.46.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 16:57:39 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Feb 2021 21:57:39 +0000 Subject: [issue43144] test_unicodedata: test_normalization uses network but doesn't depend on network resource In-Reply-To: <1612608486.69.0.149718284588.issue43144@roundup.psfhosted.org> Message-ID: <1613167059.69.0.585283351138.issue43144@roundup.psfhosted.org> Terry J. Reedy added the comment: After a week without response, I consider making a PR open to anyone. Whoever should add "Original patch by ..." in the message part. The patch is obvious enough that I would be willing to merge if no one else. ---------- keywords: +easy nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 16:58:27 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Feb 2021 21:58:27 +0000 Subject: [issue43145] Leak of locks from multiprocessing.Process In-Reply-To: <1612616557.31.0.756365409942.issue43145@roundup.psfhosted.org> Message-ID: <1613167107.34.0.930886124379.issue43145@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +davin, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 17:12:24 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 12 Feb 2021 22:12:24 +0000 Subject: [issue43140] built-in open() doesn't use locale.getpreferredencoding() as the default encoding In-Reply-To: <1612588574.22.0.21834147948.issue43140@roundup.psfhosted.org> Message-ID: <1613167944.85.0.278537081863.issue43140@roundup.psfhosted.org> Eryk Sun added the comment: > If my understanding is right, the open() will invoke > locale.getpreferredencoding() by setting the do_setlocale=False > -- i.e. locale.getpreferredencoding(False) -- to avoid invoking > setlocale(LC_CTYPE, ""). Yes, that's the case in POSIX systems. With do_setlocale=False, getpreferredencoding() gets the current locale's LC_CTYPE codeset via nl_langinfo(CODESET). This is thread safe, whereas calling setlocale(LC_CTYPE, "") beforehand is not thread safe. In Windows, locale.getpreferredencoding() always returns the encoding of the default locale, regardless of do_setlocale. It's needlessly inconsistent with POSIX. > are you suggesting that this should be closed as 'Not a bug'? Sorry, Terry. I forgot to close the issue. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 17:18:58 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Feb 2021 22:18:58 +0000 Subject: [issue26389] Expand traceback module API to accept just an exception as an argument In-Reply-To: <1455836350.85.0.0162824201978.issue26389@psf.upfronthosting.co.za> Message-ID: <1613168338.63.0.888527005568.issue26389@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 17:24:48 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 12 Feb 2021 22:24:48 +0000 Subject: [issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py In-Reply-To: <1612626856.83.0.902540623753.issue43146@roundup.psfhosted.org> Message-ID: <1613168688.94.0.0583502310695.issue43146@roundup.psfhosted.org> Terry J. Reedy added the comment: It seems to me that print_exception(None), etc, *should* raise something. Printing "NoneType: None\n" makes no sense to me since NoneType is not an exception. In 3.9, it raised TypeError for # of arguments. I do note that in 3.9 >>> traceback.print_exception(None, None, None) NoneType: None I wonder what the rationale was. It isn't because these functions never raise. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 17:33:08 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 12 Feb 2021 22:33:08 +0000 Subject: [issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py In-Reply-To: <1612626856.83.0.902540623753.issue43146@roundup.psfhosted.org> Message-ID: <1613169188.66.0.964280344348.issue43146@roundup.psfhosted.org> Irit Katriel added the comment: In 3.9 you had to give exc,val,tb. In 3.10 the shortcut was added. Issue 26389. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 17:47:21 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 12 Feb 2021 22:47:21 +0000 Subject: [issue43105] Can't import extension modules resolved via relative paths in sys.path on Windows In-Reply-To: <1612285380.24.0.495785451269.issue43105@roundup.psfhosted.org> Message-ID: <1613170041.39.0.693083559365.issue43105@roundup.psfhosted.org> Change by Steve Dower : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 18:03:12 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 12 Feb 2021 23:03:12 +0000 Subject: [issue43208] Ctypes._FuncPtr.restype doesn't handle NoneType correctly In-Reply-To: <1613141097.76.0.252191412274.issue43208@roundup.psfhosted.org> Message-ID: <1613170992.17.0.122026381078.issue43208@roundup.psfhosted.org> Eryk Sun added the comment: NoneType would have to be replaced with None in make_funcptrtype_dict() and PyCFuncPtr_set_restype() in Modules/_ctypes/_ctypes.c. In the C API, NoneType is (PyObject *)&_PyNone_Type. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 18:04:28 2021 From: report at bugs.python.org (Felix Yan) Date: Fri, 12 Feb 2021 23:04:28 +0000 Subject: [issue43139] test_ttk test_compound and test_tk test_type fails with Tk 8.6.11.1 In-Reply-To: <1612552092.14.0.798552929042.issue43139@roundup.psfhosted.org> Message-ID: <1613171068.05.0.586407147391.issue43139@roundup.psfhosted.org> Felix Yan added the comment: It's Arch Linux x86_64 with system tcl/tk. It's build in a clean chroot for packaging and always reproducible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 18:09:53 2021 From: report at bugs.python.org (=?utf-8?b?0JHQvtGA0LjRgSDQktC10YDRhdC+0LLRgdC60LjQuQ==?=) Date: Fri, 12 Feb 2021 23:09:53 +0000 Subject: [issue43212] Link to class and function source code on GitHub Message-ID: <1613171393.51.0.627157963271.issue43212@roundup.psfhosted.org> New submission from ????? ?????????? : We can use shpinx.ext.linkcode to link classes and functions/methods to their source code on GitHub from the documentation. See linked PR for screen shots. This is far from linking all the symbols in the docs, but it's gets quite a few. It would be hard to get to 100% because of C modules that get re-exported in Python files. It slighty increase the time it takes to generate the documentation with `make html`. I get 1m33s with these changes vs 1m28s without them. One thing is that when you merge a PR on GitHub, any files it touches will have the wrong line numbers while the documentation is being re-built and deployed. That's mostly neglible since most files haven't been edited in the last couple of minutes, but if it's an issue it may be possible to set up the CI to build the documentation then deploy the docs and merge the PR at the same time. ---------- assignee: docs at python components: Documentation messages: 386889 nosy: boris, docs at python priority: normal pull_requests: 23306 severity: normal status: open title: Link to class and function source code on GitHub type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 18:10:10 2021 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Blondon?=) Date: Fri, 12 Feb 2021 23:10:10 +0000 Subject: [issue18163] Add a 'key' attribute to KeyError In-Reply-To: <1370638316.1.0.167534610168.issue18163@psf.upfronthosting.co.za> Message-ID: <1613171410.44.0.114021321514.issue18163@roundup.psfhosted.org> St?phane Blondon added the comment: I'm interested by such feature. I see examples of versions of the message provided by KeyError: - sometimes with a message (for example `PyErr_SetString(PyExc_KeyError, "name too long");` at [1]) - sometimes with the missing key (for example `PyErr_SetObject(PyExc_KeyError, key);` at [2]) It explains why there is a difference in the messages in KeyError (as said in previous messages). PyErr_SetString(), PyErr_Format(), PyErr_FormatV() (implemented in Python/errors.c) don't have a parameter to set the missing key. So I think it would be easier to set the missing attribute before calling thoses functions. According to [3], the C PyExc_KeyError matches the Python KeyError exception. So I think to: - Add a 'missing_key' attribute to KeyError_str (in [4]) - Add the missing key to PyExc_KeyError instance before the call of PyErr_SetString(), PyErr_SetObject(), etc. Do you think such strategy is doable? What do you think about it? Is it the way you think about it? If not, do you have some hint? I already made some minor patches to cpython but only in the Python part, never in C one. 1: https://github.com/python/cpython/blob/master/Modules/unicodedata.c#L1398 2: https://github.com/python/cpython/blob/master/Python/hamt.c#L2767 3: https://docs.python.org/3/c-api/exceptions.html?highlight=pyerr_format#standard-exceptions 4: https://github.com/python/cpython/blob/master/Objects/exceptions.c#L1569 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 18:57:56 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 12 Feb 2021 23:57:56 +0000 Subject: [issue10794] Infinite recursion while garbage collecting loops indefinitely In-Reply-To: <1293670287.34.0.585233901325.issue10794@psf.upfronthosting.co.za> Message-ID: <1613174276.74.0.178008811754.issue10794@roundup.psfhosted.org> Irit Katriel added the comment: I think this issue is out of date. For Mihai's example I get: >>> class A(object): ... def __init__(self): ... raise Exception('init error') ... self.m = 'Hello world' ... def __del__(self): ... #raise RuntimeError('my runtime error') ... self.__del__() ... >>> def func(): ... h = A() ... >>> func() Traceback (most recent call last): File "", line 1, in File "", line 2, in func File "", line 3, in __init__ Exception: init error >>> For Amaury's first example I get what I expect: >>> class A: ... def close(self): ... self.close() ... def __del__(self): ... self.close() ... >>> class A: ... def close(self): ... self.close() ... def __del__(self): ... self.close() ... >>> def func(): ... h = A() ... >>> func() Exception ignored in: Traceback (most recent call last): File "", line 5, in __del__ File "", line 3, in close File "", line 3, in close File "", line 3, in close [Previous line repeated 994 more times] RecursionError: maximum recursion depth exceeded >>> And for Amaury's trashcan example (even when I increase the list length to well over the trashcan threshold): >>> class C: ... def __del__(self): ... print('.') ... x = self ... for i in range(49): # PyTrash_UNWIND_LEVEL-1 ... x = [x] ... >>> l = [C()] >>> del l . >>> class C: ... def __del__(self): ... print('.') ... x = self ... for i in range(5000): ... x = [x] ... >>> l = [C()] >>> del l . >>> ---------- nosy: +iritkatriel resolution: -> out of date status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 19:00:51 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Feb 2021 00:00:51 +0000 Subject: [issue43154] code.InteractiveConsole can crash if sys.excepthook is broken In-Reply-To: <1612715190.56.0.748623074825.issue43154@roundup.psfhosted.org> Message-ID: <1613174451.41.0.800420052436.issue43154@roundup.psfhosted.org> Terry J. Reedy added the comment: unraiseable hook is not needed. The REPL does: >>> sys.excepthook = lambda: None >>> 1/0 Error in sys.excepthook: TypeError: () takes 0 positional arguments but 3 were given Original exception was: Traceback (most recent call last): File "", line 1, in ZeroDivisionError: division by zero >>> (no crash) ---------------------------------------------------- code.Console in the REPL currently does: >>> import sys >>> sys.excepthook = 1 >>> arsdfsd Error in sys.excepthook: TypeError: 'int' object is not callable Original exception was: Traceback (most recent call last): File "F:\dev\3x\lib\code.py", line 90, in runcode exec(code, self.locals) File "", line 1, in NameError: name 'arsdfsd' is not defined During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "F:\dev\3x\lib\code.py", line 301, in interact console.interact(banner, exitmsg) File "F:\dev\3x\lib\code.py", line 232, in interact more = self.push(line) File "F:\dev\3x\lib\code.py", line 258, in push more = self.runsource(source, self.filename) File "F:\dev\3x\lib\code.py", line 74, in runsource self.runcode(code) File "F:\dev\3x\lib\code.py", line 94, in runcode self.showtraceback() File "F:\dev\3x\lib\code.py", line 148, in showtraceback sys.excepthook(ei[0], ei[1], last_tb) TypeError: 'int' object is not callable >>> (code console crashes, evidenced by 'sys' not recognized -------------------------------------------------------------- IDLE in its normal 2-process mode, since 3 weeks ago, does: >>> sys.excepthook = lambda: None >>> 1/0 Traceback (most recent call last): File "", line 1, in 1/0 ZeroDivisionError: division by zero During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Programs\Python310\lib\idlelib\run.py", line 576, in runcode sys.excepthook(*self.user_exc_info) TypeError: () takes 0 positional arguments but 3 were given >>> (no crash) In IDLE's 1-process mode, selected with -n command line option, the hook exception has several IDLE specific lines added, as with the code exception. A return or two is needed to get >>> back. ------------------------------------------------------------------------ In any case, both the immediate code exception and the defective hook exception are printed. The recent patch to IDLE, PR-24302, was to replace 'print_exception()' (ignoring excepthook) with if sys.excepthook is sys.__excepthook__: print_exception() else: try: sys.excepthook(*self.user_exc_info) except: print_exception() I suggest that the code line 148, call to sys.excepthook be wrapped similarly (adjusted to write the lines if sys.excepthook fails). IDLE's exception order is determine by the default context annotation. I don't know what the REPL does to change the output, but I prefer the default. I will prepare a PR. code tests are in test.test_code_module because test_code tests code objects. ---------- nosy: +terry.reedy stage: -> test needed type: -> behavior versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 19:03:37 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 13 Feb 2021 00:03:37 +0000 Subject: [issue38593] Python 3.7 does not catch infinite recursion for some values of sys.getrecursionlimit() In-Reply-To: <1572040268.11.0.31838216135.issue38593@roundup.psfhosted.org> Message-ID: <1613174617.98.0.264049571535.issue38593@roundup.psfhosted.org> Change by Irit Katriel : ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 19:25:21 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Feb 2021 00:25:21 +0000 Subject: [issue43177] How to use `long double` as a PyObject? In-Reply-To: <1612860000.51.0.99318031959.issue43177@roundup.psfhosted.org> Message-ID: <1613175921.57.0.818071918917.issue43177@roundup.psfhosted.org> Terry J. Reedy added the comment: You immediate questions are answered. Adding 128 bit floats to Python itself need a discussion on python-ideas and very likely a PEP. Maybe a decade? ---------- nosy: +terry.reedy resolution: -> postponed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 19:31:10 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Feb 2021 00:31:10 +0000 Subject: [issue43182] TURTLE: Default values for basic Turtle commands In-Reply-To: <1612917405.69.0.155307623071.issue43182@roundup.psfhosted.org> Message-ID: <1613176270.64.0.93826753896.issue43182@roundup.psfhosted.org> Terry J. Reedy added the comment: Enhancements only go in future versions. ---------- nosy: +terry.reedy versions: -Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 19:46:36 2021 From: report at bugs.python.org (Richie Thomas) Date: Sat, 13 Feb 2021 00:46:36 +0000 Subject: [issue41116] build on macOS 11 (beta) does not find system-supplied third-party libraries In-Reply-To: <1593100264.48.0.613850075185.issue41116@roundup.psfhosted.org> Message-ID: <1613177196.51.0.900748990979.issue41116@roundup.psfhosted.org> Richie Thomas added the comment: Hello, can you give me a few more details around the workaround for this. I am using pyenv to install 3.9.1 and not sure how I would include the xz installed using homebrew. Where do I find the setup.py or configure command? Thanks for the help! ---------- nosy: +richiejthomas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 20:03:08 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Feb 2021 01:03:08 +0000 Subject: [issue43185] AssertRaises() causes core dump in handling recursion In-Reply-To: <1612947608.83.0.497141724591.issue43185@roundup.psfhosted.org> Message-ID: <1613178188.16.0.594639029341.issue43185@roundup.psfhosted.org> Terry J. Reedy added the comment: #43185 has other recursive code that has a 'fatal Python error' in 3.9 and recovers in 3.10. Am closing it in favor of this. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 20:52:04 2021 From: report at bugs.python.org (Sanchit) Date: Sat, 13 Feb 2021 01:52:04 +0000 Subject: [issue43142] Do not add duplicate FDs to list in duplicate_for_child() In-Reply-To: <1613166202.26.0.833322106365.issue43142@roundup.psfhosted.org> Message-ID: Sanchit added the comment: But can you please add this fix in versions 3.8 & beyond? Thanks! ________________________________ From: report=bugs.python.org at roundup.psfhosted.org on behalf of Terry J. Reedy Sent: Friday, February 12, 2021 3:43 PM To: SANCHIT JAIN Subject: [issue43142] Do not add duplicate FDs to list in duplicate_for_child() Terry J. Reedy added the comment: 3.7 and before only get security fixes. ---------- nosy: +davin, pitrou, terry.reedy versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 22:14:21 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 13 Feb 2021 03:14:21 +0000 Subject: [issue43105] Can't import extension modules resolved via relative paths in sys.path on Windows In-Reply-To: <1612285380.24.0.495785451269.issue43105@roundup.psfhosted.org> Message-ID: <1613186061.94.0.721674744487.issue43105@roundup.psfhosted.org> Eryk Sun added the comment: > and it happens that "pkg" is found in a folder that is > given in sys.path as a relative path I'd prefer that Python disallowed relative paths in sys.path [1]. But since they're allowed, I think importlib at least could try to resolve relative paths in a copy of sys.path before searching. > as of 3.8 the current directory is removed from the search path, > so the .pyd is never found It happens to work prior to 3.8 even though the load uses the flag LOAD_WITH_ALTERED_SEARCH_PATH, for which it's documented that "[i]f this value is used and lpFileName specifies a relative path, the behavior is undefined". The implemented behavior with LOAD_WITH_ALTERED_SEARCH_PATH is that the directory of the given DLL filename is added to the head of the DLL search path, even though it's a relative path. Then the DLL filename is searched for like any other relative filename. For example, loading r"foo\spam.pyd" will try to load r"foo\foo\spam.pyd" (note the double "foo"), r"C:\Windows\System32\foo\spam.pyd", r"C:\Windows\System\foo\spam.pyd", r"C:\Windows\foo\spam.pyd", and so on. If the current working directory (i.e. ".") is in the DLL search path, and r"foo\spam.pyd" isn't accidentally found relative to a directory that's searched before ".", then the loader will find r".\foo\spam.pyd". Fortunately another thread can't change the working directory while the loader is searching, since the PEB lock is held. If r"foo\spam.pyd" is found and it depends on "eggs.dll", the loader will look for it first in the DLL directory, i.e. as r"foo\eggs.dll". The implicit inclusion of the working directory can be disabled or replaced with another directory via SetDllDirectoryW(), in which case the working directory will only be checked if %PATH% contains a "." entry. If it's replaced with another directory, then it's even inheritable from a SetDllDirectoryW() call in an ancestor process. 3.8+ uses the flag LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR, which requires the DLL filename to be a fully-qualified path. --- [1] That includes the "" entry in sys.path in the interactive shell. I wish it was implemented to resolve the working directory at startup instead of letting the entry vary with the current working directory. ---------- nosy: +brett.cannon, eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 22:17:36 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 13 Feb 2021 03:17:36 +0000 Subject: [issue43105] Can't import extension modules resolved via relative paths in sys.path on Windows In-Reply-To: <1612285380.24.0.495785451269.issue43105@roundup.psfhosted.org> Message-ID: <1613186256.82.0.344982204769.issue43105@roundup.psfhosted.org> Change by Eryk Sun : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 22:53:58 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Sat, 13 Feb 2021 03:53:58 +0000 Subject: [issue29515] socket module missing IPPROTO_IPV6, IPPROTO_IPV4 on Windows In-Reply-To: <1486664862.54.0.729311605676.issue29515@psf.upfronthosting.co.za> Message-ID: <1613188438.4.0.803775683631.issue29515@roundup.psfhosted.org> Jason R. Coombs added the comment: As of June last year, Python 3.7 is in security fix only mode, so there's nothing more to be done here. ---------- nosy: +jaraco resolution: -> fixed stage: patch review -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 23:08:15 2021 From: report at bugs.python.org (Ken Jin) Date: Sat, 13 Feb 2021 04:08:15 +0000 Subject: [issue8264] [doc] hasattr doesn't show private (double underscore) attributes exist In-Reply-To: <1269946346.53.0.630682854213.issue8264@psf.upfronthosting.co.za> Message-ID: <1613189295.33.0.234876925291.issue8264@roundup.psfhosted.org> Ken Jin added the comment: Thanks for merging this Ethan! I think we can close this now (unless you want me to backport this to 3.9 and 3.8 as well). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 23:11:38 2021 From: report at bugs.python.org (Dustin Rodrigues) Date: Sat, 13 Feb 2021 04:11:38 +0000 Subject: [issue41116] build on macOS 11 (beta) does not find system-supplied third-party libraries In-Reply-To: <1593100264.48.0.613850075185.issue41116@roundup.psfhosted.org> Message-ID: <1613189498.65.0.432410636626.issue41116@roundup.psfhosted.org> Dustin Rodrigues added the comment: You'll probably need to contact the pyenv project (https://github.com/pyenv/pyenv) if the following doesn't work for you. However, doing something like CFLAGS="-I$(brew --prefix)/include" CPPFLAGS="-I$(brew --prefix)/include" LDFLAGS="-L$(brew --prefix)/lib" pyenv install 3.9.1 is working for me to use the lzma module if you already have xz installed with Homebrew. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 23:20:57 2021 From: report at bugs.python.org (Richie Thomas) Date: Sat, 13 Feb 2021 04:20:57 +0000 Subject: [issue41116] build on macOS 11 (beta) does not find system-supplied third-party libraries In-Reply-To: <1613189498.65.0.432410636626.issue41116@roundup.psfhosted.org> Message-ID: Richie Thomas added the comment: That works for me. Thank you! On Fri, Feb 12, 2021 at 11:12 PM Dustin Rodrigues wrote: > > Dustin Rodrigues added the comment: > > You'll probably need to contact the pyenv project ( > https://github.com/pyenv/pyenv) if the following doesn't work for you. > However, doing something like > > CFLAGS="-I$(brew --prefix)/include" CPPFLAGS="-I$(brew --prefix)/include" > LDFLAGS="-L$(brew --prefix)/lib" pyenv install 3.9.1 > > is working for me to use the lzma module if you already have xz installed > with Homebrew. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 23:41:43 2021 From: report at bugs.python.org (Ken Jin) Date: Sat, 13 Feb 2021 04:41:43 +0000 Subject: [issue41559] Add support for PEP 612 (Parameter Specification Variables) to typing.py In-Reply-To: <1597516564.62.0.520187732663.issue41559@roundup.psfhosted.org> Message-ID: <1613191303.57.0.697063062822.issue41559@roundup.psfhosted.org> Ken Jin added the comment: Hi Guido, after a month of observing how people stumbled over the related collections.abc.Callable bugs, and experience from implementing this PEP, I learnt a few things which I think may interest you: Previously it was *recommended* that everything in typing be hashable. I would now say it is *required*. Union uses sets to de-duplicate arguments, and Optional uses Union internally. Both blow up if things aren't hashable. A surprising number of people caught the collections.abc.Callable bug because Optional[Callable[.....]] failed. Going forward, future PEPs to typing.py probably need to ensure their implementations are hashable, or risk not working with some of the types in the module itself. Alternatively, they can always change the implementations of Union and Optional, though I don't know if I recommend that ;). Thanks for your time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 23:44:50 2021 From: report at bugs.python.org (Tomas Gustavsson) Date: Sat, 13 Feb 2021 04:44:50 +0000 Subject: [issue43213] Shortcut for checking if PurePath object contains str Message-ID: <1613191490.46.0.373267052174.issue43213@roundup.psfhosted.org> New submission from Tomas Gustavsson : While using pathlib I realised there are situations where I easily want to check if part of a returned path object contains a particular given path (as a string). Today the following will give an error: ... path = PosixPath('/usr/share/doc/') if 'share' in path: ....print('Do something') The patch will make the example above work and will open up for a simple shortcut. This is my first attempt to contribute, all opinions are very welcome. I have also pushed the commit to my own branch https://github.com/tomplast/cpython/tree/implement-path-contains. ---------- components: Library (Lib) messages: 386904 nosy: tomplast priority: normal severity: normal status: open title: Shortcut for checking if PurePath object contains str versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 23:47:24 2021 From: report at bugs.python.org (Tomas Gustavsson) Date: Sat, 13 Feb 2021 04:47:24 +0000 Subject: [issue43213] Shortcut for checking if PurePath object contains str In-Reply-To: <1613191490.46.0.373267052174.issue43213@roundup.psfhosted.org> Message-ID: <1613191644.6.0.0269697852835.issue43213@roundup.psfhosted.org> Change by Tomas Gustavsson : ---------- keywords: +patch Added file: https://bugs.python.org/file49806/pure_path_contains.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 23:50:57 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Feb 2021 04:50:57 +0000 Subject: [issue43185] AssertRaises() causes core dump in handling recursion In-Reply-To: <1612947608.83.0.497141724591.issue43185@roundup.psfhosted.org> Message-ID: <1613191857.1.0.644309521844.issue43185@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- Removed message: https://bugs.python.org/msg386896 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 23:52:47 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Feb 2021 04:52:47 +0000 Subject: [issue43186] Recursive call causes core dump in assertRaises In-Reply-To: <1612948467.97.0.883928038728.issue43186@roundup.psfhosted.org> Message-ID: <1613191967.18.0.549487429157.issue43186@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Recursive call causes core dump in assertRaises _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 23:53:58 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Feb 2021 04:53:58 +0000 Subject: [issue43186] Recursive call causes core dump in assertRaises In-Reply-To: <1612948467.97.0.883928038728.issue43186@roundup.psfhosted.org> Message-ID: <1613192038.14.0.124253158846.issue43186@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- superseder: Recursive call causes core dump in assertRaises -> AssertRaises() causes core dump in handling recursion _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 23:57:17 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Feb 2021 04:57:17 +0000 Subject: [issue43200] link to copy module in shutil document, not to shutil.copy In-Reply-To: <1613042492.32.0.484655059288.issue43200@roundup.psfhosted.org> Message-ID: <1613192237.96.0.286316373991.issue43200@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 762fe7deed34a1d5294bf82071d318c8427b4893 by Zackery Spytz in branch 'master': bpo-43200: Fix link to shutil.copy() in the shutil doc (GH-24505) https://github.com/python/cpython/commit/762fe7deed34a1d5294bf82071d318c8427b4893 ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 23:57:26 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Feb 2021 04:57:26 +0000 Subject: [issue43200] link to copy module in shutil document, not to shutil.copy In-Reply-To: <1613042492.32.0.484655059288.issue43200@roundup.psfhosted.org> Message-ID: <1613192246.66.0.251752499925.issue43200@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +23307 pull_request: https://github.com/python/cpython/pull/24523 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 12 23:57:36 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Feb 2021 04:57:36 +0000 Subject: [issue43200] link to copy module in shutil document, not to shutil.copy In-Reply-To: <1613042492.32.0.484655059288.issue43200@roundup.psfhosted.org> Message-ID: <1613192256.02.0.351732969664.issue43200@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +23308 pull_request: https://github.com/python/cpython/pull/24524 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 00:06:56 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 13 Feb 2021 05:06:56 +0000 Subject: [issue43200] link to copy module in shutil document, not to shutil.copy In-Reply-To: <1613042492.32.0.484655059288.issue43200@roundup.psfhosted.org> Message-ID: <1613192816.19.0.553879660427.issue43200@roundup.psfhosted.org> miss-islington added the comment: New changeset 4230bd52e3f9f289f02e41ab17a95f50ed4db5a6 by Miss Islington (bot) in branch '3.8': bpo-43200: Fix link to shutil.copy() in the shutil doc (GH-24505) https://github.com/python/cpython/commit/4230bd52e3f9f289f02e41ab17a95f50ed4db5a6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 00:07:49 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Feb 2021 05:07:49 +0000 Subject: [issue43188] multiple operations of dict causes core dump of Python interpreter. In-Reply-To: <1612950261.11.0.487883893903.issue43188@roundup.psfhosted.org> Message-ID: <1613192869.88.0.644844992415.issue43188@roundup.psfhosted.org> Terry J. Reedy added the comment: Like the code in #43185, #43186, #43187, this works better in 3.10.0a5, so I suspect it is another duplicate. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 00:10:26 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Feb 2021 05:10:26 +0000 Subject: [issue43190] < test.support > check_free_after_iterating( ) causes core dump in handling iteration. In-Reply-To: <1612950537.99.0.387983574304.issue43190@roundup.psfhosted.org> Message-ID: <1613193026.6.0.510343731924.issue43190@roundup.psfhosted.org> Terry J. Reedy added the comment: I suspect this is another duplicate of #43185 ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 00:11:37 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Feb 2021 05:11:37 +0000 Subject: [issue43185] AssertRaises() causes core dump in handling recursion In-Reply-To: <1612947608.83.0.497141724591.issue43185@roundup.psfhosted.org> Message-ID: <1613193097.82.0.211558653537.issue43185@roundup.psfhosted.org> Terry J. Reedy added the comment: #43186, #43187 also have recursive code that fails in 3.9 and recovers in 3.10. Am closing them in favor of this. Also suspect #43188, #43189, #43190 are duplicates. Yang, recheck after Mark does the backport here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 00:20:30 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Feb 2021 05:20:30 +0000 Subject: [issue43200] link to copy module in shutil document, not to shutil.copy In-Reply-To: <1613042492.32.0.484655059288.issue43200@roundup.psfhosted.org> Message-ID: <1613193630.28.0.487432863499.issue43200@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 242f6c9ffe3dd8f613942d5364b816cc89c384be by Miss Islington (bot) in branch '3.9': bpo-43200: Fix link to shutil.copy() in the shutil doc (GH-24505) https://github.com/python/cpython/commit/242f6c9ffe3dd8f613942d5364b816cc89c384be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 00:22:10 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Feb 2021 05:22:10 +0000 Subject: [issue43200] link to copy module in shutil document, not to shutil.copy In-Reply-To: <1613042492.32.0.484655059288.issue43200@roundup.psfhosted.org> Message-ID: <1613193730.19.0.00195824119083.issue43200@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- assignee: docs at python -> terry.reedy resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 00:52:12 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Feb 2021 05:52:12 +0000 Subject: [issue43205] Python Turtle Colour In-Reply-To: <1613129304.56.0.0860365755934.issue43205@roundup.psfhosted.org> Message-ID: <1613195532.68.0.559468487066.issue43205@roundup.psfhosted.org> Terry J. Reedy added the comment: Python consistently uses American (USA) vocabulary and spellings for its English. Anyone over, say, 14, should learn them to the extent used in Python. Kids under 10 are different. Issue 24990 was rejected because it proposed to hardcode translation. A software solution would be a different matter. I have some ideas, but the details would depend on how Python is setup for kids to use. Vedran, #24990, issue24990, and issue 24990 all link to the bpo url *and* indicate whether the issue is open or closed. (24990 is closed as rejected.) ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 00:57:18 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Feb 2021 05:57:18 +0000 Subject: [issue43142] Do not add duplicate FDs to list in duplicate_for_child() In-Reply-To: <1612590631.17.0.238793980684.issue43142@roundup.psfhosted.org> Message-ID: <1613195838.9.0.272372470198.issue43142@roundup.psfhosted.org> Terry J. Reedy added the comment: I can't (lacking multiprocessing knowledge), but someone else might. PS: when replying via email, please delete post you are responding to. When added to the web page, the copy is redundant noise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 01:49:28 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 13 Feb 2021 06:49:28 +0000 Subject: [issue43202] Cleanup codeop._maybe_compile In-Reply-To: <1613077616.54.0.579438220954.issue43202@roundup.psfhosted.org> Message-ID: <1613198968.17.0.524384341463.issue43202@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset b676f5f809007533db3e3fdd01243959dd233d57 by Terry Jan Reedy in branch 'master': bpo-43202: More codeop._maybe_compile clean-ups (GH-24512) https://github.com/python/cpython/commit/b676f5f809007533db3e3fdd01243959dd233d57 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 02:50:27 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 13 Feb 2021 07:50:27 +0000 Subject: [issue43211] Python is not responding after running program In-Reply-To: <1613166912.2.0.538494691419.issue43211@roundup.psfhosted.org> Message-ID: <1613202627.38.0.854998518619.issue43211@roundup.psfhosted.org> Steven D'Aprano added the comment: Hi Diasy, welcome! Please don't post screen shots of code. That makes it difficult or impossible for the blind and visually impaired to contribute, and it means that we have to retype your code from scratch to run it, which may introduce new errors. Instead, please copy and paste the code as text into your bug report, or attach it as a .py file. I'm not entirely sure what your bug report is here. Your program is stuck in a loop: while True: wn.update which does nothing and goes nowhere. (By the way, I think you forgot to call the update method: it should be `wn.update()` with round brackets.) Does the program respond to you typing Ctrl-C? You might need to do that from your command line or IDE, the "Pong" window itself probably won't respond to it. So I'm not sure what bug you think you have found. It looks like it is probably running normally to me. (Disclaimer: I am not using Mac OS, so perhaps the behaviour is different on my machine than on yours.) ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 03:53:26 2021 From: report at bugs.python.org (Inada Naoki) Date: Sat, 13 Feb 2021 08:53:26 +0000 Subject: [issue43214] site: Potential UnicodeDecodeError when handling pth file Message-ID: <1613206406.27.0.848192620201.issue43214@roundup.psfhosted.org> New submission from Inada Naoki : https://github.com/python/cpython/blob/4230bd52e3f9f289f02e41ab17a95f50ed4db5a6/Lib/site.py#L160 ``` f = io.TextIOWrapper(io.open_code(fullname)) ``` When default text encoding is not UTF-8 and pth file contains non-ASCII character, it will raise UnicodeDecodeError. ---------- components: Library (Lib) keywords: 3.8regression messages: 386916 nosy: methane priority: normal severity: normal status: open title: site: Potential UnicodeDecodeError when handling pth file type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 03:55:43 2021 From: report at bugs.python.org (Inada Naoki) Date: Sat, 13 Feb 2021 08:55:43 +0000 Subject: [issue43214] site: Potential UnicodeDecodeError when handling pth file In-Reply-To: <1613206406.27.0.848192620201.issue43214@roundup.psfhosted.org> Message-ID: <1613206543.87.0.136543348818.issue43214@roundup.psfhosted.org> Change by Inada Naoki : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 04:10:02 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Sat, 13 Feb 2021 09:10:02 +0000 Subject: [issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py In-Reply-To: <1612626856.83.0.902540623753.issue43146@roundup.psfhosted.org> Message-ID: <1613207402.34.0.746845664847.issue43146@roundup.psfhosted.org> Miro Hron?ok added the comment: JFYI, there are 2 affected Fedora packages (that we know of): visidata fails to build with Python 3.10: AttributeError: 'NoneType' object has no attribute '__suppress_context__' https://bugzilla.redhat.com/show_bug.cgi?id=1928145 python-utils fails to build with Python 3.10: AttributeError: 'NoneType' object has no attribute '__suppress_context__' https://bugzilla.redhat.com/show_bug.cgi?id=1928081 ---------- nosy: +hroncok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 04:12:29 2021 From: report at bugs.python.org (Christoph Reiter) Date: Sat, 13 Feb 2021 09:12:29 +0000 Subject: [issue41374] socket.TCP_* no longer available with cygwin 3.1.6+ In-Reply-To: <1595490704.07.0.649120374256.issue41374@roundup.psfhosted.org> Message-ID: <1613207549.48.0.067763631563.issue41374@roundup.psfhosted.org> Christoph Reiter added the comment: ping. The PR looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 06:08:00 2021 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Sat, 13 Feb 2021 11:08:00 +0000 Subject: [issue43213] Shortcut for checking if PurePath object contains str In-Reply-To: <1613191490.46.0.373267052174.issue43213@roundup.psfhosted.org> Message-ID: <1613214480.01.0.320778116316.issue43213@roundup.psfhosted.org> Vedran ?a?i? added the comment: While it might be useful, I don't think it is what you want. For example, you wouldn't say it contains 'r/sh', right? I think it should only refer to full names of path parts. ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 06:56:47 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Feb 2021 11:56:47 +0000 Subject: [issue43213] Shortcut for checking if PurePath object contains str In-Reply-To: <1613191490.46.0.373267052174.issue43213@roundup.psfhosted.org> Message-ID: <1613217407.1.0.177645417195.issue43213@roundup.psfhosted.org> Serhiy Storchaka added the comment: Path is not string, and it was made not string-like intentionally. Otherwise it would be made a subclass of str. If you want to check whether a string is a substring of the string representation of the path, just do it explicitly: 'share' in str(path). But in most cases it is not what the user intended. There were several propositions about implementing "in" (and iteration, these operations are related and should be consistent). The problem is that there several different meaning of that operation. Should it check that the directory referred by the path contains the specified file name? Or that the path contains the specified path component? Or that one path is a subpath of other path? Or that the specified string is a substring of the string representation of the path? (The latter proposition is the least useful.) It is better to avoid ambiguity, so all these proposition were rejected. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 07:10:02 2021 From: report at bugs.python.org (Tomas Gustavsson) Date: Sat, 13 Feb 2021 12:10:02 +0000 Subject: [issue43213] Shortcut for checking if PurePath object contains str In-Reply-To: <1613214480.01.0.320778116316.issue43213@roundup.psfhosted.org> Message-ID: Tomas Gustavsson added the comment: Okay, maybe a bad example. But let's say I want to find all folders and files but filter out those which contains .git,.svn in the paths. Anyhow, I believe this minor feature would make such use cases (and other) more clean and intuitive. I am lazy and I like when things work without me having to write more lines or characters then I need. On Sat, 13 Feb 2021, 12:08 Vedran ?a?i? wrote: > > Vedran ?a?i? added the comment: > > While it might be useful, I don't think it is what you want. For example, > you wouldn't say it contains 'r/sh', right? I think it should only refer to > full names of path parts. > > ---------- > nosy: +veky > > _______________________________________ > Python tracker > > _______________________________________ > ---------- title: Shortcut for checking if PurePath object contains str -> Shortcut for checking if PurePath object contains str _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 07:13:28 2021 From: report at bugs.python.org (Tomas Gustavsson) Date: Sat, 13 Feb 2021 12:13:28 +0000 Subject: [issue43213] Shortcut for checking if PurePath object contains str In-Reply-To: <1613217407.1.0.177645417195.issue43213@roundup.psfhosted.org> Message-ID: Tomas Gustavsson added the comment: Sorry Serhiy, missed your answer there. I understand your point. I guess I'll have to look for other things to help with :) Thank you for the answer. Guess this can be closed then. Best regards Tomas On Sat, 13 Feb 2021, 12:57 Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > Path is not string, and it was made not string-like intentionally. > Otherwise it would be made a subclass of str. > > If you want to check whether a string is a substring of the string > representation of the path, just do it explicitly: 'share' in str(path). > But in most cases it is not what the user intended. > > There were several propositions about implementing "in" (and iteration, > these operations are related and should be consistent). The problem is that > there several different meaning of that operation. Should it check that the > directory referred by the path contains the specified file name? Or that > the path contains the specified path component? Or that one path is a > subpath of other path? Or that the specified string is a substring of the > string representation of the path? (The latter proposition is the least > useful.) It is better to avoid ambiguity, so all these proposition were > rejected. > > ---------- > nosy: +serhiy.storchaka > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 07:17:19 2021 From: report at bugs.python.org (Barry Alan Scott) Date: Sat, 13 Feb 2021 12:17:19 +0000 Subject: [issue43155] PyCMethod_New not defined in python3.lib In-Reply-To: <1612721158.76.0.287250699598.issue43155@roundup.psfhosted.org> Message-ID: <1613218639.09.0.419061609052.issue43155@roundup.psfhosted.org> Barry Alan Scott added the comment: Thanks Petr, I'll watch for the PEP. FYI: I work on the assumption that if I use Py_LIMITED_API and the header files provide an API guarded by an #if then its "offical". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 07:34:58 2021 From: report at bugs.python.org (Alex Shpilkin) Date: Sat, 13 Feb 2021 12:34:58 +0000 Subject: [issue42580] ctypes.util.find_library("libc") fails In-Reply-To: <1607251833.68.0.530621101082.issue42580@roundup.psfhosted.org> Message-ID: <1613219698.74.0.195686352266.issue42580@roundup.psfhosted.org> Change by Alex Shpilkin : ---------- nosy: +Alex Shpilkin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 09:34:54 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Feb 2021 14:34:54 +0000 Subject: [issue43213] Shortcut for checking if PurePath object contains str In-Reply-To: <1613191490.46.0.373267052174.issue43213@roundup.psfhosted.org> Message-ID: <1613226894.81.0.354306926754.issue43213@roundup.psfhosted.org> Serhiy Storchaka added the comment: I guess that you need to use the parts attribute. Note that `'share' in str(path)` and `'share' in path.parts` are two very different things, even if they can give the same result in some cases. When reply be email, please remove the quoted text. It makes reading difficult, especially for people with disabilities. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 09:39:32 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 13 Feb 2021 14:39:32 +0000 Subject: [issue43205] Python Turtle Colour In-Reply-To: <1613129304.56.0.0860365755934.issue43205@roundup.psfhosted.org> Message-ID: <1613227172.23.0.0836021768086.issue43205@roundup.psfhosted.org> Serhiy Storchaka added the comment: If issue24990 is closed, this issue should be closed as well, as it is just a particular case of issue24990. ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Foreign language support in turtle module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 10:16:36 2021 From: report at bugs.python.org (Illia Volochii) Date: Sat, 13 Feb 2021 15:16:36 +0000 Subject: [issue43215] Document Happy Eyeballs arguments of asyncio.open_connection Message-ID: <1613229396.78.0.230354163599.issue43215@roundup.psfhosted.org> New submission from Illia Volochii : The problem is similar to https://bugs.python.org/issue39128. It is not documented that asyncio.open_connection accepts happy_eyeballs_delay and interleave that are passed to loop.create_connection. https://docs.python.org/3/library/asyncio-stream.html#asyncio.open_connection ---------- assignee: docs at python components: Documentation, asyncio messages: 386926 nosy: asvetlov, docs at python, illia-v, yselivanov priority: normal severity: normal status: open title: Document Happy Eyeballs arguments of asyncio.open_connection type: enhancement versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 10:19:35 2021 From: report at bugs.python.org (Illia Volochii) Date: Sat, 13 Feb 2021 15:19:35 +0000 Subject: [issue43215] Document Happy Eyeballs arguments of asyncio.open_connection In-Reply-To: <1613229396.78.0.230354163599.issue43215@roundup.psfhosted.org> Message-ID: <1613229575.95.0.0232097278554.issue43215@roundup.psfhosted.org> Change by Illia Volochii : ---------- keywords: +patch pull_requests: +23310 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24525 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 11:47:55 2021 From: report at bugs.python.org (Illia Volochii) Date: Sat, 13 Feb 2021 16:47:55 +0000 Subject: [issue43216] Removal of @asyncio.coroutine in Python 3.10 Message-ID: <1613234875.25.0.783359316655.issue43216@roundup.psfhosted.org> New submission from Illia Volochii : It looks like @asyncio.coroutine was scheduled to be removed in Python 3.10. Is it still relevant? https://bugs.python.org/issue36921 https://docs.python.org/3.10/library/asyncio-task.html#asyncio.coroutine ---------- components: asyncio messages: 386927 nosy: asvetlov, illia-v, yselivanov priority: normal severity: normal status: open title: Removal of @asyncio.coroutine in Python 3.10 versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 15:09:49 2021 From: report at bugs.python.org (Irit Katriel) Date: Sat, 13 Feb 2021 20:09:49 +0000 Subject: [issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py In-Reply-To: <1612626856.83.0.902540623753.issue43146@roundup.psfhosted.org> Message-ID: <1613246989.69.0.0412136256703.issue43146@roundup.psfhosted.org> Irit Katriel added the comment: > I wonder what the rationale was. It isn't because these functions never raise. I think it's because sys.exc_info() can return None, None, None when there is no exceptions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 16:08:26 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Sat, 13 Feb 2021 21:08:26 +0000 Subject: [issue42819] readline 8.1 bracketed paste In-Reply-To: <1609707155.89.0.22999518491.issue42819@roundup.psfhosted.org> Message-ID: <1613250506.74.0.898050524881.issue42819@roundup.psfhosted.org> Miro Hron?ok added the comment: This also affects Fedora 34+ ---------- nosy: +hroncok, petr.viktorin, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 19:43:47 2021 From: report at bugs.python.org (misianne) Date: Sun, 14 Feb 2021 00:43:47 +0000 Subject: [issue43217] tkinter style map return value in alt theme Message-ID: <1613263427.18.0.457810123469.issue43217@roundup.psfhosted.org> New submission from misianne : The return value for ttk.style().map('Treeview') is wrong for the 'background' value in the 'alt' theme: tuple are missing. Tcl alt Treeview map: -foreground {disabled #a3a3a3 {!disabled !selected} black selected #ffffff} -background {disabled #d9d9d9 {!disabled !selected} #ffffff selected #4a6984} tkinter alt Treeview map: { 'foreground': [('disabled', '#a3a3a3'), ('!disabled', '!selected', 'black'), ('selected', '#ffffff')], 'background': ['disabled', '#d9d9d9', '!disabled !selected', '#ffffff', 'selected', '#4a6984'] } It should be: 'background': [('disabled', '#d9d9d9'), ('!disabled !selected', '#ffffff'), ('selected', '#4a6984')] ---------- components: Tkinter messages: 386930 nosy: misianne priority: normal severity: normal status: open title: tkinter style map return value in alt theme type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 13 23:36:16 2021 From: report at bugs.python.org (Neel Gore) Date: Sun, 14 Feb 2021 04:36:16 +0000 Subject: [issue43218] after venv activation "which python3" and sys.path both give base installation instead of venv Message-ID: <1613277376.58.0.951553755579.issue43218@roundup.psfhosted.org> New submission from Neel Gore : Fresh python 3.9.1 installation on macOS, shell is zsh activated a venv with "python3 -m venv .venv" activated with "source .venv/bin./activate" "which python3" and "which pip3" both show my base installation ---------- components: macOS files: Screen Shot 2021-02-13 at 8.31.20 PM.png messages: 386931 nosy: ned.deily, neeltennis, ronaldoussoren priority: normal severity: normal status: open title: after venv activation "which python3" and sys.path both give base installation instead of venv type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file49807/Screen Shot 2021-02-13 at 8.31.20 PM.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 00:16:28 2021 From: report at bugs.python.org (Jeremy Pinto) Date: Sun, 14 Feb 2021 05:16:28 +0000 Subject: [issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist Message-ID: <1613279788.4.0.734801709372.issue43219@roundup.psfhosted.org> New submission from Jeremy Pinto : Issue: If you try to copy a file to a directory that doesn't exist using shutil.copy, a IsADirectory error is raised saying the directory exists. This issue is actually caused when `open(not_a_dir, 'wb') is called on a non-existing dir. Expected behaviour: Should instead raise NotADirectoryError ----------------------------- Steps to reproduce: [nav] In [1]: import os ...: from pathlib import Path ...: from shutil import copy ...: ...: tmp_file = '/tmp/some_file.txt' ...: Path(tmp_file).touch() ...: nonexistent_dir = 'not_a_dir/' ...: assert not os.path.exists(nonexistent_dir) ...: copy(tmp_file, nonexistent_dir) --------------------------------------------------------------------------- IsADirectoryError Traceback (most recent call last) in 7 nonexistent_dir = 'not_a_dir/' 8 assert not os.path.exists(nonexistent_dir) ----> 9 copy(tmp_file, nonexistent_dir) ~/miniconda3/lib/python3.7/shutil.py in copy(src, dst, follow_symlinks) 243 if os.path.isdir(dst): 244 dst = os.path.join(dst, os.path.basename(src)) --> 245 copyfile(src, dst, follow_symlinks=follow_symlinks) 246 copymode(src, dst, follow_symlinks=follow_symlinks) 247 return dst ~/miniconda3/lib/python3.7/shutil.py in copyfile(src, dst, follow_symlinks) 119 else: 120 with open(src, 'rb') as fsrc: --> 121 with open(dst, 'wb') as fdst: 122 copyfileobj(fsrc, fdst) 123 return dst IsADirectoryError: [Errno 21] Is a directory: 'not_a_dir/' ---------- messages: 386932 nosy: jerpint priority: normal severity: normal status: open title: shutil.copy raises IsADirectoryError when the directory does not actually exist versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 00:28:45 2021 From: report at bugs.python.org (Jeremy Pinto) Date: Sun, 14 Feb 2021 05:28:45 +0000 Subject: [issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist In-Reply-To: <1613279788.4.0.734801709372.issue43219@roundup.psfhosted.org> Message-ID: <1613280525.5.0.683307122825.issue43219@roundup.psfhosted.org> Jeremy Pinto added the comment: In fact, the issue seems to be coming from open() itself when opening a non-existent directory in write mode: [nav] In [1]: import os ...: nonexixstent_dir = 'not_a_dir/' ...: assert not os.path.exists(nonexixstent_dir) ...: with open(nonexixstent_dir, 'wb') as fdst: ...: pass --------------------------------------------------------------------------- IsADirectoryError Traceback (most recent call last) in 2 dir_path = 'not_a_dir/' 3 assert not os.path.exists(nonexixstent_dir) ----> 4 with open(nonexixstent_dir, 'wb') as fdst: 5 pass IsADirectoryError: [Errno 21] Is a directory: 'not_a_dir/' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 01:34:45 2021 From: report at bugs.python.org (Keith Smiley) Date: Sun, 14 Feb 2021 06:34:45 +0000 Subject: [issue43220] Explicit default required arguments with add_mutually_exclusive_group are rejected Message-ID: <1613284485.11.0.495534943099.issue43220@roundup.psfhosted.org> New submission from Keith Smiley : With this code: ``` import argparse parser = argparse.ArgumentParser() group = parser.add_mutually_exclusive_group(required=True) group.add_argument("--foo", default="1") group.add_argument("--bar") args = parser.parse_args() print(args) ``` When you explicitly pass `--foo 1`, it is treated as if no argument was passed: ``` % python3 /tmp/bug.py --foo 1 usage: bug.py [-h] (--foo FOO | --bar BAR) bug.py: error: one of the arguments --foo --bar is required ``` I can't tell if this behavior is intentional, but it was surprising to me. It also seems to be somewhat based on the length of the default string. For example on my macOS machine if I change the default to `longerstring` it does not have this issue. ---------- components: Library (Lib) messages: 386934 nosy: keith priority: normal severity: normal status: open title: Explicit default required arguments with add_mutually_exclusive_group are rejected versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 01:37:39 2021 From: report at bugs.python.org (Keith Smiley) Date: Sun, 14 Feb 2021 06:37:39 +0000 Subject: [issue43220] Explicit default required arguments with add_mutually_exclusive_group are rejected In-Reply-To: <1613284485.11.0.495534943099.issue43220@roundup.psfhosted.org> Message-ID: <1613284659.85.0.415345057053.issue43220@roundup.psfhosted.org> Change by Keith Smiley : ---------- keywords: +patch pull_requests: +23311 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24526 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 01:49:04 2021 From: report at bugs.python.org (Eryk Sun) Date: Sun, 14 Feb 2021 06:49:04 +0000 Subject: [issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist In-Reply-To: <1613279788.4.0.734801709372.issue43219@roundup.psfhosted.org> Message-ID: <1613285344.43.0.125678321145.issue43219@roundup.psfhosted.org> Eryk Sun added the comment: > IsADirectoryError: [Errno 21] Is a directory: 'not_a_dir/' The trailing slash forces the OS to handle "not_a_dir" as a directory [1]. A pathname that contains at least one non- character and that ends with one or more trailing characters shall not be resolved successfully unless the last pathname component before the trailing characters names an existing directory or a directory entry that is to be created for a directory immediately after the pathname is resolved. Mode "w" corresponds to low-level POSIX open() flags O_CREAT | O_TRUNC | O_WRONLY. If write access is requested for a directory, the open() system call must fail with EISDIR [2]. [EISDIR] The named file is a directory and oflag includes O_WRONLY or O_RDWR, or includes O_CREAT without O_DIRECTORY. In most cases, opening a directory with O_CREAT also fails with E_ISDIR. POSIX does permit an implementation to create a directory with O_CREAT | O_DIRECTORY. In Linux, however, O_CREAT always creates a regular file, regardless of O_DIRECTORY, so open(pathname, O_CREAT | flags) always fails with EISDIR when pathname is an existing directory or names a directory by way of a trailing slash. --- [1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13 [2] https://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 01:54:55 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 14 Feb 2021 06:54:55 +0000 Subject: [issue43152] warning: unused variable 'code' In-Reply-To: <1612682222.13.0.322888481152.issue43152@roundup.psfhosted.org> Message-ID: <1613285695.86.0.249657186389.issue43152@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 3cf0833f42ebde24f6435b838785ca4f946b988f by Dong-hee Na in branch 'master': bpo-43152: Update assert statement to remove unused warning (GH-24473) https://github.com/python/cpython/commit/3cf0833f42ebde24f6435b838785ca4f946b988f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 01:55:48 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 14 Feb 2021 06:55:48 +0000 Subject: [issue43152] warning: unused variable 'code' In-Reply-To: <1612682222.13.0.322888481152.issue43152@roundup.psfhosted.org> Message-ID: <1613285748.37.0.71719184873.issue43152@roundup.psfhosted.org> Dong-hee Na added the comment: Now this issue is solved Thank you Victor as the reviewer ;) ---------- nosy: +vstinner resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 02:03:40 2021 From: report at bugs.python.org (Max Parry) Date: Sun, 14 Feb 2021 07:03:40 +0000 Subject: [issue43221] German Text Conversion Using Upper() and Lower() Message-ID: <1613286220.83.0.234888054811.issue43221@roundup.psfhosted.org> New submission from Max Parry : The German alphabet has four extra characters (?, ?, ? and ?) when compared to the UK/USA alphabet. Until 2017 the character ? was normally only lower case. Upper case ? was represented by SS. In 2017 upper case ? was introduced, although SS is still often/usually used instead. It is important to note that, as far as I can see, upper case ? and lower case ? are identical. The upper() method converts upper or lower case ? to SS. N.B. ?, ? and ? are handled correctly. Lower() seems to work correctly. Please note that German is my second language and everything I say about the language, its history and its use might not be reliable. Happy to be corrected. ---------- components: Windows messages: 386938 nosy: Strongbow, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: German Text Conversion Using Upper() and Lower() type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 02:42:09 2021 From: report at bugs.python.org (Eryk Sun) Date: Sun, 14 Feb 2021 07:42:09 +0000 Subject: [issue43221] German Text Conversion Using Upper() and Lower() In-Reply-To: <1613286220.83.0.234888054811.issue43221@roundup.psfhosted.org> Message-ID: <1613288529.72.0.102561383623.issue43221@roundup.psfhosted.org> Eryk Sun added the comment: Python uses standard Unicode character properties, as defined by the Unicode Consortium. This issue is discussed in their FAQ [1]: Q: Why does ? (U+00DF LATIN SMALL LETTER SHARP S) not uppercase to U+1E9E LATIN CAPITAL LETTER SHARP S by default? A: In standard German orthography, the sharp s ("?") used to be exclusively uppercased to a sequence of two capital S characters. This longstanding practice is reflected in the default case mappings in Unicode. A capital form of ? is sometimes preferred for typographic reasons or to avoid ambiguity, such as in uppercase names as found in passports. It is encoded in the Unicode Standard as U+1E9E. While this character is not widely used, [it] is now recognized in the official orthography as an optional uppercase form of ? in addition to "SS". Because it is only an optional alternative, the original mapping to "SS" is retained in the Unicode character properties. --- [1] http://unicode.org/faq/casemap_charprop.html#11 ---------- nosy: +eryksun resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 02:44:30 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sun, 14 Feb 2021 07:44:30 +0000 Subject: [issue43221] German Text Conversion Using Upper() and Lower() In-Reply-To: <1613286220.83.0.234888054811.issue43221@roundup.psfhosted.org> Message-ID: <1613288670.36.0.49049204616.issue43221@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I guess this was discussed a few times in different issues. See also https://bugs.python.org/issue34928 ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 02:47:46 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 14 Feb 2021 07:47:46 +0000 Subject: [issue43221] German Text Conversion Using Upper() and Lower() In-Reply-To: <1613286220.83.0.234888054811.issue43221@roundup.psfhosted.org> Message-ID: <1613288866.67.0.199481455576.issue43221@roundup.psfhosted.org> Steven D'Aprano added the comment: >>> '\N{LATIN SMALL LETTER SHARP S}' '?' >>> '\N{LATIN CAPITAL LETTER SHARP S}' '?' The history of ? is complicated and differs in the Germany speaking countries of Austria, Switzerland and Germany, but the short version is that the uppercase version only became *officially* recognised by Germany in the 21st century, although it was unofficially in use back in the first half of the 20th century. As far as I can tell, official German spelling rules still have uppercase of ? being SS, although that may be changing. In any case, regardless of what the German, Austrian or Swiss German speakers do, Python will follow the Unicode rules, and that still has ? map to SS by default. Any change in behaviour would have to be limited to Python 3.10 as 3.9 is in feature-freeze. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 03:17:10 2021 From: report at bugs.python.org (Philip) Date: Sun, 14 Feb 2021 08:17:10 +0000 Subject: [issue43222] Regular expression split fails on 3.6 and not 2.7 or 3.7+ Message-ID: <1613290630.55.0.329403737317.issue43222@roundup.psfhosted.org> New submission from Philip : I am receiving an unexpected behavior in using regular expressions for splitting a string. It seems like this error exists in `python 3.6` but not `python 2.7` and not `python 3.7+`. Below I have described a minimal example with `tox`. `setup.py` ``` from setuptools import setup setup( name='my-tox-tested-package', version='0.0.1', install_requires=["pytest"] ) ``` `tests/test_re.py` ``` import re import pytest _DIGIT_BOUNDARY_RE = re.compile( r'(?<=\D)(?=\d)|(?<=\d)(?=\D)' ) def test(): _DIGIT_BOUNDARY_RE.split("10.0.0") ``` `tox.ini` ``` [tox] envlist = py27, py36, py37 requires= pytest [testenv] commands = pytest {posargs: tests} ``` ``` ============================================= FAILURES ================================ _____________________________________________ test ____________________________________ def test(): > _DIGIT_BOUNDARY_RE.split("10.0.0") E ValueError: split() requires a non-empty pattern match. tests/test_god.py:9: ValueError ============================================ short test summary info ================== ... ============================================ test session starts ====================== platform linux -- Python 3.7.5, pytest-6.2.2, py-1.10.0, pluggy-0.13.1 rootdir: /home/probinson/code collected 1 item tests/test_re.py . [100%] ============================================ 1 passed in 0.00s ========================= ____________________________________________ summary ___________________________________ py27: commands succeeded ERROR: py36: commands failed py37: commands succeeded ``` ---------- components: Regular Expressions messages: 386942 nosy: ezio.melotti, mrabarnett, probinso priority: normal severity: normal status: open title: Regular expression split fails on 3.6 and not 2.7 or 3.7+ type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 04:19:37 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Feb 2021 09:19:37 +0000 Subject: [issue43222] Regular expression split fails on 3.6 and not 2.7 or 3.7+ In-Reply-To: <1613290630.55.0.329403737317.issue43222@roundup.psfhosted.org> Message-ID: <1613294377.69.0.561664707736.issue43222@roundup.psfhosted.org> Serhiy Storchaka added the comment: There was a bug in the regular expression engine which caused re.split() working incorrectly with zero-width patterns. Note that in your example _DIGIT_BOUNDARY_RE.split("10.0.0") returns ['10.0.0'] on Python 2.7 -- the result which you unlikely expected. It was impossible to fix that bug without changing behavior of other functions in corner cases and breaking existing code. So we first made re.split() raising an exception instead of returning nonsensical result and added warnings for some other cases to help users to catch potential bugs in their code and avoid ambiguous patterns. You see this in 3.6. In 3.7 we fixed the underlying bug. It caused breakage of some user code, but it made regular expressions more consistent in long perspective and made zero-width patterns more usable. In your particular case, if you still need to support Python 2.7 and 3.6, try to use re.split() with pattern r'(\D+)' or r'(\d+)' (parentheses are meaningful here). It gives almost the same result, except possible prepended and appended empty strings. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 05:47:08 2021 From: report at bugs.python.org (Masoud Azizi) Date: Sun, 14 Feb 2021 10:47:08 +0000 Subject: [issue43134] (list have item) instate (item in list) In-Reply-To: <1612520450.63.0.525292396869.issue43134@roundup.psfhosted.org> Message-ID: <1613299628.99.0.134361832188.issue43134@roundup.psfhosted.org> Masoud Azizi added the comment: Linus makes the Linux kernel without expecting benefits. USA start a war against German and Japan in ww2 without expecting benefits. Some times we should not think about benefits, just we will do it, if its the right thing. A child never will not born for benefits. It just born cuz thats only true way to be alive to learn walking well, thinking well and speaking well... With humans, with computers. Linus never said that to himself forget that it have not benefits. He continued without having any observer for his work.you know why? Cuz its the only way to do it without reversing the rules. And at the end he reversed the rules! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 06:42:36 2021 From: report at bugs.python.org (Hamza AVvan) Date: Sun, 14 Feb 2021 11:42:36 +0000 Subject: [issue43223] Open Redirection In Python 3.7 & 3.8 Message-ID: <1613302956.91.0.878390782912.issue43223@roundup.psfhosted.org> New submission from Hamza AVvan : The provided version of python distros 3.8.7 and 3.7.4 are vulnerable to open redirection while traversing to an existing directory. # PAYLOAD http://127.0.0.1:8000//attacker.com/..%2f..%2f..%2f..%2f..%2f../%0a%0d/../.ssh In this case, the actual path of .ssh was: http://127.0.0.1:8000/.ssh Upon visiting the payload URI the python server will respond back with a Location header instead of serving the directory contents directly which triggers the redirection to attacker.com Server: SimpleHTTP/0.6 Python/3.8.7 ---------- components: Windows files: Capture.PNG messages: 386945 nosy: hamzaavvan, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Open Redirection In Python 3.7 & 3.8 type: security versions: Python 3.7, Python 3.8 Added file: https://bugs.python.org/file49808/Capture.PNG _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 06:54:42 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Feb 2021 11:54:42 +0000 Subject: [issue43217] tkinter style map return value in alt theme In-Reply-To: <1613263427.18.0.457810123469.issue43217@roundup.psfhosted.org> Message-ID: <1613303682.24.0.288668134268.issue43217@roundup.psfhosted.org> Serhiy Storchaka added the comment: What is our OS and Python version. I cannot reproduce this on Linux, perhaps it is OS-specific. Try to test with the latest Python release. Maybe this bug was fixed in issue42328. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 07:44:25 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 14 Feb 2021 12:44:25 +0000 Subject: [issue2941] Propagate define to resurce mingw32 compile In-Reply-To: <1211451506.25.0.765395098834.issue2941@psf.upfronthosting.co.za> Message-ID: <1613306665.28.0.936847539919.issue2941@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> out of date stage: test needed -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 07:48:20 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 14 Feb 2021 12:48:20 +0000 Subject: [issue28926] subprocess.Popen + Sqlalchemy doesn't wait for process In-Reply-To: <1481316937.81.0.393153740651.issue28926@psf.upfronthosting.co.za> Message-ID: <1613306900.02.0.880187168712.issue28926@roundup.psfhosted.org> Irit Katriel added the comment: There isn't enough information here to understand what the issue is. If you are still having this issue in Python 3, please create a new ticket with code to reproduce it and information about the system you are using. ---------- resolution: -> rejected stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 07:50:28 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 14 Feb 2021 12:50:28 +0000 Subject: [issue21567] cannot create multipart alternative message with us-ascii charset In-Reply-To: <1400885983.53.0.980235742965.issue21567@psf.upfronthosting.co.za> Message-ID: <1613307028.12.0.612722648266.issue21567@roundup.psfhosted.org> Irit Katriel added the comment: Works for me: Python 3.10.0a5+ (heads/master:bf2e7e55d7, Feb 11 2021, 23:09:25) [MSC v.1928 64 bit (AMD64)] on win32 >>> from email.mime.multipart import MIMEMultipart >>> new_msg = MIMEMultipart('alternative') >>> new_msg.set_charset('us-ascii') >>> ---------- resolution: -> out of date stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 08:04:30 2021 From: report at bugs.python.org (misianne) Date: Sun, 14 Feb 2021 13:04:30 +0000 Subject: [issue43217] tkinter style map return value in alt theme In-Reply-To: <1613263427.18.0.457810123469.issue43217@roundup.psfhosted.org> Message-ID: <1613307870.22.0.500335868458.issue43217@roundup.psfhosted.org> misianne added the comment: My os is windows 7, Python 3.8.6. Obviously, I can't test it on 3.9+. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 08:33:33 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 14 Feb 2021 13:33:33 +0000 Subject: [issue43216] Removal of @asyncio.coroutine in Python 3.10 In-Reply-To: <1613234875.25.0.783359316655.issue43216@roundup.psfhosted.org> Message-ID: <1613309613.77.0.780232178302.issue43216@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +aeros _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 09:14:48 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 14 Feb 2021 14:14:48 +0000 Subject: [issue43210] Fix inaccurate byteswap comment in sha512module.c In-Reply-To: <1613159159.15.0.0115331421083.issue43210@roundup.psfhosted.org> Message-ID: <1613312088.19.0.415808239173.issue43210@roundup.psfhosted.org> Dong-hee Na added the comment: Thank you Erlend! ---------- nosy: +corona10 resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 09:14:51 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 14 Feb 2021 14:14:51 +0000 Subject: [issue43210] Fix inaccurate byteswap comment in sha512module.c In-Reply-To: <1613159159.15.0.0115331421083.issue43210@roundup.psfhosted.org> Message-ID: <1613312091.39.0.0569234897529.issue43210@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 1b57426e3a7842b4e6f9fc13ffb657c78e5443d4 by Erlend Egeberg Aasland in branch 'master': bpo-43210: Fix byteswap comment in sha512.module.c (GH-24518) https://github.com/python/cpython/commit/1b57426e3a7842b4e6f9fc13ffb657c78e5443d4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 09:53:16 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 14 Feb 2021 14:53:16 +0000 Subject: [issue43204] Fix LibTom URL's in hashlib comments In-Reply-To: <1613125643.6.0.405533024429.issue43204@roundup.psfhosted.org> Message-ID: <1613314396.61.0.916678827078.issue43204@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 7777ae2ff7ba04ad20424db4efcc67246ff27b95 by Miss Islington (bot) in branch '3.8': bpo-43204: Fix LibTomCrypt URL in md5module.c and sha*module.c comments (GH-24507) (GH-24516) https://github.com/python/cpython/commit/7777ae2ff7ba04ad20424db4efcc67246ff27b95 ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 09:57:12 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 14 Feb 2021 14:57:12 +0000 Subject: [issue43204] Fix LibTom URL's in hashlib comments In-Reply-To: <1613125643.6.0.405533024429.issue43204@roundup.psfhosted.org> Message-ID: <1613314632.65.0.241439405534.issue43204@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 10:18:59 2021 From: report at bugs.python.org (misianne) Date: Sun, 14 Feb 2021 15:18:59 +0000 Subject: [issue43217] tkinter style map return value in alt theme In-Reply-To: <1613263427.18.0.457810123469.issue43217@roundup.psfhosted.org> Message-ID: <1613315939.55.0.541884319117.issue43217@roundup.psfhosted.org> misianne added the comment: Tested W10 Python 3.9.1: map output is OK. It is a problem of Python 3.8.6 under W7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 10:27:08 2021 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 14 Feb 2021 15:27:08 +0000 Subject: [issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1613316428.45.0.27612415676.issue42967@roundup.psfhosted.org> Senthil Kumaran added the comment: I finished reviewing this PR https://github.com/python/cpython/pull/24297 With the contexts given in W3C recommendation, Synk.io Security Report and pattern of usage in libraries like werkzeug and bottle, instead of ignoring this and letting this behavior be handled at proxy software level, addressing this in stdlib as safe-guard seems like a much better choice to me. The change and the approach taken by Adam's patch looks good to me. I have requested for documentation updates and news entry and it will be merged for Python 3.10 and ported to earlier versions. - Fixing this in 3.10 is going to break behavior of software which relied on both "&" and ";" as query parameter separator. Only a single separator will be allowed, and it will default to &. This will be mentioned in documentation. - As we back-port this to security releases of python, a rationale can be added on this change. The documentation or news entry could help developers with their plans to upgrade. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 10:42:42 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Feb 2021 15:42:42 +0000 Subject: [issue43217] tkinter style map return value in alt theme In-Reply-To: <1613263427.18.0.457810123469.issue43217@roundup.psfhosted.org> Message-ID: <1613317362.65.0.137783882348.issue43217@roundup.psfhosted.org> Serhiy Storchaka added the comment: Tested on Python 3.8.6 and 3.8.7+, Windows 10. On 3.8.6 the bug is reproduced, on 3.8.7+ all works as expected. ---------- resolution: -> out of date stage: -> resolved status: open -> closed superseder: -> ttk style.map function incorrectly handles the default state for element options. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 11:20:47 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 14 Feb 2021 16:20:47 +0000 Subject: [issue43218] after venv activation "which python3" and sys.path both give base installation instead of venv In-Reply-To: <1613277376.58.0.951553755579.issue43218@roundup.psfhosted.org> Message-ID: <1613319647.08.0.631446350846.issue43218@roundup.psfhosted.org> Eric V. Smith added the comment: Please do not post screen captures. It makes it difficult for users with accessibility software and it makes it hard for people trying to help you to copy and paste exactly what you've tried. I'm unable to duplicate your problem. [~]$ ps PID TTY TIME CMD 27521 ttys000 0:00.07 -zsh [~]$ which python3 /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 [~]$ python3 -m venv .venv [~]$ source .venv/bin/activate (.venv) [~]$ which python3 /Users/ericsmith/.venv/bin/python3 ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 12:21:47 2021 From: report at bugs.python.org (Matthew Rahtz) Date: Sun, 14 Feb 2021 17:21:47 +0000 Subject: [issue43224] Add support for PEP 646 (Variadic Generics) to typing.py Message-ID: <1613323307.22.0.4954496456.issue43224@roundup.psfhosted.org> Change by Matthew Rahtz : ---------- components: Library (Lib) nosy: mrahtz priority: normal severity: normal status: open title: Add support for PEP 646 (Variadic Generics) to typing.py versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 12:22:42 2021 From: report at bugs.python.org (Matthew Rahtz) Date: Sun, 14 Feb 2021 17:22:42 +0000 Subject: [issue43224] Add support for PEP 646 (Variadic Generics) to typing.py Message-ID: <1613323362.21.0.605110177669.issue43224@roundup.psfhosted.org> Change by Matthew Rahtz : ---------- keywords: +patch nosy: +matthew.rahtz nosy_count: 1.0 -> 2.0 pull_requests: +23313 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24527 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 12:35:01 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 14 Feb 2021 17:35:01 +0000 Subject: [issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1613324101.2.0.816213717749.issue42967@roundup.psfhosted.org> ?ric Araujo added the comment: I also have concerns about specifics of the implementation (see PR) and in general the behaviour change in point releases. Maybe have a thread on python-dev? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 12:47:15 2021 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 14 Feb 2021 17:47:15 +0000 Subject: [issue43134] (list have item) instate (item in list) In-Reply-To: <1612520450.63.0.525292396869.issue43134@roundup.psfhosted.org> Message-ID: <1613324835.09.0.134387401195.issue43134@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: -mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 13:01:24 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 14 Feb 2021 18:01:24 +0000 Subject: [issue42129] Support resources in namespace packages In-Reply-To: <1603469006.87.0.128715336786.issue42129@roundup.psfhosted.org> Message-ID: <1613325684.43.0.30546560198.issue42129@roundup.psfhosted.org> Jason R. Coombs added the comment: For the first two errors, the issue seems to be that CPython includes tests for the ResourceReader ABC and asserts that .contents() returns an empty list as the default degenerate behavior (https://github.com/python/cpython/blob/1b57426e3a7842b4e6f9fc13ffb657c78e5443d4/Lib/test/test_importlib/test_abc.py#L340-L341). It appears that the ABC in importlib_resources has for a [very long time raised FileNotFound](https://github.com/python/importlib_resources/commit/e82b5675b9fef7dd971b796136687f915f7a39ca). Oh, this is interesting - these ABCs have diverged since their inception; here's where [both the empty list behavior and test were introduced in cpython](https://github.com/python/cpython/commit/4ac5150e068a3a795ef00465f6dff51747b62b91) and [later amended to return an iterable instead of iterator](https://github.com/python/cpython/commit/3ab9365dca8438f89b2060cd3eebe00606133dc4). Brett, is this a divergence worth maintaining? Do you recall if there was a reason for changing the ABC during the port to CPython? There's no mention of 'contents' in issue32248. My temptation is to go with the implementation as found in importlib_resources as it presents a more consistent interface for ResourceReaders (and explicitly defaults to raising FileNotFoundError when no implementation for contents is present) and thus to change the test to: ``` cpython master $ git diff Lib/test/test_importlib/test_abc.py diff --git a/Lib/test/test_importlib/test_abc.py b/Lib/test/test_importlib/test_abc.py index d8b9fc89f2..d1c89c183b 100644 --- a/Lib/test/test_importlib/test_abc.py +++ b/Lib/test/test_importlib/test_abc.py @@ -338,7 +338,9 @@ def test_is_resource(self): self.ins.is_resource('dummy_file') def test_contents(self): - self.assertEqual([], list(self.ins.contents())) + with self.assertRaises(FileNotFoundError): + self.ins.contents() + (Frozen_RRDefaultTests, Source_RRDefaultsTests ``` Brett, let me know if you have concern about harmonizing the two implementations around this behavior and if you have a strong preference for harmonizing toward the CPython implementation instead. Thanks. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 13:15:58 2021 From: report at bugs.python.org (Keith Smiley) Date: Sun, 14 Feb 2021 18:15:58 +0000 Subject: [issue43220] Explicit default required arguments with add_mutually_exclusive_group are rejected In-Reply-To: <1613284485.11.0.495534943099.issue43220@roundup.psfhosted.org> Message-ID: <1613326558.98.0.582713078239.issue43220@roundup.psfhosted.org> Keith Smiley added the comment: Here's an example outside of argparse showing this is caused by the `is` comparison with interned string: ``` import sys short_string = sys.argv[1] short_default = '1' long_string = sys.argv[2] long_default = 'not-interned' print(f"short comparisons: id1: {id(short_default)} id2: {id(short_string)}, eq: {short_default == short_string}, is: {short_default is short_string}") print(f"long comparisons: id1: {id(long_default)} id2: {id(long_string)}, eq: {long_default == long_string}, is: {long_default is long_string}") ``` ``` % ./python.exe /tmp/foo.py 1 not-interned short comparisons: id1: 4523386416 id2: 4523386416, eq: True, is: True long comparisons: id1: 4524440064 id2: 4523395296, eq: True, is: False ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 13:26:29 2021 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 14 Feb 2021 18:26:29 +0000 Subject: [issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1613327189.02.0.414371298102.issue42967@roundup.psfhosted.org> Senthil Kumaran added the comment: ?ric, I considered the possibility of bringing it in python-dev, but thought it could be decided in this ticket itself. 1. This was already brought up by multiple Release Managers in Python-dev, and some conversation seems to have happened there previously, especially regarding backwards incompatiblity. Ofcourse, we didn't debate the implementation, but debating that seems to better to focused here and in OR. On wider group, we only to acknowledge that a backwards incompatibility is introduced. 2. Other interested core-devs seems to have given shared their thoughts early in the bug too. So, once I reviewed these, I thought, it seems to okay for us to make a decision here. If there is anything particular you wanted to bring, we could. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 15:46:13 2021 From: report at bugs.python.org (Emmanuel Arias) Date: Sun, 14 Feb 2021 20:46:13 +0000 Subject: [issue43225] Add missing value returned by methods on cookiejar Message-ID: <1613335573.68.0.765301079654.issue43225@roundup.psfhosted.org> New submission from Emmanuel Arias : Documentation say that return something but don't specific what value is returned, and that can be confuse. ---------- assignee: docs at python components: Documentation messages: 386961 nosy: docs at python, eamanu priority: normal severity: normal status: open title: Add missing value returned by methods on cookiejar type: enhancement versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 15:46:34 2021 From: report at bugs.python.org (Emmanuel Arias) Date: Sun, 14 Feb 2021 20:46:34 +0000 Subject: [issue43225] Add missing value returned by methods on cookiejar In-Reply-To: <1613335573.68.0.765301079654.issue43225@roundup.psfhosted.org> Message-ID: <1613335594.23.0.163883119489.issue43225@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- keywords: +patch pull_requests: +23314 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24522 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 16:01:00 2021 From: report at bugs.python.org (Dustin Rodrigues) Date: Sun, 14 Feb 2021 21:01:00 +0000 Subject: [issue43218] after venv activation "which python3" and sys.path both give base installation instead of venv In-Reply-To: <1613277376.58.0.951553755579.issue43218@roundup.psfhosted.org> Message-ID: <1613336460.9.0.671387502032.issue43218@roundup.psfhosted.org> Dustin Rodrigues added the comment: I'm also unable to replicate this. Where did you install Python from? Which version of zsh are you running? ---------- nosy: +dtrodrigues _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 16:02:05 2021 From: report at bugs.python.org (Emmanuel Arias) Date: Sun, 14 Feb 2021 21:02:05 +0000 Subject: [issue43225] Add missing value returned by methods on cookiejar In-Reply-To: <1613335573.68.0.765301079654.issue43225@roundup.psfhosted.org> Message-ID: <1613336525.14.0.310922152481.issue43225@roundup.psfhosted.org> Emmanuel Arias added the comment: Sorry I left nothing of information. On https://docs.python.org/3/library/http.cookiejar.html?highlight=http%20cookiejar#http.cookiejar.DefaultCookiePolicy.is_blocked and https://docs.python.org/3/library/http.cookiejar.html?highlight=http%20cookiejar#http.cookiejar.DefaultCookiePolicy.is_not_allowed docs mention that is_blocked and is_not_allowed methods "return whether *domain*..." but not mention what is return. So I added looking in the code, that this methods "return ``True`` whether *domain*..." IMO that is more clear. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 17:10:46 2021 From: report at bugs.python.org (Neel Gore) Date: Sun, 14 Feb 2021 22:10:46 +0000 Subject: [issue43218] after venv activation "which python3" and sys.path both give base installation instead of venv In-Reply-To: <1613277376.58.0.951553755579.issue43218@roundup.psfhosted.org> Message-ID: <1613340646.45.0.244628360993.issue43218@roundup.psfhosted.org> Neel Gore added the comment: zsh 5.8 (x86_64-apple-darwin20.0) and macOS Big Sur 11.2.1 This was the normal python dot org installation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 17:21:16 2021 From: report at bugs.python.org (Ned Deily) Date: Sun, 14 Feb 2021 22:21:16 +0000 Subject: [issue43218] after venv activation "which python3" and sys.path both give base installation instead of venv In-Reply-To: <1613277376.58.0.951553755579.issue43218@roundup.psfhosted.org> Message-ID: <1613341276.4.0.18697015713.issue43218@roundup.psfhosted.org> Ned Deily added the comment: Are you sure there wasn't an existing virtual environment at .venv? By default, venv does not upgrade an existing environment. Try deleting the .venv directory first, assuming there is nothing in the environment you want to save. Otherwise you could try debugging the shell steps with the shell command: set -x and, if necessary, debugging the python environment with: python3 -m test.pythoninfo https://docs.python.org/3.9/library/venv.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 17:35:09 2021 From: report at bugs.python.org (Neel Gore) Date: Sun, 14 Feb 2021 22:35:09 +0000 Subject: [issue43218] after venv activation "which python3" and sys.path both give base installation instead of venv In-Reply-To: <1613277376.58.0.951553755579.issue43218@roundup.psfhosted.org> Message-ID: <1613342109.3.0.373317320227.issue43218@roundup.psfhosted.org> Neel Gore added the comment: Just ran: neelgore at Neels-MacBook-Pro Project 4:5 % rm -r .venv neelgore at Neels-MacBook-Pro Project 4:5 % which python3 /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 neelgore at Neels-MacBook-Pro Project 4:5 % python3 -m venv .venv neelgore at Neels-MacBook-Pro Project 4:5 % source .venv/bin/activate (.venv) neelgore at Neels-MacBook-Pro Project 4:5 % which python3 /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 (.venv) neelgore at Neels-MacBook-Pro Project 4:5 % ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 17:40:09 2021 From: report at bugs.python.org (DoctorDan) Date: Sun, 14 Feb 2021 22:40:09 +0000 Subject: [issue43226] build from 3.9.1 tarball on WSL failed Message-ID: <1613342409.04.0.51116148793.issue43226@roundup.psfhosted.org> New submission from DoctorDan : Attempted to build 3.9.1 on WSL from tarball Python-3.9.1.tar.xz Make - succeeded Make test - Many tests failed Make install - failed Attaching the tail end of the console trace. The scrollback buffer was not big enough to accomodate the whole thing. If there is a log file I don't know where it is. ---------- components: Build files: tail of make test log.txt messages: 386967 nosy: DoctorDan priority: normal severity: normal status: open title: build from 3.9.1 tarball on WSL failed type: compile error versions: Python 3.9 Added file: https://bugs.python.org/file49809/tail of make test log.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 17:42:10 2021 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 14 Feb 2021 22:42:10 +0000 Subject: [issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1613342530.41.0.93714686195.issue42967@roundup.psfhosted.org> Senthil Kumaran added the comment: New changeset fcbe0cb04d35189401c0c880ebfb4311e952d776 by Adam Goldschmidt in branch 'master': bpo-42967: only use '&' as a query string separator (#24297) https://github.com/python/cpython/commit/fcbe0cb04d35189401c0c880ebfb4311e952d776 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 17:42:59 2021 From: report at bugs.python.org (Neel Gore) Date: Sun, 14 Feb 2021 22:42:59 +0000 Subject: [issue43218] after venv activation "which python3" and sys.path both give base installation instead of venv In-Reply-To: <1613277376.58.0.951553755579.issue43218@roundup.psfhosted.org> Message-ID: <1613342579.69.0.404339359173.issue43218@roundup.psfhosted.org> Neel Gore added the comment: (sorry for double message) update: Just created a venv in Desktop and another in a directory in Documents and got the correct behavior both times. Seems like the issue is isolated to the certain directory? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 17:43:10 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 14 Feb 2021 22:43:10 +0000 Subject: [issue43218] after venv activation "which python3" and sys.path both give base installation instead of venv In-Reply-To: <1613277376.58.0.951553755579.issue43218@roundup.psfhosted.org> Message-ID: <1613342590.88.0.876809513731.issue43218@roundup.psfhosted.org> Eric V. Smith added the comment: Where did you install Python from? Before you've activated the virtual env, please run "echo $PATH". After you've activated the virtual env, can you run "ls -l .venv/bin" and "echo $PATH"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 17:46:21 2021 From: report at bugs.python.org (Ned Deily) Date: Sun, 14 Feb 2021 22:46:21 +0000 Subject: [issue43218] after venv activation "which python3" and sys.path both give base installation instead of venv In-Reply-To: <1613277376.58.0.951553755579.issue43218@roundup.psfhosted.org> Message-ID: <1613342781.21.0.962285765435.issue43218@roundup.psfhosted.org> Ned Deily added the comment: It could be that the activate is failing for some reason in that directory or terminal session. Try it in a new terminal session after entering "set -x" so you can see the expanded commands. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 17:54:49 2021 From: report at bugs.python.org (Neel Gore) Date: Sun, 14 Feb 2021 22:54:49 +0000 Subject: [issue43218] after venv activation "which python3" and sys.path both give base installation instead of venv In-Reply-To: <1613277376.58.0.951553755579.issue43218@roundup.psfhosted.org> Message-ID: <1613343289.24.0.130580915564.issue43218@roundup.psfhosted.org> Neel Gore added the comment: This is Python 3.9.1 from the normal python.org download. Before venv activation, "echo $PATH" gives: /Library/Frameworks/Python.framework/Versions/3.9/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public After activation, "ls -l .venv/bin" gives: total 88 -rw-rw-r-- 1 neelgore staff 8834 Feb 14 14:51 Activate.ps1 -rw-rw-r-- 1 neelgore staff 1942 Feb 14 14:51 activate -rw-rw-r-- 1 neelgore staff 891 Feb 14 14:51 activate.csh -rw-rw-r-- 1 neelgore staff 2031 Feb 14 14:51 activate.fish -rwxr-xr-x 1 neelgore staff 327 Feb 14 14:51 easy_install -rwxr-xr-x 1 neelgore staff 327 Feb 14 14:51 easy_install-3.9 -rwxr-xr-x 1 neelgore staff 318 Feb 14 14:51 pip -rwxr-xr-x 1 neelgore staff 318 Feb 14 14:51 pip3 -rwxr-xr-x 1 neelgore staff 318 Feb 14 14:51 pip3.9 lrwxr-xr-x 1 neelgore staff 7 Feb 14 14:51 python -> python3 lrwxr-xr-x 1 neelgore staff 61 Feb 14 14:51 python3 -> /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 lrwxr-xr-x 1 neelgore staff 7 Feb 14 14:51 python3.9 -> python3 and "echo $PATH" gives: /Users/neelgore/Documents/UC Irvine/Y1/Q2/ICS 32/Project 4:5/.venv/bin:/Library/Frameworks/Python.framework/Versions/3.9/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 17:57:34 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 14 Feb 2021 22:57:34 +0000 Subject: [issue43218] after venv activation "which python3" and sys.path both give base installation instead of venv In-Reply-To: <1613277376.58.0.951553755579.issue43218@roundup.psfhosted.org> Message-ID: <1613343454.5.0.953547890329.issue43218@roundup.psfhosted.org> Eric V. Smith added the comment: Thanks. I?m guessing the space in the path is causing a problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 18:07:14 2021 From: report at bugs.python.org (Dustin Rodrigues) Date: Sun, 14 Feb 2021 23:07:14 +0000 Subject: [issue43218] after venv activation "which python3" and sys.path both give base installation instead of venv In-Reply-To: <1613277376.58.0.951553755579.issue43218@roundup.psfhosted.org> Message-ID: <1613344034.99.0.262717268221.issue43218@roundup.psfhosted.org> Dustin Rodrigues added the comment: What's the name of the current directory? Does it end with "Project 4:5"? It may be the colon in the directory name is interfering with the PATH parsing so that the shell thinks that the first two entries in your path after the venv activate are /Users/neelgore/Documents/UC Irvine/Y1/Q2/ICS 32/Project 4 5/.venv/bin instead of "/Users/neelgore/Documents/UC Irvine/Y1/Q2/ICS 32/Project 4:5/.venv/bin" being the first entry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 18:17:32 2021 From: report at bugs.python.org (Dustin Rodrigues) Date: Sun, 14 Feb 2021 23:17:32 +0000 Subject: [issue43218] after venv activation "which python3" and sys.path both give base installation instead of venv In-Reply-To: <1613277376.58.0.951553755579.issue43218@roundup.psfhosted.org> Message-ID: <1613344652.18.0.598104945566.issue43218@roundup.psfhosted.org> Dustin Rodrigues added the comment: FWIW, it looks like spaces in directory names in macOS seem to be handled okay in both bash and zsh when working with venv's activate script. Colons do not and there doesn't appear to be a workaround other than not working in a directory with a colon in its name when you want to include that directory in your PATH. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 18:21:54 2021 From: report at bugs.python.org (Neel Gore) Date: Sun, 14 Feb 2021 23:21:54 +0000 Subject: [issue43218] after venv activation "which python3" and sys.path both give base installation instead of venv In-Reply-To: <1613277376.58.0.951553755579.issue43218@roundup.psfhosted.org> Message-ID: <1613344914.1.0.0454191122212.issue43218@roundup.psfhosted.org> Neel Gore added the comment: Ah in hindsight I see why this was troublesome; the directory name was "Project 4/5", and zsh was displaying the / with a :. Renaming the directory to "Project 4_5" fixed the problem. Thanks everyone! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 18:23:18 2021 From: report at bugs.python.org (Ned Deily) Date: Sun, 14 Feb 2021 23:23:18 +0000 Subject: [issue43218] after venv activation "which python3" and sys.path both give base installation instead of venv In-Reply-To: <1613277376.58.0.951553755579.issue43218@roundup.psfhosted.org> Message-ID: <1613344998.25.0.190295850354.issue43218@roundup.psfhosted.org> Change by Ned Deily : ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 18:38:14 2021 From: report at bugs.python.org (Bruce Fuda) Date: Sun, 14 Feb 2021 23:38:14 +0000 Subject: [issue43182] TURTLE: Default values for basic Turtle commands In-Reply-To: <1612917405.69.0.155307623071.issue43182@roundup.psfhosted.org> Message-ID: <1613345894.21.0.930284569667.issue43182@roundup.psfhosted.org> Bruce Fuda added the comment: Added turtle experts to nosy list ---------- nosy: +gregorlingl, willingc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 19:52:28 2021 From: report at bugs.python.org (Thomas Nabelek) Date: Mon, 15 Feb 2021 00:52:28 +0000 Subject: [issue43227] Backslashes in function arguments in f-string expressions Message-ID: <1613350348.46.0.298135234419.issue43227@roundup.psfhosted.org> New submission from Thomas Nabelek : >From https://www.python.org/dev/peps/pep-0498/#escape-sequences: "Backslashes may not appear inside the expression portions of f-strings" Is this supposed to be true even for arguments to functions inside of the expression? my_str = "test\ test\ test" path = f"{my_str.replace(r'\ ', ' ')}" gives my_str = "test\ test\ test" path = f"{my_str.replace(r'\ ', ' ')}" SyntaxError: f-string expression part cannot include a backslash ---------- messages: 386978 nosy: nabelekt priority: normal severity: normal status: open title: Backslashes in function arguments in f-string expressions type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 19:57:57 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 15 Feb 2021 00:57:57 +0000 Subject: [issue43227] Backslashes in function arguments in f-string expressions In-Reply-To: <1613350348.46.0.298135234419.issue43227@roundup.psfhosted.org> Message-ID: <1613350677.69.0.641362715456.issue43227@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 20:00:22 2021 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 15 Feb 2021 01:00:22 +0000 Subject: [issue43227] Backslashes in function arguments in f-string expressions In-Reply-To: <1613350348.46.0.298135234419.issue43227@roundup.psfhosted.org> Message-ID: <1613350822.19.0.797395567171.issue43227@roundup.psfhosted.org> Eric V. Smith added the comment: Yes, they're prohibited anywhere inside of the braces {}. This might be relaxed in the future, but through 3.9 it's still enforced. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 20:38:58 2021 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 15 Feb 2021 01:38:58 +0000 Subject: [issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1613353138.09.0.695691013816.issue42967@roundup.psfhosted.org> Change by Senthil Kumaran : ---------- pull_requests: +23315 pull_request: https://github.com/python/cpython/pull/24528 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 21:01:38 2021 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 15 Feb 2021 02:01:38 +0000 Subject: [issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1613354498.26.0.775108553186.issue42967@roundup.psfhosted.org> Change by Senthil Kumaran : ---------- pull_requests: +23316 pull_request: https://github.com/python/cpython/pull/24529 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 21:15:39 2021 From: report at bugs.python.org (Dustin Rodrigues) Date: Mon, 15 Feb 2021 02:15:39 +0000 Subject: [issue43218] after venv activation "which python3" and sys.path both give base installation instead of venv In-Reply-To: <1613277376.58.0.951553755579.issue43218@roundup.psfhosted.org> Message-ID: <1613355339.69.0.791366674942.issue43218@roundup.psfhosted.org> Change by Dustin Rodrigues : ---------- pull_requests: +23317 pull_request: https://github.com/python/cpython/pull/24530 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 21:24:34 2021 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 15 Feb 2021 02:24:34 +0000 Subject: [issue43227] Backslashes in function arguments in f-string expressions In-Reply-To: <1613350348.46.0.298135234419.issue43227@roundup.psfhosted.org> Message-ID: <1613355874.8.0.21619693077.issue43227@roundup.psfhosted.org> Change by Eric V. Smith : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 21:33:34 2021 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 15 Feb 2021 02:33:34 +0000 Subject: [issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1613356414.86.0.558962357766.issue42967@roundup.psfhosted.org> Change by Senthil Kumaran : ---------- pull_requests: +23318 pull_request: https://github.com/python/cpython/pull/24531 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 14 22:05:50 2021 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 15 Feb 2021 03:05:50 +0000 Subject: [issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1613358350.15.0.999720780233.issue42967@roundup.psfhosted.org> Change by Senthil Kumaran : ---------- pull_requests: +23319 pull_request: https://github.com/python/cpython/pull/24532 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 03:13:16 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 08:13:16 +0000 Subject: [issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1613376796.62.0.878737222263.issue42967@roundup.psfhosted.org> STINNER Victor added the comment: I agree with changing the default in Python 3.6-3.10. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 03:15:10 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 08:15:10 +0000 Subject: [issue42819] readline 8.1 bracketed paste In-Reply-To: <1609707155.89.0.22999518491.issue42819@roundup.psfhosted.org> Message-ID: <1613376910.74.0.860772401854.issue42819@roundup.psfhosted.org> STINNER Victor added the comment: > Readline 8.1 enables bracketed paste by default. Can you try to find why it changed the default? Why should Python change the default readline default behavior? ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 03:21:36 2021 From: report at bugs.python.org (=?utf-8?q?Miro_Hron=C4=8Dok?=) Date: Mon, 15 Feb 2021 08:21:36 +0000 Subject: [issue42819] readline 8.1 bracketed paste In-Reply-To: <1609707155.89.0.22999518491.issue42819@roundup.psfhosted.org> Message-ID: <1613377296.91.0.0498951623109.issue42819@roundup.psfhosted.org> Miro Hron?ok added the comment: https://lists.gnu.org/archive/html/bug-readline/2020-11/msg00010.html https://lists.gnu.org/archive/html/bug-bash/2020-10/msg00048.html https://lists.gnu.org/archive/html/bug-bash/2020-10/msg00087.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 03:38:09 2021 From: report at bugs.python.org (John Paul Adrian Glaubitz) Date: Mon, 15 Feb 2021 08:38:09 +0000 Subject: [issue43179] Remove s390 support In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613378289.94.0.391783332361.issue43179@roundup.psfhosted.org> John Paul Adrian Glaubitz added the comment: I'm a Debian Developer and maintainer for multiple Debian Ports architectures. Please don't remove support for Alpha, HPPA, m68k, ia64, PowerPC, SuperH, SPARC as we're still maintaining these in Debian. Here are the latest build results for Python3.9 in Debian with build logs for all these architectures: > https://buildd.debian.org/status/package.php?p=python3.9&suite=sid There are no issues reported and we heavily rely on Python. ---------- nosy: +glaubitz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 03:40:54 2021 From: report at bugs.python.org (John Paul Adrian Glaubitz) Date: Mon, 15 Feb 2021 08:40:54 +0000 Subject: [issue43179] Remove s390 support In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613378454.62.0.5638335339.issue43179@roundup.psfhosted.org> John Paul Adrian Glaubitz added the comment: And, FWIW, I generally don't quite understand what the problem with old triplet definitions in configure.ac are. I assume they don't hurt anyone, do they? You never know what usecases your users have and as long as a code snippet doesn't interfere with other code, I don't see little point in removing it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 04:15:22 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 15 Feb 2021 09:15:22 +0000 Subject: [issue43179] Remove s390 support In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613380522.33.0.433707727856.issue43179@roundup.psfhosted.org> Christian Heimes added the comment: It's about setting expectations. For some users, the presence of a platform triplet implies support for a platform. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 04:23:28 2021 From: report at bugs.python.org (John Paul Adrian Glaubitz) Date: Mon, 15 Feb 2021 09:23:28 +0000 Subject: [issue43179] Remove s390 support In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613381008.27.0.790645938212.issue43179@roundup.psfhosted.org> John Paul Adrian Glaubitz added the comment: That's an argument I have personally never heard before and I have been dealing with a lot of architecture support in many packages. FWIW, lots of upstream projects have targets which are officially supported and others which are there but not supported and that was never really a problem. As long as the architectures are being maintained in the Linux kernel, GCC, binutils and glibc, they can be considered usable and maintained. The m68k architecture for example has a very active and large community due to the popularity of retro computing. This has lead to efforts which will soon bring Rust support to M68k and the Amiga. I therefore don't really understand what you gain when you make it harder for downstreams to use Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 04:29:32 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 09:29:32 +0000 Subject: [issue42819] readline 8.1 bracketed paste In-Reply-To: <1609707155.89.0.22999518491.issue42819@roundup.psfhosted.org> Message-ID: <1613381372.33.0.801931936123.issue42819@roundup.psfhosted.org> STINNER Victor added the comment: I didn't know "bracketed paste mode". It seems like a protocol between a terminal and the user to add markers before/after a pasted text. https://cirw.in/blog/bracketed-paste """ In summary: 1. Enable bracketed paste: printf "\e[?2004h" 2. Wait for paste to start: you?ll see \e[200~ on STDIN. 3. Wait for paste to stop: you?ll see \e[201~ on STDIN. 4. Disable bracketed paste: printf "\e[?2004l" """ I understand that this mode prevents to run arbitrary command when pasting blindly an untrusted command copied from a webpage, like this example: https://thejh.net/misc/website-terminal-copy-paste It can be enabled explicitly by adding "set enable-bracketed-paste" on to your ~/.inputrc configuration file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 04:46:06 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 09:46:06 +0000 Subject: [issue42819] readline 8.1 bracketed paste In-Reply-To: <1609707155.89.0.22999518491.issue42819@roundup.psfhosted.org> Message-ID: <1613382366.15.0.589749146831.issue42819@roundup.psfhosted.org> STINNER Victor added the comment: On my Fedora 33 (readline-8.0-5.fc33.x86_64), I enabled the bracketed paste mode by adding "set enable-bracketed-paste" on to my ~/.inputrc config file. When I test https://thejh.net/misc/website-terminal-copy-paste : the evil command is no long executed. If I copy/paste "1+1" and "2+2" commands (two lines pasted at once) manually in the Python REPL, they are no longer executed immediately, Python waits for me pressing ENTER to execute, *as expected*: ---- $ ./python Python 3.10.0a5+ (heads/master:fcbe0cb04d, Feb 15 2021, 10:30:10) [GCC 10.2.1 20201125 (Red Hat 10.2.1-9)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> 1+1 2+2 ---- But using "./python -i < commands", each line is executed immediately and Python exits after displaying the results: --- $ cat commands 1+1 2+2 $ ./python -i < commands Python 3.10.0a5+ (heads/master:fcbe0cb04d, Feb 15 2021, 10:30:10) >>> 2 >>> 4 >>> --- If I disable again bracketed mode (ex: remove ~/.inputrc file in my case), when I copy/paste manually the two commands at once, they are executed again, as expected: --- $ ./python >>> 1+1 2 >>> 2+2 4 --- The bracketed paste mode can be enabled explicitly in Python with this patch to simulate readline 8.1 default behavior: diff --git a/Modules/readline.c b/Modules/readline.c index c900e07954..ce8662c000 100644 --- a/Modules/readline.c +++ b/Modules/readline.c @@ -217,6 +217,7 @@ readline_read_init_file_impl(PyObject *module, PyObject *filename_obj) errno = rl_read_init_file(NULL); if (errno) return PyErr_SetFromErrno(PyExc_OSError); + rl_variable_bind ("enable-bracketed-paste", "on"); Py_RETURN_NONE; } All of these behavior look consistent, correct and expected. Note: When I redirect Python output into a file, I cannot see "\e[?2004h" (likely because stdout is not a TTY if it's redirected into a file), so I'm not sure how to check if this escape sequence is injected in Python stdout or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 04:46:51 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 09:46:51 +0000 Subject: [issue42819] readline 8.1 bracketed paste In-Reply-To: <1609707155.89.0.22999518491.issue42819@roundup.psfhosted.org> Message-ID: <1613382411.95.0.390773085518.issue42819@roundup.psfhosted.org> STINNER Victor added the comment: Oh, I forgot to mention that I ran my tests in Gnome Terminal 3.38.1-2.fc33. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 04:49:01 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 09:49:01 +0000 Subject: [issue32019] Interactive shell doesn't work with readline bracketed paste In-Reply-To: <1510614151.97.0.213398074469.issue32019@psf.upfronthosting.co.za> Message-ID: <1613382541.28.0.233165592104.issue32019@roundup.psfhosted.org> STINNER Victor added the comment: I mark this issue as a duplicate of bpo-39820. ---------- nosy: +vstinner resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Bracketed paste mode for REPL _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 04:49:20 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 09:49:20 +0000 Subject: [issue39820] Bracketed paste mode for REPL In-Reply-To: <1583105435.88.0.337448475427.issue39820@roundup.psfhosted.org> Message-ID: <1613382560.63.0.521807065742.issue39820@roundup.psfhosted.org> STINNER Victor added the comment: I marked bpo-32019 as a duplicate of this issue. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 04:55:23 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 09:55:23 +0000 Subject: [issue39820] Bracketed paste mode for REPL: don't execute pasted command before ENTER is pressed explicitly In-Reply-To: <1583105435.88.0.337448475427.issue39820@roundup.psfhosted.org> Message-ID: <1613382923.11.0.543701965024.issue39820@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Bracketed paste mode for REPL -> Bracketed paste mode for REPL: don't execute pasted command before ENTER is pressed explicitly _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 04:58:48 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 09:58:48 +0000 Subject: [issue39820] Bracketed paste mode for REPL: don't execute pasted command before ENTER is pressed explicitly In-Reply-To: <1583105435.88.0.337448475427.issue39820@roundup.psfhosted.org> Message-ID: <1613383128.44.0.42137210102.issue39820@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-42819 "readline 8.1 bracketed paste". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 05:03:33 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 10:03:33 +0000 Subject: [issue42819] readline 8.1 bracketed paste In-Reply-To: <1609707155.89.0.22999518491.issue42819@roundup.psfhosted.org> Message-ID: <1613383413.03.0.505689343804.issue42819@roundup.psfhosted.org> STINNER Victor added the comment: Related issue: test_pdb_interaction_doctest test of pytest fails on Fedora Rawhide because of a "\x1b[?2004h" string: * https://github.com/pytest-dev/pytest/issues/8256 * https://bugzilla.redhat.com/show_bug.cgi?id=1892612 It fails with readline 8.1 which enables bracketed mode by default, but it fails with any readline version if ~/.inputrc contains "set enable-bracketed-paste on". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 05:07:56 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 10:07:56 +0000 Subject: [issue42819] readline 8.1 bracketed paste In-Reply-To: <1609707155.89.0.22999518491.issue42819@roundup.psfhosted.org> Message-ID: <1613383676.37.0.494898727306.issue42819@roundup.psfhosted.org> STINNER Victor added the comment: https://lists.gnu.org/archive/html/bug-readline/2020-11/msg00010.html says that bracketed mode is turned off if the terminal type is "dumb". Setting TERM env var to dumb gives me a surprising behavior when I paste "1+1\n2+2" in Python REPL: --- $ TERM=dumb python3 Python 3.9.1 (default, Jan 20 2021, 00:00:00) >>> ^J1+1^J2+2^J --- If I press ENTER, I get: --- >>> ^J1+1^J2+2^J File "", line 1 1+1 2+2 ^ SyntaxError: multiple statements found while compiling a single statement >>> --- Note: if I redirect Python output into a file ("python3 > output"), I get a different behavior since stdout is no longer a TTY. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 05:09:56 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 10:09:56 +0000 Subject: [issue42819] readline 8.1 enables the bracketed paste mode by default In-Reply-To: <1609707155.89.0.22999518491.issue42819@roundup.psfhosted.org> Message-ID: <1613383796.93.0.268793779597.issue42819@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: readline 8.1 bracketed paste -> readline 8.1 enables the bracketed paste mode by default _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 05:17:49 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 10:17:49 +0000 Subject: [issue42819] readline 8.1 enables the bracketed paste mode by default In-Reply-To: <1609707155.89.0.22999518491.issue42819@roundup.psfhosted.org> Message-ID: <1613384269.59.0.768716299625.issue42819@roundup.psfhosted.org> STINNER Victor added the comment: There are different things: * Bracketed paste mode prevents to execute malicious command copied from evil internet web pages * Python REPL is not really convenient in the bracked paste mode: bpo-39820 * Users are not used to the bracketed mode which gives a surprising behavior in Python REPL * Copy/paste in a shell running in a graphical terminal is fine in bracketed mode, since users running a shell are used to modify a command before running and to run manually a command by pressing ENTER * The bracketed paste mode causes test failures in applications (like pytest test suite) which doesn't support it. * It is not easy/convenient to opt-out for the bracketed paste mode. For all these reasons, it sounds reasonable to disable the readline bracketed paste mode by default in Python, even if it's enabled explicitly in ~/.inputrc. If an user opts in for the bracketed paste mode, it is more likely to prevent running malicious commands in a shell, rather than not executing immediately commands executed in Python. Once the bpo-39820 will be fixed, we can reconsider to leave the bracketed paste mode default unchanged (no longer disable it explicitly). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 05:39:37 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 15 Feb 2021 10:39:37 +0000 Subject: [issue43179] Remove s390 support In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613385577.08.0.943666791048.issue43179@roundup.psfhosted.org> Christian Heimes added the comment: > That's an argument I have personally never heard before and I have been dealing with a lot of architecture support in many packages. I opened this ticket after a user told me that they grepped the source code of Python, found the string "s390", and concluded that s390 is still supported by us. This ticket is really just about s390. I said that we *might* want to remove other platform at a *later* point. For now I don't mind to keep them. We could also put unsupported platforms behind a --enable-unsupported-platforms guard. The option would allow you to compile on retro platforms and serve as indicator that the platform is not supported by us. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 05:44:04 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 10:44:04 +0000 Subject: [issue43179] Remove s390 support In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613385844.02.0.233841013892.issue43179@roundup.psfhosted.org> STINNER Victor added the comment: > I propose to remove check for __s390__ from configure.ac and configure. I don't see a big benefit of removing a few lines of configure.ac. It's not like it's a big maintenance burden. > It's about setting expectations. For some users, the presence of a platform triplet implies support for a platform. I maintain https://pythondev.readthedocs.io/platforms.html : unofficial list of platforms and C compilateurs supported by Python, and the different kinds of support levels (supported, best effort, not supported). ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 05:44:31 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 15 Feb 2021 10:44:31 +0000 Subject: =?utf-8?q?=5Bissue43181=5D_Python_macros_don=E2=80=99t_shield_arguments?= In-Reply-To: <1612908350.59.0.954965139249.issue43181@roundup.psfhosted.org> Message-ID: <1613385871.21.0.718576335358.issue43181@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Silence implies consent? I'll throw up a PR, then :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 05:46:02 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 15 Feb 2021 10:46:02 +0000 Subject: =?utf-8?q?=5Bissue43181=5D_Python_macros_don=E2=80=99t_shield_arguments?= In-Reply-To: <1612908350.59.0.954965139249.issue43181@roundup.psfhosted.org> Message-ID: <1613385962.92.0.990396580585.issue43181@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +23320 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/24533 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 05:49:23 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 10:49:23 +0000 Subject: [issue43179] Remove s390 support In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613386163.56.0.758318700103.issue43179@roundup.psfhosted.org> STINNER Victor added the comment: Does AIX support the s390 architecture? ---------- nosy: +David.Edelsohn, aixtools at gmail.com _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 05:54:09 2021 From: report at bugs.python.org (John Paul Adrian Glaubitz) Date: Mon, 15 Feb 2021 10:54:09 +0000 Subject: [issue43179] Remove s390 support In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613386449.45.0.825067147601.issue43179@roundup.psfhosted.org> John Paul Adrian Glaubitz added the comment: > I opened this ticket after a user told me that they grepped the source code of Python, found the string "s390", and concluded that s390 is still supported by us. Because one user was surprised by a few lines in configure.ac, the conclusion is to remove support for that architecture? That's a very odd justification. If it really just affects configure.ac, I don't really see a point in removing them. Even in OpenJDK we keep such unofficial architectures in configure.ac (with my OpenJDK upstream maintainer hat on). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 05:58:15 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 10:58:15 +0000 Subject: =?utf-8?q?=5Bissue43181=5D_Python_macros_don=E2=80=99t_shield_arguments?= In-Reply-To: <1612908350.59.0.954965139249.issue43181@roundup.psfhosted.org> Message-ID: <1613386695.86.0.300122368481.issue43181@roundup.psfhosted.org> STINNER Victor added the comment: I don't think that PR 24533 should be backported to Python 3.8 and Python 3.9. I prefer to avoid any risk of regression, and so only change Python 3.10. ---------- versions: -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 06:11:00 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 15 Feb 2021 11:11:00 +0000 Subject: [issue43179] Remove s390 support In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613387460.83.0.0391993890754.issue43179@roundup.psfhosted.org> Christian Heimes added the comment: > Does AIX support the s390 architecture? The platform triplet is s390-linux-gnu, not AIX. > Because one user was surprised by a few lines in configure.ac, the conclusion is to remove support for that architecture? You are misinterpreting my words. My initial posting explains that the hardware platform is no longer supported by any of our supported operating systems. I want to make it obvious that the platform has been dropped half a decade ago. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 06:16:38 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 11:16:38 +0000 Subject: [issue43179] Remove s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613387798.96.0.723946175757.issue43179@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Remove s390 support -> Remove s390 Linux support (s390-linux-gnu triplet) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 06:35:31 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 11:35:31 +0000 Subject: [issue43179] Remove 32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613388931.35.0.806081996715.issue43179@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Remove s390 Linux support (s390-linux-gnu triplet) -> Remove 32-bit s390 Linux support (s390-linux-gnu triplet) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 06:35:16 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 11:35:16 +0000 Subject: [issue43179] Remove s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613388916.06.0.785162547795.issue43179@roundup.psfhosted.org> STINNER Victor added the comment: I checked buildbots, we only have s390x workers (SLES, Debian, Fedora, RHEL7, RHEL8): ("s390x SLES", "edelsohn-sles-z", UnixBuild, STABLE), ("s390x Debian", "edelsohn-debian-z", UnixBuild, STABLE), ("s390x Fedora", "edelsohn-fedora-z", UnixBuild, STABLE), ("s390x Fedora Refleaks", "edelsohn-fedora-z", UnixRefleakBuild, STABLE), ("s390x Fedora Clang", "edelsohn-fedora-z", ClangUnixBuild, STABLE), ("s390x Fedora Clang Installed", "edelsohn-fedora-z", ClangUnixInstalledBuild, STABLE), ("s390x Fedora LTO", "edelsohn-fedora-z", LTONonDebugUnixBuild, STABLE), ("s390x Fedora LTO + PGO", "edelsohn-fedora-z", LTOPGONonDebugBuild, STABLE), ("s390x RHEL7", "edelsohn-rhel-z", UnixBuild, STABLE), ("s390x RHEL7 Refleaks", "edelsohn-rhel-z", UnixRefleakBuild, STABLE), ("s390x RHEL7 LTO", "edelsohn-rhel-z", LTONonDebugUnixBuild, STABLE), ("s390x RHEL7 LTO + PGO", "edelsohn-rhel-z", LTOPGONonDebugBuild, STABLE), ("s390x RHEL8", "edelsohn-rhel8-z", UnixBuild, STABLE), ("s390x RHEL8 Refleaks", "edelsohn-rhel8-z", UnixRefleakBuild, STABLE), ("s390x RHEL8 LTO", "edelsohn-rhel8-z", LTONonDebugUnixBuild, STABLE), ("s390x RHEL8 LTO + PGO", "edelsohn-rhel8-z", LTOPGONonDebugBuild, STABLE), There is no s390 worker running, so I would not say that we still support this platform. Since 2010, there were 5 commits (all made by me ;-) to fix tests) mentioning "s390" but all of them are about the 64-bit s390x arch, not the 32-bit arch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 06:35:50 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 11:35:50 +0000 Subject: [issue43179] Remove 32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613388950.92.0.612092552333.issue43179@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +23321 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24534 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 06:44:48 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 11:44:48 +0000 Subject: [issue43179] Remove 32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613389488.83.0.626019977524.issue43179@roundup.psfhosted.org> STINNER Victor added the comment: I created PR 24534 "Drop 32-bit Linux s390 platform support". > We might also want to remove __alpha__, __hppa__, and __m68k__ at a later point. DEC hasn't been around for a long time. I would prefer to have one ticket per platform support removal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 06:57:30 2021 From: report at bugs.python.org (John Paul Adrian Glaubitz) Date: Mon, 15 Feb 2021 11:57:30 +0000 Subject: [issue43179] Remove 32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613390250.96.0.589172281039.issue43179@roundup.psfhosted.org> John Paul Adrian Glaubitz added the comment: s390 is a 31-bit platform, not a 32-bit platform. I also don't see what this change achieves other than making the use of Python 3.10 on s390 harder. It's not like the removal of support for non-threaded builds which actually saved quite some code: > https://github.com/python/cpython/commit/a6a4dc816d68df04a7d592e0b6af8c7ecc4d4344 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 07:03:09 2021 From: report at bugs.python.org (John Paul Adrian Glaubitz) Date: Mon, 15 Feb 2021 12:03:09 +0000 Subject: [issue43179] Remove 32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613390589.17.0.84801864574.issue43179@roundup.psfhosted.org> John Paul Adrian Glaubitz added the comment: > I want to make it obvious that the platform has been dropped half a decade ago. That's a political statement, not a technical one. The change has zero functional impact on the other targets. It just makes the use of Python in a potential s390 VM harder. s390 packages are still being built for SUSE Linux Enterprise 12 which is still actively supported. I assume the same applies to RHEL LTS releases but I can't verify that as I have no insight into RedHat's internal build system. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 07:06:22 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 15 Feb 2021 12:06:22 +0000 Subject: =?utf-8?q?=5Bissue43181=5D_Python_macros_don=E2=80=99t_shield_arguments?= In-Reply-To: <1612908350.59.0.954965139249.issue43181@roundup.psfhosted.org> Message-ID: <1613390782.93.0.163644598042.issue43181@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: > I don't think that PR 24533 should be backported to Python 3.8 and Python 3.9. I prefer to avoid any risk of regression, and so only change Python 3.10. That sounds reasonable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 07:14:19 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 15 Feb 2021 12:14:19 +0000 Subject: [issue43179] Remove 32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613391259.44.0.824664190696.issue43179@roundup.psfhosted.org> Christian Heimes added the comment: The guidelines for platform support are explained in PEP 11 (https://www.python.org/dev/peps/pep-0011/#supporting-platforms). We don't support platforms unless we have maintainers and CI (builtbots) in place for the platform. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 07:42:53 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 15 Feb 2021 12:42:53 +0000 Subject: [issue43179] Remove 32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613392973.13.0.911739304428.issue43179@roundup.psfhosted.org> ?ukasz Langa added the comment: +1 from me. Whatever few users s390 still has, they can keep using Python 3.9 which is 5 years newer than the latest kernel they can use. Moving forward, s390 will be unambiguously unsupported as we cannot test against this platform. Unless we get a buildbot provided for this purpose, as well as somebody willing to fix broken builds on that buildbot long-term, it is what it is. ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 07:45:09 2021 From: report at bugs.python.org (John Paul Adrian Glaubitz) Date: Mon, 15 Feb 2021 12:45:09 +0000 Subject: [issue43179] Remove 32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613393109.2.0.577984327023.issue43179@roundup.psfhosted.org> John Paul Adrian Glaubitz added the comment: > Moving forward, s390 will be unambiguously unsupported as we cannot test against this platform. Unless we get a buildbot provided for this purpose, as well as somebody willing to fix broken builds on that buildbot long-term, it is what it is. There is no s390-specifc code in Python in the first place, is there? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 07:50:46 2021 From: report at bugs.python.org (Hamza AVvan) Date: Mon, 15 Feb 2021 12:50:46 +0000 Subject: [issue43223] [SECURITY] Open Redirection In Python 3.7 & 3.8 In-Reply-To: <1613302956.91.0.878390782912.issue43223@roundup.psfhosted.org> Message-ID: <1613393446.88.0.902324406429.issue43223@roundup.psfhosted.org> Change by Hamza AVvan : ---------- title: Open Redirection In Python 3.7 & 3.8 -> [SECURITY] Open Redirection In Python 3.7 & 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 08:26:07 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 15 Feb 2021 13:26:07 +0000 Subject: [issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API In-Reply-To: <1585915023.07.0.846808236133.issue40170@roundup.psfhosted.org> Message-ID: <1613395567.05.0.701212409144.issue40170@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +erlendaasland nosy_count: 7.0 -> 8.0 pull_requests: +23322 pull_request: https://github.com/python/cpython/pull/24535 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 08:43:16 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 13:43:16 +0000 Subject: [issue43228] Regression in function builtins Message-ID: <1613396595.98.0.792771642012.issue43228@roundup.psfhosted.org> New submission from STINNER Victor : The bpo-42990 introduced a regression with the following commit: commit d6c33fbd346765c6a8654dccacb2338006bf2b47 Author: Mark Shannon Date: Fri Jan 29 13:24:55 2021 +0000 bpo-42990: Introduce 'frame constructor' struct to simplify API for PyEval_CodeEval and friends (GH-24298) * Introduce 'frame constructor' to simplify API for frame creation * Embed struct using a macro to conform to PEP 7 The commit adds a new PyFunctionObject.func_builtins member which is not constructed properly in the following code. The reproduce the issue, use attached cloudpickle_bug.py reproducer: ./python -m venv env ./env/bin/python -m pip install cloudpickle ./env/bin/python cloudpickle_bug.py Current output: --- 3 Traceback (most recent call last): File "/home/vstinner/python/master/cloudpickle_bug.py", line 10, in print(func2(text)) File "/home/vstinner/python/master/cloudpickle_bug.py", line -1, in func NameError: name 'len' is not defined --- Output before this commit: --- 3 3 --- pickle.loads() calls PyFunction_NewWithQualName() with globals={'__package__': None, '__name__': '__main__', '__file__': '/home/vstinner/python/master/cloudpickle_bug.py'}. In that case, _PyEval_BuiltinsFromGlobals() creates the {'None': None} builtin dictionary and stores it in PyFunctionObject.func_builtins. => func2 builtins is {'None': None} Before the commit, calling func2() got the builtins dictionary from frame_get_builtins(PyFrameObject *back, PyObject *globals). Now it's get from the PyFunctionObject.func_builtins member which is not initialized properly. If you want to see where PyFunction_NewWithQualName() is called, you can put a break point in _PyEval_BuiltinsFromGlobals(), at the code path creating the {'None': None} dictionary. vstinner at apu$ gdb -args ./env/bin/python -i cloudpickle_bug.py (...) (gdb) b frameobject.c:1190 Breakpoint 1 at 0x6543fa: file Objects/frameobject.c, line 1190. (gdb) run (...) 3 Breakpoint 1, _PyEval_BuiltinsFromGlobals (globals={'__package__': None, '__name__': '__main__', '__file__': '/home/vstinner/python/master/cloudpickle_bug.py'}) at Objects/frameobject.c:1190 1190 builtins = PyDict_New(); (gdb) where #0 _PyEval_BuiltinsFromGlobals (globals={'__package__': None, '__name__': '__main__', '__file__': '/home/vstinner/python/master/cloudpickle_bug.py'}) at Objects/frameobject.c:1190 #1 0x0000000000444191 in PyFunction_NewWithQualName (code=, globals={'__package__': None, '__name__': '__main__', '__file__': '/home/vstinner/python/master/cloudpickle_bug.py'}, qualname=0x0) at Objects/funcobject.c:47 #2 0x0000000000444314 in PyFunction_New (code=, globals={'__package__': None, '__name__': '__main__', '__file__': '/home/vstinner/python/master/cloudpickle_bug.py'}) at Objects/funcobject.c:87 #3 0x0000000000445707 in func_new_impl (type=0x850300 , code=0x7fffea3db2b0, globals={'__package__': None, '__name__': '__main__', '__file__': '/home/vstinner/python/master/cloudpickle_bug.py'}, name=None, defaults=None, closure=None) at Objects/funcobject.c:576 #4 0x000000000044542b in func_new (type=0x850300 , args=(, {'__package__': None, '__name__': '__main__', '__file__': '/home/vstinner/python/master/cloudpickle_bug.py'}, None, None, None), kwargs=0x0) at Objects/clinic/funcobject.c.h:73 #5 0x0000000000490f4a in type_call (type=0x850300 , args=(, {'__package__': None, '__name__': '__main__', '__file__': '/home/vstinner/python/master/cloudpickle_bug.py'}, None, None, None), kwds=0x0) at Objects/typeobject.c:1039 #6 0x0000000000431332 in _PyObject_Call (tstate=0x8a0030, callable=, args=(, {'__package__': None, '__name__': '__main__', '__file__': '/home/vstinner/python/master/cloudpickle_bug.py'}, None, None, None), kwargs=0x0) at Objects/call.c:305 #7 0x00000000004316ab in PyObject_CallObject (callable=, args=(, {'__package__': None, '__name__': '__main__', '__file__': '/home/vstinner/python/master/cloudpickle_bug.py'}, None, None, None)) at Objects/call.c:399 #8 0x00007fffea4fdcc8 in load_reduce (self=0x7fffea5c8b90) at /home/vstinner/python/master/Modules/_pickle.c:6785 #9 0x00007fffea4fe743 in load (self=0x7fffea5c8b90) at /home/vstinner/python/master/Modules/_pickle.c:6933 #10 0x00007fffea50015a in _pickle_loads_impl (module=, data=b'\x80\x05\x95\xdf\x01\x00\x00\x00\x00\x00\x00\x8c\x17cloudpickle.cloudpickle\x94\x8c\r_builtin_type\x94\x93\x94\x8c\nLambdaType\x94\x85\x94R\x94(h\x02\x8c\x08CodeType\x94\x85\x94R\x94(K\x01K\x00K\x00K\x01K\x02KCC\x08t\x00|\x00\x83\x01S\x00\x94N\x85\x94\x8c\x03len\x94\x85\x94\x8c\x01s\x94\x85\x94\x8c//home/vstinner/python/master/cloudpickle_bug.py\x94\x8c\x04func\x94K\x04C\x02\x00\x01\x94))t\x94R\x94}\x94(\x8c\x0b__package__\x94N\x8c\x08__name__\x94\x8c\x08__main__\x94\x8c\x08__file__\x94h\x0fuNNNt\x94R\x94\x8c\x1ccloudpickle.cloudpickle_fast\x94\x8c\x12_function_setstate\x94\x93\x94h\x1a}\x94}\x94(h\x16h\x10\x8c\x0c__qualname__\x94h\x10\x8c\x0f__annotations__\x94}\x94\x8c\x0e__kwdefaults__\x94N\x8c\x0c__defaults__\x94N\x8c\n__module__\x94h\x17\x8c\x07__doc__\x94N\x8c\x0b__closure__\x94N\x8c\x17_cloudpickle_submodules\x94]\x94\x8c\x0b__globals__\x94}\x94u\x86\x94\x86R0.', fix_imports=1, encoding=0x7fffea502473 "ASCII", errors=0x7fffea502479 "strict", buffers=0x0) (...) (gdb) py-bt Traceback (most recent call first): File "/home/vstinner/python/master/cloudpickle_bug.py", line 9, in func2 = pickle.loads(cloudpickle.dumps(func)) ---------- components: Interpreter Core files: cloudpickle_bug.py messages: 387011 nosy: Mark.Shannon, vstinner priority: normal severity: normal status: open title: Regression in function builtins versions: Python 3.10 Added file: https://bugs.python.org/file49810/cloudpickle_bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 08:43:43 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 13:43:43 +0000 Subject: [issue43228] Regression in function builtins In-Reply-To: <1613396595.98.0.792771642012.issue43228@roundup.psfhosted.org> Message-ID: <1613396623.51.0.741180832683.issue43228@roundup.psfhosted.org> STINNER Victor added the comment: cloudpickle issue: https://github.com/cloudpipe/cloudpickle/issues/410 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 08:44:36 2021 From: report at bugs.python.org (=?utf-8?q?Lum=C3=ADr_Balhar?=) Date: Mon, 15 Feb 2021 13:44:36 +0000 Subject: [issue43228] Regression in function builtins In-Reply-To: <1613396595.98.0.792771642012.issue43228@roundup.psfhosted.org> Message-ID: <1613396676.83.0.903834397516.issue43228@roundup.psfhosted.org> Change by Lum?r Balhar : ---------- nosy: +frenzy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 08:51:04 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 13:51:04 +0000 Subject: [issue43228] Regression in function builtins In-Reply-To: <1613396595.98.0.792771642012.issue43228@roundup.psfhosted.org> Message-ID: <1613397064.31.0.410327036053.issue43228@roundup.psfhosted.org> STINNER Victor added the comment: I created a new "3.10regression" for this issue ;-) ---------- keywords: +3.10regression _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 08:52:19 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 13:52:19 +0000 Subject: [issue43228] Regression in function builtins In-Reply-To: <1613396595.98.0.792771642012.issue43228@roundup.psfhosted.org> Message-ID: <1613397139.9.0.625896648668.issue43228@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 09:00:36 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 14:00:36 +0000 Subject: [issue43228] Regression in function builtins In-Reply-To: <1613396595.98.0.792771642012.issue43228@roundup.psfhosted.org> Message-ID: <1613397636.55.0.0944454825145.issue43228@roundup.psfhosted.org> STINNER Victor added the comment: Pablo asked me to put the priority to release blocker. ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 09:36:35 2021 From: report at bugs.python.org (Christian Bachmaier) Date: Mon, 15 Feb 2021 14:36:35 +0000 Subject: [issue43229] freeze searches libpython3.9.so in /usr/lib instead /usr/lib/x86_64-linux-gnu Message-ID: <1613399795.84.0.430887747566.issue43229@roundup.psfhosted.org> New submission from Christian Bachmaier : Now that the patch from issue 42591 (https://bugs.python.org/issue42591), i.e., msg383154 from 12/16/20 has made it to Ubuntu 20.04 with packet version python3.9.1-1, there show some problems with that. I did: > freeze/freeze.py -o frozen helloworld.py > cd frozen > make This delivers a linker error ...xml__parsers.o M_xml__parsers__expat.o M_xml__sax.o M_xml__sax___exceptions.o M_xml__sax__expatreader.o M_xml__sax__handler.o M_xml__sax__saxutils.o M_xml__sax__xmlreader.o M_xmlrpc.o M_xmlrpc__client.o M_zipfile.o M_zipimport.o /usr/lib/libpython3.9.so -lexpat -L/usr/lib -lz -lexpat -lcrypt -lpthread -ldl -lutil -lm -lm -o helloworld x86_64-linux-gnu-gcc: error: /usr/lib/libpython3.9.so: No such file or directory make: *** [Makefile:1234: helloworld] Error 1 The linker searches libpython3.9 in /usr/lib instead in /usr/lib/x86_64-linux-gnu . The "hot-fix" > ln -s /usr/lib/x86_64-linux-gnu/libpython3.9.so /usr/lib/libpython3.9.so fixes that, but brings another error: > freeze/freeze.py -o frozen helloworld.py > cd frozen > make ...xml__parsers.o M_xml__parsers__expat.o M_xml__sax.o M_xml__sax___exceptions.o M_xml__sax__expatreader.o M_xml__sax__handler.o M_xml__sax__saxutils.o M_xml__sax__xmlreader.o M_xmlrpc.o M_xmlrpc__client.o M_zipfile.o M_zipimport.o /usr/lib/libpython3.9.so -lexpat -L/usr/lib -lz -lexpat -lcrypt -lpthread -ldl -lutil -lm -lm -o helloworld /usr/bin/ld: config.o:(.data.rel+0x278): undefined reference to `PyInit_lazr' collect2: error: ld returned 1 exit status make: *** [Makefile:1234: helloworld] Error 1 @Victor: I know there are alternatives to freeze, however, I have to keep a larger legacy project running, and I am not that expert. Maybe you could have a look on the above. ---------- components: Library (Lib) messages: 387015 nosy: chba priority: normal severity: normal status: open title: freeze searches libpython3.9.so in /usr/lib instead /usr/lib/x86_64-linux-gnu versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 09:46:02 2021 From: report at bugs.python.org (Christian Bachmaier) Date: Mon, 15 Feb 2021 14:46:02 +0000 Subject: [issue43229] freeze searches libpython3.9.so in /usr/lib instead /usr/lib/x86_64-linux-gnu In-Reply-To: <1613399795.84.0.430887747566.issue43229@roundup.psfhosted.org> Message-ID: <1613400362.1.0.54108910673.issue43229@roundup.psfhosted.org> Christian Bachmaier added the comment: Sorry, my Ubuntu version I mentioned above is the development version of 21.04 and not 20.04. I you would like or this would be a comfortable option for you, I can show this live/interactively in a shell of my test system to track down the error, say via a skype session. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 10:11:10 2021 From: report at bugs.python.org (Ken Jin) Date: Mon, 15 Feb 2021 15:11:10 +0000 Subject: [issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1613401870.54.0.633567425062.issue42967@roundup.psfhosted.org> Change by Ken Jin : ---------- pull_requests: +23323 pull_request: https://github.com/python/cpython/pull/24536 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 10:13:49 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 15 Feb 2021 15:13:49 +0000 Subject: [issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py In-Reply-To: <1612626856.83.0.902540623753.issue43146@roundup.psfhosted.org> Message-ID: <1613402029.46.0.901859992632.issue43146@roundup.psfhosted.org> Change by Irit Katriel : ---------- keywords: +3.10regression _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 10:16:30 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 15 Feb 2021 15:16:30 +0000 Subject: [issue43220] Argparse: Explicit default required arguments with add_mutually_exclusive_group are rejected In-Reply-To: <1613284485.11.0.495534943099.issue43220@roundup.psfhosted.org> Message-ID: <1613402190.75.0.388480962187.issue43220@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: Explicit default required arguments with add_mutually_exclusive_group are rejected -> Argparse: Explicit default required arguments with add_mutually_exclusive_group are rejected versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 10:23:14 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 15:23:14 +0000 Subject: [issue40939] Remove the old parser In-Reply-To: <1591788317.65.0.969058655213.issue40939@roundup.psfhosted.org> Message-ID: <1613402594.68.0.445101202161.issue40939@roundup.psfhosted.org> STINNER Victor added the comment: FYI the unbound project was fixed by calling Py_CompileString() on Python 3.9 and newer: https://github.com/NLnetLabs/unbound/commit/e0d426ebb10653a78bf5c4053198f6ac19bfcd3e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 10:37:55 2021 From: report at bugs.python.org (Mark Shannon) Date: Mon, 15 Feb 2021 15:37:55 +0000 Subject: [issue43228] Regression in function builtins In-Reply-To: <1613396595.98.0.792771642012.issue43228@roundup.psfhosted.org> Message-ID: <1613403475.66.0.398779699756.issue43228@roundup.psfhosted.org> Mark Shannon added the comment: Do you have a reproducer that does not use cloudpickle? Pickling functions seems to work correctly. >>> import pickle >>> def func(): ... return len([]) ... >>> func2 = pickle.loads(pickle.dumps(func)) >>> >>> func2() 0 How is cloudpickle supposed to work? It looks like the globals dict passed to FunctionType(...) lacks a __builtins__. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 10:49:01 2021 From: report at bugs.python.org (David Edelsohn) Date: Mon, 15 Feb 2021 15:49:01 +0000 Subject: [issue43179] Remove 32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613404141.3.0.121359262886.issue43179@roundup.psfhosted.org> David Edelsohn added the comment: This has nothing to do with AIX. This conversation should include Charalampos Stratakis, but I don't see him as an option for Nosy. It probably is easy to add a s390 31-bit build to one of the buildbots. ---------- nosy: -aixtools at gmail.com _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 11:04:32 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 15 Feb 2021 16:04:32 +0000 Subject: [issue6253] optparse.OptionParser.get_usage uses wrong formatter In-Reply-To: <1244644097.18.0.346116774289.issue6253@psf.upfronthosting.co.za> Message-ID: <1613405072.25.0.66647383249.issue6253@roundup.psfhosted.org> Irit Katriel added the comment: optparse is deprecated an no longer in development, so unless someone objects I will close this issue. ---------- resolution: -> wont fix status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 11:06:50 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 16:06:50 +0000 Subject: [issue43179] Remove 32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613405210.51.0.906377793962.issue43179@roundup.psfhosted.org> STINNER Victor added the comment: > s390 is a 31-bit platform, not a 32-bit platform. ARM64 only uses 48 bits for the address, but it uses 64-bit CPU words. Usually, we refer to an architecture by its CPU word, 32 or 64 bits. s390 uses 32-bit CPU words, no? The Wikipedia article says: "ESA/390 is arguably a 32-bit architecture; as with System/360, System/370, 370-XA, and ESA/370, the general-purpose registers are 32 bits long, and the arithmetic instructions support 32-bit arithmetic. Only byte-addressable real memory (Central Storage) and Virtual Storage addressing is limited to 31 bits." > s390 packages are still being built for SUSE Linux Enterprise 12 which is still actively supported. I assume the same applies to RHEL LTS releases but I can't verify that as I have no insight into RedHat's internal build system. Red Hat maintains Fedora and RHEL, none is supporting s390, but both support s390x: * https://fedoraproject.org/wiki/Architectures * https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/considerations_in_adopting_rhel_8/architectures_considerations-in-adopting-rhel-8 Note: The correct name is Red Hat ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 11:15:30 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 16:15:30 +0000 Subject: [issue43179] Remove 32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613405730.04.0.942424207965.issue43179@roundup.psfhosted.org> STINNER Victor added the comment: ?ukasz Langa: > +1 from me. Whatever few users s390 still has, they can keep using Python 3.9 which is 5 years newer than the latest kernel they can use. Nowadays, it became trivial to maintain downstream patches. It is easy to fork the Python Git repository and put your patches on top of it. Here it's only a matter of doing the maintenance upstream or not. > Moving forward, s390 will be unambiguously unsupported as we cannot test against this platform. Unless we get a buildbot provided for this purpose, as well as somebody willing to fix broken builds on that buildbot long-term, it is what it is. Wait. I would prefer to not have a buildbot worker unless there is a volunteer to fix all s390 specific issues. Otherwise, setting a buildbot worker will not solve any problem. I'm talking about build failures, test failures and issues on the worker directly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 11:19:31 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 16:19:31 +0000 Subject: =?utf-8?q?=5Bissue43181=5D_Python_macros_don=E2=80=99t_shield_arguments?= In-Reply-To: <1612908350.59.0.954965139249.issue43181@roundup.psfhosted.org> Message-ID: <1613405971.6.0.948513832629.issue43181@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 4bb2a1ebc569eee6f1b46ecef1965a26ae8cb76d by Erlend Egeberg Aasland in branch 'master': bpo-43181: Convert PyObject_TypeCheck to static inline function (GH-24533) https://github.com/python/cpython/commit/4bb2a1ebc569eee6f1b46ecef1965a26ae8cb76d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 11:21:14 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 16:21:14 +0000 Subject: =?utf-8?q?=5Bissue43181=5D_Python_macros_don=E2=80=99t_shield_arguments?= In-Reply-To: <1612908350.59.0.954965139249.issue43181@roundup.psfhosted.org> Message-ID: <1613406074.73.0.80725136809.issue43181@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Vitaliy for the bug report and Erlend for the fix ;-) For Python 3.9 and older, a workaround is to wrap the call to PyObject_TypeCheck() with your own static inline function. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 11:25:54 2021 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 15 Feb 2021 16:25:54 +0000 Subject: [issue43179] Remove 32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613406354.88.0.364578503954.issue43179@roundup.psfhosted.org> Charalampos Stratakis added the comment: For RHEL7 which is the older OS that buildbots are still running, only the System Z architecture is supported. From the release notes [0]: Note that Red Hat Enterprise Linux 7 supports IBM zEnterprise 196 hardware or later; IBM System z10 mainframe systems are no longer supported and will not boot Red Hat Enterprise Linux 7. Also 32 (31 bits) in this case are only supported through virtualization with older OS's. So IMO it's fine to remove the support. [0] https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/7.0_release_notes/chap-red_hat_enterprise_linux-7.0_release_notes-architectures ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 11:48:33 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 15 Feb 2021 16:48:33 +0000 Subject: [issue42861] ipaddress - add ability to get next closest network of any prefix size In-Reply-To: <1610065851.06.0.929191666424.issue42861@roundup.psfhosted.org> Message-ID: <1613407713.15.0.168047819987.issue42861@roundup.psfhosted.org> Change by ?ric Araujo : ---------- nosy: +pmoody title: ipaddress - add ability to get next closet network of any prefix size -> ipaddress - add ability to get next closest network of any prefix size _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 11:58:07 2021 From: report at bugs.python.org (Julian Berman) Date: Mon, 15 Feb 2021 16:58:07 +0000 Subject: [issue43148] Call sys.unraisablehook in the REPL when sys.excepthook is broken In-Reply-To: <1612867111.04.0.454681290392.issue43148@roundup.psfhosted.org> Message-ID: Julian Berman added the comment: Thanks Victor. Yes likely happy to send a PR (have to clear a few things off the yak stack first) On Tue, Feb 9, 2021 at 5:38 AM STINNER Victor wrote: > > STINNER Victor added the comment: > > It makes sense to call _PyErr_WriteUnraisableMsg() when sys.excepthook > raise a new exception. Do you want to propose a PR for that? > > sys.excepthook documentation mentions sys.unraisablehook: > https://docs.python.org/dev/library/sys.html#sys.excepthook > > threading._make_invoke_excepthook logs threading.excepthook failure using > sys.excepthook. > > Note: Carl also suggested to add a way to invoke sys.unraisablehook > explicitly, not only for testing purpose. It would help in some cases. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- nosy: +Julian2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 12:00:29 2021 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 15 Feb 2021 17:00:29 +0000 Subject: [issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1613408429.24.0.477710133473.issue42967@roundup.psfhosted.org> Senthil Kumaran added the comment: New changeset a2f0654b0a5b4c4f726155620002cc1f5f2d206a by Ken Jin in branch 'master': bpo-42967: Fix urllib.parse docs and make logic clearer (GH-24536) https://github.com/python/cpython/commit/a2f0654b0a5b4c4f726155620002cc1f5f2d206a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 12:01:57 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 17:01:57 +0000 Subject: [issue43228] Regression in function builtins In-Reply-To: <1613396595.98.0.792771642012.issue43228@roundup.psfhosted.org> Message-ID: <1613408517.34.0.922541910538.issue43228@roundup.psfhosted.org> STINNER Victor added the comment: > It looks like the globals dict passed to FunctionType(...) lacks a __builtins__. Right. But it worked in Python 3.9 :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 12:21:37 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 17:21:37 +0000 Subject: [issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash In-Reply-To: <1340142734.59.0.259692259195.issue15108@psf.upfronthosting.co.za> Message-ID: <1613409697.9.0.0402175090192.issue15108@roundup.psfhosted.org> STINNER Victor added the comment: The general issue here is a the PyTuple_New() is unsafe: it immediately tracks the newly created tuple in the GC, whereas the tuple is not initialized yet. If the GIL is released before the tuple is fully populated and something access to this tuple via the GC (ex: gc.get_objects()), accessing the tuple can crash, especially in the Python land (for example, repr(the_tuple) is likely to crash). IMO the unsafe PyTuple_New() API should be avoided. For example, allocate an array of PyObject* on the stack memory, and then call _PyTuple_FromArray(). This API is safe because it only tracks the tuple once it's fully initialized, and it calls INCREF on items. Problem: this safe and efficient API is currently private. There are other safe alternatives like Py_BuildValue("(OOO)", item1, item2, item3). _pysqlite_fetch_one_row() calls PyTuple_New() and releases the GIL at each sqlite3_column_type() call, so yeah, it has this exact bug. By the way, it doesn't check for PyTuple_SetItem() failure, whereas it's currently possible that there is more than one strong reference to the tuple which is being populated (because of the GC issue). PyTuple_New() is ok-ish if there is no way to trigger a GC collection and if the GIL cannot be released until the tuple is fully initialized. Maybe we need a private _PyTuple_NewUntracked() API to create a tuple which is not tracked by the GC, and also a _PyTuple_ResizeUntracked() API. By the way, _PyTuple_Resize() sounds like a nonsense since a tuple is supposed to be immutable ;-) ---------- nosy: +vstinner title: ERROR: SystemError: ./../Objects/tupleobject.c:118: bad argument to internal function -> Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 12:23:14 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 17:23:14 +0000 Subject: [issue43228] Regression in function builtins In-Reply-To: <1613396595.98.0.792771642012.issue43228@roundup.psfhosted.org> Message-ID: <1613409794.43.0.0913212715854.issue43228@roundup.psfhosted.org> STINNER Victor added the comment: > How is cloudpickle supposed to work? It creates a CodeType object and then create a function with this code object. It serializes the bytecode. pickle is not affected since it doesn't create function objects, but retrieve them from imported modules. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 12:33:54 2021 From: report at bugs.python.org (NKID00) Date: Mon, 15 Feb 2021 17:33:54 +0000 Subject: [issue43230] typo in Simplified/Traditional Chinese documentation for library argparse Message-ID: <1613410434.09.0.36699009827.issue43230@roundup.psfhosted.org> New submission from NKID00 : For Simplified Chinese(https://docs.python.org/zh-cn/3/library/argparse.html#description): "??" should probably be replaced by "??". ????????????????????? -> ????????????????????? For Traditional Chinese(https://docs.python.org/zh-tw/3/library/argparse.html#description): "??" should probably be replaced by "??". ????????????????????? -> ????????????????????? ---------- assignee: docs at python components: Documentation messages: 387031 nosy: NKID00, docs at python priority: normal severity: normal status: open title: typo in Simplified/Traditional Chinese documentation for library argparse type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 12:36:02 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 17:36:02 +0000 Subject: [issue43228] Regression in function builtins In-Reply-To: <1613396595.98.0.792771642012.issue43228@roundup.psfhosted.org> Message-ID: <1613410562.59.0.644117363757.issue43228@roundup.psfhosted.org> STINNER Victor added the comment: func_builtins.py: reproducer which has no import. func2 builtins is {'None': None} on Python 3.10. Oh. This script also fails on Python 3.9. I'm not sure why cloudpickle_bug.py works on Python 3.9. ---------- Added file: https://bugs.python.org/file49811/func_builtins.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 12:51:45 2021 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 15 Feb 2021 17:51:45 +0000 Subject: [issue39820] Bracketed paste mode for REPL: don't execute pasted command before ENTER is pressed explicitly In-Reply-To: <1583105435.88.0.337448475427.issue39820@roundup.psfhosted.org> Message-ID: <1613411505.37.0.0356287311939.issue39820@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: -mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 12:58:06 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Feb 2021 17:58:06 +0000 Subject: [issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash In-Reply-To: <1340142734.59.0.259692259195.issue15108@psf.upfronthosting.co.za> Message-ID: <1613411886.98.0.0984646568274.issue15108@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > IMO the unsafe PyTuple_New() API should be avoided. Is not that simple, there are other APIs that track the tuple as _PyTuple_Resize. This problem also is not unique to tuples, although is mainly prominent in them. We have this warning in the docs: >> Care must be taken when using objects returned by get_referrers() because some of them could still be under construction and hence in a temporarily invalid state. Avoid using get_referrers() for any purpose other than debugging. That's because *by thesign* these APIs can potentially access half-initialized objects. I don't know if is worth to add a new API just for tuples, given that this problem happens with many other objects ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 13:00:14 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Feb 2021 18:00:14 +0000 Subject: [issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash In-Reply-To: <1340142734.59.0.259692259195.issue15108@psf.upfronthosting.co.za> Message-ID: <1613412014.11.0.901380718042.issue15108@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > There are other safe alternatives like Py_BuildValue("(OOO)", item1, item2, item3). That's a lot slower unfortunately ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 13:02:33 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Feb 2021 18:02:33 +0000 Subject: [issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash In-Reply-To: <1340142734.59.0.259692259195.issue15108@psf.upfronthosting.co.za> Message-ID: <1613412153.8.0.778410493488.issue15108@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > If the GIL is released before the tuple is fully populated and something access to this tuple via the GC (ex: gc.get_objects()), accessing the tuple can crash, especially in the Python land (for example, repr(the_tuple) is likely to crash). It can happen even without releasing the GIL: A new tuple is created, then some other object is created using the CAPI, the gc runs, the callback triggers (or the tuplevisit method is invoked) and then kaboom ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 13:02:19 2021 From: report at bugs.python.org (Mark Shannon) Date: Mon, 15 Feb 2021 18:02:19 +0000 Subject: [issue43228] Regression in function builtins In-Reply-To: <1613396595.98.0.792771642012.issue43228@roundup.psfhosted.org> Message-ID: <1613412139.46.0.692016953607.issue43228@roundup.psfhosted.org> Mark Shannon added the comment: You need to define __builtins__ in the globals dictionary. def func(s): return len(s) text = "abc" print(func(text)) FuncType = type(func) func_globals = {"__builtins__":__builtins__.__dict__} code = func.__code__ func2 = FuncType(code, func_globals) print(func2(text)) works for both 3.9 and 3.10. Cloudpickle needs to initialize the globals dict *before* creating the function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 13:03:42 2021 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 15 Feb 2021 18:03:42 +0000 Subject: [issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1613412222.89.0.0426645873992.issue42967@roundup.psfhosted.org> Senthil Kumaran added the comment: New changeset c9f07813ab8e664d8c34413c4fc2d4f86c061a92 by Senthil Kumaran in branch '3.9': [3.9] bpo-42967: only use '&' as a query string separator (GH-24297) (#24528) https://github.com/python/cpython/commit/c9f07813ab8e664d8c34413c4fc2d4f86c061a92 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 13:10:58 2021 From: report at bugs.python.org (Philip) Date: Mon, 15 Feb 2021 18:10:58 +0000 Subject: [issue43222] Regular expression split fails on 3.6 and not 2.7 or 3.7+ In-Reply-To: <1613290630.55.0.329403737317.issue43222@roundup.psfhosted.org> Message-ID: <1613412658.8.0.743918651674.issue43222@roundup.psfhosted.org> Change by Philip : ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 13:13:01 2021 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 15 Feb 2021 18:13:01 +0000 Subject: [issue43179] Remove 32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613412781.17.0.500820956841.issue43179@roundup.psfhosted.org> Charalampos Stratakis added the comment: And to dig a bit further with a semi-official answer. RHEL4 had standalone support for s390, while since RHEL5+ we've had only multilib support (64 bits kernel and possibility of s390 userspace packages). RHEL7 that is the oldest currently supported RHEL OS, does have multilib support, meaning that 32 bit (s390) userspace packages are available for s390x booting on 64 bit kernel. Although a later base python version for RHEL7 will not be shipped as we already have python2.7.5 and python3.8.6 supported there, which already builds for s390 for the aforementioned multilib support. On Software Collections where we actually sometimes ship later Python versions, we compile only for 64 bits so the removal of the s390 pieces wouldn't pose an issue here. Hence the only problem I can figure out from my analysis would be for users on s390x who would download the necessary 32bit libraries and dependencies from the repos and use the -m32 CFLAGS and LDFLAGS to get a 32 bits build. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 13:15:11 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 15 Feb 2021 18:15:11 +0000 Subject: [issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1613412911.42.0.946918239559.issue42967@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset e3110c3cfbb7daa690d54d0eff6c264c870a71bf by Senthil Kumaran in branch '3.8': [3.8] bpo-42967: only use '&' as a query string separator (GH-24297) (#24529) https://github.com/python/cpython/commit/e3110c3cfbb7daa690d54d0eff6c264c870a71bf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 13:34:20 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Feb 2021 18:34:20 +0000 Subject: [issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1613414060.94.0.314678240561.issue42967@roundup.psfhosted.org> Ned Deily added the comment: New changeset d0d4d30882fe3ab9b1badbecf5d15d94326fd13e by Senthil Kumaran in branch '3.7': [3.7] bpo-42967: only use '&' as a query string separator (GH-24297) (GH-24531) https://github.com/python/cpython/commit/d0d4d30882fe3ab9b1badbecf5d15d94326fd13e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 13:44:00 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Feb 2021 18:44:00 +0000 Subject: [issue43108] test_curses is leaking references In-Reply-To: <1612296134.53.0.710661977317.issue43108@roundup.psfhosted.org> Message-ID: <1613414640.75.0.0430735052018.issue43108@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset ede1ff226c9ef4efd053109c69b4e33f75b2b17b by Miss Islington (bot) in branch '3.8': bpo-43108: Fix a reference leak in the curses module (GH-24420) (GH-24429) https://github.com/python/cpython/commit/ede1ff226c9ef4efd053109c69b4e33f75b2b17b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 13:46:05 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Feb 2021 18:46:05 +0000 Subject: [issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora Message-ID: <1613414765.81.0.929791182409.issue43231@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : https://buildbot.python.org/all/#/builders/433/builds/181/steps/5/logs/stdio ====================================================================== ERROR: test_init_pair (test.test_curses.TestCurses) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.refleak/build/Lib/test/test_curses.py", line 47, in wrapped test(self, *args, **kwargs) File "/home/dje/cpython-buildarea/3.x.edelsohn-fedora-z.refleak/build/Lib/test/test_curses.py", line 959, in test_init_pair curses.init_pair(maxpair, 0, 0) ValueError: Color pair is greater than COLOR_PAIRS-1 (65535). ---------------------------------------------------------------------- ---------- messages: 387042 nosy: pablogsal, serhiy.storchaka priority: normal severity: normal status: open title: test.test_curses.TestCurses.test_init_pair fails in s390x Fedora _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 13:46:09 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Feb 2021 18:46:09 +0000 Subject: [issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora In-Reply-To: <1613414765.81.0.929791182409.issue43231@roundup.psfhosted.org> Message-ID: <1613414769.79.0.1110440424.issue43231@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 13:52:12 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Feb 2021 18:52:12 +0000 Subject: [issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora In-Reply-To: <1613414765.81.0.929791182409.issue43231@roundup.psfhosted.org> Message-ID: <1613415132.18.0.339838748483.issue43231@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: This seems to happen only when running with -R ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 14:16:49 2021 From: report at bugs.python.org (Illia Volochii) Date: Mon, 15 Feb 2021 19:16:49 +0000 Subject: [issue43232] Prohibit previously deprecated operations on asyncio.trsock.TransportSocket Message-ID: <1613416609.25.0.407610615564.issue43232@roundup.psfhosted.org> New submission from Illia Volochii : https://github.com/python/cpython/blob/a2f0654b0a5b4c4f726155620002cc1f5f2d206a/Lib/asyncio/trsock.py#L19-L24 Using of the operations was supposed to be prohibited in Python 3.9, but that was missed. ---------- components: asyncio messages: 387044 nosy: asvetlov, illia-v, yselivanov priority: normal severity: normal status: open title: Prohibit previously deprecated operations on asyncio.trsock.TransportSocket versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 14:16:51 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Feb 2021 19:16:51 +0000 Subject: [issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1613416611.02.0.168350111812.issue42967@roundup.psfhosted.org> Ned Deily added the comment: New changeset 5c17dfc5d70ce88be99bc5769b91ce79d7a90d61 by Senthil Kumaran in branch '3.6': [3.6] bpo-42967: only use '&' as a query string separator (GH-24297) (GH-24532) https://github.com/python/cpython/commit/5c17dfc5d70ce88be99bc5769b91ce79d7a90d61 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 14:22:52 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Feb 2021 19:22:52 +0000 Subject: [issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora In-Reply-To: <1613414765.81.0.929791182409.issue43231@roundup.psfhosted.org> Message-ID: <1613416972.9.0.822744930198.issue43231@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 14:24:28 2021 From: report at bugs.python.org (Illia Volochii) Date: Mon, 15 Feb 2021 19:24:28 +0000 Subject: [issue43232] Prohibit previously deprecated operations on asyncio.trsock.TransportSocket In-Reply-To: <1613416609.25.0.407610615564.issue43232@roundup.psfhosted.org> Message-ID: <1613417068.66.0.86902738356.issue43232@roundup.psfhosted.org> Change by Illia Volochii : ---------- keywords: +patch pull_requests: +23324 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24538 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 14:26:10 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Feb 2021 19:26:10 +0000 Subject: [issue43233] test_copy_file_range_offset fails on AMD64 FreeBSD Shared 3.9 Message-ID: <1613417170.64.0.402539389952.issue43233@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : ====================================================================== FAIL: test_copy_file_range_offset (test.test_os.FileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.9.koobs-freebsd-564d/build/Lib/test/test_os.py", line 365, in test_copy_file_range_offset self.assertIn(i, range(0, bytes_to_copy+1)); AssertionError: 7 not found in range(0, 7) ---------------------------------------------------------------------- https://buildbot.python.org/all/#/builders/151/builds/300/steps/5/logs/stdio ---------- messages: 387046 nosy: koobs, lukasz.langa, pablogsal, vstinner priority: normal severity: normal status: open title: test_copy_file_range_offset fails on AMD64 FreeBSD Shared 3.9 versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 14:26:33 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Feb 2021 19:26:33 +0000 Subject: [issue43233] test_copy_file_range_offset fails on AMD64 FreeBSD Shared 3.9 In-Reply-To: <1613417170.64.0.402539389952.issue43233@roundup.psfhosted.org> Message-ID: <1613417193.91.0.934927853694.issue43233@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: koobs, can you give us access to the buildbot? The latest IP you provided do not work anymore ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 14:27:53 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Feb 2021 19:27:53 +0000 Subject: [issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora In-Reply-To: <1613414765.81.0.929791182409.issue43231@roundup.psfhosted.org> Message-ID: <1613417273.21.0.141046787664.issue43231@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: The logic in _curses_init_pair_impl is quite odd. Seems that _CURSES_INIT_PAIR_FUNC succeeds the first run of (-R) even if pair_number >= COLOR_PAIRS but fails the second. Serhiy, do you know what's going on here? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 14:34:55 2021 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 15 Feb 2021 19:34:55 +0000 Subject: [issue42967] [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1613417695.76.0.306178843705.issue42967@roundup.psfhosted.org> Senthil Kumaran added the comment: This is resolved in all version of Python now. Thank you all for your contributions! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed title: [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator -> [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 14:38:41 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Feb 2021 19:38:41 +0000 Subject: [issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora In-Reply-To: <1613414765.81.0.929791182409.issue43231@roundup.psfhosted.org> Message-ID: <1613417921.09.0.0759276018331.issue43231@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Hummmm, commenting out test_use_default_colors fixes the issue, so something is going on there ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 14:45:15 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Feb 2021 19:45:15 +0000 Subject: [issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora In-Reply-To: <1613414765.81.0.929791182409.issue43231@roundup.psfhosted.org> Message-ID: <1613418315.15.0.193118836977.issue43231@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: >From the curses docs: init_pair The init_pair routine changes the definition of a color-pair. It takes three arguments: the number of the color-pair to be changed, the foreground color number, and the background color number. For portable applications: ? The first argument must be a legal color pair value. If default colors are used (see use_default_colors(3X)) the upper limit is adjusted to allow for extra pairs which use a default color in foreground and/or background. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 14:51:10 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Feb 2021 19:51:10 +0000 Subject: [issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora In-Reply-To: <1613414765.81.0.929791182409.issue43231@roundup.psfhosted.org> Message-ID: <1613418670.35.0.272402529137.issue43231@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +23325 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24539 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 15:05:44 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 15 Feb 2021 20:05:44 +0000 Subject: [issue19984] Add new format of fixed length string for PyErr_Format In-Reply-To: <1387085002.5.0.729792789255.issue19984@psf.upfronthosting.co.za> Message-ID: <1613419544.87.0.490168477678.issue19984@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 15:09:43 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 15 Feb 2021 20:09:43 +0000 Subject: [issue19073] Inability to specific __qualname__ as a property on a class instance. In-Reply-To: <1379857021.17.0.738971350638.issue19073@psf.upfronthosting.co.za> Message-ID: <1613419783.58.0.58752647219.issue19073@roundup.psfhosted.org> Change by Irit Katriel : ---------- versions: +Python 3.10 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 15:11:41 2021 From: report at bugs.python.org (Illia Volochii) Date: Mon, 15 Feb 2021 20:11:41 +0000 Subject: [issue43234] Prohibit passing non-ThreadPoolExecutor executors to loop.set_default_executor following a deprecation Message-ID: <1613419901.25.0.801383845086.issue43234@roundup.psfhosted.org> New submission from Illia Volochii : https://github.com/python/cpython/blob/a2f0654b0a5b4c4f726155620002cc1f5f2d206a/Lib/asyncio/base_events.py#L816-L821 Setting non-ThreadPoolExecutor executors was supposed to be prohibited in Python 3.9. ---------- components: asyncio messages: 387052 nosy: asvetlov, illia-v, yselivanov priority: normal severity: normal status: open title: Prohibit passing non-ThreadPoolExecutor executors to loop.set_default_executor following a deprecation versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 15:17:22 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 15 Feb 2021 20:17:22 +0000 Subject: [issue16718] Mysterious atexit fail In-Reply-To: <1355862940.68.0.167478798513.issue16718@psf.upfronthosting.co.za> Message-ID: <1613420242.91.0.599795316926.issue16718@roundup.psfhosted.org> Irit Katriel added the comment: Since this was fixed since 3.3, is there a reason why this issue is still open? I don't get the error anymore: C:\Users\User\src\cpython-dev>python.bat wow.py Running Release|x64 interpreter... Traceback (most recent call last): File "C:\Users\User\src\cpython-dev\wow.py", line 12, in import fail ModuleNotFoundError: No module named 'fail' C:\Users\User\src\cpython-dev>python.bat wy.py Running Release|x64 interpreter... Traceback (most recent call last): File "C:\Users\User\src\cpython-dev\wy.py", line 1, in import wow File "C:\Users\User\src\cpython-dev\wow.py", line 12, in import fail ModuleNotFoundError: No module named 'fail' ---------- nosy: +iritkatriel resolution: -> out of date status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 15:19:41 2021 From: report at bugs.python.org (Illia Volochii) Date: Mon, 15 Feb 2021 20:19:41 +0000 Subject: [issue43234] Prohibit passing non-ThreadPoolExecutor executors to loop.set_default_executor following a deprecation In-Reply-To: <1613419901.25.0.801383845086.issue43234@roundup.psfhosted.org> Message-ID: <1613420381.93.0.841025672844.issue43234@roundup.psfhosted.org> Change by Illia Volochii : ---------- keywords: +patch pull_requests: +23326 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24540 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 15:26:55 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 15 Feb 2021 20:26:55 +0000 Subject: [issue16608] immutable subclass constructor call error does not show subclass name In-Reply-To: <1354647243.72.0.494328426401.issue16608@psf.upfronthosting.co.za> Message-ID: <1613420815.14.0.545623017093.issue16608@roundup.psfhosted.org> Irit Katriel added the comment: The issue still exists in 3.10: Python 3.10.0a5+ (heads/master:bf2e7e55d7, Feb 11 2021, 23:09:25) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> class c(tuple): ... def __init__(s,a,b): ... tuple.__init__(s,a) ... self.b = b ... >>> c(tuple(),666) Traceback (most recent call last): File "", line 1, in TypeError: tuple expected at most 1 argument, got 2 >>> ---------- nosy: +iritkatriel versions: +Python 3.10 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 15:31:51 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 15 Feb 2021 20:31:51 +0000 Subject: [issue21309] Confusing "see also" for generic C-level __init__ methods in help output In-Reply-To: <1397873826.04.0.28447838355.issue21309@psf.upfronthosting.co.za> Message-ID: <1613421111.21.0.708268582811.issue21309@roundup.psfhosted.org> Irit Katriel added the comment: Still the same in 3.10: Python 3.10.0a5+ (heads/master:bf2e7e55d7, Feb 11 2021, 23:09:25) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> help(ImportError.__init__) Help on wrapper_descriptor: __init__(self, /, *args, **kwargs) Initialize self. See help(type(self)) for accurate signature. ---------- nosy: +iritkatriel versions: +Python 3.10 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 15:32:25 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 15 Feb 2021 20:32:25 +0000 Subject: [issue43105] Can't import extension modules resolved via relative paths in sys.path on Windows In-Reply-To: <1612285380.24.0.495785451269.issue43105@roundup.psfhosted.org> Message-ID: <1613421145.27.0.176744550102.issue43105@roundup.psfhosted.org> Steve Dower added the comment: > since they're allowed, I think importlib at least could try to resolve relative paths in a copy of sys.path before searching. I agree with this fix. They can be resolved for each new import, if we think that's an important behaviour to preserve (might mess with the cache... but probably necessary if it's to be backported). But at some point sys.path entries need to be made absolute, and it definitely needs to happen before we try to load any DLLs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 15:33:52 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 15 Feb 2021 20:33:52 +0000 Subject: [issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API In-Reply-To: <1585915023.07.0.846808236133.issue40170@roundup.psfhosted.org> Message-ID: <1613421232.12.0.631001701776.issue40170@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: After GH-24533 and GH-24535, there's (AFAICS) only a handful of cases left. $ grep -r "\->tp_" Include/: Include/internal/pycore_abstract.h: PyNumberMethods *tp_as_number = Py_TYPE(obj)->tp_as_number; Include/internal/pycore_interp.h: unsigned int version; // initialized from type->tp_version_tag Include/internal/pycore_object.h: return ((type->tp_flags & feature) != 0); Include/internal/pycore_object.h: Py_ssize_t offset = Py_TYPE(op)->tp_weaklistoffset; Include/internal/pycore_object.h: && (Py_TYPE(obj)->tp_is_gc == NULL Include/internal/pycore_object.h: || Py_TYPE(obj)->tp_is_gc(obj))); Include/cpython/pyerrors.h:#define PyExceptionClass_Name(x) (((PyTypeObject*)(x))->tp_name) Include/cpython/abstract.h: offset = tp->tp_vectorcall_offset; Include/cpython/abstract.h: ( Py_TYPE(o)->tp_as_sequence->sq_item(o, i) ) Include/cpython/object.h: ((PyMemberDef *)(((char *)etype) + Py_TYPE(etype)->tp_basicsize)) Include/cpython/objimpl.h:#define _PyObject_SIZE(typeobj) ( (typeobj)->tp_basicsize ) Include/cpython/objimpl.h: _Py_SIZE_ROUND_UP((typeobj)->tp_basicsize + \ Include/cpython/objimpl.h: (nitems)*(typeobj)->tp_itemsize, \ Include/cpython/objimpl.h:#define PyType_SUPPORTS_WEAKREFS(t) ((t)->tp_weaklistoffset > 0) Include/object.h: flags = type->tp_flags; Should we strive to fix the cases in Include/internal as well? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 15:39:31 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Feb 2021 20:39:31 +0000 Subject: [issue41028] Move docs.python.org language and version switcher out of cpython In-Reply-To: <1592516133.76.0.0424010515361.issue41028@roundup.psfhosted.org> Message-ID: <1613421571.35.0.0214696221551.issue41028@roundup.psfhosted.org> Ned Deily added the comment: @mdk, This seems to be working great for the the python.org doc builds. What do you think about backporting this to the current active branches so that the doc builds for individual releases and those included with binary installers show the new generic links rather than the out-of-date old links? ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 15:41:01 2021 From: report at bugs.python.org (Larry Hastings) Date: Mon, 15 Feb 2021 20:41:01 +0000 Subject: [issue21309] Confusing "see also" for generic C-level __init__ methods in help output In-Reply-To: <1397873826.04.0.28447838355.issue21309@psf.upfronthosting.co.za> Message-ID: <1613421661.68.0.622444742427.issue21309@roundup.psfhosted.org> Change by Larry Hastings : ---------- nosy: -larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 15:42:54 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 20:42:54 +0000 Subject: [issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API In-Reply-To: <1585915023.07.0.846808236133.issue40170@roundup.psfhosted.org> Message-ID: <1613421774.77.0.399003742634.issue40170@roundup.psfhosted.org> STINNER Victor added the comment: > Should we strive to fix the cases in Include/internal as well? No. The internal C API access directly to structure members on purpose, for best performances. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 15:55:52 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 20:55:52 +0000 Subject: [issue43108] test_curses is leaking references In-Reply-To: <1612296134.53.0.710661977317.issue43108@roundup.psfhosted.org> Message-ID: <1613422552.19.0.0706023289133.issue43108@roundup.psfhosted.org> STINNER Victor added the comment: The funny part is that the bug was there for 4 years. It's good that Serhiy added new tests to allow to catch this old bug! commit f7eae0adfcd4c50034281b2c69f461b43b68db84 Author: Serhiy Storchaka Date: Wed Jun 28 08:30:06 2017 +0300 [security] bpo-13617: Reject embedded null characters in wchar* strings. (#2302) Based on patch by Victor Stinner. Add private C API function _PyUnicode_AsUnicode() which is similar to PyUnicode_AsUnicode(), but checks for null characters. It wasn't me! Ok, maybejust a little bit :-D ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 16:15:01 2021 From: report at bugs.python.org (Aaron Meurer) Date: Mon, 15 Feb 2021 21:15:01 +0000 Subject: [issue42819] readline 8.1 enables the bracketed paste mode by default In-Reply-To: <1609707155.89.0.22999518491.issue42819@roundup.psfhosted.org> Message-ID: <1613423701.99.0.821355196591.issue42819@roundup.psfhosted.org> Aaron Meurer added the comment: Instead of enabling it by default, why not just keep it but emulate the old behavior by splitting and buffering the input lines? That way you still get some of the benefits of bracketed paste, i.e., faster pasting, but without the hard work of fixing the REPL to actually support native multiline editing + execing multiline statements (the broken "simple" design). ---------- nosy: +asmeurer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 16:16:39 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 21:16:39 +0000 Subject: [issue42819] readline 8.1 enables the bracketed paste mode by default In-Reply-To: <1609707155.89.0.22999518491.issue42819@roundup.psfhosted.org> Message-ID: <1613423799.42.0.520325924102.issue42819@roundup.psfhosted.org> STINNER Victor added the comment: > Instead of enabling it by default, why not just keep it but emulate the old behavior by splitting and buffering the input lines? PR 24108 change can and should be backported to 3.8 and 3.9 branches. REPL enhancements can only land in the master branch and should be done in bpo-39820. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 16:36:04 2021 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 15 Feb 2021 21:36:04 +0000 Subject: [issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora In-Reply-To: <1613414765.81.0.929791182409.issue43231@roundup.psfhosted.org> Message-ID: <1613424964.75.0.663620348428.issue43231@roundup.psfhosted.org> ?ukasz Langa added the comment: New changeset ab2d48163901c9635401db0f6d784c45482d17ec by Pablo Galindo in branch 'master': bpo-43231: Fix test.test_curses.TestCurses.test_init_pair when running under -R (GH-24539) https://github.com/python/cpython/commit/ab2d48163901c9635401db0f6d784c45482d17ec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 16:53:02 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Feb 2021 21:53:02 +0000 Subject: [issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora In-Reply-To: <1613414765.81.0.929791182409.issue43231@roundup.psfhosted.org> Message-ID: <1613425982.41.0.690960642924.issue43231@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +23327 pull_request: https://github.com/python/cpython/pull/24541 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 17:16:05 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Feb 2021 22:16:05 +0000 Subject: [issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora In-Reply-To: <1613414765.81.0.929791182409.issue43231@roundup.psfhosted.org> Message-ID: <1613427365.06.0.581012205294.issue43231@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 17:16:12 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Feb 2021 22:16:12 +0000 Subject: [issue43231] test.test_curses.TestCurses.test_init_pair fails in s390x Fedora In-Reply-To: <1613414765.81.0.929791182409.issue43231@roundup.psfhosted.org> Message-ID: <1613427372.77.0.258248034566.issue43231@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset d0204963ec87beb9732e924e464b8a6a1ef4d341 by Pablo Galindo in branch 'master': bpo-43231: Correctly calculate the curses color pair limit when checking for it (GH-24541) https://github.com/python/cpython/commit/d0204963ec87beb9732e924e464b8a6a1ef4d341 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 17:20:41 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 22:20:41 +0000 Subject: [issue43233] test_copy_file_range_offset fails on AMD64 FreeBSD Shared 3.9 In-Reply-To: <1613417170.64.0.402539389952.issue43233@roundup.psfhosted.org> Message-ID: <1613427641.3.0.394431303291.issue43233@roundup.psfhosted.org> STINNER Victor added the comment: > https://buildbot.python.org/all/#/builders/151/builds/300/steps/5/logs/stdio This is the CURRENT version of FreeBSD (latest kernel and latest libc). test.pythoninfo says: os.uname: posix.uname_result(sysname='FreeBSD', nodename='140-CURRENT-amd64', release='14.0-CURRENT', version='FreeBSD 14.0-CURRENT #13 main-n244626-cb7cc72c546: Fri Feb 5 02:20:29 UTC 2021 root at 130-CURRENT-amd64:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG', machine='amd64') On FreeBSD 12.2 (stable), test_os pass because os.copy_file_range() is missing: $ grep copy_file_range pyconfig.h -A1 /* Define to 1 if you have the `copy_file_range' function. */ /* #undef HAVE_COPY_FILE_RANGE */ $ ./python -m test test_os -v -m test_copy_file_range_offset == CPython 3.9.1+ (heads/3.9:c9f07813ab, Feb 15 2021, 22:00:04) [Clang 10.0.1 (git at github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611a == FreeBSD-12.2-RELEASE-p3-amd64-64bit-ELF little-endian == cwd: /usr/home/vstinner/python/3.9/build/test_python_5324? == CPU count: 8 == encodings: locale=UTF-8, FS=utf-8 0:00:00 load avg: 11.77 Run tests sequentially 0:00:00 load avg: 11.77 [1/1] test_os test_copy_file_range_offset (test.test_os.FileTests) ... skipped 'test needs os.copy_file_range()' ---------------------------------------------------------------------- Ran 1 test in 0.002s OK (skipped=1) == Tests result: SUCCESS == 1 test OK. Total duration: 674 ms Tests result: SUCCESS ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 17:23:29 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Feb 2021 22:23:29 +0000 Subject: [issue43233] test_copy_file_range_offset fails on AMD64 FreeBSD Shared 3.9 In-Reply-To: <1613417170.64.0.402539389952.issue43233@roundup.psfhosted.org> Message-ID: <1613427809.33.0.186354006679.issue43233@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Hummmm. The last time it succeeded was with platform.platform: FreeBSD-13.0-CURRENT-amd64-64bit-ELF: https://buildbot.python.org/all/#/builders/151/builds/280 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 17:25:54 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Feb 2021 22:25:54 +0000 Subject: [issue43233] test_copy_file_range_offset fails on AMD64 FreeBSD Shared 3.9 In-Reply-To: <1613417170.64.0.402539389952.issue43233@roundup.psfhosted.org> Message-ID: <1613427954.25.0.648268999243.issue43233@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: This seems a problem in FreeBSD 14.0 CURRENT. Koobs, could you report this upstream? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 17:40:58 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 22:40:58 +0000 Subject: [issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash In-Reply-To: <1340142734.59.0.259692259195.issue15108@psf.upfronthosting.co.za> Message-ID: <1613428858.14.0.240829478792.issue15108@roundup.psfhosted.org> STINNER Victor added the comment: > That's a lot slower unfortunately Ah sorry, I forgot PyTuple_Pack(3, item1, item2, item3) which should be very efficient. This function is also safe: only track the tuple when it is fully initialized. > This problem also is not unique to tuples, although is mainly prominent in them. PyList_New() is also affected. Do you think about other types? PyDict_New() and PySet_New() create empty containers and so are ok. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 17:42:10 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 22:42:10 +0000 Subject: [issue42967] [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1613428930.86.0.386161281196.issue42967@roundup.psfhosted.org> STINNER Victor added the comment: I created https://python-security.readthedocs.io/vuln/urllib-query-string-semicolon-separator.html to track fixes of this vulnerability. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 18:01:32 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 15 Feb 2021 23:01:32 +0000 Subject: [issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash In-Reply-To: <1340142734.59.0.259692259195.issue15108@psf.upfronthosting.co.za> Message-ID: <1613430092.46.0.655245850616.issue15108@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > PyList_New() is also affected. Do you think about other types? Any C extension class that implements a new_whatever() method that leaves the class tracked and not ready. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 18:26:54 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 15 Feb 2021 23:26:54 +0000 Subject: [issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash In-Reply-To: <1340142734.59.0.259692259195.issue15108@psf.upfronthosting.co.za> Message-ID: <1613431614.44.0.89532268755.issue15108@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 18:28:43 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 15 Feb 2021 23:28:43 +0000 Subject: [issue42819] readline 8.1 enables the bracketed paste mode by default In-Reply-To: <1609707155.89.0.22999518491.issue42819@roundup.psfhosted.org> Message-ID: <1613431723.4.0.424255255975.issue42819@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 755f3c1521b422bc2177013d289f5439975fdc4f by Dustin Rodrigues in branch 'master': bpo-42819, readline: Disable bracketed paste (GH-24108) https://github.com/python/cpython/commit/755f3c1521b422bc2177013d289f5439975fdc4f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 18:28:47 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Feb 2021 23:28:47 +0000 Subject: [issue42819] readline 8.1 enables the bracketed paste mode by default In-Reply-To: <1609707155.89.0.22999518491.issue42819@roundup.psfhosted.org> Message-ID: <1613431727.55.0.0323940341418.issue42819@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 8.0 -> 9.0 pull_requests: +23328 pull_request: https://github.com/python/cpython/pull/24545 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 18:28:55 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Feb 2021 23:28:55 +0000 Subject: [issue42819] readline 8.1 enables the bracketed paste mode by default In-Reply-To: <1609707155.89.0.22999518491.issue42819@roundup.psfhosted.org> Message-ID: <1613431735.3.0.63642945994.issue42819@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +23329 pull_request: https://github.com/python/cpython/pull/24546 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 18:35:20 2021 From: report at bugs.python.org (Zackery Spytz) Date: Mon, 15 Feb 2021 23:35:20 +0000 Subject: [issue35026] Winreg's documentation lacks mentioning required permission at some points In-Reply-To: <1539940450.92.0.788709270274.issue35026@psf.upfronthosting.co.za> Message-ID: <1613432120.23.0.224286487243.issue35026@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 7.0 -> 8.0 pull_requests: +23330 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24547 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 18:47:59 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 15 Feb 2021 23:47:59 +0000 Subject: [issue42819] readline 8.1 enables the bracketed paste mode by default In-Reply-To: <1609707155.89.0.22999518491.issue42819@roundup.psfhosted.org> Message-ID: <1613432879.85.0.437962973593.issue42819@roundup.psfhosted.org> miss-islington added the comment: New changeset f9d7c12b6c7ab978cb6c61a666bc06dd3fec9b3e by Miss Islington (bot) in branch '3.8': bpo-42819, readline: Disable bracketed paste (GH-24108) https://github.com/python/cpython/commit/f9d7c12b6c7ab978cb6c61a666bc06dd3fec9b3e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 19:13:30 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Feb 2021 00:13:30 +0000 Subject: [issue43235] Tools/scripts/stable_abi.py should also check PC/python3dll.c (Windows stable ABI) Message-ID: <1613434410.7.0.341389987333.issue43235@roundup.psfhosted.org> New submission from STINNER Victor : bpo-43155 is just yet another example that we always forget to export symbols of the stable ABI on Windows. It would be great to have a tool to check that all symbols exported on Unix are also exported on Windows. Tools/scripts/stable_abi.py could check PC/python3dll.c (Windows stable ABI). For example, currently "PyCMethod_New" symbol is in Doc/data/stable_abi.dat but miss in PC/python3dll.c. ---------- components: C API messages: 387073 nosy: vstinner priority: normal severity: normal status: open title: Tools/scripts/stable_abi.py should also check PC/python3dll.c (Windows stable ABI) versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 19:13:46 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Feb 2021 00:13:46 +0000 Subject: [issue43155] PyCMethod_New not defined in python3.lib In-Reply-To: <1612721158.76.0.287250699598.issue43155@roundup.psfhosted.org> Message-ID: <1613434426.04.0.463129404674.issue43155@roundup.psfhosted.org> STINNER Victor added the comment: > Is there a test suite that checks that the limited API functions can all be linked against? Pablo Galindo wrote a new Tools/scripts/stable_abi.py for Unix, but this tool doesn't check PC/python3dll.c yet. The tool uses Doc/data/stable_abi.dat which *does* include PyCMethod_New symbol. I created bpo-43235 "Tools/scripts/stable_abi.py should also check PC/python3dll.c (Windows stable ABI)". ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 19:14:33 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Feb 2021 00:14:33 +0000 Subject: [issue43155] PyCMethod_New not defined in python3.lib In-Reply-To: <1612721158.76.0.287250699598.issue43155@roundup.psfhosted.org> Message-ID: <1613434473.34.0.743059997641.issue43155@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 8a8b5df93f379f561aab4f2fc5b2ad54f5009f7a by Zackery Spytz in branch 'master': bpo-43155: Add PyCMethod_New to PC/python3dll.c (GH-24500) https://github.com/python/cpython/commit/8a8b5df93f379f561aab4f2fc5b2ad54f5009f7a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 19:16:37 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Feb 2021 00:16:37 +0000 Subject: [issue43155] PyCMethod_New not defined in python3.lib In-Reply-To: <1612721158.76.0.287250699598.issue43155@roundup.psfhosted.org> Message-ID: <1613434597.95.0.971991935312.issue43155@roundup.psfhosted.org> STINNER Victor added the comment: The symbol was exported on Unix since Python 3.9.0, but not on Windows. Is it ok to export it starting with Python 3.9.2? (backport the fix). IMO yes, it's ok. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 19:16:52 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Feb 2021 00:16:52 +0000 Subject: [issue43235] Tools/scripts/stable_abi.py should also check PC/python3dll.c (Windows stable ABI) In-Reply-To: <1613434410.7.0.341389987333.issue43235@roundup.psfhosted.org> Message-ID: <1613434612.14.0.557743227058.issue43235@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +pablogsal, petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 19:17:00 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Feb 2021 00:17:00 +0000 Subject: [issue43235] Tools/scripts/stable_abi.py should also check PC/python3dll.c (Windows stable ABI) In-Reply-To: <1613434410.7.0.341389987333.issue43235@roundup.psfhosted.org> Message-ID: <1613434620.67.0.544884425694.issue43235@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 19:18:10 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Feb 2021 00:18:10 +0000 Subject: [issue42819] readline 8.1 enables the bracketed paste mode by default In-Reply-To: <1609707155.89.0.22999518491.issue42819@roundup.psfhosted.org> Message-ID: <1613434690.25.0.129818292759.issue42819@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 85fd9f4e45ee95e2608dbc8cc6d4fe28e4d2abc4 by Miss Islington (bot) in branch '3.9': bpo-42819, readline: Disable bracketed paste (GH-24108) (GH-24545) https://github.com/python/cpython/commit/85fd9f4e45ee95e2608dbc8cc6d4fe28e4d2abc4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 19:19:11 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Feb 2021 00:19:11 +0000 Subject: [issue42819] readline 8.1 enables the bracketed paste mode by default In-Reply-To: <1609707155.89.0.22999518491.issue42819@roundup.psfhosted.org> Message-ID: <1613434751.51.0.899274519637.issue42819@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Dustin for the bug report *and* the fix! I close the issue. For people who want to support bracketed paste mode in Python, please disuss it in bpo-39820. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 19:21:19 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Feb 2021 00:21:19 +0000 Subject: [issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash In-Reply-To: <1340142734.59.0.259692259195.issue15108@psf.upfronthosting.co.za> Message-ID: <1613434879.1.0.310879012772.issue15108@roundup.psfhosted.org> STINNER Victor added the comment: > Any C extension class that implements a new_whatever() method that leaves the class tracked and not ready. I'm not aware of such C extension but they likely exists. If we have such extensions in the stdlib, we can try to fix them. We cannot fix such GC bugs in third party code, and I don't think that we can hack the GC to work around this issue neither. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 19:29:20 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 16 Feb 2021 00:29:20 +0000 Subject: [issue43235] Tools/scripts/stable_abi.py should also check PC/python3dll.c (Windows stable ABI) In-Reply-To: <1613434410.7.0.341389987333.issue43235@roundup.psfhosted.org> Message-ID: <1613435360.53.0.789817070914.issue43235@roundup.psfhosted.org> Petr Viktorin added the comment: I want to address this in PEP 652. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 20:03:01 2021 From: report at bugs.python.org (Eryk Sun) Date: Tue, 16 Feb 2021 01:03:01 +0000 Subject: [issue35026] Winreg's documentation lacks mentioning required permission at some points In-Reply-To: <1539940450.92.0.788709270274.issue35026@psf.upfronthosting.co.za> Message-ID: <1613437381.42.0.933397197731.issue35026@roundup.psfhosted.org> Eryk Sun added the comment: winreg.DeleteKey[Ex] does not require any particular access on the `key` handle. This handle is used only as the native NT API RootDirectory [1] when opening `subkey` with DELETE access via NtOpenKeyEx [2]. The extra access with winreg.DeleteKeyEx [3] is just to allow explicitly using the 32-bit or 64-bit registry view (i.e. KEY_WOW64_32KEY or KEY_WOW64_64KEY) when traversing the registry. I think this should be clarified in the docs. For example, if you have the predefined handle HKEY_LOCAL_MACHINE as the `key` handle, then deleting r"Software\Spam" will default to traversing the process 32- or 64-bit view of the "Software" key, but you can override the default view. (Note that if you start from a handle for the "Software" key, then setting an explicit view in the access mode doesn't matter since "Software" isn't traversed to reach "Spam" in this case.) winreg.DeleteKeyEx uses KEY_WOW64_64KEY as the default `access` mode. I think this is a mistake. It should default to 0, and thus implicitly traverse the process view from the path of the `key` handle. A 32-bit process should not default to traversing the 64-bit registry view. --- [1] https://docs.microsoft.com/en-us/windows/win32/api/ntdef/ns-ntdef-_object_attributes [2] https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-zwopenkeyex [3] https://docs.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regdeletekeyexw ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 20:53:24 2021 From: report at bugs.python.org (veganaiZe) Date: Tue, 16 Feb 2021 01:53:24 +0000 Subject: [issue43236] Windows Taskbar Jump List fails to open Recent files Message-ID: <1613440404.37.0.977304766317.issue43236@roundup.psfhosted.org> New submission from veganaiZe : OS: Windows 8.1 (x86-64) Python: 3.8.7 When I right-click on IDLE's rectangle/icon in the Windows taskbar it displays a "jump list" which contains recent/pinned filenames. A program will typically open a file when it's selected from the list. IDLE doesn't open the file, nor does it switch to the corresponding editor window if the file is already open. It seems to ignore the selection entirely. If IDLE is going to display a "Recent" list, within the jump list, then it would be nice if it actually opened the file(s). ---------- assignee: terry.reedy components: IDLE files: jumplist.png messages: 387082 nosy: terry.reedy, veganaiZe priority: normal severity: normal status: open title: Windows Taskbar Jump List fails to open Recent files type: behavior versions: Python 3.8 Added file: https://bugs.python.org/file49812/jumplist.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 21:31:43 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 16 Feb 2021 02:31:43 +0000 Subject: [issue43230] typo in Simplified/Traditional Chinese documentation for library argparse In-Reply-To: <1613410434.09.0.36699009827.issue43230@roundup.psfhosted.org> Message-ID: <1613442703.4.0.299399849407.issue43230@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: The translation is maintained under GitHub. Please report to https://github.com/python/python-docs-zh-cn/issues ---------- nosy: +xtreak resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 22:47:42 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Feb 2021 03:47:42 +0000 Subject: [issue43236] Windows IDLE taskbar icon jump list fails to open recent files In-Reply-To: <1613440404.37.0.977304766317.issue43236@roundup.psfhosted.org> Message-ID: <1613447262.92.0.301330876812.issue43236@roundup.psfhosted.org> Terry J. Reedy added the comment: This is a Windows installer code issue rather than an IDLE code issue. On Win10, I do not see jump lists for IDLE icons but do for several others. Perhaps the installer was changed to disable the non-functional lists. I will let the installer people comment further. ---------- assignee: terry.reedy -> components: +Installation, Windows -IDLE nosy: +paul.moore, steve.dower, tim.golden, zach.ware title: Windows Taskbar Jump List fails to open Recent files -> Windows IDLE taskbar icon jump list fails to open recent files _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 22:55:35 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Feb 2021 03:55:35 +0000 Subject: [issue43236] Windows IDLE taskbar icon jump list fails to open recent files In-Reply-To: <1613440404.37.0.977304766317.issue43236@roundup.psfhosted.org> Message-ID: <1613447735.3.0.988145096673.issue43236@roundup.psfhosted.org> Terry J. Reedy added the comment: I will just note that the IDLE File menu has a Recent Files list, which is the same thing. (Notepad++ does also, in addition to a working icon jump list.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 23:52:30 2021 From: report at bugs.python.org (suresh) Date: Tue, 16 Feb 2021 04:52:30 +0000 Subject: [issue43175] filecmp is not working for UTF-8 BOM file. In-Reply-To: <1612848997.29.0.320825258569.issue43175@roundup.psfhosted.org> Message-ID: <1613451150.33.0.608148722239.issue43175@roundup.psfhosted.org> suresh added the comment: Dear Team, Any more details are required. Kindly let me know. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 15 23:52:32 2021 From: report at bugs.python.org (Richard Wise) Date: Tue, 16 Feb 2021 04:52:32 +0000 Subject: [issue43237] datetime.__eq__ returns true when timezones don't match Message-ID: <1613451152.5.0.28969611579.issue43237@roundup.psfhosted.org> New submission from Richard Wise : from datetime import datetime, timezone, timedelta datetime_in_sgt = datetime(2021, 2, 16, 8, 0, 0, tzinfo=timezone(timedelta(hours=8))) datetime_in_utc = datetime(2021, 2, 16, 0, 0, 0, tzinfo=timezone.utc) print(datetime_in_sgt == datetime_in_utc) Expected: False Actual: True Although these two datetimes represent the same instant on the timeline, they are not identical because they use different timezones. This means that when unit testing timezone handling, tests will incorrectly pass despite data being returned in UTC instead of the requested timezone, so we need to write code such as this: # Timestamp comparison self.assertEqual(datetime_in_sgt, datetime_in_utc) # Timezone comparison self.assertEqual(datetime_in_sgt.tzinfo, datetime_in_utc.tzinfo) This is confusing and non-intuitive. For examples of how other languages handle such comparison, can refer to: https://docs.oracle.com/javase/8/docs/api/java/time/ZonedDateTime.html#equals-java.lang.Object- and https://docs.oracle.com/javase/8/docs/api/java/time/Instant.html#equals-java.lang.Object- ---------- components: Library (Lib) messages: 387087 nosy: Woodz priority: normal severity: normal status: open title: datetime.__eq__ returns true when timezones don't match versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 00:14:34 2021 From: report at bugs.python.org (Michael Wayne Goodman) Date: Tue, 16 Feb 2021 05:14:34 +0000 Subject: [issue20364] Rename & explain sqlite3.Cursor.execute 'parameters' param In-Reply-To: <1390473779.26.0.463818219743.issue20364@psf.upfronthosting.co.za> Message-ID: <1613452474.62.0.51225636444.issue20364@roundup.psfhosted.org> Michael Wayne Goodman added the comment: Sorry to resurrect an old bug, but I've also found the docs lacking and I can fill in some gaps with some experimental results. Setup: >>> import sqlite3 >>> conn = sqlite3.connect(':memory:') >>> conn.execute('CREATE TABLE foo (x INTEGER, y INTEGER, z INTEGER)') When the parameters is a sequence, the named placeholders can be repeated. There should be as many parameters as unique placeholders: >>> conn.execute('INSERT INTO foo VALUES (:1, :2, :1)', (4, 5)) >>> conn.execute('SELECT * FROM foo').fetchall() [(4, 5, 4)] Using numeric named placeholders is misleading, because they don't correspond to the indices in the parameters sequence. The following inserts (6, 7, 6), not (7, 6, 7): >>> conn.execute('INSERT INTO foo VALUES (:2, :1, :2)', (6, 7)) >>> conn.execute('SELECT * FROM foo').fetchall() [(4, 5, 4), (6, 7, 6)] So it is probably better to stick to non-numeric names: >>> conn.execute('INSERT INTO foo VALUES (:a, :a, :a)', (8,)) >>> conn.execute('SELECT * FROM foo').fetchall() [(4, 5, 4), (6, 7, 6), (8, 8, 8)] When the number of parameters is not the same as the number of unique placeholders, an sqlite3.ProgrammingError is raised: >>> conn.execute('INSERT INTO foo VALUES (:1, :2, :1)', (4, 5, 6)) Traceback (most recent call last): File "", line 1, in sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 2, and there are 3 supplied. Question mark placeholders may be mixed with named placeholders. Each question mark uses the next "unclaimed" parameter, which then cannot be reused. >>> conn.execute('INSERT INTO foo VALUES (:a, ?, :a)', (1, 2)) >>> conn.execute('SELECT * FROM foo').fetchall() [(4, 5, 4), (6, 7, 6), (8, 8, 8), (1, 2, 1)] As mentioned by R. David Murray and Terry J. Reedy above, when the parameters are given as a dict, extra items are ignored and no error is raised: >>> conn.execute('INSERT INTO foo VALUES (:a, :b, :a)', {'a': 3, 'b': 4, 'c': 5}) >>> conn.execute('SELECT * FROM foo').fetchall() [(4, 5, 4), (6, 7, 6), (8, 8, 8), (1, 2, 1), (3, 4, 3)] Disclaimer: I tested the above statements on Python 3.8.5. I did verify if the behavior is the same with earlier/later versions, and I don't know if this is intentional behavior or some undiscovered bug. ---------- nosy: +goodmami _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 00:17:04 2021 From: report at bugs.python.org (Michael Wayne Goodman) Date: Tue, 16 Feb 2021 05:17:04 +0000 Subject: [issue20364] Rename & explain sqlite3.Cursor.execute 'parameters' param In-Reply-To: <1390473779.26.0.463818219743.issue20364@psf.upfronthosting.co.za> Message-ID: <1613452624.75.0.855113837556.issue20364@roundup.psfhosted.org> Michael Wayne Goodman added the comment: Sorry, typo in my last statement. I did *not* verify if the behavior is the same with earlier/later versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 02:04:52 2021 From: report at bugs.python.org (Raghav Bhandari) Date: Tue, 16 Feb 2021 07:04:52 +0000 Subject: [issue43238] python picking garbage values randomly incase running palindrome function Message-ID: <1613459092.79.0.276117009371.issue43238@roundup.psfhosted.org> New submission from Raghav Bhandari : temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python3 and revtemp value is 3nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39 and revtemp value is 93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/ and revtemp value is /93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/p and revtemp value is p/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/py and revtemp value is yp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/pyt and revtemp value is typ/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/pyth and revtemp value is htyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/pytho and revtemp value is ohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python and revtemp value is nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python. and revtemp value is .nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C &temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.e and revtemp value is e.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.ex and revtemp value is xe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe and revtemp value is exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe and revtemp value is exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c and revtemp value is c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c: and revtemp value is :c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/ and revtemp value is /:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/U and revtemp value is U/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Us and revtemp value is sU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Use and revtemp value is esU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/User and revtemp value is resU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users and revtemp value is sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/ and revtemp value is /sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/R and revtemp value is R/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Ra and revtemp value is aR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Rag and revtemp value is gaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Ragh and revtemp value is hgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Ragha and revtemp value is ahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav and revtemp value is vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/ and revtemp value is /vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/D and revtemp value is D/vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/De and revtemp value is eD/vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/Des and revtemp value is seD/vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/Desk and revtemp value is kseD/vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/Deskt and revtemp value is tkseD/vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/Deskto and revtemp value is otkseD/vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/Desktop and revtemp value is potkseD/vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/Desktop/ and revtemp value is /potkseD/vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/Desktop/t and revtemp value is t/potkseD/vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/Desktop/te and revtemp value is et/potkseD/vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/Desktop/tes and revtemp value is set/potkseD/vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/Desktop/test and revtemp value is tset/potkseD/vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/Desktop/test. and revtemp value is .tset/potkseD/vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/Desktop/test.p and revtemp value is p.tset/potkseD/vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is & C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/Desktop/test.py and revtemp value is yp.tset/potkseD/vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C & temp value is C and revtemp value is C temp value is C: and revtemp value is :C temp value is C:/ and revtemp value is /:C temp value is C:/U and revtemp value is U/:C temp value is C:/Us and revtemp value is sU/:C temp value is C:/Use and revtemp value is esU/:C temp value is C:/User and revtemp value is resU/:C temp value is C:/Users and revtemp value is sresU/:C temp value is C:/Users/ and revtemp value is /sresU/:C temp value is C:/Users/R and revtemp value is R/sresU/:C temp value is C:/Users/Ra and revtemp value is aR/sresU/:C temp value is C:/Users/Rag and revtemp value is gaR/sresU/:C temp value is C:/Users/Ragh and revtemp value is hgaR/sresU/:C temp value is C:/Users/Ragha and revtemp value is ahgaR/sresU/:C temp value is C:/Users/Raghav and revtemp value is vahgaR/sresU/:C temp value is C:/Users/Raghav/ and revtemp value is /vahgaR/sresU/:C temp value is C:/Users/Raghav/A and revtemp value is A/vahgaR/sresU/:C temp value is C:/Users/Raghav/Ap and revtemp value is pA/vahgaR/sresU/:C temp value is C:/Users/Raghav/App and revtemp value is ppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppD and revtemp value is DppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppDa and revtemp value is aDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppDat and revtemp value is taDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData and revtemp value is ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/ and revtemp value is /ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/L and revtemp value is L/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Lo and revtemp value is oL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Loc and revtemp value is coL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Loca and revtemp value is acoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local and revtemp value is lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/ and revtemp value is /lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/P and revtemp value is P/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Pr and revtemp value is rP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Pro and revtemp value is orP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Prog and revtemp value is gorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Progr and revtemp value is rgorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Progra and revtemp value is argorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Program and revtemp value is margorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs and revtemp value is smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/ and revtemp value is /smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/P and revtemp value is P/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Py and revtemp value is yP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Pyt and revtemp value is tyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Pyth and revtemp value is htyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Pytho and revtemp value is ohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python and revtemp value is nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/ and revtemp value is /nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/P and revtemp value is P/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Py and revtemp value is yP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Pyt and revtemp value is tyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Pyth and revtemp value is htyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Pytho and revtemp value is ohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python and revtemp value is nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python3 and revtemp value is 3nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39 and revtemp value is 93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/ and revtemp value is /93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/p and revtemp value is p/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/py and revtemp value is yp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/pyt and revtemp value is typ/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/pyth and revtemp value is htyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/pytho and revtemp value is ohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python and revtemp value is nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python. and revtemp value is .nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.e and revtemp value is e.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.ex and revtemp value is xe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe and revtemp value is exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe and revtemp value is exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c and revtemp value is c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c: and revtemp value is :c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/ and revtemp value is /:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/U and revtemp value is U/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Us and revtemp value is sU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Use and revtemp value is esU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/User and revtemp value is resU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users and revtemp value is sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/ and revtemp value is /sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/R and revtemp value is R/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Ra and revtemp value is aR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Rag and revtemp value is gaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Ragh and revtemp value is hgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Ragha and revtemp value is ahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav and revtemp value is vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/ and revtemp value is /vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/D and revtemp value is D/vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/De and revtemp value is eD/vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/Des and revtemp value is seD/vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/Desk and revtemp value is kseD/vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/Deskt and revtemp value is tkseD/vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/Deskto and revtemp value is otkseD/vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/Desktop and revtemp value is potkseD/vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/Desktop/ and revtemp value is /potkseD/vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/Desktop/t and revtemp value is t/potkseD/vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C temp value is C:/Users/Raghav/AppData/Local/Programs/Python/Python39/python.exe c:/Users/Raghav/Desktop/te and revtemp value is et/potkseD/vahgaR/sresU/:c exe.nohtyp/93nohtyP/nohtyP/smargorP/lacoL/ataDppA/vahgaR/sresU/:C ---------- components: Windows files: test.py messages: 387090 nosy: paul.moore, rv.raghav23, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: python picking garbage values randomly incase running palindrome function type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file49813/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 02:39:33 2021 From: report at bugs.python.org (=?utf-8?q?Lum=C3=ADr_Balhar?=) Date: Tue, 16 Feb 2021 07:39:33 +0000 Subject: [issue43228] Regression in function builtins In-Reply-To: <1613396595.98.0.792771642012.issue43228@roundup.psfhosted.org> Message-ID: <1613461173.3.0.51696322951.issue43228@roundup.psfhosted.org> Lum?r Balhar added the comment: I'm not an expert nor an author but this might help: Cloudpickle offers extended possibilities for pickling but uses the standard pickle module for unpickling: >>> import pickle, cloudpickle >>> cloudpickle.load is pickle.load True >>> cloudpickle.loads is pickle.loads True So, the question here is why the new Python version cannot handle cloudpickle output anymore. >>> def f(): ... return len("aaaa") ... >>> pickle.dumps(f) b'\x80\x04\x95\x12\x00\x00\x00\x00\x00\x00\x00\x8c\x08__main__\x94\x8c\x01f\x94\x93\x94.' >>> cloudpickle.dumps(f) b'\x80\x05\x95\xa9\x01\x00\x00\x00\x00\x00\x00\x8c\x17cloudpickle.cloudpickle\x94\x8c\r_builtin_type\x94\x93\x94\x8c\nLambdaType\x94\x85\x94R\x94(h\x02\x8c\x08CodeType\x94\x85\x94R\x94(K\x00K\x00K\x00K\x00K\x02KCC\x08t\x00d\x01\x83\x01S\x00\x94N\x8c\x04aaaa\x94\x86\x94\x8c\x03len\x94\x85\x94)\x8c\x07\x94\x8c\x01f\x94K\x01C\x02\x00\x01\x94))t\x94R\x94}\x94(\x8c\x0b__package__\x94N\x8c\x08__name__\x94\x8c\x08__main__\x94uNNNt\x94R\x94\x8c\x1ccloudpickle.cloudpickle_fast\x94\x8c\x12_function_setstate\x94\x93\x94h\x18}\x94}\x94(h\x15h\x0f\x8c\x0c__qualname__\x94h\x0f\x8c\x0f__annotations__\x94}\x94\x8c\x0e__kwdefaults__\x94N\x8c\x0c__defaults__\x94N\x8c\n__module__\x94h\x16\x8c\x07__doc__\x94N\x8c\x0b__closure__\x94N\x8c\x17_cloudpickle_submodules\x94]\x94\x8c\x0b__globals__\x94}\x94u\x86\x94\x86R0.' It seems to me that cloudpickle adds also __globals__ to the final output and pickle is no longer able to restore it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 02:50:11 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Feb 2021 07:50:11 +0000 Subject: [issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API In-Reply-To: <1585915023.07.0.846808236133.issue40170@roundup.psfhosted.org> Message-ID: <1613461811.34.0.324239287013.issue40170@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 871eb4237b9be95263ca13ba8856e78344eb9eba by Erlend Egeberg Aasland in branch 'master': bpo-40170: Convert PyDescr_IsData() to static inline function (GH-24535) https://github.com/python/cpython/commit/871eb4237b9be95263ca13ba8856e78344eb9eba ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 03:03:09 2021 From: report at bugs.python.org (John Paul Adrian Glaubitz) Date: Tue, 16 Feb 2021 08:03:09 +0000 Subject: [issue43179] Remove 32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613462589.06.0.599170341233.issue43179@roundup.psfhosted.org> John Paul Adrian Glaubitz added the comment: > The guidelines for platform support are explained in PEP 11 (https://www.python.org/dev/peps/pep-0011/#supporting-platforms). We don't support platforms unless we have maintainers and CI (builtbots) in place for the platform. You don't need to support a platform. Just call it unsupported and ignore issues if people report them unless they provide a patch themselves. FWIW, the Python interpreter has never caused any issues on any platform that we support in Debian. We are regularly building the latest upstream versions of all available Python interpreters thanks to the packaging work of Matthias Klose. You can view test results any time by going to https://buildd.debian.org/ and searching for "pythonX.Y". So there is actually a CI for release builds. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 03:07:27 2021 From: report at bugs.python.org (John Paul Adrian Glaubitz) Date: Tue, 16 Feb 2021 08:07:27 +0000 Subject: [issue43179] Remove 32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613462847.27.0.825285014419.issue43179@roundup.psfhosted.org> John Paul Adrian Glaubitz added the comment: > So IMO it's fine to remove the support. You are not removing "support". You're just disallowing users to use the Python interpreter - which works perfectly fine on all architectures we have in current and previous releases - on Debian. A few preprocessor macros plus some lines in a configure.ac aren't something that would qualify as platform support. There is no architecture-specific code and the Python interpreter is highly portable and just works whereever we build it in Debian (and openSUSE). I would unterstand the reasoning of such a change if there was a swath of users filing bug reports about s390 and you just don't want to deal with that any longer. But that's not the case as far as I can see. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 03:16:47 2021 From: report at bugs.python.org (Christian Heimes) Date: Tue, 16 Feb 2021 08:16:47 +0000 Subject: [issue43179] Remove 32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613463407.07.0.936007875037.issue43179@roundup.psfhosted.org> Christian Heimes added the comment: > You don't need to support a platform. Just call it unsupported and ignore issues if people report them unless they provide a patch themselves. This thread is an excellent example why ignoring platforms comes at a cost. It will only get worse when are going to introduce platform and architecture specific code for optimizations and features. > You can view test results any time by going to https://buildd.debian.org/ and searching for "pythonX.Y". So there is actually a CI for release builds. The site does not list a s390 builder. There is only a s390x builder. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 03:32:57 2021 From: report at bugs.python.org (John Paul Adrian Glaubitz) Date: Tue, 16 Feb 2021 08:32:57 +0000 Subject: [issue43179] Remove 32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613464377.33.0.4456925242.issue43179@roundup.psfhosted.org> John Paul Adrian Glaubitz added the comment: > This thread is an excellent example why ignoring platforms comes at a cost. It will only get worse when are going to introduce platform and architecture specific code for optimizations and features. Which is purely hypothetical at the moment. You are arguing with something that might happen in the future but currently doesn't exist to justify the removal of 5 lines of preprocessor and autoconf "code". You can still drop these lines in the future _if_ they happen to cause any headache. But that is currently not the case, so there isn't really a burden. >> You can view test results any time by going to https://buildd.debian.org/ and searching for "pythonX.Y". So there is actually a CI for release builds. > The site does not list a s390 builder. There is only a s390x builder. s390 is being built for SLE-12, for example, on the internal SUSE build system and SLE-12 is still supported. So if a customer wants to use Python 3.10 in a SLE-12 s390 environment, why keep them from doing so? In my experience some upstream projects make the mistake that they think they always know how users are using their software. But since there is no dedicated feedback channel, you have no means in knowing whether someone is building Python for a given architecture for their custom project. After all, there are source-only distributions like Gentoo, so you don't have to rely on any existing binary builds. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 03:35:16 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Feb 2021 08:35:16 +0000 Subject: [issue43179] Remove 32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613464516.07.0.891809090073.issue43179@roundup.psfhosted.org> STINNER Victor added the comment: > s390 is being built for SLE-12, for example, on the internal SUSE build system and SLE-12 is still supported. So if a customer wants to use Python 3.10 in a SLE-12 s390 environment, why keep them from doing so? I don't think that SuSE plans to provide Python 3.10 on SLE-12. cc @mcepl ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 03:45:40 2021 From: report at bugs.python.org (Eryk Sun) Date: Tue, 16 Feb 2021 08:45:40 +0000 Subject: [issue43236] Windows IDLE taskbar icon jump list fails to open recent files In-Reply-To: <1613440404.37.0.977304766317.issue43236@roundup.psfhosted.org> Message-ID: <1613465140.45.0.231816815989.issue43236@roundup.psfhosted.org> Eryk Sun added the comment: The IDLE shortcut that's installed by the development distribution runs `"\pythonw.exe" "\Lib\idlelib\idle.pyw"`. Thus opening a file that's pinned to the jumplist will execute it as a script via "pythonw.exe". To integrate better with the Windows shell, IDLE would need its own executable. Moreover, AFAICT, it isn't enough to use a launcher that executes "pythonw.exe", such as a distlib launcher installed by pip for an entrypoint script. Using a launcher disassociates the executable that the shell runs to open a file from the application that creates the UI. It needs to be a simple C application that hard codes executing the idlelib module, similar in spirit to what's implemented in PC/python_uwp.cpp for the store app. I created a test app that implements this, and I can confirm that pinned and recent files in the jumplist open as desired in IDLE. The development distribution would install the new binary (e.g. "idle3.10.exe") in the installation directory beside the DLL. That's the simplest way to link with the interpreter DLL and find the standard library. The IDLE shortcut target and "Edit with IDLE" command would be updated to use the new executable instead of "pythonw.exe". ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 03:53:34 2021 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 16 Feb 2021 08:53:34 +0000 Subject: [issue43238] python picking garbage values randomly incase running palindrome function In-Reply-To: <1613459092.79.0.276117009371.issue43238@roundup.psfhosted.org> Message-ID: <1613465614.47.0.776287076948.issue43238@roundup.psfhosted.org> Mark Dickinson added the comment: Hi Raghav. I think you think you're found a bug in Python, but I'm afraid it's difficult to tell from your report what you think that bug is. Please state clearly what you did, what you expected to happen (and why), and what actually happened. You may find this article useful: https://www.chiark.greenend.org.uk/~sgtatham/bugs.html You might also consider asking for help on user forums. It's much more likely that any surprising behaviour you're seeing here is due to a bug in your code rather than in Python itself. ---------- components: -Windows nosy: +mark.dickinson -paul.moore, rv.raghav23, steve.dower, tim.golden, zach.ware resolution: -> not a bug status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 05:00:06 2021 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 16 Feb 2021 10:00:06 +0000 Subject: [issue43237] datetime.__eq__ returns true when timezones don't match In-Reply-To: <1613451152.5.0.28969611579.issue43237@roundup.psfhosted.org> Message-ID: <1613469606.84.0.564965335123.issue43237@roundup.psfhosted.org> Mark Dickinson added the comment: Hi Richard. Thanks for the report. Python's working as designed (and as documented and tested) here. IOW, the behaviour is deliberate - this isn't a bug. Any change in behaviour would have to target 3.10 at the earliest (and it's already quite late in the release process for 3.10). A couple of questions: (1) what would you want the comparisons `datetime_in_sgt <= datetime_in_utc` and `datetime_in_utc <= datetime_in_sgt` to give? (2) How would you propose to change the behaviour without breaking existing code that makes use of the current behaviour? > This is confusing and non-intuitive. That's a rather subjective judgement. I'd personally find the behaviour you suggest non-intuitive (and I find the behaviour of Java's order comparisons on ZonedDateTime to be highly non-intuitive). We'd need something a bit more objective and/or widely supported to justify a behaviour change. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 05:01:45 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 16 Feb 2021 10:01:45 +0000 Subject: [issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API In-Reply-To: <1585915023.07.0.846808236133.issue40170@roundup.psfhosted.org> Message-ID: <1613469705.35.0.740728793364.issue40170@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +23331 pull_request: https://github.com/python/cpython/pull/24548 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 05:09:46 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Tue, 16 Feb 2021 10:09:46 +0000 Subject: [issue43237] datetime.__eq__ returns true when timezones don't match In-Reply-To: <1613451152.5.0.28969611579.issue43237@roundup.psfhosted.org> Message-ID: <1613470186.51.0.240936778544.issue43237@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +belopolsky, p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 05:13:58 2021 From: report at bugs.python.org (Eryk Sun) Date: Tue, 16 Feb 2021 10:13:58 +0000 Subject: [issue43175] filecmp is not working for UTF-8 BOM file. In-Reply-To: <1612848997.29.0.320825258569.issue43175@roundup.psfhosted.org> Message-ID: <1613470438.23.0.13578856902.issue43175@roundup.psfhosted.org> Eryk Sun added the comment: The two files in "files.zip" have the same contents: >>> open('source.css', 'rb').read() == open('destination.css', 'rb').read() True Maybe there's something peculiar about the stat results. Check that they're both reported as regular files with the same size: import os for f in ('source.css', 'destination.css'): print(f, os.path.isfile(f), os.path.getsize(f)) ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 06:17:36 2021 From: report at bugs.python.org (RedEyed) Date: Tue, 16 Feb 2021 11:17:36 +0000 Subject: [issue42580] ctypes.util.find_library("libc") fails In-Reply-To: <1607251833.68.0.530621101082.issue42580@roundup.psfhosted.org> Message-ID: <1613474256.08.0.578705768041.issue42580@roundup.psfhosted.org> RedEyed added the comment: can't reproduce (py39) ? ~ ipython Python 3.9.1 (default, Dec 11 2020, 14:32:07) Type 'copyright', 'credits' or 'license' for more information IPython 7.20.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: import ctypes.util In [2]: a = ctypes.util.find_library("libc") In [3]: print(a) None ---------- nosy: +RedEyed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 06:29:30 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Feb 2021 11:29:30 +0000 Subject: [issue42580] ctypes.util.find_library("libc") fails In-Reply-To: <1607251833.68.0.530621101082.issue42580@roundup.psfhosted.org> Message-ID: <1613474970.2.0.628657264274.issue42580@roundup.psfhosted.org> STINNER Victor added the comment: This function is quite complicated on Linux: def find_library(name): # See issue #9998 return _findSoname_ldconfig(name) or \ _get_soname(_findLib_gcc(name)) or _get_soname(_findLib_ld(name)) _findSoname_ldconfig() uses "/sbin/ldconfig -p" and searchs for 'libc6,x86-64' in the output (on x86-64). _findLib_gcc() uses "gcc -Wl,-t -o tmp -lc" command and search for "lib" in the created "tmp" file. _findLib_ld() uses "ld -t -lc" command and searchs for "lib" pattern. The exact code is more complicated :-) You should debug this issue by running these commands manually on Debian. Note: python3.9 -c 'import ctypes.util; print(ctypes.util.find_library("c"))' commands displays libc.so.6 with Python 3.8, 3.9 and 3.10 on Fedora. I cannot reproduce the issue on Fedora 33 (x86-64). ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 06:30:49 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Feb 2021 11:30:49 +0000 Subject: [issue42580] ctypes.util.find_library("libc") fails In-Reply-To: <1607251833.68.0.530621101082.issue42580@roundup.psfhosted.org> Message-ID: <1613475049.34.0.385837758872.issue42580@roundup.psfhosted.org> STINNER Victor added the comment: > _findLib_gcc() uses "gcc -Wl,-t -o tmp -lc" command and search for "lib" in the created "tmp" file. Oh, it looks for the "lib" in the process stdout (not in the created "tmp" file). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 07:05:06 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Feb 2021 12:05:06 +0000 Subject: [issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details In-Reply-To: <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za> Message-ID: <1613477106.58.0.710592942475.issue35134@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 17dbd4078b68db8954df6b5cdc40b786bc4ad7af by Nicholas Sim in branch 'master': bpo-35134, Include: Move pytime.h to cpython/pytime.h (GH-23988) https://github.com/python/cpython/commit/17dbd4078b68db8954df6b5cdc40b786bc4ad7af ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 07:30:18 2021 From: report at bugs.python.org (Vadym Stupakov) Date: Tue, 16 Feb 2021 12:30:18 +0000 Subject: [issue42580] ctypes.util.find_library("libc") fails In-Reply-To: <1607251833.68.0.530621101082.issue42580@roundup.psfhosted.org> Message-ID: <1613478618.83.0.0329930222076.issue42580@roundup.psfhosted.org> Vadym Stupakov added the comment: Note, that adding "lib" prefix to any library is wrong, that's why it returns "None" or raises the exception. And it works fine when you call find_library("c") I guess the issue, that was reported here, is about raising and exception instead of returning "None", but not about finding library, isn't it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 07:43:58 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Feb 2021 12:43:58 +0000 Subject: [issue42580] ctypes.util.find_library("libc") fails In-Reply-To: <1607251833.68.0.530621101082.issue42580@roundup.psfhosted.org> Message-ID: <1613479438.88.0.749807823218.issue42580@roundup.psfhosted.org> STINNER Victor added the comment: Oh right, I always use find_library("c"), not find_library("libc"). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 07:55:15 2021 From: report at bugs.python.org (Vadym Stupakov) Date: Tue, 16 Feb 2021 12:55:15 +0000 Subject: [issue42580] ctypes.util.find_library("libc") fails In-Reply-To: <1607251833.68.0.530621101082.issue42580@roundup.psfhosted.org> Message-ID: <1613480115.08.0.802133281921.issue42580@roundup.psfhosted.org> Vadym Stupakov added the comment: So, can we close it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 07:57:38 2021 From: report at bugs.python.org (=?utf-8?q?Lum=C3=ADr_Balhar?=) Date: Tue, 16 Feb 2021 12:57:38 +0000 Subject: [issue41282] Deprecate and remove distutils In-Reply-To: <1594542625.3.0.789939298104.issue41282@roundup.psfhosted.org> Message-ID: <1613480258.86.0.300827806404.issue41282@roundup.psfhosted.org> Change by Lum?r Balhar : ---------- pull_requests: +23332 pull_request: https://github.com/python/cpython/pull/24549 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 08:27:13 2021 From: report at bugs.python.org (Matthias Klose) Date: Tue, 16 Feb 2021 13:27:13 +0000 Subject: [issue42580] ctypes.util.find_library("libc") fails In-Reply-To: <1607251833.68.0.530621101082.issue42580@roundup.psfhosted.org> Message-ID: <1613482033.09.0.310608209183.issue42580@roundup.psfhosted.org> Matthias Klose added the comment: ctypes.util.find_library("libc") used to work in 3.8, not working in 3.9. As I said before, ctypes.util.find_library("c") works in both 3.8 and 3.9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 08:35:22 2021 From: report at bugs.python.org (Eryk Sun) Date: Tue, 16 Feb 2021 13:35:22 +0000 Subject: [issue42580] ctypes.util.find_library("libc") fails In-Reply-To: <1607251833.68.0.530621101082.issue42580@roundup.psfhosted.org> Message-ID: <1613482522.69.0.163127216497.issue42580@roundup.psfhosted.org> Eryk Sun added the comment: Issue 41976 added ctypes.util._is_elf() to filter out linker scripts such as "libc.so". The PR was backported to 3.7. _is_elf() assumes the trace result has absolute paths that can be opened, but Matthias is getting the relative filename "liblibc.a" in the result. Whatever the reason, I think if the file can't be opened for reading, then _is_elf() should just return False. For example: def _is_elf(filename): "Return True if the given file is an ELF file" elf_header = b'\x7fELF' try: with open(filename, 'br') as thefile: return thefile.read(4) == elf_header except OSError: return False ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 08:50:25 2021 From: report at bugs.python.org (Vadym Stupakov) Date: Tue, 16 Feb 2021 13:50:25 +0000 Subject: [issue42580] ctypes.util.find_library("libc") fails In-Reply-To: <1607251833.68.0.530621101082.issue42580@roundup.psfhosted.org> Message-ID: <1613483425.54.0.157003282591.issue42580@roundup.psfhosted.org> Vadym Stupakov added the comment: > ctypes.util.find_library("libc") used to work in 3.8, not working in 3.9. As I said before, ctypes.util.find_library("c") works in both 3.8 and 3.9. no, it doesn't work (and it shouldn't) neither in python 3.8 nor 3.7 Python 3.8.5 (default, Sep 4 2020, 07:30:14) Type 'copyright', 'credits' or 'license' for more information IPython 7.19.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: import ctypes.util In [2]: a = ctypes.util.find_library("libc") In [3]: print(a) None Python 3.7.6 (default, Jan 8 2020, 19:59:22) Type 'copyright', 'credits' or 'license' for more information IPython 7.16.1 -- An enhanced Interactive Python. Type '?' for help. Python 3.7.6 (default, Jan 8 2020, 19:59:22) import ctypes.util a = ctypes.util.find_library("libc") print(a) None as I said, adding prefix "lib" is wrong ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 09:04:28 2021 From: report at bugs.python.org (Vadym Stupakov) Date: Tue, 16 Feb 2021 14:04:28 +0000 Subject: [issue42580] ctypes.util.find_library("libc") fails In-Reply-To: <1607251833.68.0.530621101082.issue42580@roundup.psfhosted.org> Message-ID: <1613484268.1.0.987041549338.issue42580@roundup.psfhosted.org> Vadym Stupakov added the comment: I mean, find_library relies on gcc linker, when you pass library name to the linker, it automatically ads "lib" prefix to the library so, when you pass "libc", linker ads "lib" so u have an error with "liblibc" name. just man ld and see "-l" option: " -l namespec --library=namespec Add the archive or object file specified by namespec to the list of files to link. This option may be used any number of times. If namespec is of the form :filename, ld will search the library path for a file called filename, otherwise it will search the library path for a file called libnamespec.a. " as you can see, you pass not a library name, but a "namespec" which then transforms to "libnamespec" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 09:13:53 2021 From: report at bugs.python.org (Nicholas Sim) Date: Tue, 16 Feb 2021 14:13:53 +0000 Subject: [issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details In-Reply-To: <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za> Message-ID: <1613484833.86.0.347216888222.issue35134@roundup.psfhosted.org> Change by Nicholas Sim : ---------- pull_requests: +23333 pull_request: https://github.com/python/cpython/pull/24550 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 10:06:02 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Feb 2021 15:06:02 +0000 Subject: [issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API In-Reply-To: <1585915023.07.0.846808236133.issue40170@roundup.psfhosted.org> Message-ID: <1613487962.23.0.746406364478.issue40170@roundup.psfhosted.org> STINNER Victor added the comment: New changeset cc54001c2eb3b14320c1667b22602d69c90d5865 by Erlend Egeberg Aasland in branch 'master': bpo-40170: Always define PyIter_Check() as a function (GH-24548) https://github.com/python/cpython/commit/cc54001c2eb3b14320c1667b22602d69c90d5865 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 10:06:07 2021 From: report at bugs.python.org (Charalampos Stratakis) Date: Tue, 16 Feb 2021 15:06:07 +0000 Subject: [issue43179] Remove 32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613487967.72.0.177188439957.issue43179@roundup.psfhosted.org> Charalampos Stratakis added the comment: > s390 is being built for SLE-12, for example, on the internal SUSE build system and SLE-12 is still supported. So if a customer wants to use Python 3.10 in a SLE-12 s390 environment, why keep them from doing so? Are you sure about that? It seems SLE-12 support s390x not s390. Maybe it's multilib support in a similar manner that I've mentioned about RHEL7? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 10:06:46 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Feb 2021 15:06:46 +0000 Subject: [issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API In-Reply-To: <1585915023.07.0.846808236133.issue40170@roundup.psfhosted.org> Message-ID: <1613488006.8.0.78646034166.issue40170@roundup.psfhosted.org> STINNER Victor added the comment: > New changeset cc54001c2eb3b14320c1667b22602d69c90d5865 by Erlend Egeberg Aasland in branch 'master': > bpo-40170: Always define PyIter_Check() as a function (GH-24548) For macOS which doesn't use LTO compiler optimization, we added private static inline functions of some "Check" functions. But I don't think that it's worth it here (I don't think that the function is commonly called in "hot code"). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 10:18:01 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Feb 2021 15:18:01 +0000 Subject: [issue42580] ctypes.util.find_library("libc") fails In-Reply-To: <1607251833.68.0.530621101082.issue42580@roundup.psfhosted.org> Message-ID: <1613488681.35.0.707927441094.issue42580@roundup.psfhosted.org> STINNER Victor added the comment: The documentation is explicit: you must not include the "lib" prefix. https://docs.python.org/dev/library/ctypes.html#ctypes.util.find_library See also examples: https://docs.python.org/dev/library/ctypes.html#finding-shared-libraries If it worked with "lib" prefix in Python 3.8, it wasn't on purpose. You should fix your code, but Python works as expected. I close the issue. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 10:29:24 2021 From: report at bugs.python.org (Eryk Sun) Date: Tue, 16 Feb 2021 15:29:24 +0000 Subject: [issue42580] ctypes.util.find_library("libc") fails In-Reply-To: <1607251833.68.0.530621101082.issue42580@roundup.psfhosted.org> Message-ID: <1613489364.7.0.111522251919.issue42580@roundup.psfhosted.org> Eryk Sun added the comment: Can't there be a library named "libc" with the shared module "liblibc.so"? It seems to me that the _is_elf() function added in issue 41976 is breaking the contract that "[i]f no library can be found, returns None". It's not supposed to leak arbitrary exceptions from the implementation if the library isn't found. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 10:43:36 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 16 Feb 2021 15:43:36 +0000 Subject: [issue23903] Generate PC/python3.def by scraping headers In-Reply-To: <1428637761.13.0.348463350169.issue23903@psf.upfronthosting.co.za> Message-ID: <1613490216.25.0.033978221723.issue23903@roundup.psfhosted.org> Petr Viktorin added the comment: I plan to do this slightly differently, see PEP 652. ---------- nosy: +petr.viktorin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 11:07:52 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 16 Feb 2021 16:07:52 +0000 Subject: [issue43239] PyCFunction_New is not exported with PyAPI_FUNC Message-ID: <1613491672.14.0.339809223416.issue43239@roundup.psfhosted.org> New submission from Petr Viktorin : PyCFunction_New is part of the Stable ABI (see bpo-21354), but it is not declared as PyAPI_FUNC, and thus not exported with GCC's -fvisibility=hidden. To match Windows, it should be declared. (I don't think this has any real impact, I just want to fix it before enabling automatic tests on such issues.) ---------- assignee: petr.viktorin components: C API messages: 387119 nosy: petr.viktorin priority: normal severity: normal status: open title: PyCFunction_New is not exported with PyAPI_FUNC versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 11:27:28 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Feb 2021 16:27:28 +0000 Subject: [issue43239] PyCFunction_New is not exported with PyAPI_FUNC In-Reply-To: <1613491672.14.0.339809223416.issue43239@roundup.psfhosted.org> Message-ID: <1613492848.35.0.934430538851.issue43239@roundup.psfhosted.org> STINNER Victor added the comment: Oh, it's not listed by Doc/data/stable_abi.dat and so not checked by Tools/scripts/stable_abi.py. It's implemented explicitly as a function only for the stable ABI: PyObject * PyCFunction_New(PyMethodDef *ml, PyObject *self) { return PyCFunction_NewEx(ml, self, NULL); } So yeah, it should be exported. By the way, I would suggest to move "#define PyCFunction_New(ML, SELF) PyCFunction_NewEx((ML), (SELF), NULL)" to Include/cpython/methodobject.h to clarify that the limited C API should call "PyCFunction_New()" and not call "PyCFunction_NewEx()". ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 11:33:47 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 16 Feb 2021 16:33:47 +0000 Subject: [issue43239] PyCFunction_New is not exported with PyAPI_FUNC In-Reply-To: <1613491672.14.0.339809223416.issue43239@roundup.psfhosted.org> Message-ID: <1613493227.0.0.802570038418.issue43239@roundup.psfhosted.org> Change by Petr Viktorin : ---------- keywords: +patch pull_requests: +23334 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24551 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 11:38:47 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 16 Feb 2021 16:38:47 +0000 Subject: [issue43239] PyCFunction_New is not exported with PyAPI_FUNC In-Reply-To: <1613491672.14.0.339809223416.issue43239@roundup.psfhosted.org> Message-ID: <1613493527.99.0.495431915467.issue43239@roundup.psfhosted.org> Petr Viktorin added the comment: > By the way, I would suggest to move "#define PyCFunction_New(ML, SELF) PyCFunction_NewEx((ML), (SELF), NULL)" to Include/cpython/methodobject.h OK, I'll add that move to the PR. > Oh, it's not listed by Doc/data/stable_abi.dat and so not checked by Tools/scripts/stable_abi.py. I'm planning to rework this for PEP 652 (which is how I found the issue in the first place), so I'll not add it there now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 11:44:19 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 16 Feb 2021 16:44:19 +0000 Subject: [issue43239] PyCFunction_New is not exported with PyAPI_FUNC In-Reply-To: <1613491672.14.0.339809223416.issue43239@roundup.psfhosted.org> Message-ID: <1613493859.29.0.830231955368.issue43239@roundup.psfhosted.org> Petr Viktorin added the comment: > By the way, I would suggest to move "#define PyCFunction_New(ML, SELF) PyCFunction_NewEx((ML), (SELF), NULL)" to Include/cpython/methodobject.h Wait no, I wrote too soon. PyCFunction_NewEx is part of the limited API as well, even though it's undocumented. People can call it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 13:07:31 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Feb 2021 18:07:31 +0000 Subject: [issue43236] Windows IDLE taskbar icon jump list fails to open recent files In-Reply-To: <1613440404.37.0.977304766317.issue43236@roundup.psfhosted.org> Message-ID: <1613498851.3.0.768344324125.issue43236@roundup.psfhosted.org> Terry J. Reedy added the comment: Eryk, thank you for the research. Our macOS installer already adds an 'idlex.y' executable. Ned, do you have any comments, pro or con, about doing so. (I worry a bit about reinforcing the beginner delusion that IDLE is Python or that IDLE executes Python code. But this appears to already be as common for Windows beginners as for Mac beginners.) ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 13:37:49 2021 From: report at bugs.python.org (Alan Moore) Date: Tue, 16 Feb 2021 18:37:49 +0000 Subject: [issue43240] IDLE Classic Unix keyboard shortcuts broken Message-ID: <1613500668.98.0.749942466842.issue43240@roundup.psfhosted.org> New submission from Alan Moore : Using IDLE 3.9.1 on Arch Linux. In IDLE I've selected the "classic unix" key set. It worked for a while, then stopped registering key combinations for more than one key (e.g. Ctrl-x Ctrl-s). Have tried creating a custom key set and manually setting the shortcuts, but it still fails the same way. Caps lock is not on (disabled on my system). Have also tried moving configs and starting fresh, does not help. It had been working, then suddenly stopped in the middle of a work day and I can't get it working again. ---------- assignee: terry.reedy components: IDLE messages: 387124 nosy: Alan Moore, terry.reedy priority: normal severity: normal status: open title: IDLE Classic Unix keyboard shortcuts broken type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 13:47:23 2021 From: report at bugs.python.org (John Rouillard) Date: Tue, 16 Feb 2021 18:47:23 +0000 Subject: [issue39093] tkinter objects garbage collected from non-tkinter thread cause crash In-Reply-To: <1576724216.68.0.395572121912.issue39093@roundup.psfhosted.org> Message-ID: <1613501243.49.0.0348874734257.issue39093@roundup.psfhosted.org> John Rouillard added the comment: Sorry for the spam, but there is no silent post setup for this tracker. On https://github.com/python/psf-infra-meta/issues/74 in July E-paine reports that he can't post to this issue. I just created an account linked to github to see if I am able to post. ---------- nosy: +rouilj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 13:55:34 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 16 Feb 2021 18:55:34 +0000 Subject: [issue43236] Windows IDLE taskbar icon jump list fails to open recent files In-Reply-To: <1613440404.37.0.977304766317.issue43236@roundup.psfhosted.org> Message-ID: <1613501734.57.0.944063996327.issue43236@roundup.psfhosted.org> Ned Deily added the comment: > Ned, do you have any comments, pro or con, about doing so. I don't think there is a conflict here and I don't really have an opinion as I don't use Windows regularly. From a bit of web research, it looks like the closest thing to Windows jump lists on macOS are control-clicking on an app icon (like IDLE.app) in the dock which then may show some recent files used with the app. As you note, IDLE's recent file list is also available, a good cross-platform choice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 14:17:08 2021 From: report at bugs.python.org (Alan Moore) Date: Tue, 16 Feb 2021 19:17:08 +0000 Subject: [issue43240] IDLE Classic Unix keyboard shortcuts broken In-Reply-To: <1613500668.98.0.749942466842.issue43240@roundup.psfhosted.org> Message-ID: <1613503028.54.0.62284235439.issue43240@roundup.psfhosted.org> Alan Moore added the comment: OK, it seems that closing all my firefox windows restored correct behavior to IDLE. I can only guess that somehow firefox was eating the Ctrl-x. Not sure if this is a firefox issue, a window manager issue, or an IDLE issue. If you think it's not the latter, feel free to close. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 15:55:13 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Feb 2021 20:55:13 +0000 Subject: [issue43233] test_os: test_copy_file_range_offset fails on FreeBSD CURRENT In-Reply-To: <1613417170.64.0.402539389952.issue43233@roundup.psfhosted.org> Message-ID: <1613508913.13.0.491375933145.issue43233@roundup.psfhosted.org> STINNER Victor added the comment: AMD64 FreeBSD Shared 3.x is also affected: https://buildbot.python.org/all/#/builders/483/builds/813 FAIL: test_copy_file_range_offset (test.test_os.FileTests) ---------- title: test_copy_file_range_offset fails on AMD64 FreeBSD Shared 3.9 -> test_os: test_copy_file_range_offset fails on FreeBSD CURRENT versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 15:57:07 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Feb 2021 20:57:07 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613509027.44.0.601687695194.issue43179@roundup.psfhosted.org> Change by STINNER Victor : ---------- title: Remove 32-bit s390 Linux support (s390-linux-gnu triplet) -> Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 16:03:33 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 16 Feb 2021 21:03:33 +0000 Subject: [issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API In-Reply-To: <1585915023.07.0.846808236133.issue40170@roundup.psfhosted.org> Message-ID: <1613509413.5.0.643803682663.issue40170@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: For PyExceptionClass_Name: Is it ok to just remove the macro version (like with GH-24548)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 16:12:53 2021 From: report at bugs.python.org (John Paul Adrian Glaubitz) Date: Tue, 16 Feb 2021 21:12:53 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613509973.25.0.570266559129.issue43179@roundup.psfhosted.org> John Paul Adrian Glaubitz added the comment: > Are you sure about that? It seems SLE-12 support s390x not s390. Maybe it's multilib support in a similar manner that I've mentioned about RHEL7? I work at SUSE. I looked at the internal build system. Debian also still build s390 multilib libraries, i.e. on zelenka.debian.org, I can still install "libc6-s390". And I still don't understand why you are so keen at keeping people from building Python 3.10 on a certain architecture. You don't gain anything by removing these few lines of codes. But you risk at making someone unhappy who - for whatever reason - builds a 31/32 bit Python 3.10 on an s390x system. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 16:28:43 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Feb 2021 21:28:43 +0000 Subject: [issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API In-Reply-To: <1585915023.07.0.846808236133.issue40170@roundup.psfhosted.org> Message-ID: <1613510923.1.0.454267321061.issue40170@roundup.psfhosted.org> STINNER Victor added the comment: > For PyExceptionClass_Name: Is it ok to just remove the macro version (like with GH-24548)? Yes, I think so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 16:31:29 2021 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Feb 2021 21:31:29 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613511089.06.0.783595945004.issue43179@roundup.psfhosted.org> STINNER Victor added the comment: > builds a 31/32 bit Python 3.10 on an s390x system. What is the use case or benefit of building Python for 32-bit rather than 64-bit? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 16:33:56 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 16 Feb 2021 21:33:56 +0000 Subject: [issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API In-Reply-To: <1585915023.07.0.846808236133.issue40170@roundup.psfhosted.org> Message-ID: <1613511236.32.0.0704670558257.issue40170@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +23335 pull_request: https://github.com/python/cpython/pull/24553 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 17:33:21 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 16 Feb 2021 22:33:21 +0000 Subject: [issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API In-Reply-To: <1585915023.07.0.846808236133.issue40170@roundup.psfhosted.org> Message-ID: <1613514801.73.0.517509789682.issue40170@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Thanks, Victor. For PySequence_ITEM, I guess adding a private C version (for example _PySequence_Item) and redirecting the macro to the C version would be acceptable. Ditto for PyHeapType_GET_MEMBERS and PyType_SUPPORTS_WEAKREFS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 18:42:30 2021 From: report at bugs.python.org (Zackery Spytz) Date: Tue, 16 Feb 2021 23:42:30 +0000 Subject: [issue43155] PyCMethod_New not defined in python3.lib In-Reply-To: <1612721158.76.0.287250699598.issue43155@roundup.psfhosted.org> Message-ID: <1613518950.36.0.484837813006.issue43155@roundup.psfhosted.org> Change by Zackery Spytz : ---------- pull_requests: +23336 pull_request: https://github.com/python/cpython/pull/24554 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 21:02:47 2021 From: report at bugs.python.org (Eryk Sun) Date: Wed, 17 Feb 2021 02:02:47 +0000 Subject: [issue43219] shutil.copy raises IsADirectoryError when the directory does not actually exist In-Reply-To: <1613279788.4.0.734801709372.issue43219@roundup.psfhosted.org> Message-ID: <1613527367.9.0.888468476772.issue43219@roundup.psfhosted.org> Eryk Sun added the comment: I left this open in case someone wants to modify shutil.copy() and shutil.copy2() to raise a less misleading exception when `dst` names a non-existing directory such as 'not_a_dir/'. Failing with IsADirectoryError (errno EISDIR) is confusing since shutil.copy() and shutil.copy2() do support a destination directory. Note that in Windows this case fails with EINVAL, which is at least less misleading than EISDIR. The EINVAL error is based on WinAPI ERROR_INVALID_NAME (123). CreateFileW() can create a directory if passed particular parameters, in which case a trailing slash is allowed. Otherwise it fails with ERROR_INVALID_NAME (123), unless it's an open-existing disposition, in which case it fails with ERROR_FILE_NOT_FOUND (2). This is specified in [MS-FSA] 2.1.5.1 [1]: Phase 6 -- Location of file (final path component): Search ParentFile.DirectoryList for a Link where Link.Name or Link.ShortName matches FileNameToOpen. If such a link is found: Set File = Link.File. Set Open.File to File. Set Open.Link to Link. Else: If (CreateDisposition == FILE_OPEN || CreateDisposition == FILE_OVERWRITE), the operation MUST be failed with STATUS_OBJECT_NAME_NOT_FOUND. Phase 7 -- Type of stream to open: If PathName contains a trailing backslash: If StreamTypeToOpen is DataStream or CreateOptions.FILE_NON_DIRECTORY_FILE is TRUE, the operation MUST be failed with STATUS_OBJECT_NAME_INVALID. NTAPI STATUS_OBJECT_NAME_NOT_FOUND and STATUS_OBJECT_NAME_INVALID map to WinAPI ERROR_FILE_NOT_FOUND and ERROR_INVALID_NAME. --- [1] https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-fsa/8ada5fbe-db4e-49fd-aef6-20d54b748e40 ---------- components: +Library (Lib) type: -> behavior versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 16 23:18:52 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 17 Feb 2021 04:18:52 +0000 Subject: [issue43240] IDLE Classic Unix keyboard shortcuts broken In-Reply-To: <1613500668.98.0.749942466842.issue43240@roundup.psfhosted.org> Message-ID: <1613535532.97.0.379964527637.issue43240@roundup.psfhosted.org> Terry J. Reedy added the comment: IDLE just tells tcl/tk via tkinter what function to call when particular UI events happen. Recognizing UI events is handled between the OS window manager and tcl/tk. So I am sure this is not an IDLE issue. For another application to affect the Linux-tcl interaction is new to me. Serhiy, have you ever heard of such a thing, or seen it happen? ---------- nosy: +serhiy.storchaka resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 04:55:38 2021 From: report at bugs.python.org (Anders Munch) Date: Wed, 17 Feb 2021 09:55:38 +0000 Subject: [issue43115] locale.getlocale fails if locale is set In-Reply-To: <1612359770.32.0.137300123748.issue43115@roundup.psfhosted.org> Message-ID: <1613555738.14.0.398836728759.issue43115@roundup.psfhosted.org> Anders Munch added the comment: I discovered that this can happen with underscores as well: Python 3.8.7 (tags/v3.8.7:6503f05, Dec 21 2020, 17:59:51) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import locale >>> locale.setlocale(locale.LC_ALL, 'en_DE') 'en_DE' >>> locale.getlocale() Traceback (most recent call last): File "", line 1, in File "C:\flonidan\env\Python38-64\lib\locale.py", line 591, in getlocale return _parse_localename(localename) File "C:\flonidan\env\Python38-64\lib\locale.py", line 499, in _parse_localename raise ValueError('unknown locale: %s' % localename) ValueError: unknown locale: en_DE locale.setlocale does validate input - if you write nonsense in the second argument then you get an exception, "locale.Error: unsupported locale setting". So I'm guessing the en_DE locale is actually being set here, and the problem is solely about getlocale making unfounded assumptions about the format. Same thing happens in 3.10.0a4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 05:15:14 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Feb 2021 10:15:14 +0000 Subject: [issue43103] Add configure --without-static-libpython to not build libpython3.10.a In-Reply-To: <1612279427.78.0.51879378101.issue43103@roundup.psfhosted.org> Message-ID: <1613556914.14.0.139895942417.issue43103@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 801bb0b5035f8eeafe389dc082c02dfafaa07f6a by Victor Stinner in branch 'master': bpo-43103: Add configure --without-static-libpython (GH-24418) https://github.com/python/cpython/commit/801bb0b5035f8eeafe389dc082c02dfafaa07f6a ---------- _______________________________________ Python tracker _______________________________________ From mal at egenix.com Wed Feb 17 05:19:33 2021 From: mal at egenix.com (M.-A. Lemburg) Date: Wed, 17 Feb 2021 11:19:33 +0100 Subject: [issue43115] locale.getlocale fails if locale is set In-Reply-To: <1613555738.14.0.398836728759.issue43115@roundup.psfhosted.org> References: <1613555738.14.0.398836728759.issue43115@roundup.psfhosted.org> Message-ID: <6be9339a-a10d-c4c7-6009-48841d0d191e@egenix.com> On 17.02.2021 10:55, Anders Munch wrote: >>>> import locale >>>> locale.setlocale(locale.LC_ALL, 'en_DE') > 'en_DE' >>>> locale.getlocale() > Traceback (most recent call last): > File "", line 1, in > File "C:\flonidan\env\Python38-64\lib\locale.py", line 591, in getlocale > return _parse_localename(localename) > File "C:\flonidan\env\Python38-64\lib\locale.py", line 499, in _parse_localename > raise ValueError('unknown locale: %s' % localename) > ValueError: unknown locale: en_DE The locale module does not know this encoding, so cannot guess the encoding. Since getlocale() returns the language code and encoding, this fails. If you add the encoding, you should be fine: >>> locale.setlocale(locale.LC_ALL, 'en_DE.UTF-8') 'en_DE.UTF-8' >>> locale.getlocale() ('en_DE', 'UTF-8') -- Marc-Andre Lemburg eGenix.com From report at bugs.python.org Wed Feb 17 05:19:37 2021 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 17 Feb 2021 10:19:37 +0000 Subject: [issue43115] locale.getlocale fails if locale is set In-Reply-To: <1613555738.14.0.398836728759.issue43115@roundup.psfhosted.org> Message-ID: <6be9339a-a10d-c4c7-6009-48841d0d191e@egenix.com> Marc-Andre Lemburg added the comment: On 17.02.2021 10:55, Anders Munch wrote: >>>> import locale >>>> locale.setlocale(locale.LC_ALL, 'en_DE') > 'en_DE' >>>> locale.getlocale() > Traceback (most recent call last): > File "", line 1, in > File "C:\flonidan\env\Python38-64\lib\locale.py", line 591, in getlocale > return _parse_localename(localename) > File "C:\flonidan\env\Python38-64\lib\locale.py", line 499, in _parse_localename > raise ValueError('unknown locale: %s' % localename) > ValueError: unknown locale: en_DE The locale module does not know this encoding, so cannot guess the encoding. Since getlocale() returns the language code and encoding, this fails. If you add the encoding, you should be fine: >>> locale.setlocale(locale.LC_ALL, 'en_DE.UTF-8') 'en_DE.UTF-8' >>> locale.getlocale() ('en_DE', 'UTF-8') ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 05:49:22 2021 From: report at bugs.python.org (Jonathan Slenders) Date: Wed, 17 Feb 2021 10:49:22 +0000 Subject: [issue40897] Inheriting from class that defines __new__ causes inspect.signature to always return (*args, **kwargs) for constructor In-Reply-To: <1591501058.45.0.282415808867.issue40897@roundup.psfhosted.org> Message-ID: <1613558962.78.0.682068263386.issue40897@roundup.psfhosted.org> Jonathan Slenders added the comment: The following patch to inspect.py solves the issue that inspect.signature() returns the wrong signature on classes that inherit from Generic. Not 100% sure though if this implementation is the cleanest way possible. I've been looking into attaching a __wrapped__ to Generic as well, without success. I'm not very familiar with the inspect code. To me, this fix is pretty important. ptpython, a Python REPL, has the ability to show the function signature of what the user is currently typing, and with codebases that have lots of generics, there's nothing really useful we can show. $ diff inspect.old.py inspect.py -p *** inspect.old.py 2021-02-17 11:35:50.787234264 +0100 --- inspect.py 2021-02-17 11:35:10.131407202 +0100 *************** import sys *** 44,49 **** --- 44,50 ---- import tokenize import token import types + import typing import warnings import functools import builtins *************** def _signature_get_user_defined_method(c *** 1715,1720 **** --- 1716,1725 ---- except AttributeError: return else: + if meth in (typing.Generic.__new__, typing.Protocol.__new__): + # Exclude methods from the typing module. + return + if not isinstance(meth, _NonUserDefinedCallables): # Once '__signature__' will be added to 'C'-level # callables, this check won't be necessary *** For those interested, the following monkey-patch has the same effect: def monkey_patch_typing() -> None: import inspect, typing def _signature_get_user_defined_method(cls, method_name): try: meth = getattr(cls, method_name) except AttributeError: return else: if meth in (typing.Generic.__new__, typing.Protocol.__new__): # Exclude methods from the typing module. return if not isinstance(meth, inspect._NonUserDefinedCallables): # Once '__signature__' will be added to 'C'-level # callables, this check won't be necessary return meth inspect._signature_get_user_defined_method = _signature_get_user_defined_method monkey_patch_typing() ---------- nosy: +jonathan.slenders _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 05:51:33 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Feb 2021 10:51:33 +0000 Subject: [issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API In-Reply-To: <1585915023.07.0.846808236133.issue40170@roundup.psfhosted.org> Message-ID: <1613559093.5.0.377168233562.issue40170@roundup.psfhosted.org> STINNER Victor added the comment: New changeset cd80f430daa7dfe7feeb431ed34f88db5f64aa30 by Erlend Egeberg Aasland in branch 'master': bpo-40170: Always define PyExceptionClass_Name() as a function (GH-24553) https://github.com/python/cpython/commit/cd80f430daa7dfe7feeb431ed34f88db5f64aa30 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 05:53:48 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Feb 2021 10:53:48 +0000 Subject: [issue43155] PyCMethod_New not defined in python3.lib In-Reply-To: <1612721158.76.0.287250699598.issue43155@roundup.psfhosted.org> Message-ID: <1613559228.01.0.0453580734903.issue43155@roundup.psfhosted.org> STINNER Victor added the comment: New changeset ebe20d9e7eb138c053958bc0a3058d34c6e1a679 by Zackery Spytz in branch '3.9': bpo-43155: Add PyCMethod_New to PC/python3.def (GH-24500) (GH-24554) https://github.com/python/cpython/commit/ebe20d9e7eb138c053958bc0a3058d34c6e1a679 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 05:55:54 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Feb 2021 10:55:54 +0000 Subject: [issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API In-Reply-To: <1585915023.07.0.846808236133.issue40170@roundup.psfhosted.org> Message-ID: <1613559354.11.0.118979387978.issue40170@roundup.psfhosted.org> STINNER Victor added the comment: > For PySequence_ITEM, I guess adding a private C version (for example _PySequence_Item) and redirecting the macro to the C version would be acceptable. This can introduce a performance slowdown and so should wait until the PEP 620 is accepted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 05:57:38 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Feb 2021 10:57:38 +0000 Subject: [issue43155] PyCMethod_New not defined in python3.lib In-Reply-To: <1612721158.76.0.287250699598.issue43155@roundup.psfhosted.org> Message-ID: <1613559458.95.0.831340865596.issue43155@roundup.psfhosted.org> STINNER Victor added the comment: Thanks Barry for the bug report and thanks Zackery for the fix! It's now fixed. See bpo-43235 and bpo-43239 follow-up issues. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 05:58:14 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Feb 2021 10:58:14 +0000 Subject: [issue43103] Add configure --without-static-libpython to not build libpython3.10.a In-Reply-To: <1612279427.78.0.51879378101.issue43103@roundup.psfhosted.org> Message-ID: <1613559494.48.0.063218221878.issue43103@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 05:59:40 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Feb 2021 10:59:40 +0000 Subject: [issue42307] make install must not copy python.o into $prefix/lib/python3.10/config-3.10-x86_64-linux-gnu/ In-Reply-To: <1605005380.13.0.93741295392.issue42307@roundup.psfhosted.org> Message-ID: <1613559580.43.0.78943956894.issue42307@roundup.psfhosted.org> STINNER Victor added the comment: I consider that this issue is now fixed by bpo-43103 with the addition of a new configure --without-static-libpython option. If someone prefers to remove python.o and get it from libpython.a, please open a separated issue. ---------- resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Add configure --without-static-libpython to not build libpython3.10.a _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 06:27:49 2021 From: report at bugs.python.org (Alexander) Date: Wed, 17 Feb 2021 11:27:49 +0000 Subject: [issue33935] shutil.copyfile throws incorrect SameFileError on Google Drive File Stream In-Reply-To: <1529627906.69.0.56676864532.issue33935@psf.upfronthosting.co.za> Message-ID: <1613561269.02.0.628803931246.issue33935@roundup.psfhosted.org> Alexander added the comment: Hi, This issue was also confirmed by a Verge3D user (Python 3.7.7) https://www.soft8soft.com/topic/export-gltf-error ---------- nosy: +alexkowel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 06:32:42 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 17 Feb 2021 11:32:42 +0000 Subject: [issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API In-Reply-To: <1585915023.07.0.846808236133.issue40170@roundup.psfhosted.org> Message-ID: <1613561562.57.0.45784072972.issue40170@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: > This can introduce a performance slowdown and so should wait until the PEP 620 is accepted. Noted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 06:36:15 2021 From: report at bugs.python.org (Anders Munch) Date: Wed, 17 Feb 2021 11:36:15 +0000 Subject: [issue43115] locale.getlocale fails if locale is set In-Reply-To: <1612359770.32.0.137300123748.issue43115@roundup.psfhosted.org> Message-ID: <1613561775.0.0.643680445021.issue43115@roundup.psfhosted.org> Anders Munch added the comment: getlocale is documented to return None for the encoding if no encoding can be determined. There's no need to guess. I can't change the locale.setlocale call, because where I'm actually having the problem, I'm not even calling locale.setlocale: wxWidgets is calling C setlocale, that's where it comes from. wxWidgets aside, it doesn't seem right that getlocale fails when setlocale succeeded. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 07:12:03 2021 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 17 Feb 2021 12:12:03 +0000 Subject: [issue20087] Mismatch between glibc and X11 locale.alias In-Reply-To: <1388222989.89.0.773650778168.issue20087@psf.upfronthosting.co.za> Message-ID: <1613563923.19.0.559488624328.issue20087@roundup.psfhosted.org> Marc-Andre Lemburg added the comment: I believe we can close this old issue. The discussion was certainly a useful one. I guess we should stop updating the alias table automatically and instead add new aliases or change existing ones based on more research and using the X11 files as well as glibc and other resources to help. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 07:18:38 2021 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 17 Feb 2021 12:18:38 +0000 Subject: [issue43115] locale.getlocale fails if locale is set In-Reply-To: <1613561775.0.0.643680445021.issue43115@roundup.psfhosted.org> Message-ID: Marc-Andre Lemburg added the comment: On 17.02.2021 12:36, Anders Munch wrote: > getlocale is documented to return None for the encoding if no encoding can be determined. There's no need to guess. Well, not quite... the documentation says that None can be returned, not that it will return None in such cases. What happens is that the value returned by the C lib's setlocale() is normalized and parsed. If it doesn't include an encoding, the table locale_alias is used to provide an encoding. If this table does not include the locale, you get the ValueError. We could enhance this to return None for the encoding instead of raising an exception, but would this really help ? Alternatively, we could add "en_DE" to the alias table and set a default encoding to use. I assume this would have to be ISO8859-15. OTOH, Windows supports UTF-8 for all locales in more recent Windows versions, so perhaps we should use UTF-8 instead. BTW: What is wxWidgets doing with the returned values ? Resources: - setlocale() in Visual C++ on Windows: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/setlocale-wsetlocale?view=msvc-160 - locale name formats supported by Windows CRT: https://docs.microsoft.com/en-us/cpp/c-runtime-library/locale-names-languages-and-country-region-strings?view=msvc-160 - Language locale tags known by Windows: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c - UTF8 support in Windows CRT: https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/setlocale-wsetlocale?view=msvc-160#utf-8-support ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 07:37:44 2021 From: report at bugs.python.org (Xuehai Pan) Date: Wed, 17 Feb 2021 12:37:44 +0000 Subject: [issue43241] curses.h: present but cannot be compiled while building with custom CPPFLAGS Message-ID: <1613565464.32.0.197959355963.issue43241@roundup.psfhosted.org> New submission from Xuehai Pan : I install python3 with Linuxbrew. All header files have been symlinked to "~/.linuxbrew/inlcude". It raises warnings when I building with custom CPPFLAGS. ``` checking curses.h usability... no checking curses.h presence... yes configure: WARNING: curses.h: present but cannot be compiled configure: WARNING: curses.h: check for missing prerequisite headers? configure: WARNING: curses.h: see the Autoconf documentation configure: WARNING: curses.h: section "Present But Cannot Be Compiled" configure: WARNING: curses.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for curses.h... no checking ncurses.h usability... no checking ncurses.h presence... yes configure: WARNING: ncurses.h: present but cannot be compiled configure: WARNING: ncurses.h: check for missing prerequisite headers? configure: WARNING: ncurses.h: see the Autoconf documentation configure: WARNING: ncurses.h: section "Present But Cannot Be Compiled" configure: WARNING: ncurses.h: proceeding with the compiler's result configure: WARNING: ## --------------------------------------- ## configure: WARNING: ## Report this to https://bugs.python.org/ ## configure: WARNING: ## --------------------------------------- ## checking for ncurses.h... no checking for term.h... yes ``` See https://github.com/Homebrew/linuxbrew-core/pull/22307 for more details. ---------- components: Build files: Screenshot config master.png messages: 387150 nosy: XuehaiPan priority: normal severity: normal status: open title: curses.h: present but cannot be compiled while building with custom CPPFLAGS type: compile error versions: Python 3.9 Added file: https://bugs.python.org/file49814/Screenshot config master.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 07:49:33 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 17 Feb 2021 12:49:33 +0000 Subject: [issue28179] Segfault in test_recursionlimit_fatalerror In-Reply-To: <1474017738.64.0.366816916836.issue28179@psf.upfronthosting.co.za> Message-ID: <1613566173.97.0.927655338971.issue28179@roundup.psfhosted.org> Irit Katriel added the comment: I'm not seeing this crash on master. I believe is was fixed under issue42500, which add this case as a unit test: see recurse_in_body_and_except in https://github.com/python/cpython/commit/4e7a69bdb63a104587759d7784124492dcdd496e#diff-3dbd58a46964dc5908595a1caa552fa3f5e2e46610679634ffc1064fd7cc3c8fR1106 ---------- nosy: +iritkatriel resolution: -> duplicate status: open -> pending superseder: -> crash with unbounded recursion in except statement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 07:50:35 2021 From: report at bugs.python.org (Xuehai Pan) Date: Wed, 17 Feb 2021 12:50:35 +0000 Subject: [issue43241] curses.h: present but cannot be compiled while building with custom CPPFLAGS In-Reply-To: <1613565464.32.0.197959355963.issue43241@roundup.psfhosted.org> Message-ID: <1613566235.52.0.449108521681.issue43241@roundup.psfhosted.org> Xuehai Pan added the comment: ./configure raised "WARNING: curses.h: present but cannot be compiled" when CPPFLAGS="-I. -I/Include -I${HOMEBREW_PREFIX}/include". ./configure found and compiled with ncurses successfully when CPPFLAGS="-I. -I/Include -I${HOMEBREW_PREFIX}/include -I$(brew --prefix ncurses)/include" It's really weird that all headers in "$(brew --prefix ncurses)/include" are already symlinked to "${HOMEBREW_PREFIX}/include". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 08:15:54 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 17 Feb 2021 13:15:54 +0000 Subject: [issue34013] Inconsistent SyntaxError for print In-Reply-To: <1530380578.04.0.56676864532.issue34013@psf.upfronthosting.co.za> Message-ID: <1613567754.42.0.191056057844.issue34013@roundup.psfhosted.org> Irit Katriel added the comment: Still the same in 3.10: Python 3.10.0a5+ (heads/master:bf2e7e55d7, Feb 11 2021, 23:09:25) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> print 3 File "", line 1 print 3 ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(3)? >>> def f(x): return x ... >>> print f(3) File "", line 1 print f(3) ^ SyntaxError: invalid syntax ---------- nosy: +iritkatriel versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 08:24:12 2021 From: report at bugs.python.org (Xuehai Pan) Date: Wed, 17 Feb 2021 13:24:12 +0000 Subject: [issue43241] curses.h: present but cannot be compiled while building with custom CPPFLAGS In-Reply-To: <1613565464.32.0.197959355963.issue43241@roundup.psfhosted.org> Message-ID: <1613568252.49.0.539519467933.issue43241@roundup.psfhosted.org> Xuehai Pan added the comment: Add screenshot. ---------- Added file: https://bugs.python.org/file49815/Screenshot.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 08:36:51 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Feb 2021 13:36:51 +0000 Subject: [issue34013] Inconsistent SyntaxError for print In-Reply-To: <1530380578.04.0.56676864532.issue34013@psf.upfronthosting.co.za> Message-ID: <1613569011.41.0.639309682042.issue34013@roundup.psfhosted.org> Serhiy Storchaka added the comment: Would it be too much if add a Python 2 rule for print statement in grammar to produce better error message? invalid_print_stmt: | 'print' ( test (',' test)* [','] ] | '>>' test [ (',' test)+ [','] ) { RAISE_INVALID_PRINT_STATEMENT() } ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 08:49:48 2021 From: report at bugs.python.org (John Paul Adrian Glaubitz) Date: Wed, 17 Feb 2021 13:49:48 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613569788.07.0.347304698342.issue43179@roundup.psfhosted.org> John Paul Adrian Glaubitz added the comment: > What is the use case or benefit of building Python for 32-bit rather than 64-bit? That's not really the question. The question is whether an upstream project should prevent downstreams from using unsupported target configurations and I think the answer to that question is no. Python is free software (as opposed to just open source software) and one of the key features of free software is that you don't tell your users how they use your software. Open source licenses that limit use cases of software are considered non-free by most if not all Linux distributions for that very reason. There are valid reasons for preventing your software from being built on certain targets - such as the maintenance burden for architecture-specific code - but none of them apply here. A few lines of autoconf plus some preprocessor macros don't pose any burden and therefore the choice should be in favor of allowing downstreams to build unsupported configurations. As for providing a CI: Setting up a CI machine for individual upstream projects is not a problem for big corporations like IBM or Intel, but it is certainly a hassle for individual open source developers and hobbyists. And while we (Debian Ports) have provided some CI machines for individual upstream projects such as GCC and LLVM, it should be sufficient for most upstream projects to rely on Debian's buildd infrastructure as we simply don't have the resources that big corporations have. As for your original question: We still maintain multiple 32-bit ports in Debian, both as official and unofficial releases, and the same is done in other Linux distributions such as Gentoo, openSUSE, Void and others. Lots of hobbyists are pouring a lot of lifeblood and efforts into these ports such as m68k - which has still a surprisingly large user base thanks to retro-computing fans - which is why I am kindly asking you to not put up any obstacles into our ways. As I said before, the Python interpreter is one of these excellent works of engineering that just work. Other interpreters/compilers such as OpenJDK, Ruby, Go or Rust require much more attention to keep them portable while the Python interpreter has never caused any issues which is something I am very grateful for, in particular given the fact how much other code directly depends on the Python interpreter to work (just think of the many package managers and other system tools written in Python). So I think I can speak for Debian, Gentoo and many other downstream projects that it is important for many that it stays that way. Of course, that shouldn't Python development keep from moving forward and if the dependence on architecture-dependent code should increase at some point, we can still discuss this issue again and we will be more than happy to help with the porting efforts. Thank You! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 09:02:57 2021 From: report at bugs.python.org (Anders Munch) Date: Wed, 17 Feb 2021 14:02:57 +0000 Subject: [issue43115] locale.getlocale fails if locale is set In-Reply-To: <1612359770.32.0.137300123748.issue43115@roundup.psfhosted.org> Message-ID: <1613570577.83.0.979105361569.issue43115@roundup.psfhosted.org> Anders Munch added the comment: > BTW: What is wxWidgets doing with the returned values ? wxWidgets doesn't call getlocale, it's a C++ library (wrapped by wxPython) that uses C setlocale. What does use getlocale is time.strptime and datetime.datetime.strptime, so when getlocale fails, strptime fails. > We could enhance this to return None for the encoding instead > of raising an exception, but would this really help ? Very much so. Frankly, I don't get the impression that the current locale preferred encoding is used for *anything*. Other than possibly having a role in implementing getpreferredencoding. > Alternatively, we could add "en_DE" to the alias table and set > a default encoding to use. Where would you get a complete list of all the new aliases that would need be to be added? As the "en_DE" example shows, you'd need all combinations of languages and regions. That's going to be a very long list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 09:14:57 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 17 Feb 2021 14:14:57 +0000 Subject: [issue34013] Inconsistent SyntaxError for print In-Reply-To: <1530380578.04.0.56676864532.issue34013@psf.upfronthosting.co.za> Message-ID: <1613571297.45.0.119271375843.issue34013@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Would it be too much if add a Python 2 rule for print statement in grammar to produce better error message? Please, go ahead. I think it makes sense and with our latest change in the parser, such new error message will have no impact on performance whatsoever. Please, at me as a reviewer :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 09:57:18 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 17 Feb 2021 14:57:18 +0000 Subject: [issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py In-Reply-To: <1612626856.83.0.902540623753.issue43146@roundup.psfhosted.org> Message-ID: <1613573838.52.0.416590290686.issue43146@roundup.psfhosted.org> Irit Katriel added the comment: Let's split the print_exception(None) case (new issue) from the regression. I've updated the PR to fix only the latter, which is not controversial. I don't know what print_exception(None) should do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 10:33:48 2021 From: report at bugs.python.org (rea haas) Date: Wed, 17 Feb 2021 15:33:48 +0000 Subject: [issue28404] Logging SyslogHandler not appending '\n' to the end In-Reply-To: <1476101662.48.0.994997122347.issue28404@psf.upfronthosting.co.za> Message-ID: <1613576028.77.0.751052958581.issue28404@roundup.psfhosted.org> Change by rea haas : ---------- nosy: +reahaas nosy_count: 2.0 -> 3.0 pull_requests: +23337 pull_request: https://github.com/python/cpython/pull/24556 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 10:37:56 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 17 Feb 2021 15:37:56 +0000 Subject: [issue25737] array is not a Sequence In-Reply-To: <1448537649.86.0.885493348949.issue25737@psf.upfronthosting.co.za> Message-ID: <1613576276.18.0.513795828617.issue25737@roundup.psfhosted.org> Irit Katriel added the comment: This works now: >>> from array import array >>> from collections.abc import Sequence >>> isinstance(array('I', [1]), Sequence) True It was fixed under issue29727. ---------- nosy: +iritkatriel resolution: -> duplicate status: open -> closed superseder: -> collections.abc.Reversible doesn't fully support the reversing protocol _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 10:57:14 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Feb 2021 15:57:14 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613577434.81.0.248334535611.issue43179@roundup.psfhosted.org> Christian Heimes added the comment: > That's not really the question. The question is whether an upstream project should prevent downstreams from using unsupported target configurations and I think the answer to that question is no. We are not (actively) prevent unsupported target. We are merely removing unused code that we cannot test. Downstream is free to re-apply or maintain additional patches to enable platforms that we don't support. The rules for platform support are explained in PEP 11. > Python is free software (as opposed to just open source software) and one of the key features of free software is that you don't tell your users how they use your software. Free software doesn't mean free labor. Upstream is free to choose how we spend our time on the project or which patches we accept. For platform support we have (IMHO) reasonable rules for code: Python must compile, work, and pass a sufficient set of its test suite. While "Python" software is free, the trademark, logo, and rights to the name "Python" are owned by the PSF. The trademark rules are also reasonable. On very few occasions the PSF has asked developers to choose a different name to avoid confusion. For example we asked the developer of a Python 2.8 fork to rename. The fork is now known a Tauthon. Platform compatibility patches are fine. I see three ways to resolve the dispute: 1) You provide and support CI for s390, we keep the platform triplet. I would be even fine with an unstable buildbot or external CI that builds and runs out test suite regularly. 2) We remove the platform, you maintain downstream patches. The patch in GH-24534 is small and trivial. 3) You contact the Python Steering Council and request a decision. The SC is our elect government and makes final decisions. I'm going to hold off and delay PR 24534 for at least two weeks to give you time to work on (1) or (3). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 11:23:42 2021 From: report at bugs.python.org (Xuehai Pan) Date: Wed, 17 Feb 2021 16:23:42 +0000 Subject: [issue43241] curses.h: present but cannot be compiled while building with custom CPPFLAGS In-Reply-To: <1613565464.32.0.197959355963.issue43241@roundup.psfhosted.org> Message-ID: <1613579022.12.0.137350161503.issue43241@roundup.psfhosted.org> Change by Xuehai Pan : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 11:40:01 2021 From: report at bugs.python.org (David Edelsohn) Date: Wed, 17 Feb 2021 16:40:01 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613580001.02.0.416022569015.issue43179@roundup.psfhosted.org> David Edelsohn added the comment: I already am running a Debian s390x buildbot for Python. Someone can adjust the rules for the buildbot to include a 31-bit builder. The Debian buildbot has relatively few builder variants relative to the other s390x targets. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 11:42:33 2021 From: report at bugs.python.org (hai shi) Date: Wed, 17 Feb 2021 16:42:33 +0000 Subject: [issue43239] PyCFunction_New is not exported with PyAPI_FUNC In-Reply-To: <1613491672.14.0.339809223416.issue43239@roundup.psfhosted.org> Message-ID: <1613580153.17.0.624550906345.issue43239@roundup.psfhosted.org> hai shi added the comment: >> PyCFunction_NewEx is part of the limited API as well, even though it's undocumented. People can call it. > >Wait no, I wrote too soon. >PyCFunction_NewEx is part of the limited API as well, even though it's >undocumented. People can call it. Find some 3rd user calling this function in: https://searchcode.com/?q=PyCFunction_NewEx+. So I prefer to keep it too. If calling `PyCFunction_New()` is better than `PyCFunction_NewEx()`, MAYBE we can add some description info in PR 24551. ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 11:44:31 2021 From: report at bugs.python.org (Eryk Sun) Date: Wed, 17 Feb 2021 16:44:31 +0000 Subject: [issue43115] locale.getlocale fails if locale is set In-Reply-To: <1612359770.32.0.137300123748.issue43115@roundup.psfhosted.org> Message-ID: <1613580271.4.0.929321792275.issue43115@roundup.psfhosted.org> Eryk Sun added the comment: > What does use getlocale is time.strptime and datetime.datetime.strptime calendar.LocaleTextCalendar also uses getlocale() and getdefaultlocale(). The result from getdefaultlocale() cannot be set via setlocale() in Windows, which also breaks resetlocale(). >>> locale.getdefaultlocale() ('en_GB', 'cp1252') >>> locale._build_localename(locale.getdefaultlocale()) 'en_GB.cp1252' This is doubly invalid. It's a BCP-47 locale name with an encoding that's not UTF-8. As of Windows 10 v1803, UTF-8 is supported in ucrt locales, and for BCP-47 locale names, only UTF-8 is allowed to be set explicitly. (If not set to UTF-8 explicitly, then ucrt implicitly uses the given locale's legacy ANSI code page.) Even if something other than UTF-8 were allowed, ucrt will not accept a code page with a "cp" prefix. Default LocaleTextCalendar case: >>> c = calendar.LocaleTextCalendar() >>> try: c.formatweekday(1, 10) ... except Exception as e: print(e) ... unsupported locale setting It works as long as setting the locale succeeds and it can restore the original locale. For example, setting "es" (Spanish): >>> c = calendar.LocaleTextCalendar(locale='es') >>> locale.setlocale(locale.LC_TIME, 'C') 'C' >>> c.formatweekday(1, 10) ' martes ' Now try with the current locale as a BCP-47 locale name. >>> locale.setlocale(locale.LC_TIME, 'en') 'en' The parsed getlocale() result is, like with the default locale, doubly invalid. It's a BCP-47 locale name with an encoding that's not UTF-8, and the 'ISO8859-1' codeset is meaningless to ucrt. >>> locale.getlocale(locale.LC_TIME) ('en_US', 'ISO8859-1') So restoring the locale fails: >>> try: c.formatweekday(1, 10) ... except Exception as e: print(e) ... unsupported locale setting and it's still set to "es": >>> locale.setlocale(locale.LC_TIME) 'es' ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 11:54:23 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 17 Feb 2021 16:54:23 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613580863.82.0.801679073673.issue43179@roundup.psfhosted.org> Christian Heimes added the comment: David, this bug is about s390, not s390x. The s390x platform is supported and tested. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 12:14:52 2021 From: report at bugs.python.org (ocket8888) Date: Wed, 17 Feb 2021 17:14:52 +0000 Subject: [issue43242] Add Void type to typing library Message-ID: <1613582092.09.0.127935431113.issue43242@roundup.psfhosted.org> New submission from ocket8888 : It'd be nice to have a "void" type that indicates to static type checkers that a function/method cannot be used in a valid assignment. ---------- components: Library (Lib) messages: 387166 nosy: ocket8888 priority: normal severity: normal status: open title: Add Void type to typing library type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 12:16:25 2021 From: report at bugs.python.org (David Edelsohn) Date: Wed, 17 Feb 2021 17:16:25 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613582185.79.0.380609091071.issue43179@roundup.psfhosted.org> David Edelsohn added the comment: I understand the issue is s390, not s390x. I am offering that there already is an s390x worker, so would it be sufficient to build and test Python in 31 bit mode on that worker as opposed to installing a complete s390 Debian system? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 12:16:53 2021 From: report at bugs.python.org (ocket8888) Date: Wed, 17 Feb 2021 17:16:53 +0000 Subject: [issue43242] Add Void type to typing library In-Reply-To: <1613582092.09.0.127935431113.issue43242@roundup.psfhosted.org> Message-ID: <1613582213.73.0.194889015148.issue43242@roundup.psfhosted.org> Change by ocket8888 : ---------- keywords: +patch pull_requests: +23338 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24557 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 12:24:54 2021 From: report at bugs.python.org (Alan Moore) Date: Wed, 17 Feb 2021 17:24:54 +0000 Subject: [issue43240] IDLE Classic Unix keyboard shortcuts broken In-Reply-To: <1613500668.98.0.749942466842.issue43240@roundup.psfhosted.org> Message-ID: <1613582694.55.0.740340243288.issue43240@roundup.psfhosted.org> Alan Moore added the comment: An interesting note this morning, and again I don't know if this is actually an IDLE bug; I had left IDLE running overnight and opened a new code window this morning. Somehow IDLE "forgot" that Ctrl-N means "next line" and not "new window". I closed all my firefox windows, then went into IDLE settings, changed the key set to something else and back to Classic Unix, now it works correctly again. Firefox has been known to steal my keyboard input from time to time when not focused, though it's usually all-or-nothing. I don't know if it's the culprit or if I'm just blaming it due to past prejudice, but it seems to set things right in IDLE faster if I close all firefox windows. In any case, I don't know if this could be an IDLE bug or not, just thought I'd share. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 12:28:12 2021 From: report at bugs.python.org (Yurii Karabas) Date: Wed, 17 Feb 2021 17:28:12 +0000 Subject: [issue43243] Strict ABC classes Message-ID: <1613582892.97.0.748094590346.issue43243@roundup.psfhosted.org> New submission from Yurii Karabas <1998uriyyo at gmail.com>: Basically, the idea is to add the ability to mark abstract classes as strict. What does this mean - in case when a class inherits from a strict abstract base class and doesn't implement all abstract methods then it will fail to create a class. For instance: >>> class Iterable(ABC, strict=True): ... @abstractmethod ... def __iter__(self): ... pass >>> class MyClass(Iterable): ... pass TypeError: Can't create class MyClass with unimplemented strict abstract method __iter__ That allows creating abc classes and be sure that class defines a required method, it will be perfrormed on a class declaration stage rather than class instance creation. ---------- components: Library (Lib) messages: 387169 nosy: uriyyo priority: normal severity: normal status: open title: Strict ABC classes type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 12:31:09 2021 From: report at bugs.python.org (Yurii Karabas) Date: Wed, 17 Feb 2021 17:31:09 +0000 Subject: [issue43243] Strict ABC classes In-Reply-To: <1613582892.97.0.748094590346.issue43243@roundup.psfhosted.org> Message-ID: <1613583069.06.0.159622043006.issue43243@roundup.psfhosted.org> Change by Yurii Karabas <1998uriyyo at gmail.com>: ---------- keywords: +patch pull_requests: +23339 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24558 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 12:40:29 2021 From: report at bugs.python.org (Alan Moore) Date: Wed, 17 Feb 2021 17:40:29 +0000 Subject: [issue43240] IDLE Classic Unix keyboard shortcuts broken In-Reply-To: <1613500668.98.0.749942466842.issue43240@roundup.psfhosted.org> Message-ID: <1613583629.46.0.813959262296.issue43240@roundup.psfhosted.org> Alan Moore added the comment: Ok, sorry to keep poking at this issue, but I think I was too hasty in blaming firefox. As I previously mentioned, IDLE "forgot" that Ctrl-N meant "next line" and reverted it to "new window". I fixed that behavior by changing and resetting the key set, HOWEVER, now the multiple-key sequences like Ctrl-X-Ctrl-S are broken again. Closing all other programs, rebooting the system, defaulting my IDLE configuration -- none of that makes a difference. Truly I'm baffled. Is there actually code in IDLE/Tkinter to handle those kind of keyboard shortcuts, or is that a Tcl/Tk feature that is merely exposed by the Python side? If the former, could someone point me in the direction of said code? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 12:42:20 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Feb 2021 17:42:20 +0000 Subject: [issue43228] Regression in function builtins In-Reply-To: <1613396595.98.0.792771642012.issue43228@roundup.psfhosted.org> Message-ID: <1613583740.24.0.43193531195.issue43228@roundup.psfhosted.org> STINNER Victor added the comment: In short, cloudpickle recreates a function in two steps: * Create a function object: globals doesn't contain "__builtins__" key * Update the function attributes (especially __globals__) with cloudpickle.cloudpicke_fast._function_setstate() which always sets "__builtins__" in the function __globals__ dictionary. def _function_setstate(obj, state): ... state, slotstate = state ... obj_globals = slotstate.pop("__globals__") ... obj.__globals__.update(obj_globals) obj.__globals__["__builtins__"] = __builtins__ ... The internal PyFunctionObject.func_builtins can only by set when a function is created, it cannot be updated later. Why not exposing it in funcobject.c (func_memberlist) as we do for closure, doc, globals and module? So cloudpickle can hack it for its usage. Documentation of these function attributes: https://docs.python.org/dev/library/inspect.html#types-and-members In Python 3.9, _PyFrame_New_NoTrack() starts by looking at builtins in the parent frame ("back"): use builtins of the parent frame if the parent frame uses exactly the same dictionary of globals. Then it looks for "__builtins__" keys in the globals dictionary. In the current Python 3.10, the builtins are retrieved from the internal PyFunctionObject.func_builtins member. Here is the raw pickle bytecode created by cloudpickle: $ ./python -m pickletools bug.pickle 0: \x80 PROTO 5 2: \x95 FRAME 479 11: \x8c SHORT_BINUNICODE 'cloudpickle.cloudpickle' 36: \x94 MEMOIZE (as 0) 37: \x8c SHORT_BINUNICODE '_builtin_type' 52: \x94 MEMOIZE (as 1) 53: \x93 STACK_GLOBAL 54: \x94 MEMOIZE (as 2) 55: \x8c SHORT_BINUNICODE 'LambdaType' 67: \x94 MEMOIZE (as 3) 68: \x85 TUPLE1 69: \x94 MEMOIZE (as 4) 70: R REDUCE 71: \x94 MEMOIZE (as 5) 72: ( MARK 73: h BINGET 2 75: \x8c SHORT_BINUNICODE 'CodeType' 85: \x94 MEMOIZE (as 6) 86: \x85 TUPLE1 87: \x94 MEMOIZE (as 7) 88: R REDUCE 89: \x94 MEMOIZE (as 8) 90: ( MARK 91: K BININT1 1 93: K BININT1 0 95: K BININT1 0 97: K BININT1 1 99: K BININT1 2 101: K BININT1 67 103: C SHORT_BINBYTES b't\x00|\x00\x83\x01S\x00' 113: \x94 MEMOIZE (as 9) 114: N NONE 115: \x85 TUPLE1 116: \x94 MEMOIZE (as 10) 117: \x8c SHORT_BINUNICODE 'len' 122: \x94 MEMOIZE (as 11) 123: \x85 TUPLE1 124: \x94 MEMOIZE (as 12) 125: \x8c SHORT_BINUNICODE 's' 128: \x94 MEMOIZE (as 13) 129: \x85 TUPLE1 130: \x94 MEMOIZE (as 14) 131: \x8c SHORT_BINUNICODE '/home/vstinner/python/master/cloudpickle_bug.py' 180: \x94 MEMOIZE (as 15) 181: \x8c SHORT_BINUNICODE 'func' 187: \x94 MEMOIZE (as 16) 188: K BININT1 4 190: C SHORT_BINBYTES b'\x00\x01' 194: \x94 MEMOIZE (as 17) 195: ) EMPTY_TUPLE 196: ) EMPTY_TUPLE 197: t TUPLE (MARK at 90) 198: \x94 MEMOIZE (as 18) 199: R REDUCE 200: \x94 MEMOIZE (as 19) 201: } EMPTY_DICT 202: \x94 MEMOIZE (as 20) 203: ( MARK 204: \x8c SHORT_BINUNICODE '__package__' 217: \x94 MEMOIZE (as 21) 218: N NONE 219: \x8c SHORT_BINUNICODE '__name__' 229: \x94 MEMOIZE (as 22) 230: \x8c SHORT_BINUNICODE '__main__' 240: \x94 MEMOIZE (as 23) 241: \x8c SHORT_BINUNICODE '__file__' 251: \x94 MEMOIZE (as 24) 252: h BINGET 15 254: u SETITEMS (MARK at 203) 255: N NONE 256: N NONE 257: N NONE 258: t TUPLE (MARK at 72) 259: \x94 MEMOIZE (as 25) 260: R REDUCE 261: \x94 MEMOIZE (as 26) 262: \x8c SHORT_BINUNICODE 'cloudpickle.cloudpickle_fast' 292: \x94 MEMOIZE (as 27) 293: \x8c SHORT_BINUNICODE '_function_setstate' 313: \x94 MEMOIZE (as 28) 314: \x93 STACK_GLOBAL 315: \x94 MEMOIZE (as 29) 316: h BINGET 26 318: } EMPTY_DICT 319: \x94 MEMOIZE (as 30) 320: } EMPTY_DICT 321: \x94 MEMOIZE (as 31) 322: ( MARK 323: h BINGET 22 325: h BINGET 16 327: \x8c SHORT_BINUNICODE '__qualname__' 341: \x94 MEMOIZE (as 32) 342: h BINGET 16 344: \x8c SHORT_BINUNICODE '__annotations__' 361: \x94 MEMOIZE (as 33) 362: } EMPTY_DICT 363: \x94 MEMOIZE (as 34) 364: \x8c SHORT_BINUNICODE '__kwdefaults__' 380: \x94 MEMOIZE (as 35) 381: N NONE 382: \x8c SHORT_BINUNICODE '__defaults__' 396: \x94 MEMOIZE (as 36) 397: N NONE 398: \x8c SHORT_BINUNICODE '__module__' 410: \x94 MEMOIZE (as 37) 411: h BINGET 23 413: \x8c SHORT_BINUNICODE '__doc__' 422: \x94 MEMOIZE (as 38) 423: N NONE 424: \x8c SHORT_BINUNICODE '__closure__' 437: \x94 MEMOIZE (as 39) 438: N NONE 439: \x8c SHORT_BINUNICODE '_cloudpickle_submodules' 464: \x94 MEMOIZE (as 40) 465: ] EMPTY_LIST 466: \x94 MEMOIZE (as 41) 467: \x8c SHORT_BINUNICODE '__globals__' 480: \x94 MEMOIZE (as 42) 481: } EMPTY_DICT 482: \x94 MEMOIZE (as 43) 483: u SETITEMS (MARK at 322) 484: \x86 TUPLE2 485: \x94 MEMOIZE (as 44) 486: \x86 TUPLE2 487: R REDUCE 488: 0 POP 489: . STOP highest protocol among opcodes = 4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 12:43:16 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 17 Feb 2021 17:43:16 +0000 Subject: [issue43243] Strict ABC classes In-Reply-To: <1613582892.97.0.748094590346.issue43243@roundup.psfhosted.org> Message-ID: <1613583796.3.0.870990375869.issue43243@roundup.psfhosted.org> Raymond Hettinger added the comment: Why is this needed? Already, instantiation is blocked. ---------- nosy: +gvanrossum, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 12:46:14 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Feb 2021 17:46:14 +0000 Subject: [issue43228] Regression in function builtins In-Reply-To: <1613396595.98.0.792771642012.issue43228@roundup.psfhosted.org> Message-ID: <1613583974.86.0.85493733983.issue43228@roundup.psfhosted.org> STINNER Victor added the comment: Attached func_builtins2.py mimicks the cloudpicke bug: --- def func(s): return len(s) code = func.__code__ FuncType = type(func) func2_globals = {} func2 = FuncType(code, func2_globals) # func2.func_builtins = {'None': None} func2.__globals__['__builtins__'] = __builtins__ # frame created with {'None': None} builtins: "len" key is missing func2("abc") --- In Python 3.10, setting func2.__globals__['__builtins__'] has no longer an impact on the frame created to call func2(). ---------- Added file: https://bugs.python.org/file49816/func_builtins2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 12:47:07 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Feb 2021 17:47:07 +0000 Subject: [issue43228] Regression in function builtins In-Reply-To: <1613396595.98.0.792771642012.issue43228@roundup.psfhosted.org> Message-ID: <1613584027.97.0.564421766111.issue43228@roundup.psfhosted.org> STINNER Victor added the comment: I wrote _testinernalcapi.get_builtins() function to help me debuging this issue: diff --git a/Modules/_testinternalcapi.c b/Modules/_testinternalcapi.c index ab6c5965d1..250ecc61ab 100644 --- a/Modules/_testinternalcapi.c +++ b/Modules/_testinternalcapi.c @@ -279,6 +279,14 @@ test_atomic_funcs(PyObject *self, PyObject *Py_UNUSED(args)) } +static PyObject* +get_builtins(PyObject *self, PyObject *obj) +{ + PyFunctionObject *func = (PyFunctionObject *)obj; + return Py_NewRef(func->func_builtins); +} + + static PyMethodDef TestMethods[] = { {"get_configs", get_configs, METH_NOARGS}, {"get_recursion_depth", get_recursion_depth, METH_NOARGS}, @@ -289,6 +297,7 @@ static PyMethodDef TestMethods[] = { {"get_config", test_get_config, METH_NOARGS}, {"set_config", test_set_config, METH_O}, {"test_atomic_funcs", test_atomic_funcs, METH_NOARGS}, + {"get_builtins", get_builtins, METH_O}, {NULL, NULL} /* sentinel */ }; ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 13:01:34 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Feb 2021 18:01:34 +0000 Subject: [issue42990] Improve the C code for calling Python code: _PyEval_EvalCode() In-Reply-To: <1611245152.12.0.0348161555926.issue42990@roundup.psfhosted.org> Message-ID: <1613584894.54.0.969483201319.issue42990@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +23340 pull_request: https://github.com/python/cpython/pull/24559 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 13:05:18 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Feb 2021 18:05:18 +0000 Subject: [issue43228] Regression in function builtins In-Reply-To: <1613396595.98.0.792771642012.issue43228@roundup.psfhosted.org> Message-ID: <1613585118.63.0.440044654665.issue43228@roundup.psfhosted.org> STINNER Victor added the comment: I wrote PR 24559 to expose the functions builtins in Python as a new __builtins__ attributes on functions, but also to document the subtle behavior change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 13:13:39 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Feb 2021 18:13:39 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613585619.36.0.524368305179.issue43179@roundup.psfhosted.org> STINNER Victor added the comment: > I understand the issue is s390, not s390x. I am offering that there already is an s390x worker, so would it be sufficient to build and test Python in 31 bit mode on that worker as opposed to installing a complete s390 Debian system? To get a platform supported by Python, we also need a volunteer to fix issues specific to the 31 bit s390 platform: see PEP 11. The policy for platform support evolved last years. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 13:14:45 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 17 Feb 2021 18:14:45 +0000 Subject: [issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API In-Reply-To: <1585915023.07.0.846808236133.issue40170@roundup.psfhosted.org> Message-ID: <1613585685.17.0.223502154381.issue40170@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +23341 pull_request: https://github.com/python/cpython/pull/24555 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 13:15:46 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Feb 2021 18:15:46 +0000 Subject: [issue40170] [C API] Make PyTypeObject structure an opaque structure in the public C API In-Reply-To: <1585915023.07.0.846808236133.issue40170@roundup.psfhosted.org> Message-ID: <1613585746.72.0.277159642963.issue40170@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 630264a152115f9671d6b793455ef5c2cea09a97 by Erlend Egeberg Aasland in branch 'master': bpo-40170: Move 3 NEWS entries to the C API section (GH-24555) https://github.com/python/cpython/commit/630264a152115f9671d6b793455ef5c2cea09a97 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 13:22:51 2021 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Feb 2021 18:22:51 +0000 Subject: [issue41567] multiprocessing.Pool from concurrent threads failure on 3.9.0rc1 In-Reply-To: <1597664250.53.0.724586569237.issue41567@roundup.psfhosted.org> Message-ID: <1613586171.31.0.0759877833813.issue41567@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- nosy: +aeros _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 13:26:12 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 17 Feb 2021 18:26:12 +0000 Subject: [issue26600] MagickMock __str__ sometimes returns MagickMock instead of str In-Reply-To: <1458547986.83.0.630762686391.issue26600@psf.upfronthosting.co.za> Message-ID: <1613586372.94.0.0683383549754.issue26600@roundup.psfhosted.org> Irit Katriel added the comment: The documentation has examples how to set up a mock's __str__. https://docs.python.org/3/library/unittest.mock.html ---------- nosy: +iritkatriel resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 13:30:57 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Feb 2021 18:30:57 +0000 Subject: [issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details In-Reply-To: <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za> Message-ID: <1613586657.04.0.828934453856.issue35134@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 366dc3a1354078e38808b9c16276e97cca5b8aaf by Nicholas Sim in branch 'master': bpo-35134: Move Include/{pyarena.h,pyctype.h} to Include/cpython/ (GH-24550) https://github.com/python/cpython/commit/366dc3a1354078e38808b9c16276e97cca5b8aaf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 13:31:30 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Feb 2021 18:31:30 +0000 Subject: [issue43244] Move PyArena C API to the internal C API Message-ID: <1613586690.19.0.383646964758.issue43244@roundup.psfhosted.org> New submission from STINNER Victor : Include/cpython/pyarena.h declares 4 functions which are implemented in Python/pyarena.c. The header file exists to access these functions from the compiler. IMO there was no intent to expose these functions to the public Python C API. Moreover, the PEP 384 explicitly excludes this API from the stable ABI (from the limited C API). I propose to move these functions to the internal C API. Since these functions are no even documented, I don't think that a deprecation period is needed. Note: The PR 24550 moved Include/pyarena.h to Include/cpython/pyarena.h. ---------- components: C API messages: 387180 nosy: vstinner priority: normal severity: normal status: open title: Move PyArena C API to the internal C API versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 13:35:04 2021 From: report at bugs.python.org (Yurii Karabas) Date: Wed, 17 Feb 2021 18:35:04 +0000 Subject: [issue43243] Strict ABC classes In-Reply-To: <1613582892.97.0.748094590346.issue43243@roundup.psfhosted.org> Message-ID: <1613586904.85.0.210376566237.issue43243@roundup.psfhosted.org> Yurii Karabas <1998uriyyo at gmail.com> added the comment: When I work with ABC classes usually I faced a problem - I forget to implement one of the methods or make a typo in the method name. In such case I will know about it only when I will try to instantiate a class. In case when a hierarchy is big you should go through classes and find the exact class where the problem is. With this feature, in a case when a class inherits from strict ABC and doesn't implement all abstract methods of strict classes it will fail at class declaration rather than at instance creation as with regular ABC classes. As an option, I can run mypy every time before start the python interpreter. The perfect behavior for me is a case when ABC class will be strict by default, but it will break the existing code. Examples to explain the idea: ``` from abc import ABC, abstractmethod class Base(ABC): @abstraabstractmethod def foo(self): pass class A(Base, ABC): # totally okay, because class directly inherits from ABC pass class B(Base): # will fail, because class doesn't implement foo method pass ``` Raymond, could you please explain why the current behavior is default. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 14:03:11 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 17 Feb 2021 19:03:11 +0000 Subject: [issue43243] Strict ABC classes In-Reply-To: <1613582892.97.0.748094590346.issue43243@roundup.psfhosted.org> Message-ID: <1613588591.54.0.854381818888.issue43243@roundup.psfhosted.org> Guido van Rossum added the comment: This discussion is not appropriate for the bug tracker. Try finding a user forum to discuss the pros and cons and history of the current functionality. It is clear that you have plenty of ways to discover the problem already. ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 14:03:15 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 17 Feb 2021 19:03:15 +0000 Subject: [issue43243] Strict ABC classes In-Reply-To: <1613582892.97.0.748094590346.issue43243@roundup.psfhosted.org> Message-ID: <1613588595.84.0.273864676632.issue43243@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 14:09:25 2021 From: report at bugs.python.org (Yurii Karabas) Date: Wed, 17 Feb 2021 19:09:25 +0000 Subject: [issue43243] Strict ABC classes In-Reply-To: <1613582892.97.0.748094590346.issue43243@roundup.psfhosted.org> Message-ID: <1613588965.98.0.913718662328.issue43243@roundup.psfhosted.org> Yurii Karabas <1998uriyyo at gmail.com> added the comment: Sorry about this, in a future I will use forum for such discussions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 14:37:17 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 17 Feb 2021 19:37:17 +0000 Subject: [issue40897] Inheriting from class that defines __new__ causes inspect.signature to always return (*args, **kwargs) for constructor In-Reply-To: <1591501058.45.0.282415808867.issue40897@roundup.psfhosted.org> Message-ID: <1613590637.77.0.973344262678.issue40897@roundup.psfhosted.org> Guido van Rossum added the comment: I doubt that solution is correct, given that we already established that the problem is *not* specific to Generic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 14:39:09 2021 From: report at bugs.python.org (Irit Katriel) Date: Wed, 17 Feb 2021 19:39:09 +0000 Subject: [issue29187] Pickle failure is raising AttributeError and not PicklingError In-Reply-To: <1483744014.75.0.396569327718.issue29187@psf.upfronthosting.co.za> Message-ID: <1613590749.07.0.662271563777.issue29187@roundup.psfhosted.org> Irit Katriel added the comment: Still the same in 3.10: Python 3.10.0a5+ (heads/bpo-43146-dirty:8f5cf4d381, Feb 17 2021, 14:51:27) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> try: ... def func(): ... class C: pass ... return C ... import pickle ... pickle.dumps(func()()) ... except BaseException as e: ... exc = e ... >>> exc AttributeError("Can't pickle local object 'func..C'") >>> ---------- nosy: +iritkatriel versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 14:48:44 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 17 Feb 2021 19:48:44 +0000 Subject: [issue43245] Add keyword argument support to ChainMap.new_child() Message-ID: <1613591324.63.0.830748384561.issue43245@roundup.psfhosted.org> New submission from Raymond Hettinger : This would it more convenient to extend chains for local contexts. Currently, we write: local = parent.new_child(dict(foreground='white', background='cyan')) Instead, it would be easier to write: local = parent.new_child(foreground='white', background='cyan') The new code would look like this: def new_child(self, m=None, **kwargs): '''New ChainMap with a new map followed by all previous maps. If no map is provided, an empty dict is used. Keyword arguments update the map or new empty dict: ''' if m is None: m = kwargs elif kwargs: m.update(kwargs) return self.__class__(m, *self.maps) ---------- assignee: rhettinger components: Library (Lib) messages: 387186 nosy: rhettinger priority: normal severity: normal status: open title: Add keyword argument support to ChainMap.new_child() type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 14:58:16 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 17 Feb 2021 19:58:16 +0000 Subject: [issue42990] Improve the C code for calling Python code: _PyEval_EvalCode() In-Reply-To: <1611245152.12.0.0348161555926.issue42990@roundup.psfhosted.org> Message-ID: <1613591896.26.0.513882762178.issue42990@roundup.psfhosted.org> Guido van Rossum added the comment: +1 on exposing f,__builtins__. Of course, the thing I'd really want is a way to state that all references to builtins are meant to have the exact semantics of those builtins, so the compiler can translate e.g. len(x) into a new opcode that just calls PyObject_Size(). (I can dream, can't I?) Another dream: assume that globals that refer to modules, classes or functions don't change, so they can be cached more aggressively. I suppose enough checking of dict version tags can get us there, or at least close enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 15:15:42 2021 From: report at bugs.python.org (Alan Moore) Date: Wed, 17 Feb 2021 20:15:42 +0000 Subject: [issue43240] IDLE Classic Unix keyboard shortcuts broken In-Reply-To: <1613500668.98.0.749942466842.issue43240@roundup.psfhosted.org> Message-ID: <1613592942.55.0.469804128535.issue43240@roundup.psfhosted.org> Alan Moore added the comment: Spent some time today with IDLE and PDB, and I've ruled out any other program on my system as the culprit: - I can create a tkinter GUI that will respond to a binding like and it works fine. - In pdb, I can bind <> to a callback and it is getting fired when Ctrl-x is pressed. Thus, I was wrong to think anything else is "eating" the ctrl-x. - Also in pdb, an .event_info('<>') call on the editor's Text widget returns ('',), so it looks bound correctly? If I generate a <> event, the dialog pops up as it should. Nevertheless, Ctrl-x Ctrl-s opens the find dialog, and no other Ctrl-x (other keystroke) binding works. I'm stumped. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 16:16:40 2021 From: report at bugs.python.org (Aaron Meurer) Date: Wed, 17 Feb 2021 21:16:40 +0000 Subject: [issue39820] Bracketed paste mode for REPL: don't execute pasted command before ENTER is pressed explicitly In-Reply-To: <1583105435.88.0.337448475427.issue39820@roundup.psfhosted.org> Message-ID: <1613596600.14.0.359318562204.issue39820@roundup.psfhosted.org> Aaron Meurer added the comment: To reiterate some points I made in the closed issues https://bugs.python.org/issue42819 and https://bugs.python.org/issue32019. A simple "fix" would be to emulate the non-bracketed paste buffering. That is, accept the input using bracketed paste, but split it line by line and send that to the REPL. That would achieve some of the benefits of bracketed paste (faster pasting), without having to change how the REPL works. For actually allowing multiline input in the REPL, one issue I see is that the so-called "single" compile mode is fundamentally designed around single line evaluation. To support proper multiline evaluation, it would need to break from this model (which in my opinion is over engineered). In one of my personal projects, I use a function along the lines of import ast def eval_exec(code, g=None, l=None, *, filename="", noresult=None): if g is None: g = globals() if l is None: l = g p = ast.parse(code) expr = None res = noresult if p.body and isinstance(p.body[-1], ast.Expr): expr = p.body.pop() code = compile(p, filename, 'exec') exec(code, g, l) if expr: code = compile(ast.Expression(expr.value), filename, 'eval') res = eval(code, g, l) return res This function automatically execs the code, but if the last part of it is an expression, it returns it (note that this is much more useful than simply printing it). Otherwise it returns a noresult marker (None by default). I think this sort of functionality in general would be useful in the standard library (much more useful than compile('single')), but even ignoring whether it should be a public function, this is the sort of thing that is needed for "proper" multiline execution in a REPL. Terry mentioned that idle supports multiline already. But I tried pasting a = 1 a into idle (Python 3.9), and I get the same "SyntaxError: multiple statements found while compiling a single statement" error, suggesting it still has the same fundamental limitation. Also, if it wasn't clear, I should note that this is independent of pasting. You can already write def func(): return 1 func() manually in the interpreter or IDLE and it will give a syntax error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 17:00:40 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Feb 2021 22:00:40 +0000 Subject: [issue42990] Improve the C code for calling Python code: _PyEval_EvalCode() In-Reply-To: <1611245152.12.0.0348161555926.issue42990@roundup.psfhosted.org> Message-ID: <1613599240.55.0.549763490584.issue42990@roundup.psfhosted.org> STINNER Victor added the comment: > +1 on exposing f,__builtins__. This change is related to bpo-43228 "Regression in function builtins": cloudpickle is broken by this issue (new PyFunctionObject.func_builtins member). > Of course, the thing I'd really want is a way to state that all references to builtins are meant to have the exact semantics of those builtins, so the compiler can translate e.g. len(x) into a new opcode that just calls PyObject_Size(). (I can dream, can't I?) I tried to implement such optimization in my old https://faster-cpython.readthedocs.io/fat_python.html project. I implemented guards to de-optimize the code if a builtin is overriden. > I suppose enough checking of dict version tags can get us there, or at least close enough. The dict version comes from my FAT Python project: PEP 509. It is used to optimize method calls. See also PEP 510 and PEP 511 ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 17:01:34 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Feb 2021 22:01:34 +0000 Subject: [issue39820] Bracketed paste mode for REPL: don't execute pasted command before ENTER is pressed explicitly In-Reply-To: <1583105435.88.0.337448475427.issue39820@roundup.psfhosted.org> Message-ID: <1613599294.72.0.62442764684.issue39820@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 17:12:32 2021 From: report at bugs.python.org (Joshua Bronson) Date: Wed, 17 Feb 2021 22:12:32 +0000 Subject: [issue43246] Dict copy optimization violates subclass invariant Message-ID: <1613599952.95.0.0689652491879.issue43246@roundup.psfhosted.org> New submission from Joshua Bronson : If I understand correctly, it should be an invariant that in the code below, for all "Parent" classes, for all "method"s, Child1.method should return the same result as Child2.method: ``` class Parent: def __init__(self, value): self._value = value def method(self): return self._value class Child1(Parent): pass c1 = Child1(42) result = c1.method() assert result == 42, result class Child2(Parent): def method(self): return super().method() c2 = Child2(42) result = c2.method() assert result == 42, result ``` But when "Parent" is "dict" and method is "__iter__", that is not the case: ``` SHOW_BUG = True class ChildDict1(dict): """Simplification of werkzeug.datastructures.MultiDict.""" def __init__(self): pass if not SHOW_BUG: def __iter__(self): return super().__iter__() def add(self, key, value): self.setdefault(key, []).append(value) def __setitem__(self, key, value): """Like add, but removes any existing key first.""" super().__setitem__(key, [value]) def getall(self, key) -> list: return super().__getitem__(key) def __getitem__(self, key): """Return the first value for this key.""" return self.getall(key)[0] def items(self, multi=False): for (key, values) in super().items(): if multi: yield from ((key, value) for value in values) else: yield key, values[0] def values(self): return (values[0] for values in super().values()) # Remaining overridden implementations of methods # inherited from dict are elided for brevity. cd1 = ChildDict1() assert dict(cd1) == {} cd1[1] = "one" cd1.add(1, "uno") assert cd1.getall(1) == ["one", "uno"] assert list(cd1.items()) == [(1, "one")] assert list(cd1.values()) == [ "one"] assert dict(cd1) == {1: "one"}, cd1 # XXX ``` If you run the above as-is, the line marked "XXX" will trigger an AssertionError demonstrating the unexpected behavior. If you change SHOW_BUG to False, it won?t. Is it intended that toggling the value of SHOW_BUG in this code causes different results? You can visit https://repl.it/@jab/dict-subclass-copy-surprise to run the examples above directly in your browser. ---------- messages: 387191 nosy: jab priority: normal severity: normal status: open title: Dict copy optimization violates subclass invariant type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 17:14:29 2021 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 17 Feb 2021 22:14:29 +0000 Subject: [issue42990] Improve the C code for calling Python code: _PyEval_EvalCode() In-Reply-To: <1613599240.55.0.549763490584.issue42990@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: Well maybe I'll be picking up those ideas again... Thanks for documenting so much of what you did then! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 17:26:33 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Feb 2021 22:26:33 +0000 Subject: [issue43223] [SECURITY] Open Redirection In Python 3.7 & 3.8 In-Reply-To: <1613302956.91.0.878390782912.issue43223@roundup.psfhosted.org> Message-ID: <1613600793.1.0.691205415807.issue43223@roundup.psfhosted.org> STINNER Victor added the comment: I can only reproduce the issue if the current directory (directory used by the HTTP server, see --directory command line option) contains a .ssh/ subdirectory. The problem is that the HTTP Header Location starts with "//domain/" and such URL is interpreted as an absolute URL of a new domain name ("domain"), rather than a relative path of the same domain ("localhost"). Maybe we should simply strip all additional leading slashes to only keep one. Replace "//path" or "/////path" with "/path" for example. --- By the way, http.server uses urllib.parse.urlsplit() on the request URL without passing its own domain, and urllib.parse.urlsplit() interprets "//attacker.com/path" as if attacker.com is a host with no scheme: >>> urllib.parse.urlsplit('//attacker.com/path') SplitResult(scheme='', netloc='attacker.com', path='/path', query='', fragment='') Maybe parse_qs() should be used instead? Or we should reinject the server domain and port number? I am not sure that it's an issue in practice. SimpleHTTPRequestHandler.translate_path('//attacker.com/..%2f..%2f..%2f..%2f..%2f../.ssh') returns os.path.join(self.directory, ".ssh"). I don't think that it's an issue, it sounds like the expected behavior. We don't attempt to reject ".." in URL. --- To reproduce the issue, I used two terminals. Terminal 1: $ python3.8 -V Python 3.8.7 $ python3.8 -m http.server Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ... 127.0.0.1 - - [15/Feb/2021 09:18:20] "GET //attacker.com/..%2f..%2f..%2f..%2f..%2f../.ssh HTTP/1.1" 301 - Terminal 2: $ wget 'http://127.0.0.1:8000//attacker.com/..%2f..%2f..%2f..%2f..%2f../.ssh' (...) HTTP request sent, awaiting response... 301 Moved Permanently Location: //attacker.com/..%2f..%2f..%2f..%2f..%2f../.ssh/ [following] --2021-02-15 09:18:20-- http://attacker.com/..%2f..%2f..%2f..%2f..%2f../.ssh/ Resolving attacker.com (attacker.com)... 45.88.202.115 Connecting to attacker.com (attacker.com)|45.88.202.115|:80... connected. (...) wget is redirected and connects to attacker.com. The HTTP redirection comes from Lib/http/server.py: def send_head(self): path = self.translate_path(self.path) f = None if os.path.isdir(path): parts = urllib.parse.urlsplit(self.path) if not parts.path.endswith('/'): # redirect browser - doing basically what apache does self.send_response(HTTPStatus.MOVED_PERMANENTLY) new_parts = (parts[0], parts[1], parts[2] + '/', parts[3], parts[4]) new_url = urllib.parse.urlunsplit(new_parts) self.send_header("Location", new_url) self.end_headers() return None ... ... The problem is that the "Location" header starts with "//". ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 17:27:18 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Feb 2021 22:27:18 +0000 Subject: [issue43223] [security] http.server: Open Redirection if the URL path starts with // In-Reply-To: <1613302956.91.0.878390782912.issue43223@roundup.psfhosted.org> Message-ID: <1613600838.36.0.519615651311.issue43223@roundup.psfhosted.org> Change by STINNER Victor : ---------- components: +Library (Lib) -Windows title: [SECURITY] Open Redirection In Python 3.7 & 3.8 -> [security] http.server: Open Redirection if the URL path starts with // versions: +Python 3.10, Python 3.6, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 17:34:33 2021 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Feb 2021 22:34:33 +0000 Subject: [issue42938] [security][CVE-2021-3177] ctypes double representation BoF In-Reply-To: <1610784207.02.0.722384660803.issue42938@roundup.psfhosted.org> Message-ID: <1613601273.04.0.407730061502.issue42938@roundup.psfhosted.org> STINNER Victor added the comment: CVE-2021-3177 has been assigned to this issue: * https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-3177 * https://access.redhat.com/security/cve/cve-2021-3177 ---------- title: [security] ctypes double representation BoF -> [security][CVE-2021-3177] ctypes double representation BoF _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 18:12:41 2021 From: report at bugs.python.org (Steve Dower) Date: Wed, 17 Feb 2021 23:12:41 +0000 Subject: [issue43115] locale.getlocale fails if locale is set In-Reply-To: <1612359770.32.0.137300123748.issue43115@roundup.psfhosted.org> Message-ID: <1613603561.85.0.292778065272.issue43115@roundup.psfhosted.org> Steve Dower added the comment: Is this the same as the other issue where get_locale is normalising the result according to some particular glibc logic and isn't at all portable? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 18:48:55 2021 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 17 Feb 2021 23:48:55 +0000 Subject: [issue42990] Improve the C code for calling Python code: _PyEval_EvalCode() In-Reply-To: <1611245152.12.0.0348161555926.issue42990@roundup.psfhosted.org> Message-ID: <1613605735.68.0.0408957152149.issue42990@roundup.psfhosted.org> Yury Selivanov added the comment: > I tried to implement such optimization in my old https://faster-cpython.readthedocs.io/fat_python.html project. I implemented guards to de-optimize the code if a builtin is overriden. FWIW the globals opcode cache handles all of this now. There's no point in specifically optimizing the builtins lookup since we optimize all global lookups for a code object that's hot enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 19:24:11 2021 From: report at bugs.python.org (Brett Cannon) Date: Thu, 18 Feb 2021 00:24:11 +0000 Subject: [issue42129] Support resources in namespace packages In-Reply-To: <1603469006.87.0.128715336786.issue42129@roundup.psfhosted.org> Message-ID: <1613607851.81.0.328070993354.issue42129@roundup.psfhosted.org> Brett Cannon added the comment: I would harmonize towards what the concrete implementations are doing since people who don't implement the defaults will get the appropriate results regardless. An entry in What's New will cover any potential notification of the change since you can't exactly deprecate this sort of thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 20:43:42 2021 From: report at bugs.python.org (Josh Rosenberg) Date: Thu, 18 Feb 2021 01:43:42 +0000 Subject: [issue43246] Dict copy optimization violates subclass invariant In-Reply-To: <1613599952.95.0.0689652491879.issue43246@roundup.psfhosted.org> Message-ID: <1613612622.04.0.302431597677.issue43246@roundup.psfhosted.org> Josh Rosenberg added the comment: The cause is in dict_merge (see here: https://github.com/python/cpython/blob/master/Objects/dictobject.c ); it has a fast path for when the object being merged in (which is what the dict constructor does; it makes an empty dict, then merges the provided dict-like) is: 1. A dict (or subclass thereof) 2. Which has not overridden __iter__ When that's the case, it assumes it's "dict-compatible" and performs the merge with heavy use of dict-internals. When it's not the case (as in your simple wrapper), it calls .keys() on the object, iterates that, and uses it to pull values via bracket lookup-equivalent code. I assume the choice of testing __iter__ (really, the C slot for tp_iter, which is equivalent) is for performance; it's more expensive to check if keys was overridden and/or if the __getitem__ implementation (of which there is more than one possibility for slots at the C layer) has been overridden. What the code is doing is probably logically wrong, but it's significantly faster than doing it the right way, and easy to work around (if you're writing your own dictionary-like thing with wildly different semantics, collections.abc.MutableMapping is probably a better base class to avoid inheriting dict-specific weirdness), so it's probably not worth fixing. Leaving open for others to discuss. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 21:28:54 2021 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 18 Feb 2021 02:28:54 +0000 Subject: [issue42990] Improve the C code for calling Python code: _PyEval_EvalCode() In-Reply-To: <1611245152.12.0.0348161555926.issue42990@roundup.psfhosted.org> Message-ID: <1613615334.26.0.58917378675.issue42990@roundup.psfhosted.org> Guido van Rossum added the comment: > FWIW the globals opcode cache handles all of this now. There's no point in specifically optimizing the builtins lookup since we optimize all global lookups for a code object that's hot enough. So you think that even a dedicated "LEN" opcode would not be any faster? (This is getting in Paul Sokolovsky territory -- IIRC he has a variant of Python that doesn't allow overriding builtins.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 17 22:16:48 2021 From: report at bugs.python.org (Aviral Srivastava) Date: Thu, 18 Feb 2021 03:16:48 +0000 Subject: [issue43247] How to search for a __main__ module using pyclbr in Python3? Message-ID: <1613618208.75.0.875306011279.issue43247@roundup.psfhosted.org> New submission from Aviral Srivastava : I want to get all the functions and classes in module: `__main__` of the source code directory: `/tmp/rebound/rebound`. When I use the `pyclbr.readmodule_ex` API: ``` source_code_data = pyclbr.readmodule_ex(source_code_module, path=source_code_path) ``` I specify it the module and it's path: ``` DEBUG:root:Source code module: __main__, Source code path: ['/tmp/rebound/rebound/rebound'] ``` I then get this error: ``` File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/importlib/util.py", line 69, in _find_spec_from_path raise ValueError('{}.__spec__ is None'.format(name)) ValueError: __main__.__spec__ is None ``` I then tried to use the function that is not supposed to be used by the public: `_readmodule`: ``` source_code_data = pyclbr._readmodule(source_code_module, source_code_path, ) ``` But I could not decide what should be the value of the parameter: `inpackage`. Upon tracing the code via debugger, I spotted a mistake: ``` def _find_spec_from_path(name, path=None): """Return the spec for the specified module. First, sys.modules is checked to see if the module was already imported. If so, then sys.modules[name].__spec__ is returned. If that happens to be set to None, then ValueError is raised. If the module is not in sys.modules, then sys.meta_path is searched for a suitable spec with the value of 'path' given to the finders. None is returned if no spec could be found. Dotted names do not have their parent packages implicitly imported. You will most likely need to explicitly import all parent packages in the proper order for a submodule to get the correct spec. """ if name not in sys.modules: return _find_spec(name, path) else: module = sys.modules[name] if module is None: return None try: spec = module.__spec__ except AttributeError: raise ValueError('{}.__spec__ is not set'.format(name)) from None else: if spec is None: raise ValueError('{}.__spec__ is None'.format(name)) return spec ``` This is the function in the module: `python3.8/importlib/util.py` and it evaluates `__main__` as a built-in module as it falls in the `else` block. How do I differentiate `__main__` of my target source code to read from the built-in `__main__`? In other words, how do I read the module `__main__` of the codebase: rebound? ---------- components: Library (Lib) messages: 387200 nosy: kebab-mai-haddi priority: normal severity: normal status: open title: How to search for a __main__ module using pyclbr in Python3? type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 00:48:08 2021 From: report at bugs.python.org (Berker Peksag) Date: Thu, 18 Feb 2021 05:48:08 +0000 Subject: [issue28179] Segfault in test_recursionlimit_fatalerror In-Reply-To: <1474017738.64.0.366816916836.issue28179@psf.upfronthosting.co.za> Message-ID: <1613627288.0.0.0519792111066.issue28179@roundup.psfhosted.org> Berker Peksag added the comment: Yes, this indeed seems to be fixed by issue 42500 and can be closed now. Nice detective work, thank you! ---------- stage: needs patch -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 01:05:24 2021 From: report at bugs.python.org (Inada Naoki) Date: Thu, 18 Feb 2021 06:05:24 +0000 Subject: [issue43246] Dict copy optimization violates subclass invariant In-Reply-To: <1613599952.95.0.0689652491879.issue43246@roundup.psfhosted.org> Message-ID: <1613628324.96.0.299427029355.issue43246@roundup.psfhosted.org> Change by Inada Naoki : ---------- nosy: +methane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 02:54:25 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 18 Feb 2021 07:54:25 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613634865.15.0.710055508356.issue43179@roundup.psfhosted.org> Christian Heimes added the comment: David, could you please provide the output of "gcc -dM -E - < /dev/null" on s390x in 31 bit mode? I'm curious and would like to see the platform constants. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 03:08:24 2021 From: report at bugs.python.org (John Paul Adrian Glaubitz) Date: Thu, 18 Feb 2021 08:08:24 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613635704.67.0.387400814075.issue43179@roundup.psfhosted.org> John Paul Adrian Glaubitz added the comment: > To get a platform supported by Python, we also need a volunteer to fix issues specific to the 31 bit s390 platform: see PEP 11. You do not need to support every platform. Just allow your users to use them. If something breaks downstream on a certain platform, distribution maintainers are usually happy to send patches to fix these issues. I think I can speak for myself here and many of my colleagues at SUSE, my fellow Debian Developers and the guys over at Gentoo who have also lots of talented folk who keep sending fixes for many upstream projects. My colleague Andreas, for example, has contributed multiple fixes in cpython on m68k: > https://github.com/python/cpython/search?q=Andreas+Schwab&type=commits ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 03:26:47 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Feb 2021 08:26:47 +0000 Subject: [issue43238] python picking garbage values randomly incase running palindrome function In-Reply-To: <1613459092.79.0.276117009371.issue43238@roundup.psfhosted.org> Message-ID: <1613636807.19.0.0207697234011.issue43238@roundup.psfhosted.org> Change by Mark Dickinson : ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 03:58:05 2021 From: report at bugs.python.org (Phil) Date: Thu, 18 Feb 2021 08:58:05 +0000 Subject: [issue43246] Dict copy optimization violates subclass invariant In-Reply-To: <1613599952.95.0.0689652491879.issue43246@roundup.psfhosted.org> Message-ID: <1613638685.02.0.753584781459.issue43246@roundup.psfhosted.org> Change by Phil : ---------- nosy: +pgjones _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 04:34:57 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 18 Feb 2021 09:34:57 +0000 Subject: [issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash In-Reply-To: <1340142734.59.0.259692259195.issue15108@psf.upfronthosting.co.za> Message-ID: <1613640897.1.0.49631466746.issue15108@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Should we still fix sqlite3, or wait for an agreement on GH-24510? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 04:36:06 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 18 Feb 2021 09:36:06 +0000 Subject: [issue43115] locale.getlocale fails if locale is set In-Reply-To: <1612359770.32.0.137300123748.issue43115@roundup.psfhosted.org> Message-ID: <1613640966.73.0.226496859182.issue43115@roundup.psfhosted.org> Eryk Sun added the comment: > Is this the same as the other issue where get_locale is normalising > the result according to some particular glibc logic and isn't at > all portable? If I understand Anders' immediate problem correctly, I think it can be addressed by using setlocale() to save and restore the current locale in the calendar and _strptime modules. This requires no changes to the locale module, let alone the complete rewrite that's required to make getlocale(), normalize(), _parse_localename(), and _build_localename() work reliably in Windows. It's not just a Windows problem. For example, getlocale() doesn't return the POSIX locale modifier in a 3-tuple (language, encoding, modifier). So it can't be used to restore a locale for which the modifier is mandatory. The following example in Linux uses Serbian, a language that's customarily written with both the Cyrillic and Latin alphabets (i.e. BCP 47 / RFC 5646 language tags "sr-Cyrl-RS" and "sr-Latn-RS"). The Latin-based Unix locale name uses a "latin" modifier. Say the process is currently using the Latin-based locale, but I need the name of a weekday in Cyrillic: >>> locale.setlocale(locale.LC_TIME, 'sr_RS.UTF-8 at latin') 'sr_RS.UTF-8 at latin' >>> c = calendar.LocaleTextCalendar(locale='sr_RS.UTF-8') >>> c.formatweekday(1, 10) ' ?????? ' LocaleTextCalendar() temporarily sets LC_TIME to the given locale and then restores the previous locale. But this is based on the getlocale() result, which omits the "latin" modifier. So now my current LC_TIME locale has changed to Cyrillic: >>> locale.setlocale(locale.LC_TIME) 'sr_RS.UTF-8' A related problem with modifiers affects getdefaultlocale(). For example, in Linux: $ LC_ALL=sr_RS.UTF-8 at latin python -q >>> import locale, calendar In this case, the LC_ALL environment variable specifies the Latin-based locale, but getdefaultlocale() omits this important detail: >>> locale.getdefaultlocale() ('sr_RS', 'UTF-8') Based on the default locale set in the LC_ALL environment variable, the following is supposed to return the Latin name "utorak", not the Cyrillic name "??????": >>> c = calendar.LocaleTextCalendar() >>> c.formatweekday(1, 10) ' ?????? ' If I make it call setlocale(LC_TIME, '') instead of getdefaultlocale(), I get the right result: >>> c = calendar.LocaleTextCalendar(locale='') >>> c.formatweekday(1, 10) ' utorak ' Thus an empty string should be the default locale value in LocaleTextCalendar(), instead of getdefaultlocale(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 04:37:14 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Feb 2021 09:37:14 +0000 Subject: [issue43246] Dict copy optimization violates subclass invariant In-Reply-To: <1613599952.95.0.0689652491879.issue43246@roundup.psfhosted.org> Message-ID: <1613641034.03.0.728477659149.issue43246@roundup.psfhosted.org> Serhiy Storchaka added the comment: The choice of testing __iter__ was because OrderedDict overrides __iter__, and since dicts are ordered now, the order of insertion does matter. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 04:54:45 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Feb 2021 09:54:45 +0000 Subject: [issue43237] datetime.__eq__ returns true when timezones don't match In-Reply-To: <1613451152.5.0.28969611579.issue43237@roundup.psfhosted.org> Message-ID: <1613642085.71.0.966748355492.issue43237@roundup.psfhosted.org> Mark Dickinson added the comment: I'm going to close here. While changing the behaviour isn't completely out of the question, it would need (a) a clear proposal on how to deal with order comparisons and backwards compatibility, and (b) strong support from the community. A PEP is probably the best way forward, for anyone who wants to go this route. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 04:55:52 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Feb 2021 09:55:52 +0000 Subject: [issue41100] Support macOS 11 and Apple Silicon Macs In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1613642152.39.0.463941367127.issue41100@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: -mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 05:08:15 2021 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 18 Feb 2021 10:08:15 +0000 Subject: [issue43115] locale.getlocale fails if locale is set In-Reply-To: <1613640966.73.0.226496859182.issue43115@roundup.psfhosted.org> Message-ID: <958fc1ce-c828-4a9b-1146-f533e3e00989@egenix.com> Marc-Andre Lemburg added the comment: On 18.02.2021 10:36, Eryk Sun wrote: > It's not just a Windows problem. For example, getlocale() doesn't return the POSIX locale modifier in a 3-tuple (language, encoding, modifier). So it can't be used to restore a locale for which the modifier is mandatory. The APIs were written at a time where locale modifiers simply did not exist. Support could be added via a special locale tuple return object, which looks like 2-tuple, but comes with extra attributes to store the modifier, in order to maintain backwards compatibility -- as is done in several other places as well (e.g. the codec registry). This would indeed require a larger rewrite of the logic. To Steve's question: The locale aliasing logic is based on the X11 locale aliasing system. It was later extended to also add glibc aliases. This is portable across many Unix based systems, but support for Windows is only partial, due to the completely different approach Windows' CRT took to locales. Even on most Unix systems, the locale information did not include encoding information, which we needed to help applications with Unicode I/O encoding support, so this had to be enriched and because X11 was the defacto standard on Unix at the time, its locale aliasing table was used for this. At the time Fredrik Lundh added some Windows support via locale codes. ---------- _______________________________________ Python tracker _______________________________________ From mal at egenix.com Thu Feb 18 05:16:40 2021 From: mal at egenix.com (M.-A. Lemburg) Date: Thu, 18 Feb 2021 11:16:40 +0100 Subject: [issue43115] locale.getlocale fails if locale is set In-Reply-To: <1613570577.83.0.979105361569.issue43115@roundup.psfhosted.org> References: <1613570577.83.0.979105361569.issue43115@roundup.psfhosted.org> Message-ID: On 17.02.2021 15:02, Anders Munch wrote: >> BTW: What is wxWidgets doing with the returned values ? > > wxWidgets doesn't call getlocale, it's a C++ library (wrapped by wxPython) that uses C setlocale. > > What does use getlocale is time.strptime and datetime.datetime.strptime, so when getlocale fails, strptime fails. Would they work with getlocale() returning None for the encoding ? >> We could enhance this to return None for the encoding instead >> of raising an exception, but would this really help ? > > Very much so. > > Frankly, I don't get the impression that the current locale preferred encoding is used for *anything*. Other than possibly having a role in implementing getpreferredencoding. The logic for getdefaultencoding() predates getpreferredencoding(). I had added it because calling setlocale() just to figure out the default encoding and then resetting it to the original setting is dangerous in a multi-threaded application such as a web server -- setlocale() changes the locale for the entire process. >> Alternatively, we could add "en_DE" to the alias table and set >> a default encoding to use. > > Where would you get a complete list of all the new aliases that would need be to be added? We could start with the list of supported locales in Windows: https://docs.microsoft.com/en-us/cpp/c-runtime-library/locale-names-languages-and-country-region-strings?view=msvc-160 Since everything is moving toward UTF-8 as standard encoding, I'd suggest use alias the plain locale codes to .UTF-8. -- Marc-Andre Lemburg eGenix.com From report at bugs.python.org Thu Feb 18 05:16:46 2021 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 18 Feb 2021 10:16:46 +0000 Subject: [issue43115] locale.getlocale fails if locale is set In-Reply-To: <1613570577.83.0.979105361569.issue43115@roundup.psfhosted.org> Message-ID: Marc-Andre Lemburg added the comment: On 17.02.2021 15:02, Anders Munch wrote: >> BTW: What is wxWidgets doing with the returned values ? > > wxWidgets doesn't call getlocale, it's a C++ library (wrapped by wxPython) that uses C setlocale. > > What does use getlocale is time.strptime and datetime.datetime.strptime, so when getlocale fails, strptime fails. Would they work with getlocale() returning None for the encoding ? >> We could enhance this to return None for the encoding instead >> of raising an exception, but would this really help ? > > Very much so. > > Frankly, I don't get the impression that the current locale preferred encoding is used for *anything*. Other than possibly having a role in implementing getpreferredencoding. The logic for getdefaultencoding() predates getpreferredencoding(). I had added it because calling setlocale() just to figure out the default encoding and then resetting it to the original setting is dangerous in a multi-threaded application such as a web server -- setlocale() changes the locale for the entire process. >> Alternatively, we could add "en_DE" to the alias table and set >> a default encoding to use. > > Where would you get a complete list of all the new aliases that would need be to be added? We could start with the list of supported locales in Windows: https://docs.microsoft.com/en-us/cpp/c-runtime-library/locale-names-languages-and-country-region-strings?view=msvc-160 Since everything is moving toward UTF-8 as standard encoding, I'd suggest use alias the plain locale codes to .UTF-8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 05:54:50 2021 From: report at bugs.python.org (Mark Shannon) Date: Thu, 18 Feb 2021 10:54:50 +0000 Subject: [issue43228] Regression in function builtins In-Reply-To: <1613396595.98.0.792771642012.issue43228@roundup.psfhosted.org> Message-ID: <1613645690.84.0.0638524557016.issue43228@roundup.psfhosted.org> Mark Shannon added the comment: I don't think PR 24559 will be sufficient to fix this. Pickled functions need to share the builtins dict, not just have a copy of it. Adding a "builtins" parameter to types.FunctionType() should be be enough. So: function(code, globals, name=None, argdefs=None, closure=None) would become: function(code, globals, name=None, argdefs=None, closure=None, builtins=None) The change to cloudpickle is a bit complex as the pickle code would need to change the arguments to types.FunctionType() from (code, globals, name, argdefs) to (code, globals, name, argdefs, None, __builtins__.__dict__) but __builtins__.__dict__ cannot be pickled. So cloudpickle will need to emit pickle bytecode to create the tuple, using the unpickler's __builtins__.__dict__. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 05:55:10 2021 From: report at bugs.python.org (Nicholas Sim) Date: Thu, 18 Feb 2021 10:55:10 +0000 Subject: [issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details In-Reply-To: <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za> Message-ID: <1613645710.47.0.503261195132.issue35134@roundup.psfhosted.org> Change by Nicholas Sim : ---------- pull_requests: +23342 pull_request: https://github.com/python/cpython/pull/24561 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 06:13:38 2021 From: report at bugs.python.org (Omer Katz) Date: Thu, 18 Feb 2021 11:13:38 +0000 Subject: [issue43248] platform.libc_ver() returns no information on Alpine Linux Message-ID: <1613646818.72.0.219281463951.issue43248@roundup.psfhosted.org> New submission from Omer Katz : When calling platform.libc_ver() on Alpine I get the following tuple: ('', '') Instead, I expect to get ('muslc', '') or an exception if the libc type & version cannot be detected. If one of them is not detected, the returned value shouldn't be an empty string but None. The current API is not what most people would expect it to be. This is verified on Python 3.8 since that's the latest one available on Alpine. This code reliably detects musl libc and its version: https://github.com/lovell/detect-libc/blob/master/lib/detect-libc.js I'd be happy to contribute a PR if needed. ---------- messages: 387211 nosy: Omer.Katz priority: normal severity: normal status: open title: platform.libc_ver() returns no information on Alpine Linux versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 06:14:23 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 18 Feb 2021 11:14:23 +0000 Subject: [issue43249] sqlite3_column_bytes() should be called after sqlite3_column_blob() Message-ID: <1613646863.88.0.107963073708.issue43249@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : sqlite3_column_bytes() should be called _after_ sqlite3_column_blob(). There two calls to sqlite3_column_blob() are both preceeded by calls to sqlite3_column_bytes(). Currently it does not do any harm, but it is bad API usage. I suggest to fix the two cases, and add a comment in the source code as a reminder. Berker? Quoting from https://sqlite.org/c3ref/column_blob.html: The safest policy is to invoke these routines in one of the following ways: * sqlite3_column_text() followed by sqlite3_column_bytes() * sqlite3_column_blob() followed by sqlite3_column_bytes() * sqlite3_column_text16() followed by sqlite3_column_bytes16() In other words, you should call sqlite3_column_text(), sqlite3_column_blob(), or sqlite3_column_text16() first to force the result into the desired format, then invoke sqlite3_column_bytes() or sqlite3_column_bytes16() to find the size of the result. ---------- components: Library (Lib) messages: 387212 nosy: berker.peksag, erlendaasland, serhiy.storchaka priority: normal severity: normal status: open title: sqlite3_column_bytes() should be called after sqlite3_column_blob() type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 06:21:34 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Feb 2021 11:21:34 +0000 Subject: [issue43250] [C API] Depreate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT() Message-ID: <1613647294.57.0.745628645388.issue43250@roundup.psfhosted.org> New submission from STINNER Victor : In Python 3.6, there was a WANT_SIGFPE_HANDLER macro defined if Python was built with ./configure --with-fpectl. By default, the macro was not defined. The fpectl module installed a SIGFPE signal handler which uses longjmp(). If the WANT_SIGFPE_HANDLER macro was defined, PyFPE_START_PROTECT() and PyFPE_END_PROTECT() macros used setjmp() to catch SIGFPE. All of this machinery was removed by bpo-29137 to fix ABI issues: commit 735ae8d139a673b30b321dc10acfd3d14f0d633b Author: Nathaniel J. Smith Date: Fri Jan 5 23:15:34 2018 -0800 bpo-29137: Remove fpectl module (#4789) This module has never been enabled by default, never worked correctly on x86-64, and caused ABI problems that caused C extension compatibility. See bpo-29137 for details/discussion. The PyFPE_START_PROTECT() and PyFPE_END_PROTECT() macros still exist for backward compatibility with Python 3.6 and older. Python/pyfpe.c contains the comment: /* These variables used to be used when Python was built with --with-fpectl, * but support for that was dropped in 3.7. We continue to define them, * though, because they may be referenced by extensions using the stable ABI. */ I'm not convinced that these macros are part of the stable ABI. The PEP 384 doesn't exclude pyfpe.h explicitly, but it's also unclear if it's part of the stable ABI or not. "PyFPE_START_PROTECT" and "PyFPE_END_PROTECT" symbols are not part of the stable ABI at least: they are missing from PC/python3dll.c and Doc/data/stable_abi.dat. Well, these are macros which emitted directly code rather than calling an opaque function. That sounds really bad in term of stable ABI :-( Python 3.6 macros, when WANT_SIGFPE_HANDLER macro is defined: --- #include #include #include extern jmp_buf PyFPE_jbuf; extern int PyFPE_counter; extern double PyFPE_dummy(void *); #define PyFPE_START_PROTECT(err_string, leave_stmt) \ if (!PyFPE_counter++ && setjmp(PyFPE_jbuf)) { \ PyErr_SetString(PyExc_FloatingPointError, err_string); \ PyFPE_counter = 0; \ leave_stmt; \ } #define PyFPE_END_PROTECT(v) PyFPE_counter -= (int)PyFPE_dummy(&(v)); --- I propose to either deprecate these macros or remove them. These macros are not documented. In Python 3.6, the PyFPE macros were used in the Python stdlib, by files: Doc/library/fpectl.rst Include/pyfpe.h Modules/_tkinter.c Modules/clinic/cmathmodule.c.h Modules/cmathmodule.c Modules/fpetestmodule.c Modules/mathmodule.c Objects/complexobject.c Objects/floatobject.c Python/bltinmodule.c Python/pystrtod.c But it doesn't seem to be used outside Python. Note: In master, they are not used anywhere, they are only defined by Include/pyfpe.h. ---------- components: C API messages: 387213 nosy: njs, vstinner priority: normal severity: normal status: open title: [C API] Depreate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT() versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 06:22:34 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 18 Feb 2021 11:22:34 +0000 Subject: [issue43251] sqlite3_column_name() failures should call PyErr_NoMemory() Message-ID: <1613647354.29.0.206061609144.issue43251@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : AFAICS, the docs for sqlite3_column_name() says that if it returns NULL, we are out of memory, thus we should call PyErr_NoMemory() and bail. FYI, there are the calls to sqlite3_column_name() in Modules/_sqlite//cursor.c Ref: - http://sqlite.org/c3ref/column_name.html - http://sqlite.org/c3ref/free.html ---------- components: Library (Lib) messages: 387214 nosy: berker.peksag, erlendaasland, serhiy.storchaka priority: normal severity: normal status: open title: sqlite3_column_name() failures should call PyErr_NoMemory() versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 06:23:20 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Feb 2021 11:23:20 +0000 Subject: [issue43250] [C API] Depreate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT() In-Reply-To: <1613647294.57.0.745628645388.issue43250@roundup.psfhosted.org> Message-ID: <1613647400.62.0.56729755006.issue43250@roundup.psfhosted.org> STINNER Victor added the comment: Latest commit related to these macros: commit be143ec99674ba38c5811f34cdb85ef39c2dc8f8 Author: Victor Stinner Date: Wed Nov 20 02:51:30 2019 +0100 bpo-38835: Don't use PyFPE_START_PROTECT and PyFPE_END_PROTECT (GH-17231) The PyFPE_START_PROTECT() and PyFPE_END_PROTECT() macros are empty: they have been doing nothing for the last year (since commit 735ae8d139a673b30b321dc10acfd3d14f0d633b), so stop using them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 06:24:02 2021 From: report at bugs.python.org (Berker Peksag) Date: Thu, 18 Feb 2021 11:24:02 +0000 Subject: [issue43249] sqlite3_column_bytes() should be called after sqlite3_column_blob() In-Reply-To: <1613646863.88.0.107963073708.issue43249@roundup.psfhosted.org> Message-ID: <1613647442.44.0.868444451985.issue43249@roundup.psfhosted.org> Berker Peksag added the comment: Good catch! Sounds good to me but I'd say designing APIs relying on call order is bad too :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 06:24:18 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Feb 2021 11:24:18 +0000 Subject: [issue29137] Fix fpectl-induced ABI breakage In-Reply-To: <1483402510.43.0.646850547969.issue29137@psf.upfronthosting.co.za> Message-ID: <1613647458.76.0.0175371692574.issue29137@roundup.psfhosted.org> STINNER Victor added the comment: I created bpo-43250: "[C API] Depreate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT()". By the way, I close this issue: there is no activity since 2019. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 06:25:37 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Feb 2021 11:25:37 +0000 Subject: [issue43250] [C API] Depreate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT() In-Reply-To: <1613647294.57.0.745628645388.issue43250@roundup.psfhosted.org> Message-ID: <1613647537.13.0.228305469607.issue43250@roundup.psfhosted.org> STINNER Victor added the comment: Another related change from bpo-37474: commit 5e0ea7540f577c9684e272000fdfc80d29bb78a2 Author: Victor Stinner Date: Tue Oct 1 13:12:29 2019 +0200 bpo-37474: Don't call fedisableexcept() on FreeBSD (GH-16515) On FreeBSD, Python no longer calls fedisableexcept() at startup to control the floating point control mode. The call became useless since FreeBSD 6: it became the default mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 06:27:25 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Feb 2021 11:27:25 +0000 Subject: [issue43250] [C API] Depreate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT() In-Reply-To: <1613647294.57.0.745628645388.issue43250@roundup.psfhosted.org> Message-ID: <1613647645.85.0.131589597389.issue43250@roundup.psfhosted.org> STINNER Victor added the comment: I explicitly excluded the PyFPE macros from the limited C API in Python 3.9: commit 488d02a24142948bfb1fafd19fa48e61fcbbabc5 Author: Victor Stinner Date: Wed Nov 20 12:17:09 2019 +0100 bpo-38835: Exclude PyFPE macros from the stable API (GH-17228) Exclude PyFPE_START_PROTECT() and PyFPE_END_PROTECT() macros of pyfpe.h from Py_LIMITED_API (stable API). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 06:28:00 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Feb 2021 11:28:00 +0000 Subject: [issue43250] [C API] Depreate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT() In-Reply-To: <1613647294.57.0.745628645388.issue43250@roundup.psfhosted.org> Message-ID: <1613647680.85.0.170966077061.issue43250@roundup.psfhosted.org> STINNER Victor added the comment: See also bpo-38835: "pyfpe.h: Exclude PyFPE_START_PROTECT and PyFPE_END_PROTECT from the Py_LIMITED_API". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 06:29:42 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 18 Feb 2021 11:29:42 +0000 Subject: [issue43249] sqlite3_column_bytes() should be called after sqlite3_column_blob() In-Reply-To: <1613646863.88.0.107963073708.issue43249@roundup.psfhosted.org> Message-ID: <1613647782.75.0.100419988551.issue43249@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: > Sounds good to me but I'd say designing APIs relying on call order is bad too :) Yes, it's too easy to mess up things with this part of the SQLite API :) I'll throw up a PR. BTW (small digression): I really want to refactor _pysqlite_fetch_one_row() so it uses two helpers (for example _fetch_nth_column_with_converter() and _fetch_nth_column()). It will be easier to maintain, and it's way easier to read. The coverage for this function is close to 100%, so it should be pretty safe to refactor it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 06:32:58 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Feb 2021 11:32:58 +0000 Subject: [issue43228] Regression in function builtins In-Reply-To: <1613396595.98.0.792771642012.issue43228@roundup.psfhosted.org> Message-ID: <1613647978.26.0.583464115137.issue43228@roundup.psfhosted.org> STINNER Victor added the comment: > but __builtins__.__dict__ cannot be pickled. I don't see why cloudpickle calls LambdaType() directly. It could use a helper in their cloudpickle.cloudpickle_fast which calls LambdaType() with the proper arguments, especially to get __builtins__. I don't think that cloudpickle should serialize __builtins__! By the way, I'm not sure why the function constructor builds {'None': None} namespace for builtins rather than inheriting the current builtins namespace. IMO it's unconvenient. If someone wants to override __builtins__, setting __builtins__ key in the globals namespace should be enough. > Adding a "builtins" parameter to types.FunctionType() should be be enough. Oh right, we should give the ability to control this important parameter! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 06:36:09 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Feb 2021 11:36:09 +0000 Subject: [issue42990] Improve the C code for calling Python code: _PyEval_EvalCode() In-Reply-To: <1611245152.12.0.0348161555926.issue42990@roundup.psfhosted.org> Message-ID: <1613648169.93.0.561264557688.issue42990@roundup.psfhosted.org> STINNER Victor added the comment: New changeset a3c3ffa68e6fc4524b1149a6a14d56c3a2e9b612 by Victor Stinner in branch 'master': bpo-42990: Add __builtins__ attribute to functions (GH-24559) https://github.com/python/cpython/commit/a3c3ffa68e6fc4524b1149a6a14d56c3a2e9b612 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 06:39:36 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 18 Feb 2021 11:39:36 +0000 Subject: [issue43249] sqlite3_column_bytes() should be called after sqlite3_column_blob() In-Reply-To: <1613646863.88.0.107963073708.issue43249@roundup.psfhosted.org> Message-ID: <1613648376.15.0.591292880713.issue43249@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +23343 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24562 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 06:50:01 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Thu, 18 Feb 2021 11:50:01 +0000 Subject: [issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash In-Reply-To: <1340142734.59.0.259692259195.issue15108@psf.upfronthosting.co.za> Message-ID: <1613649001.23.0.690662282976.issue15108@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Should we still fix sqlite3, or wait for an agreement on GH-24510? I suggest to let's all agree on how to fix this on the bigger scale first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 07:15:45 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Feb 2021 12:15:45 +0000 Subject: [issue43250] [C API] Depreate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT() In-Reply-To: <1613647294.57.0.745628645388.issue43250@roundup.psfhosted.org> Message-ID: <1613650545.34.0.00289395388198.issue43250@roundup.psfhosted.org> STINNER Victor added the comment: Using INADA-san recipe https://github.com/methane/notes/tree/master/2020/wchar-cache I found the 62 projects on the PyPI top 4000 which contain "PyFPE" pattern: asyncpg-0.22.0.tar.gz auditwheel-3.3.1.tar.gz av-8.0.3.tar.gz bcolz-1.2.1.tar.gz BDQuaternions-0.2.15.tar.gz bx-python-0.8.9.tar.gz ConfigSpace-0.4.18.tar.gz Cython-0.29.21.tar.gz cytoolz-0.11.0.tar.gz ddtrace-0.46.0.tar.gz dedupe-hcluster-0.3.8.tar.gz dependency-injector-4.23.5.tar.gz fastavro-1.3.2.tar.gz fastdtw-0.3.4.tar.gz Fiona-1.8.18.tar.gz fuzzysearch-0.7.3.tar.gz fuzzyset-0.0.19.tar.gz gensim-3.8.3.tar.gz grpcio-1.35.0.tar.gz gssapi-1.6.12.tar.gz hdbscan-0.8.27.tar.gz hmmlearn-0.2.5.tar.gz imagecodecs-2021.1.28.tar.gz implicit-0.4.4.tar.gz lightfm-1.16.tar.gz lupa-1.9.tar.gz lxml-4.6.2.tar.gz mujoco-py-2.0.2.13.tar.gz neobolt-1.7.17.tar.gz orderedset-2.0.3.tar.gz peewee-3.14.1.tar.gz Pillow-8.1.0.tar.gz Pillow-SIMD-7.0.0.post3.tar.gz pmdarima-1.8.0.tar.gz pomegranate-0.14.2.tar.gz pycapnp-1.0.0.tar.gz pydevd-2.2.0.tar.gz pygame-2.0.1.tar.gz pyhacrf-datamade-0.2.5.tar.gz pyjq-2.5.1.tar.gz pysam-0.16.0.1.tar.gz pystan-2.19.1.1.tar.gz PyWavelets-1.1.1.tar.gz rasterio-1.2.0.tar.gz ruptures-1.1.3.tar.gz s2sphere-0.2.5.tar.gz scikit-image-0.18.1.tar.gz scipy-1.6.1.tar.gz Shapely-1.7.1.tar.gz simplejson-3.17.2.tar.gz spacy-3.0.3.tar.gz statsmodels-0.12.2.tar.gz tables-3.6.1.tar.gz Theano-1.0.5.tar.gz thinc-8.0.1.tar.gz tinycss-0.4.tar.gz tslearn-0.5.0.5.tar.gz uvloop-0.15.1.tar.gz weighted_levenshtein-0.2.1.tar.gz wordcloud-1.8.1.tar.gz wsaccel-0.6.3.tar.gz wxPython-4.1.1.tar.gz Example with asyncpg: $ rg PyFPE asyncpg/pgproto/pgproto.c 39841: PyFPE_START_PROTECT("add", return NULL) 39843: PyFPE_END_PROTECT(result) asyncpg/protocol/protocol.c 85260: PyFPE_START_PROTECT("add", return NULL) 85262: PyFPE_END_PROTECT(result) 85563: PyFPE_START_PROTECT("subtract", return NULL) 85565: PyFPE_END_PROTECT(result) 85734: PyFPE_START_PROTECT("add", return NULL) 85736: PyFPE_END_PROTECT(result) So it doesn't sound like a good idea to immediately remove these two macros. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 07:19:02 2021 From: report at bugs.python.org (Konrad Schwarz) Date: Thu, 18 Feb 2021 12:19:02 +0000 Subject: [issue43252] deepcopy of weakref proxies Message-ID: <1613650741.99.0.0896392354865.issue43252@roundup.psfhosted.org> New submission from Konrad Schwarz : copy.deepcopy()-ing a tree structure that has internal parent and cross-reference links implemented as weakref.proxy() objects causes the weak reference proxies themselves to be copied (still refering to their original referents) rather than weak references to deep-copied referents to be created. A workaround is to add the following __deepcopy__ method to affected classes: def __deepcopy__ (self, memo): # taken from Stackoverflow: "How to override the # copy deepcopy operations for a python object" # and "Python: dereferencing weakproxy" cls = self.__class__ result = cls.__new__ (cls) memo [id (self)] = result for k, v in self.__dict__.items (): if isinstance (v, weakref.ProxyType): new_v = weakref.proxy (copy.deepcopy ( v.__repr__.__self__, memo)) else: new_v = copy.deepcopy (v, memo) setattr (result, k, new_v) return result ---------- components: Library (Lib) messages: 387226 nosy: konrad.schwarz priority: normal severity: normal status: open title: deepcopy of weakref proxies type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 07:23:29 2021 From: report at bugs.python.org (Charalampos Stratakis) Date: Thu, 18 Feb 2021 12:23:29 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613651009.96.0.0468815694773.issue43179@roundup.psfhosted.org> Charalampos Stratakis added the comment: > You do not need to support every platform. Just allow your users to use them. This is kinda missing the point though. For example I've dealt a lot with the CPython codebase (and I'm also one of the Red Hat maintainers for RHEL and Fedora) and although I'm not a core developer, the codebase can be quite intimidating. I agree that some lines of code do not seem like much but they add up. If noone actually has a use case here, removing them would be the best option overall just from a cognitive perspective. Now I agree there are hobbyist's and so forth but you present an example, which is irrelevant to this case (m68k is not s390, right?). Do you actually know someone who is actively interested in the usecase of building a 32 bit python on an s390x system? Or do you know someone who owns an s390 system? Maybe someone who sends related fixes to another project? You claim to speak for other maintainers, yet I'd like to actually hear their position on that. Feel free to add them to the nosy list. If the latest kernel is not even booting, I don't think many people actually care about this arch to at least keep it running. On the other hand I do think though here that David would be the best person to speak about those use cases, as he is the most experienced here with the s390(x) architecture. Now from my personal point of view, I don't mind actually keeping the support there, but it will never come up downstream for me, hence it won't affect me as Fedora doesn't build anymore for s390 (and already posted before the case for RHEL). So again, do you know of this specific usecase, of someone either owning an s390 machine and compiling python, or actually utilizing an s390x machine and using the multilib packages to build a 32 bit python? If so, would you (or they) step up to fix related issues when they come up and assuming a buildbot would be set? Or would you know someone who would? While your arguments make sense up to a point, claiming that others will step up or saying what others have done for different architectures, doesn't really help your arguments to hold. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 08:13:09 2021 From: report at bugs.python.org (Nicholas Sim) Date: Thu, 18 Feb 2021 13:13:09 +0000 Subject: [issue38822] Inconsistent os.stat behavior for directory with Access Denied In-Reply-To: <1573928094.88.0.209131085868.issue38822@roundup.psfhosted.org> Message-ID: <1613653989.82.0.59502342475.issue38822@roundup.psfhosted.org> Change by Nicholas Sim : ---------- nosy: +nw0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 08:13:34 2021 From: report at bugs.python.org (Nicholas Sim) Date: Thu, 18 Feb 2021 13:13:34 +0000 Subject: [issue40512] [subinterpreters] Meta issue: per-interpreter GIL In-Reply-To: <1588683075.13.0.0239787407564.issue40512@roundup.psfhosted.org> Message-ID: <1613654014.57.0.605409719589.issue40512@roundup.psfhosted.org> Change by Nicholas Sim : ---------- nosy: +nw0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 08:19:19 2021 From: report at bugs.python.org (Nicholas Sim) Date: Thu, 18 Feb 2021 13:19:19 +0000 Subject: [issue29086] Document C API that is not part of the limited API In-Reply-To: <1482865319.03.0.627052322458.issue29086@psf.upfronthosting.co.za> Message-ID: <1613654359.32.0.188984005639.issue29086@roundup.psfhosted.org> Change by Nicholas Sim : ---------- nosy: +nw0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 08:46:25 2021 From: report at bugs.python.org (Daniel Engel) Date: Thu, 18 Feb 2021 13:46:25 +0000 Subject: [issue43253] asyncio open_connection fails when a socket is explicitly closed Message-ID: <1613655985.97.0.0380110039523.issue43253@roundup.psfhosted.org> New submission from Daniel Engel : Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] Type 'copyright', 'credits' or 'license' for more information IPython 7.18.1 -- An enhanced Interactive Python. Type '?' for help. In [1]: import socket ...: s1, s2 = socket.socketpair() ...: import asyncio ...: async def test(): ...: r1, w1 = await asyncio.open_connection(sock=s1) ...: r2, w2 = await asyncio.open_connection(sock=s2) ...: s1.close() ...: asyncio.run(test()) Exception in callback _ProactorBasePipeTransport._call_connection_lost(ConnectionAbo...e, 1236, None)) handle: Traceback (most recent call last): File "c:\python39\lib\asyncio\events.py", line 80, in _run self._context.run(self._callback, *self._args) File "c:\python39\lib\asyncio\proactor_events.py", line 162, in _call_connection_lost self._sock.shutdown(socket.SHUT_RDWR) OSError: [WinError 10038] An operation was attempted on something that is not a socket ---------- components: asyncio messages: 387228 nosy: asvetlov, danielen1337, yselivanov priority: normal severity: normal status: open title: asyncio open_connection fails when a socket is explicitly closed versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 08:48:06 2021 From: report at bugs.python.org (Petr Viktorin) Date: Thu, 18 Feb 2021 13:48:06 +0000 Subject: [issue29086] Document C API that is not part of the limited API In-Reply-To: <1482865319.03.0.627052322458.issue29086@psf.upfronthosting.co.za> Message-ID: <1613656086.65.0.840489037127.issue29086@roundup.psfhosted.org> Petr Viktorin added the comment: PEP 652 is currently draft & it's discussed at https://discuss.python.org/t/pep-652-maintaining-the-stable-abi/6986 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 09:02:57 2021 From: report at bugs.python.org (Nicholas Sim) Date: Thu, 18 Feb 2021 14:02:57 +0000 Subject: [issue40077] Convert static types to heap types: use PyType_FromSpec() In-Reply-To: <1585238684.65.0.246012172449.issue40077@roundup.psfhosted.org> Message-ID: <1613656977.83.0.922668052156.issue40077@roundup.psfhosted.org> Change by Nicholas Sim : ---------- nosy: +nw0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 09:06:47 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 18 Feb 2021 14:06:47 +0000 Subject: [issue43254] Fix *snprintf() man page links Message-ID: <1613657207.71.0.865293132233.issue43254@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : Both snprintf and vsnprintf belong to man section 3 (library functions), not section 2 (system calls). Affected doc page: https://docs.python.org/3.10/c-api/conversion.html ---------- assignee: docs at python components: Documentation messages: 387230 nosy: docs at python, erlendaasland priority: normal severity: normal status: open title: Fix *snprintf() man page links versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 09:06:58 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 18 Feb 2021 14:06:58 +0000 Subject: [issue43254] Fix *snprintf() man page links In-Reply-To: <1613657207.71.0.865293132233.issue43254@roundup.psfhosted.org> Message-ID: <1613657218.86.0.868284006954.issue43254@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +23344 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24563 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 09:18:04 2021 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Thu, 18 Feb 2021 14:18:04 +0000 Subject: [issue43255] Ceil division with /// operator Message-ID: <1613657884.47.0.693807596849.issue43255@roundup.psfhosted.org> New submission from Bo?tjan Mejak : I hope I'm not too late for a Python 3.10 feature request. I love the fact that Python 3.x does floor division with the // operator. We, however, don't have a ceil division operator, besides importing the math module and using its math.ceil() function. Is it possible we have /// as a ceil division operator in Python 3.10? I just wanted to put this thought out of my head if anyone becomes entertained by this idea. ---------- components: Library (Lib) messages: 387231 nosy: PedanticHacker, gvanrossum, rhettinger priority: normal severity: normal status: open title: Ceil division with /// operator type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 09:20:37 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Feb 2021 14:20:37 +0000 Subject: [issue42990] Improve the C code for calling Python code: _PyEval_EvalCode() In-Reply-To: <1611245152.12.0.0348161555926.issue42990@roundup.psfhosted.org> Message-ID: <1613658037.38.0.488162322173.issue42990@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +23345 pull_request: https://github.com/python/cpython/pull/24564 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 09:22:59 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Feb 2021 14:22:59 +0000 Subject: [issue43228] Regression in function builtins In-Reply-To: <1613396595.98.0.792771642012.issue43228@roundup.psfhosted.org> Message-ID: <1613658179.47.0.358622480309.issue43228@roundup.psfhosted.org> STINNER Victor added the comment: I proposed PR 24564: "bpo-42990: Functions inherit current builtins" which should also to fix cloudpickle. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 09:26:24 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Feb 2021 14:26:24 +0000 Subject: [issue42990] Improve the C code for calling Python code: _PyEval_EvalCode() In-Reply-To: <1611245152.12.0.0348161555926.issue42990@roundup.psfhosted.org> Message-ID: <1613658384.97.0.288944302529.issue42990@roundup.psfhosted.org> STINNER Victor added the comment: I reopen the issue since there is bpo-43228 regression, caused by this issue, which is still under discussion, and Mark also proposed to add a new builtins parameter to the function constructor (FunctionType). I wrote PR 24564 to help fixing bpo-43228 regression: with this change, functions now inherit the current builtins if the globals namespace is overriden, but the new globals has no "__builtins__" key. This change is backward incompatible on purpose. If someone really wants to run a function in a different builtins namespace, globals['__builtins__'] must be set explicitly. Once PR 24564 will be merged, I plan to write a 3rd PR to add an optional builtins keyword-only parameter to the function constructor (FunctionType). ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 09:26:32 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Feb 2021 14:26:32 +0000 Subject: [issue42990] Improve the C code for calling Python code: _PyEval_EvalCode() In-Reply-To: <1611245152.12.0.0348161555926.issue42990@roundup.psfhosted.org> Message-ID: <1613658392.7.0.290201340324.issue42990@roundup.psfhosted.org> Change by STINNER Victor : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 09:31:33 2021 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 18 Feb 2021 14:31:33 +0000 Subject: [issue43256] Document that PyErr_SetInterrupt is async-signal-safe Message-ID: <1613658692.98.0.566153002087.issue43256@roundup.psfhosted.org> New submission from Antoine Pitrou : While this makes sense given the exposed functionality, the reader may be wary of calling PyErr_SetInterrupt from a C signal handler if it's not explicitly documented as signal-safe. ---------- assignee: docs at python components: C API, Documentation messages: 387234 nosy: docs at python, pablogsal, pitrou, vstinner priority: low severity: normal status: open title: Document that PyErr_SetInterrupt is async-signal-safe type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 09:37:11 2021 From: report at bugs.python.org (Emmanuel Arias) Date: Thu, 18 Feb 2021 14:37:11 +0000 Subject: [issue43253] asyncio open_connection fails when a socket is explicitly closed In-Reply-To: <1613655985.97.0.0380110039523.issue43253@roundup.psfhosted.org> Message-ID: <1613659031.98.0.879434734935.issue43253@roundup.psfhosted.org> Emmanuel Arias added the comment: I cannot reproduce on a Debian machine. Seems to be a Windows component issue? ---------- nosy: +eamanu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 09:50:17 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Feb 2021 14:50:17 +0000 Subject: [issue43255] Ceil division with /// operator In-Reply-To: <1613657884.47.0.693807596849.issue43255@roundup.psfhosted.org> Message-ID: <1613659817.77.0.580648221603.issue43255@roundup.psfhosted.org> Serhiy Storchaka added the comment: Since adding new operator is a syntax-level change, it needs a PEP. It is better to start with discussing on the Python-ideas mailing list (https://mail.python.org/mailman3/lists/python-ideas.python.org/). Let's see if this idea will be accepted favorably. BTW, the ceiling division can be expressed as -(-a // b) or -(a // -b). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 10:00:41 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Feb 2021 15:00:41 +0000 Subject: [issue43255] Ceil division with /// operator In-Reply-To: <1613657884.47.0.693807596849.issue43255@roundup.psfhosted.org> Message-ID: <1613660441.7.0.4190875051.issue43255@roundup.psfhosted.org> STINNER Victor added the comment: I'm not convinced that this operation is so common that it deserves a new operator. As Serhiy wrote, it must be first on python-ideas first. I close the issue. -- floor division is x//y integer ceil division can be implemented with math.ceil(x/y) for small numbers. For large integer numbers, I like to use something like: def ceil_div(x, y): rem=x % y if rem: x += y - rem return x//y I let you adjust it for negative numbers ;-) ---------- nosy: +vstinner resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 10:07:47 2021 From: report at bugs.python.org (Daniel Engel) Date: Thu, 18 Feb 2021 15:07:47 +0000 Subject: [issue43253] asyncio open_connection fails when a socket is explicitly closed In-Reply-To: <1613655985.97.0.0380110039523.issue43253@roundup.psfhosted.org> Message-ID: <1613660867.14.0.49326816823.issue43253@roundup.psfhosted.org> Daniel Engel added the comment: It reproduced on a windows machine ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 10:26:28 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Feb 2021 15:26:28 +0000 Subject: [issue42960] resources module, FreeBSD update adding RLIMIT_KQUEUES constant In-Reply-To: <1611559669.48.0.777933743407.issue42960@roundup.psfhosted.org> Message-ID: <1613661988.48.0.13079475866.issue42960@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 7be00ee64a2ced73c00ec855c7265e2ba795213d by David CARLIER in branch 'master': bpo-42960: Add resource.RLIMIT_KQUEUES constant from FreeBSD (GH-24251) https://github.com/python/cpython/commit/7be00ee64a2ced73c00ec855c7265e2ba795213d ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 10:26:55 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Feb 2021 15:26:55 +0000 Subject: [issue42960] resources module, FreeBSD update adding RLIMIT_KQUEUES constant In-Reply-To: <1611559669.48.0.777933743407.issue42960@roundup.psfhosted.org> Message-ID: <1613662015.44.0.351079923203.issue42960@roundup.psfhosted.org> STINNER Victor added the comment: Thanks David, I merged your PR. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 10:45:03 2021 From: report at bugs.python.org (Berker Peksag) Date: Thu, 18 Feb 2021 15:45:03 +0000 Subject: [issue43249] sqlite3_column_bytes() should be called after sqlite3_column_blob() In-Reply-To: <1613646863.88.0.107963073708.issue43249@roundup.psfhosted.org> Message-ID: <1613663103.53.0.759228573775.issue43249@roundup.psfhosted.org> Berker Peksag added the comment: New changeset 47feb1feb28631b6647699b7633109aa85340966 by Erlend Egeberg Aasland in branch 'master': bpo-43249: sqlite3_column_bytes() must follow sqlite_column_blob() (GH-24562) https://github.com/python/cpython/commit/47feb1feb28631b6647699b7633109aa85340966 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 11:06:00 2021 From: report at bugs.python.org (Emmanuel Arias) Date: Thu, 18 Feb 2021 16:06:00 +0000 Subject: [issue43253] asyncio open_connection fails when a socket is explicitly closed In-Reply-To: <1613655985.97.0.0380110039523.issue43253@roundup.psfhosted.org> Message-ID: <1613664360.36.0.167714976599.issue43253@roundup.psfhosted.org> Change by Emmanuel Arias : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 11:08:55 2021 From: report at bugs.python.org (Petr Viktorin) Date: Thu, 18 Feb 2021 16:08:55 +0000 Subject: [issue28429] ctypes fails to import with grsecurity's TPE In-Reply-To: <1476360738.57.0.800770600157.issue28429@psf.upfronthosting.co.za> Message-ID: <1613664535.37.0.541994053501.issue28429@roundup.psfhosted.org> Petr Viktorin added the comment: Glandos, thank you for the report and fix, and apologies that it wasn't seen by the right set of eyes. ---------- nosy: +petr.viktorin resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 11:30:10 2021 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 18 Feb 2021 16:30:10 +0000 Subject: [issue42990] Improve the C code for calling Python code: _PyEval_EvalCode() In-Reply-To: <1611245152.12.0.0348161555926.issue42990@roundup.psfhosted.org> Message-ID: <1613665810.07.0.76841112398.issue42990@roundup.psfhosted.org> Yury Selivanov added the comment: > So you think that even a dedicated "LEN" opcode would not be any faster? (This is getting in Paul Sokolovsky territory -- IIRC he has a variant of Python that doesn't allow overriding builtins.) Yeah, a dedicated LEN opcode could only be faster if it would not be possible to shadow builtins (or if there was a "len" operator in Python). If that's not the case, this hypothetical LEN opcode would still have to check if "len" was shadowed or not, and that's slower than the optimized LOAD_GLOBAL we have now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 11:38:04 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 18 Feb 2021 16:38:04 +0000 Subject: [issue43249] sqlite3_column_bytes() should be called after sqlite3_column_blob() In-Reply-To: <1613646863.88.0.107963073708.issue43249@roundup.psfhosted.org> Message-ID: <1613666284.35.0.449235520971.issue43249@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +23346 pull_request: https://github.com/python/cpython/pull/24565 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 11:56:27 2021 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 18 Feb 2021 16:56:27 +0000 Subject: [issue42990] Improve the C code for calling Python code: _PyEval_EvalCode() In-Reply-To: <1611245152.12.0.0348161555926.issue42990@roundup.psfhosted.org> Message-ID: <1613667387.15.0.26721585315.issue42990@roundup.psfhosted.org> Guido van Rossum added the comment: Victor > the new globals has no "__builtins__" key. This change is backward incompatible on purpose. If someone really wants to run a function in a different builtins namespace, globals['__builtins__'] must be set explicitly. You say it's on purpose, what's the purpose? Aren't you worried this is going to break stuff? And why is this necessary given the LOAD_GLOBAL cache? Yury > this hypothetical LEN opcode would still have to check if "len" was shadowed or not, and that's slower than the optimized LOAD_GLOBAL we have now. It could use the same check though? Just check the version tags. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 12:01:38 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Feb 2021 17:01:38 +0000 Subject: [issue42990] Improve the C code for calling Python code: _PyEval_EvalCode() In-Reply-To: <1611245152.12.0.0348161555926.issue42990@roundup.psfhosted.org> Message-ID: <1613667698.05.0.147500171591.issue42990@roundup.psfhosted.org> STINNER Victor added the comment: > You say it's on purpose, what's the purpose? Aren't you worried this is going to break stuff? There is a subtle behavior difference between Python 3.9 and Python 3.10. func_builtins2.py of bpo-43228 works on Python 3.9 but fails on Python 3.10. With my PR 24564, func_builtins2.py works again on Python 3.10. See bpo-43228 for the details. > And why is this necessary given the LOAD_GLOBAL cache? My PR 24564 is not related to LOAD_GLOBAL, but how a frame fills its f_builtins member from a function. LOAD_GLOBAL uses f_globals and f_builtins members of a frame. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 12:13:02 2021 From: report at bugs.python.org (Gilles Duboscq) Date: Thu, 18 Feb 2021 17:13:02 +0000 Subject: [issue39853] Segmentation fault with urllib.request.urlopen and threads In-Reply-To: <1583347102.97.0.749597726143.issue39853@roundup.psfhosted.org> Message-ID: <1613668382.25.0.709138384702.issue39853@roundup.psfhosted.org> Gilles Duboscq added the comment: I'm not sure it's the same but we have seen stack traces looking like the one there: https://github.com/astropy/astropy/issues/9699 Current thread 0x00007fffa857e3c0 (most recent call first): File "/sw/lib/python3.7/socket.py", line 748 in getaddrinfo File "/sw/lib/python3.7/socket.py", line 707 in create_connection File "/sw/lib/python3.7/http/client.py", line 938 in connect File "/sw/lib/python3.7/http/client.py", line 966 in send File "/sw/lib/python3.7/http/client.py", line 1026 in _send_output File "/sw/lib/python3.7/http/client.py", line 1247 in endheaders File "/sw/lib/python3.7/http/client.py", line 1298 in _send_request File "/sw/lib/python3.7/http/client.py", line 1252 in request For us it happens when using multiprocessing: the main process forks 2 processes and both use urlopen at roughly the same time. We are seeing this on Python 3.7.2 on macOS 10.14.3. ---------- nosy: +gilles-duboscq _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 12:13:23 2021 From: report at bugs.python.org (Berker Peksag) Date: Thu, 18 Feb 2021 17:13:23 +0000 Subject: [issue43249] sqlite3_column_bytes() should be called after sqlite3_column_blob() In-Reply-To: <1613646863.88.0.107963073708.issue43249@roundup.psfhosted.org> Message-ID: <1613668403.3.0.840182988411.issue43249@roundup.psfhosted.org> Berker Peksag added the comment: New changeset cc96231f0a59cc7393943064800ecb6c18892662 by Erlend Egeberg Aasland in branch 'master': bpo-43249: Improve scoping in _pysqlite_fetch_one_row() (GH-24565) https://github.com/python/cpython/commit/cc96231f0a59cc7393943064800ecb6c18892662 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 12:13:45 2021 From: report at bugs.python.org (Berker Peksag) Date: Thu, 18 Feb 2021 17:13:45 +0000 Subject: [issue43249] sqlite3_column_bytes() should be called after sqlite3_column_blob() In-Reply-To: <1613646863.88.0.107963073708.issue43249@roundup.psfhosted.org> Message-ID: <1613668425.0.0.978920046096.issue43249@roundup.psfhosted.org> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 12:21:42 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Feb 2021 17:21:42 +0000 Subject: [issue43255] Ceil division with /// operator In-Reply-To: <1613657884.47.0.693807596849.issue43255@roundup.psfhosted.org> Message-ID: <1613668902.47.0.497350109057.issue43255@roundup.psfhosted.org> Mark Dickinson added the comment: I can't recall where I saw this originally, but you can use the spaceship operator "--0--" to turn floor division into ceiling division: >>> 12//5 2 >>> --0-- 12//5 3 There's also the ++0++ operator when you want to emphasize that you really *do* mean floor division: >>> ++0++ 12//5 2 But yes, -(-n // d) is the easy (if a little bit cryptic) way to get the ceiling of n / d. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 12:27:42 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Feb 2021 17:27:42 +0000 Subject: [issue39853] Segmentation fault with urllib.request.urlopen and threads In-Reply-To: <1583347102.97.0.749597726143.issue39853@roundup.psfhosted.org> Message-ID: <1613669262.04.0.536626160028.issue39853@roundup.psfhosted.org> STINNER Victor added the comment: "Segmentation fault with (...) threads (...) getaddrinfo" Aha, another victim on a getaddrinfo() implementation which is not thread safe. See this code in Modules/socketmodule.c: /* Lock to allow python interpreter to continue, but only allow one thread to be in gethostbyname or getaddrinfo */ #if defined(USE_GETHOSTBYNAME_LOCK) static PyThread_type_lock netdb_lock; #endif Can you please check if your Python was built with HAVE_GETHOSTBYNAME_R? $ python3 Python 3.9.1 (default, Jan 20 2021, 00:00:00) [GCC 10.2.1 20201125 (Red Hat 10.2.1-9)] on linux >>> import sysconfig; repr(sysconfig.get_config_var('HAVE_GETHOSTBYNAME_R')) '1' Modules/socketmodule.c is full of #ifdef involving macOS... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 12:46:31 2021 From: report at bugs.python.org (Gilles Duboscq) Date: Thu, 18 Feb 2021 17:46:31 +0000 Subject: [issue39853] Segmentation fault with urllib.request.urlopen and threads In-Reply-To: <1583347102.97.0.749597726143.issue39853@roundup.psfhosted.org> Message-ID: <1613670391.82.0.129830306678.issue39853@roundup.psfhosted.org> Gilles Duboscq added the comment: I get '0' so it was not built with HAVE_GETHOSTBYNAME_R. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 12:46:46 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Feb 2021 17:46:46 +0000 Subject: [issue43255] Ceil division with /// operator In-Reply-To: <1613657884.47.0.693807596849.issue43255@roundup.psfhosted.org> Message-ID: <1613670406.3.0.584752634935.issue43255@roundup.psfhosted.org> Change by Mark Dickinson : ---------- resolution: not a bug -> rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 12:49:49 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Feb 2021 17:49:49 +0000 Subject: [issue42429] Behavior of general (%g, :g) formatting inconsistent for decimal.Decimal In-Reply-To: <1606001380.98.0.451619022303.issue42429@roundup.psfhosted.org> Message-ID: <1613670589.12.0.162292578506.issue42429@roundup.psfhosted.org> Mark Dickinson added the comment: The documentation did get updates: see #39096 for details. Closing here. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 12:51:11 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Feb 2021 17:51:11 +0000 Subject: [issue13433] [doc] Improve string format documentation regarding %g In-Reply-To: <1321707692.58.0.601543510069.issue13433@psf.upfronthosting.co.za> Message-ID: <1613670671.0.0.383584723393.issue13433@roundup.psfhosted.org> Mark Dickinson added the comment: Closing; the documentation was updated recently. See #39096 for details. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 12:52:07 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Feb 2021 17:52:07 +0000 Subject: [issue2142] difflib.unified_diff(...) produces invalid patches In-Reply-To: <1203365817.7.0.0998491412302.issue2142@psf.upfronthosting.co.za> Message-ID: <1613670727.95.0.597987538938.issue2142@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: -mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 12:53:23 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Feb 2021 17:53:23 +0000 Subject: [issue42990] Improve the C code for calling Python code: _PyEval_EvalCode() In-Reply-To: <1611245152.12.0.0348161555926.issue42990@roundup.psfhosted.org> Message-ID: <1613670803.75.0.873385138082.issue42990@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +23347 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/24566 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 13:01:09 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Feb 2021 18:01:09 +0000 Subject: [issue39853] Segmentation fault with urllib.request.urlopen and threads In-Reply-To: <1583347102.97.0.749597726143.issue39853@roundup.psfhosted.org> Message-ID: <1613671269.27.0.847312089996.issue39853@roundup.psfhosted.org> STINNER Victor added the comment: Oh wait, I removed that lock: commit 0de437de6210c2b32b09d6c47a805b23d023bd59 Author: Victor Stinner Date: Thu May 28 17:23:39 2020 +0200 bpo-25920: Remove socket.getaddrinfo() lock on macOS (GH-20177) On macOS, socket.getaddrinfo() no longer uses an internal lock to prevent race conditions when calling getaddrinfo(). getaddrinfo is thread-safe is macOS 10.5, whereas Python 3.9 requires macOS 10.6 or newer. The lock was also used on FreeBSD older than 5.3, OpenBSD older than 201311 and NetBSD older than 4. Please open a new issue specific to macOS: specify your macOS version, your Python version and how you installed or built Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 13:03:15 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Feb 2021 18:03:15 +0000 Subject: [issue39853] Segmentation fault with urllib.request.urlopen and threads In-Reply-To: <1583347102.97.0.749597726143.issue39853@roundup.psfhosted.org> Message-ID: <1613671395.96.0.103455909085.issue39853@roundup.psfhosted.org> STINNER Victor added the comment: > For us it happens when using multiprocessing: the main process forks 2 processes and both use urlopen at roughly the same time. We are seeing this on Python 3.7.2 on macOS 10.14.3. >From what I understood, calling fork() (and then continue to execute regular Python code) is no longer safe in macOS 10.14 and must no longer be used. Only fork+exec is safe (spawn a new child process), but posix_spawn() is preferred on macOS. But I'm not a macOS expert. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 13:04:25 2021 From: report at bugs.python.org (David Edelsohn) Date: Thu, 18 Feb 2021 18:04:25 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613671465.28.0.380276039857.issue43179@roundup.psfhosted.org> David Edelsohn added the comment: gcc -m31 -dM -E - < /dev/null ---------- Added file: https://bugs.python.org/file49817/gcc-s390.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 13:04:58 2021 From: report at bugs.python.org (David Edelsohn) Date: Thu, 18 Feb 2021 18:04:58 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613671498.31.0.969363546186.issue43179@roundup.psfhosted.org> David Edelsohn added the comment: gcc -dM -E - < /dev/null ---------- Added file: https://bugs.python.org/file49818/gcc-s390x.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 13:04:53 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 18 Feb 2021 18:04:53 +0000 Subject: [issue43115] locale.getlocale fails if locale is set In-Reply-To: <1612359770.32.0.137300123748.issue43115@roundup.psfhosted.org> Message-ID: <1613671493.97.0.572146174769.issue43115@roundup.psfhosted.org> Eryk Sun added the comment: > The APIs were written at a time where locale modifiers > simply did mot exist. Technically, locale modifiers did exist circa 2000, but I suppose you mean that they were uncommon to the point of being unheard of at the time. The modifier field was specified in the X/Open Portability Guide Issue 3 (XPG3) in 1989, and again in XPG4 in 1992 as "language[_territory][.codeset][@modifier]". I can't provide links to the specifications (they're not freely available), but here's a link to X/Open "Internationalisation Guide Version 2" (1993), which defines the modifier field in section 5.1.2 (pages 88-89): https://pubs.opengroup.org/onlinepubs/009269599/toc.pdf > Support could be added via a special locale tuple return > object, which looks like 2-tuple, but comes with extra attributes > to store the modifier That's a good idea and worth implementing. But the _strptime and calendar modules have no need to call getlocale(LC_TIME). IMO, it adds fragility for no benefit. All they need to save is the result of setlocale(LC_TIME). Also, the default locale for calendar.LocaleTextCalendar has no need to use getdefaultlocale() instead of using an empty string, i.e. setlocale(LC_TIME, ""). The latter is simpler and more reliable. --- > support for Windows is only partial, due to the > completely different approach Windows' CRT took to locales. Using the same implementation for POSIX and Windows is needlessly complicated, and difficult to reason about how it behaves in all cases. I suggest implementing separate versions of normalize() and _parse_localename() for Windows, making use of direct queries via _winapi.GetLocaleInfoEx() (to be added). The mapping in encodings.aliases also needs comprehensive coverage for Windows code pages (e.g. cp20127 -> ascii, cp28591 -> latin_1, etc). A poor match should not be aliased, such as code page 20932 and euc_JP. (For all 3-byte sequences in standard euc-JP, code page 20932 encodes 2-byte sequences by dropping the lead byte and masking the third byte as ASCII.) If the locale string doesn't include a codeset, then normalize() shouldn't do anything to obtain one. It's not necessary in Windows. If there's a codeset, normalize() should ensure it's "UTF-8", "OCP", "ACP", or a Windows code page in the right form, e.g. "ascii" -> "20127". ucrt supports "ACP" and "OCP" codesets for the locale's ANSI and OEM code pages. These must be in uppercase, e.g. "hindi.acp" -> "hindi.ACP". ucrt will set the latter as "Hindi_India.utf8" (it's a Unicode-only locale), which should parse as ("Hindi_India", "UTF-8"). If the locale without the codeset isn't a valid Windows BCP-47 locale name, as determined by the NLS API, then normalize() should only care about case-insensitive normalization of "C" and "POSIX" as "C", e.g. "c" -> "C". No other normalization is necessary. ucrt supports case-insensitive "language[_country[.codepage]]" and ".codepage" forms, where language and country are either the full English names, LOCALE_SENGLISHLANGUAGENAME and LOCALE_SENGLISHCOUNTRYNAME, or 3-letter abbreviations, LOCALE_SABBREVLANGNAME and LOCALE_SABBREVCTRYNAME, such as "enu_USA". It also supports locale aliases such as "american[.codeset]". If the result isn't "C" or a BCP-47 locale name, ucrt setlocale() always returns the "language_country.codepage" form with full English names. A BCP-47 locale name such as "en" or "en_US" cannot be used with a codeset other than UTF-8. If no codeset is specified, ucrt implicitly uses the locale's ANSI code page. If a BCP-47 locale name is paired with a codeset that's neither the given locale's ANSI codepage nor UTF-8, then normalize it to the "language_country.codepage" form. For example, "fr_FR.latin-1" -> "French_France.28591". Parse the latter as ("French_France", "ISO-8859-1"). If a BCP-47 locale name is paired with the locale's ANSI code page, then normalize it without the code page, e.g. "sr_Latn_RS.cp1250" -> "sr_Latn_RS". Look up the locale's ANSI code page when parsing the latter, e.g. "sr_Latn_RS" -> ("sr_Latn_RS", "cp1250"). If a BCP-47 locale name is paired with UTF-8, then there isn't much to do other than normalize the locale name and encoding name, e.g. "en_us.utf8" -> "en_US.UTF-8". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 13:11:01 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Feb 2021 18:11:01 +0000 Subject: [issue18163] Add a 'key' attribute to KeyError In-Reply-To: <1370638316.1.0.167534610168.issue18163@psf.upfronthosting.co.za> Message-ID: <1613671861.31.0.659671753453.issue18163@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: -mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 13:11:35 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Feb 2021 18:11:35 +0000 Subject: [issue42686] include built-in Math functions in SQLite to 3.35.0 of march 2021 In-Reply-To: <1608391961.58.0.717857253057.issue42686@roundup.psfhosted.org> Message-ID: <1613671895.23.0.955449784533.issue42686@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: -mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 13:17:08 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Feb 2021 18:17:08 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613672228.02.0.283701144236.issue43179@roundup.psfhosted.org> STINNER Victor added the comment: I'm not sure why people insists to say that it's 31 bit CPU, gcc-s390.txt shows that it uses a classic 32-bit ABI (32-bit long/size_t): #define __SIZE_MAX__ 0xffffffffUL #define __LONG_WIDTH__ 32 31-bit is a limit of the address space (memory), not the ALU. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 13:19:35 2021 From: report at bugs.python.org (Gilles Duboscq) Date: Thu, 18 Feb 2021 18:19:35 +0000 Subject: [issue39853] Segmentation fault with urllib.request.urlopen and threads In-Reply-To: <1583347102.97.0.749597726143.issue39853@roundup.psfhosted.org> Message-ID: <1613672375.75.0.353859088174.issue39853@roundup.psfhosted.org> Gilles Duboscq added the comment: Thanks Victor we'll look into moving away from this pattern. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 13:20:43 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Feb 2021 18:20:43 +0000 Subject: [issue42990] Improve the C code for calling Python code: _PyEval_EvalCode() In-Reply-To: <1611245152.12.0.0348161555926.issue42990@roundup.psfhosted.org> Message-ID: <1613672443.64.0.512784307366.issue42990@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 44085a3fc9a150478aec1872dd1079c60dcc42f6 by Victor Stinner in branch 'master': bpo-42990: Refactor _PyFrame_New_NoTrack() (GH-24566) https://github.com/python/cpython/commit/44085a3fc9a150478aec1872dd1079c60dcc42f6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 13:33:05 2021 From: report at bugs.python.org (David Edelsohn) Date: Thu, 18 Feb 2021 18:33:05 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613673185.8.0.618130722348.issue43179@roundup.psfhosted.org> David Edelsohn added the comment: I am not aware of significant use of 31 bit mode. But I don't see the benefit of annoying and discouraging users who want to experiment with Python and with Linux on Z in 31 bit mode. Yes, maintenance theoretically is a burden, but there have been no recent issues that were specific to Linux on Z in 31 bit mode. In fact, most of the original Linux on Z support issues that I opened were endianness issues, which aren't ameliorated by removing 31 bit support. As others have expressed, deprecating 31 bit mode only removes the configuration option with no other code simplification. It seems that it would be better to leave the configuration alone until there actually was an unresolved issue that motivated removal. But I am not aware of any client requirement to continue the support. Leaving the 31 bit configuration unchanged is more about maintaining good will among the volunteers who are interested in the platform. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 13:36:25 2021 From: report at bugs.python.org (David Edelsohn) Date: Thu, 18 Feb 2021 18:36:25 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613673385.45.0.221651288901.issue43179@roundup.psfhosted.org> David Edelsohn added the comment: Victor: https://en.wikipedia.org/wiki/31-bit_computing :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 13:41:13 2021 From: report at bugs.python.org (Matej Cepl) Date: Thu, 18 Feb 2021 18:41:13 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613673673.23.0.643033861913.issue43179@roundup.psfhosted.org> Matej Cepl added the comment: > Do you actually know someone who is actively interested in the usecase of building a 32 bit python on an s390x system? Or do you know someone who owns an s390 system? Well, yes, I have just got it confirmed from our PM, SUSE has living and breathing (and what?s even more interesting, paying) clients using SLE-12 on s390 (i.e., s390x kernel with 32bit libraries). Of course, it doesn?t mean they are eager to run Python 3.10 in such configuration (how do you call such package? python3a so that ?python3a? > ?python39??), we will have to evaluate with them what are their plans in the post-36 world with the modern Python there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 13:42:49 2021 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Thu, 18 Feb 2021 18:42:49 +0000 Subject: [issue43255] Ceil division with /// operator In-Reply-To: <1613657884.47.0.693807596849.issue43255@roundup.psfhosted.org> Message-ID: <1613673769.08.0.400461050116.issue43255@roundup.psfhosted.org> Bo?tjan Mejak added the comment: The spaceship operator is kinda cool! :) Well, I was hoping to avoid importing the math module just to have ceil division capabilities. Anyway, my need for ceiling is that I am coding a chess GUI where I have a table with 2 columns and I create a new row whenever White makes a move. So, my implementation for row creation is math.ceil(len(moves) // 2) where moves is a list of chess moves. So, the sequence of table rows after White and Black make their moves is initially 0 (since there are no moves yet) and then 1 (first row created after White made a move) and then 1 (again on row 1 after Black made a move, but on column 2), then 2 2 3 3 4 4 5 5 6 6 and so on. If we had the ceil operator in Python, I could do: len(moves) /// 2 :) By the way -- do you happen to know any better idea to get that kind of a sequence? That is 0 1 1 2 2 3 3 4 4 5 5 6 6 and so on. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 13:47:57 2021 From: report at bugs.python.org (John Paul Adrian Glaubitz) Date: Thu, 18 Feb 2021 18:47:57 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613674077.28.0.648371821071.issue43179@roundup.psfhosted.org> John Paul Adrian Glaubitz added the comment: > But I don't see the benefit of annoying and discouraging users who want to experiment with Python and with Linux on Z in 31 bit mode. Fully agree. > Yes, maintenance theoretically is a burden, but there have been no recent issues that were specific to Linux on Z in 31 bit mode. As I have mentioned before, the Python interpreter in general has been very very unproblematic on any platform. The only real issue that I am aware of is that the testsuite can get stuck on machines with a large number of CPUs (we're seeing that on our SPARC T5 in Debian). > In fact, most of the original Linux on Z support issues that I opened were endianness issues, which aren't ameliorated by removing 31 bit support. And there is still MIPS-BE, PPC-BE, M68k, HPPA among other which are all big-endian. > As others have expressed, deprecating 31 bit mode only removes the configuration option with no other code simplification. Exactly my point. If it removed a considerable amount of code, I would actually see a point. But just removing a few lines of autoconf or preprocessor code makes no differences from a maintainer's point of view. > It seems that it would be better to leave the configuration alone until there actually was an unresolved issue that motivated removal. Jepp, fully agree. > But I am not aware of any client requirement to continue the support. Sure. But free software shouldn't be solely about commercial customers. If someone wants to play with Python on the s390 emulator Hercules, for example, upstream projects shouldn't be keeping them from doing that. > Leaving the 31 bit configuration unchanged is more about maintaining good will among the volunteers who are interested in the platform. Absolutely. And about not limiting choices when there is no technical argument for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 13:52:19 2021 From: report at bugs.python.org (Andre Roberge) Date: Thu, 18 Feb 2021 18:52:19 +0000 Subject: [issue18163] Add a 'key' attribute to KeyError In-Reply-To: <1370638316.1.0.167534610168.issue18163@psf.upfronthosting.co.za> Message-ID: <1613674339.49.0.606282418876.issue18163@roundup.psfhosted.org> Change by Andre Roberge : ---------- nosy: +aroberge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 13:53:09 2021 From: report at bugs.python.org (Josue Balandrano Coronel) Date: Thu, 18 Feb 2021 18:53:09 +0000 Subject: [issue43257] get_type_hints evaluates class variables before type hints Message-ID: <1613674389.7.0.662545627223.issue43257@roundup.psfhosted.org> New submission from Josue Balandrano Coronel : Using typing.get_type_hints() on classes returns the wrong value when a class variable has the same name as a type and a default value. For instance: from dataclasses import dataclass from typing import get_type_hints @dataclass class DataClassHints: str: str="asdf" >>> get_type_hints(DataClassHints) ... NameError: name 'asdf' is not defined Looks like get_type_hints() is using "asdf" as a type. This is more clear if we use something like datetime: from datetime import datetime class ClassHints: datetime: datetime=datetime.now() >>> get_type_hints(ClassHints) ... {'datetime': datetime.datetime(2021, 2, 18, 12, 40, 16, 966502) If we do the same thing in a method get_type_hints works correctly: class CorrectHints: def __init__(self, str: str="asdf", datetime: datetime=datetime.now()): self.str = str self.datetime = datetime >>> ch = CorrectHints() >>> ch.str ... 'asdf' >>> ch.datetime ... datetime.datetime(2021, 2, 18, 12, 41, 46, 214844) >>> get_type_hints(CorrectHints.__init__) ... {'str': str, 'datetime': datetime.datetime} Also functions work correctly: def func_type_hints(str: str="asdf", datetime: datetime=datetime.now()): return f"str: {str}, datetime: {datetime}" >>> func_type_hints() ... 'str: asdf, datetime: 2021-02-18 12:44:21.102933' >>> get_type_hints(func_type_hints) ... {'str': str, 'datetime': datetime.datetime} It looks like get_type_hints is evaluating the default value in a class variable before the type hint. Here's another way to replicate this issue to make it clearer: class EvalOrderHints: datetime = datetime.now() datetime: datetime >>> get_type_hints(EvalOrderHints) ... {'datetime': datetime.datetime(2021, 2, 18, 12, 47, 56, 608261)} >>> EvalOrderHints().datetime ... datetime.datetime(2021, 2, 18, 12, 47, 56, 608261) ---------- messages: 387266 nosy: xirdneh priority: normal severity: normal status: open title: get_type_hints evaluates class variables before type hints type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 14:02:07 2021 From: report at bugs.python.org (Tim Peters) Date: Thu, 18 Feb 2021 19:02:07 +0000 Subject: [issue43255] Ceil division with /// operator In-Reply-To: <1613657884.47.0.693807596849.issue43255@roundup.psfhosted.org> Message-ID: <1613674927.21.0.76728772569.issue43255@roundup.psfhosted.org> Tim Peters added the comment: (len(moves) + 1) // 2 ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 14:08:47 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Feb 2021 19:08:47 +0000 Subject: [issue43255] Ceil division with /// operator In-Reply-To: <1613657884.47.0.693807596849.issue43255@roundup.psfhosted.org> Message-ID: <1613675327.43.0.612479740993.issue43255@roundup.psfhosted.org> STINNER Victor added the comment: > Anyway, my need for ceiling is that I am coding a chess GUI where I have a table with 2 columns and I create a new row whenever White makes a move. So, my implementation for row creation is math.ceil(len(moves) // 2) where moves is a list of chess moves. You may like the new int.bit_count() attribute of Python 3.10 ;-) https://docs.python.org/dev/library/stdtypes.html#int.bit_count ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 14:42:20 2021 From: report at bugs.python.org (Dirkjan Ochtman) Date: Thu, 18 Feb 2021 19:42:20 +0000 Subject: [issue2142] difflib.unified_diff(...) produces invalid patches In-Reply-To: <1203365817.7.0.0998491412302.issue2142@psf.upfronthosting.co.za> Message-ID: <1613677340.97.0.635747387178.issue2142@roundup.psfhosted.org> Change by Dirkjan Ochtman : ---------- nosy: -djc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 15:41:28 2021 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Thu, 18 Feb 2021 20:41:28 +0000 Subject: [issue43255] Ceil division with /// operator In-Reply-To: <1613657884.47.0.693807596849.issue43255@roundup.psfhosted.org> Message-ID: <1613680888.21.0.207140201597.issue43255@roundup.psfhosted.org> Bo?tjan Mejak added the comment: My hat off to you, Mr. Peters! Your suggestion (len(moves) + 1) // 2 works perfectly and is much more elegant than --0-- len(moves) // 2. :) Mr. Stinner, in what way would int.bit_count() be beneficial to me? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 16:12:34 2021 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Feb 2021 21:12:34 +0000 Subject: [issue43255] Ceil division with /// operator In-Reply-To: <1613657884.47.0.693807596849.issue43255@roundup.psfhosted.org> Message-ID: <1613682754.2.0.773003277313.issue43255@roundup.psfhosted.org> STINNER Victor added the comment: > Mr. Stinner, in what way would int.bit_count() be beneficial to me? I found https://www.chessprogramming.org/Population_Count when I investigated the C implementation of _Py_popcount32(), which is used by int.bit_count(). I read it when I tried to document this surprising code: --- x = x - ((x >> 1) & 0x55555555); x = (x & 0x33333333) + ((x >> 2) & 0x33333333); x = (x + (x >> 4)) & 0x0F0F0F0F; return (uint32_t)((uint64_t)x * (uint64_t)0x01010101) >> 24; --- I reformatted it as: --- // 32-bit SWAR (SIMD Within A Register) popcount // Binary: 0 1 0 1 ... const uint32_t M1 = 0x55555555; // Binary: 00 11 00 11. .. const uint32_t M2 = 0x33333333; // Binary: 0000 1111 0000 1111 ... const uint32_t M4 = 0x0F0F0F0F; // 256**4 + 256**3 + 256**2 + 256**1 const uint32_t SUM = 0x01010101; // Put count of each 2 bits into those 2 bits x = x - ((x >> 1) & M1); // Put count of each 4 bits into those 4 bits x = (x & M2) + ((x >> 2) & M2); // Put count of each 8 bits into those 8 bits x = (x + (x >> 4)) & M4; // Sum of the 4 byte counts return (uint32_t)((uint64_t)x * (uint64_t)SUM) >> 24; --- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 16:18:08 2021 From: report at bugs.python.org (Erik Soma) Date: Thu, 18 Feb 2021 21:18:08 +0000 Subject: [issue42840] `type` takes **kwargs for __init_subclass__ In-Reply-To: <1609946481.51.0.225785046936.issue42840@roundup.psfhosted.org> Message-ID: <1613683088.39.0.732348191052.issue42840@roundup.psfhosted.org> Erik Soma added the comment: The CPython PR has gone stale waiting for core review, pinging this per the dev guide. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 16:57:14 2021 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 18 Feb 2021 21:57:14 +0000 Subject: [issue43257] get_type_hints evaluates class variables before type hints In-Reply-To: <1613674389.7.0.662545627223.issue43257@roundup.psfhosted.org> Message-ID: <1613685434.87.0.478235018801.issue43257@roundup.psfhosted.org> Change by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 17:21:00 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 18 Feb 2021 22:21:00 +0000 Subject: [issue43258] Prevent needless allocation of sqlite3 aggregate function context Message-ID: <1613686860.13.0.742108376023.issue43258@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : If no rows match an aggregate query, _pysqlite_step_callback() is never called, and _pysqlite_final_callback() is called once. In order to prevent needless context allocation, we should pass 0 as the second argument to sqlite3_aggregate_context(). Quoting from https://sqlite.org/c3ref/aggregate_context.html: Within the xFinal callback, it is customary to set N=0 in calls to sqlite3_aggregate_context(C,N) so that no pointless memory allocations occur. ---------- components: Library (Lib) messages: 387272 nosy: berker.peksag, erlendaasland, serhiy.storchaka priority: normal severity: normal status: open title: Prevent needless allocation of sqlite3 aggregate function context versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 17:25:28 2021 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 18 Feb 2021 22:25:28 +0000 Subject: [issue43115] locale.getlocale fails if locale is set In-Reply-To: <1613671493.97.0.572146174769.issue43115@roundup.psfhosted.org> Message-ID: Marc-Andre Lemburg added the comment: On 18.02.2021 19:04, Eryk Sun wrote: > > Eryk Sun added the comment: > >> The APIs were written at a time where locale modifiers >> simply did mot exist. > > Technically, locale modifiers did exist circa 2000, but I suppose you mean that they were uncommon to the point of being unheard of at the time. > > The modifier field was specified in the X/Open Portability Guide Issue 3 (XPG3) in 1989, and again in XPG4 in 1992 as "language[_territory][.codeset][@modifier]". I can't provide links to the specifications (they're not freely available), but here's a link to X/Open "Internationalisation Guide Version 2" (1993), which defines the modifier field in section 5.1.2 (pages 88-89): > > https://pubs.opengroup.org/onlinepubs/009269599/toc.pdf Thanks for the link. The standard may have already been defined in POSIX, but I'm pretty sure this was not a thing on the SuSE Linux system I was working off at the time :-) This is what glibc supported in 2000: https://sourceware.org/git/?p=glibc.git;a=blob;f=localedata/SUPPORTED;h=5ca1beb8eacbe5d86322cb2d015ec260422813d8;hb=1914953f71bf9ace1981d838b3777e473e63e8d1 vs. today: https://sourceware.org/git/?p=glibc.git;a=blob;f=localedata/SUPPORTED The first time I ever saw @modifiers in the wild was when the Euro symbol was introduced in preparation for Jan 1, 2002. Note that the encoding alias table in Python 2.0 does include an entry "utf8 at ucs4", which originated from the X11 local.alias file. Apparently those modifiers were already in use on Digital Unix at the time: https://github.com/freedesktop/xorg-libX11/blob/deae12c6b683898f5213992d561a59d4ea889cca/nls/locale.alias.pre (this is from 2003; couldn't find earlier references) It is interesting to see that the locale.alias.pre file actually did include Windows locale definitions. On Linux, those don't get compiled in, so I didn't get to see them :-) Also interesting is that they aliased e.g. cp1252 to ISO-8859-1, even though the two encodings are not the same. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 17:46:02 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 18 Feb 2021 22:46:02 +0000 Subject: [issue43258] Prevent needless allocation of sqlite3 aggregate function context In-Reply-To: <1613686860.13.0.742108376023.issue43258@roundup.psfhosted.org> Message-ID: <1613688362.33.0.141110245952.issue43258@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +23348 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24569 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 18:52:34 2021 From: report at bugs.python.org (Zackery Spytz) Date: Thu, 18 Feb 2021 23:52:34 +0000 Subject: [issue41847] Update "install launcher for all users" installer option In-Reply-To: <1600901127.12.0.836630425545.issue41847@roundup.psfhosted.org> Message-ID: <1613692354.34.0.812072451287.issue41847@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 4.0 -> 5.0 pull_requests: +23349 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/24570 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 19:49:34 2021 From: report at bugs.python.org (Neil Schemenauer) Date: Fri, 19 Feb 2021 00:49:34 +0000 Subject: [issue39448] Add regen-frozen makefile target In-Reply-To: <1579899167.9.0.743060780992.issue39448@roundup.psfhosted.org> Message-ID: <1613695774.72.0.348481058644.issue39448@roundup.psfhosted.org> Neil Schemenauer added the comment: New changeset ffa55d21b4a86ad8b4a43a9f597151e526541130 by Neil Schemenauer in branch 'master': bpo-39448: Add regen-frozen makefile target. (GH-18174) https://github.com/python/cpython/commit/ffa55d21b4a86ad8b4a43a9f597151e526541130 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 19:50:21 2021 From: report at bugs.python.org (Neil Schemenauer) Date: Fri, 19 Feb 2021 00:50:21 +0000 Subject: [issue39448] Add regen-frozen makefile target In-Reply-To: <1579899167.9.0.743060780992.issue39448@roundup.psfhosted.org> Message-ID: <1613695821.13.0.219187093469.issue39448@roundup.psfhosted.org> Change by Neil Schemenauer : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 20:53:57 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Feb 2021 01:53:57 +0000 Subject: [issue43254] Fix *snprintf() man page links In-Reply-To: <1613657207.71.0.865293132233.issue43254@roundup.psfhosted.org> Message-ID: <1613699637.2.0.620990854291.issue43254@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +23350 pull_request: https://github.com/python/cpython/pull/24571 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 20:53:52 2021 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 19 Feb 2021 01:53:52 +0000 Subject: [issue43254] Fix *snprintf() man page links In-Reply-To: <1613657207.71.0.865293132233.issue43254@roundup.psfhosted.org> Message-ID: <1613699632.6.0.234290667566.issue43254@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset e92d67dfbb4790df37aa6a0961fb6dc7e8d2fbbf by Erlend Egeberg Aasland in branch 'master': closes bpo-43254: Fix *snprintf() man page refs. (GH-24563) https://github.com/python/cpython/commit/e92d67dfbb4790df37aa6a0961fb6dc7e8d2fbbf ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 20:54:05 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Feb 2021 01:54:05 +0000 Subject: [issue43254] Fix *snprintf() man page links In-Reply-To: <1613657207.71.0.865293132233.issue43254@roundup.psfhosted.org> Message-ID: <1613699645.1.0.944832415018.issue43254@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +23351 pull_request: https://github.com/python/cpython/pull/24572 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 21:03:43 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Feb 2021 02:03:43 +0000 Subject: [issue43254] Fix *snprintf() man page links In-Reply-To: <1613657207.71.0.865293132233.issue43254@roundup.psfhosted.org> Message-ID: <1613700223.26.0.0842152292743.issue43254@roundup.psfhosted.org> miss-islington added the comment: New changeset 8a42eb1492dec2ec0cc79146f0c817acb7328b19 by Miss Islington (bot) in branch '3.8': closes bpo-43254: Fix *snprintf() man page refs. (GH-24563) https://github.com/python/cpython/commit/8a42eb1492dec2ec0cc79146f0c817acb7328b19 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 21:16:39 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Feb 2021 02:16:39 +0000 Subject: [issue43254] Fix *snprintf() man page links In-Reply-To: <1613657207.71.0.865293132233.issue43254@roundup.psfhosted.org> Message-ID: <1613700999.89.0.312300725571.issue43254@roundup.psfhosted.org> miss-islington added the comment: New changeset 138488750512b47f1773630f90e92ec5038b6978 by Miss Islington (bot) in branch '3.9': closes bpo-43254: Fix *snprintf() man page refs. (GH-24563) https://github.com/python/cpython/commit/138488750512b47f1773630f90e92ec5038b6978 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 21:28:41 2021 From: report at bugs.python.org (Christoph Anton Mitterer) Date: Fri, 19 Feb 2021 02:28:41 +0000 Subject: [issue43259] argparse: allow add_mutually_exclusive_group on add_argument_group Message-ID: <1613701721.93.0.742004676065.issue43259@roundup.psfhosted.org> New submission from Christoph Anton Mitterer : Hey. AFAIU, the sole purpose of ArgumentParser.add_argument_group() is for the grouping within the help output. It would be nice, if one could create a mutually exclusive group (with ArgumentParser.add_mutually_exclusive_group) from/within such a "normal" group, so that the mutually exclusive arguments are listed within the group, but are still, mutually exclusive. Right now when doing something like: parser = argparse.ArgumentParser() parser_group = parser.add_argument_group("INPUT OPTIONS") parser_group_mutually_exclusive = parser_group.add_mutually_exclusive_group(required=False) parser_group_mutually_exclusive.add_argument("--from-args") parser_group_mutually_exclusive.add_argument("--from-files") parser_group_mutually_exclusive.add_argument("--from-stdin") parser_group.add_argument("-0", help="null delimited pathnames") it works, but the mutually exclusive options are note printed within the "INPUT OPTIONS", but rather at the normal "optional arguments:" section of the help. The above example also kinda shows what this could be used for: - one might have e.g. a group for input options, and amongst that the mutually exclusive "--from-*" which specify the source of the input. Cheers, Chris. ---------- components: Library (Lib) messages: 387278 nosy: calestyo priority: normal severity: normal status: open title: argparse: allow add_mutually_exclusive_group on add_argument_group type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 21:54:18 2021 From: report at bugs.python.org (Inada Naoki) Date: Fri, 19 Feb 2021 02:54:18 +0000 Subject: [issue43246] Dict copy optimization violates subclass invariant In-Reply-To: <1613599952.95.0.0689652491879.issue43246@roundup.psfhosted.org> Message-ID: <1613703258.45.0.568323610787.issue43246@roundup.psfhosted.org> Inada Naoki added the comment: I am not sure this should be fixed. If so, I think we should use PyDict_CheckExact() instead of PyDict_Check() && (tp_iter is overridden || keys() is overridden || sq_item is overridden). ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 22:20:13 2021 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 19 Feb 2021 03:20:13 +0000 Subject: [issue42840] `type` takes **kwargs for __init_subclass__ In-Reply-To: <1609946481.51.0.225785046936.issue42840@roundup.psfhosted.org> Message-ID: <1613704813.29.0.478195605084.issue42840@roundup.psfhosted.org> Guido van Rossum added the comment: I'll try to review it in the coming weeks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 23:06:54 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 19 Feb 2021 04:06:54 +0000 Subject: [issue41847] Update "install launcher for all users" installer option In-Reply-To: <1600901127.12.0.836630425545.issue41847@roundup.psfhosted.org> Message-ID: <1613707614.09.0.71703457884.issue41847@roundup.psfhosted.org> Eryk Sun added the comment: > but at least for clean installs of 3.10 we can avoid the need > for admin completely Except updating PATHEXT always requires admin access. I do this manually by setting a user PATHEXT variable with %PATHEXT% as the first item and append the extensions that I need. This is okay because the system environment gets populated before the user environment, and a system environment that doesn't define PATHEXT is improperly configured. I don't know whether WiX/MSI can support this, but it's probably not worth the hassle and potential problems. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 18 23:42:35 2021 From: report at bugs.python.org (hai shi) Date: Fri, 19 Feb 2021 04:42:35 +0000 Subject: [issue43259] argparse: allow add_mutually_exclusive_group on add_argument_group In-Reply-To: <1613701721.93.0.742004676065.issue43259@roundup.psfhosted.org> Message-ID: <1613709755.22.0.458169224597.issue43259@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +paul.j3, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 00:27:20 2021 From: report at bugs.python.org (Ramin Farajpour Cami) Date: Fri, 19 Feb 2021 05:27:20 +0000 Subject: [issue43260] Never release buffer when MemoryError in prtin() Message-ID: <1613712440.26.0.95537936361.issue43260@roundup.psfhosted.org> New submission from Ramin Farajpour Cami : Hi, When we use "a"*10000000000 in print("a"*10000000000) function, Show "MemoryError",Again i use print("1") again display "MemoryError", I think memory not release for use again, >>> print("a"*1000000000) Traceback (most recent call last): File "", line 1, in MemoryError >>> print("1") Traceback (most recent call last): File "", line 1, in MemoryError When i exit() python interpeter, and again print("1") it's work. And I test in linux its' work: >>> print("a"*1000000000) Traceback (most recent call last): File "", line 1, in MemoryError >>> print("1") 1 >>> print("a") a >>> Thanks. Ramin ---------- components: Windows messages: 387282 nosy: Ramin Farajpour Cami, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Never release buffer when MemoryError in prtin() versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 00:28:57 2021 From: report at bugs.python.org (Ramin Farajpour Cami) Date: Fri, 19 Feb 2021 05:28:57 +0000 Subject: [issue43260] Never release buffer when MemoryError in print() In-Reply-To: <1613712440.26.0.95537936361.issue43260@roundup.psfhosted.org> Message-ID: <1613712537.11.0.770145820488.issue43260@roundup.psfhosted.org> Change by Ramin Farajpour Cami : ---------- title: Never release buffer when MemoryError in prtin() -> Never release buffer when MemoryError in print() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 00:54:42 2021 From: report at bugs.python.org (paul j3) Date: Fri, 19 Feb 2021 05:54:42 +0000 Subject: [issue43259] argparse: allow add_mutually_exclusive_group on add_argument_group In-Reply-To: <1613701721.93.0.742004676065.issue43259@roundup.psfhosted.org> Message-ID: <1613714082.26.0.861889426909.issue43259@roundup.psfhosted.org> paul j3 added the comment: The mutually exclusive arguments are displayed with in the argument group, at least in my testing. From a copy-n-paste of your example: In [8]: parser.print_help() usage: ipython3 [-h] [--from-args FROM_ARGS | --from-files FROM_FILES | --from-stdin FROM_STDIN] [-0 0] optional arguments: -h, --help show this help message and exit INPUT OPTIONS: --from-args FROM_ARGS --from-files FROM_FILES --from-stdin FROM_STDIN -0 0 null delimited pathnames I've had occasion to note that this is the only kind of group nesting that works (or makes sense). In add_container_actions, there is a comment: # add container's mutually exclusive groups # NOTE: if add_mutually_exclusive_group ever gains title= and # description= then this code will need to be expanded as above So the original developer envisioned giving a mutually exclusive group a formatting role, but with this nesting this isn't needed (that I can tell). But I don't think this has been documented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 00:59:56 2021 From: report at bugs.python.org (Hamza AVvan) Date: Fri, 19 Feb 2021 05:59:56 +0000 Subject: [issue43223] [security] http.server: Open Redirection if the URL path starts with // In-Reply-To: <1613302956.91.0.878390782912.issue43223@roundup.psfhosted.org> Message-ID: <1613714396.09.0.53261998931.issue43223@roundup.psfhosted.org> Hamza AVvan added the comment: As for the directory issue, not only .ssh but an attacker can use any directory to make the open redirection exploitable. And as for the HTTP Header Location, the server does not remove extra trailing slash from the PAYLOAD uri, which seems to be the cause of vulnerability getting exploited. http://127.0.0.1:8000//attacker.com/..%2f..%2f..%2f..%2f..%2f../%0a%0d/../.ssh So I believe the server should check for multiple slashes and remove them from the path. Additionally, as you've mentioned it should also prepend the host:port/ to the new_url variable before writing the HTTP Header Location because if an attacker bypasses the protection and add an extra slash the server will still redirect to the host which is getting inserted into the Location header. But honestly I need your opinion as concatenating host to the url may lead to Host Header Injection but it'll then require a different context. Please watch the POC video. POC Video: https://youtu.be/rLfOoEu1XXg ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 01:36:00 2021 From: report at bugs.python.org (Svyatoslav) Date: Fri, 19 Feb 2021 06:36:00 +0000 Subject: [issue43261] Python 3.9 repair on Windows do not recover pip module Message-ID: <1613716560.59.0.602550864554.issue43261@roundup.psfhosted.org> New submission from Svyatoslav : I by mistake run command `pip install -U pip setuptools wheel` on Windows which deleted pip and did not install a new version. I decided to repair Python using 3.9.1 installer option. But after repair pip still was not installed. ---------- components: Windows messages: 387285 nosy: Prometheus3375, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Python 3.9 repair on Windows do not recover pip module type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 01:39:48 2021 From: report at bugs.python.org (Ramin Farajpour Cami) Date: Fri, 19 Feb 2021 06:39:48 +0000 Subject: [issue43260] Never release buffer when MemoryError in print() In-Reply-To: <1613712440.26.0.95537936361.issue43260@roundup.psfhosted.org> Message-ID: <1613716788.36.0.587386085422.issue43260@roundup.psfhosted.org> Ramin Farajpour Cami added the comment: Version : Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:43:08) [MSC v.1926 32 bit (Intel)] on win32 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 01:45:44 2021 From: report at bugs.python.org (Ramin Farajpour Cami) Date: Fri, 19 Feb 2021 06:45:44 +0000 Subject: [issue43260] Never release buffer when MemoryError in print() In-Reply-To: <1613712440.26.0.95537936361.issue43260@roundup.psfhosted.org> Message-ID: <1613717144.23.0.365304992975.issue43260@roundup.psfhosted.org> Ramin Farajpour Cami added the comment: Python 3.9.1 (tags/v3.9.1:1e5d33e, Dec 7 2020, 16:33:24) [MSC v.1928 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> print("a"*1000000000) Traceback (most recent call last): File "", line 1, in MemoryError >>> print("1") Traceback (most recent call last): File "", line 1, in MemoryError >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 01:47:59 2021 From: report at bugs.python.org (Jinghao Shi) Date: Fri, 19 Feb 2021 06:47:59 +0000 Subject: [issue43262] "_weakrefset.py", line 56: IndexError: pop from empty list Message-ID: <1613717279.64.0.759786918974.issue43262@roundup.psfhosted.org> New submission from Jinghao Shi : One of our asyncio based application sporadically crash due to this stack trace: ``` File ".../lib/python3.8/asyncio/runners.py", line 48, in run loop.run_until_complete(loop.shutdown_asyncgens()) File ".../lib/python3.8/asyncio/base_events.py", line 595, in run_until_complete future = tasks.ensure_future(future, loop=self) File ".../lib/python3.8/asyncio/tasks.py", line 669, in ensure_future task = loop.create_task(coro_or_future) File ".../lib/python3.8/asyncio/base_events.py", line 431, in create_task task = tasks.Task(coro, loop=self, name=name) File ".../lib/python3.8/_weakrefset.py", line 83, in add self._commit_removals() File ".../lib/python3.8/_weakrefset.py", line 56, in _commit_removals discard(l.pop()) IndexError: pop from empty list ``` We do not have a reliable repro. From reading the source code, it appears we should never try to pop from empty list: ``` def _commit_removals(self): l = self._pending_removals discard = self.data.discard while l: discard(l.pop()) # <-- HERE ``` ---------- components: asyncio messages: 387288 nosy: asvetlov, jhshi89, yselivanov priority: normal severity: normal status: open title: "_weakrefset.py", line 56: IndexError: pop from empty list type: crash versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 01:48:56 2021 From: report at bugs.python.org (Ramin Farajpour Cami) Date: Fri, 19 Feb 2021 06:48:56 +0000 Subject: [issue43260] Never release buffer when MemoryError in print() In-Reply-To: <1613712440.26.0.95537936361.issue43260@roundup.psfhosted.org> Message-ID: <1613717336.4.0.963210254593.issue43260@roundup.psfhosted.org> Change by Ramin Farajpour Cami : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 01:52:54 2021 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Fri, 19 Feb 2021 06:52:54 +0000 Subject: [issue34013] Inconsistent SyntaxError for print In-Reply-To: <1530380578.04.0.56676864532.issue34013@psf.upfronthosting.co.za> Message-ID: <1613717574.18.0.751377547113.issue34013@roundup.psfhosted.org> Vedran ?a?i? added the comment: Aren't we overthinking this? Python 2 is a dead language. It has reached end of life more than a year ago (and was scheduled to do so in 2015). Why are we still trying to accomodate something that stopped being relevant a long time ago? ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 01:57:48 2021 From: report at bugs.python.org (Ammar Askar) Date: Fri, 19 Feb 2021 06:57:48 +0000 Subject: [issue34013] Inconsistent SyntaxError for print In-Reply-To: <1530380578.04.0.56676864532.issue34013@psf.upfronthosting.co.za> Message-ID: <1613717868.13.0.104513465247.issue34013@roundup.psfhosted.org> Ammar Askar added the comment: It's still one of the most common beginner mistakes, personally I think the trade-off in complexity at least for the grammar level fix is worth it here. ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 02:43:52 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Feb 2021 07:43:52 +0000 Subject: [issue34013] Inconsistent SyntaxError for print In-Reply-To: <1530380578.04.0.56676864532.issue34013@psf.upfronthosting.co.za> Message-ID: <1613720632.71.0.474076022293.issue34013@roundup.psfhosted.org> Terry J. Reedy added the comment: 'Consistency' is in the eye of the beholder in that it is relative to some ideal. 'Inconsistent' has too much baggage as bad'. I would prefer to call the current rule 'restricted' or 'limited' and judge any expansion on its own merits. The arguments to print can take an unbounded amount of space. So a general message "Did you mean print()?" could also be indefinitely long. I don't think this is a good idea. Of course, the same applies to a single literal, especially multiline string literals. But at least the latter are currently clipped to only the first line in the message. >>> print '''first line second line''' SyntaxError: Missing parentheses in call to 'print'. Did you mean print('''first line)? (The above would be better with trailing ... .) This abbreviation would be harder with multiple arguments. The special message is for beginners. They might print a literal or name without ()s more frequently. I not sure that they need the reminder with every mistake. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 03:14:28 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 19 Feb 2021 08:14:28 +0000 Subject: [issue34013] Inconsistent SyntaxError for print In-Reply-To: <1530380578.04.0.56676864532.issue34013@psf.upfronthosting.co.za> Message-ID: <1613722468.76.0.536700949348.issue34013@roundup.psfhosted.org> Irit Katriel added the comment: I agree with Terry?s point about printing long expressions in the error msg. Perhaps just the preamble would be useful though: SyntaxError: Missing parentheses in call to 'print'. Instead of just SyntaxError: invalid syntax. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 03:19:06 2021 From: report at bugs.python.org (twoone3) Date: Fri, 19 Feb 2021 08:19:06 +0000 Subject: [issue43263] threading module unable to run Message-ID: <1613722745.98.0.253058139819.issue43263@roundup.psfhosted.org> New submission from twoone3 <3197653242 at qq.com>: When I use embedded Python to import and use threading module,The program will hang,I tested it in versions 3.6.5 and 3.9.1. ---------- components: C API messages: 387293 nosy: twoone3 priority: normal severity: normal status: open title: threading module unable to run versions: Python 3.6, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 03:47:12 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 19 Feb 2021 08:47:12 +0000 Subject: [issue43263] threading module unable to run In-Reply-To: <1613722745.98.0.253058139819.issue43263@roundup.psfhosted.org> Message-ID: <1613724432.56.0.976945934301.issue43263@roundup.psfhosted.org> Ronald Oussoren added the comment: Please add more information about what you're doing. Your report does not contain enough information to try to reproduce the problem. This is supposed to work just fine, and does work for me. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 03:55:42 2021 From: report at bugs.python.org (Tobiichi) Date: Fri, 19 Feb 2021 08:55:42 +0000 Subject: [issue43264] Nested EventProxy in ListProxy cause FileNotFoundError: [Errno 2] No such file or directory problem Message-ID: <1613724942.01.0.259421151252.issue43264@roundup.psfhosted.org> New submission from Tobiichi <754785103 at qq.com>: I append EventProxy into ListProxy like this: ``` l = manager.list([mp.Event() for _ in range(2)]) ``` It works fine on a single node when I'm trying to get this listproxy. but when I trying to use multiple nodes across ethernet. it cause problem like this: ``` Traceback (most recent call last): File "client2.py", line 30, in logic(manager) File "client2.py", line 18, in logic if l[i].is_set(): File "", line 2, in __getitem__ File "/home/think/anaconda3/envs/AC/lib/python3.7/multiprocessing/managers.py", line 819, in _callmethod kind, result = conn.recv() File "/home/think/anaconda3/envs/AC/lib/python3.7/multiprocessing/connection.py", line 251, in recv return _ForkingPickler.loads(buf.getbuffer()) File "/home/think/anaconda3/envs/AC/lib/python3.7/multiprocessing/managers.py", line 943, in RebuildProxy return func(token, serializer, incref=incref, **kwds) File "/home/think/anaconda3/envs/AC/lib/python3.7/multiprocessing/managers.py", line 793, in __init__ self._incref() File "/home/think/anaconda3/envs/AC/lib/python3.7/multiprocessing/managers.py", line 847, in _incref conn = self._Client(self._token.address, authkey=self._authkey) File "/home/think/anaconda3/envs/AC/lib/python3.7/multiprocessing/connection.py", line 492, in Client c = SocketClient(address) File "/home/think/anaconda3/envs/AC/lib/python3.7/multiprocessing/connection.py", line 620, in SocketClient s.connect(address) ``` Nest ListProxy will cause same problem. like ``` l = manager.list([manager.list([1 for _ in range(2)])for _ in range(2)]) ``` Client act like this (manager in torch is SyncManager): ``` import torch.multiprocessing as mp mp.current_process().authkey = b'abc' def start_client(manager, host, port, key): manager.register('get_list') manager.__init__(address=(host, port), authkey=key) manager.connect() return manager def logic(manager): l = manager.get_list() for i in range(len(l)): if not l[i].is_set(): l[i].set() print('set') if __name__=='__main__': manager = mp.Manager() manager = start_client(manager, '127.0.0.1', 5000, b'abc') logic(manager) ``` ---------- files: server.py messages: 387295 nosy: show-me-code priority: normal severity: normal status: open title: Nested EventProxy in ListProxy cause FileNotFoundError: [Errno 2] No such file or directory problem type: crash versions: Python 3.6 Added file: https://bugs.python.org/file49819/server.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 03:56:44 2021 From: report at bugs.python.org (Tobiichi) Date: Fri, 19 Feb 2021 08:56:44 +0000 Subject: [issue43264] Nested EventProxy in ListProxy cause FileNotFoundError: [Errno 2] No such file or directory problem In-Reply-To: <1613724942.01.0.259421151252.issue43264@roundup.psfhosted.org> Message-ID: <1613725004.31.0.842779057975.issue43264@roundup.psfhosted.org> Change by Tobiichi <754785103 at qq.com>: Added file: https://bugs.python.org/file49820/client1.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 04:02:16 2021 From: report at bugs.python.org (Tobiichi) Date: Fri, 19 Feb 2021 09:02:16 +0000 Subject: [issue43264] ListProxy with EventProxy in caused FileNotFoundError: [Errno 2] No such file or directory problem In-Reply-To: <1613724942.01.0.259421151252.issue43264@roundup.psfhosted.org> Message-ID: <1613725336.57.0.924284092901.issue43264@roundup.psfhosted.org> Change by Tobiichi <754785103 at qq.com>: ---------- title: Nested EventProxy in ListProxy cause FileNotFoundError: [Errno 2] No such file or directory problem -> ListProxy with EventProxy in caused FileNotFoundError: [Errno 2] No such file or directory problem _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 04:02:39 2021 From: report at bugs.python.org (twoone3) Date: Fri, 19 Feb 2021 09:02:39 +0000 Subject: [issue43263] threading module unable to run In-Reply-To: <1613722745.98.0.253058139819.issue43263@roundup.psfhosted.org> Message-ID: <1613725359.11.0.799610040449.issue43263@roundup.psfhosted.org> twoone3 <3197653242 at qq.com> added the comment: I use cpython to running .py file,the file created a new thread,but the exe can't continue to run ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 04:10:02 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 19 Feb 2021 09:10:02 +0000 Subject: [issue43265] Improve sqlite3 backup error handling Message-ID: <1613725802.16.0.516336537835.issue43265@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : There are some issues with the error handling in pysqlite_connection_backup_impl(): 1. ValueError is returned if the target connection equals source connection. Should be OperationalError, IMHO. 2. The aforementioned check is already performed by sqlite3_backup_init(), so we should just let SQLite take care of it and let _pysqlite_seterror() set the error if sqlite3_backup_init() returns NULL. This will also take care of 1. 3. The following comment seems to be wrong; errors are set on the connection object, not on the backup handle: /* We cannot use _pysqlite_seterror() here because the backup APIs do not set the error status on the connection object, but rather on the backup handle. */ After sqlite3_backup_finish(), we can just check the return code, and call _pysqlite_seterror() on the connection and return NULL. The mentioned comment can be removed. Resolving these issues will save 18 lines of code, and make the backup function easier to maintain. Berker? ---------- components: Library (Lib) messages: 387297 nosy: berker.peksag, erlendaasland priority: normal severity: normal status: open title: Improve sqlite3 backup error handling type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 04:21:37 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 19 Feb 2021 09:21:37 +0000 Subject: [issue43266] "String conversion and formatting" formatting messes up array subscripting Message-ID: <1613726497.48.0.989705999924.issue43266@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : str[size-1] is rendered incorrectly in https://docs.python.org/3.10/c-api/conversion.html The original intent was probably to apply italics to the variables names only. This can be fixed by prefixing the first bracket with a backslash. However, that results in the italic text crashing with the bracket. I suggest to just use ``str[size-1]``. Also applies to str[rv] in the same section. ---------- assignee: docs at python components: Documentation messages: 387298 nosy: docs at python, erlendaasland priority: normal severity: normal status: open title: "String conversion and formatting" formatting messes up array subscripting versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 04:22:00 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 19 Feb 2021 09:22:00 +0000 Subject: [issue43266] "String conversion and formatting" formatting messes up array subscripting In-Reply-To: <1613726497.48.0.989705999924.issue43266@roundup.psfhosted.org> Message-ID: <1613726520.99.0.649088314063.issue43266@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +23352 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24573 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 04:38:56 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 19 Feb 2021 09:38:56 +0000 Subject: [issue43260] Never release buffer when MemoryError in print() In-Reply-To: <1613712440.26.0.95537936361.issue43260@roundup.psfhosted.org> Message-ID: <1613727536.84.0.00625112763705.issue43260@roundup.psfhosted.org> Eryk Sun added the comment: The sys.stdout TextIOWrapper is stuck in a bad state. When the write() method is called with an ASCII string, it implements an optimization that stores a reference to the str() object in the internal pending_bytes instead of immediately encoding the string. Subsequently _textiowrapper_writeflush() attempts to create a bytes object for this ASCII string, but PyBytes_FromStringAndSize fails with a memory error. It's stuck in this state because it will never be able to flush the string. The first workaround I thought of was to call to detach() to rewrap sys.stdout.buffer with a new TextIOWrapper instance, but detach() attempts to flush and fails. A hacky but simple and effective workaround is to just re-initialize the wrapper. For example: sys.stdout.__init__(sys.stdout.buffer, sys.stdout.encoding, sys.stdout.errors, None, True) This clears the internal pending_bytes. ---------- components: +IO nosy: +eryksun priority: normal -> high versions: +Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 04:58:23 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 19 Feb 2021 09:58:23 +0000 Subject: [issue43260] Never release buffer when MemoryError in print() In-Reply-To: <1613712440.26.0.95537936361.issue43260@roundup.psfhosted.org> Message-ID: <1613728703.1.0.616123249832.issue43260@roundup.psfhosted.org> Eryk Sun added the comment: Issue 36748 added the ASCII optimization in write(), so I'm adding Inada Naoki to the nosy list. ---------- nosy: +methane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 05:24:53 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 19 Feb 2021 10:24:53 +0000 Subject: [issue43251] sqlite3_column_name() failures should raise MemoryError In-Reply-To: <1613647354.29.0.206061609144.issue43251@roundup.psfhosted.org> Message-ID: <1613730293.46.0.90525236915.issue43251@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- title: sqlite3_column_name() failures should call PyErr_NoMemory() -> sqlite3_column_name() failures should raise MemoryError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 05:29:44 2021 From: report at bugs.python.org (suresh) Date: Fri, 19 Feb 2021 10:29:44 +0000 Subject: [issue43175] filecmp is not working for UTF-8 BOM file. In-Reply-To: <1612848997.29.0.320825258569.issue43175@roundup.psfhosted.org> Message-ID: <1613730584.29.0.543254427201.issue43175@roundup.psfhosted.org> suresh added the comment: I am getting same file size and are regular files (True) as below. Could you assist on filecmp any changes required in passing the inputs. Since it returns false. Code: >>> os.chdir(r'C:\Users\suresh.n\Files') >>> open('source.css', 'rb').read() == open('destination.css','rb').read() True >>> for f in ('source.css', 'destination.css'): ... print(f, os.path.isfile(f), os.path.getsize(f)) source.css True 37465 destination.css True 37465 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 05:45:36 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 19 Feb 2021 10:45:36 +0000 Subject: [issue43267] [sqlite3] Redundant type checks in pysqlite_statement_bind_parameter() Message-ID: <1613731536.26.0.545379664561.issue43267@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : The type checks at the start of pysqlite_statement_bind_parameter() are redundant: We first check for exact types (*_CheckExact()), and then we check again for exact or subtyped versions (*_Check()). (Adding to the redundantness: the result of this if..else "switch statement" is then reused as the expression in the subsequent switch statement.) Suggesting to remove the redundant checks and merge the two switch statements. ---------- components: Library (Lib) messages: 387302 nosy: berker.peksag, erlendaasland priority: normal severity: normal status: open title: [sqlite3] Redundant type checks in pysqlite_statement_bind_parameter() type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 05:55:52 2021 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 19 Feb 2021 10:55:52 +0000 Subject: [issue43263] threading module unable to run In-Reply-To: <1613722745.98.0.253058139819.issue43263@roundup.psfhosted.org> Message-ID: <1613732152.82.0.239996544934.issue43263@roundup.psfhosted.org> Mark Dickinson added the comment: Sorry, but as Ronald says there's not nearly enough information here. Some questions: - What do you mean by "embedded Python"? - What is "the exe" that you refer to in your second mesasge? Is that python.exe? Is that an executable you compiled from your Python code somehow? If so, how? - What operating system are you using? - What exact version of Python are you using, and where did you get it from? (Conda? python.org install? OS package manager? Pre-installed?) - What other dependencies are you using? Any 3rd party packages? - What's the exact Python code that you're running? (Please attach all the Python code, preferably after first reducing to a minimal example that exhibits the issue.) - What are the precise steps you used to invoke the Python code? (Are you running as a script from a command-line prompt? Interactively in IDLE / PyCharm / VS Code / some other IDE?) - What exactly happened? - What did you expect to happen, and why? - What steps have you taken to eliminate the possibility that this is a bug in your own code rather than in Python? These notes may help: https://www.chiark.greenend.org.uk/~sgtatham/bugs.html ---------- components: +Library (Lib) -C API nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 06:15:08 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 11:15:08 +0000 Subject: [issue42990] Improve the C code for calling Python code: _PyEval_EvalCode() In-Reply-To: <1611245152.12.0.0348161555926.issue42990@roundup.psfhosted.org> Message-ID: <1613733308.94.0.549749426794.issue42990@roundup.psfhosted.org> STINNER Victor added the comment: I rephrased PR 24564 to clarify the scope of the incompatible change: in practice, only the types.FunctionType constructor changes. Defining functions in Python using "def function(...): ...", eval(code, {}) and exec(code, {}) are not affected. eval() and exec() already inherit the current builtins if globals does not contain "__builtins__" key. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 06:21:03 2021 From: report at bugs.python.org (Berker Peksag) Date: Fri, 19 Feb 2021 11:21:03 +0000 Subject: [issue43258] Prevent needless allocation of sqlite3 aggregate function context In-Reply-To: <1613686860.13.0.742108376023.issue43258@roundup.psfhosted.org> Message-ID: <1613733663.06.0.778080141945.issue43258@roundup.psfhosted.org> Berker Peksag added the comment: New changeset 979b23cbe44071b056ff524c0aa20e5d9794b5b0 by Erlend Egeberg Aasland in branch 'master': bpo-43258: Don't allocate sqlite3 aggregate context for empty queries (GH-24569) https://github.com/python/cpython/commit/979b23cbe44071b056ff524c0aa20e5d9794b5b0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 06:29:08 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 19 Feb 2021 11:29:08 +0000 Subject: [issue43258] Prevent needless allocation of sqlite3 aggregate function context In-Reply-To: <1613686860.13.0.742108376023.issue43258@roundup.psfhosted.org> Message-ID: <1613734148.13.0.556690201945.issue43258@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +23353 pull_request: https://github.com/python/cpython/pull/24574 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 06:29:58 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 11:29:58 +0000 Subject: [issue42990] Improve the C code for calling Python code: _PyEval_EvalCode() In-Reply-To: <1611245152.12.0.0348161555926.issue42990@roundup.psfhosted.org> Message-ID: <1613734198.1.0.274547193085.issue42990@roundup.psfhosted.org> STINNER Victor added the comment: Updated PR documentation: --- The types.FunctionType constructor now inherits the current builtins if the globals parameter is used and the globals dictionary has no "__builtins__" key, rather than rather than using {"None": None} as builtins: same behavior than eval() and exec() functions. Defining a function with "def function(...): ..." in Python is not affected, globals cannot be overriden with this syntax: it also inherits the current builtins. --- This PR makes FunctionType makes more consistent with other Python functions. Also, it doesn't prevent people to attempt building a "sandbox", it remains possible to override __builtins__ in FunctionType, eval(), exec(), etc. Usally, such sandbox pass a modified builtins namespace to eval() and exec() and the functions simply inherit it, functions defines with "def function(...): ..." and functions created with types.FunctionType constructor: my PR only impacts a very specific case, when types.FunctionType is called with a different globals dictionary which has no "__builtins__" key. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 06:50:56 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 11:50:56 +0000 Subject: [issue40522] [subinterpreters] Get the current Python interpreter state from Thread Local Storage (autoTSSkey) In-Reply-To: <1588698734.65.0.223552100195.issue40522@roundup.psfhosted.org> Message-ID: <1613735456.68.0.553065493385.issue40522@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +23354 pull_request: https://github.com/python/cpython/pull/24575 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 06:53:47 2021 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Fri, 19 Feb 2021 11:53:47 +0000 Subject: [issue34013] Inconsistent SyntaxError for print In-Reply-To: <1530380578.04.0.56676864532.issue34013@psf.upfronthosting.co.za> Message-ID: <1613735627.73.0.144008033684.issue34013@roundup.psfhosted.org> Vedran ?a?i? added the comment: > "It's still one of the most common beginner mistakes" Do you have any data to back this up? I really think it's overblown. On the other hand, if it really _is_ so, how about changing the language? It wouldn't be the first thing that was changed for Py3, and then changed back once people realized the old way was better. It seems to me totally backwards to have a construct in the grammar, only to report it as an error. "I understand you, but you still have to use _this_ way to write what you want." I really think Python shouldn't be that kind of language. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 06:59:23 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 11:59:23 +0000 Subject: [issue43268] [internals] Pass the current interpreter (interp) rather than the current Python thread state (state) Message-ID: <1613735963.3.0.941946997765.issue43268@roundup.psfhosted.org> New submission from STINNER Victor : I modified many internal C functions to pass the current Python thread state (tstate), but in practice, only the current interpreter (interp) is needed. ---------- components: Interpreter Core messages: 387308 nosy: vstinner priority: normal severity: normal status: open title: [internals] Pass the current interpreter (interp) rather than the current Python thread state (state) versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 06:59:37 2021 From: report at bugs.python.org (Berker Peksag) Date: Fri, 19 Feb 2021 11:59:37 +0000 Subject: [issue43258] Prevent needless allocation of sqlite3 aggregate function context In-Reply-To: <1613686860.13.0.742108376023.issue43258@roundup.psfhosted.org> Message-ID: <1613735977.42.0.133853392227.issue43258@roundup.psfhosted.org> Berker Peksag added the comment: New changeset 2bb0bf4dd8c0bd4d23eb04afce1a5eeee8e07982 by Erlend Egeberg Aasland in branch 'master': bpo-43258: Make sqlite3 callback functions static (GH-24574) https://github.com/python/cpython/commit/2bb0bf4dd8c0bd4d23eb04afce1a5eeee8e07982 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 06:59:49 2021 From: report at bugs.python.org (Berker Peksag) Date: Fri, 19 Feb 2021 11:59:49 +0000 Subject: [issue43258] Prevent needless allocation of sqlite3 aggregate function context In-Reply-To: <1613686860.13.0.742108376023.issue43258@roundup.psfhosted.org> Message-ID: <1613735989.39.0.942657715769.issue43258@roundup.psfhosted.org> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 07:00:31 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 12:00:31 +0000 Subject: [issue43268] [internals] Pass the current interpreter (interp) rather than the current Python thread state (state) In-Reply-To: <1613735963.3.0.941946997765.issue43268@roundup.psfhosted.org> Message-ID: <1613736031.52.0.0731992949393.issue43268@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +23355 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24576 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 07:01:48 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 12:01:48 +0000 Subject: [issue43268] [internals] Pass the current interpreter (interp) rather than the current Python thread state (state) In-Reply-To: <1613735963.3.0.941946997765.issue43268@roundup.psfhosted.org> Message-ID: <1613736108.06.0.410472216881.issue43268@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +23356 pull_request: https://github.com/python/cpython/pull/24577 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 07:05:57 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 19 Feb 2021 12:05:57 +0000 Subject: [issue43269] [sqlite3] Clean up function scoping Message-ID: <1613736357.16.0.00586339940376.issue43269@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : There's a lot of file scoped functions without the static storage-class specifier. All file local functions should have the static storage-class specifier. ---------- components: Library (Lib) messages: 387310 nosy: berker.peksag, erlendaasland priority: normal severity: normal status: open title: [sqlite3] Clean up function scoping type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 07:12:14 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 19 Feb 2021 12:12:14 +0000 Subject: [issue43269] [sqlite3] Clean up function scoping In-Reply-To: <1613736357.16.0.00586339940376.issue43269@roundup.psfhosted.org> Message-ID: <1613736734.1.0.484268610404.issue43269@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +23357 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24578 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 07:21:31 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 12:21:31 +0000 Subject: [issue43268] [internals] Pass the current interpreter (interp) rather than the current Python thread state (state) In-Reply-To: <1613735963.3.0.941946997765.issue43268@roundup.psfhosted.org> Message-ID: <1613737291.23.0.304577753702.issue43268@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 5592f2b9daa24bf74cc616abcc40a29da2bdccb2 by Victor Stinner in branch 'master': bpo-43268: Replace _PyThreadState_GET() with _PyInterpreterState_GET() (GH-24576) https://github.com/python/cpython/commit/5592f2b9daa24bf74cc616abcc40a29da2bdccb2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 07:21:54 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 12:21:54 +0000 Subject: [issue40522] [subinterpreters] Get the current Python interpreter state from Thread Local Storage (autoTSSkey) In-Reply-To: <1588698734.65.0.223552100195.issue40522@roundup.psfhosted.org> Message-ID: <1613737314.78.0.516487190733.issue40522@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 62078101ea1be5d2fc472a3f0d9d135e0bd5cd38 by Victor Stinner in branch 'master': bpo-40522: Replace PyThreadState_GET() with PyThreadState_Get() (GH-24575) https://github.com/python/cpython/commit/62078101ea1be5d2fc472a3f0d9d135e0bd5cd38 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 07:29:13 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 19 Feb 2021 12:29:13 +0000 Subject: [issue34013] Inconsistent SyntaxError for print In-Reply-To: <1530380578.04.0.56676864532.issue34013@psf.upfronthosting.co.za> Message-ID: <1613737753.26.0.767288613426.issue34013@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: Let's step back a bit and focus on the issue at hand. The problem is the following: * We **already** have a warning for the print statement without parens: Python 3.9.1 (default, Dec 14 2020, 11:49:16) [Clang 12.0.0 (clang-1200.0.32.27)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> print x File "", line 1 print x ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(x)? This is achieved by inspecting the syntax error and checking some conditions, which I personally find it uglier than a resilient grammar rule. * The question is if we want to make the rule more resilient or delete it whatsoever. The status quo doesn't seem like a good fit ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 07:32:17 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 19 Feb 2021 12:32:17 +0000 Subject: [issue43269] [sqlite3] Clean up function scoping In-Reply-To: <1613736357.16.0.00586339940376.issue43269@roundup.psfhosted.org> Message-ID: <1613737937.94.0.701080277418.issue43269@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Ref. https://github.com/python/cpython/pull/24569#issuecomment-782014177, Berker. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 07:33:34 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 12:33:34 +0000 Subject: [issue43268] [internals] Pass the current interpreter (interp) rather than the current Python thread state (state) In-Reply-To: <1613735963.3.0.941946997765.issue43268@roundup.psfhosted.org> Message-ID: <1613738014.36.0.833314106129.issue43268@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 101bf69ff18a946fed7c274f088878aaf85174cc by Victor Stinner in branch 'master': bpo-43268: _Py_IsMainInterpreter() now expects interp (GH-24577) https://github.com/python/cpython/commit/101bf69ff18a946fed7c274f088878aaf85174cc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 07:53:32 2021 From: report at bugs.python.org (Christoph Anton Mitterer) Date: Fri, 19 Feb 2021 12:53:32 +0000 Subject: [issue43259] argparse: allow add_mutually_exclusive_group on add_argument_group In-Reply-To: <1613701721.93.0.742004676065.issue43259@roundup.psfhosted.org> Message-ID: <1613739212.25.0.0140266436059.issue43259@roundup.psfhosted.org> Christoph Anton Mitterer added the comment: Okay the problem seems to be that I didn't give you the exact details on what I do. Actually, the group (which then contains the mutually exclusive group) is contained in a "shared" parent parser, which I then use in the subparsers. If I leave out the parent parser, then it works as you say. I'll attach exact code (with which I can reproduce it). ---------- Added file: https://bugs.python.org/file49821/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 07:53:40 2021 From: report at bugs.python.org (Christoph Anton Mitterer) Date: Fri, 19 Feb 2021 12:53:40 +0000 Subject: [issue43259] argparse: allow add_mutually_exclusive_group on add_argument_group In-Reply-To: <1613701721.93.0.742004676065.issue43259@roundup.psfhosted.org> Message-ID: <1613739220.35.0.374907382928.issue43259@roundup.psfhosted.org> Change by Christoph Anton Mitterer : Added file: https://bugs.python.org/file49822/test-no-parent.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 08:16:38 2021 From: report at bugs.python.org (Andre Roberge) Date: Fri, 19 Feb 2021 13:16:38 +0000 Subject: [issue34013] Inconsistent SyntaxError for print In-Reply-To: <1530380578.04.0.56676864532.issue34013@psf.upfronthosting.co.za> Message-ID: <1613740598.86.0.61015863983.issue34013@roundup.psfhosted.org> Andre Roberge added the comment: +1 to the idea of adding something to the grammar, and have a simple error message: SyntaxError: Missing parentheses in call to 'print'. in *all* cases, including the first one that prompted this bug report. I write that even though I have created a third-party package based on the idea that beginners (and sometimes others...) might benefit from a more detailed error message (which is taken care of already by friendly-traceback). ---------- nosy: +aroberge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 08:25:53 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 13:25:53 +0000 Subject: [issue43270] [C API] Remove _PyErr_OCCURRED() macro Message-ID: <1613741153.22.0.969941653103.issue43270@roundup.psfhosted.org> New submission from STINNER Victor : The private _PyErr_OCCURRED() function was introduced to optimize Objects/setobject.c: commit 5ba0cbe39221ff8985ce5a4702a3b01a17ae3248 Author: Raymond Hettinger Date: Sat Aug 6 18:31:24 2005 +0000 * set_new() doesn't need to zero the structure a second time after tp_alloc has already done the job. * Use a macro form of PyErr_Occurred() inside the set_lookkey() function. But the usage of the macro was removed one month later: commit 9bda1d6f645bd0f3e76c14f27bbbac919814cd38 Author: Raymond Hettinger Date: Fri Sep 16 07:14:21 2005 +0000 No longer ignore exceptions raised by comparisons during key lookup. Inspired by Armin Rigo's suggestion to do the same with dictionaries. The macro is currently defined as: #if defined(Py_DEBUG) || defined(Py_LIMITED_API) #define _PyErr_OCCURRED() PyErr_Occurred() #else #define _PyErr_OCCURRED() (PyThreadState_GET()->curexc_type) #endif IMO the new _PyErr_Occurred(tstate) internal function is a more reliable way (don't depend on Py_DEBUG and Py_LIMITED_API) to ensure that the code uses the most efficient way to check if an exception was raised. I cannot find "_PyErr_OCCURRED" in the PyPI top 4000 projects, I checked with INADA-san's tool: https://github.com/methane/notes/tree/master/2020/wchar-cache (But I found many C extensiosn using "PyErr_Occurred" which is fine, this one stays ;-) I just wanted to check that my search was working.) So removing _PyErr_OCCURRED() is unlikely to break PyPI top 4000 projects. If it breaks a third party project: well, we don't provide any backward compatibility warranty on the *private* C API. ---------- components: C API messages: 387318 nosy: vstinner priority: normal severity: normal status: open title: [C API] Remove _PyErr_OCCURRED() macro versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 08:30:20 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 13:30:20 +0000 Subject: [issue43270] [C API] Remove _PyErr_OCCURRED() macro In-Reply-To: <1613741153.22.0.969941653103.issue43270@roundup.psfhosted.org> Message-ID: <1613741420.83.0.752004390595.issue43270@roundup.psfhosted.org> STINNER Victor added the comment: > #define _PyErr_OCCURRED() (PyThreadState_GET()->curexc_type) But this way, this macro access directly the PyThreadState.curexc_type member which goes against the bpo-39947 "[C API] Make the PyThreadState structure opaque (move it to the internal C API)" issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 08:31:38 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 13:31:38 +0000 Subject: [issue43270] [C API] Remove _PyErr_OCCURRED() macro In-Reply-To: <1613741153.22.0.969941653103.issue43270@roundup.psfhosted.org> Message-ID: <1613741498.18.0.794441875367.issue43270@roundup.psfhosted.org> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +23358 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24579 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 08:34:29 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 13:34:29 +0000 Subject: [issue43270] [C API] Remove _PyErr_OCCURRED() macro In-Reply-To: <1613741153.22.0.969941653103.issue43270@roundup.psfhosted.org> Message-ID: <1613741669.0.0.272200155641.issue43270@roundup.psfhosted.org> STINNER Victor added the comment: _PyErr_Occurred() is defined as: static inline PyObject* _PyErr_Occurred(PyThreadState *tstate) { assert(tstate != NULL); return tstate->curexc_type; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 08:40:11 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 13:40:11 +0000 Subject: [issue43268] [internals] Pass the current interpreter (interp) rather than the current Python thread state (state) In-Reply-To: <1613735963.3.0.941946997765.issue43268@roundup.psfhosted.org> Message-ID: <1613742011.78.0.327216938864.issue43268@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +23359 pull_request: https://github.com/python/cpython/pull/24580 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 08:42:21 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 13:42:21 +0000 Subject: [issue43268] [internals] Pass the current interpreter (interp) rather than the current Python thread state (state) In-Reply-To: <1613735963.3.0.941946997765.issue43268@roundup.psfhosted.org> Message-ID: <1613742141.58.0.500885166628.issue43268@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +23360 pull_request: https://github.com/python/cpython/pull/24581 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 08:58:03 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 19 Feb 2021 13:58:03 +0000 Subject: [issue27646] doc: yield from expression can be any iterable In-Reply-To: <1469730650.89.0.176012351897.issue27646@psf.upfronthosting.co.za> Message-ID: <1613743083.78.0.785167035866.issue27646@roundup.psfhosted.org> Change by Irit Katriel : ---------- title: yield from expression can be any iterable -> doc: yield from expression can be any iterable versions: +Python 3.10 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 09:05:05 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 14:05:05 +0000 Subject: [issue42093] Add opcode cache for LOAD_ATTR In-Reply-To: <1603163916.18.0.528007796853.issue42093@roundup.psfhosted.org> Message-ID: <1613743505.4.0.369385645021.issue42093@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +vstinner nosy_count: 4.0 -> 5.0 pull_requests: +23361 pull_request: https://github.com/python/cpython/pull/24582 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 09:08:02 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 14:08:02 +0000 Subject: [issue43268] [internals] Pass the current interpreter (interp) rather than the current Python thread state (state) In-Reply-To: <1613735963.3.0.941946997765.issue43268@roundup.psfhosted.org> Message-ID: <1613743682.28.0.362898316874.issue43268@roundup.psfhosted.org> STINNER Victor added the comment: New changeset acde3f1530f1664c9ec7f22e16a7f54c5191e4a6 by Victor Stinner in branch 'master': bpo-43268: Remove abusive usage of tstate in sysmodule.c (#24581) https://github.com/python/cpython/commit/acde3f1530f1664c9ec7f22e16a7f54c5191e4a6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 09:09:11 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 14:09:11 +0000 Subject: [issue43270] [C API] Remove _PyErr_OCCURRED() macro In-Reply-To: <1613741153.22.0.969941653103.issue43270@roundup.psfhosted.org> Message-ID: <1613743751.9.0.575276943751.issue43270@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 09:08:56 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 14:08:56 +0000 Subject: [issue43270] [C API] Remove _PyErr_OCCURRED() macro In-Reply-To: <1613741153.22.0.969941653103.issue43270@roundup.psfhosted.org> Message-ID: <1613743736.72.0.463663351241.issue43270@roundup.psfhosted.org> STINNER Victor added the comment: New changeset a486054b24658fa623e030ddd4cc0cbfcac54ab0 by Victor Stinner in branch 'master': bpo-43270: Remove private _PyErr_OCCURRED() macro (GH-24579) https://github.com/python/cpython/commit/a486054b24658fa623e030ddd4cc0cbfcac54ab0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 09:10:52 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 14:10:52 +0000 Subject: [issue43268] [internals] Pass the current interpreter (interp) rather than the current Python thread state (state) In-Reply-To: <1613735963.3.0.941946997765.issue43268@roundup.psfhosted.org> Message-ID: <1613743852.37.0.443918291882.issue43268@roundup.psfhosted.org> STINNER Victor added the comment: New changeset bcb094b41f7fe4dd1686c50891d85632fcf0d481 by Victor Stinner in branch 'master': bpo-43268: Pass interp rather than tstate to internal functions (GH-24580) https://github.com/python/cpython/commit/bcb094b41f7fe4dd1686c50891d85632fcf0d481 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 09:13:46 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 19 Feb 2021 14:13:46 +0000 Subject: [issue30425] Python 3.6.1 (32-bit)_20170522020736.log In-Reply-To: <1495394003.66.0.824232071766.issue30425@psf.upfronthosting.co.za> Message-ID: <1613744026.89.0.0712948834104.issue30425@roundup.psfhosted.org> Irit Katriel added the comment: Chakrit, what is the issue you are reporting here? ---------- nosy: +iritkatriel resolution: -> not a bug status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 09:18:54 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 14:18:54 +0000 Subject: [issue43268] [internals] Pass the current interpreter (interp) rather than the current Python thread state (state) In-Reply-To: <1613735963.3.0.941946997765.issue43268@roundup.psfhosted.org> Message-ID: <1613744334.38.0.485089865324.issue43268@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +23362 pull_request: https://github.com/python/cpython/pull/24583 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 09:35:26 2021 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Fri, 19 Feb 2021 14:35:26 +0000 Subject: [issue43255] Ceil division with /// operator In-Reply-To: <1613657884.47.0.693807596849.issue43255@roundup.psfhosted.org> Message-ID: <1613745326.03.0.522786848349.issue43255@roundup.psfhosted.org> Bo?tjan Mejak added the comment: Mr. Stinner, I really don't understand what are you hinting at. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 09:51:58 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 14:51:58 +0000 Subject: [issue43268] [internals] Pass the current interpreter (interp) rather than the current Python thread state (state) In-Reply-To: <1613735963.3.0.941946997765.issue43268@roundup.psfhosted.org> Message-ID: <1613746318.03.0.441700686808.issue43268@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 839184f85cb2d2ad514fff9b431733d1c9607533 by Victor Stinner in branch 'master': bpo-43268: local_clear() uses _PyInterpreterState_GET() (GH-24583) https://github.com/python/cpython/commit/839184f85cb2d2ad514fff9b431733d1c9607533 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 09:52:27 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 14:52:27 +0000 Subject: [issue43268] [internals] Pass the current interpreter (interp) rather than the current Python thread state (state) In-Reply-To: <1613735963.3.0.941946997765.issue43268@roundup.psfhosted.org> Message-ID: <1613746347.41.0.792794075806.issue43268@roundup.psfhosted.org> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 09:55:53 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 14:55:53 +0000 Subject: [issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details In-Reply-To: <1541076409.33.0.788709270274.issue35134@psf.upfronthosting.co.za> Message-ID: <1613746553.57.0.162698402536.issue35134@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 4a6bf276ed3e6687394afe26b0d9a061ac06fc6b by Nicholas Sim in branch 'master': bpo-35134: Move non-limited C API files to Include/cpython/ (GH-24561) https://github.com/python/cpython/commit/4a6bf276ed3e6687394afe26b0d9a061ac06fc6b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 10:00:25 2021 From: report at bugs.python.org (Ken Jin) Date: Fri, 19 Feb 2021 15:00:25 +0000 Subject: [issue43257] get_type_hints evaluates class variables before type hints In-Reply-To: <1613674389.7.0.662545627223.issue43257@roundup.psfhosted.org> Message-ID: <1613746825.07.0.301963570271.issue43257@roundup.psfhosted.org> Ken Jin added the comment: Hmm I noticed this occurs in Python 3.9 but not 3.10. If you insert ``from __future__ import annotations`` at the start of your code, it stops erroring. Anyways, I don't think this is dataclass specific, the following code using a plain class also errors: ``` from typing import get_type_hints class T: str: str = 'a' get_type_hints(T) # Error. ``` Inspecting __annotations__ tells us why: >>> T.__annotations__ {'str': 'a'} You can see that the annotations are wrong. Meanwhile with from __future__ import annotations: >>> T.__annotations__ {'str': 'str'} Seeing that SETUP_ANNOTATIONS in ceval.c didn't change, I suspect it's compiler related. ---------- nosy: +gvanrossum, kj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 10:09:10 2021 From: report at bugs.python.org (Berker Peksag) Date: Fri, 19 Feb 2021 15:09:10 +0000 Subject: [issue43265] Improve sqlite3 backup error handling In-Reply-To: <1613725802.16.0.516336537835.issue43265@roundup.psfhosted.org> Message-ID: <1613747350.33.0.153529132539.issue43265@roundup.psfhosted.org> Berker Peksag added the comment: I'm not sure about 1) because if target == source it means a user error. OperationalError is usually used for non-user errors. 3) sounds good to me if that part is already covered by tests and they passed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 10:24:48 2021 From: report at bugs.python.org (=?utf-8?b?0JDQvdC00YDQtdC5INCS0L7RgNC+0L/QsNC10LI=?=) Date: Fri, 19 Feb 2021 15:24:48 +0000 Subject: [issue43265] Improve sqlite3 backup error handling In-Reply-To: <1613725802.16.0.516336537835.issue43265@roundup.psfhosted.org> Message-ID: <1613748288.92.0.905081738249.issue43265@roundup.psfhosted.org> Change by ?????? ???????? : Added file: https://bugs.python.org/file49823/DOC-20200420-WA0000 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 10:32:51 2021 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 19 Feb 2021 15:32:51 +0000 Subject: [issue43266] "String conversion and formatting" formatting messes up array subscripting In-Reply-To: <1613726497.48.0.989705999924.issue43266@roundup.psfhosted.org> Message-ID: <1613748771.12.0.78159531769.issue43266@roundup.psfhosted.org> Benjamin Peterson added the comment: New changeset 2d3e463e4a5aa109d1c15c86f9631580f5ef7a7e by Erlend Egeberg Aasland in branch 'master': closes bpo-43266: Improve array formatting. (GH-24573) https://github.com/python/cpython/commit/2d3e463e4a5aa109d1c15c86f9631580f5ef7a7e ---------- nosy: +benjamin.peterson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 10:32:55 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Feb 2021 15:32:55 +0000 Subject: [issue43266] "String conversion and formatting" formatting messes up array subscripting In-Reply-To: <1613726497.48.0.989705999924.issue43266@roundup.psfhosted.org> Message-ID: <1613748775.85.0.499870535292.issue43266@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +23364 pull_request: https://github.com/python/cpython/pull/24585 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 10:32:47 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Feb 2021 15:32:47 +0000 Subject: [issue43266] "String conversion and formatting" formatting messes up array subscripting In-Reply-To: <1613726497.48.0.989705999924.issue43266@roundup.psfhosted.org> Message-ID: <1613748767.58.0.652260824873.issue43266@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +23363 pull_request: https://github.com/python/cpython/pull/24584 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 10:44:01 2021 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 19 Feb 2021 15:44:01 +0000 Subject: [issue43257] get_type_hints evaluates class variables before type hints In-Reply-To: <1613674389.7.0.662545627223.issue43257@roundup.psfhosted.org> Message-ID: <1613749441.83.0.962360877217.issue43257@roundup.psfhosted.org> Guido van Rossum added the comment: Sure looks like a compiler bug! Can you investigate whether this occurs in earlier Python versions? Maybe bisect if it doesn?t? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 10:46:13 2021 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 19 Feb 2021 15:46:13 +0000 Subject: [issue43255] Ceil division with /// operator In-Reply-To: <1613657884.47.0.693807596849.issue43255@roundup.psfhosted.org> Message-ID: <1613749573.18.0.145785652095.issue43255@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 10:55:51 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 19 Feb 2021 15:55:51 +0000 Subject: [issue43266] "String conversion and formatting" formatting messes up array subscripting In-Reply-To: <1613726497.48.0.989705999924.issue43266@roundup.psfhosted.org> Message-ID: <1613750151.56.0.733822710949.issue43266@roundup.psfhosted.org> miss-islington added the comment: New changeset 1cfed3d5b0ec1419c8a1d5cf8bff1a6e1483771a by Miss Islington (bot) in branch '3.9': closes bpo-43266: Improve array formatting. (GH-24573) https://github.com/python/cpython/commit/1cfed3d5b0ec1419c8a1d5cf8bff1a6e1483771a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 11:34:45 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 16:34:45 +0000 Subject: [issue37146] opcode cache for LOAD_GLOBAL emits false alarm in memory leak hunting In-Reply-To: <1559594083.93.0.475089830437.issue37146@roundup.psfhosted.org> Message-ID: <1613752485.28.0.987630834023.issue37146@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +23365 pull_request: https://github.com/python/cpython/pull/24582 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 12:31:04 2021 From: report at bugs.python.org (paul j3) Date: Fri, 19 Feb 2021 17:31:04 +0000 Subject: [issue43259] argparse: allow add_mutually_exclusive_group on add_argument_group In-Reply-To: <1613701721.93.0.742004676065.issue43259@roundup.psfhosted.org> Message-ID: <1613755864.77.0.9314223599.issue43259@roundup.psfhosted.org> paul j3 added the comment: The parents mechanism is not elaborate. It copies groups and actions by reference. The comments that I quoted actually come from that method that does this copying. >From a quick glance at that code I see that it does not preserve the group nesting. Mutually_exclusive groups are added directly the parser. Parents is primarily a convenience tool, especially if used entirely with your own code. It's most valuable when importing the parent, and you don't have direct access to the code that constructed it. But it seems to be used most often as a way of creating a number of similar subparsers. For that it can be easily replaced with your own utility function(s). There's no virtue in trying to do everything with the tools that argparse provides. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 12:33:46 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Feb 2021 17:33:46 +0000 Subject: [issue43267] [sqlite3] Redundant type checks in pysqlite_statement_bind_parameter() In-Reply-To: <1613731536.26.0.545379664561.issue43267@roundup.psfhosted.org> Message-ID: <1613756026.95.0.317016675298.issue43267@roundup.psfhosted.org> Serhiy Storchaka added the comment: It is a kind of optimization. We first perform few fast checks for exact types, and then slower subclass checks. I do not know whether this optimization is worth, but it was written so, and there is nothing wrong in it. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 12:35:36 2021 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 19 Feb 2021 17:35:36 +0000 Subject: [issue37146] opcode cache for LOAD_GLOBAL emits false alarm in memory leak hunting In-Reply-To: <1559594083.93.0.475089830437.issue37146@roundup.psfhosted.org> Message-ID: <1613756136.95.0.475638619736.issue37146@roundup.psfhosted.org> Guido van Rossum added the comment: Please revert this and use a separate build flag (e.g. DISABLE_INLINE_CACHES) for the refleaks run. (Or perhaps provide an -X flag to disable it without the need to recompile.) I am developing new inline cache ideas and of course I need to run in debug mode, so I regularly end up wasting some time until I remember to add a patch that changes OPCACHE_MIN_RUNS back. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 12:36:41 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Feb 2021 17:36:41 +0000 Subject: [issue43251] sqlite3_column_name() failures should raise MemoryError In-Reply-To: <1613647354.29.0.206061609144.issue43251@roundup.psfhosted.org> Message-ID: <1613756201.35.0.0297110496039.issue43251@roundup.psfhosted.org> Serhiy Storchaka added the comment: Well, it returns NULL in case of out of memory, but is it the only cause? Can NULL be returned for other reasons? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 12:39:55 2021 From: report at bugs.python.org (Irit Katriel) Date: Fri, 19 Feb 2021 17:39:55 +0000 Subject: [issue42402] Termios module documentation is extremely lacking In-Reply-To: <1605772450.46.0.534233134191.issue42402@roundup.psfhosted.org> Message-ID: <1613756395.65.0.368425010166.issue42402@roundup.psfhosted.org> Irit Katriel added the comment: Could it simply be that the link to mod:`termios` should have been to :manpage:`termios(3)` instead? ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 12:49:28 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 17:49:28 +0000 Subject: [issue37146] opcode cache for LOAD_GLOBAL emits false alarm in memory leak hunting In-Reply-To: <1559594083.93.0.475089830437.issue37146@roundup.psfhosted.org> Message-ID: <1613756968.65.0.631172774618.issue37146@roundup.psfhosted.org> STINNER Victor added the comment: I reopen the issue (but I'm not interested by trying to fix it). ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 12:52:54 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 17:52:54 +0000 Subject: [issue37146] opcode cache for LOAD_GLOBAL emits false alarm in memory leak hunting In-Reply-To: <1559594083.93.0.475089830437.issue37146@roundup.psfhosted.org> Message-ID: <1613757174.11.0.51852548855.issue37146@roundup.psfhosted.org> STINNER Victor added the comment: > (Or perhaps provide an -X flag to disable it without the need to recompile.) Giving the ability to control the cache size, at least at Python startup, is one option. Or maybe need a generic -X flag to tell Python that libregrtest is tracking leaks, since we might need to change other parameters than only the opcode cache size. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 13:01:23 2021 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 19 Feb 2021 18:01:23 +0000 Subject: [issue42990] Improve the C code for calling Python code: _PyEval_EvalCode() In-Reply-To: <1611245152.12.0.0348161555926.issue42990@roundup.psfhosted.org> Message-ID: <1613757683.36.0.638587405734.issue42990@roundup.psfhosted.org> Guido van Rossum added the comment: Thanks, that's clearer. I'm still worried about the change in semantics where globals["__builtins__"] is assigned a different dict after the function object has been created (similar to https://bugs.python.org/file49816/func_builtins2.py). I.e. def foo(): return len("abc") code = foo.__code__ g = {"__builtins__": {"len": len}} f = FunctionType(code, g) f() # Succeeds g["__builtins__"] = {} f() # Fails in 3.9 and before, passes in 3.10 Assuming code uses len, does f() succeed or fail? I realize this is a pretty esoteric, but it does show the change in semantics (from later to earlier binding). Should we care? I like early binding because it allows more optimizations[1], but traditionally Python's semantics use late binding. [1] Not in this case, the user could still change the meaning of len() with e.g. g["__builtins__"]["len"] = lambda x: return 42 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 13:44:36 2021 From: report at bugs.python.org (Mark Shannon) Date: Fri, 19 Feb 2021 18:44:36 +0000 Subject: [issue42990] Improve the C code for calling Python code: _PyEval_EvalCode() In-Reply-To: <1611245152.12.0.0348161555926.issue42990@roundup.psfhosted.org> Message-ID: <1613760276.91.0.240584092046.issue42990@roundup.psfhosted.org> Mark Shannon added the comment: In Python 3.9 the binding is more late-ish binding, than true late binding. Because globals['__builtins__'] is cached for each function activation, executing functions don't see updates. Example: >>> def f(): ... print(len("test")) ... bltns = f.__globals__["__builtins__"] ... if hasattr(bltns, "__dict__"): ... bltns = bltns.__dict__ ... new = bltns.copy() ... new["len"] = lambda x : 7 ... f.__globals__["__builtins__"] = new ... print(len("test")) ... >>> >>> f() 4 4 >>> f() 7 7 True late binding would print: >>> f() 4 7 >>> f() 7 7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 13:58:49 2021 From: report at bugs.python.org (Brian Hulette) Date: Fri, 19 Feb 2021 18:58:49 +0000 Subject: [issue28007] Bad .pyc files prevent import of otherwise valid .py files. In-Reply-To: <1473277778.4.0.402834578842.issue28007@psf.upfronthosting.co.za> Message-ID: <1613761129.82.0.532190262578.issue28007@roundup.psfhosted.org> Brian Hulette added the comment: Hey there, I just came across this bug when looking into a problem with corrupted pyc files. Was the patch ever applied? I'm still seeing the original behavior in Python 3.7. Thanks! ---------- nosy: +hulettbh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 14:01:49 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 19 Feb 2021 19:01:49 +0000 Subject: [issue43265] Improve sqlite3 backup error handling In-Reply-To: <1613725802.16.0.516336537835.issue43265@roundup.psfhosted.org> Message-ID: <1613761309.18.0.0571538794023.issue43265@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: > I'm not sure about 1) because if target == source it means a user error. OperationalError is usually used for non-user errors. Yes, my bad. ProgrammingError would be better. target == source results in SQLITE_ERROR, BTW. I'll throw up a PR for 3., then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 14:07:13 2021 From: report at bugs.python.org (Brett Cannon) Date: Fri, 19 Feb 2021 19:07:13 +0000 Subject: [issue28007] Bad .pyc files prevent import of otherwise valid .py files. In-Reply-To: <1473277778.4.0.402834578842.issue28007@psf.upfronthosting.co.za> Message-ID: <1613761633.0.0.483870439503.issue28007@roundup.psfhosted.org> Brett Cannon added the comment: Since this is still open I would assume it never made it in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 14:09:36 2021 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 19 Feb 2021 19:09:36 +0000 Subject: [issue43263] threading module unable to run In-Reply-To: <1613722745.98.0.253058139819.issue43263@roundup.psfhosted.org> Message-ID: <1613761776.07.0.313766471746.issue43263@roundup.psfhosted.org> Change by Mark Dickinson : ---------- resolution: -> works for me status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 14:23:43 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 19 Feb 2021 19:23:43 +0000 Subject: [issue43265] Improve sqlite3 backup error handling In-Reply-To: <1613725802.16.0.516336537835.issue43265@roundup.psfhosted.org> Message-ID: <1613762623.81.0.850195221007.issue43265@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +23366 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24586 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 14:33:20 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 19:33:20 +0000 Subject: [issue42990] Improve the C code for calling Python code: _PyEval_EvalCode() In-Reply-To: <1611245152.12.0.0348161555926.issue42990@roundup.psfhosted.org> Message-ID: <1613763200.26.0.107164377627.issue42990@roundup.psfhosted.org> STINNER Victor added the comment: Guido: "I'm still worried about the change in semantics where globals["__builtins__"] is assigned a different dict after the function object has been created (...)" Well, there is a semantics change of Python 3.10 documented at: https://docs.python.org/dev/whatsnew/3.10.html#other-language-changes "Functions have a new __builtins__ attribute which is used to look for builtin symbols when a function is executed, instead of looking into __globals__['__builtins__']. (Contributed by Mark Shannon in bpo-42990.)" And the function __builtins__ attribute is read-only. Your example is not affected by PR 24564 because the globals has the "__builtins__" key. In Python 3.10, you can modify func.__builtins__ (new attribute): --- def foo(s): return len(s) code = foo.__code__ FunctionType = type(foo) f = FunctionType(code, {"__builtins__": {"len": len}}) print(f("abc")) f.__builtins__.clear() print(f("abc")) --- Output: --- 3 Traceback (most recent call last): (...) NameError: name 'len' is not defined --- Mark: "Because globals['__builtins__'] is cached for each function activation, executing functions don't see updates." In Python 3.10, if someone wants to hack builtins while the function is running, modifying the builtins namespace in-place works as expected: --- def f(): print(len("test")) builtins_ns = f.__globals__['__builtins__'].__dict__ #builtins_ns = f.__builtins__ builtins_ns['len'] = lambda x: 7 print(len("test")) f() --- Output: --- 4 7 --- It also works with "builtins_ns = f.__builtins__". Guido: "I realize this is a pretty esoteric, but it does show the change in semantics (from later to earlier binding). Should we care? I like early binding because it allows more optimizations[1], but traditionally Python's semantics use late binding." Modifying built-in functions/types is commonly done in tests. Example: --- import unittest.mock def func(): with unittest.mock.patch('builtins.chr', return_value='mock'): return chr(65) print(func()) --- The expected output is: "mock". Overriding an attribute of the builtins module immediately updates func.__builtins__. It works because func.__builtins__ is builtins.__dict__. In FAT Python, I implemented an optimization which copies builtin functions to constants, replace LOAD_GLOBAL with LOAD_CONST: https://fatoptimizer.readthedocs.io/en/latest/optimizations.html#copy-builtin-to-constant This optimization breaks this Python semantics, it is no longer possible to override builtin functions in tests: https://fatoptimizer.readthedocs.io/en/latest/semantics.html#builtin-functions-replaced-in-the-middle-of-a-function ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 14:59:37 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 19 Feb 2021 19:59:37 +0000 Subject: [issue43267] [sqlite3] Redundant type checks in pysqlite_statement_bind_parameter() In-Reply-To: <1613731536.26.0.545379664561.issue43267@roundup.psfhosted.org> Message-ID: <1613764777.96.0.0989371084815.issue43267@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: > It is a kind of optimization. PyLong_Check is very fast (only one comparison, AFAICS), so there is no gain in first doing PyLong_CheckExact and then PyLong_Check. Ditto for unicode. PyFloat_Check is the most expensive check, but it comes before both PyUnicode_Check and PyObject_CheckBuffer (both a lot faster), so that's AFAICS the opposite of an optimisation. Correct me if I'm wrong. If we want to optimise it we should do PyLong_Check, PyUnicode_Check, PyObject_CheckBuffer, and then PyFloat_Check, no? > there is nothing wrong in it. True. I'll argue that my suggestion will improve readability and maintainability, which should be worth considering. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 15:12:00 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 19 Feb 2021 20:12:00 +0000 Subject: [issue43251] sqlite3_column_name() failures should raise MemoryError In-Reply-To: <1613647354.29.0.206061609144.issue43251@roundup.psfhosted.org> Message-ID: <1613765520.87.0.579689540293.issue43251@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: > Well, it returns NULL in case of out of memory, but is it the only cause? Can NULL be returned for other reasons? According to the SQLite docs, no. Looking at the source code, we see that it also returns NULL if the second parameter (column index) is out of range, but we already check that. AFAICS, the only reason for a NULL in our case is OOM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 15:13:22 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 19 Feb 2021 20:13:22 +0000 Subject: [issue43251] [sqlite3] sqlite3_column_name() failures should raise MemoryError In-Reply-To: <1613647354.29.0.206061609144.issue43251@roundup.psfhosted.org> Message-ID: <1613765602.83.0.243218747829.issue43251@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- title: sqlite3_column_name() failures should raise MemoryError -> [sqlite3] sqlite3_column_name() failures should raise MemoryError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 15:13:38 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 19 Feb 2021 20:13:38 +0000 Subject: [issue43265] [sqlite3] Improve backup error handling In-Reply-To: <1613725802.16.0.516336537835.issue43265@roundup.psfhosted.org> Message-ID: <1613765618.01.0.11525979848.issue43265@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- title: Improve sqlite3 backup error handling -> [sqlite3] Improve backup error handling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 15:26:54 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 20:26:54 +0000 Subject: [issue43271] AMD64 Windows10 3.x crash with Windows fatal exception: stack overflow Message-ID: <1613766414.64.0.363657915419.issue43271@roundup.psfhosted.org> New submission from STINNER Victor : AMD64 Windows10 3.x, build 856: https://buildbot.python.org/all/#/builders/146/builds/856 17 tests failed: test_exceptions test_fileio test_io test_isinstance test_json test_lib2to3 test_logging test_pickle test_pickletools test_plistlib test_richcmp test_runpy test_sys test_threading test_traceback test_typing test_xml_etree It may be a regression caused by: "bpo-43166: Disable ceval.c optimisations for Windows debug builds (GH-24485)" https://github.com/python/cpython/commit/b74396c3167cc780f01309148db02709bc37b432 The latest successful build was 11 days ago (Feb 9): https://buildbot.python.org/all/#/builders/146/builds/819 ---- 0:01:46 load avg: 14.25 [ 61/426/1] test_xml_etree crashed (Exit code 3221225725) -- running: test_tokenize (46.4 sec), test_largefile (1 min 10 sec) Windows fatal exception: stack overflow Current thread 0x0000110c (most recent call first): File "D:\buildarea\3.x.bolen-windows10\build\lib\xml\etree\ElementTree.py", line 178 in __repr__ File "D:\buildarea\3.x.bolen-windows10\build\lib\xml\etree\ElementTree.py", line 178 in __repr__ File "D:\buildarea\3.x.bolen-windows10\build\lib\xml\etree\ElementTree.py", line 178 in __repr__ ... ====================================================================== FAIL: test_recursion_limit (test.test_threading.ThreadingExceptionTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_threading.py", line 1203, in test_recursion_limit self.assertEqual(p.returncode, 0, "Unexpected error: " + stderr.decode()) AssertionError: 3221225725 != 0 : Unexpected error: 0:05:09 load avg: 29.65 [140/426/3] test_traceback crashed (Exit code 3221225725) -- running: test_concurrent_futures (2 min 6 sec), test_mmap (2 min) Windows fatal exception: stack overflow Current thread 0x00000118 (most recent call first): File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_traceback.py", line 1154 in f File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_traceback.py", line 1156 in f File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_traceback.py", line 1156 in f ... 0:06:14 load avg: 29.15 [151/426/4] test_lib2to3 crashed (Exit code 3221225725) -- running: test_multiprocessing_spawn (31.7 sec), test_capi (1 min 3 sec), test_mmap (3 min 4 sec) Windows fatal exception: stack overflow Current thread 0x00001b90 (most recent call first): File "D:\buildarea\3.x.bolen-windows10\build\lib\lib2to3\pytree.py", line 496 in generate_matches File "D:\buildarea\3.x.bolen-windows10\build\lib\lib2to3\pytree.py", line 845 in generate_matches ... ---------- components: Windows messages: 387348 nosy: paul.moore, steve.dower, tim.golden, vstinner, zach.ware priority: normal severity: normal status: open title: AMD64 Windows10 3.x crash with Windows fatal exception: stack overflow versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 15:27:43 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 20:27:43 +0000 Subject: [issue43166] Unused letters in Windows-specific pragma optimize In-Reply-To: <1612813717.65.0.159919254593.issue43166@roundup.psfhosted.org> Message-ID: <1613766463.78.0.589972725172.issue43166@roundup.psfhosted.org> STINNER Victor added the comment: Since this change, AMD64 Windows10 3.x buildbot started to crash with Windows fatal exception: stack overflow -> see bpo-43271. ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 15:32:05 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 20:32:05 +0000 Subject: [issue43272] AMD64 Arch Linux VintageParser 3.9: test_fstring test_named_expressions test_unpack_ex failed Message-ID: <1613766725.82.0.224144138609.issue43272@roundup.psfhosted.org> New submission from STINNER Victor : AMD64 Arch Linux VintageParser 3.9: https://buildbot.python.org/all/#/builders/495/builds/147 3 tests failed: test_fstring test_named_expressions test_unpack_ex The latest success build was 4 months ago (Nov 2): https://buildbot.python.org/all/#/builders/495/builds/107 ********************************************************************** File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.oldparser/build/Lib/test/test_unpack_ex.py", line ?, in test.test_unpack_ex.__test__.doctests Failed example: (*x),y = 1, 2 # doctest:+ELLIPSIS Expected: Traceback (most recent call last): ... SyntaxError: can't use starred expression here Got nothing ********************************************************************** File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.oldparser/build/Lib/test/test_unpack_ex.py", line ?, in test.test_unpack_ex.__test__.doctests Failed example: (((*x))),y = 1, 2 # doctest:+ELLIPSIS Expected: Traceback (most recent call last): ... SyntaxError: can't use starred expression here Got nothing ********************************************************************** File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.oldparser/build/Lib/test/test_unpack_ex.py", line ?, in test.test_unpack_ex.__test__.doctests Failed example: z,(*x),y = 1, 2, 4 # doctest:+ELLIPSIS Expected: Traceback (most recent call last): ... SyntaxError: can't use starred expression here Got nothing ********************************************************************** File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.oldparser/build/Lib/test/test_unpack_ex.py", line ?, in test.test_unpack_ex.__test__.doctests Failed example: z,(*x) = 1, 2 # doctest:+ELLIPSIS Expected: Traceback (most recent call last): ... SyntaxError: can't use starred expression here Got nothing ********************************************************************** File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.oldparser/build/Lib/test/test_unpack_ex.py", line ?, in test.test_unpack_ex.__test__.doctests Failed example: ((*x),y) = 1, 2 # doctest:+ELLIPSIS Expected: Traceback (most recent call last): ... SyntaxError: can't use starred expression here Got nothing ********************************************************************** 1 items had failures: 5 of 91 in test.test_unpack_ex.__test__.doctests ====================================================================== FAIL: test_named_expression_invalid_rebinding_set_comprehension_iteration_variable (test.test_named_expressions.NamedExpressionInvalidTest) (case='Local reuse') ---------------------------------------------------------------------- File "", line 1 {i := 0 for i in range(5)} ^ SyntaxError: invalid syntax During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.oldparser/build/Lib/test/test_named_expressions.py", line 185, in test_named_expression_invalid_rebinding_set_comprehension_iteration_variable exec(code, {}, {}) AssertionError: "assignment expression cannot rebind comprehension iteration variable 'i'" does not match "invalid syntax (, line 1)" ====================================================================== FAIL: test_named_expression_invalid_rebinding_set_comprehension_iteration_variable (test.test_named_expressions.NamedExpressionInvalidTest) (case='Unpacking reuse') ---------------------------------------------------------------------- File "", line 1 {i := 0 for i, j in {(0, 1)}} ^ SyntaxError: invalid syntax During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.oldparser/build/Lib/test/test_named_expressions.py", line 185, in test_named_expression_invalid_rebinding_set_comprehension_iteration_variable exec(code, {}, {}) AssertionError: "assignment expression cannot rebind comprehension iteration variable 'i'" does not match "invalid syntax (, line 1)" ====================================================================== FAIL: test_named_expression_invalid_set_comprehension_iterable_expression (test.test_named_expressions.NamedExpressionInvalidTest) (case='Inside list') ---------------------------------------------------------------------- File "", line 1 {i for i in {2, 3, i := range(5)}} ^ SyntaxError: invalid syntax During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.oldparser/build/Lib/test/test_named_expressions.py", line 218, in test_named_expression_invalid_set_comprehension_iterable_expression exec(code, {}) # Module scope AssertionError: "assignment expression cannot be used in a comprehension iterable expression" does not match "invalid syntax (, line 1)" ====================================================================== FAIL: test_ast_line_numbers_with_parentheses (test.test_fstring.TestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/buildbot/buildarea/3.9.pablogsal-arch-x86_64.oldparser/build/Lib/test/test_fstring.py", line 377, in test_ast_line_numbers_with_parentheses self.assertEqual(call.lineno, 5) AssertionError: 4 != 5 ---------- components: Tests messages: 387350 nosy: vstinner priority: normal severity: normal status: open title: AMD64 Arch Linux VintageParser 3.9: test_fstring test_named_expressions test_unpack_ex failed versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 15:40:21 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 19 Feb 2021 20:40:21 +0000 Subject: [issue43271] AMD64 Windows10 3.x crash with Windows fatal exception: stack overflow In-Reply-To: <1613766414.64.0.363657915419.issue43271@roundup.psfhosted.org> Message-ID: <1613767221.27.0.331115065102.issue43271@roundup.psfhosted.org> Steve Dower added the comment: Looks like someone increased the size of locals in the ceval functions. If any new buffers have been added recently, moving the processing into a helper function or using a single buffer instead of allocating them in separate if/case blocks can help reduce it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 15:46:42 2021 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Feb 2021 20:46:42 +0000 Subject: [issue43271] AMD64 Windows10 3.x crash with Windows fatal exception: stack overflow In-Reply-To: <1613766414.64.0.363657915419.issue43271@roundup.psfhosted.org> Message-ID: <1613767602.27.0.65560684805.issue43271@roundup.psfhosted.org> STINNER Victor added the comment: If someone wants to measure the stack memory usage per function call, _testcapi.stack_pointer() can be used: see bpo-30866. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 15:55:39 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 19 Feb 2021 20:55:39 +0000 Subject: [issue41837] Upgrade installers to OpenSSL 1.1.1i In-Reply-To: <1600822748.89.0.850484234677.issue41837@roundup.psfhosted.org> Message-ID: <1613768139.58.0.869131646965.issue41837@roundup.psfhosted.org> Steve Dower added the comment: Looks like we missed Christian's last message... Have OpenSSL made an updated release? If this issue is as bad as the short description above sounds, I expect they would have. It's possible to rebuild with the patch, but easier if it's a release. (Also, Christian, should this have been a release blocker? We just made fast releases for a security concern...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 15:57:59 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 19 Feb 2021 20:57:59 +0000 Subject: [issue30480] samefile and sameopenfile fail for WebDAV mapped drives In-Reply-To: <1495788627.48.0.260495922264.issue30480@psf.upfronthosting.co.za> Message-ID: <1613768279.49.0.0478759744106.issue30480@roundup.psfhosted.org> Steve Dower added the comment: Same as issue33935, but since the newer issue has proposed solutions on it already, I'm preferring to keep that one open. ---------- resolution: -> duplicate stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 16:00:14 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 19 Feb 2021 21:00:14 +0000 Subject: [issue42405] Add distutils mvsccompiler support for Windows ARM64 build In-Reply-To: <1605787478.54.0.45093731424.issue42405@roundup.psfhosted.org> Message-ID: <1613768414.01.0.421302202359.issue42405@roundup.psfhosted.org> Steve Dower added the comment: Closed due to PEP 632 (distutils is now deprecated). Changes to support this should go into setuptools or another build backend. I'm already trying to get some resources together to help these other projects build/test on ARM64, so that should help. If someone wants to make a start on developing the cross-compilation support (though I'm not 100% sure we'll need it...), that would be great. ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 16:02:26 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 19 Feb 2021 21:02:26 +0000 Subject: [issue42338] Enable Debug Build For Python Native Modules in Windows, with Visual Studio Toolchain In-Reply-To: <1605222375.66.0.305564714258.issue42338@roundup.psfhosted.org> Message-ID: <1613768546.35.0.547789823582.issue42338@roundup.psfhosted.org> Steve Dower added the comment: That's the best solution. Alternatively, you can install the debug binaries of CPython using the option in the installer, recompile 3rd party packages from source, and use true debug builds that way. Unfortunately, there's not much we can do about 3rd party packages being complicated to compile. You'll have to work with those projects. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 16:11:45 2021 From: report at bugs.python.org (Ned Deily) Date: Fri, 19 Feb 2021 21:11:45 +0000 Subject: [issue41837] Upgrade installers to OpenSSL 1.1.1i In-Reply-To: <1600822748.89.0.850484234677.issue41837@roundup.psfhosted.org> Message-ID: <1613769105.29.0.294615482219.issue41837@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 16:17:48 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 19 Feb 2021 21:17:48 +0000 Subject: [issue43265] [sqlite3] Improve backup error handling In-Reply-To: <1613725802.16.0.516336537835.issue43265@roundup.psfhosted.org> Message-ID: <1613769468.06.0.0726129006161.issue43265@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: The unit test suite shows one case of improved "exception text". I'd say it's an improvement. $ ./python.exe # with GH-24586 applied >>> import sqlite3 >>> c1 = sqlite3.connect(":memory:") >>> c2 = sqlite3.connect(":memory:") >>> c1.backup(c2, name="non-existing") Traceback (most recent call last): File "", line 1, in sqlite3.OperationalError: unknown database non-existing $ python3.10 # latest alpha from python.org >>> import sqlite3 >>> c1 = sqlite3.connect(":memory:") >>> c2 = sqlite3.connect(":memory:") >>> c1.backup(c2, name="non-existing") Traceback (most recent call last): File "", line 1, in sqlite3.OperationalError: SQL logic error ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 16:42:46 2021 From: report at bugs.python.org (Austin Lamb) Date: Fri, 19 Feb 2021 21:42:46 +0000 Subject: [issue42825] Build libraries with "/OPT:REF" linker optimization on Windows In-Reply-To: <1609782160.13.0.0224895080942.issue42825@roundup.psfhosted.org> Message-ID: <1613770966.22.0.675389973186.issue42825@roundup.psfhosted.org> Austin Lamb added the comment: What are the next steps for this - anything else I can provide, or is someone able to take a look at the Pull Request? Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 17:19:12 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 19 Feb 2021 22:19:12 +0000 Subject: [issue42027] /passive run of Windows installer fail silently on Win7 In-Reply-To: <1602614212.55.0.749302354325.issue42027@roundup.psfhosted.org> Message-ID: <1613773152.16.0.377231703706.issue42027@roundup.psfhosted.org> Steve Dower added the comment: Probably an easy fix, if someone has a Win7 machine around to test on (which I don't these days). There are some UI level comparisons in the bootstrapper C++ file under Tools/msi that probably need fixing. Not urgent. Won't be long until Win10 is the only one we have to worry about. ---------- priority: normal -> low stage: -> needs patch type: -> enhancement versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 17:28:36 2021 From: report at bugs.python.org (Vitaliy) Date: Fri, 19 Feb 2021 22:28:36 +0000 Subject: =?utf-8?q?=5Bissue43181=5D_Python_macros_don=E2=80=99t_shield_arguments?= In-Reply-To: <1612908350.59.0.954965139249.issue43181@roundup.psfhosted.org> Message-ID: <1613773716.12.0.45920446692.issue43181@roundup.psfhosted.org> Vitaliy added the comment: Thanks for the fix, it works for my use case. (btw that was #define U(...) __VA_ARGS__ and not what I wrote). > I don't think that PR 24533 should be backported to Python 3.8 and Python 3.9. I prefer to avoid any risk of regression, and so only change Python 3.10. > For Python 3.9 and older, a workaround is to wrap the call to PyObject_TypeCheck() with your own static inline function. For Python 3.8 that fix wouldn?t be needed as the `tp` argument was parenthesised in the macro. Yet... the first argument is still unshielded, passed to a macro that expects one single macro argument. That?s not a regression, it wasn?t shielded in 3.8 either, but why not just parenthesise each macro argument that denotes an expression (as opposed to e.g. name)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 17:51:04 2021 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 19 Feb 2021 22:51:04 +0000 Subject: [issue43271] AMD64 Windows10 3.x crash with Windows fatal exception: stack overflow In-Reply-To: <1613766414.64.0.363657915419.issue43271@roundup.psfhosted.org> Message-ID: <1613775064.52.0.118246871712.issue43271@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: +Mark.Shannon, gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 17:53:54 2021 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 19 Feb 2021 22:53:54 +0000 Subject: [issue37146] opcode cache for LOAD_GLOBAL emits false alarm in memory leak hunting In-Reply-To: <1559594083.93.0.475089830437.issue37146@roundup.psfhosted.org> Message-ID: <1613775234.76.0.618767974958.issue37146@roundup.psfhosted.org> Yury Selivanov added the comment: > Giving the ability to control the cache size, at least at Python startup, is one option. I'd really prefer not to allow users to control cache sizes. There's basically no point in that; the only practically useful thing is to enable or disable it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 17:58:00 2021 From: report at bugs.python.org (Brandt Bucher) Date: Fri, 19 Feb 2021 22:58:00 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1613775480.85.0.258628763292.issue42128@roundup.psfhosted.org> Brandt Bucher added the comment: To the folks working on docs: Does it seem realistic to have something ready by the next alpha (March 1st)? I'd like to at least have a What's New entry and a rough draft tutorial by then, since we'll probably (hopefully?) have a bunch of users jumping on that release. I can help if needed, since it looks like I'm mostly waiting on more PR review through the weekend. Or I can stay out of the way. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 17:59:13 2021 From: report at bugs.python.org (=?utf-8?q?Arkadiusz_Mi=C5=9Bkiewicz?=) Date: Fri, 19 Feb 2021 22:59:13 +0000 Subject: [issue43144] test_unicodedata: test_normalization uses network but doesn't depend on network resource In-Reply-To: <1612608486.69.0.149718284588.issue43144@roundup.psfhosted.org> Message-ID: <1613775553.83.0.290814586143.issue43144@roundup.psfhosted.org> Arkadiusz Mi?kiewicz added the comment: Sorry. Feel free to commit as own patch. It's trivial. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 18:10:55 2021 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 19 Feb 2021 23:10:55 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1613775480.85.0.258628763292.issue42128@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: I don't know who's really in charge of the docs. I suppose the PEP authors are, collectively, but that runs the risk that we're all expecting the person to our left in the circle to do it. Would people be okay if I added the tutorial from Appendix A of PEP 636 to Doc/whatsnew/3.10.rst? It's a bit shy of 200 lines, which is bigger than the largest section there currently ("Parenthesized Context Managers" is about 50 lines) but feels not unreasonable for something that's been the subject of at least 7 PEPs and reviewed by two consecutive Steering Councils. :-) The full whatsnew.rst is currently around 1000 lines. FWIW the longest what's new ever was for 2.7, at 3300 lines. 3.8 was 2200 lines. Okay, I'll just add the PR and we can take it from there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 18:19:07 2021 From: report at bugs.python.org (Brandt Bucher) Date: Fri, 19 Feb 2021 23:19:07 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1613776747.74.0.0882456490238.issue42128@roundup.psfhosted.org> Brandt Bucher added the comment: > Would people be okay if I added the tutorial from Appendix A of PEP 636 to Doc/whatsnew/3.10.rst? Yes please! It's not a huge deal, but I vote that we either drop or rework the "http_error" examples. I think it gives people a very wrong first impression that makes the rest of the behavior quite surprising. Can it be changed to build off of something familiar, like unpacking? I like 636's approach much more. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 18:25:31 2021 From: report at bugs.python.org (Brett Cannon) Date: Fri, 19 Feb 2021 23:25:31 +0000 Subject: [issue38302] [3.10] __pow__ and __rpow__ are not reached when __ipow__ returns NotImplemented for **= In-Reply-To: <1569621315.69.0.377751123288.issue38302@roundup.psfhosted.org> Message-ID: <1613777131.21.0.262784427771.issue38302@roundup.psfhosted.org> Change by Brett Cannon : ---------- pull_requests: +23367 pull_request: https://github.com/python/cpython/pull/24587 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 18:27:08 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 19 Feb 2021 23:27:08 +0000 Subject: [issue42825] Build libraries with "/OPT:REF" linker optimization on Windows In-Reply-To: <1609782160.13.0.0224895080942.issue42825@roundup.psfhosted.org> Message-ID: <1613777228.74.0.0301518092473.issue42825@roundup.psfhosted.org> Steve Dower added the comment: New changeset b4af629f4d4868ef74ee298d66259fae78c7fd89 by Austin Lamb in branch 'master': bpo-42825: Enable /OPT:REF (GH-24098) https://github.com/python/cpython/commit/b4af629f4d4868ef74ee298d66259fae78c7fd89 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 18:27:33 2021 From: report at bugs.python.org (Steve Dower) Date: Fri, 19 Feb 2021 23:27:33 +0000 Subject: [issue42825] Build libraries with "/OPT:REF" linker optimization on Windows In-Reply-To: <1609782160.13.0.0224895080942.issue42825@roundup.psfhosted.org> Message-ID: <1613777253.22.0.890193243403.issue42825@roundup.psfhosted.org> Steve Dower added the comment: The ping was enough. Thanks! ---------- assignee: -> steve.dower resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 18:38:02 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 19 Feb 2021 23:38:02 +0000 Subject: [issue37146] opcode cache for LOAD_GLOBAL emits false alarm in memory leak hunting In-Reply-To: <1559594083.93.0.475089830437.issue37146@roundup.psfhosted.org> Message-ID: <1613777882.76.0.384877293965.issue37146@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: > Or maybe need a generic -X flag to tell Python that libregrtest is tracking leaks, since we might need to change other parameters than only the opcode cache size. I think we should go this way, maybe even less "public". If we add a -X, then it will be too visible. Maybe some env variable? ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 18:38:46 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 19 Feb 2021 23:38:46 +0000 Subject: [issue43271] AMD64 Windows10 3.x crash with Windows fatal exception: stack overflow In-Reply-To: <1613766414.64.0.363657915419.issue43271@roundup.psfhosted.org> Message-ID: <1613777926.93.0.644487803046.issue43271@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 18:40:03 2021 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 19 Feb 2021 23:40:03 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1613778003.44.0.212830619596.issue42128@roundup.psfhosted.org> Change by Guido van Rossum : ---------- pull_requests: +23368 pull_request: https://github.com/python/cpython/pull/24588 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 18:43:51 2021 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 19 Feb 2021 23:43:51 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1613778231.69.0.92137101366.issue42128@roundup.psfhosted.org> Guido van Rossum added the comment: > It's not a huge deal, but I vote that we either drop or rework the "http_error" examples. I think it gives people a very wrong first impression that makes the rest of the behavior quite surprising. > > Can it be changed to build off of something familiar, like unpacking? I like 636's approach much more. So 636 Appendix A is identical to the tutorial in the README of the patma repo. It uses http errors for the very first example only, which introduces literal matching. The main text of 636 is too long for what's new IMO, and also a bit unfinished. It is meant as a gentle intro. The Appendix is meant as an intro to pattern matching for experienced Python users (the kind of people for whom the what's new series of documents is written). This tutorial takes the user from the simplest forms of patterns (literals) via more complex ones (tuples, classes) to advanced concepts like nesting patterns, and then just lists a whole bunch of other features. I started with http errors because 404 must be the world's famous number by now, well before pi or even 0 and 1. :-) See for yourself: https://github.com/python/cpython/pull/24588 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 18:51:05 2021 From: report at bugs.python.org (Austin Lamb) Date: Fri, 19 Feb 2021 23:51:05 +0000 Subject: [issue42825] Build libraries with "/OPT:REF" linker optimization on Windows In-Reply-To: <1609782160.13.0.0224895080942.issue42825@roundup.psfhosted.org> Message-ID: <1613778665.63.0.936648733291.issue42825@roundup.psfhosted.org> Austin Lamb added the comment: Thanks Steve! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 18:56:56 2021 From: report at bugs.python.org (Brandt Bucher) Date: Fri, 19 Feb 2021 23:56:56 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1613779016.07.0.650008104942.issue42128@roundup.psfhosted.org> Brandt Bucher added the comment: I understand. I would just like to see something that won't give new Python pattern-matching users (read: everybody) the very painful first impression that this is a switch. Can we rework it like: match input().split(): case []: print("Got nothing!") case [first]: print(f"Got one word: {first}") case [first, last]: print(f"Got two words: {first} and {last}") case _: print("Got more than two words!") Or something? (Pardon the example, I don't write many tutorials...) I've seen too many knee-jerk reactions over the past weeks along the lines of "the new switch feature can't handle named constants!". My hope is something like the above might provide a more accurate, informative intro. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 19:26:32 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Feb 2021 00:26:32 +0000 Subject: [issue43042] Augment tutorial sentence. In-Reply-To: <1611772942.43.0.309900316345.issue43042@roundup.psfhosted.org> Message-ID: <1613780792.3.0.237605312089.issue43042@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset b30fcba3a8abaabd1087f2392ae8aec4c1b1f210 by Terry Jan Reedy in branch 'master': bpo-43042: Augment tutorial sentence (GH-24514) https://github.com/python/cpython/commit/b30fcba3a8abaabd1087f2392ae8aec4c1b1f210 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 19:26:44 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Feb 2021 00:26:44 +0000 Subject: [issue43042] Augment tutorial sentence. In-Reply-To: <1611772942.43.0.309900316345.issue43042@roundup.psfhosted.org> Message-ID: <1613780804.35.0.0822582999825.issue43042@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +23369 pull_request: https://github.com/python/cpython/pull/24589 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 19:26:51 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Feb 2021 00:26:51 +0000 Subject: [issue43042] Augment tutorial sentence. In-Reply-To: <1611772942.43.0.309900316345.issue43042@roundup.psfhosted.org> Message-ID: <1613780811.18.0.629284976089.issue43042@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +23370 pull_request: https://github.com/python/cpython/pull/24590 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 19:29:22 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Feb 2021 00:29:22 +0000 Subject: [issue43272] AMD64 Arch Linux VintageParser 3.9: test_fstring test_named_expressions test_unpack_ex failed In-Reply-To: <1613766725.82.0.224144138609.issue43272@roundup.psfhosted.org> Message-ID: <1613780962.77.0.72523107439.issue43272@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch nosy: +pablogsal nosy_count: 1.0 -> 2.0 pull_requests: +23371 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24591 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 19:36:14 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Feb 2021 00:36:14 +0000 Subject: [issue43042] Augment tutorial sentence. In-Reply-To: <1611772942.43.0.309900316345.issue43042@roundup.psfhosted.org> Message-ID: <1613781374.04.0.669971183043.issue43042@roundup.psfhosted.org> miss-islington added the comment: New changeset a072788c57f7a40ecc53cb32f795f4ec844c0aba by Miss Islington (bot) in branch '3.8': bpo-43042: Augment tutorial sentence (GH-24514) https://github.com/python/cpython/commit/a072788c57f7a40ecc53cb32f795f4ec844c0aba ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 19:37:24 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Feb 2021 00:37:24 +0000 Subject: [issue43202] Cleanup codeop._maybe_compile In-Reply-To: <1613077616.54.0.579438220954.issue43202@roundup.psfhosted.org> Message-ID: <1613781444.23.0.560195129708.issue43202@roundup.psfhosted.org> Terry J. Reedy added the comment: Second patch: "Add comment, end others with period, remove unused variables, initialize others only when needed, and add explicit return." ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 19:47:04 2021 From: report at bugs.python.org (miss-islington) Date: Sat, 20 Feb 2021 00:47:04 +0000 Subject: [issue43042] Augment tutorial sentence. In-Reply-To: <1611772942.43.0.309900316345.issue43042@roundup.psfhosted.org> Message-ID: <1613782024.24.0.950048865197.issue43042@roundup.psfhosted.org> miss-islington added the comment: New changeset a67fd011eadfae7103ca9e0a0b0f8312e4f00b0f by Miss Islington (bot) in branch '3.9': bpo-43042: Augment tutorial sentence (GH-24514) https://github.com/python/cpython/commit/a67fd011eadfae7103ca9e0a0b0f8312e4f00b0f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 19:57:34 2021 From: report at bugs.python.org (Inada Naoki) Date: Sat, 20 Feb 2021 00:57:34 +0000 Subject: [issue43260] Never release buffer when MemoryError in print() In-Reply-To: <1613712440.26.0.95537936361.issue43260@roundup.psfhosted.org> Message-ID: <1613782654.15.0.473565996545.issue43260@roundup.psfhosted.org> Inada Naoki added the comment: This is not the problem only in the optimization. _textiowrapper_writeflush need to create buffer bytes object anyway and if it cause MemoryError, the TextIOWrapper can not flush internal buffer forever. stdout.write("small text") stdout.write("very large text") # Calls writeflush, but can not allocate buffer. This example would stuck on same situation without the optimization. But the optimization made the problem easy to happen. Now the problem happend with only one learge text. Idea to fix this problem: * If input text is large (>1M?) * Flush buffer before adding the large text to the buffer. * Encode the text and write it to self->buffer soon. Do not put it into internal buffer (self->pending_bytes). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 20:03:12 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 20 Feb 2021 01:03:12 +0000 Subject: [issue42990] Improve the C code for calling Python code: _PyEval_EvalCode() In-Reply-To: <1611245152.12.0.0348161555926.issue42990@roundup.psfhosted.org> Message-ID: <1613782992.74.0.850723350199.issue42990@roundup.psfhosted.org> Guido van Rossum added the comment: Thanks for the clarifications, Victor! So I now understand: the *identity* of the builtins dict used by a function's code is captured when the function object is created. And I understand why: it's so that in the fast path for the LOAD_GLOBAL opcode we won't have to do a dict lookup in globals to find the builtins. Regarding the text in What's New 3.10 about this at https://docs.python.org/dev/whatsnew/3.10.html#other-language-changes, I recommend adding there that func.__builtins__ is initialized from globals["__builtins__"], if it exists, else from the frame's builtins, when the function object is created; like you state in https://github.com/python/cpython/pull/24564. Or perhaps make one of these paragraphs refer to the other for details, since they are duplicate mentions of the same behavior change (once the latter PR lands). Also, thanks to you and Mark and everyone else who has worked on optimizations like the globals cache and the method cache. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 20:04:54 2021 From: report at bugs.python.org (twoone3) Date: Sat, 20 Feb 2021 01:04:54 +0000 Subject: [issue43263] threading module unable to run In-Reply-To: <1613722745.98.0.253058139819.issue43263@roundup.psfhosted.org> Message-ID: <1613783094.69.0.0415881184035.issue43263@roundup.psfhosted.org> twoone3 <3197653242 at qq.com> added the comment: Sorry, I didn't make the question clear yesterday. My operating system is Windows and the compiler used is VS2019. My project address: https://github.com/twoone-3/BDSpyrunner When I use Python.dll to import Python files, the program is stuck. After checking, I found that as long as I use multi-threading, the program will be stuck. Of course, this Python file can be directly run by Python.exe, but from My program cannot run normally when calling Python.dll The file: import threading import time def worker(): print "worker" time.sleep( 1 ) return for i in xrange ( 5 ): t = threading.Thread(target = worker) t.start() ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 20:18:52 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 20 Feb 2021 01:18:52 +0000 Subject: [issue43257] get_type_hints evaluates class variables before type hints In-Reply-To: <1613674389.7.0.662545627223.issue43257@roundup.psfhosted.org> Message-ID: <1613783932.6.0.423851458811.issue43257@roundup.psfhosted.org> Guido van Rossum added the comment: Oops, I realized it's not really a compiler bug. When the compiler sees class C: str: str = "abc" if effectively rearranges that to class C: str = "abc" __annotations__["str"] = str (where __annotations__ is initialized to {} at the start of the class scope). This goes to prove once again that silly things like str: str are an anti-pattern and should not be used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 20:33:57 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 20 Feb 2021 01:33:57 +0000 Subject: [issue42974] tokenize reports incorrect end col offset and line string when input ends without explicit newline In-Reply-To: <1611112437.84.0.130779999528.issue42974@roundup.psfhosted.org> Message-ID: <1613784837.45.0.314038018858.issue42974@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 20:36:21 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Feb 2021 01:36:21 +0000 Subject: [issue43272] AMD64 Arch Linux VintageParser 3.9: test_fstring test_named_expressions test_unpack_ex failed In-Reply-To: <1613766725.82.0.224144138609.issue43272@roundup.psfhosted.org> Message-ID: <1613784981.97.0.684798819769.issue43272@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset f9d1bf2de07131a8d80bc1e4914ee534bc5effa4 by Pablo Galindo in branch '3.9': [3.9] bpo-43272: Fix old parser test failures for backported grammar constructs (GH-24591) https://github.com/python/cpython/commit/f9d1bf2de07131a8d80bc1e4914ee534bc5effa4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 20:36:21 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Feb 2021 01:36:21 +0000 Subject: [issue43272] AMD64 Arch Linux VintageParser 3.9: test_fstring test_named_expressions test_unpack_ex failed In-Reply-To: <1613766725.82.0.224144138609.issue43272@roundup.psfhosted.org> Message-ID: <1613784981.55.0.840427008097.issue43272@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 20:40:27 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 20 Feb 2021 01:40:27 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1613779016.07.0.650008104942.issue42128@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: Let's continue this at https://github.com/python/cpython/pull/24588 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 20:41:59 2021 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Feb 2021 01:41:59 +0000 Subject: [issue43272] AMD64 Arch Linux VintageParser 3.9: test_fstring test_named_expressions test_unpack_ex failed In-Reply-To: <1613766725.82.0.224144138609.issue43272@roundup.psfhosted.org> Message-ID: <1613785319.13.0.937357059989.issue43272@roundup.psfhosted.org> STINNER Victor added the comment: Thanks for fixing this precioooooooouus buildbot worker. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 21:12:50 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Feb 2021 02:12:50 +0000 Subject: [issue43272] AMD64 Arch Linux VintageParser 3.9: test_fstring test_named_expressions test_unpack_ex failed In-Reply-To: <1613766725.82.0.224144138609.issue43272@roundup.psfhosted.org> Message-ID: <1613787170.37.0.978620440781.issue43272@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 21:21:28 2021 From: report at bugs.python.org (laurenjl) Date: Sat, 20 Feb 2021 02:21:28 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1613787688.12.0.785113816939.issue42128@roundup.psfhosted.org> laurenjl added the comment: > I've seen too many knee-jerk reactions over the past weeks along the lines of "the new switch feature can't handle named constants!". Here are some that I found interesting: https://twitter.com/jakevdp/status/1359870794877132810 https://twitter.com/brandon_rhodes/status/1360226108399099909 ---------- nosy: +laurenjl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 22:17:35 2021 From: report at bugs.python.org (Inada Naoki) Date: Sat, 20 Feb 2021 03:17:35 +0000 Subject: [issue43260] Never release buffer when MemoryError in print() In-Reply-To: <1613712440.26.0.95537936361.issue43260@roundup.psfhosted.org> Message-ID: <1613791055.32.0.606045184427.issue43260@roundup.psfhosted.org> Change by Inada Naoki : ---------- keywords: +patch pull_requests: +23372 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24592 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 23:24:43 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 20 Feb 2021 04:24:43 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1613795083.2.0.604919111378.issue42128@roundup.psfhosted.org> Guido van Rossum added the comment: Okay, I see. Clearly we should have kept the "DWIM" option, aka "If it starts with a capital letter, it's a value pattern." :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 23:27:44 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 20 Feb 2021 04:27:44 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1613795264.34.0.855638660272.issue42128@roundup.psfhosted.org> Guido van Rossum added the comment: But seriously, nothing good can come from social media. It's what drove me to retire in 2018. Just ignore it please. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 23:40:26 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 20 Feb 2021 04:40:26 +0000 Subject: [issue43260] Never release buffer when MemoryError in print() In-Reply-To: <1613712440.26.0.95537936361.issue43260@roundup.psfhosted.org> Message-ID: <1613796026.67.0.274129551452.issue43260@roundup.psfhosted.org> Eryk Sun added the comment: > stdout.write("small text") > stdout.write("very large text") # Calls writeflush, but can not allocate buffer. Without the optimization, in most cases this will likely fail in _io_TextIOWrapper_write_impl() at the line `b = (*self->encodefunc)((PyObject *) self, text)`. In some cases, it could be that the latter succeeds, but its size combined with the existing pending_bytes_count leads to a memory error in _textiowrapper_writeflush(). > * If input text is large (>1M?) I'd change write() to only optimize ASCII writes so long as the new total size of pending writes would not exceed the text wrapper's chunk size. Then rearrange the logic to pre-flush the text wrapper if the pending bytes plus the write would exceed the chunk size. Thus the total size of a list of pending writes (aggregating small writes as a chunk), or that of a single ASCII str() object, would be limited to the chunk size, in which case PyBytes_FromStringAndSize in _textiowrapper_writeflush() shouldn't fail in any normal circumstances. For example: if (self->encodefunc != NULL) { [NEW CONDITION] if (PyUnicode_IS_ASCII(text) && (PyUnicode_GET_LENGTH(text) + (self->pending_bytes ? self->pending_bytes_count : 0)) <= self->chunk_size && is_asciicompat_encoding(self->encodefunc)) { b = text; Py_INCREF(b); } else { b = (*self->encodefunc)((PyObject *) self, text); } self->encoding_start_of_stream = 0; } else { b = PyObject_CallMethodOneArg(self->encoder, _PyIO_str_encode, text); } Py_DECREF(text); if (b == NULL) return NULL; if (b != text && !PyBytes_Check(b)) { PyErr_Format(PyExc_TypeError, "encoder should return a bytes object, not '%.200s'", Py_TYPE(b)->tp_name); Py_DECREF(b); return NULL; } Py_ssize_t bytes_len; if (b == text) { bytes_len = PyUnicode_GET_LENGTH(b); } else { bytes_len = PyBytes_GET_SIZE(b); } if (self->pending_bytes == NULL) { self->pending_bytes_count = 0; self->pending_bytes = b; } [NEW PRE-FLUSH] else if ((self->pending_bytes_count + bytes_len) > self->chunk_size) { if (_textiowrapper_writeflush(self) < 0) { Py_DECREF(b); return NULL; } self->pending_bytes = b; } else if (!PyList_CheckExact(self->pending_bytes)) { PyObject *list = PyList_New(2); if (list == NULL) { Py_DECREF(b); return NULL; } PyList_SET_ITEM(list, 0, self->pending_bytes); PyList_SET_ITEM(list, 1, b); self->pending_bytes = list; } else { if (PyList_Append(self->pending_bytes, b) < 0) { Py_DECREF(b); return NULL; } Py_DECREF(b); } self->pending_bytes_count += bytes_len; if (self->pending_bytes_count > self->chunk_size || needflush || text_needflush) { if (_textiowrapper_writeflush(self) < 0) return NULL; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 19 23:53:52 2021 From: report at bugs.python.org (Inada Naoki) Date: Sat, 20 Feb 2021 04:53:52 +0000 Subject: [issue43260] Never release buffer when MemoryError in print() In-Reply-To: <1613712440.26.0.95537936361.issue43260@roundup.psfhosted.org> Message-ID: <1613796832.36.0.750242462837.issue43260@roundup.psfhosted.org> Inada Naoki added the comment: In your code, huge data passed to .write(huge) may be remained in the internal buffer. ``` [NEW PRE-FLUSH] else if ((self->pending_bytes_count + bytes_len) > self->chunk_size) { if (_textiowrapper_writeflush(self) < 0) { Py_DECREF(b); return NULL; } self->pending_bytes = b; } (snip) self->pending_bytes_count += bytes_len; if (self->pending_bytes_count > self->chunk_size || needflush || text_needflush) { if (_textiowrapper_writeflush(self) < 0) return NULL; } ``` In my opinion, when .write(huge) fails with MemoryError, TextIOWrapper must not keep the `huge` in the internal buffer. See my PR-24592. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 00:07:41 2021 From: report at bugs.python.org (Carol Willing) Date: Sat, 20 Feb 2021 05:07:41 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1613795264.34.0.855638660272.issue42128@roundup.psfhosted.org> Message-ID: Carol Willing added the comment: @Brandt Bucher @Guido van Rossum I'm finally getting some free time to get the docs workgroup up and running. I'm happy to help with any docs that you want for alpha and beyond. On Fri, Feb 19, 2021 at 8:27 PM Guido van Rossum wrote: > > Guido van Rossum added the comment: > > But seriously, nothing good can come from social media. It's what drove me > to retire in 2018. Just ignore it please. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________________ > Python-bugs-list mailing list > Unsubscribe: > https://mail.python.org/mailman/options/python-bugs-list/willingc%40gmail.com > > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 00:14:34 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 20 Feb 2021 05:14:34 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: Message-ID: Guido van Rossum added the comment: Carol, the most urgent thing we have going is to come up with text for what's new. I posted a PR that adds my standard "quick" tutorial ( https://github.com/python/cpython/pull/24588) which is also found in Appendix A of PEP 636 (the tutorial PEP -- the specification PEP 634 has a different Appendix A :-), but we are worried that this is going to mislead people into thinking "Oh, this is a switch with a funny name" -- which is exactly what we don't want (see Jake vd Plas Tweet at https://twitter.com/jakevdp/status/1359870794877132810). Having stared at this for way too long already I think I'm not able to come up with a better way to present this *quickly* in a format that's appropriate for What's New (concise, highlights only, meant for existing fairly experienced Python users). Do you think you can help? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 00:14:36 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Feb 2021 05:14:36 +0000 Subject: [issue27646] doc: yield from expression can be any iterable In-Reply-To: <1469730650.89.0.176012351897.issue27646@psf.upfronthosting.co.za> Message-ID: <1613798076.02.0.735676324383.issue27646@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +23373 pull_request: https://github.com/python/cpython/pull/24595 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 00:20:02 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 20 Feb 2021 05:20:02 +0000 Subject: [issue43260] Never release buffer when MemoryError in print() In-Reply-To: <1613712440.26.0.95537936361.issue43260@roundup.psfhosted.org> Message-ID: <1613798401.99.0.464984107092.issue43260@roundup.psfhosted.org> Eryk Sun added the comment: > In your code, huge data passed to .write(huge) may be > remained in the internal buffer. If you mean the buffered writer, then I don't see the problem. A large bytes object in pending_bytes gets temporarily referenced by _textiowrapper_writeflush(), and self->pending_bytes is cleared. If the buffer's write() method fails, then the bytes object is simply deallocated. If you mean pending_bytes in the text wrapper, then I also don't see the problem. It always gets flushed if pending_bytes_count exceeds the chunk size. If pending_bytes is a list, it never exceeds the chunk size. It gets pre-flushed to avoid growing beyond the chunk size. If pending_bytes isn't a list, then it can only exceed the chunk size if it's a bytes object -- never for an ASCII str() object. _textiowrapper_writeflush() does not call PyBytes_AsStringAndSize() for that case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 00:33:15 2021 From: report at bugs.python.org (Carol Willing) Date: Sat, 20 Feb 2021 05:33:15 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: Message-ID: Carol Willing added the comment: Absolutely, I can help do that. On Fri, Feb 19, 2021 at 9:14 PM Guido van Rossum wrote: > > Guido van Rossum added the comment: > > Carol, the most urgent thing we have going is to come up with text for > what's new. I posted a PR that adds my standard "quick" tutorial ( > https://github.com/python/cpython/pull/24588) which is also found in > Appendix A of PEP 636 (the tutorial PEP -- the specification PEP 634 has a > different Appendix A :-), but we are worried that this is going to mislead > people into thinking "Oh, this is a switch with a funny name" -- which is > exactly what we don't want (see Jake vd Plas Tweet at > https://twitter.com/jakevdp/status/1359870794877132810). Having stared at > this for way too long already I think I'm not able to come up with a better > way to present this *quickly* in a format that's appropriate for What's New > (concise, highlights only, meant for existing fairly experienced Python > users). Do you think you can help? > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________________ > Python-bugs-list mailing list > Unsubscribe: > https://mail.python.org/mailman/options/python-bugs-list/willingc%40gmail.com > > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 01:19:44 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 20 Feb 2021 06:19:44 +0000 Subject: [issue40522] [subinterpreters] Get the current Python interpreter state from Thread Local Storage (autoTSSkey) In-Reply-To: <1588698734.65.0.223552100195.issue40522@roundup.psfhosted.org> Message-ID: <1613801984.57.0.815415303115.issue40522@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +23374 pull_request: https://github.com/python/cpython/pull/24596 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 01:24:30 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 20 Feb 2021 06:24:30 +0000 Subject: [issue40522] [subinterpreters] Get the current Python interpreter state from Thread Local Storage (autoTSSkey) In-Reply-To: <1588698734.65.0.223552100195.issue40522@roundup.psfhosted.org> Message-ID: <1613802270.74.0.0851805140897.issue40522@roundup.psfhosted.org> Change by Dong-hee Na : ---------- pull_requests: +23375 pull_request: https://github.com/python/cpython/pull/24597 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 01:28:51 2021 From: report at bugs.python.org (Inada Naoki) Date: Sat, 20 Feb 2021 06:28:51 +0000 Subject: [issue43260] Never release buffer when MemoryError in print() In-Reply-To: <1613712440.26.0.95537936361.issue43260@roundup.psfhosted.org> Message-ID: <1613802531.89.0.1153863108.issue43260@roundup.psfhosted.org> Inada Naoki added the comment: You are right. I misunderstood. ``` if (PyUnicode_IS_ASCII(text) && (PyUnicode_GET_LENGTH(text) + (self->pending_bytes ? self->pending_bytes_count : 0)) <= self->chunk_size && is_asciicompat_encoding(self->encodefunc)) { b = text; Py_INCREF(b); } ``` This seems too complex and defensive. Isn't `PyUnicode_GET_LENGTH(text) < self->chunk_size` enough? When `PyUnicode_GET_LENGTH(text) + self->pending_bytes_count > self->chunk_size`, `self->pending_bytes` is preflushed anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 01:36:16 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 20 Feb 2021 06:36:16 +0000 Subject: [issue41859] IDLE: ValueError; Completions not working right on macOS In-Reply-To: <1601007125.39.0.397372093674.issue41859@roundup.psfhosted.org> Message-ID: <1613802976.26.0.750786387279.issue41859@roundup.psfhosted.org> Terry J. Reedy added the comment: This seemingly random error involved completions and there is already an issue about them not working right on macOS. It was also opened by Raymond as a result of another 'random' error in an all day session. ---------- components: +macOS nosy: +ned.deily, ronaldoussoren resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> IDLE: problems with completions on Mac title: Uncaught ValueError -> IDLE: ValueError; Completions not working right on macOS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 01:38:42 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 20 Feb 2021 06:38:42 +0000 Subject: [issue43228] Regression in function builtins In-Reply-To: <1613396595.98.0.792771642012.issue43228@roundup.psfhosted.org> Message-ID: <1613803122.92.0.327658475285.issue43228@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 01:42:31 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 20 Feb 2021 06:42:31 +0000 Subject: [issue43248] platform.libc_ver() returns no information on Alpine Linux In-Reply-To: <1613646818.72.0.219281463951.issue43248@roundup.psfhosted.org> Message-ID: <1613803351.57.0.375992964169.issue43248@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 01:43:44 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 20 Feb 2021 06:43:44 +0000 Subject: [issue43260] Never release buffer when MemoryError in print() In-Reply-To: <1613712440.26.0.95537936361.issue43260@roundup.psfhosted.org> Message-ID: <1613803424.32.0.176758109612.issue43260@roundup.psfhosted.org> Eryk Sun added the comment: > Isn't `PyUnicode_GET_LENGTH(text) < self->chunk_size` enough? Yes, that's simpler, except with `<=`" instead of `<`, since the maximum count is chunk_size when pending_bytes is a list or ASCII string. When I wrote the more complex check, I did't take into account that pending_bytes would be flushed anyway if it causes pending_bytes_count to exceed chunk_size. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 01:45:01 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 20 Feb 2021 06:45:01 +0000 Subject: [issue43248] platform.libc_ver() returns no information on Alpine Linux In-Reply-To: <1613646818.72.0.219281463951.issue43248@roundup.psfhosted.org> Message-ID: <1613803501.51.0.937027013365.issue43248@roundup.psfhosted.org> Dong-hee Na added the comment: @Omer.Katz This issue should be fixed, feel free to submit the PR ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 03:30:41 2021 From: report at bugs.python.org (Ramin Farajpour Cami) Date: Sat, 20 Feb 2021 08:30:41 +0000 Subject: [issue43260] Never release buffer when MemoryError in print() In-Reply-To: <1613712440.26.0.95537936361.issue43260@roundup.psfhosted.org> Message-ID: <1613809841.51.0.736092034518.issue43260@roundup.psfhosted.org> Change by Ramin Farajpour Cami : ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 03:44:25 2021 From: report at bugs.python.org (Richard Wise) Date: Sat, 20 Feb 2021 08:44:25 +0000 Subject: [issue43273] Mock `_mock_wraps` is undocumented and inconsistently named Message-ID: <1613810665.37.0.436661907336.issue43273@roundup.psfhosted.org> New submission from Richard Wise : I am trying to use wraps to delegate a call to a decorated patch mock to another method. By examining the source code, I was able to achieve this using the (apparently undocumented) `Mock._mock_wraps` attribute instead of the `wraps` attribute which would be expected given the constructor parameter names. I find this behaviour very confusing and inconsistent. Can we either expose `Mock.wraps` attribute or document `_mock_wraps` accordingly? Example: class MockRepro(unittest.TestCase) @patch('foo') def test_side_effect(self, mock_foo): # Set side effect in constructor as per https://docs.python.org/3/library/unittest.mock.html#unittest.mock.Mock Mock(side_effect = [1, 2]) # Or can set on decorated patch foo.side_effect = [1, 2] @patch('foo') def test_wraps(self, mock_foo): def wrapped_method(): return 3 # Set wraps in constructor as per https://docs.python.org/3/library/unittest.mock.html#unittest.mock.Mock Mock(wraps=wrapped_method) # Or can set on decorated patch foo.wraps = wrapped_method # This silently fails foo._mock_wraps = wrapped_method # Where does `_mock_wraps` come from? ---------- components: Library (Lib) messages: 387397 nosy: Woodz priority: normal severity: normal status: open title: Mock `_mock_wraps` is undocumented and inconsistently named versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 04:24:37 2021 From: report at bugs.python.org (Webstar Website) Date: Sat, 20 Feb 2021 09:24:37 +0000 Subject: [issue43274] Backlinks Strong decouverte SSL Message-ID: <1613813077.14.0.66972535006.issue43274@roundup.psfhosted.org> New submission from Webstar Website : Comment puis-je savoir si mon python g?n?r? ? la source a activ? SSL il faut obtenir l'information suivante : de savoir si opensslest est install?, vous pouvez analyser la sortie de openssl version: $ openssl version OpenSSL 1.0.2g-fips 1 Mar 2016 on obtient l? toutes sortes d'informations ? partir de cette version, par exemple, du r?pertoire o? elles sont stock?es: $ openssl version -d OPENSSLDIR: "/usr/lib/ssl" ---------- assignee: christian.heimes components: SSL messages: 387398 nosy: christian.heimes, webstarnantes priority: normal severity: normal status: open title: Backlinks Strong decouverte SSL versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 04:33:56 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 20 Feb 2021 09:33:56 +0000 Subject: [issue43274] Backlinks Strong decouverte SSL In-Reply-To: <1613813077.14.0.66972535006.issue43274@roundup.psfhosted.org> Message-ID: <1613813636.61.0.884417591734.issue43274@roundup.psfhosted.org> Christian Heimes added the comment: Could you please repost your question in English? I don't speak French and Google translate output is incomprehensible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 04:54:30 2021 From: report at bugs.python.org (Webstar Website) Date: Sat, 20 Feb 2021 09:54:30 +0000 Subject: =?utf-8?q?=5Bissue37146=5D_SSl_Securit=C3=A9_version_3=2E9=2E2?= In-Reply-To: <1559594083.93.0.475089830437.issue37146@roundup.psfhosted.org> Message-ID: <1613814870.65.0.111369094309.issue37146@roundup.psfhosted.org> Webstar Website added the comment: dans cette version pour securit? maximale SSLContext.wrap_socket() import socket import ssl hostname = 'www.python.org' context = ssl.create_default_context() with socket.create_connection((hostname, 443)) as sock: with context.wrap_socket(sock, server_hostname=hostname) as ssock: print(ssock.version()) https://backlinkstrong.com/ ---------- assignee: -> christian.heimes components: +SSL -Interpreter Core nosy: +christian.heimes, webstarnantes title: opcode cache for LOAD_GLOBAL emits false alarm in memory leak hunting -> SSl Securit? version 3.9.2 type: -> security versions: +Python 3.9 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 05:26:31 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 20 Feb 2021 10:26:31 +0000 Subject: [issue37146] opcode cache for LOAD_GLOBAL emits false alarm in memory leak hunting In-Reply-To: <1559594083.93.0.475089830437.issue37146@roundup.psfhosted.org> Message-ID: <1613816791.07.0.746756454164.issue37146@roundup.psfhosted.org> Change by Christian Heimes : ---------- components: +Interpreter Core -SSL nosy: -christian.heimes title: SSl Securit? version 3.9.2 -> opcode cache for LOAD_GLOBAL emits false alarm in memory leak hunting type: security -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 07:14:33 2021 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Feb 2021 12:14:33 +0000 Subject: [issue42990] Improve the C code for calling Python code: _PyEval_EvalCode() In-Reply-To: <1611245152.12.0.0348161555926.issue42990@roundup.psfhosted.org> Message-ID: <1613823273.49.0.304650831422.issue42990@roundup.psfhosted.org> STINNER Victor added the comment: > Regarding the text in What's New 3.10 about this at https://docs.python.org/dev/whatsnew/3.10.html#other-language-changes, I recommend adding there that func.__builtins__ is initialized from globals["__builtins__"], if it exists, else from the frame's builtins, when the function object is created; like you state in https://github.com/python/cpython/pull/24564. Good idea, I updated my PR. > Or perhaps make one of these paragraphs refer to the other for details, since they are duplicate mentions of the same behavior change (once the latter PR lands). IMO it's useful to have two different paragraphs. One about the new attribute which is not really a semantics change, and one about the semantics changes when globals["__builtins__"] doesn't exist. For people who only care about Python 3.10 incompatible changes, they can simply read the Porting to Python 3.10 > Changes in the Python API section ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 07:42:33 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Feb 2021 12:42:33 +0000 Subject: [issue43251] [sqlite3] sqlite3_column_name() failures should raise MemoryError In-Reply-To: <1613647354.29.0.206061609144.issue43251@roundup.psfhosted.org> Message-ID: <1613824953.47.0.294248015295.issue43251@roundup.psfhosted.org> Serhiy Storchaka added the comment: It also returns NULL if the column name was not set (is it even possible?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 07:54:29 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sat, 20 Feb 2021 12:54:29 +0000 Subject: [issue43251] [sqlite3] sqlite3_column_name() failures should raise MemoryError In-Reply-To: <1613647354.29.0.206061609144.issue43251@roundup.psfhosted.org> Message-ID: <1613825669.56.0.746043038646.issue43251@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: That's inside sqlite3_value_text() and friends, then? Let's investigate further before concluding. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 08:17:23 2021 From: report at bugs.python.org (star2000) Date: Sat, 20 Feb 2021 13:17:23 +0000 Subject: [issue43275] Add a `.gitignore` file with content `*` in the root folder generated by venv module Message-ID: <1613827043.02.0.761895659665.issue43275@roundup.psfhosted.org> New submission from star2000 : In this way, you don't need to add `venv` to `.gitignore` at the root of each project. ---------- messages: 387404 nosy: star2000 priority: normal severity: normal status: open title: Add a `.gitignore` file with content `*` in the root folder generated by venv module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 08:21:26 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Feb 2021 13:21:26 +0000 Subject: [issue43251] [sqlite3] sqlite3_column_name() failures should raise MemoryError In-Reply-To: <1613647354.29.0.206061609144.issue43251@roundup.psfhosted.org> Message-ID: <1613827286.3.0.278348914976.issue43251@roundup.psfhosted.org> Serhiy Storchaka added the comment: Investigate where column names are initialized and whether is it possible to get them NULLs. The array of column names is filled with NULLs when initialized and later it is filled with references to strings. I am wondering whether there is a gap between this which lefts some column names as NULLs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 08:26:39 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 20 Feb 2021 13:26:39 +0000 Subject: [issue43275] Add a `.gitignore` file with content `*` in the root folder generated by venv module In-Reply-To: <1613827043.02.0.761895659665.issue43275@roundup.psfhosted.org> Message-ID: <1613827599.99.0.121141616186.issue43275@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: This seems to be a duplicate of https://bugs.python.org/issue39236 ---------- nosy: +brett.cannon, vinay.sajip, xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 08:47:34 2021 From: report at bugs.python.org (star2000) Date: Sat, 20 Feb 2021 13:47:34 +0000 Subject: [issue43275] [venv] Add a `.gitignore` file with content `*` in the root folder generated by venv module In-Reply-To: <1613827043.02.0.761895659665.issue43275@roundup.psfhosted.org> Message-ID: <1613828854.79.0.812922757425.issue43275@roundup.psfhosted.org> star2000 added the comment: I still think the advantages outweigh the disadvantages. ---------- components: +Library (Lib) resolution: -> duplicate stage: -> resolved status: open -> closed title: Add a `.gitignore` file with content `*` in the root folder generated by venv module -> [venv] Add a `.gitignore` file with content `*` in the root folder generated by venv module type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 09:17:25 2021 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Feb 2021 14:17:25 +0000 Subject: [issue42990] Improve the C code for calling Python code: _PyEval_EvalCode() In-Reply-To: <1611245152.12.0.0348161555926.issue42990@roundup.psfhosted.org> Message-ID: <1613830645.32.0.604811475503.issue42990@roundup.psfhosted.org> STINNER Victor added the comment: New changeset 46496f9d12582bf11f4911ad0f23315d6f277907 by Victor Stinner in branch 'master': bpo-42990: Functions inherit current builtins (GH-24564) https://github.com/python/cpython/commit/46496f9d12582bf11f4911ad0f23315d6f277907 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 09:40:12 2021 From: report at bugs.python.org (Daniel Moisset) Date: Sat, 20 Feb 2021 14:40:12 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1613832012.46.0.709946096956.issue42128@roundup.psfhosted.org> Daniel Moisset added the comment: Fyi, I'm looking into the documentation. I think I can have something basic for the middle of this week, so it should be ok for March 1st. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 09:41:31 2021 From: report at bugs.python.org (Daniel Moisset) Date: Sat, 20 Feb 2021 14:41:31 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1613832091.32.0.00346271718979.issue42128@roundup.psfhosted.org> Daniel Moisset added the comment: Note: I will NOT write something for "What's New in 3.10" seeing that's in progress ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 11:39:15 2021 From: report at bugs.python.org (parsa mpsh) Date: Sat, 20 Feb 2021 16:39:15 +0000 Subject: [issue43276] add `false` and `true` keywords (aliases) for True and False Message-ID: <1613839155.27.0.1262506351.issue43276@roundup.psfhosted.org> New submission from parsa mpsh : I wanna add `true` and `false` aliases for `True` and `False` keywords. Currently my patch is ready and i will send it as a pull request. ---------- messages: 387411 nosy: parsampsh priority: normal severity: normal status: open title: add `false` and `true` keywords (aliases) for True and False type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 11:47:33 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Feb 2021 16:47:33 +0000 Subject: [issue43276] add `false` and `true` keywords (aliases) for True and False In-Reply-To: <1613839155.27.0.1262506351.issue43276@roundup.psfhosted.org> Message-ID: <1613839653.19.0.730439474344.issue43276@roundup.psfhosted.org> Serhiy Storchaka added the comment: You can do it yourself in your script. It is just two lines of code: true = True false = False And it works in all Python versions! ---------- nosy: +serhiy.storchaka resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 11:48:37 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Feb 2021 16:48:37 +0000 Subject: [issue43277] Add PySet_CheckExact Message-ID: <1613839717.86.0.726302240391.issue43277@roundup.psfhosted.org> New submission from Pablo Galindo Salgado : For some mysterious reason we have PySet_Check, PyFrozenSet_Check, PyAnySet_Check, PyAnySet_CheckExact and PyFrozenSet_CheckExact but no PySet_CheckExact ---------- components: C API messages: 387413 nosy: pablogsal priority: normal severity: normal status: open title: Add PySet_CheckExact versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 11:50:00 2021 From: report at bugs.python.org (parsa mpsh) Date: Sat, 20 Feb 2021 16:50:00 +0000 Subject: [issue43276] add `false` and `true` keywords (aliases) for True and False In-Reply-To: <1613839155.27.0.1262506351.issue43276@roundup.psfhosted.org> Message-ID: <1613839800.62.0.253023130474.issue43276@roundup.psfhosted.org> parsa mpsh added the comment: Yes i know this. but why not adding this builtin? this will be very nice! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 11:52:42 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Feb 2021 16:52:42 +0000 Subject: [issue43277] Add PySet_CheckExact In-Reply-To: <1613839717.86.0.726302240391.issue43277@roundup.psfhosted.org> Message-ID: <1613839962.47.0.678447516063.issue43277@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +23376 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24598 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 11:55:59 2021 From: report at bugs.python.org (parsa mpsh) Date: Sat, 20 Feb 2021 16:55:59 +0000 Subject: [issue43276] add `false` and `true` keywords (aliases) for True and False In-Reply-To: <1613839155.27.0.1262506351.issue43276@roundup.psfhosted.org> Message-ID: <1613840159.46.0.694569847763.issue43276@roundup.psfhosted.org> parsa mpsh added the comment: Also adding them as builtin keywords will make it easier than setting them as variables. in this method, we should define them everywhere, but in builtin type its easy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 12:00:48 2021 From: report at bugs.python.org (Berker Peksag) Date: Sat, 20 Feb 2021 17:00:48 +0000 Subject: [issue43265] [sqlite3] Improve backup error handling In-Reply-To: <1613725802.16.0.516336537835.issue43265@roundup.psfhosted.org> Message-ID: <1613840448.63.0.741040071752.issue43265@roundup.psfhosted.org> Berker Peksag added the comment: I'd even consider a cryptic error message a minor usability bug and backport it to at least 3.10. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 12:02:21 2021 From: report at bugs.python.org (Joseph Shen) Date: Sat, 20 Feb 2021 17:02:21 +0000 Subject: [issue43278] Inconsistent behavior of Py_GetCompiler() Message-ID: <1613840541.54.0.110258286705.issue43278@roundup.psfhosted.org> New submission from Joseph Shen : The function Py_GetCompiler() return the version info with a leading '\n' when build with GCC/clang, while without this on other compilers. This inconsistent make the REPL print the 'welcome message' quit different, which I think is not we expect. >From the snapshot images, we can see, when compiler with MSVC, the 'welcome message' has two lines, but with GCC it is 3 lines, which two lines is what expected. Patch is given in the github rp, thanks for review. ---------- components: C API files: explorer_lN3ARB7gnj.png messages: 387417 nosy: josephsmeng priority: normal pull_requests: 23377 severity: normal status: open title: Inconsistent behavior of Py_GetCompiler() type: behavior Added file: https://bugs.python.org/file49824/explorer_lN3ARB7gnj.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 12:10:44 2021 From: report at bugs.python.org (parsa mpsh) Date: Sat, 20 Feb 2021 17:10:44 +0000 Subject: [issue43276] add `false` and `true` keywords (aliases) for True and False In-Reply-To: <1613839155.27.0.1262506351.issue43276@roundup.psfhosted.org> Message-ID: <1613841044.11.0.240942702777.issue43276@roundup.psfhosted.org> Change by parsa mpsh : ---------- pull_requests: +23378 pull_request: https://github.com/python/cpython/pull/24600 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 12:16:52 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sat, 20 Feb 2021 17:16:52 +0000 Subject: [issue43265] [sqlite3] Improve backup error handling In-Reply-To: <1613725802.16.0.516336537835.issue43265@roundup.psfhosted.org> Message-ID: <1613841412.73.0.905333126048.issue43265@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: 3.9, I presume? Yeah, I guess so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 12:18:42 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sat, 20 Feb 2021 17:18:42 +0000 Subject: [issue43265] [sqlite3] Improve backup error handling In-Reply-To: <1613725802.16.0.516336537835.issue43265@roundup.psfhosted.org> Message-ID: <1613841522.6.0.723435157007.issue43265@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Regarding 1: After thinking about it, I see nothing wrong with raising ValueError error. No need to change current behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 12:20:02 2021 From: report at bugs.python.org (parsa mpsh) Date: Sat, 20 Feb 2021 17:20:02 +0000 Subject: [issue43276] add `false` and `true` keywords (aliases) for True and False In-Reply-To: <1613839155.27.0.1262506351.issue43276@roundup.psfhosted.org> Message-ID: <1613841602.84.0.714040623202.issue43276@roundup.psfhosted.org> parsa mpsh added the comment: I sent a PR: https://github.com/python/cpython/pull/24600 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 12:28:25 2021 From: report at bugs.python.org (Berker Peksag) Date: Sat, 20 Feb 2021 17:28:25 +0000 Subject: [issue43265] [sqlite3] Improve backup error handling In-Reply-To: <1613725802.16.0.516336537835.issue43265@roundup.psfhosted.org> Message-ID: <1613842105.33.0.224196760836.issue43265@roundup.psfhosted.org> Berker Peksag added the comment: > 3.9, I presume? Yes, I was going too fast :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 12:29:27 2021 From: report at bugs.python.org (Berker Peksag) Date: Sat, 20 Feb 2021 17:29:27 +0000 Subject: [issue43265] [sqlite3] Improve backup error handling In-Reply-To: <1613725802.16.0.516336537835.issue43265@roundup.psfhosted.org> Message-ID: <1613842167.17.0.215747788617.issue43265@roundup.psfhosted.org> Change by Berker Peksag : Removed file: https://bugs.python.org/file49823/DOC-20200420-WA0000 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 12:49:15 2021 From: report at bugs.python.org (Illia Volochii) Date: Sat, 20 Feb 2021 17:49:15 +0000 Subject: [issue43279] Update code taken from Keccak Code Package Message-ID: <1613843355.04.0.232424254564.issue43279@roundup.psfhosted.org> New submission from Illia Volochii : There were some updates to the Keccak package (https://github.com/XKCP/XKCP) since it was integrated in CPython initially. I will submit a pull request soon ---------- components: Extension Modules messages: 387422 nosy: christian.heimes, illia-v priority: normal severity: normal status: open title: Update code taken from Keccak Code Package type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 13:03:16 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Feb 2021 18:03:16 +0000 Subject: [issue43277] Add PySet_CheckExact In-Reply-To: <1613839717.86.0.726302240391.issue43277@roundup.psfhosted.org> Message-ID: <1613844196.01.0.798814680607.issue43277@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset d439fb304ca3098aab1ed0a314996f9d29347b21 by Pablo Galindo in branch 'master': bpo-43277: Add PySet_CheckExact to the C-API (GH-24598) https://github.com/python/cpython/commit/d439fb304ca3098aab1ed0a314996f9d29347b21 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 13:04:02 2021 From: report at bugs.python.org (Lysandros Nikolaou) Date: Sat, 20 Feb 2021 18:04:02 +0000 Subject: [issue34013] Inconsistent SyntaxError for print In-Reply-To: <1530380578.04.0.56676864532.issue34013@psf.upfronthosting.co.za> Message-ID: <1613844242.75.0.0283719814345.issue34013@roundup.psfhosted.org> Change by Lysandros Nikolaou : ---------- nosy: +lys.nikolaou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 13:05:33 2021 From: report at bugs.python.org (Illia Volochii) Date: Sat, 20 Feb 2021 18:05:33 +0000 Subject: [issue43279] Update code taken from Keccak Code Package In-Reply-To: <1613843355.04.0.232424254564.issue43279@roundup.psfhosted.org> Message-ID: <1613844333.23.0.281986061286.issue43279@roundup.psfhosted.org> Change by Illia Volochii : ---------- keywords: +patch pull_requests: +23379 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24601 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 13:05:41 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sat, 20 Feb 2021 18:05:41 +0000 Subject: [issue43277] Add PySet_CheckExact In-Reply-To: <1613839717.86.0.726302240391.issue43277@roundup.psfhosted.org> Message-ID: <1613844341.62.0.993886394305.issue43277@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 13:38:06 2021 From: report at bugs.python.org (Illia Volochii) Date: Sat, 20 Feb 2021 18:38:06 +0000 Subject: [issue42981] Error messages raised by _hashlib_scrypt_impl() are slightly misleading In-Reply-To: <1611169358.29.0.992442760668.issue42981@roundup.psfhosted.org> Message-ID: <1613846286.93.0.977077155608.issue42981@roundup.psfhosted.org> Change by Illia Volochii : ---------- resolution: -> wont fix stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 13:39:57 2021 From: report at bugs.python.org (Christian Heimes) Date: Sat, 20 Feb 2021 18:39:57 +0000 Subject: [issue43279] Update code taken from Keccak Code Package In-Reply-To: <1613843355.04.0.232424254564.issue43279@roundup.psfhosted.org> Message-ID: <1613846397.91.0.00863436570574.issue43279@roundup.psfhosted.org> Christian Heimes added the comment: Please hold off. Once PEP 644 gets accepted, I'm going to remove our copy of Keccak and _sha3 module entirely. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 14:08:41 2021 From: report at bugs.python.org (Ned Deily) Date: Sat, 20 Feb 2021 19:08:41 +0000 Subject: [issue41837] Upgrade installers to OpenSSL 1.1.1j In-Reply-To: <1600822748.89.0.850484234677.issue41837@roundup.psfhosted.org> Message-ID: <1613848121.57.0.346172524248.issue41837@roundup.psfhosted.org> Ned Deily added the comment: 1.1.1j was issued earlier this week and, from browsing the source, it appears that this fix is included (it's not mentioned as a major issue) along with other fixes. So I assume we just need to update the installers to use 1.1.1j. The question is then do need to push updated installers for 3.9.x and 3.8.x? Setting to "deferred blocker" pending a decision. @Christian? @?ukasz? ---------- priority: high -> deferred blocker title: Upgrade installers to OpenSSL 1.1.1i -> Upgrade installers to OpenSSL 1.1.1j _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 15:05:58 2021 From: report at bugs.python.org (Fabian Brinkmann) Date: Sat, 20 Feb 2021 20:05:58 +0000 Subject: [issue43280] addition argument for str.join() Message-ID: <1613851558.65.0.682568061448.issue43280@roundup.psfhosted.org> New submission from Fabian Brinkmann : It would be nice to have an additional argument for str.join() so this ", ".join(["a", "b", "c"], ", and ") would output "a, b, and, c" ---------- components: Library (Lib) messages: 387426 nosy: f-brinkmann priority: normal severity: normal status: open title: addition argument for str.join() type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 15:06:20 2021 From: report at bugs.python.org (Fabian Brinkmann) Date: Sat, 20 Feb 2021 20:06:20 +0000 Subject: [issue43280] additional argument for str.join() In-Reply-To: <1613851558.65.0.682568061448.issue43280@roundup.psfhosted.org> Message-ID: <1613851580.88.0.292927300116.issue43280@roundup.psfhosted.org> Change by Fabian Brinkmann : ---------- title: addition argument for str.join() -> additional argument for str.join() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 16:37:56 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Sat, 20 Feb 2021 21:37:56 +0000 Subject: [issue43280] additional argument for str.join() In-Reply-To: <1613851558.65.0.682568061448.issue43280@roundup.psfhosted.org> Message-ID: <1613857076.11.0.802472558951.issue43280@roundup.psfhosted.org> Dennis Sweeney added the comment: This seems like a very specific use case. Too specific IMO for a method on all string objects for anyone using Python anywhere in the world. Why not just write a function like this? def my_join(strings, sep=", ", last_sep=", and "): strings = list(strings) return sep.join(strings[:-1]) + last_sep + strings[-1] >>> my_join(["one", "two", "three"]) 'one, two, and three' ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 16:54:08 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sat, 20 Feb 2021 21:54:08 +0000 Subject: [issue43251] [sqlite3] sqlite3_column_name() failures should raise MemoryError In-Reply-To: <1613647354.29.0.206061609144.issue43251@roundup.psfhosted.org> Message-ID: <1613858048.02.0.874349668581.issue43251@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: "SELECT 1" yields "1" as column name. "SELECT <...> AS N" yields "N" as column name. "SELECT NULL" yields "NULL" as column name. We can't set the column name via the API, so that's pretty much it (implicit name or explicit through the AS keyword). As long as sqlite3_prepare_v2() returned SQLITE_OK, it seems that SQLite assures we've got a valid column name. As far as I can sqlite3_column_name() returns NULL if: 1) The first parameter (stmt) is NULL 2) The second parameter is out of bounds 3) Memory error 4) No column name is set (SQLite bug) We've got 1) and 2) covered. SQLite has a pretty good code coverage, so I'd say 4) is unlikely. What do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 17:02:16 2021 From: report at bugs.python.org (David Bordeynik) Date: Sat, 20 Feb 2021 22:02:16 +0000 Subject: [issue42643] http.server does not support HTTP range requests In-Reply-To: <1607999046.16.0.658504644018.issue42643@roundup.psfhosted.org> Message-ID: <1613858536.32.0.115979170322.issue42643@roundup.psfhosted.org> David Bordeynik added the comment: I would appreciate a code review - thank you ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 18:40:30 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 20 Feb 2021 23:40:30 +0000 Subject: [issue43280] additional argument for str.join() In-Reply-To: <1613851558.65.0.682568061448.issue43280@roundup.psfhosted.org> Message-ID: <1613864430.33.0.650712302945.issue43280@roundup.psfhosted.org> Steven D'Aprano added the comment: Python 3.9 is in feature freeze, this couldn't be added before 3.10 now. You have: ", ".join(["a", "b", "c"], ", and ") outputing this: "a, b, and, c" So what are the semantics of this additional argument? To insert it before the last item? ---------- nosy: +steven.daprano versions: +Python 3.10 -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 19:04:59 2021 From: report at bugs.python.org (Lewis Gaul) Date: Sun, 21 Feb 2021 00:04:59 +0000 Subject: [issue19073] Inability to specific __qualname__ as a property on a class instance. In-Reply-To: <1379857021.17.0.738971350638.issue19073@psf.upfronthosting.co.za> Message-ID: <1613865899.27.0.946793372557.issue19073@roundup.psfhosted.org> Lewis Gaul added the comment: This would also be useful for me - I just hit this same problem. If someone could give some guidance on how to make this change I'd be happy to put up a PR. ---------- nosy: +LewisGaul _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 19:29:33 2021 From: report at bugs.python.org (Berker Peksag) Date: Sun, 21 Feb 2021 00:29:33 +0000 Subject: [issue43269] [sqlite3] Clean up function scoping In-Reply-To: <1613736357.16.0.00586339940376.issue43269@roundup.psfhosted.org> Message-ID: <1613867373.44.0.57505780316.issue43269@roundup.psfhosted.org> Berker Peksag added the comment: New changeset bf838a6e7eec2063a17c7c33dfa94afeef116f36 by Erlend Egeberg Aasland in branch 'master': bpo-43269: Clean up sqlite3 file scope (GH-24578) https://github.com/python/cpython/commit/bf838a6e7eec2063a17c7c33dfa94afeef116f36 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 20:20:04 2021 From: report at bugs.python.org (Saiyang Gou) Date: Sun, 21 Feb 2021 01:20:04 +0000 Subject: [issue43281] Walrus comprehension rebind checking behavior Message-ID: <1613870404.85.0.640514140391.issue43281@roundup.psfhosted.org> New submission from Saiyang Gou : # test PEP 572 disallows walrus use cases such as `[(i := 1) for i in [1]]`, because `for i` implies that `i` is local to the comprehension but `(i := 1)` implies that `i` is "exported", which is a contradiction. However, I noticed the following behavior both in 3.8 and 3.9: >>> [(a := 1) for a, (*b, c[d+e::f(g)], h.i) in [1]] File "", line 1 SyntaxError: assignment expression cannot rebind comprehension iteration variable 'a' >>> [(b := 1) for a, (*b, c[d+e::f(g)], h.i) in [1]] File "", line 1 SyntaxError: assignment expression cannot rebind comprehension iteration variable 'b' >>> [(c := 1) for a, (*b, c[d+e::f(g)], h.i) in [1]] File "", line 1 SyntaxError: assignment expression cannot rebind comprehension iteration variable 'c' >>> [(d := 1) for a, (*b, c[d+e::f(g)], h.i) in [1]] File "", line 1 SyntaxError: assignment expression cannot rebind comprehension iteration variable 'd' >>> [(e := 1) for a, (*b, c[d+e::f(g)], h.i) in [1]] File "", line 1 SyntaxError: assignment expression cannot rebind comprehension iteration variable 'e' >>> [(f := 1) for a, (*b, c[d+e::f(g)], h.i) in [1]] File "", line 1 SyntaxError: assignment expression cannot rebind comprehension iteration variable 'f' >>> [(g := 1) for a, (*b, c[d+e::f(g)], h.i) in [1]] File "", line 1 SyntaxError: assignment expression cannot rebind comprehension iteration variable 'g' >>> [(h := 1) for a, (*b, c[d+e::f(g)], h.i) in [1]] File "", line 1 SyntaxError: assignment expression cannot rebind comprehension iteration variable 'h' >>> [(i := 1) for a, (*b, c[d+e::f(g)], h.i) in [1]] Traceback (most recent call last): File "", line 1, in File "", line 1, in TypeError: cannot unpack non-iterable int object Among all of these assignment expressions, only the assignment to `i` (attribute name) is allowed. However, in my understanding, only `a` and `b` should be disallowed for assignment. This comprehension example only creates two new variables, `a` and `b`, which are local to the comprehension. Assignment expressions assigning to `c`, `d`, `e`, `f`, `g` and `h` should be allowed. `c` and `h` are already in the outer scope. `d`, `e`, `f` and `g` are just names inside the expression in the subscript part. They are not "comprehension iteration variables" and not local to the comprehension. The same behavior is also observed when detecting inner loop variable rebinding outer loop assignment expression targets: >>> [i for i in range(5) if (j := 0) for k[j + 1] in range(5)] File "", line 1 SyntaxError: comprehension inner loop cannot rebind assignment expression target 'j' ---------- messages: 387433 nosy: gousaiyang priority: normal severity: normal status: open title: Walrus comprehension rebind checking behavior type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 20:46:22 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 21 Feb 2021 01:46:22 +0000 Subject: [issue43280] additional argument for str.join() In-Reply-To: <1613851558.65.0.682568061448.issue43280@roundup.psfhosted.org> Message-ID: <1613871982.07.0.0263371425395.issue43280@roundup.psfhosted.org> Steven D'Aprano added the comment: Looking more closely, I think that the semantics are to concatenate the extra argument to the second-last item: ", ".join(["a", "b", "c"]) # -> "a, b, c" ", ".join(["a", "b", "c"], ", and") # -> "a, b, and, c" which would be the same as: ", ".join(["a", "b, and", "c"]) # -> "a, b, and, c" I'm not sure how this is useful. In English, there should never be a comma after the "and", and there possibly shouldn't be a comma after the "b" either, depending on context. # Should be: "a, b and c" or "a, b, and c" See the Oxford or serial comma: https://thegrammargirls.wordpress.com/tag/oxford-comma/ I'm going to close this feature request. It's too specific and the semantics don't seem to be very useful. But if you would still like to propose this, or a similar change, please discuss it first either on the Python-Ideas mailing list: https://mail.python.org/archives/list/python-ideas at python.org/ or at the Ideas topic on https://discuss.python.org so that we can determine the required semantics and get a sense for how useful it would be in general. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 20:46:52 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 21 Feb 2021 01:46:52 +0000 Subject: [issue43280] additional argument for str.join() In-Reply-To: <1613851558.65.0.682568061448.issue43280@roundup.psfhosted.org> Message-ID: <1613872012.87.0.977931035015.issue43280@roundup.psfhosted.org> Change by Steven D'Aprano : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 21:33:39 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 21 Feb 2021 02:33:39 +0000 Subject: [issue27646] doc: yield from expression can be any iterable In-Reply-To: <1469730650.89.0.176012351897.issue27646@psf.upfronthosting.co.za> Message-ID: <1613874819.09.0.160720858428.issue27646@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 2f9ef514fb24b6a95bd3272885f197752810c107 by Terry Jan Reedy in branch 'master': bpo-27646: Say that 'yield from' expression can be any iterable (GH-24595) https://github.com/python/cpython/commit/2f9ef514fb24b6a95bd3272885f197752810c107 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 21:34:00 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Feb 2021 02:34:00 +0000 Subject: [issue27646] doc: yield from expression can be any iterable In-Reply-To: <1469730650.89.0.176012351897.issue27646@psf.upfronthosting.co.za> Message-ID: <1613874840.36.0.0231531311522.issue27646@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +23380 pull_request: https://github.com/python/cpython/pull/24602 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 21:34:11 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Feb 2021 02:34:11 +0000 Subject: [issue27646] doc: yield from expression can be any iterable In-Reply-To: <1469730650.89.0.176012351897.issue27646@psf.upfronthosting.co.za> Message-ID: <1613874851.33.0.809127890678.issue27646@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +23381 pull_request: https://github.com/python/cpython/pull/24603 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 21:42:30 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Feb 2021 02:42:30 +0000 Subject: [issue27646] doc: yield from expression can be any iterable In-Reply-To: <1469730650.89.0.176012351897.issue27646@psf.upfronthosting.co.za> Message-ID: <1613875350.79.0.046131131382.issue27646@roundup.psfhosted.org> miss-islington added the comment: New changeset 089a21f7429a3fd3cf78e3779df724757d346d19 by Miss Islington (bot) in branch '3.8': bpo-27646: Say that 'yield from' expression can be any iterable (GH-24595) https://github.com/python/cpython/commit/089a21f7429a3fd3cf78e3779df724757d346d19 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 21:45:56 2021 From: report at bugs.python.org (David Bolen) Date: Sun, 21 Feb 2021 02:45:56 +0000 Subject: [issue43166] Unused letters in Windows-specific pragma optimize In-Reply-To: <1612813717.65.0.159919254593.issue43166@roundup.psfhosted.org> Message-ID: <1613875556.07.0.785887616197.issue43166@roundup.psfhosted.org> Change by David Bolen : ---------- nosy: +db3l _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 21:55:57 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Feb 2021 02:55:57 +0000 Subject: [issue27646] doc: yield from expression can be any iterable In-Reply-To: <1469730650.89.0.176012351897.issue27646@psf.upfronthosting.co.za> Message-ID: <1613876157.54.0.706494560679.issue27646@roundup.psfhosted.org> miss-islington added the comment: New changeset 7cc58890b3c16c28360a9abe030258426e89fec1 by Miss Islington (bot) in branch '3.9': bpo-27646: Say that 'yield from' expression can be any iterable (GH-24595) https://github.com/python/cpython/commit/7cc58890b3c16c28360a9abe030258426e89fec1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 23:49:05 2021 From: report at bugs.python.org (Eli Schwartz) Date: Sun, 21 Feb 2021 04:49:05 +0000 Subject: [issue43282] Add split install targets to install tests separately from lib Message-ID: <1613882945.82.0.411428525027.issue43282@roundup.psfhosted.org> New submission from Eli Schwartz : cf. https://bugs.python.org/issue27640#msg386758 Carrying on from the addition of --disable-test-modules, I would find it convenient to be able to still provide the tests, but install them separately. The end result would be two distro packages, one slim package that does not include the test modules by default, and one package that adds in the test modules for people that need it. This is currently possible via running the install step twice and some hacky shell globbing to delete unneeded files from each install. Some sort of libinstall/testinstall target split target would be less hacky, and not require checking if the list of test modules is up to date. So I'd consider it nice to have. :) ---------- components: Build messages: 387438 nosy: eschwartz priority: normal severity: normal status: open title: Add split install targets to install tests separately from lib type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 20 23:53:15 2021 From: report at bugs.python.org (Eli Schwartz) Date: Sun, 21 Feb 2021 04:53:15 +0000 Subject: [issue27640] Add --disable-test-modules configure option to not build nor install tests In-Reply-To: <1469700317.99.0.84265252625.issue27640@psf.upfronthosting.co.za> Message-ID: <1613883195.0.0.783111040185.issue27640@roundup.psfhosted.org> Eli Schwartz added the comment: I filed issue43282 for this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 00:40:52 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 21 Feb 2021 05:40:52 +0000 Subject: [issue27646] doc: yield from expression can be any iterable In-Reply-To: <1469730650.89.0.176012351897.issue27646@psf.upfronthosting.co.za> Message-ID: <1613886052.79.0.14120815813.issue27646@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 01:16:39 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 21 Feb 2021 06:16:39 +0000 Subject: [issue43283] IDLE: Explain print slowness and speedup method Message-ID: <1613888199.55.0.371320208003.issue43283@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- assignee: docs at python components: Documentation, IDLE nosy: docs at python, terry.reedy priority: normal severity: normal stage: patch review status: open title: IDLE: Explain print slowness and speedup method type: enhancement versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 01:35:34 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 21 Feb 2021 06:35:34 +0000 Subject: [issue43283] IDLE: Explain print slowness and speedup method Message-ID: <1613889334.88.0.10201417345.issue43283@roundup.psfhosted.org> New submission from Terry J. Reedy : https://stackoverflow.com/questions/66286367/why-is-my-function-faster-than-pythons-print-function-in-idle had some tests of printing speed that showed that print in IDLE can be much slower than in REPL. I did further tests that showed than combining chunks and lines into a single string can erase most of the difference. For easier review, the first patch just rearranges current paragraphs to bring together those dealing with 2 processes and sys.stdxxx. Some are also re-wrapped. The second patch will contain just the new paragraph. ---------- assignee: docs at python -> terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 01:42:26 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 21 Feb 2021 06:42:26 +0000 Subject: [issue43283] IDLE: Explain print slowness and speedup method In-Reply-To: <1613889334.88.0.10201417345.issue43283@roundup.psfhosted.org> Message-ID: <1613889746.54.0.373112028531.issue43283@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: +patch pull_requests: +23382 pull_request: https://github.com/python/cpython/pull/24604 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 01:51:00 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 21 Feb 2021 06:51:00 +0000 Subject: [issue43269] [sqlite3] Clean up function scoping In-Reply-To: <1613736357.16.0.00586339940376.issue43269@roundup.psfhosted.org> Message-ID: <1613890260.49.0.227185097793.issue43269@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Serhiy also mentioned that marking functions definitions with the extern keyword is not very common in the CPython source base. https://github.com/python/cpython/pull/24578#discussion_r579506678 I suggest cleaning up those as well, while we're at it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 01:51:54 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 21 Feb 2021 06:51:54 +0000 Subject: [issue43269] [sqlite3] Clean up function scoping In-Reply-To: <1613736357.16.0.00586339940376.issue43269@roundup.psfhosted.org> Message-ID: <1613890314.11.0.518346056077.issue43269@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- pull_requests: +23383 pull_request: https://github.com/python/cpython/pull/24605 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 02:39:06 2021 From: report at bugs.python.org (Joseph Shen) Date: Sun, 21 Feb 2021 07:39:06 +0000 Subject: [issue43278] Inconsistent behavior of Py_GetCompiler() In-Reply-To: <1613840541.54.0.110258286705.issue43278@roundup.psfhosted.org> Message-ID: <1613893146.47.0.738806183289.issue43278@roundup.psfhosted.org> Change by Joseph Shen : ---------- keywords: +patch pull_requests: +23384 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24606 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 02:41:00 2021 From: report at bugs.python.org (Joseph Shen) Date: Sun, 21 Feb 2021 07:41:00 +0000 Subject: [issue43278] unnecessary leading '\n' from Py_GetCompiler() when build with different complier In-Reply-To: <1613840541.54.0.110258286705.issue43278@roundup.psfhosted.org> Message-ID: <1613893260.41.0.893122335102.issue43278@roundup.psfhosted.org> Change by Joseph Shen : ---------- title: Inconsistent behavior of Py_GetCompiler() -> unnecessary leading '\n' from Py_GetCompiler() when build with different complier _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 02:44:18 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 21 Feb 2021 07:44:18 +0000 Subject: [issue43283] IDLE: Explain print slowness and speedup method In-Reply-To: <1613889334.88.0.10201417345.issue43283@roundup.psfhosted.org> Message-ID: <1613893458.9.0.716981138767.issue43283@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 4cf7bb8e22bf37e6d65bf4cb5618d09c4a8ad612 by Terry Jan Reedy in branch 'master': bpo-43283: Rearrange some IDLE doc paragraphs. (GH-24604) https://github.com/python/cpython/commit/4cf7bb8e22bf37e6d65bf4cb5618d09c4a8ad612 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 02:44:25 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Feb 2021 07:44:25 +0000 Subject: [issue43283] IDLE: Explain print slowness and speedup method In-Reply-To: <1613889334.88.0.10201417345.issue43283@roundup.psfhosted.org> Message-ID: <1613893465.74.0.269558160619.issue43283@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +23386 pull_request: https://github.com/python/cpython/pull/24607 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 02:44:36 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Feb 2021 07:44:36 +0000 Subject: [issue43283] IDLE: Explain print slowness and speedup method In-Reply-To: <1613889334.88.0.10201417345.issue43283@roundup.psfhosted.org> Message-ID: <1613893476.81.0.154842681884.issue43283@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +23387 pull_request: https://github.com/python/cpython/pull/24608 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 03:04:17 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Feb 2021 08:04:17 +0000 Subject: [issue43283] IDLE: Explain print slowness and speedup method In-Reply-To: <1613889334.88.0.10201417345.issue43283@roundup.psfhosted.org> Message-ID: <1613894657.41.0.617841987231.issue43283@roundup.psfhosted.org> miss-islington added the comment: New changeset 6ddb25586524022923d076ddb3b5867214c6ce42 by Miss Islington (bot) in branch '3.8': bpo-43283: Rearrange some IDLE doc paragraphs. (GH-24604) https://github.com/python/cpython/commit/6ddb25586524022923d076ddb3b5867214c6ce42 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 03:07:39 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Feb 2021 08:07:39 +0000 Subject: [issue43283] IDLE: Explain print slowness and speedup method In-Reply-To: <1613889334.88.0.10201417345.issue43283@roundup.psfhosted.org> Message-ID: <1613894859.35.0.0676430077894.issue43283@roundup.psfhosted.org> miss-islington added the comment: New changeset 693aeacf8851d1e9995073e27e50644a505dc49c by Miss Islington (bot) in branch '3.9': bpo-43283: Rearrange some IDLE doc paragraphs. (GH-24604) https://github.com/python/cpython/commit/693aeacf8851d1e9995073e27e50644a505dc49c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 04:24:12 2021 From: report at bugs.python.org (CrouZ) Date: Sun, 21 Feb 2021 09:24:12 +0000 Subject: [issue38822] Inconsistent os.stat behavior for directory with Access Denied In-Reply-To: <1573928094.88.0.209131085868.issue38822@roundup.psfhosted.org> Message-ID: <1613899452.21.0.98652735237.issue38822@roundup.psfhosted.org> CrouZ added the comment: The problem exists in Python 3.9 as well, and it behaves the same as Python 3.8. Tested with Python 3.9.1. ---------- versions: +Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 04:49:42 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Feb 2021 09:49:42 +0000 Subject: [issue43251] [sqlite3] sqlite3_column_name() failures should raise MemoryError In-Reply-To: <1613647354.29.0.206061609144.issue43251@roundup.psfhosted.org> Message-ID: <1613900982.78.0.788957414933.issue43251@roundup.psfhosted.org> Serhiy Storchaka added the comment: Please go ahead! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 05:03:13 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 21 Feb 2021 10:03:13 +0000 Subject: [issue43251] [sqlite3] sqlite3_column_name() failures should raise MemoryError In-Reply-To: <1613647354.29.0.206061609144.issue43251@roundup.psfhosted.org> Message-ID: <1613901793.95.0.0850928836379.issue43251@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Will do. Thanks for pushing the investigation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 05:03:35 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 21 Feb 2021 10:03:35 +0000 Subject: [issue43267] [sqlite3] Redundant type checks in pysqlite_statement_bind_parameter() In-Reply-To: <1613731536.26.0.545379664561.issue43267@roundup.psfhosted.org> Message-ID: <1613901815.83.0.983153067745.issue43267@roundup.psfhosted.org> Serhiy Storchaka added the comment: PyLong_Check is two memory reads, bits operation, and comparison with 0. And one non-inlined function call when limited API is used. PyLong_CheckExact is only one memory read and comparison. I am not sure that the difference is significant enough to justify the optimization. I would require evidences that this optimization is significant if it would be proposed now. But the code is already written in such form, and I am not sure that it is worth to spend our time to change it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 05:05:07 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 21 Feb 2021 10:05:07 +0000 Subject: [issue43251] [sqlite3] sqlite3_column_name() failures should raise MemoryError In-Reply-To: <1613647354.29.0.206061609144.issue43251@roundup.psfhosted.org> Message-ID: <1613901907.16.0.738673846889.issue43251@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +23388 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24609 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 05:07:52 2021 From: report at bugs.python.org (Berker Peksag) Date: Sun, 21 Feb 2021 10:07:52 +0000 Subject: [issue43269] [sqlite3] Clean up function scoping In-Reply-To: <1613736357.16.0.00586339940376.issue43269@roundup.psfhosted.org> Message-ID: <1613902072.74.0.783054907684.issue43269@roundup.psfhosted.org> Berker Peksag added the comment: New changeset 38b6c2acd4bba666bd64779c42b9d91cbee19274 by Erlend Egeberg Aasland in branch 'master': bpo-43269: Remove redundant extern keywords (GH-24605) https://github.com/python/cpython/commit/38b6c2acd4bba666bd64779c42b9d91cbee19274 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 05:08:29 2021 From: report at bugs.python.org (Berker Peksag) Date: Sun, 21 Feb 2021 10:08:29 +0000 Subject: [issue43269] [sqlite3] Clean up function scoping In-Reply-To: <1613736357.16.0.00586339940376.issue43269@roundup.psfhosted.org> Message-ID: <1613902109.88.0.281915955466.issue43269@roundup.psfhosted.org> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 05:42:26 2021 From: report at bugs.python.org (bugale bugale) Date: Sun, 21 Feb 2021 10:42:26 +0000 Subject: [issue43284] Wrong windows build in 20H2 Message-ID: <1613904146.72.0.850542213327.issue43284@roundup.psfhosted.org> New submission from bugale bugale : Running `platform.platform()` on Windows 10 20H2 results in the build number 19041: Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import platform >>> platform.platform() 'Windows-10-10.0.19041-SP0' This is incorrect, the build number is 19042. Using ctypes like in the answer here produces a correct result: https://stackoverflow.com/questions/32300004/python-ctypes-getting-0-with-getversionex-function ---------- components: Windows messages: 387450 nosy: bugale bugale, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Wrong windows build in 20H2 type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 06:02:18 2021 From: report at bugs.python.org (STINNER Victor) Date: Sun, 21 Feb 2021 11:02:18 +0000 Subject: [issue42093] Add opcode cache for LOAD_ATTR In-Reply-To: <1603163916.18.0.528007796853.issue42093@roundup.psfhosted.org> Message-ID: <1613905338.01.0.478778396219.issue42093@roundup.psfhosted.org> STINNER Victor added the comment: New changeset d5fc99873769f0d0d5c5d5d99059177a75a4e46e by Victor Stinner in branch 'master': bpo-42093: Cleanup _PyDict_GetItemHint() (GH-24582) https://github.com/python/cpython/commit/d5fc99873769f0d0d5c5d5d99059177a75a4e46e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 06:07:21 2021 From: report at bugs.python.org (STINNER Victor) Date: Sun, 21 Feb 2021 11:07:21 +0000 Subject: [issue35459] Use PyDict_GetItemWithError() instead of PyDict_GetItem() In-Reply-To: <1544525657.6.0.788709270274.issue35459@psf.upfronthosting.co.za> Message-ID: <1613905641.27.0.655348334748.issue35459@roundup.psfhosted.org> Change by STINNER Victor : ---------- pull_requests: +23389 pull_request: https://github.com/python/cpython/pull/24582 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 06:08:13 2021 From: report at bugs.python.org (STINNER Victor) Date: Sun, 21 Feb 2021 11:08:13 +0000 Subject: [issue40839] Disallow calling PyDict_GetItem() with the GIL released In-Reply-To: <1591037197.66.0.735914267677.issue40839@roundup.psfhosted.org> Message-ID: <1613905693.73.0.587947932943.issue40839@roundup.psfhosted.org> STINNER Victor added the comment: I made a similar change in _PyDict_GetItemHint(): commit d5fc99873769f0d0d5c5d5d99059177a75a4e46e (HEAD -> master, upstream/master) Author: Victor Stinner Date: Sun Feb 21 12:02:04 2021 +0100 bpo-42093: Cleanup _PyDict_GetItemHint() (GH-24582) * No longer save/restore the current exception. It is no longer used with an exception raised. * No longer clear the current exception on error: it's now up to the caller. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 06:09:23 2021 From: report at bugs.python.org (STINNER Victor) Date: Sun, 21 Feb 2021 11:09:23 +0000 Subject: [issue43282] Add split install targets to install tests separately from lib In-Reply-To: <1613882945.82.0.411428525027.issue43282@roundup.psfhosted.org> Message-ID: <1613905763.19.0.0968236819516.issue43282@roundup.psfhosted.org> STINNER Victor added the comment: Do you want to work on a PR to implement this idea? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 06:09:37 2021 From: report at bugs.python.org (STINNER Victor) Date: Sun, 21 Feb 2021 11:09:37 +0000 Subject: [issue27640] Add --disable-test-modules configure option to not build nor install tests In-Reply-To: <1469700317.99.0.84265252625.issue27640@psf.upfronthosting.co.za> Message-ID: <1613905777.93.0.584165483801.issue27640@roundup.psfhosted.org> STINNER Victor added the comment: > I filed issue43282 for this. Thanks ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 06:49:34 2021 From: report at bugs.python.org (RiceX Star) Date: Sun, 21 Feb 2021 11:49:34 +0000 Subject: [issue43285] ftplib use host from PASV response Message-ID: <1613908174.7.0.0578051462677.issue43285@roundup.psfhosted.org> New submission from RiceX Star : Last year, curl had a security update for CVE-2020-8284. more info, see https://hackerone.com/reports/1040166 The problem is ftp client trust the host from PASV response by default, A malicious server can trick ftp client into connecting back to a given IP address and port. This may make ftp client scan ports and extract service banner from private newwork. After test and read ftplib module(https://github.com/python/cpython/blob/63298930fb531ba2bb4f23bc3b915dbf1e17e9e1/Lib/ftplib.py#L346), I found ftplib has the same problem. ---------- components: Library (Lib) messages: 387455 nosy: ricexdream priority: normal severity: normal status: open title: ftplib use host from PASV response type: security versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 07:15:53 2021 From: report at bugs.python.org (STINNER Victor) Date: Sun, 21 Feb 2021 12:15:53 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613909753.83.0.327278567215.issue43179@roundup.psfhosted.org> STINNER Victor added the comment: I created a thread on python-dev: "Move support of legacy platforms/architectures outside Python" https://mail.python.org/archives/list/python-dev at python.org/thread/F5BXISYP7RAINXUMYJSEYG7GCFRFAENF/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 07:34:43 2021 From: report at bugs.python.org (John Paul Adrian Glaubitz) Date: Sun, 21 Feb 2021 12:34:43 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613910883.56.0.766865397722.issue43179@roundup.psfhosted.org> John Paul Adrian Glaubitz added the comment: > "Move support of legacy platforms/architectures outside Python" > https://mail.python.org/archives/list/python-dev at python.org/thread/F5BXISYP7RAINXUMYJSEYG7GCFRFAENF/ Motorola 68k isn't a 16-bit architecture, it's a 32-bit architecture. Also, I am starting to get the feeling that you are trying to escalate a conflict here. None of the code that you are complaining about is hurting anyone. Yet, you think it is important to keep this discussion and ruining my day. The fact that you take sides for OpenBSD but consider m68k legacy and unmaintained (which isn't correct at all - look at the kernel), shows that you are biased in this discussion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 07:36:38 2021 From: report at bugs.python.org (John Paul Adrian Glaubitz) Date: Sun, 21 Feb 2021 12:36:38 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613910998.92.0.740441088744.issue43179@roundup.psfhosted.org> John Paul Adrian Glaubitz added the comment: Oh, and LLVM is currently gaining support M68k which you consider "legacy": > https://reviews.llvm.org/D95315 It might be a good idea to do some research first before making such statements. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 09:04:50 2021 From: report at bugs.python.org (Christian Heimes) Date: Sun, 21 Feb 2021 14:04:50 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613916290.71.0.629210160832.issue43179@roundup.psfhosted.org> Christian Heimes added the comment: For the last time: This ticket is solely about s390 platform. Please stop derailing this ticket with comments about unrelated platforms like m68k. I'm considering your diversion as "sustained disruption of online community discussions", https://www.python.org/psf/conduct/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 09:06:19 2021 From: report at bugs.python.org (STINNER Victor) Date: Sun, 21 Feb 2021 14:06:19 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613916379.93.0.781185590351.issue43179@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 10:24:12 2021 From: report at bugs.python.org (David Edelsohn) Date: Sun, 21 Feb 2021 15:24:12 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613921052.09.0.840885937829.issue43179@roundup.psfhosted.org> David Edelsohn added the comment: Christian, The Python Community Code of Conduct also states: Being respectful of differing viewpoints and experiences. Showing empathy towards other community members. Various developers are passionate about this topic and the entire series of comments has been respectful, IMHO. I don't believe that it is helpful when you cherry-pick a rule from the code of conduct in response to someone providing additional evidence. That is intimidation and shutting down the conversation with an implicit threat. You specifically mentioned m68k when you opened the issue. This conversation feels very much that you and Victor have pre-determined an outcome and are not open to other points of view. I and others have proposed compromises, but the response appears, at least to me, as shifting requirements. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 10:32:32 2021 From: report at bugs.python.org (hai shi) Date: Sun, 21 Feb 2021 15:32:32 +0000 Subject: [issue43250] [C API] Depreate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT() In-Reply-To: <1613647294.57.0.745628645388.issue43250@roundup.psfhosted.org> Message-ID: <1613921552.03.0.699657111516.issue43250@roundup.psfhosted.org> hai shi added the comment: > So it doesn't sound like a good idea to immediately remove these two macros. MAYBE we can update the annotation in pyfpe.h to address that we will remove those macros in python 4.0. The fpe have been removed, so those macros will be removed finally. ---------- nosy: +shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 10:36:22 2021 From: report at bugs.python.org (hai shi) Date: Sun, 21 Feb 2021 15:36:22 +0000 Subject: [issue43285] ftplib use host from PASV response In-Reply-To: <1613908174.7.0.0578051462677.issue43285@roundup.psfhosted.org> Message-ID: <1613921782.3.0.0652760103068.issue43285@roundup.psfhosted.org> Change by hai shi : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 10:52:14 2021 From: report at bugs.python.org (hai shi) Date: Sun, 21 Feb 2021 15:52:14 +0000 Subject: [issue43278] unnecessary leading '\n' from Py_GetCompiler() when build with different complier In-Reply-To: <1613840541.54.0.110258286705.issue43278@roundup.psfhosted.org> Message-ID: <1613922734.21.0.196678333666.issue43278@roundup.psfhosted.org> hai shi added the comment: Maybe Guido can give you some answers. Related commit: https://github.com/python/cpython/commit/f26cda62b68b68c07666f2f21b1f16ded03afa37. ---------- nosy: +gvanrossum, shihai1991 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 10:56:25 2021 From: report at bugs.python.org (Antony Lee) Date: Sun, 21 Feb 2021 15:56:25 +0000 Subject: [issue43286] Clarify that Popen.returncode does not get auto-set when the process terminates Message-ID: <1613922985.0.0.488591869976.issue43286@roundup.psfhosted.org> New submission from Antony Lee : Currently, the documentation for Popen.returncode states The child return code, set by poll() and wait() (and indirectly by communicate()). A None value indicates that the process hasn?t terminated yet. A negative value -N indicates that the child was terminated by signal N (POSIX only). As far back as https://bugs.python.org/issue1727024 it had been suggested that this fails to emphasize an important piece of information, namely that this attribute can be outdated (it is *only* set if poll() or wait() are called; this is not obvious, e.g. returncode could have beeen implemented as a property that auto-calls poll()). I do realize that a strict reading of the docs does suggest the actual behavior, but a bit of explicitness won't hurt... The wording suggested in https://bugs.python.org/issue1727024 seems clearer to me ("Note: The value stored in returncode may be out-of-date. Use poll() to reliably find the current return code."). ---------- assignee: docs at python components: Documentation messages: 387463 nosy: Antony.Lee, docs at python priority: normal severity: normal status: open title: Clarify that Popen.returncode does not get auto-set when the process terminates versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 10:58:19 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 21 Feb 2021 15:58:19 +0000 Subject: [issue43267] [sqlite3] Redundant type checks in pysqlite_statement_bind_parameter() In-Reply-To: <1613731536.26.0.545379664561.issue43267@roundup.psfhosted.org> Message-ID: <1613923099.35.0.708175636534.issue43267@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: > I am not sure that the difference is significant enough to justify the optimization. I would guess it's negligible. I did some quick timeit tests, but the results were pretty much equal, so I guess I'd have to use a more precise benchmark method. > But the code is already written in such form, and I am not sure that it is worth to spend our time to change it. Not even a 30% reduction in code size (for this function)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 11:08:44 2021 From: report at bugs.python.org (Christian Heimes) Date: Sun, 21 Feb 2021 16:08:44 +0000 Subject: [issue43179] Remove 31/32-bit s390 Linux support (s390-linux-gnu triplet) In-Reply-To: <1612870873.59.0.718960539942.issue43179@roundup.psfhosted.org> Message-ID: <1613923724.31.0.400473951725.issue43179@roundup.psfhosted.org> Christian Heimes added the comment: My offer still stands: If you can fulfill the requirements of PEP 11 for s390, then I'm fine with keeping the code for s390 around. Victor has a different opinion, so you have to contact the Steering Council and get their approval, too. Our ticket system doesn't permit amending comments. Otherwise I would have clarified my comment. Also I used the words "might" and "at a later point" in my initial ticket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 11:19:24 2021 From: report at bugs.python.org (Joseph Shen) Date: Sun, 21 Feb 2021 16:19:24 +0000 Subject: [issue43278] unnecessary leading '\n' from Py_GetCompiler() when build with different complier In-Reply-To: <1613840541.54.0.110258286705.issue43278@roundup.psfhosted.org> Message-ID: <1613924364.06.0.552061521954.issue43278@roundup.psfhosted.org> Joseph Shen added the comment: Right now there is no need to keep this limits, and the __version__ info from GCC is quite simple. Pls the attached snapshot image. Therefor I don't think we should keep a commit from 2000. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 12:25:11 2021 From: report at bugs.python.org (Nathaniel Smith) Date: Sun, 21 Feb 2021 17:25:11 +0000 Subject: [issue43250] [C API] Depreate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT() In-Reply-To: <1613650545.34.0.00289395388198.issue43250@roundup.psfhosted.org> Message-ID: Nathaniel Smith added the comment: If I remember correctly, cython-generated C code calls those macros at appropriate places, so there are probably a bunch of projects that are using them and the developers have no idea. On Thu, Feb 18, 2021, 04:16 STINNER Victor wrote: > > STINNER Victor added the comment: > > Using INADA-san recipe > https://github.com/methane/notes/tree/master/2020/wchar-cache I found the > 62 projects on the PyPI top 4000 which contain "PyFPE" pattern: > > asyncpg-0.22.0.tar.gz > auditwheel-3.3.1.tar.gz > av-8.0.3.tar.gz > bcolz-1.2.1.tar.gz > BDQuaternions-0.2.15.tar.gz > bx-python-0.8.9.tar.gz > ConfigSpace-0.4.18.tar.gz > Cython-0.29.21.tar.gz > cytoolz-0.11.0.tar.gz > ddtrace-0.46.0.tar.gz > dedupe-hcluster-0.3.8.tar.gz > dependency-injector-4.23.5.tar.gz > fastavro-1.3.2.tar.gz > fastdtw-0.3.4.tar.gz > Fiona-1.8.18.tar.gz > fuzzysearch-0.7.3.tar.gz > fuzzyset-0.0.19.tar.gz > gensim-3.8.3.tar.gz > grpcio-1.35.0.tar.gz > gssapi-1.6.12.tar.gz > hdbscan-0.8.27.tar.gz > hmmlearn-0.2.5.tar.gz > imagecodecs-2021.1.28.tar.gz > implicit-0.4.4.tar.gz > lightfm-1.16.tar.gz > lupa-1.9.tar.gz > lxml-4.6.2.tar.gz > mujoco-py-2.0.2.13.tar.gz > neobolt-1.7.17.tar.gz > orderedset-2.0.3.tar.gz > peewee-3.14.1.tar.gz > Pillow-8.1.0.tar.gz > Pillow-SIMD-7.0.0.post3.tar.gz > pmdarima-1.8.0.tar.gz > pomegranate-0.14.2.tar.gz > pycapnp-1.0.0.tar.gz > pydevd-2.2.0.tar.gz > pygame-2.0.1.tar.gz > pyhacrf-datamade-0.2.5.tar.gz > pyjq-2.5.1.tar.gz > pysam-0.16.0.1.tar.gz > pystan-2.19.1.1.tar.gz > PyWavelets-1.1.1.tar.gz > rasterio-1.2.0.tar.gz > ruptures-1.1.3.tar.gz > s2sphere-0.2.5.tar.gz > scikit-image-0.18.1.tar.gz > scipy-1.6.1.tar.gz > Shapely-1.7.1.tar.gz > simplejson-3.17.2.tar.gz > spacy-3.0.3.tar.gz > statsmodels-0.12.2.tar.gz > tables-3.6.1.tar.gz > Theano-1.0.5.tar.gz > thinc-8.0.1.tar.gz > tinycss-0.4.tar.gz > tslearn-0.5.0.5.tar.gz > uvloop-0.15.1.tar.gz > weighted_levenshtein-0.2.1.tar.gz > wordcloud-1.8.1.tar.gz > wsaccel-0.6.3.tar.gz > wxPython-4.1.1.tar.gz > > > Example with asyncpg: > > $ rg PyFPE > asyncpg/pgproto/pgproto.c > 39841: PyFPE_START_PROTECT("add", return NULL) > 39843: PyFPE_END_PROTECT(result) > > asyncpg/protocol/protocol.c > 85260: PyFPE_START_PROTECT("add", return NULL) > 85262: PyFPE_END_PROTECT(result) > 85563: PyFPE_START_PROTECT("subtract", return NULL) > 85565: PyFPE_END_PROTECT(result) > 85734: PyFPE_START_PROTECT("add", return NULL) > 85736: PyFPE_END_PROTECT(result) > > > So it doesn't sound like a good idea to immediately remove these two > macros. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 12:49:09 2021 From: report at bugs.python.org (=?utf-8?b?5Y+M6I2J6YW46YWv?=) Date: Sun, 21 Feb 2021 17:49:09 +0000 Subject: [issue42627] urllib.request.getproxies() misparses Windows registry proxy settings In-Reply-To: <1607804872.9.0.5170746987.issue42627@roundup.psfhosted.org> Message-ID: <1613929749.42.0.805693063951.issue42627@roundup.psfhosted.org> ???? added the comment: I came across this issue as well. I checked Microsoft documentations and it seems `InternetGetProxyInfo` in WinInet is deprecated, while `WinHttpGetIEProxyConfigForCurrentUser` in WinHTTP will return the exact same string as what it stored registery. https://docs.microsoft.com/en-US/troubleshoot/windows-client/networking/configure-client-proxy-server-settings-by-registry-file Also from this documentation, a proxy server could have "http://" prefix, so I guess it could also support "https://" prefix if a user set a https proxy. ---------- components: -Windows nosy: +kotori _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 12:59:23 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 21 Feb 2021 17:59:23 +0000 Subject: [issue43287] Use PEP 590 vectorcall to speed up calls to filter() Message-ID: <1613930363.0.0.0194789956004.issue43287@roundup.psfhosted.org> New submission from Dong-hee Na : +--------------+--------+----------------------+ | Benchmark | master | vectorcall | +==============+========+======================+ | bench filter | 191 ns | 151 ns: 1.26x faster | +--------------+--------+----------------------+ Like reversed(https://bugs.python.org/issue41922), it looks okay to update filter() to use PEP 590. ---------- components: Interpreter Core files: filter_bench.py messages: 387469 nosy: corona10, vstinner priority: normal severity: normal status: open title: Use PEP 590 vectorcall to speed up calls to filter() versions: Python 3.10 Added file: https://bugs.python.org/file49825/filter_bench.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 13:02:22 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 21 Feb 2021 18:02:22 +0000 Subject: [issue43287] Use PEP 590 vectorcall to speed up calls to filter() In-Reply-To: <1613930363.0.0.0194789956004.issue43287@roundup.psfhosted.org> Message-ID: <1613930542.98.0.94849181366.issue43287@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +23390 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24611 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 13:10:31 2021 From: report at bugs.python.org (Neil Schemenauer) Date: Sun, 21 Feb 2021 18:10:31 +0000 Subject: [issue16954] Add docstrings for ElementTree module In-Reply-To: <1358090813.12.0.93631082121.issue16954@psf.upfronthosting.co.za> Message-ID: <1613931031.47.0.615556635278.issue16954@roundup.psfhosted.org> Change by Neil Schemenauer : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 13:40:56 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 21 Feb 2021 18:40:56 +0000 Subject: [issue43287] Use PEP 590 vectorcall to speed up calls to filter() In-Reply-To: <1613930363.0.0.0194789956004.issue43287@roundup.psfhosted.org> Message-ID: <1613932856.73.0.0857313386809.issue43287@roundup.psfhosted.org> Raymond Hettinger added the comment: +0 I don't see any downside. Note, the benchmark only times instantiation of the filter object. It doesn't actually run the iterator which is where most of the runtime cost is spent. So in actual code there is almost zero benefit. For example, add "list" to the statement: stmt="b = list(filter(lambda x: x % 2 == 0, a))" and the improvement disappears. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 14:04:37 2021 From: report at bugs.python.org (Neil Schemenauer) Date: Sun, 21 Feb 2021 19:04:37 +0000 Subject: [issue43288] test_importlib failure due to missing skip() method Message-ID: <1613934277.61.0.647402041317.issue43288@roundup.psfhosted.org> New submission from Neil Schemenauer : The FileSystem class is missing a skip() method. If the file system doesn't support Unicode filenames, the test crashes. File "/home/nas/src/cpython/Lib/test/test_importlib/fixtures.py", line 221, in unicode_filename self.skip("File system does not support non-ascii.") AttributeError: 'FileSystem' object has no attribute 'skip' I'm running tests inside a Debian 32-bit container and for some reason the test.support.FS_NONASCII variable is not set. ---------- components: Tests messages: 387471 nosy: nascheme priority: normal severity: normal status: open title: test_importlib failure due to missing skip() method type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 14:18:23 2021 From: report at bugs.python.org (Neil Schemenauer) Date: Sun, 21 Feb 2021 19:18:23 +0000 Subject: [issue43288] test_importlib failure due to missing skip() method In-Reply-To: <1613934277.61.0.647402041317.issue43288@roundup.psfhosted.org> Message-ID: <1613935103.98.0.477510972434.issue43288@roundup.psfhosted.org> Change by Neil Schemenauer : ---------- keywords: +patch pull_requests: +23391 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24612 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 16:29:59 2021 From: report at bugs.python.org (Yehuda Katz) Date: Sun, 21 Feb 2021 21:29:59 +0000 Subject: [issue43289] step bug in turtle's for loop Message-ID: <1613942999.52.0.979246620938.issue43289@roundup.psfhosted.org> New submission from Yehuda Katz : from turtle import * col = ["black", "white"] for rad in range(40, 0, -1): dot(5*rad, col[rad % 2]) done() ====================== Any other step than -1 crashes the code. Thank you. ---------- messages: 387472 nosy: Yehuda priority: normal severity: normal status: open title: step bug in turtle's for loop type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 16:47:09 2021 From: report at bugs.python.org (Neil Schemenauer) Date: Sun, 21 Feb 2021 21:47:09 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1613944029.13.0.709156523671.issue39791@roundup.psfhosted.org> Change by Neil Schemenauer : ---------- nosy: +nascheme, nascheme nosy_count: 9.0 -> 10.0 pull_requests: +23392, 23393 pull_request: https://github.com/python/cpython/pull/24612 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 16:47:07 2021 From: report at bugs.python.org (Neil Schemenauer) Date: Sun, 21 Feb 2021 21:47:07 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1613944027.94.0.453266981824.issue39791@roundup.psfhosted.org> Change by Neil Schemenauer : ---------- nosy: +nascheme nosy_count: 9.0 -> 10.0 pull_requests: +23392 pull_request: https://github.com/python/cpython/pull/24612 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 16:48:36 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 21 Feb 2021 21:48:36 +0000 Subject: [issue43288] test_importlib failure due to missing skip() method In-Reply-To: <1613934277.61.0.647402041317.issue43288@roundup.psfhosted.org> Message-ID: <1613944116.01.0.473001182691.issue43288@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 1.0 -> 2.0 pull_requests: +23394 pull_request: https://github.com/python/cpython/pull/24613 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 16:48:25 2021 From: report at bugs.python.org (Neil Schemenauer) Date: Sun, 21 Feb 2021 21:48:25 +0000 Subject: [issue43288] test_importlib failure due to missing skip() method In-Reply-To: <1613934277.61.0.647402041317.issue43288@roundup.psfhosted.org> Message-ID: <1613944105.83.0.472885078606.issue43288@roundup.psfhosted.org> Neil Schemenauer added the comment: New changeset 50288aa8c955f66ab67a7dadf250ea5f4238eb67 by Neil Schemenauer in branch 'master': bpo-43288: Fix bug in test_importlib test. (GH-24612) https://github.com/python/cpython/commit/50288aa8c955f66ab67a7dadf250ea5f4238eb67 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 16:54:57 2021 From: report at bugs.python.org (Neil Schemenauer) Date: Sun, 21 Feb 2021 21:54:57 +0000 Subject: [issue43288] test_importlib failure due to missing skip() method In-Reply-To: <1613934277.61.0.647402041317.issue43288@roundup.psfhosted.org> Message-ID: <1613944497.59.0.120515577195.issue43288@roundup.psfhosted.org> Change by Neil Schemenauer : ---------- pull_requests: +23395 pull_request: https://github.com/python/cpython/pull/24614 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 17:04:09 2021 From: report at bugs.python.org (Yehuda Katz) Date: Sun, 21 Feb 2021 22:04:09 +0000 Subject: [issue43289] step bug in turtle's for loop In-Reply-To: <1613942999.52.0.979246620938.issue43289@roundup.psfhosted.org> Message-ID: <1613945049.92.0.435304638269.issue43289@roundup.psfhosted.org> Yehuda Katz added the comment: Correction to my msg387472: Every *even* step crashes the code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 17:09:05 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 21 Feb 2021 22:09:05 +0000 Subject: [issue43283] IDLE: Explain print slowness and speedup method In-Reply-To: <1613889334.88.0.10201417345.issue43283@roundup.psfhosted.org> Message-ID: <1613945345.9.0.16645753167.issue43283@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +23396 pull_request: https://github.com/python/cpython/pull/24615 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 17:22:21 2021 From: report at bugs.python.org (Neil Schemenauer) Date: Sun, 21 Feb 2021 22:22:21 +0000 Subject: [issue43288] test_importlib failure due to missing skip() method In-Reply-To: <1613934277.61.0.647402041317.issue43288@roundup.psfhosted.org> Message-ID: <1613946141.41.0.220474900409.issue43288@roundup.psfhosted.org> Neil Schemenauer added the comment: New changeset 84f7afe65c29330f3ff8e318e054b96554a2dede by Neil Schemenauer in branch 'master': Fix failed merge of bpo-43288. (GH-24614) https://github.com/python/cpython/commit/84f7afe65c29330f3ff8e318e054b96554a2dede ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 17:34:00 2021 From: report at bugs.python.org (Neil Schemenauer) Date: Sun, 21 Feb 2021 22:34:00 +0000 Subject: [issue43288] test_importlib failure due to missing skip() method In-Reply-To: <1613934277.61.0.647402041317.issue43288@roundup.psfhosted.org> Message-ID: <1613946840.36.0.963674889844.issue43288@roundup.psfhosted.org> Change by Neil Schemenauer : ---------- pull_requests: +23397 pull_request: https://github.com/python/cpython/pull/24616 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 18:16:09 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 21 Feb 2021 23:16:09 +0000 Subject: [issue43290] [sqlite3] remove legacy code from pysqlite_step Message-ID: <1613949369.74.0.130974571749.issue43290@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : pysqlite_step() contains a NULL check needed for SQLite 3.5 and earlier. This can be removed. ---------- components: Library (Lib) messages: 387476 nosy: berker.peksag, erlendaasland, serhiy.storchaka priority: normal severity: normal status: open title: [sqlite3] remove legacy code from pysqlite_step type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 18:17:27 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 21 Feb 2021 23:17:27 +0000 Subject: [issue40404] Python quit unexpectedly In-Reply-To: <1587961471.91.0.139904517244.issue40404@roundup.psfhosted.org> Message-ID: <1613949447.78.0.681067002705.issue40404@roundup.psfhosted.org> Irit Katriel added the comment: Joseph, please create a new issue if you are able to provide information indicating an issue with Python, as Ned explained above. ---------- nosy: +iritkatriel resolution: -> works for me stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 18:24:43 2021 From: report at bugs.python.org (Irit Katriel) Date: Sun, 21 Feb 2021 23:24:43 +0000 Subject: [issue36636] Inner exception is not being raised using asyncio.gather In-Reply-To: <1555350763.65.0.175708085.issue36636@roundup.psfhosted.org> Message-ID: <1613949883.88.0.368495050882.issue36636@roundup.psfhosted.org> Irit Katriel added the comment: "twisteroid ambassador"'s explanation is correct - you need to use the traceback module to render complete information about an exception. And indeed, return_exceptions=False gives you the first exception (not all of them) as explained here https://docs.python.org/3/library/asyncio-task.html#asyncio.gather ---------- nosy: +iritkatriel resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 18:24:49 2021 From: report at bugs.python.org (Neil Schemenauer) Date: Sun, 21 Feb 2021 23:24:49 +0000 Subject: [issue43288] test_importlib failure due to missing skip() method In-Reply-To: <1613934277.61.0.647402041317.issue43288@roundup.psfhosted.org> Message-ID: <1613949889.87.0.0176118340822.issue43288@roundup.psfhosted.org> Neil Schemenauer added the comment: New changeset 44fe32061d60f4bd9c4fa48c24e3e4ba26033dba by Neil Schemenauer in branch '3.9': [3.9] bpo-43288: Fix bug in test_importlib test. (GH-24616) https://github.com/python/cpython/commit/44fe32061d60f4bd9c4fa48c24e3e4ba26033dba ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 18:29:37 2021 From: report at bugs.python.org (Inada Naoki) Date: Sun, 21 Feb 2021 23:29:37 +0000 Subject: [issue43260] Never release buffer when MemoryError in print() In-Reply-To: <1613712440.26.0.95537936361.issue43260@roundup.psfhosted.org> Message-ID: <1613950177.46.0.248061491328.issue43260@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 01806d5beba3d208bb56adba6829097d803bf54f by Inada Naoki in branch 'master': bpo-43260: io: Prevent large data remains in textio buffer. (GH-24592) https://github.com/python/cpython/commit/01806d5beba3d208bb56adba6829097d803bf54f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 18:34:33 2021 From: report at bugs.python.org (Inada Naoki) Date: Sun, 21 Feb 2021 23:34:33 +0000 Subject: [issue43260] Never release buffer when MemoryError in print() In-Reply-To: <1613712440.26.0.95537936361.issue43260@roundup.psfhosted.org> Message-ID: <1613950473.85.0.0362032019465.issue43260@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +23398 pull_request: https://github.com/python/cpython/pull/24617 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 18:38:34 2021 From: report at bugs.python.org (Inada Naoki) Date: Sun, 21 Feb 2021 23:38:34 +0000 Subject: [issue43260] Never release buffer when MemoryError in print() In-Reply-To: <1613712440.26.0.95537936361.issue43260@roundup.psfhosted.org> Message-ID: <1613950714.98.0.47795373056.issue43260@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +23399 pull_request: https://github.com/python/cpython/pull/24618 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 18:52:23 2021 From: report at bugs.python.org (Christoph Anton Mitterer) Date: Sun, 21 Feb 2021 23:52:23 +0000 Subject: [issue43259] argparse: allow add_mutually_exclusive_group on add_argument_group In-Reply-To: <1613701721.93.0.742004676065.issue43259@roundup.psfhosted.org> Message-ID: <1613951543.56.0.625090894168.issue43259@roundup.psfhosted.org> Christoph Anton Mitterer added the comment: Well but if that's anyway one of its actual major use cases, wouldn't it make sense to properly support it? Especially when one has a large set of identical options (which is then even more likely to also include mutually exclusive ones) such a feature seems to be pretty useful to prevent bloated code by copy&pasting large number of lines of identical argument parsing code. argparse is really nice and powerful,... and enables people to make clean argparsing code, but it seems a few quite features which are quite often asked for miss, like e.g. #11354 or that one can arbitrarily group mutually exclusive options like: --foo --bar --baz <(mutually exclusive> Anyway, feel free to close if you don't like supporting mutually exclusive groups with parents. Cheers, Chris. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 19:18:12 2021 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 22 Feb 2021 00:18:12 +0000 Subject: [issue43287] Use PEP 590 vectorcall to speed up calls to filter() In-Reply-To: <1613930363.0.0.0194789956004.issue43287@roundup.psfhosted.org> Message-ID: <1613953092.75.0.0835912359671.issue43287@roundup.psfhosted.org> Dong-hee Na added the comment: > +0 I don't see any downside. Thank you Raymond :) I agree with your view, At first, I thought that instantiation time reducing is also meaningful and we already applied PEP 590 for some of the types to reduce instantiation. (e.g range(), list(), dict(), bool(), reversed(), type()..) And also I thought that filter is one of the well-used features in Python so it was one of the candidates to apply from my sight. ;) But if this PR only consume maintenance cost, I am okay with not to apply it doesn't matter :) And happy new year Raymond(Sorry I am late ;) But the lunar new year was only 2weeks ago so not too late lol) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 19:21:55 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Feb 2021 00:21:55 +0000 Subject: [issue39791] New `files()` api from importlib_resources. In-Reply-To: <1582949490.73.0.868974160192.issue39791@roundup.psfhosted.org> Message-ID: <1613953315.49.0.000254146379589.issue39791@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: -vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 19:51:16 2021 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 22 Feb 2021 00:51:16 +0000 Subject: [issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash In-Reply-To: <1340142734.59.0.259692259195.issue15108@psf.upfronthosting.co.za> Message-ID: <1613955076.91.0.548772417759.issue15108@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 19:54:13 2021 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 22 Feb 2021 00:54:13 +0000 Subject: [issue43125] Trying To Concatenate Bytes and String in SMTPLIB In-Reply-To: <1612445008.73.0.955251739992.issue43125@roundup.psfhosted.org> Message-ID: <1613955253.16.0.443377250403.issue43125@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 20:21:52 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Mon, 22 Feb 2021 01:21:52 +0000 Subject: [issue43289] step bug in turtle's for loop In-Reply-To: <1613942999.52.0.979246620938.issue43289@roundup.psfhosted.org> Message-ID: <1613956912.98.0.753427338306.issue43289@roundup.psfhosted.org> Dennis Sweeney added the comment: If I understand correctly, changing the -1 to a -2 does not actually make the program "crash" -- you just only see one black circle. The reason is that range(40, 0, -2) produces 40, 38, 36, etc., all of which are even numbers, so rad % 2 is always 0, so col[rad % 2] is always "black". You could try: for index, rad in enumerate(range(40, 0, -2)): dot(5*rad, col[index % 2]) In the future, I would suggest asking questions like this on StackOverflow, since this is not a bug in Python itself. ---------- nosy: +Dennis Sweeney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 20:33:02 2021 From: report at bugs.python.org (Inada Naoki) Date: Mon, 22 Feb 2021 01:33:02 +0000 Subject: [issue43260] Never release buffer when MemoryError in print() In-Reply-To: <1613712440.26.0.95537936361.issue43260@roundup.psfhosted.org> Message-ID: <1613957582.54.0.73528742055.issue43260@roundup.psfhosted.org> Inada Naoki added the comment: New changeset d51436f95bf5978f82d917e53e9a456fdaa83a9d by Inada Naoki in branch '3.9': bpo-43260: io: Prevent large data remains in textio buffer. (GH-24592) https://github.com/python/cpython/commit/d51436f95bf5978f82d917e53e9a456fdaa83a9d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 20:37:01 2021 From: report at bugs.python.org (Tony) Date: Mon, 22 Feb 2021 01:37:01 +0000 Subject: [issue43291] elementary multiplication by 0.01 error Message-ID: <1613957821.53.0.407911881199.issue43291@roundup.psfhosted.org> New submission from Tony : on the >>> prompt type: >>>717161 * 0.01 7171.610000000001 the same goes for >>>717161.0 * 0.01 7171.610000000001 You can easily find more numbers with similar problem: for i in range(1000000): if len(str(i * 0.01)) > 12: print(i, i * 0.01) I am sure, that this problem was found before and circumvented by: >>>717161 / 100 7171.61 but this is hardly the way, one wants to rely on the code. This is the python version I use: Python 3.7.2 (tags/v3.7.2:9a3ffc0492, Dec 23 2018, 23:09:28) [MSC v.1916 64 bit (AMD64)] on win32 ---------- messages: 387485 nosy: tonys_0 priority: normal severity: normal status: open title: elementary multiplication by 0.01 error type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 20:38:33 2021 From: report at bugs.python.org (Inada Naoki) Date: Mon, 22 Feb 2021 01:38:33 +0000 Subject: [issue43260] Never release buffer when MemoryError in print() In-Reply-To: <1613712440.26.0.95537936361.issue43260@roundup.psfhosted.org> Message-ID: <1613957913.94.0.966211410981.issue43260@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 6e2f144f53982d7103d4cfc2d9361fc445a1817e by Inada Naoki in branch '3.8': bpo-43260: io: Prevent large data remains in textio buffer. (GH-24592) https://github.com/python/cpython/commit/6e2f144f53982d7103d4cfc2d9361fc445a1817e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 20:38:54 2021 From: report at bugs.python.org (Inada Naoki) Date: Mon, 22 Feb 2021 01:38:54 +0000 Subject: [issue43260] Never release buffer when MemoryError in print() In-Reply-To: <1613712440.26.0.95537936361.issue43260@roundup.psfhosted.org> Message-ID: <1613957934.64.0.432206295399.issue43260@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 20:43:34 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 22 Feb 2021 01:43:34 +0000 Subject: [issue43291] elementary multiplication by 0.01 error In-Reply-To: <1613957821.53.0.407911881199.issue43291@roundup.psfhosted.org> Message-ID: <1613958214.64.0.564924392069.issue43291@roundup.psfhosted.org> Raymond Hettinger added the comment: Here is an explanation for the behavior you're seeing: https://docs.python.org/3/tutorial/floatingpoint.html Here is another famous resource on the subject: https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html For exact decimal arithmetic, consider using the decimal module: https://docs.python.org/3/library/decimal.html#module-decimal ---------- nosy: +rhettinger resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 20:50:37 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 22 Feb 2021 01:50:37 +0000 Subject: [issue43250] [C API] Deprecate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT() In-Reply-To: <1613647294.57.0.745628645388.issue43250@roundup.psfhosted.org> Message-ID: <1613958637.0.0.956158933884.issue43250@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- title: [C API] Depreate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT() -> [C API] Deprecate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 21:59:32 2021 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 22 Feb 2021 02:59:32 +0000 Subject: [issue42808] Add PyType_Type.tp_vectorcall for type(obj) performance In-Reply-To: <1609581606.85.0.894764244692.issue42808@roundup.psfhosted.org> Message-ID: <1613962772.02.0.499346202215.issue42808@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset b19855bb6ffd69a16e8b53873b19b0b04f488716 by Dennis Sweeney in branch 'master': bpo-42808: Add PyType_Type.tp_vectorcall for type(obj) performance (GH-24058) https://github.com/python/cpython/commit/b19855bb6ffd69a16e8b53873b19b0b04f488716 ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 21:59:49 2021 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 22 Feb 2021 02:59:49 +0000 Subject: [issue42808] Add PyType_Type.tp_vectorcall for type(obj) performance In-Reply-To: <1609581606.85.0.894764244692.issue42808@roundup.psfhosted.org> Message-ID: <1613962789.76.0.511162230431.issue42808@roundup.psfhosted.org> Dong-hee Na added the comment: Thank you Dennis! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 22:12:13 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 22 Feb 2021 03:12:13 +0000 Subject: [issue43287] Use PEP 590 vectorcall to speed up calls to filter() In-Reply-To: <1613930363.0.0.0194789956004.issue43287@roundup.psfhosted.org> Message-ID: <1613963533.79.0.372135442045.issue43287@roundup.psfhosted.org> Raymond Hettinger added the comment: Happy new year to you as well :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 22:25:11 2021 From: report at bugs.python.org (Christoph Anton Mitterer) Date: Mon, 22 Feb 2021 03:25:11 +0000 Subject: [issue1152248] Add support for reading records with arbitrary separators to the standard IO stack Message-ID: <1613964311.72.0.0814735544181.issue1152248@roundup.psfhosted.org> Christoph Anton Mitterer added the comment: Just wondered whether this is still being considered? Cheers, Chris. ---------- nosy: +calestyo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 22:33:01 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 22 Feb 2021 03:33:01 +0000 Subject: [issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash In-Reply-To: <1340142734.59.0.259692259195.issue15108@psf.upfronthosting.co.za> Message-ID: <1613964781.51.0.2269814799.issue15108@roundup.psfhosted.org> Raymond Hettinger added the comment: Unless there is a simple, reliable, cheap, and universal solution at hand, consider closing this. Given how long PyTuple_New() has exist, it doesn't seem to be much of a problem in the real world. Historically, we punted on "crashers" involving either gc.get_referrers or byte code hacks. Both of those reach inside Python's black box, allowing disruption of otherwise sensible invariants. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 22:35:33 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 22 Feb 2021 03:35:33 +0000 Subject: [issue43287] Use PEP 590 vectorcall to speed up calls to filter() In-Reply-To: <1613930363.0.0.0194789956004.issue43287@roundup.psfhosted.org> Message-ID: <1613964933.02.0.172853085436.issue43287@roundup.psfhosted.org> Raymond Hettinger added the comment: FWIW, I don't think there is much of a maintenance burden; hence, the +0. You've already done the work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 23:11:29 2021 From: report at bugs.python.org (Viktor Kis) Date: Mon, 22 Feb 2021 04:11:29 +0000 Subject: [issue43292] xml.ElementTree iterparse filehandle left open Message-ID: <1613967089.4.0.392869817438.issue43292@roundup.psfhosted.org> New submission from Viktor Kis : Standard library xml.ElementTree - iterparse does not close filehandle properly when breaking out of a for loop iterating with iterparse. The issue only occurs when the user passes a "string" as a source object instead of a filehandle (that is because a user's filehandle can safely be closed in a context manager as shown in the attachment). ---------- components: XML files: ETiterparse.py messages: 387494 nosy: vkisforever priority: normal severity: normal status: open title: xml.ElementTree iterparse filehandle left open type: crash versions: Python 3.9 Added file: https://bugs.python.org/file49826/ETiterparse.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 23:21:13 2021 From: report at bugs.python.org (anthony shaw) Date: Mon, 22 Feb 2021 04:21:13 +0000 Subject: [issue43292] xml.ElementTree iterparse filehandle left open In-Reply-To: <1613967089.4.0.392869817438.issue43292@roundup.psfhosted.org> Message-ID: <1613967673.52.0.0756950107182.issue43292@roundup.psfhosted.org> anthony shaw added the comment: which version of Python were you doing this on? The function in question is https://github.com/python/cpython/blob/master/Lib/xml/etree/ElementTree.py#L1233-L1278 ---------- nosy: +anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 23:22:11 2021 From: report at bugs.python.org (Viktor Kis) Date: Mon, 22 Feb 2021 04:22:11 +0000 Subject: [issue43292] xml.ElementTree iterparse filehandle left open In-Reply-To: <1613967089.4.0.392869817438.issue43292@roundup.psfhosted.org> Message-ID: <1613967731.17.0.96168210755.issue43292@roundup.psfhosted.org> Viktor Kis added the comment: ran python 3.9.2 on windows 10 1) What did you do? Tried to remove folder that contains a xml file that was worked on by ElementTree iterparse with argument source='filename' (string type input) 2. What happened? python was not able to remove the folder due to file lock still held by iterparse. 3. What did you expect to happen iterparse was supposed to close the filehandle such that the user could then write/move/delete the xml file worked on, however python gave a PermissionError: Traceback (most recent call last): File "C:\Users\vkisf\Desktop\00_MYSTUFF\01_SOFTWARE\01_PYTHON\01_GITHUB\pycascades2021\ETiterparse.py", line 43, in shutil.rmtree('subdir2') File "C:\Users\vkisf\Desktop\00_MYSTUFF\01_SOFTWARE\01_PYTHON\01_GITHUB\pycascades2021\cpython\lib\shutil.py", line 740, in rmtree return _rmtree_unsafe(path, onerror) File "C:\Users\vkisf\Desktop\00_MYSTUFF\01_SOFTWARE\01_PYTHON\01_GITHUB\pycascades2021\cpython\lib\shutil.py", line 618, in _rmtree_unsafe onerror(os.unlink, fullname, sys.exc_info()) File "C:\Users\vkisf\Desktop\00_MYSTUFF\01_SOFTWARE\01_PYTHON\01_GITHUB\pycascades2021\cpython\lib\shutil.py", line 616, in _rmtree_unsafe os.unlink(fullname) PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'subdir2\\app.xml' ---------- nosy: -anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 23:32:11 2021 From: report at bugs.python.org (anthony shaw) Date: Mon, 22 Feb 2021 04:32:11 +0000 Subject: [issue43292] xml.ElementTree iterparse filehandle left open In-Reply-To: <1613967089.4.0.392869817438.issue43292@roundup.psfhosted.org> Message-ID: <1613968331.29.0.0625875103057.issue43292@roundup.psfhosted.org> anthony shaw added the comment: Example script attached works perfectly on macOS > python3.9 test.py [('default', 'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties'), ('vt', 'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes')] [('default', 'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties'), ('vt', 'http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes')] ---------- nosy: +anthonypjshaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 23:37:36 2021 From: report at bugs.python.org (Viktor Kis) Date: Mon, 22 Feb 2021 04:37:36 +0000 Subject: [issue43292] xml.ElementTree iterparse filehandle left open In-Reply-To: <1613967089.4.0.392869817438.issue43292@roundup.psfhosted.org> Message-ID: <1613968656.38.0.0575038332673.issue43292@roundup.psfhosted.org> Viktor Kis added the comment: Confirmed that no apps were using the created xml file or folder. Windows Explorer was closed for all folders only the terminal shell was open. Issue still persists on windows 10 OS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 21 23:44:04 2021 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 22 Feb 2021 04:44:04 +0000 Subject: [issue43278] unnecessary leading '\n' from Py_GetCompiler() when build with different complier In-Reply-To: <1613840541.54.0.110258286705.issue43278@roundup.psfhosted.org> Message-ID: <1613969044.07.0.981315625838.issue43278@roundup.psfhosted.org> Change by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 00:30:13 2021 From: report at bugs.python.org (paul j3) Date: Mon, 22 Feb 2021 05:30:13 +0000 Subject: [issue43259] argparse: allow add_mutually_exclusive_group on add_argument_group In-Reply-To: <1613701721.93.0.742004676065.issue43259@roundup.psfhosted.org> Message-ID: <1613971813.31.0.679939675278.issue43259@roundup.psfhosted.org> paul j3 added the comment: I've added a script that does what you want, but with a simple utility function instead of a parent (or lots of copy-n-paste). ==== I explored the code a bit, and have an idea that might correct the [parent] behavior. In the method that copies a parent's groups and actions def _add_container_actions(self, container): It might be enough to change for group in container._mutually_exclusive_groups: mutex_group = self.add_mutually_exclusive_group( required=group.required) to for group in container._mutually_exclusive_groups: pgroup = group._container mutex_group = pgroup.add_mutually_exclusive_group( required=group.required) The mutually group records where it was create in its '._container' attribute. Usually that would a parser, but in your example would the 'inputs' action group. I haven't tested this idea. ==== In https://bugs.python.org/issue11588 (request for inclusive groups), I explored adding a Usage_Group class that could nest. That project become too large, especially when considering help formatting. And I did not give any thought to dealing with parents there. ==== Another issue involving parents (and the potential problems caused by copy-by-reference). https://bugs.python.org/issue22401 argparse: 'resolve' conflict handler damages the actions of the parent parser ==== Belatedly I look for other issues involving 'parent', and found these duplicates https://bugs.python.org/issue25882 argparse help error: arguments created by add_mutually_exclusive_group() are shown outside their parent group created by add_argument_group() https://bugs.python.org/issue16807 argparse group nesting lost on inheritance ---------- Added file: https://bugs.python.org/file49827/issue43259_utility.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 01:14:42 2021 From: report at bugs.python.org (Inada Naoki) Date: Mon, 22 Feb 2021 06:14:42 +0000 Subject: [issue23882] unittest discovery doesn't detect namespace packages when given no parameters In-Reply-To: <1428406596.02.0.0629964312505.issue23882@psf.upfronthosting.co.za> Message-ID: <1613974482.32.0.688404237097.issue23882@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 5a4aa4c03e27ca5007b86c9c1ee62c77ad08a120 by Inada Naoki in branch 'master': bpo-23882: Doc: Clarify unittest discovery document (GH-21560) https://github.com/python/cpython/commit/5a4aa4c03e27ca5007b86c9c1ee62c77ad08a120 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 01:14:49 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Feb 2021 06:14:49 +0000 Subject: [issue23882] unittest discovery doesn't detect namespace packages when given no parameters In-Reply-To: <1428406596.02.0.0629964312505.issue23882@psf.upfronthosting.co.za> Message-ID: <1613974489.46.0.434648991304.issue23882@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 13.0 -> 14.0 pull_requests: +23400 pull_request: https://github.com/python/cpython/pull/24619 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 01:14:58 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Feb 2021 06:14:58 +0000 Subject: [issue23882] unittest discovery doesn't detect namespace packages when given no parameters In-Reply-To: <1428406596.02.0.0629964312505.issue23882@psf.upfronthosting.co.za> Message-ID: <1613974498.76.0.808774382007.issue23882@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington, miss-islington nosy_count: 13.0 -> 14.0 pull_requests: +23400, 23401 pull_request: https://github.com/python/cpython/pull/24619 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 01:14:59 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Feb 2021 06:14:59 +0000 Subject: [issue23882] unittest discovery doesn't detect namespace packages when given no parameters In-Reply-To: <1428406596.02.0.0629964312505.issue23882@psf.upfronthosting.co.za> Message-ID: <1613974499.11.0.694666037853.issue23882@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington, miss-islington, miss-islington nosy_count: 13.0 -> 14.0 pull_requests: +23400, 23401, 23403 pull_request: https://github.com/python/cpython/pull/24619 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 01:14:59 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Feb 2021 06:14:59 +0000 Subject: [issue23882] unittest discovery doesn't detect namespace packages when given no parameters In-Reply-To: <1428406596.02.0.0629964312505.issue23882@psf.upfronthosting.co.za> Message-ID: <1613974499.21.0.496469032606.issue23882@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington, miss-islington, miss-islington, miss-islington nosy_count: 13.0 -> 14.0 pull_requests: +23400, 23401, 23403, 23404 pull_request: https://github.com/python/cpython/pull/24619 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 01:14:59 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Feb 2021 06:14:59 +0000 Subject: [issue23882] unittest discovery doesn't detect namespace packages when given no parameters In-Reply-To: <1428406596.02.0.0629964312505.issue23882@psf.upfronthosting.co.za> Message-ID: <1613974499.32.0.859404553073.issue23882@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington, miss-islington, miss-islington, miss-islington, miss-islington nosy_count: 13.0 -> 14.0 pull_requests: +23400, 23401, 23402, 23403, 23404 pull_request: https://github.com/python/cpython/pull/24619 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 01:15:05 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Feb 2021 06:15:05 +0000 Subject: [issue23882] unittest discovery doesn't detect namespace packages when given no parameters In-Reply-To: <1428406596.02.0.0629964312505.issue23882@psf.upfronthosting.co.za> Message-ID: <1613974505.65.0.760044638899.issue23882@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +23405 pull_request: https://github.com/python/cpython/pull/24621 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 01:25:01 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Feb 2021 06:25:01 +0000 Subject: [issue23882] unittest discovery doesn't detect namespace packages when given no parameters In-Reply-To: <1428406596.02.0.0629964312505.issue23882@psf.upfronthosting.co.za> Message-ID: <1613975101.69.0.729055565118.issue23882@roundup.psfhosted.org> miss-islington added the comment: New changeset 9dd018e35cce30bc2545290b6083dbf6e50d7b61 by Miss Islington (bot) in branch '3.8': bpo-23882: Doc: Clarify unittest discovery document (GH-21560) https://github.com/python/cpython/commit/9dd018e35cce30bc2545290b6083dbf6e50d7b61 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 01:37:24 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Feb 2021 06:37:24 +0000 Subject: [issue23882] unittest discovery doesn't detect namespace packages when given no parameters In-Reply-To: <1428406596.02.0.0629964312505.issue23882@psf.upfronthosting.co.za> Message-ID: <1613975844.83.0.475465909291.issue23882@roundup.psfhosted.org> miss-islington added the comment: New changeset 30fe3ee6d39fba8183db779f15936fe64cc5ec85 by Miss Islington (bot) in branch '3.9': bpo-23882: Doc: Clarify unittest discovery document (GH-21560) https://github.com/python/cpython/commit/30fe3ee6d39fba8183db779f15936fe64cc5ec85 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 01:44:05 2021 From: report at bugs.python.org (Guanzhong Chen) Date: Mon, 22 Feb 2021 06:44:05 +0000 Subject: [issue43293] Move note about GIL to top of threading module Message-ID: <1613976245.39.0.497030592079.issue43293@roundup.psfhosted.org> New submission from Guanzhong Chen : The note about the GIL is buried pretty deep in the threading documentation, and this makes it hard for first time users to discover why their attempts at using threading to parallelizing their application did not work. This used to be the case in the old Python 2 documentation, but https://github.com/python/cpython/commit/d6d17c58af8002000ecd1326c7accafb5af8a9db moved it, and no corresponding discussion exists. I think the GIL is a pretty important thing to mention, especially for people used to other programming languages. I believe the change had a negative effect and should be reverted. ---------- assignee: docs at python components: Documentation messages: 387503 nosy: docs at python, quantum5 priority: normal severity: normal status: open title: Move note about GIL to top of threading module type: enhancement versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 01:49:55 2021 From: report at bugs.python.org (Eryk Sun) Date: Mon, 22 Feb 2021 06:49:55 +0000 Subject: [issue38822] Inconsistent os.stat behavior for directory with Access Denied In-Reply-To: <1573928094.88.0.209131085868.issue38822@roundup.psfhosted.org> Message-ID: <1613976595.83.0.455392741889.issue38822@roundup.psfhosted.org> Eryk Sun added the comment: Here's an implementation of attributes_from_dir() that strips trailing slashes (e.g. "C:/spam///" -> "C:/spam"), which entails copying the const string up to the last character that's not a slash. Rooted paths and drive paths that reference a root directory, such as "/" and "C:////", are special cased to avoid creating an empty path or a drive-relative path (e.g. "C:", which expands to the current working directory on drive C:). static BOOL attributes_from_dir(LPCWSTR pszFile, BY_HANDLE_FILE_INFORMATION *info, ULONG *reparse_tag) { BOOL result = TRUE; HANDLE hFind; WIN32_FIND_DATAW fileData; LPWSTR filename = (LPWSTR)pszFile; size_t len, n; /* Issue 38822: trailing slashes must be removed. */ /* Get the length without trailing slashes. */ n = len = wcslen(filename); while (n && (filename[n - 1] == L'\\' || filename[n - 1] == L'/')) { n--; } if (n != len) { if (n == 0 || (n == 2 && filename[1] == L':')) { /* A root directory such as \ or C:\ has no parent to query. */ result = FALSE; goto cleanup; } /* Copy the string without trailing slashes. */ filename = malloc((n + 1) * sizeof(WCHAR)); if (!filename || wcsncpy_s(filename, n + 1, pszFile, n)) { result = FALSE; goto cleanup; } } hFind = FindFirstFileW(filename, &fileData); if (hFind == INVALID_HANDLE_VALUE) { result = FALSE; goto cleanup; } FindClose(hFind); find_data_to_file_info(&fileData, info, reparse_tag); cleanup: if (filename && filename != pszFile) { free(filename); } return result; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 01:53:19 2021 From: report at bugs.python.org (Guanzhong Chen) Date: Mon, 22 Feb 2021 06:53:19 +0000 Subject: [issue43293] Move note about GIL to top of threading module In-Reply-To: <1613976245.39.0.497030592079.issue43293@roundup.psfhosted.org> Message-ID: <1613976799.26.0.144926595539.issue43293@roundup.psfhosted.org> Change by Guanzhong Chen : ---------- keywords: +patch pull_requests: +23406 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24622 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 02:21:25 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 22 Feb 2021 07:21:25 +0000 Subject: [issue43293] Move note about GIL to top of threading module In-Reply-To: <1613976245.39.0.497030592079.issue43293@roundup.psfhosted.org> Message-ID: <1613978485.12.0.727306184669.issue43293@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 03:00:02 2021 From: report at bugs.python.org (Inada Naoki) Date: Mon, 22 Feb 2021 08:00:02 +0000 Subject: [issue23882] unittest discovery doesn't detect namespace packages when given no parameters In-Reply-To: <1428406596.02.0.0629964312505.issue23882@psf.upfronthosting.co.za> Message-ID: <1613980802.0.0.615896262654.issue23882@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 03:09:04 2021 From: report at bugs.python.org (Inada Naoki) Date: Mon, 22 Feb 2021 08:09:04 +0000 Subject: [issue24275] lookdict_* give up too soon In-Reply-To: <1432444109.96.0.971324850141.issue24275@psf.upfronthosting.co.za> Message-ID: <1613981344.28.0.152193238226.issue24275@roundup.psfhosted.org> Inada Naoki added the comment: I'm +1 for this. Would you create a pull request on GitHub? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 04:15:10 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Mon, 22 Feb 2021 09:15:10 +0000 Subject: [issue15108] Incomplete tuple created by PyTuple_New() and accessed via the GC can trigged a crash In-Reply-To: <1340142734.59.0.259692259195.issue15108@psf.upfronthosting.co.za> Message-ID: <1613985310.02.0.322433231925.issue15108@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I mainly agree on closing this issue as we already have a warning about this behaviour in gc.get_referrers and other friends. On the other hand I am still a bit afraid of a crash that could happen if the GC does a pass and one of these tuples is in an inconsistent state. Is possible that this crashes Python without the user calling ever any function from the GC module. I need to do some investigation around this, but I agree that this is a separate issue, so I will open a new one if it happens to be relevant. ---------- resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 04:17:07 2021 From: report at bugs.python.org (=?utf-8?q?Stanis=C5=82aw_Skonieczny_=28Uosiu=29?=) Date: Mon, 22 Feb 2021 09:17:07 +0000 Subject: [issue26600] MagickMock __str__ sometimes returns MagickMock instead of str In-Reply-To: <1613586372.94.0.0683383549754.issue26600@roundup.psfhosted.org> Message-ID: Stanis?aw Skonieczny (Uosiu) added the comment: However there is still nothing in the docs that you have to mock `__str__` by yourself when using mock object with multiple threads. Otherwise calling `__str__` may result with raising exception if you are unlucky. Stanis?aw Skonieczny On Wed, Feb 17, 2021 at 7:26 PM Irit Katriel wrote: > > Irit Katriel added the comment: > > The documentation has examples how to set up a mock's __str__. > > https://docs.python.org/3/library/unittest.mock.html > > ---------- > nosy: +iritkatriel > resolution: -> not a bug > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 04:50:13 2021 From: report at bugs.python.org (Yehuda Katz) Date: Mon, 22 Feb 2021 09:50:13 +0000 Subject: [issue43289] step bug in turtle's for loop In-Reply-To: <1613956912.98.0.753427338306.issue43289@roundup.psfhosted.org> Message-ID: Yehuda Katz added the comment: Thank you Dennis for taking the time to answer. Yehuda Virus-free. www.avg.com <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> On Mon, Feb 22, 2021 at 3:21 AM Dennis Sweeney wrote: > > Dennis Sweeney added the comment: > > If I understand correctly, changing the -1 to a -2 does not actually make > the program "crash" -- you just only see one black circle. > > The reason is that range(40, 0, -2) produces 40, 38, 36, etc., all of > which are even numbers, so rad % 2 is always 0, so col[rad % 2] is always > "black". You could try: > > for index, rad in enumerate(range(40, 0, -2)): > dot(5*rad, col[index % 2]) > > In the future, I would suggest asking questions like this on > StackOverflow, since this is not a bug in Python itself. > > ---------- > nosy: +Dennis Sweeney > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 04:53:44 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 22 Feb 2021 09:53:44 +0000 Subject: [issue26600] MagickMock __str__ sometimes returns MagickMock instead of str In-Reply-To: <1458547986.83.0.630762686391.issue26600@psf.upfronthosting.co.za> Message-ID: <1613987624.4.0.0761976290517.issue26600@roundup.psfhosted.org> Change by Irit Katriel : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 04:55:55 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 22 Feb 2021 09:55:55 +0000 Subject: [issue26600] MagickMock __str__ sometimes returns MagickMock instead of str In-Reply-To: <1458547986.83.0.630762686391.issue26600@psf.upfronthosting.co.za> Message-ID: <1613987755.89.0.931650465912.issue26600@roundup.psfhosted.org> Irit Katriel added the comment: Why is this only relevant to multiple thread? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 05:06:47 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 22 Feb 2021 10:06:47 +0000 Subject: [issue43294] [sqlite3] unused variables in Connection begin, commit, and rollback Message-ID: <1613988407.68.0.840775188908.issue43294@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : In Modules/_sqlite/connection.c: pysqlite_connection_commit_impl(), pysqlite_connection_rollback_impl(), and _pysqlite_connection_begin() all call sqlite3_prepare_v2() with the fourth parameter (pzTail) set. This (output) parameter is never used, we can safely remove the tail variables, and just call sqlite3_prepare_v2() with NULL as the fourth parameter. Also, there's a lot of code duplication here. A support function could help simplify this, but that's out of scope. ---------- components: Library (Lib) messages: 387510 nosy: berker.peksag, erlendaasland, serhiy.storchaka priority: normal severity: normal status: open title: [sqlite3] unused variables in Connection begin, commit, and rollback type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 05:10:50 2021 From: report at bugs.python.org (=?utf-8?q?Stanis=C5=82aw_Skonieczny_=28Uosiu=29?=) Date: Mon, 22 Feb 2021 10:10:50 +0000 Subject: [issue26600] MagickMock __str__ sometimes returns MagickMock instead of str In-Reply-To: <1613987755.89.0.931650465912.issue26600@roundup.psfhosted.org> Message-ID: Stanis?aw Skonieczny (Uosiu) added the comment: When you just create a magick mock and then call `__str__` on it, it never throws an exception and always return a string. But... when you create a magick mock and then call `__str__` from two threads concurrently, one of them will raise an exception. Race is as follows: 1. Thread 1 creates magick mock m. 2. Thread 1 enters `m.__str__` it starts some internal preparations. It does not exit `__str__` yet. 3. Thread 2 enters `m.__str__`. In effect one of this threads will try to return `MagickMock` instance instead of `str` object, which if forbidden by python. Some low-level python check will raise following exception: `TypeError: __str__ returned non-string (type MagicMock)`. Stanis?aw Skonieczny On Mon, Feb 22, 2021 at 10:56 AM Irit Katriel wrote: > > Irit Katriel added the comment: > > Why is this only relevant to multiple thread? > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 05:51:03 2021 From: report at bugs.python.org (Irit Katriel) Date: Mon, 22 Feb 2021 10:51:03 +0000 Subject: [issue26600] Thread safety issue with MagickMock __str__: sometimes returns MagickMock instead of str In-Reply-To: <1458547986.83.0.630762686391.issue26600@psf.upfronthosting.co.za> Message-ID: <1613991063.67.0.135523731543.issue26600@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: not a bug -> title: MagickMock __str__ sometimes returns MagickMock instead of str -> Thread safety issue with MagickMock __str__: sometimes returns MagickMock instead of str _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 05:51:32 2021 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 22 Feb 2021 10:51:32 +0000 Subject: [issue1152248] Add support for reading records with arbitrary separators to the standard IO stack Message-ID: <1613991092.52.0.470811477137.issue1152248@roundup.psfhosted.org> Antoine Pitrou added the comment: I don't think so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 05:52:01 2021 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 22 Feb 2021 10:52:01 +0000 Subject: [issue1152248] Add support for reading records with arbitrary separators to the standard IO stack Message-ID: <1613991121.13.0.477286259508.issue1152248@roundup.psfhosted.org> Change by Antoine Pitrou : ---------- resolution: -> later stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 07:20:04 2021 From: report at bugs.python.org (Dong-hee Na) Date: Mon, 22 Feb 2021 12:20:04 +0000 Subject: [issue43250] [C API] Deprecate or remove PyFPE_START_PROTECT() and PyFPE_END_PROTECT() In-Reply-To: <1613647294.57.0.745628645388.issue43250@roundup.psfhosted.org> Message-ID: <1613996404.95.0.0455635224538.issue43250@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 08:12:22 2021 From: report at bugs.python.org (Inada Naoki) Date: Mon, 22 Feb 2021 13:12:22 +0000 Subject: [issue36346] Prepare for removing the legacy Unicode C API In-Reply-To: <1552918981.83.0.901300276481.issue36346@roundup.psfhosted.org> Message-ID: <1613999542.31.0.840873779018.issue36346@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 91a639a094978882caef91915c932fbb2fc347de by Inada Naoki in branch 'master': bpo-36346: Emit DeprecationWarning for PyArg_Parse() with 'u' or 'Z'. (GH-20927) https://github.com/python/cpython/commit/91a639a094978882caef91915c932fbb2fc347de ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 08:58:19 2021 From: report at bugs.python.org (itchyny) Date: Mon, 22 Feb 2021 13:58:19 +0000 Subject: [issue43295] datetime.strptime emits IndexError on parsing 'z' as %z Message-ID: <1614002299.86.0.551520528109.issue43295@roundup.psfhosted.org> New submission from itchyny : In Python 3.9.2, parsing 'z' (small letter) as '%z' (time zone offset) using datetime.strptime emits an IndexError. >>> from datetime import datetime >>> datetime.strptime('z', '%z') Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.9/_strptime.py", line 568, in _strptime_datetime tt, fraction, gmtoff_fraction = _strptime(data_string, format) File "/usr/local/lib/python3.9/_strptime.py", line 453, in _strptime if z[3] == ':': IndexError: string index out of range I expect ValueError (or some another useful error) as follows. ValueError: time data 'z' does not match format '%z' This is caused by compiling '%z' to a pattern containing 'Z' (for UTC) with the IGNORECASE flag and accessing z[3] without noticing 'z' is accepted by the regexp. ---------- components: Library (Lib) messages: 387514 nosy: itchyny priority: normal severity: normal status: open title: datetime.strptime emits IndexError on parsing 'z' as %z type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 09:17:30 2021 From: report at bugs.python.org (=?utf-8?b?0JHQvtGA0LjRgSDQktC10YDRhdC+0LLRgdC60LjQuQ==?=) Date: Mon, 22 Feb 2021 14:17:30 +0000 Subject: [issue41975] Textwrap to conform to https://www.unicode.org/reports/tr14/tr14-45.html In-Reply-To: <1602163198.82.0.518755458175.issue41975@roundup.psfhosted.org> Message-ID: <1614003450.36.0.551730554412.issue41975@roundup.psfhosted.org> Change by ????? ?????????? : ---------- nosy: +boris _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 09:35:53 2021 From: report at bugs.python.org (Christoph Anton Mitterer) Date: Mon, 22 Feb 2021 14:35:53 +0000 Subject: [issue1152248] Add support for reading records with arbitrary separators to the standard IO stack Message-ID: <1614004553.59.0.563982981163.issue1152248@roundup.psfhosted.org> Christoph Anton Mitterer added the comment: Oh, what a pity,... Seemed like a pretty common use case, which is unnecessarily prone to buggy or inefficient (user-)implementations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 09:37:13 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 22 Feb 2021 14:37:13 +0000 Subject: [issue43296] [sqlite3] sqlite3_value_bytes() should be called after sqlite3_value_blob() Message-ID: <1614004633.85.0.0676920983033.issue43296@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : The sqlite3_value_*() API is almost identical to the sqlite3_column_*() API. sqlite3_value_bytes() should be called after we've converted the value using sqlite3_value_blob(). See also bpo-43249. ---------- components: Library (Lib) messages: 387516 nosy: berker.peksag, erlendaasland, serhiy.storchaka priority: normal severity: normal status: open title: [sqlite3] sqlite3_value_bytes() should be called after sqlite3_value_blob() type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 10:06:15 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Mon, 22 Feb 2021 15:06:15 +0000 Subject: [issue43295] datetime.strptime emits IndexError on parsing 'z' as %z In-Reply-To: <1614002299.86.0.551520528109.issue43295@roundup.psfhosted.org> Message-ID: <1614006375.05.0.557484823484.issue43295@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +belopolsky, p-ganssle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 12:03:22 2021 From: report at bugs.python.org (Philipp Freyer) Date: Mon, 22 Feb 2021 17:03:22 +0000 Subject: [issue43297] bz2.open modes behaving differently than standard open() modes Message-ID: <1614013402.3.0.966797647642.issue43297@roundup.psfhosted.org> New submission from Philipp Freyer : The documentation clearly states that bz2.open(mode='r') opens a file in binary mode. I would have to use 'rt' for text mode. The basic Python open(mode='r') method opens a file in text mode. This is how I would expect any open(mode='r') method to work, especially since the standard Python implementation of open() treats 'r' as a synonym to 'rt'. IMHO the behavior of bz2.open() is a possible pitfall for many developers and should be in line with the standard open() behavior. Sorry, if this is in the wrong place, I am happy to put this elsewhere. However, I do see that as a conceptual issue (in our case this bug was not found for years) ---------- messages: 387517 nosy: philipp.freyer priority: normal severity: normal status: open title: bz2.open modes behaving differently than standard open() modes type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 12:25:51 2021 From: report at bugs.python.org (Kevin Thomas) Date: Mon, 22 Feb 2021 17:25:51 +0000 Subject: [issue43298] Windows build issue Message-ID: <1614014751.18.0.52094135212.issue43298@roundup.psfhosted.org> New submission from Kevin Thomas : When compiling for Windows it does not properly handle the version string MSB4184 C:\Users\kevin\cpython>PCbuild\build.bat Using py -3.7 (found 3.7 with py.exe) Fetching external libraries... bzip2-1.0.6 already exists, skipping. sqlite-3.34.0.0 already exists, skipping. xz-5.2.2 already exists, skipping. zlib-1.2.11 already exists, skipping. Fetching external binaries... libffi already exists, skipping. openssl-bin-1.1.1i already exists, skipping. tcltk-8.6.10.0 already exists, skipping. Finished. Using "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" (found in the Visual Studio installation) C:\Users\kevin\cpython>"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" "C:\Users\kevin\cpython\PCbuild\pcbuild.proj" /t:Build /m /nologo /v:m /clp:summary /p:Configuration=Release /p:Platform=x64 /p:IncludeExternals=true /p:IncludeCTypes=true /p:IncludeSSL=true /p:IncludeTkinter=true /p:UseTestMarker= /p:GIT="C:\Program Files\Git\cmd\git.exe" C:\Users\kevin\cpython\PCbuild\python.props(111,31): error MSB4184: The expression "[System.Version]::Parse('')" cannot be evaluated. Version string portion was too short or too long. [C:\Users\kevin\cpython\PCbuild\pythoncore.vcxproj] Build FAILED. C:\Users\kevin\cpython\PCbuild\python.props(111,31): error MSB4184: The expression "[System.Version]::Parse('')" cannot be evaluated. Version string portion was too short or too long. [C:\Users\kevin\cpython\PCbuild\pythoncore.vcxproj] 0 Warning(s) 1 Error(s) Time Elapsed 00:00:00.06 ---------- messages: 387518 nosy: mytechnotalent priority: normal severity: normal status: open title: Windows build issue type: compile error versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 12:27:04 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Feb 2021 17:27:04 +0000 Subject: [issue43298] Windows build issue In-Reply-To: <1614014751.18.0.52094135212.issue43298@roundup.psfhosted.org> Message-ID: <1614014824.53.0.144042731139.issue43298@roundup.psfhosted.org> Change by STINNER Victor : ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 12:28:06 2021 From: report at bugs.python.org (Eryk Sun) Date: Mon, 22 Feb 2021 17:28:06 +0000 Subject: [issue33935] shutil.copyfile throws incorrect SameFileError on Google Drive File Stream In-Reply-To: <1529627906.69.0.56676864532.issue33935@psf.upfronthosting.co.za> Message-ID: <1614014886.14.0.743642695304.issue33935@roundup.psfhosted.org> Eryk Sun added the comment: On second thought, I think it's cleaner and avoids potential race conditions to implement ntpath.sameopenfile(). Then use that to implement ntpath.samefile(). Here's a summary of suggested changes, with sample code to flesh out the concepts: * Extend nt._getfinalpathname to support file descriptors via _get_osfhandle(), and to support a flags parameter that defaults to 0 (i.e. VOLUME_NAME_DOS | FILE_NAME_NORMALIZED). * Add the constants VOLUME_NAME_NONE, VOLUME_NAME_NT, VOLUME_NAME_GUID, and FILE_NAME_OPENED. * Fix _winapi.CreateFile to link with CreateFileW instead of CreateFileA, and add the constant FILE_FLAG_BACKUP_SEMANTICS. * Implement ntpath.sameopenfile(): def _getfinalpathname_try_norm(file, flags): flags &= ~_nt.FILE_NAME_OPENED try: return _getfinalpathname(file, flags) except OSError as e: # 1: ERROR_INVALID_FUNCTION # 50: ERROR_NOT_SUPPORTED # 87: ERROR_INVALID_PARAMETER if e.winerror not in (1, 87, 50): raise # Try to resolve the path as opened, which may contain # legacy 8.3 short names. return _getfinalpathname(file, flags | _nt.FILE_NAME_OPENED) def sameopenfile(fp1, fp2): """Test whether two open file objects reference the same file""" s1 = os.fstat(fp1) s2 = os.fstat(fp2) if s1.st_ino != s2.st_ino or s1.st_dev != s2.st_dev: return False if s1.st_dev and s1.st_ino: return True # st_dev or st_ino is 0, e.g. both are 0 for a WebDAV filesystem. # Compare the final paths instead. if s1.st_dev or s1.st_ino: # Get the final paths without the device name. r1 = _getfinalpathname_try_norm(fp1, _nt.VOLUME_NAME_NONE) r2 = _getfinalpathname_try_norm(fp2, _nt.VOLUME_NAME_NONE) if s1.st_dev: # st_dev is non-zero, so just compare these # device-relative paths. return r1 == r2 n1 = _getfinalpathname_try_norm(fp1, _nt.VOLUME_NAME_NT) n2 = _getfinalpathname_try_norm(fp2, _nt.VOLUME_NAME_NT) if s1.st_ino: # st_ino is non-zero, so ignore the paths on the device(s), # which could be different hardlink paths for the same file. # Just compare the device names. index1, index2 = n1.rfind(r1), n2.rfind(r2) if index1 == -1 or index2 == -1: # This should never happen, but never say never. index1 = index2 = None d1 = n1[:index1] d2 = n2[:index2] return d1 == d2 # st_dev and st_ino are both 0. Compare the full NT paths. return n1 == n2 * Implement ntpath.samefile() via sameopenfile(): def samefile(fn1, fn2): """Test whether two file names reference the same file""" # Open the files to avoid race conditions. to_close = [] if not isinstance(fn1, int): h = _winapi.CreateFile( os.fsdecode(fn1), 0, 0, 0, _winapi.OPEN_EXISTING, _winapi.FILE_FLAG_BACKUP_SEMANTICS, 0) try: fn1 = _msvcrt.open_osfhandle(h, 0) except: _winapi.CloseHandle(h) raise to_close.append(fn1) try: if not isinstance(fn2, int): h = _winapi.CreateFile( os.fsdecode(fn2), 0, 0, 0, _winapi.OPEN_EXISTING, _winapi.FILE_FLAG_BACKUP_SEMANTICS, 0) try: fn2 = _msvcrt.open_osfhandle(h, 0) except: _winapi.CloseHandle(h) raise to_close.append(fn2) return sameopenfile(fn1, fn2) finally: for fd in to_close: os.close(fd) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 12:48:25 2021 From: report at bugs.python.org (Robert) Date: Mon, 22 Feb 2021 17:48:25 +0000 Subject: [issue43299] pyclbr.readmodule_ex traversing "import __main__": dies with ValueError: __main__.__spec__ is None / is not set Message-ID: <1614016105.41.0.669776853412.issue43299@roundup.psfhosted.org> New submission from Robert : When pyclbr.readmodule_ex() is traversing "import __main__" or another module without __spec__, it dies completely with "ValueError: __main__.__spec__ is None / is not set". => It should at least continue with the (big) rest as the comment in _ModuleBrowser.visit_Import() says: # If we can't find or parse the imported module, # too bad -- don't die here. And optionally fall back to using __file__ when present? Traceback (most recent call last): File "C:\Python310\Lib\site-packages\pythonwin\pywin\framework\editor\ModuleBrowser.py", line 128, in OnActivateView self.CheckRefreshList() File "C:\Python310\Lib\site-packages\pythonwin\pywin\framework\editor\ModuleBrowser.py", line 181, in CheckRefreshList self.CheckMadeList() File "C:\Python310\Lib\site-packages\pythonwin\pywin\framework\editor\ModuleBrowser.py", line 173, in CheckMadeList self.rootitem = root = self._MakeRoot() File "C:\Python310\Lib\site-packages\pythonwin\pywin\framework\editor\ModuleBrowser.py", line 153, in _MakeRoot data = reader(mod, path and [path]) File "C:\Python310\lib\pyclbr.py", line 120, in readmodule_ex return _readmodule(module, path or []) File "C:\Python310\lib\pyclbr.py", line 159, in _readmodule return _readmodule(submodule, parent['__path__'], package) File "C:\Python310\lib\pyclbr.py", line 184, in _readmodule return _create_tree(fullmodule, path, fname, source, tree, inpackage) File "C:\Python310\lib\pyclbr.py", line 272, in _create_tree mbrowser.visit(ast.parse(source)) File "C:\Python310\lib\ast.py", line 410, in visit return visitor(node) File "C:\Python310\lib\ast.py", line 418, in generic_visit self.visit(item) File "C:\Python310\lib\ast.py", line 410, in visit return visitor(node) File "C:\Python310\lib\pyclbr.py", line 243, in visit_Import _readmodule(module.name, []) File "C:\Python310\lib\pyclbr.py", line 167, in _readmodule spec = importlib.util._find_spec_from_path(fullmodule, search_path) File "C:\Python310\lib\importlib\util.py", line 69, in _find_spec_from_path raise ValueError('{}.__spec__ is None'.format(name)) ValueError: __main__.__spec__ is None ---------- components: Library (Lib) messages: 387520 nosy: kxrob priority: normal severity: normal status: open title: pyclbr.readmodule_ex traversing "import __main__": dies with ValueError: __main__.__spec__ is None / is not set type: crash versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 12:57:26 2021 From: report at bugs.python.org (Zack) Date: Mon, 22 Feb 2021 17:57:26 +0000 Subject: [issue43298] Windows build issue In-Reply-To: <1614014751.18.0.52094135212.issue43298@roundup.psfhosted.org> Message-ID: <1614016646.98.0.0621134280582.issue43298@roundup.psfhosted.org> Zack added the comment: Hello. I want to record a game in Windows 7 and I can not install it can you help me ---------- nosy: +Zack_Barton _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 13:12:10 2021 From: report at bugs.python.org (Coleman) Date: Mon, 22 Feb 2021 18:12:10 +0000 Subject: [issue43298] Windows build issue In-Reply-To: <1614014751.18.0.52094135212.issue43298@roundup.psfhosted.org> Message-ID: <1614017530.9.0.796061493462.issue43298@roundup.psfhosted.org> Coleman added the comment: HI Msg ---------- nosy: +White1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 13:12:34 2021 From: report at bugs.python.org (James Murphy) Date: Mon, 22 Feb 2021 18:12:34 +0000 Subject: [issue43300] "bisect" module should support reverse-sorted sequences Message-ID: <1614017554.0.0.495039898854.issue43300@roundup.psfhosted.org> New submission from James Murphy : Currently, the bisect module's functions all assume the user is maintaining a sorted list/sequence in increasing order. From the docs: "This module provides support for maintaining a list in sorted order without having to sort the list after each insertion" However, bisection is not limited to this use case, nor is it limited to increasing sequences. Many algorithms involve bisecting a sequence derived from (potentially immutable) user input, such as the standard longest-increasing-subsequence algorithm. Sometimes these derived sequences are naturally reverse-sorted, as they would be in the longest-decreasing-subsequence algorithm. (I have personally had to work around bisect not working with decreasing sequences in this case). There are other natural reasons for a reverse-sorted list to appear that one might want to bisect. Of course, a monotone decreasing function applied to a sorted list would result in a reverse-sorted one. One may want to use bisect as a root-finding algorithm for a decreasing function that may not be differentiable (or even continuous). Or a user may simply have chosen to reverse-sort using sorted(a, reverse=True). In my mind, the bisect module's purpose should be to support common use cases of bisection, not specifically to maintain a sorted list. So then the question arises, how to support reverse-sorted sequences? I see a few possible routes. 1. Add a "decreasing" parameter to bisect_left, bisect_right, (and perhaps insort_left, insort_right as well). 2. Add dedicated functions bisect_left_decreasing, bisect_right_decreasing, (and perhaps insort_left_decreasing, insort_right_decreasing as well) that operate on reverse-sorted sequences. 3. Add a more general bisect_first_false(a, pred, lo, hi) (equivalent to C++'s std::partition_point) that assumes the sequence to be partitioned with respect to the predicate function and returns the first index such that the predicate is falsey, or hi if no falsey elements are found. Then reverse-sorted lists can be bisected with something like bisect_first_false(a, lambda y: y > x). This way may be too general, but it becomes very obvious what operators will be called on the values and what the post-condition of the function is, similar to the condition of a while loop. 4. Add a "cmp" parameter to bisect_left, bisect_right, (and perhaps insort_left, insort_right as well) that keys are meant to be compared with, so one would pass bisect_left(a, x, cmp=operator.gt). It could be used in conjuction with "key", i.e. "cmp" is not meant to be a replacement for "key" as it was with sorted. 5. Do nothing. People who _really_ want to bisect reverse-sorted lists will write their own bisect_*_decreasing or figure out that if "a" is reverse-sorted, the following monstrosity does the job, making ab(use) of the new "key" parameter in 3.10 and due to the fact that False < True: a = ... # reverse-sorted x = ... # bisect left on reverse-sorted pred = lambda y: not (x < y) idx = bisect_left(a, x, key=pred) # bisect right on reverse-sorted pred = lambda y: y < x idx = bisect_right(a, x, key=pred) Commentary on the choices. 1 or 4 are the most convenient from a user perspective, no extra imports and discoverable behavior. 4 also has the benefit that the element/key class does not need to define a __lt__, which can be useful in cases where the element/key has many comparable attributes and it does not make sense to pick one to be used to define a __lt__. 3 would have the most generality and usefulness to library writers, who would probably be the primary users in need of a reverse-sorted bisection implementation. 2 suffers from combinatorial explosion (many new functions) and extra importing needed, but allows the implementation of existing functions to be unchanged, as well as mildly discouraging users from using it unless they _really_ want to use it. 5 will lead to many incorrect home-grown bisection searches or other hacks being used in the wild. Personally, I am somewhat indifferent between 1 and 4, perhaps slightly learning towards 4 as it makes explicit exactly how elements/keys will be compared. I would like to see 3 implemented as well, but admit that it is likely too general a solution for the proposed issue "support reverse-sorted lists". ---------- components: Library (Lib) messages: 387523 nosy: mCoding priority: normal severity: normal status: open title: "bisect" module should support reverse-sorted sequences type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 13:14:03 2021 From: report at bugs.python.org (Robert) Date: Mon, 22 Feb 2021 18:14:03 +0000 Subject: [issue43247] How to search for a __main__ module using pyclbr in Python3? In-Reply-To: <1613618208.75.0.875306011279.issue43247@roundup.psfhosted.org> Message-ID: <1614017643.61.0.333526769124.issue43247@roundup.psfhosted.org> Robert added the comment: # `__main__` of the source code directory: `/tmp/rebound/rebound`. # differentiate `__main__` of my target source code to read from the built-in `__main__`? In other words, how do I read the module `__main__` of the codebase: rebound? => when __main__.py is inside a package, use the full dotted module name - and an appropriate search path below that directory: pyclbr.readmodule_ex('rebound.__main__') pyclbr.readmodule_ex('lib2to3.__main__') When __main__.py is intended as a top level module / script, I think such a name collision with an internal module name is a bad idea at all. (For a special local purposes you could use a symlink or so?) (I experience a bug with pyclbr (in py3.10 at least) when it traverses an "import __main__" statement. It causes also "ValueError: __main__.__spec__ is None" or "ValueError: {}.__spec__ is not set". But this seems to be an actual bug w/o bug report so far: #43299 ) ---------- nosy: +kxrob _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 13:26:03 2021 From: report at bugs.python.org (Coleman) Date: Mon, 22 Feb 2021 18:26:03 +0000 Subject: [issue43298] Windows build issue In-Reply-To: <1614014751.18.0.52094135212.issue43298@roundup.psfhosted.org> Message-ID: <1614018363.34.0.780543706631.issue43298@roundup.psfhosted.org> Coleman added the comment: You can visit the link below and download the games without any problems. https://apkwill.com ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 13:32:33 2021 From: report at bugs.python.org (Gregory Szorc) Date: Mon, 22 Feb 2021 18:32:33 +0000 Subject: [issue41100] Support macOS 11 and Apple Silicon Macs In-Reply-To: <1592999467.1.0.372512113251.issue41100@roundup.psfhosted.org> Message-ID: <1614018753.78.0.0290293150468.issue41100@roundup.psfhosted.org> Gregory Szorc added the comment: I ran into a minor issue with the ctypes extension and the _dyld_shared_cache_contains_path dependency that was added as part of this work (commit e8b1c038b14b5fc8120aab62c9bf5fb840274cb6). When building on Intel macOS 10.15 using an 11.x SDK, the configure check for this symbol passes (#define HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH 1) and the extension compiles (albeit with a lot of deprecation warnings spewing from the Apple SDK headers). However, at run-time, we blow up due to a missing symbol error: ``` 2021-02-21T21:57:21.4116370Z cpython-3.9> clang -bundle -undefined dynamic_lookup -isysroot /Applications/Xcode_12.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk build/temp.macosx-11.0-x86_64-3.9/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpasb48bzk/Python-3.9.2/Modules/_decimal/_decimal.o build/temp.macosx-11.0-x86_64-3.9/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpasb48bzk/Python-3.9.2/Modules/_decimal/libmpdec/basearith.o build/temp.macosx-11.0-x86_64-3.9/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpasb48bzk/Python-3.9.2/Modules/_decimal/libmpdec/constants.o build/temp.macosx-11.0-x86_64-3.9/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpasb48bzk/Python-3.9.2/Modules/_decimal/libmpdec/context.o build/temp.macosx-11.0-x86_64-3.9/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpasb48bzk/Python-3.9.2/Modules/_decimal/libmpdec/convolute.o build/temp.macosx-11.0-x86_64-3.9/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpasb48bzk/Python-3.9.2/Modules/_decimal/libmpdec/crt.o build/temp.macosx-11.0-x86_64-3.9/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpasb48bzk/Python-3.9.2/Modules/_decimal/libmpdec/difradix2.o build/temp.macosx-11.0-x86_64-3.9/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpasb48bzk/Python-3.9.2/Modules/_decimal/libmpdec/fnt.o build/temp.macosx-11.0-x86_64-3.9/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpasb48bzk/Python-3.9.2/Modules/_decimal/libmpdec/fourstep.o build/temp.macosx-11.0-x86_64-3.9/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpasb48bzk/Python-3.9.2/Modules/_decimal/libmpdec/io.o build/temp.macosx-11.0-x86_64-3.9/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpasb48bzk/Python-3.9.2/Modules/_decimal/libmpdec/mpalloc.o build/temp.macosx-11.0-x86_64-3.9/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpasb48bzk/Python-3.9.2/Modules/_decimal/libmpdec/mpdecimal.o build/temp.macosx-11.0-x86_64-3.9/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpasb48bzk/Python-3.9.2/Modules/_decimal/libmpdec/numbertheory.o build/temp.macosx-11.0-x86_64-3.9/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpasb48bzk/Python-3.9.2/Modules/_decimal/libmpdec/sixstep.o build/temp.macosx-11.0-x86_64-3.9/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpasb48bzk/Python-3.9.2/Modules/_decimal/libmpdec/transpose.o -L/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/tmpasb48bzk/tools/pyhost/lib -L/usr/local/lib -lm -o build/lib.macosx-11.0-x86_64-3.9/_decimal.cpython-39-darwin.so 2021-02-21T21:57:27.1635100Z cpython-3.9> *** WARNING: renaming "_ctypes" since importing it failed: dlopen(build/lib.macosx-11.0-x86_64-3.9/_ctypes.cpython-39-darwin.so, 2): Symbol not found: __dyld_shared_cache_contains_path 2021-02-21T21:57:27.1637220Z cpython-3.9> Referenced from: build/lib.macosx-11.0-x86_64-3.9/_ctypes.cpython-39-darwin.so (which was built for Mac OS X 11.0) 2021-02-21T21:57:27.1638560Z cpython-3.9> Expected in: /usr/lib/libSystem.B.dylib 2021-02-21T21:57:27.1639770Z cpython-3.9> in build/lib.macosx-11.0-x86_64-3.9/_ctypes.cpython-39-darwin.so ``` (This build output is from https://github.com/indygreg/python-build-standalone/runs/1947611547?check_suite_focus=true) The missing symbol is provided by libdyld.dylib, which doesn't appear to be linked directly by CPython's build system. I'm only able to reproduce this on a GitHub Actions 10.5 machine using the 11.1 SDK: it seems to work fine on both an 11.1 Intel and M1 device. I reckon the correct fix is to have _ctypes link libdyld is this build configuration. I was also able to work around it in python-build-standalone by unsetting HAVE_DYLD_SHARED_CACHE_CONTAINS_PATH (hacky solution but this feature isn't needed by the build that was failing). And of course linking a non-Apple libffi should also work, which is potentially why pyenv/Homebrew/etc users aren't noticing. python-build-standalone uses its own Clang built from source, so it is entirely possible there's something differing between the Apple Clang and my Clang causing this to fail. However, at least 1 other person ran into this in the wild (https://stackoverflow.com/questions/65853539/symbol-not-found-dyld-shared-cache-contains-path-on-osx-after-installl-from), so it might be generic. While I'm here, I've taught python-build-standalone to cross-compile CPython 3.9 from both Intel and M1 Apple devices (without using universal binaries). I also have some (hacky) support for targeting iPhone/iWatch/iTV. If there's interest, I could start sending patches upstream. Let me know! ---------- nosy: +indygreg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 13:40:52 2021 From: report at bugs.python.org (Candra Wijaya) Date: Mon, 22 Feb 2021 18:40:52 +0000 Subject: [issue43301] Update form create for android Message-ID: <1614019252.61.0.935700227063.issue43301@roundup.psfhosted.org> New submission from Candra Wijaya : I need documend create sistems ---------- assignee: terry.reedy components: C API, Demos and Tools, Distutils, FreeBSD, IDLE, Installation, Regular Expressions, Tests, ctypes, email messages: 387527 nosy: barry, dstufft, eric.araujo, ezio.melotti, koobs, mrabarnett, r.david.murray, sirsak406, terry.reedy priority: normal severity: normal status: open title: Update form create for android type: crash versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 13:43:56 2021 From: report at bugs.python.org (Candra Wijaya) Date: Mon, 22 Feb 2021 18:43:56 +0000 Subject: [issue43301] Update form create for android In-Reply-To: <1614019252.61.0.935700227063.issue43301@roundup.psfhosted.org> Message-ID: <1614019436.39.0.182749013082.issue43301@roundup.psfhosted.org> Candra Wijaya added the comment: I need creat Payment ---------- resolution: -> works for me Added file: https://bugs.python.org/file49828/api.paypal.com.pem _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 13:46:38 2021 From: report at bugs.python.org (Robert) Date: Mon, 22 Feb 2021 18:46:38 +0000 Subject: [issue43299] pyclbr.readmodule_ex traversing "import __main__": dies with ValueError: __main__.__spec__ is None / is not set In-Reply-To: <1614016105.41.0.669776853412.issue43299@roundup.psfhosted.org> Message-ID: <1614019598.09.0.370805894188.issue43299@roundup.psfhosted.org> Change by Robert : ---------- keywords: +patch pull_requests: +23407 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24623 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 13:49:02 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 22 Feb 2021 18:49:02 +0000 Subject: [issue43298] Windows build cannot detect missing Windows SDK In-Reply-To: <1614014751.18.0.52094135212.issue43298@roundup.psfhosted.org> Message-ID: <1614019742.52.0.486455243368.issue43298@roundup.psfhosted.org> Steve Dower added the comment: This should mean that you haven't got the Windows SDK installed, though it might mean that you've got a *newer* WinSDK where they've changed the registration format. But more likely you deselected it when installing C++ support through Visual Studio. Could you open Visual Studio Installer and ensure that the newest Windows SDK item is selected? Assuming the spammers go away, we can use this bug to improve the error message. If they persist, we'll lock this and open a new one. ---------- title: Windows build issue -> Windows build cannot detect missing Windows SDK _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 13:49:43 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 22 Feb 2021 18:49:43 +0000 Subject: [issue43301] Update form create for android In-Reply-To: <1614019252.61.0.935700227063.issue43301@roundup.psfhosted.org> Message-ID: <1614019783.57.0.385994161031.issue43301@roundup.psfhosted.org> ?ric Araujo added the comment: This does not look like a valid bug report. You can use a general Python support group to ask questions about how to write something, the Python bug tracker is not the right place for that. ---------- assignee: terry.reedy -> nosy: -barry, dstufft, ezio.melotti, koobs, mrabarnett, r.david.murray, terry.reedy resolution: works for me -> not a bug stage: -> resolved status: open -> closed type: crash -> versions: -Python 3.10, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 13:49:51 2021 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 22 Feb 2021 18:49:51 +0000 Subject: [issue43301] Update form create for android In-Reply-To: <1614019252.61.0.935700227063.issue43301@roundup.psfhosted.org> Message-ID: <1614019791.35.0.269526776102.issue43301@roundup.psfhosted.org> Change by ?ric Araujo : Removed file: https://bugs.python.org/file49828/api.paypal.com.pem _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 13:52:18 2021 From: report at bugs.python.org (Coleman) Date: Mon, 22 Feb 2021 18:52:18 +0000 Subject: [issue43302] shutil. copy file throws incorrect SameFileError on Google Drive File Stream Message-ID: <1614019938.71.0.464413527592.issue43302@roundup.psfhosted.org> New submission from Coleman : When using shuttle. copy file on the Google Drive File Stream file way, an incorrect SameFileError can happen. MWE (assuming foo.txt exists in your google drive G:\\): >>> f1 = 'G:\\My Drive\\foo.txt' >>> f2 = 'G:\\My Drive\\foo2.txt' >>> import shutil >>> shutil.copyfile(f1, f2) >>> shutil.copyfile(f1, f2) --> Last line throws incorrect SameFileError. In contrast, executing the same code on a different file operation(e.g. local hard drive) will result in no errors. More details described here: https://apkwill.com/ The error originates in the library in generalpath.py in the function same stat: Google Drive File Stream reports inode==0 which makes os. path.same file(f1, f2) == True for any files f1 and f2 on Google File Stream. I suggest the following patch, which currently works for me: --- genericpath.py 2018-06-22 02:14:27.145744900 +0200 +++ genericpath_new.py 2018-06-22 02:10:44.485961100 +0200 @@ -86,8 +86,11 @@ # describing the same file? def samestat(s1, s2): """Test whether two stat buffers reference the same file""" - return (s1.st_ino == s2.st_ino and - s1.st_dev == s2.st_dev) + return (s1.st_ino != 0 and + s2.st_ino != 0 and + s1.st_ino == s2.st_ino and + s1.st_dev == s2.st_dev) + # Are two filenames actually pointing to the very file? ---------- components: Library (Lib) messages: 387531 nosy: Deniz Bozyigit, White1, alexkowel, eryksun priority: normal severity: normal status: open title: shutil. copy file throws incorrect SameFileError on Google Drive File Stream versions: Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 13:55:17 2021 From: report at bugs.python.org (Hans Deragon) Date: Mon, 22 Feb 2021 18:55:17 +0000 Subject: [issue27875] Syslogs /usr/sbin/foo as /foo instead of as foo In-Reply-To: <1472291311.49.0.485322574022.issue27875@psf.upfronthosting.co.za> Message-ID: <1614020117.73.0.836664173102.issue27875@roundup.psfhosted.org> Change by Hans Deragon : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 13:57:38 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 22 Feb 2021 18:57:38 +0000 Subject: [issue23882] unittest discovery doesn't detect namespace packages when given no parameters In-Reply-To: <1428406596.02.0.0629964312505.issue23882@psf.upfronthosting.co.za> Message-ID: <1614020258.23.0.0687464825464.issue23882@roundup.psfhosted.org> Terry J. Reedy added the comment: >From the merge: +++ b/Doc/library/unittest.rst @@ -330,7 +330,9 @@ Test modules and packages can customize test loading and discovery by through the `load_tests protocol`_. .. versionchanged:: 3.4 - Test discovery supports :term:`namespace packages `. + Test discovery supports :term:`namespace packages ` + for start directory. Note that you need to the top level directory too. + (e.g. ``python -m unittest discover -s root/namespace -t root``). The last sentence is missing a verb after 'you need to' saying what to do about "the top level directory. "be in"? "go to"? "later destroy"? (just kidding ;-) ---------- nosy: +terry.reedy status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 14:03:14 2021 From: report at bugs.python.org (Kevin Thomas) Date: Mon, 22 Feb 2021 19:03:14 +0000 Subject: [issue43298] Windows build cannot detect missing Windows SDK In-Reply-To: <1614014751.18.0.52094135212.issue43298@roundup.psfhosted.org> Message-ID: <1614020594.04.0.477418588604.issue43298@roundup.psfhosted.org> Kevin Thomas added the comment: Thank you Steve. I did not have the latest installed which is Win10SDK_10.0.18362, therefore it did trigger that original error in msg387518. After installing, Win10SDK_10.0.18362, it did in-fact allow a successful compilation. Updating that error code would be most helpful to Windows developers. I would have never caught it but I wanted to help test 3.10 so I thought I should try it on the Windows 10 box to make sure the community had all platforms covered. RESULTS: Build succeeded. 0 Warning(s) 0 Error(s) Time Elapsed 00:01:10.34 C:\Users\kevin\cpython>python.bat Running Release|x64 interpreter... Python 3.10.0a5+ (heads/master:91a639a094, Feb 22 2021, 14:01:03) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 14:03:42 2021 From: report at bugs.python.org (Eryk Sun) Date: Mon, 22 Feb 2021 19:03:42 +0000 Subject: [issue43302] spam In-Reply-To: <1614019938.71.0.464413527592.issue43302@roundup.psfhosted.org> Message-ID: <1614020622.38.0.210114193781.issue43302@roundup.psfhosted.org> Change by Eryk Sun : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed title: shutil. copy file throws incorrect SameFileError on Google Drive File Stream -> spam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 14:06:11 2021 From: report at bugs.python.org (Eryk Sun) Date: Mon, 22 Feb 2021 19:06:11 +0000 Subject: [issue43298] Windows build cannot detect missing Windows SDK In-Reply-To: <1614014751.18.0.52094135212.issue43298@roundup.psfhosted.org> Message-ID: <1614020771.08.0.398241121714.issue43298@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg387521 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 14:06:19 2021 From: report at bugs.python.org (Eryk Sun) Date: Mon, 22 Feb 2021 19:06:19 +0000 Subject: [issue43298] Windows build cannot detect missing Windows SDK In-Reply-To: <1614014751.18.0.52094135212.issue43298@roundup.psfhosted.org> Message-ID: <1614020779.52.0.359503085146.issue43298@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg387525 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 14:06:16 2021 From: report at bugs.python.org (Eryk Sun) Date: Mon, 22 Feb 2021 19:06:16 +0000 Subject: [issue43298] Windows build cannot detect missing Windows SDK In-Reply-To: <1614014751.18.0.52094135212.issue43298@roundup.psfhosted.org> Message-ID: <1614020776.59.0.370013688526.issue43298@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg387522 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 14:06:44 2021 From: report at bugs.python.org (Candra Wijaya) Date: Mon, 22 Feb 2021 19:06:44 +0000 Subject: [issue43301] Update form create for android In-Reply-To: <1614019252.61.0.935700227063.issue43301@roundup.psfhosted.org> Message-ID: <1614020804.89.0.0655379434872.issue43301@roundup.psfhosted.org> Candra Wijaya added the comment: One again need ---------- resolution: not a bug -> postponed status: closed -> open versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 14:09:13 2021 From: report at bugs.python.org (Alexander Riccio) Date: Mon, 22 Feb 2021 19:09:13 +0000 Subject: [issue42938] [security][CVE-2021-3177] ctypes double representation BoF In-Reply-To: <1610784207.02.0.722384660803.issue42938@roundup.psfhosted.org> Message-ID: <1614020953.35.0.268248352189.issue42938@roundup.psfhosted.org> Alexander Riccio added the comment: Petition to remove all uses of the unchecked string handling functions from CPython? Sidenote: if C4996 was on, this would be a warning. ---------- nosy: +Alexander Riccio _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 14:18:31 2021 From: report at bugs.python.org (Christian Heimes) Date: Mon, 22 Feb 2021 19:18:31 +0000 Subject: [issue42938] [security][CVE-2021-3177] ctypes double representation BoF In-Reply-To: <1610784207.02.0.722384660803.issue42938@roundup.psfhosted.org> Message-ID: <1614021511.72.0.342317159344.issue42938@roundup.psfhosted.org> Christian Heimes added the comment: Alexander, this bug report is closed. Could you please open a new request and explain your proposal? ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 14:27:16 2021 From: report at bugs.python.org (Alexander Riccio) Date: Mon, 22 Feb 2021 19:27:16 +0000 Subject: [issue42938] [security][CVE-2021-3177] ctypes double representation BoF In-Reply-To: <1610784207.02.0.722384660803.issue42938@roundup.psfhosted.org> Message-ID: <1614022036.01.0.548411970461.issue42938@roundup.psfhosted.org> Alexander Riccio added the comment: Yes, I definitely should. I work on https://bugs.python.org/issue25878 sometimes, which encompasses this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 14:27:46 2021 From: report at bugs.python.org (Steve Dower) Date: Mon, 22 Feb 2021 19:27:46 +0000 Subject: [issue43261] Python 3.9 repair on Windows do not recover pip module In-Reply-To: <1613716560.59.0.602550864554.issue43261@roundup.psfhosted.org> Message-ID: <1614022066.56.0.968823753293.issue43261@roundup.psfhosted.org> Steve Dower added the comment: Assuming you installed pip using the installer, repair should bring it back. Do you still have installer logs? They would be in %TEMP% and start with "python". We'll need at least the main log and the pip log, but if you want to just zip them all up and attach them here that would be great. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 14:32:21 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 22 Feb 2021 19:32:21 +0000 Subject: [issue24905] Allow incremental I/O to blobs in sqlite3 In-Reply-To: <1440144321.97.0.0781853247945.issue24905@psf.upfronthosting.co.za> Message-ID: <1614022341.35.0.835571134335.issue24905@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 14:36:22 2021 From: report at bugs.python.org (STINNER Victor) Date: Mon, 22 Feb 2021 19:36:22 +0000 Subject: [issue43260] Never release buffer when MemoryError in print() In-Reply-To: <1613712440.26.0.95537936361.issue43260@roundup.psfhosted.org> Message-ID: <1614022582.27.0.349555153058.issue43260@roundup.psfhosted.org> STINNER Victor added the comment: I didn't understand the bug but thanks for fixing it :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 14:49:53 2021 From: report at bugs.python.org (=?utf-8?b?5Y+M6I2J6YW46YWv?=) Date: Mon, 22 Feb 2021 19:49:53 +0000 Subject: [issue42627] urllib.request.getproxies() misparses Windows registry proxy settings In-Reply-To: <1607804872.9.0.5170746987.issue42627@roundup.psfhosted.org> Message-ID: <1614023393.33.0.276554370337.issue42627@roundup.psfhosted.org> Change by ???? : ---------- components: +Windows -Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 14:50:17 2021 From: report at bugs.python.org (=?utf-8?b?5Y+M6I2J6YW46YWv?=) Date: Mon, 22 Feb 2021 19:50:17 +0000 Subject: [issue42627] urllib.request.getproxies() misparses Windows registry proxy settings In-Reply-To: <1607804872.9.0.5170746987.issue42627@roundup.psfhosted.org> Message-ID: <1614023417.77.0.00547616422528.issue42627@roundup.psfhosted.org> Change by ???? : ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 14:56:37 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 22 Feb 2021 19:56:37 +0000 Subject: [issue43300] "bisect" module should support reverse-sorted sequences In-Reply-To: <1614017554.0.0.495039898854.issue43300@roundup.psfhosted.org> Message-ID: <1614023797.24.0.738002287091.issue43300@roundup.psfhosted.org> Raymond Hettinger added the comment: I prefer option 5 and leaving the module as-is. The bisect module api is slice oriented and, in general, people have a hard time reasoning about slices for reverse ordered sequences. Even the forward ordered API is a bit awkward so that we had to document how to implement find_lt(), find_le(), etc. because it wasn't obvious how to do so. Also, it doesn't seem to come-up much (the bisect module is over two decades old). So, I don't think the API and the internals should be gummed up for this. My vote is -1 because it would cause more problems than it would solve. Let's cater to the common use cases rather than every possible variant. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 15:13:50 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Mon, 22 Feb 2021 20:13:50 +0000 Subject: [issue43296] [sqlite3] sqlite3_value_bytes() should be called after sqlite3_value_blob() In-Reply-To: <1614004633.85.0.0676920983033.issue43296@roundup.psfhosted.org> Message-ID: <1614024830.66.0.37107959551.issue43296@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Related: If sqlite3_value_blob() returns NULL, we should check if sqlite3_errcode() equals SQLITE_NOMEM and raise MemoryError if it does. If not, we should initialise cur_py_value to None, because as the PyBytes_FromStringAndSize docs says: "If v is NULL, the contents of the bytes object are uninitialized." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 15:14:28 2021 From: report at bugs.python.org (Md Jony Hossain Habib) Date: Mon, 22 Feb 2021 20:14:28 +0000 Subject: [issue23882] unittest discovery doesn't detect namespace packages when given no parameters In-Reply-To: <1428406596.02.0.0629964312505.issue23882@psf.upfronthosting.co.za> Message-ID: <1614024868.07.0.998554578611.issue23882@roundup.psfhosted.org> Md Jony Hossain Habib added the comment: diff -r 293d9964cf6e Lib/unittest/loader.py --- a/Lib/unittest/loader.py Tue Apr 28 00:04:53 2015 -0400 +++ b/Lib/unittest/loader.py Tue Apr 28 10:12:07 2015 +0300 @@ -338,7 +338,7 @@ raise ImportError('Start directory is not importable: %r' % start_dir) if not is_namespace: - tests = list(self._find_tests(start_dir, pattern)) + tests = list(self._find_tests(start_dir, pattern, namespace=True)) return self.suiteClass(tests) def _get_directory_containing_module(self, module_name): @@ -403,7 +403,7 @@ name = self._get_name_from_path(full_path) self._loading_packages.add(name) try: - yield from self._find_tests(full_path, pattern, namespace) + yield from self._find_tests(full_path, pattern, False) finally: self._loading_packages.discard(name) diff -r 293d9964cf6e Lib/unittest/test/test_program.py --- a/Lib/unittest/test/test_program.py Tue Apr 28 00:04:53 2015 -0400 +++ b/Lib/unittest/test/test_program.py Tue Apr 28 10:12:07 2015 +0300 @@ -16,7 +16,7 @@ expectedPath = os.path.abspath(os.path.dirname(unittest.test.__file__)) self.wasRun = False - def _find_tests(start_dir, pattern): + def _find_tests(start_dir, pattern, namespace): self.wasRun = True self.assertEqual(start_dir, expectedPath) return tests ---------- nosy: +mdjonyhossainhabib _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 15:46:12 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 22 Feb 2021 20:46:12 +0000 Subject: [issue43274] Backlinks Strong decouverte SSL In-Reply-To: <1613813077.14.0.66972535006.issue43274@roundup.psfhosted.org> Message-ID: <1614026772.09.0.485862983474.issue43274@roundup.psfhosted.org> Ned Deily added the comment: https://docs.python.org/fr/3/library/ssl.html#ssl.OPENSSL_VERSION ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 15:47:58 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 22 Feb 2021 20:47:58 +0000 Subject: [issue43274] Backlinks Strong decouverte SSL In-Reply-To: <1613813077.14.0.66972535006.issue43274@roundup.psfhosted.org> Message-ID: <1614026878.24.0.525758223371.issue43274@roundup.psfhosted.org> Change by Ned Deily : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 16:12:53 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 22 Feb 2021 21:12:53 +0000 Subject: [issue43301] Update form create for android In-Reply-To: <1614019252.61.0.935700227063.issue43301@roundup.psfhosted.org> Message-ID: <1614028373.2.0.50179329443.issue43301@roundup.psfhosted.org> Terry J. Reedy added the comment: Candra: This is neither a help forum nor a free programming service. It is a workspace for improving the CPython distribution of Python. CPython does not run on Android. Anything to do with Android is off-topic here. Please do not reopen this again or otherwise change any of the headers. ---------- nosy: +terry.reedy resolution: postponed -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 16:18:03 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 22 Feb 2021 21:18:03 +0000 Subject: [issue43042] Augment tutorial sentence. In-Reply-To: <1611772942.43.0.309900316345.issue43042@roundup.psfhosted.org> Message-ID: <1614028683.6.0.195004794665.issue43042@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- keywords: -patch resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 18:06:57 2021 From: report at bugs.python.org (Inada Naoki) Date: Mon, 22 Feb 2021 23:06:57 +0000 Subject: [issue36346] Prepare for removing the legacy Unicode C API In-Reply-To: <1552918981.83.0.901300276481.issue36346@roundup.psfhosted.org> Message-ID: <1614035217.42.0.0764766150657.issue36346@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 2d6f2eed14ff5d89155b52771cc8ef957e8145b4 by Inada Naoki in branch 'master': bpo-36346: Document removal schedule of deprecate APIs (GH-20879) https://github.com/python/cpython/commit/2d6f2eed14ff5d89155b52771cc8ef957e8145b4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 18:07:07 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Feb 2021 23:07:07 +0000 Subject: [issue36346] Prepare for removing the legacy Unicode C API In-Reply-To: <1552918981.83.0.901300276481.issue36346@roundup.psfhosted.org> Message-ID: <1614035227.95.0.873758090944.issue36346@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +23409 pull_request: https://github.com/python/cpython/pull/24625 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 18:07:15 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Feb 2021 23:07:15 +0000 Subject: [issue36346] Prepare for removing the legacy Unicode C API In-Reply-To: <1552918981.83.0.901300276481.issue36346@roundup.psfhosted.org> Message-ID: <1614035235.54.0.182785417606.issue36346@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +23410 pull_request: https://github.com/python/cpython/pull/24626 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 18:31:12 2021 From: report at bugs.python.org (miss-islington) Date: Mon, 22 Feb 2021 23:31:12 +0000 Subject: [issue36346] Prepare for removing the legacy Unicode C API In-Reply-To: <1552918981.83.0.901300276481.issue36346@roundup.psfhosted.org> Message-ID: <1614036672.18.0.838365557564.issue36346@roundup.psfhosted.org> miss-islington added the comment: New changeset 93853b73b666a0ffbf5aaee8894659580581f7d3 by Miss Islington (bot) in branch '3.9': bpo-36346: Document removal schedule of deprecate APIs (GH-20879) https://github.com/python/cpython/commit/93853b73b666a0ffbf5aaee8894659580581f7d3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 19:42:53 2021 From: report at bugs.python.org (Ryan Hileman) Date: Tue, 23 Feb 2021 00:42:53 +0000 Subject: [issue42800] Traceback objects allow accessing frame objects without triggering audit hooks In-Reply-To: <1609460218.67.0.01717828776.issue42800@roundup.psfhosted.org> Message-ID: <1614040973.4.0.614952805599.issue42800@roundup.psfhosted.org> Ryan Hileman added the comment: > Sounds good to me. We can deprecate RESTRICTED with no intention to remove it, since it's documented. > Do you want to prepare a PR for this? In case you missed it, the attached PR 24182 as of commit d3e998b is based on the steps I listed - I moved all of the proposed audited properties over to a new AUDIT_READ flag that is much simpler. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 19:44:08 2021 From: report at bugs.python.org (itchyny) Date: Tue, 23 Feb 2021 00:44:08 +0000 Subject: [issue43295] datetime.strptime emits IndexError on parsing 'z' as %z In-Reply-To: <1614002299.86.0.551520528109.issue43295@roundup.psfhosted.org> Message-ID: <1614041048.64.0.829643107911.issue43295@roundup.psfhosted.org> itchyny added the comment: I noticed another unexpectedeffect of the IGNORECASE flag. It enables some non-ascii characters to match against the alphabets. >>> from datetime import datetime >>> datetime.strptime("Apr\u0130l", "%B") Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.9/_strptime.py", line 568, in _strptime_datetime tt, fraction, gmtoff_fraction = _strptime(data_string, format) File "/usr/local/lib/python3.9/_strptime.py", line 391, in _strptime month = locale_time.f_month.index(found_dict['B'].lower()) ValueError: 'apri?l' is not in list I expect time data does not match error. The ASCII flag will disable matching unexpected unicode characters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 21:31:59 2021 From: report at bugs.python.org (Inada Naoki) Date: Tue, 23 Feb 2021 02:31:59 +0000 Subject: [issue23882] unittest discovery doesn't detect namespace packages when given no parameters In-Reply-To: <1428406596.02.0.0629964312505.issue23882@psf.upfronthosting.co.za> Message-ID: <1614047519.06.0.666759253367.issue23882@roundup.psfhosted.org> Inada Naoki added the comment: I noticed that namespace package support has been broken since this commit. https://github.com/python/cpython/commit/bbbcf8693b876daae4469765aa62f8924f39a7d2 Now namespace pacakge has __file__ attribute which is None. But... try: start_dir = os.path.abspath( os.path.dirname((the_module.__file__))) except AttributeError: # look for namespace packages `the_module.__file__` doesn't raise AttributeError for now. But os.path.dirname(None) raise TypeError. The commit is backported to 3.7 branch. So namespace package support has been broken since Python 3.7. Shouldn't we drop namespace package support? It is misleading. And we could not maintain it. We didn't notice that it is broken for 3 years! ---------- nosy: +barry resolution: fixed -> stage: resolved -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 22 23:16:11 2021 From: report at bugs.python.org (Noor Michael) Date: Tue, 23 Feb 2021 04:16:11 +0000 Subject: [issue43295] datetime.strptime emits IndexError on parsing 'z' as %z In-Reply-To: <1614002299.86.0.551520528109.issue43295@roundup.psfhosted.org> Message-ID: <1614053771.83.0.900933853404.issue43295@roundup.psfhosted.org> Noor Michael added the comment: I will address the original issue regarding '%z', but the second issue actually has to do with the Unicode representation of Turkish characters. In Turkish, the letter I ('\u0049') is a capital ? ('\u0131') and the letter ? ('\u0130') is a capital i ('\u0069'). In Python however, the lowercase of I is i, as in English. >>> '\u0049'.lower() 'i' >>> '\u0130'.lower() 'i?' We see that the lowercase forms of both I and ? are i, consistent with English in one case and Turkish in the other. ---------- nosy: +noormichael _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 00:08:08 2021 From: report at bugs.python.org (Noor Michael) Date: Tue, 23 Feb 2021 05:08:08 +0000 Subject: [issue43295] datetime.strptime emits IndexError on parsing 'z' as %z In-Reply-To: <1614002299.86.0.551520528109.issue43295@roundup.psfhosted.org> Message-ID: <1614056888.43.0.778756833513.issue43295@roundup.psfhosted.org> Change by Noor Michael : ---------- keywords: +patch pull_requests: +23411 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24627 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 00:57:00 2021 From: report at bugs.python.org (Ramin Farajpour Cami) Date: Tue, 23 Feb 2021 05:57:00 +0000 Subject: [issue43303] ASAN : Memory leak in compilation Message-ID: <1614059820.89.0.803150096137.issue43303@roundup.psfhosted.org> New submission from Ramin Farajpour Cami : Hi, Asan has detected a memory leak : $ wget https://github.com/python/cpython/archive/v3.9.2.tar.gz $ tar xvf v3.9.2.tar.gz $ ./configure --disable-shared CFLAGS="-fsanitize=address -ggdb" CXXFLAGS="-fsanitize=address -ggdb" LDFLAGS="-fsanitize=address" $ make -j4 $ ~/cpython-3.9.2# ./python -E -S -m sysconfig --generate-posix-vars ================================================================= ==330505==ERROR: LeakSanitizer: detected memory leaks Direct leak of 300082 byte(s) in 137 object(s) allocated from: #0 0x7f647a692bc8 in malloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10dbc8) #1 0x55a58e972015 in PyMem_RawMalloc Objects/obmalloc.c:572 #2 0x55a58e972015 in _PyObject_Malloc Objects/obmalloc.c:1645 #3 0x55a58e972015 in _PyObject_Malloc Objects/obmalloc.c:1638 Direct leak of 2066 byte(s) in 2 object(s) allocated from: #0 0x7f647a692ffe in __interceptor_realloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10dffe) #1 0x55a58e9c9e7d in resize_compact Objects/unicodeobject.c:1079 Direct leak of 672 byte(s) in 1 object(s) allocated from: #0 0x7f647a692ffe in __interceptor_realloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10dffe) #1 0x55a58eb6c620 in _PyObject_GC_Resize Modules/gcmodule.c:2297 Indirect leak of 110001 byte(s) in 115 object(s) allocated from: #0 0x7f647a692bc8 in malloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10dbc8) #1 0x55a58e972015 in PyMem_RawMalloc Objects/obmalloc.c:572 #2 0x55a58e972015 in _PyObject_Malloc Objects/obmalloc.c:1645 #3 0x55a58e972015 in _PyObject_Malloc Objects/obmalloc.c:1638 Indirect leak of 536 byte(s) in 1 object(s) allocated from: #0 0x7f647a692bc8 in malloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10dbc8) #1 0x55a58e972382 in _PyObject_Malloc Objects/obmalloc.c:572 #2 0x55a58e972382 in pymalloc_realloc Objects/obmalloc.c:1988 #3 0x55a58e972382 in _PyObject_Realloc Objects/obmalloc.c:2007 SUMMARY: AddressSanitizer: 413357 byte(s) leaked in 256 allocation(s). Thanks, Ramin ---------- components: Build messages: 387551 nosy: Ramin Farajpour Cami priority: normal severity: normal status: open title: ASAN : Memory leak in compilation type: resource usage versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 01:04:14 2021 From: report at bugs.python.org (Christoph Anton Mitterer) Date: Tue, 23 Feb 2021 06:04:14 +0000 Subject: [issue1152248] Add support for reading records with arbitrary separators to the standard IO stack Message-ID: <1614060254.9.0.628895216299.issue1152248@roundup.psfhosted.org> Christoph Anton Mitterer added the comment: btw, just something for the record: I think the example given in msg109117 above is wrong: Depending on the read size it will produce different results, given how split() works: Imagine a byte sequence: >>> b"\0foo\0barbaz\0\0abcd".split(b"\0") [b'', b'foo', b'barbaz', b'', b'abcd'] Now the same sequence, however with a different read size (here a shorter one): >>> b"\0foo\0barbaz\0".split(b"\0") [b'', b'foo', b'barbaz', b''] >>> b"\0abcd".split(b"\0") [b'', b'abcd'] => it's the same bytes, but in the 2nd case one get's an extra b''. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 01:48:39 2021 From: report at bugs.python.org (Ramin Farajpour Cami) Date: Tue, 23 Feb 2021 06:48:39 +0000 Subject: [issue43303] ASAN : Memory leak in compilation In-Reply-To: <1614059820.89.0.803150096137.issue43303@roundup.psfhosted.org> Message-ID: <1614062919.15.0.434593473052.issue43303@roundup.psfhosted.org> Change by Ramin Farajpour Cami : ---------- nosy: +christian.heimes, lys.nikolaou, pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 02:54:32 2021 From: report at bugs.python.org (Noel del Rosario) Date: Tue, 23 Feb 2021 07:54:32 +0000 Subject: [issue43304] THONNY 3.3.0 failing to install package MULTIPROCESSING Message-ID: <1614066872.94.0.250943376947.issue43304@roundup.psfhosted.org> New submission from Noel del Rosario : I am actually using a PYTHON IDE called THONNY 3.3.- and I am not geting any success to install the package MULTI{ROCESSING. Error message is shown below. requirement multiprocessing ERROR: No matching distribution found for multiprocessing Process returned with code 1 ---------- messages: 387553 nosy: gvanrossum, rosarion2 priority: normal severity: normal status: open title: THONNY 3.3.0 failing to install package MULTIPROCESSING versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 03:04:08 2021 From: report at bugs.python.org (Ma Lin) Date: Tue, 23 Feb 2021 08:04:08 +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: <1614067448.41.0.741337483957.issue33376@roundup.psfhosted.org> Change by Ma Lin : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 03:35:39 2021 From: report at bugs.python.org (Svyatoslav) Date: Tue, 23 Feb 2021 08:35:39 +0000 Subject: [issue43261] Python 3.9 repair on Windows do not recover pip module In-Reply-To: <1613716560.59.0.602550864554.issue43261@roundup.psfhosted.org> Message-ID: <1614069339.71.0.853899200291.issue43261@roundup.psfhosted.org> Svyatoslav added the comment: Attached logs created right before I created this post. ---------- Added file: https://bugs.python.org/file49829/Temp.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 03:41:06 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 23 Feb 2021 08:41:06 +0000 Subject: [issue43303] ASAN : Memory leak in compilation In-Reply-To: <1614059820.89.0.803150096137.issue43303@roundup.psfhosted.org> Message-ID: <1614069666.41.0.695365885289.issue43303@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: To run the address sanitizer you need to deactivate pymalloc and pass some of the asan flags to avoid false positives. Check our our buildbot configuration for it: https://github.com/python/buildmaster-config/blob/master/master/custom/factories.py#L223 This looks like a false positive to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 04:21:35 2021 From: report at bugs.python.org (Eryk Sun) Date: Tue, 23 Feb 2021 09:21:35 +0000 Subject: [issue22299] resolve() on Windows makes some pathological paths unusable In-Reply-To: <1409318228.27.0.489471733533.issue22299@psf.upfronthosting.co.za> Message-ID: <1614072095.55.0.481196055338.issue22299@roundup.psfhosted.org> Eryk Sun added the comment: ntpath.realpath() has since been implemented, and it addresses the problem by keeping the extended (verbatim) path prefix in the result if the input argument has it, and otherwise removing the prefix if the final path resolves correctly without it. ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 04:27:18 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 23 Feb 2021 09:27:18 +0000 Subject: [issue35056] Test leaks of memory not managed by Python allocator In-Reply-To: <1540323419.75.0.788709270274.issue35056@psf.upfronthosting.co.za> Message-ID: <1614072438.94.0.888557224272.issue35056@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- nosy: +erlendaasland _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 05:23:06 2021 From: report at bugs.python.org (Andre Roberge) Date: Tue, 23 Feb 2021 10:23:06 +0000 Subject: [issue43304] THONNY 3.3.0 failing to install package MULTIPROCESSING In-Reply-To: <1614066872.94.0.250943376947.issue43304@roundup.psfhosted.org> Message-ID: <1614075786.09.0.461979615481.issue43304@roundup.psfhosted.org> Andre Roberge added the comment: Thonny has its own discussion site where you can report such problems: https://groups.google.com/g/thonny ---------- nosy: +aroberge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 05:42:08 2021 From: report at bugs.python.org (Anders Munch) Date: Tue, 23 Feb 2021 10:42:08 +0000 Subject: [issue43115] locale.getlocale fails if locale is set In-Reply-To: <1612359770.32.0.137300123748.issue43115@roundup.psfhosted.org> Message-ID: <1614076928.3.0.673842676489.issue43115@roundup.psfhosted.org> Anders Munch added the comment: >> What does use getlocale is time.strptime and datetime.datetime.strptime, so when getlocale fails, strptime fails. > Would they work with getlocale() returning None for the encoding ? Yes. All getlocale is used for in _strptime.py is comparing the value returned to the previous value returned. I expect changing _strptime._getlang to return the unnormalized value locale._setlocale(locale.LC_TIME, None) would work as well and more robustly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 06:08:47 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 23 Feb 2021 11:08:47 +0000 Subject: [issue43261] Python 3.9 repair on Windows do not recover pip module In-Reply-To: <1614069339.71.0.853899200291.issue43261@roundup.psfhosted.org> Message-ID: <007092a9-eee6-4042-2119-1e0e4cfb7ee1@python.org> Steve Dower added the comment: Thanks! Interestingly, it seems like it ought to have re-run, but decided not to. I wonder if there's been some change to how Windows Installer deals with using registry keys to control custom actions? Unfortunately, MSI is an incredibly complicated installer, which is why I like the Store package so much better (and one day, hopefully we can distribute the packages directly, but right now they require admin so I don't want to). I'll have to dig into the options for the pip.wxs file in our installer to see whether we can just force it to re-run on repair. To force restore it yourself, open an admin prompt and run "python.exe -m ensurepip". That's all the installer is going to do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 06:14:40 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 23 Feb 2021 11:14:40 +0000 Subject: [issue42800] Traceback objects allow accessing frame objects without triggering audit hooks In-Reply-To: <1609460218.67.0.01717828776.issue42800@roundup.psfhosted.org> Message-ID: <1614078880.28.0.821873554779.issue42800@roundup.psfhosted.org> Steve Dower added the comment: Thanks for the ping. I'll try and check in later this week to finish it up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 06:15:45 2021 From: report at bugs.python.org (Steve Dower) Date: Tue, 23 Feb 2021 11:15:45 +0000 Subject: [issue43298] Windows build cannot detect missing Windows SDK In-Reply-To: <1614020594.04.0.477418588604.issue43298@roundup.psfhosted.org> Message-ID: Steve Dower added the comment: > I did not have the latest installed which is Win10SDK_10.0.18362, therefore it did trigger that original error in msg387518. Did you have any other version installed? It should include one by default, which is why we don't mention it in the quick instructions, but I think you can remove it at install time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 06:28:38 2021 From: report at bugs.python.org (Eryk Sun) Date: Tue, 23 Feb 2021 11:28:38 +0000 Subject: [issue22961] ctypes.WinError & OSError In-Reply-To: <1417156654.51.0.229780672791.issue22961@psf.upfronthosting.co.za> Message-ID: <1614079718.38.0.848693986811.issue22961@roundup.psfhosted.org> Change by Eryk Sun : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 06:30:24 2021 From: report at bugs.python.org (Eryk Sun) Date: Tue, 23 Feb 2021 11:30:24 +0000 Subject: [issue22976] multiprocessing Queue empty() is broken on Windows In-Reply-To: <1417514973.26.0.394264585481.issue22976@psf.upfronthosting.co.za> Message-ID: <1614079824.93.0.967741762097.issue22976@roundup.psfhosted.org> Change by Eryk Sun : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 06:40:13 2021 From: report at bugs.python.org (Eryk Sun) Date: Tue, 23 Feb 2021 11:40:13 +0000 Subject: [issue22673] document the special features (eg: fdclose=False) of the standard streams In-Reply-To: <1413745258.02.0.518044907787.issue22673@psf.upfronthosting.co.za> Message-ID: <1614080413.78.0.514433772849.issue22673@roundup.psfhosted.org> Change by Eryk Sun : ---------- components: +IO versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 06:57:10 2021 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 23 Feb 2021 11:57:10 +0000 Subject: [issue43304] THONNY 3.3.0 failing to install package MULTIPROCESSING In-Reply-To: <1614066872.94.0.250943376947.issue43304@roundup.psfhosted.org> Message-ID: <1614081430.55.0.715158356618.issue43304@roundup.psfhosted.org> Mark Dickinson added the comment: Closing as third-party. But for the record, I suspect the problem here is arising from confusion between standard library modules and third-party packages: the multiprocessing package is not a 3rd party package like NumPy (for example): instead, it's part of Python's standard library. So multiprocessing doesn't need to be listed in your requirements file and doesn't need to be installed from PyPI: just do an "import multiprocessing" in your script and away you go. ---------- nosy: +mark.dickinson resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 07:05:55 2021 From: report at bugs.python.org (Kevin Thomas) Date: Tue, 23 Feb 2021 12:05:55 +0000 Subject: [issue43298] Windows build cannot detect missing Windows SDK In-Reply-To: <1614014751.18.0.52094135212.issue43298@roundup.psfhosted.org> Message-ID: <1614081955.43.0.949202504251.issue43298@roundup.psfhosted.org> Kevin Thomas added the comment: Hi Steve actually there was none installed which was strange as I had Visual Studio installed but it was not checked by default. After selecting it and installing it, everything works as expected. Updating the error message in some way might be helpful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 07:07:33 2021 From: report at bugs.python.org (Dong-hee Na) Date: Tue, 23 Feb 2021 12:07:33 +0000 Subject: [issue42627] urllib.request.getproxies() misparses Windows registry proxy settings In-Reply-To: <1607804872.9.0.5170746987.issue42627@roundup.psfhosted.org> Message-ID: <1614082053.09.0.149264561534.issue42627@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 07:24:04 2021 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 23 Feb 2021 12:24:04 +0000 Subject: [issue43239] PyCFunction_New is not exported with PyAPI_FUNC In-Reply-To: <1613491672.14.0.339809223416.issue43239@roundup.psfhosted.org> Message-ID: <1614083044.13.0.675661889177.issue43239@roundup.psfhosted.org> Petr Viktorin added the comment: New changeset 7bb1cafa4e3d648669212ea4c6d11d6eafc6da23 by Petr Viktorin in branch 'master': bpo-43239: Export PyCFunction_New with PyAPI_FUNC (GH-24551) https://github.com/python/cpython/commit/7bb1cafa4e3d648669212ea4c6d11d6eafc6da23 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 07:51:38 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 23 Feb 2021 12:51:38 +0000 Subject: [issue43251] [sqlite3] sqlite3_column_name() failures should raise MemoryError In-Reply-To: <1613647354.29.0.206061609144.issue43251@roundup.psfhosted.org> Message-ID: <1614084698.27.0.832725078951.issue43251@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: After discussing the matter briefly on the SQLite forum, I'm no longer 100% certain about this. There seems to be uncertainty about which other conditions can produce NULL, although memory error seems to be the most probable. I consider closing both this issue and the PR and just leave the code as it is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 07:58:11 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 23 Feb 2021 12:58:11 +0000 Subject: [issue43251] [sqlite3] sqlite3_column_name() failures should raise MemoryError In-Reply-To: <1613647354.29.0.206061609144.issue43251@roundup.psfhosted.org> Message-ID: <1614085091.96.0.454875549454.issue43251@roundup.psfhosted.org> Serhiy Storchaka added the comment: Could you please give a link to the discussion? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 08:04:02 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 23 Feb 2021 13:04:02 +0000 Subject: [issue43251] [sqlite3] sqlite3_column_name() failures should raise MemoryError In-Reply-To: <1613647354.29.0.206061609144.issue43251@roundup.psfhosted.org> Message-ID: <1614085442.71.0.797447650167.issue43251@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Sure! Here it is: https://sqlite.org/forum/forumpost/574c6bc66c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 08:08:07 2021 From: report at bugs.python.org (abcdenis) Date: Tue, 23 Feb 2021 13:08:07 +0000 Subject: [issue17441] Do not cache re.compile In-Reply-To: <1363468136.42.0.6196791543.issue17441@psf.upfronthosting.co.za> Message-ID: <1614085687.2.0.470992854564.issue17441@roundup.psfhosted.org> abcdenis added the comment: JFYI. regex library now supports avoiding cache: https://bitbucket.org/mrabarnett/mrab-regex/issues/387/compilaton-flag-to-avoid-storing-compiled#comment-59117125 ---------- nosy: +abcdenis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 08:47:44 2021 From: report at bugs.python.org (Eryk Sun) Date: Tue, 23 Feb 2021 13:47:44 +0000 Subject: [issue37198] _parse_localename fail to parse 'en_IL' In-Reply-To: <1559925201.97.0.400746291459.issue37198@roundup.psfhosted.org> Message-ID: <1614088064.12.0.86382962286.issue37198@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg345454 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 08:57:43 2021 From: report at bugs.python.org (mattip) Date: Tue, 23 Feb 2021 13:57:43 +0000 Subject: [issue42151] Pure Python xml.etree.ElementTree is missing default attribute values In-Reply-To: <1603684290.04.0.0149631860455.issue42151@roundup.psfhosted.org> Message-ID: <1614088663.94.0.0127289716871.issue42151@roundup.psfhosted.org> mattip added the comment: PyPy issue https://foss.heptapod.net/pypy/pypy/-/issues/3181 shows another problem with the pure-python ElementTree implementation, that again is not reflected in the C implementation. Is there a code owner for this stdlib module? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 09:05:58 2021 From: report at bugs.python.org (Ma Lin) Date: Tue, 23 Feb 2021 14:05:58 +0000 Subject: [issue43305] A typo in /Modules/_io/bufferedio.c Message-ID: <1614089158.05.0.547226223268.issue43305@roundup.psfhosted.org> New submission from Ma Lin : 654 PyErr_Fetch(&t, &v, &tb); 655 if (v == NULL || !PyErr_GivenExceptionMatches(v, PyExc_BlockingIOError)) { ? this should be t https://github.com/python/cpython/blob/v3.10.0a5/Modules/_io/bufferedio.c#L654-L655 Does this need a test case? ---------- components: IO messages: 387570 nosy: malin priority: normal severity: normal status: open title: A typo in /Modules/_io/bufferedio.c type: behavior versions: Python 3.10, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 09:18:26 2021 From: report at bugs.python.org (Tom Dougherty) Date: Tue, 23 Feb 2021 14:18:26 +0000 Subject: [issue43292] xml.ElementTree iterparse filehandle left open In-Reply-To: <1613967089.4.0.392869817438.issue43292@roundup.psfhosted.org> Message-ID: <1614089906.1.0.366160538873.issue43292@roundup.psfhosted.org> Tom Dougherty added the comment: "erase all files" ---------- nosy: +dtom9424 type: crash -> security _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 09:39:34 2021 From: report at bugs.python.org (twoone3) Date: Tue, 23 Feb 2021 14:39:34 +0000 Subject: [issue43263] threading module unable to run In-Reply-To: <1613722745.98.0.253058139819.issue43263@roundup.psfhosted.org> Message-ID: <1614091174.66.0.662865529607.issue43263@roundup.psfhosted.org> twoone3 <3197653242 at qq.com> added the comment: Have you been studying this problem? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 09:59:12 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 23 Feb 2021 14:59:12 +0000 Subject: [issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py In-Reply-To: <1612626856.83.0.902540623753.issue43146@roundup.psfhosted.org> Message-ID: <1614092352.73.0.955617174246.issue43146@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset 26f18b8540b49d592af66361f8df1a03953d1768 by Irit Katriel in branch 'master': bpo-43146: fix regression in traceback.print_exception(None) (GH-24463) https://github.com/python/cpython/commit/26f18b8540b49d592af66361f8df1a03953d1768 ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 10:01:38 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 23 Feb 2021 15:01:38 +0000 Subject: [issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py In-Reply-To: <1612626856.83.0.902540623753.issue43146@roundup.psfhosted.org> Message-ID: <1614092498.01.0.933647860295.issue43146@roundup.psfhosted.org> Guido van Rossum added the comment: Are you going to create a separate PR or a new issue for the other thing? (And what exactly *is* the other thing? Please summarize.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 10:26:26 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 23 Feb 2021 15:26:26 +0000 Subject: [issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py In-Reply-To: <1612626856.83.0.902540623753.issue43146@roundup.psfhosted.org> Message-ID: <1614093986.48.0.466283270059.issue43146@roundup.psfhosted.org> Irit Katriel added the comment: The other thing is not related to the one reported here, but I found it while writing the test for this. We have a new API in 3.10, where you can do traceback.print_exception(ex) (so you don't need to give the whole type,val,tb triplet). But: >>> traceback.print_exception(None) Traceback (most recent call last): File "", line 1, in File "C:\Users\User\src\cpython-dev\lib\traceback.py", line 110, in print_exception value, tb = _parse_value_tb(exc, value, tb) File "C:\Users\User\src\cpython-dev\lib\traceback.py", line 94, in _parse_value_tb return exc, exc.__traceback__ AttributeError: 'NoneType' object has no attribute '__traceback__' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 10:31:18 2021 From: report at bugs.python.org (Christian Bachmaier) Date: Tue, 23 Feb 2021 15:31:18 +0000 Subject: [issue43229] freeze searches libpython3.9.so in /usr/lib instead /usr/lib/x86_64-linux-gnu In-Reply-To: <1613399795.84.0.430887747566.issue43229@roundup.psfhosted.org> Message-ID: <1614094278.68.0.48652181006.issue43229@roundup.psfhosted.org> Christian Bachmaier added the comment: The same situation in Ubuntu development branch's package python3.9.2-0ubuntu2 . Inserting the follwing if sysconfig.get_config_var('MULTIARCH'): masd = sysconfig.get_config_var('multiarchsubdir') if masd.startswith(os.sep): masd = masd[len(os.sep):] libdir = os.path.join(libdir, masd) directly after line ~ 247 in freeze.py libdir = sysconfig.get_config_var('LIBDIR') seems to fix the first problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 10:45:01 2021 From: report at bugs.python.org (Christian Bachmaier) Date: Tue, 23 Feb 2021 15:45:01 +0000 Subject: [issue43229] freeze searches libpython3.9.so in /usr/lib instead /usr/lib/x86_64-linux-gnu In-Reply-To: <1613399795.84.0.430887747566.issue43229@roundup.psfhosted.org> Message-ID: <1614095101.18.0.194712460166.issue43229@roundup.psfhosted.org> Change by Christian Bachmaier : ---------- type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 10:55:10 2021 From: report at bugs.python.org (=?utf-8?q?D=C3=A1vid_Nemeskey?=) Date: Tue, 23 Feb 2021 15:55:10 +0000 Subject: [issue43306] Error in multiprocessing.Pool's initializer doesn't stop execution Message-ID: <1614095710.79.0.438522017133.issue43306@roundup.psfhosted.org> New submission from D?vid Nemeskey : There is an inconsistency in how multiprocessing.Pool handles exceptions thrown in the workers: - exceptions raised by the mapped function stop execution right away - exceptions raised in an initializer are ignored and the pool continues spawning new workers indefinitely, each of them failing. I believe the behavior should be the same in both cases, and of the two, the first one is preferable (especially since that's what people are used to). The documentation doesn't cover how exceptions are handled in pools, either. ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 387577 nosy: docs at python, nemeskeyd priority: normal severity: normal status: open title: Error in multiprocessing.Pool's initializer doesn't stop execution type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 10:56:00 2021 From: report at bugs.python.org (Andrew Borba) Date: Tue, 23 Feb 2021 15:56:00 +0000 Subject: [issue37736] asyncio.wait_for is still confusing In-Reply-To: <1564651501.71.0.316479365632.issue37736@roundup.psfhosted.org> Message-ID: <1614095760.53.0.816407322054.issue37736@roundup.psfhosted.org> Andrew Borba added the comment: > The key word here is "misbehaving". Cooperative concurrency does require cooperation. Your stance makes sense in an ideal environment where we control every Task that our application deals with. However, there are some cases in which busted Task cancellation logic is out of our control to fix, and in some cases it may be critical to strictly enforce a timeout regardless of what a Task does. If wait_for is only to be used as a best effort, then we need a nuclear option as well. ---------- nosy: +andrewborba _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 11:23:38 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 23 Feb 2021 16:23:38 +0000 Subject: [issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py In-Reply-To: <1612626856.83.0.902540623753.issue43146@roundup.psfhosted.org> Message-ID: <1614097418.92.0.449150324693.issue43146@roundup.psfhosted.org> Guido van Rossum added the comment: So the PR just merged fixes that, right? Color me confused. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 11:29:50 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 23 Feb 2021 16:29:50 +0000 Subject: [issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py In-Reply-To: <1612626856.83.0.902540623753.issue43146@roundup.psfhosted.org> Message-ID: <1614097790.08.0.00759412772728.issue43146@roundup.psfhosted.org> Irit Katriel added the comment: The PR just merged fixes the issue that was reported by Florian (what I broke). That impacted pre-3.10 APIs so was an actual regression. The issue with traceback.print_exception(None) is new to 3.10, and was introduced in issue 26389. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 11:45:40 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 23 Feb 2021 16:45:40 +0000 Subject: [issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py In-Reply-To: <1614097790.08.0.00759412772728.issue43146@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: So the remaining question is what to do for print_exception(None)? Honestly the current (new) behavior of printing `NoneType: None` seems fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 11:58:33 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 23 Feb 2021 16:58:33 +0000 Subject: [issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py In-Reply-To: <1612626856.83.0.902540623753.issue43146@roundup.psfhosted.org> Message-ID: <1614099513.59.0.463815584487.issue43146@roundup.psfhosted.org> Irit Katriel added the comment: > So the remaining question is what to do for print_exception(None)? Yes. > Honestly the current (new) behavior of printing `NoneType: None` seems fine. That's not the current behaviour - I removed that fix from the PR till we agree what to do. Currently we get the AttributeError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 12:01:37 2021 From: report at bugs.python.org (mattip) Date: Tue, 23 Feb 2021 17:01:37 +0000 Subject: [issue43307] Sync site.py and sysconfig.py with PyPy Message-ID: <1614099697.74.0.00793474139311.issue43307@roundup.psfhosted.org> New submission from mattip : PyPy added some enhancements to sysconfig.py to deal with multiple implementations. site.py copies parts of sysconfig.py to save time when importing. It would be nice to backport these enhamncements, maybe other implementations could reuse them. ---------- components: Installation messages: 387583 nosy: mattip priority: normal severity: normal status: open title: Sync site.py and sysconfig.py with PyPy versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 12:02:34 2021 From: report at bugs.python.org (Nathan Beals) Date: Tue, 23 Feb 2021 17:02:34 +0000 Subject: [issue42994] Missing MIME types for opus, AAC, 3gpp and 3gpp2 In-Reply-To: <1611265312.85.0.212937423943.issue42994@roundup.psfhosted.org> Message-ID: <1614099754.05.0.62236973217.issue42994@roundup.psfhosted.org> Nathan Beals added the comment: As per the instructions on the contributing guide, I'm "pinging" this issue after 30 days. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 12:08:11 2021 From: report at bugs.python.org (mattip) Date: Tue, 23 Feb 2021 17:08:11 +0000 Subject: [issue43307] Sync site.py and sysconfig.py with PyPy In-Reply-To: <1614099697.74.0.00793474139311.issue43307@roundup.psfhosted.org> Message-ID: <1614100091.42.0.106916825493.issue43307@roundup.psfhosted.org> Change by mattip : ---------- keywords: +patch pull_requests: +23413 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24628 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 12:16:33 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 23 Feb 2021 17:16:33 +0000 Subject: [issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py In-Reply-To: <1612626856.83.0.902540623753.issue43146@roundup.psfhosted.org> Message-ID: <1614100593.16.0.538646800034.issue43146@roundup.psfhosted.org> Change by Irit Katriel : ---------- pull_requests: +23414 pull_request: https://github.com/python/cpython/pull/24629 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 12:21:40 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 23 Feb 2021 17:21:40 +0000 Subject: [issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py In-Reply-To: <1612626856.83.0.902540623753.issue43146@roundup.psfhosted.org> Message-ID: <1614100900.56.0.579423514719.issue43146@roundup.psfhosted.org> Irit Katriel added the comment: The new PR makes it print `NoneType: None`, which is at least consistent with what the same functions do without the Issue26389 shortcut. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 12:43:27 2021 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 23 Feb 2021 17:43:27 +0000 Subject: [issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py In-Reply-To: <1612626856.83.0.902540623753.issue43146@roundup.psfhosted.org> Message-ID: <1614102207.32.0.187205001789.issue43146@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset b798ab06937f8bb24b444a49dd42e11fff15e654 by Irit Katriel in branch 'master': bpo-43146: fix None-handling in single-arg traceback.print_exception(None) (GH-24629) https://github.com/python/cpython/commit/b798ab06937f8bb24b444a49dd42e11fff15e654 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 12:59:57 2021 From: report at bugs.python.org (Eryk Sun) Date: Tue, 23 Feb 2021 17:59:57 +0000 Subject: [issue43115] locale.getlocale fails if locale is set In-Reply-To: <1612359770.32.0.137300123748.issue43115@roundup.psfhosted.org> Message-ID: <1614103197.58.0.562115514326.issue43115@roundup.psfhosted.org> Eryk Sun added the comment: > All getlocale is used for in _strptime.py is comparing the value > returned to the previous value returned. Which is why _strptime should be calling setlocale(LC_TIME), the same as the calendar module. That's not to say that I don't think getlocale() and normalize() need to be fixed. But returning None for the encoding when there's no codeset, while it works for a few cases, doesn't address many other cases. For example, normalize() and getlocale() will often be wrong in many cases when an encoding is guessed, such as normalize('en_US') -> 'en_US.ISO8859-1' and normalize('ja_JP') -> 'ja_JP.eucJP'. The encoding is wrong, plus no encoding except UTF-8 is allowed in a BCP-47 locale, so setlocale() will fail. In all but four cases, classic ucrt "language_country.codepage" locales such as "Japanese_Japan.932" are parsed in a 'benignly' incorrect way (i.e. not as RFC 1766 language tags), which at least roundtrips with setlocale(). It simply splits out the codeset, e.g. ('Japanese_Japan', '932'). The four misbehaving cases are actually the ones for which getlocale() works as documented because the locale_alias mapping has an entry for them. * "French_France.1252" -> ('fr_FR', 'cp1252') * "German_Germany.1252" -> ('de_DE', 'cp1252') * "Portuguese_Brazil.1252" -> ('pt_BR', 'cp1252') * "Spanish_Spain.1252" -> ('es_ES', 'cp1252') The problem is that the parsed tuples don't roundtrip because normalize() keeps the encoding, complete with the 'cp' prefix, and only UTF-8 is allowed in a BCP-47 locale. For example: >>> locale.setlocale(locale.LC_CTYPE, 'French_France.1252') 'French_France.1252' >>> locale.getlocale() ('fr_FR', 'cp1252') >>> locale.normalize(locale._build_localename(locale.getlocale())) 'fr_FR.cp1252' >>> try: locale.setlocale(locale.LC_CTYPE, locale.getlocale()) ... except locale.Error as e: print(e) ... unsupported locale setting I suppose normalize() could be special cased in Windows to look for a BCP-47 locale and omit the encoding if it's not UTF-8. I suppose _parse_localename() could be special cased to use None for the encoding if there's no codeset. But this just leaves me feeling unsettled and disappointed that we could be doing a better job of providing the documented behavior of getlocale() and normalize() by implementing them separately for Windows using the tools that the OS provides. FYI, I've commented on this problem across a few issues, including bpo-20088 and bpo-23425 in early 2015, and then extensively in bpo-37945 in mid 2019. Plus my latest comments in msg387256 in this issue. The latter suggestions could be combined with something like the mapping that's generated by the code in msg235937 in bpo-23425, in order to parse a classic ucrt locale string such as "Japanese_Japan.932" properly as ("ja_JP", "cp932"), and then build and normalize it back as "Japanese_Japan.932". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 13:26:22 2021 From: report at bugs.python.org (cptpcrd) Date: Tue, 23 Feb 2021 18:26:22 +0000 Subject: [issue43308] subprocess.Popen leaks file descriptors opened for DEVNULL or PIPE stdin/stdout/stderr arguments Message-ID: <1614104782.38.0.966400001347.issue43308@roundup.psfhosted.org> New submission from cptpcrd : TL;DR: subprocess.Popen's handling of file descriptors opened for DEVNULL or PIPE inputs/outputs has serious problems, and it can be coerced into leaking file descriptors in several ways. This can cause issues related to resource exhaustion. # The basic problem As part of its setup, Popen.__init__() calls Popen._get_handles(), which looks at the given stdin/stdout/stderr arguments and returns a tuple of 6 file descriptors (on Windows, file handles) indicating how stdin/stdout/stderr should be redirected. However, these file descriptors aren't properly closed if exceptions occur in certain cases. # Variant 1: Bad argument errors (introduced in 3.9) The first variant of this bug is shockingly easy to reproduce (note that this only works on platforms with /proc/self/fd, like Linux): ``` import os, subprocess def show_fds(): for entry in os.scandir("/proc/self/fd"): print(entry.name, "->", os.readlink(entry.path)) print("Before:") show_fds() try: subprocess.Popen(["ls"], stdin=subprocess.PIPE, user=1.0) except TypeError as e: # "User must be a string or an integer" print(e) print("After:") show_fds() ``` This produces something like: ``` Before: 0 -> /dev/pts/1 1 -> /dev/pts/1 2 -> /dev/pts/1 3 -> /proc/12345/fd User must be a string or an integer After: 0 -> /dev/pts/1 1 -> /dev/pts/1 2 -> /dev/pts/1 3 -> pipe:[1234567] 3 -> pipe:[1234567] 5 -> /proc/12345/fd ``` The process never got launched (because of the invalid `user` argument), but the (unused) pipe created for piping to stdin is left open! Substituting DEVNULL for PIPE instead leaves a single file descriptor open to `/dev/null`. This happens because the code that validates the `user`, `group`, and `extra_groups` arguments [1] was added to Popen.__init__() *after* the call to Popen._get_handles() [2], and there isn't a try/except that closes the file descriptors if an exception gets raised during validation (which can easily happen). # Variant 2: Error opening file descriptors (seems to have been around in `subprocess` forever) Within Popen._get_handles() (on Windows [3] or POSIX [4]), previously opened file descriptors are not closed if an error occurs while opening later file descriptors. For example, take the case where only one more file descriptor can be opened without hitting the limit on the number of file descriptors, and `subprocess.Popen(["ls"], stdin=subprocess.DEVNULL, stdout=supbrocess.PIPE)` is called. subprocess will be able to open `/dev/null` for stdin, but trying to creating a `pipe()` for stdout will fail with EMFILE or ENFILE. Since Popen._get_handles() doesn't handle exceptions from `pipe()` (or when opening `/dev/null`), the `/dev/null` file descriptor opened for stdin will be be left open. This variant is most easily triggered by file descriptor exhaustion, and it makes that problem worse by leaking even *more* file descriptors. Here's an example that reproduces this by monkey-patching `os` to force an error: ``` import os, subprocess def show_fds(): for entry in os.scandir("/proc/self/fd"): print(entry.name, "->", os.readlink(entry.path)) print("Before:") show_fds() # Trigger an error when trying to open /dev/null os.devnull = "/NOEXIST" try: subprocess.Popen(["ls"], stdin=subprocess.PIPE, stdout=subprocess.DEVNULL) except FileNotFoundError as e: # "User must be a string or an integer" print(e) print("After:") show_fds() ``` Output: ``` Before: 0 -> /dev/pts/1 1 -> /dev/pts/1 2 -> /dev/pts/1 3 -> /proc/12345/fd [Errno 2] No such file or directory: '/dev/null' After: 0 -> /dev/pts/1 1 -> /dev/pts/1 2 -> /dev/pts/1 3 -> pipe:[1234567] 4 -> pipe:[1234567] 5 -> /proc/12345/fd ``` Again, the pipe is left open. # Paths to fix. Variant 1 can be fixed by simply reordering code in Popen.__init__() (and leaving comments warning about the importance of maintaining the order!). I've attached a basic patch that does this. Variant 2 might take some more work -- especially given the shared Popen._devnull file descriptor that needs to be accounted for separately -- and may require significant changes to both Popen.__init__() and Popen._get_handles() to fix. [1]: https://github.com/python/cpython/blob/master/Lib/subprocess.py#L872 [2]: https://github.com/python/cpython/blob/master/Lib/subprocess.py#L840 [3]: https://github.com/python/cpython/blob/master/Lib/subprocess.py#L1251 [4]: https://github.com/python/cpython/blob/master/Lib/subprocess.py#L1581 ---------- components: Library (Lib) files: subprocess-validation-fd-leak.patch keywords: patch messages: 387589 nosy: cptpcrd priority: normal severity: normal status: open title: subprocess.Popen leaks file descriptors opened for DEVNULL or PIPE stdin/stdout/stderr arguments type: resource usage versions: Python 3.10, Python 3.8, Python 3.9 Added file: https://bugs.python.org/file49830/subprocess-validation-fd-leak.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 14:15:17 2021 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 23 Feb 2021 19:15:17 +0000 Subject: [issue43263] threading module unable to run In-Reply-To: <1613722745.98.0.253058139819.issue43263@roundup.psfhosted.org> Message-ID: <1614107717.86.0.81787846797.issue43263@roundup.psfhosted.org> Mark Dickinson added the comment: [twoone3] > Have you been studying this problem? Not personally, no. Sorry, but I'm afraid this really isn't an actionable bug report as it stands: we still don't have an effective way to reproduce, and it's far from clear that this is actually a bug in CPython as opposed to a bug somewhere in the BDSpyrunner code. If you're able to produce (and attach to this issue) a minimal self-contained C++ file that exhibits the issue, that could help increase the chances that we can confirm the existence of a CPython bug. Even better, if you're able to diagnose the issue yourself to the point where there's a clear CPython bug to report, that's much more likely to lead to a fix. (And those two actions - producing a minimal example, and diagnosis, should be largely compatible.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 14:27:05 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Tue, 23 Feb 2021 19:27:05 +0000 Subject: [issue43251] [sqlite3] sqlite3_column_name() failures should raise MemoryError In-Reply-To: <1613647354.29.0.206061609144.issue43251@roundup.psfhosted.org> Message-ID: <1614108425.22.0.703784303072.issue43251@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Larry Brasfield's comment https://sqlite.org/forum/forumpost/6430fc589d?t=h aligns with https://bugs.python.org/issue43251#msg387428 I'll think twice before posting there again, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 14:39:25 2021 From: report at bugs.python.org (Irit Katriel) Date: Tue, 23 Feb 2021 19:39:25 +0000 Subject: [issue43146] 3.10a5 regression: AttributeError: 'NoneType' object has no attribute '__suppress_context__' in traceback.py In-Reply-To: <1612626856.83.0.902540623753.issue43146@roundup.psfhosted.org> Message-ID: <1614109165.53.0.255501073682.issue43146@roundup.psfhosted.org> Change by Irit Katriel : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 16:16:54 2021 From: report at bugs.python.org (Ned Deily) Date: Tue, 23 Feb 2021 21:16:54 +0000 Subject: [issue43229] freeze searches libpython3.9.so in /usr/lib instead /usr/lib/x86_64-linux-gnu In-Reply-To: <1613399795.84.0.430887747566.issue43229@roundup.psfhosted.org> Message-ID: <1614115014.13.0.145485210526.issue43229@roundup.psfhosted.org> Change by Ned Deily : ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 18:21:39 2021 From: report at bugs.python.org (twoone3) Date: Tue, 23 Feb 2021 23:21:39 +0000 Subject: [issue43263] threading module unable to run In-Reply-To: <1613722745.98.0.253058139819.issue43263@roundup.psfhosted.org> Message-ID: <1614122499.08.0.0545443770905.issue43263@roundup.psfhosted.org> twoone3 <3197653242 at qq.com> added the comment: After my test, when the exe calls the dll, the dll calls Python. If the Python code involves multiple threads, the process will be stuck. ---------- Added file: https://bugs.python.org/file49831/test.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 18:42:25 2021 From: report at bugs.python.org (bland328) Date: Tue, 23 Feb 2021 23:42:25 +0000 Subject: [issue43309] str.replace() TypeError exception message backward Message-ID: <1614123745.38.0.870290425288.issue43309@roundup.psfhosted.org> New submission from bland328 : Attempting to replace a character in a bytes string literal results in an exception saying that "a bytes-like object is required, not 'str'", when (unless I'm missing something) it should say the opposite. To repro: >>> x=b'abc' >>> x.replace('a','z') Traceback (most recent call last): File "", line 1, in TypeError: a bytes-like object is required, not 'str' ---------- messages: 387593 nosy: bland328 priority: normal severity: normal status: open title: str.replace() TypeError exception message backward type: behavior versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 18:49:51 2021 From: report at bugs.python.org (bland328) Date: Tue, 23 Feb 2021 23:49:51 +0000 Subject: [issue43309] str.replace() TypeError exception message backward In-Reply-To: <1614123745.38.0.870290425288.issue43309@roundup.psfhosted.org> Message-ID: <1614124191.05.0.51352998294.issue43309@roundup.psfhosted.org> bland328 added the comment: Dumb misunderstanding on my part--didn't realize replace() would actually work on a bytes-type object, so *I* had it backwards. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 19:39:59 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 24 Feb 2021 00:39:59 +0000 Subject: [issue43283] IDLE: Explain print slowness and speedup method In-Reply-To: <1613889334.88.0.10201417345.issue43283@roundup.psfhosted.org> Message-ID: <1614127199.57.0.445506394324.issue43283@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 2827e8a177c2a6584fada594bca6829c53a2872f by Terry Jan Reedy in branch 'master': bpo-43283: Add IDLE doc paragraph about print speed (GH-24615) https://github.com/python/cpython/commit/2827e8a177c2a6584fada594bca6829c53a2872f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 19:40:12 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Feb 2021 00:40:12 +0000 Subject: [issue43283] IDLE: Explain print slowness and speedup method In-Reply-To: <1613889334.88.0.10201417345.issue43283@roundup.psfhosted.org> Message-ID: <1614127212.56.0.308660609175.issue43283@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +23415 pull_request: https://github.com/python/cpython/pull/24631 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 19:40:19 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Feb 2021 00:40:19 +0000 Subject: [issue43283] IDLE: Explain print slowness and speedup method In-Reply-To: <1613889334.88.0.10201417345.issue43283@roundup.psfhosted.org> Message-ID: <1614127219.15.0.155240577545.issue43283@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +23416 pull_request: https://github.com/python/cpython/pull/24632 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 19:43:00 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 24 Feb 2021 00:43:00 +0000 Subject: [issue43209] system cannot find the file specified in subprocess.py In-Reply-To: <1613158394.2.0.196076436453.issue43209@roundup.psfhosted.org> Message-ID: <1614127380.56.0.164952688696.issue43209@roundup.psfhosted.org> Terry J. Reedy added the comment: Steve, should this be closed as 'not a bug'? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 20:04:01 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Feb 2021 01:04:01 +0000 Subject: [issue43283] IDLE: Explain print slowness and speedup method In-Reply-To: <1613889334.88.0.10201417345.issue43283@roundup.psfhosted.org> Message-ID: <1614128641.38.0.644036126149.issue43283@roundup.psfhosted.org> miss-islington added the comment: New changeset e202f1e4dbe02fbcae9f6afed863b7221b39c984 by Miss Islington (bot) in branch '3.9': bpo-43283: Add IDLE doc paragraph about print speed (GH-24615) https://github.com/python/cpython/commit/e202f1e4dbe02fbcae9f6afed863b7221b39c984 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 20:12:27 2021 From: report at bugs.python.org (Ethan Furman) Date: Wed, 24 Feb 2021 01:12:27 +0000 Subject: [issue43098] tarfile list() method does not show file type In-Reply-To: <1612240547.16.0.611621491067.issue43098@roundup.psfhosted.org> Message-ID: <1614129147.35.0.92210256087.issue43098@roundup.psfhosted.org> Change by Ethan Furman : ---------- assignee: -> ethan.furman nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 20:47:12 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 24 Feb 2021 01:47:12 +0000 Subject: [issue43283] IDLE: Explain print slowness and speedup method In-Reply-To: <1613889334.88.0.10201417345.issue43283@roundup.psfhosted.org> Message-ID: <1614131232.81.0.514846630056.issue43283@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset bdf0fece5bbc2fc9fffbf0f314c7022e24e747df by Miss Islington (bot) in branch '3.8': bpo-43283: Add IDLE doc paragraph about print speed (GH-24615) (GH-24632) https://github.com/python/cpython/commit/bdf0fece5bbc2fc9fffbf0f314c7022e24e747df ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 20:47:41 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 24 Feb 2021 01:47:41 +0000 Subject: [issue43283] IDLE: Explain print slowness and speedup method In-Reply-To: <1613889334.88.0.10201417345.issue43283@roundup.psfhosted.org> Message-ID: <1614131261.6.0.869791478922.issue43283@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 Feb 23 21:01:19 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 24 Feb 2021 02:01:19 +0000 Subject: [issue41841] idlelib/NEWS.txt for 3.10.0 and backports In-Reply-To: <1600864292.35.0.268589439404.issue41841@roundup.psfhosted.org> Message-ID: <1614132079.15.0.758807954409.issue41841@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +23417 pull_request: https://github.com/python/cpython/pull/24633 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 21:09:08 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 24 Feb 2021 02:09:08 +0000 Subject: [issue41841] idlelib/NEWS.txt for 3.10.0 and backports In-Reply-To: <1600864292.35.0.268589439404.issue41841@roundup.psfhosted.org> Message-ID: <1614132548.72.0.966840061261.issue41841@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +23418 pull_request: https://github.com/python/cpython/pull/24634 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 21:13:08 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 24 Feb 2021 02:13:08 +0000 Subject: [issue41841] idlelib/NEWS.txt for 3.10.0 and backports In-Reply-To: <1600864292.35.0.268589439404.issue41841@roundup.psfhosted.org> Message-ID: <1614132788.81.0.252524579116.issue41841@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- pull_requests: +23419 pull_request: https://github.com/python/cpython/pull/24635 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 21:15:13 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 24 Feb 2021 02:15:13 +0000 Subject: [issue41841] idlelib/NEWS.txt for 3.10.0 and backports In-Reply-To: <1600864292.35.0.268589439404.issue41841@roundup.psfhosted.org> Message-ID: <1614132913.38.0.0577832479204.issue41841@roundup.psfhosted.org> Terry J. Reedy added the comment: Everything before x.y.0 is in one section. Multiple sections thereafter are a nuisance. Idea: Put everything thereafter in one also. So file is set once header revised after 3.x.0 is released. Thought of 'x.y.z: date' separator, with one line above and below, but not many users update each bugfix or so and we would be back to same problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 21:24:40 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 24 Feb 2021 02:24:40 +0000 Subject: [issue41841] idlelib/NEWS.txt for 3.10.0 and backports In-Reply-To: <1600864292.35.0.268589439404.issue41841@roundup.psfhosted.org> Message-ID: <1614133480.4.0.96932868163.issue41841@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset b9fe16a02717e89a2141311de1e36161af4de9a9 by Terry Jan Reedy in branch 'master': bpo-41841: Revise header (GH-24633) https://github.com/python/cpython/commit/b9fe16a02717e89a2141311de1e36161af4de9a9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 21:25:34 2021 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 24 Feb 2021 02:25:34 +0000 Subject: [issue42151] Pure Python xml.etree.ElementTree is missing default attribute values In-Reply-To: <1603684290.04.0.0149631860455.issue42151@roundup.psfhosted.org> Message-ID: <1614133534.09.0.0615185342376.issue42151@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset 1f433406bd46fbd00b88223ad64daea6bc9eaadc by Felix C. Stegerman in branch 'master': bpo-42151: don't set specified_attributes=1 in pure Python ElementTree (GH-22987) https://github.com/python/cpython/commit/1f433406bd46fbd00b88223ad64daea6bc9eaadc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 21:28:26 2021 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 24 Feb 2021 02:28:26 +0000 Subject: [issue42151] Pure Python xml.etree.ElementTree is missing default attribute values In-Reply-To: <1603684290.04.0.0149631860455.issue42151@roundup.psfhosted.org> Message-ID: <1614133706.73.0.986032907089.issue42151@roundup.psfhosted.org> Dong-hee Na added the comment: @obfusk Thank you Felix for reporting and contributing! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 21:32:27 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 24 Feb 2021 02:32:27 +0000 Subject: [issue41841] idlelib/NEWS.txt for 3.10.0 and backports In-Reply-To: <1600864292.35.0.268589439404.issue41841@roundup.psfhosted.org> Message-ID: <1614133947.16.0.793675507998.issue41841@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset d81a20454eae1868059e45d54e0270e3b4d2e409 by Terry Jan Reedy in branch '3.9': [3.9] bpo-41841: revise header (GH-24634) https://github.com/python/cpython/commit/d81a20454eae1868059e45d54e0270e3b4d2e409 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 21:34:31 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 24 Feb 2021 02:34:31 +0000 Subject: [issue41841] idlelib/NEWS.txt for 3.10.0 and backports In-Reply-To: <1600864292.35.0.268589439404.issue41841@roundup.psfhosted.org> Message-ID: <1614134071.56.0.840017879004.issue41841@roundup.psfhosted.org> Terry J. Reedy added the comment: New changeset 653e17b2cb35e6cd48e2bdca0c1b27b38bed7170 by Terry Jan Reedy in branch '3.8': [3.8] bpo-41841: prepare for 3.8.9 (GH-24635) https://github.com/python/cpython/commit/653e17b2cb35e6cd48e2bdca0c1b27b38bed7170 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 22:41:05 2021 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 24 Feb 2021 03:41:05 +0000 Subject: [issue43209] system cannot find the file specified in subprocess.py In-Reply-To: <1613158394.2.0.196076436453.issue43209@roundup.psfhosted.org> Message-ID: <1614138065.98.0.522785894382.issue43209@roundup.psfhosted.org> Change by Josh Rosenberg : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 22:52:21 2021 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 24 Feb 2021 03:52:21 +0000 Subject: [issue43297] bz2.open modes behaving differently than standard open() modes In-Reply-To: <1614013402.3.0.966797647642.issue43297@roundup.psfhosted.org> Message-ID: <1614138741.31.0.534602556951.issue43297@roundup.psfhosted.org> Josh Rosenberg added the comment: All of the compression modules (gzip, lzma) have this behavior, not just bz2; it's consistent in that sense. Changing it now, after literally decades with the old behavior, would needlessly break existing programs. As you say, it's documented clearly, I'm not seeing a gain to be had strong enough to violate the existing documentation. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 23 23:57:21 2021 From: report at bugs.python.org (keven wang) Date: Wed, 24 Feb 2021 04:57:21 +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: <1614142641.59.0.427873743544.issue38119@roundup.psfhosted.org> keven wang added the comment: Agree w/ PR here to remove resource tracker unlinking as a quick fix: https://github.com/python/cpython/pull/15989 This will at least make the unlink behavior more controllable, which is not the case currently (on mac and linux). Would love to have this merged. ---------- nosy: +keven425 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 00:43:21 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 24 Feb 2021 05:43:21 +0000 Subject: [issue43297] bz2.open modes behaving differently than standard open() modes In-Reply-To: <1614013402.3.0.966797647642.issue43297@roundup.psfhosted.org> Message-ID: <1614145401.62.0.352211576312.issue43297@roundup.psfhosted.org> Raymond Hettinger added the comment: I concur with Josh and will mark this as closed. It is unfortunate, but the time to get an API right is before it lands, not years after people have come to depend on it. ---------- nosy: +rhettinger resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 00:51:21 2021 From: report at bugs.python.org (Gert Burger) Date: Wed, 24 Feb 2021 05:51:21 +0000 Subject: [issue36094] When using an SMTP SSL connection,, get ValueError. In-Reply-To: <1550943841.97.0.129283187576.issue36094@roundup.psfhosted.org> Message-ID: <1614145881.03.0.639289421442.issue36094@roundup.psfhosted.org> Change by Gert Burger : ---------- nosy: +gertburger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 00:52:12 2021 From: report at bugs.python.org (Philipp Freyer) Date: Wed, 24 Feb 2021 05:52:12 +0000 Subject: [issue43297] bz2.open modes behaving differently than standard open() modes In-Reply-To: <1614013402.3.0.966797647642.issue43297@roundup.psfhosted.org> Message-ID: <1614145932.21.0.293892262607.issue43297@roundup.psfhosted.org> Philipp Freyer added the comment: I understand and accept that but I would recommend highlighting this difference in the documentation a bit more since this information can be easily skipped when reading the documentation. I still find it important to hint to this stronger since I've seen countless code snippets and answers on Stackoverflow that either tell the user to use "r" for text mode and "rb" for binary or - if listing file open modes do not mention the "*t" modes at all. If you can point me to where to suggest a change (or pull request) for the documentation, I am happy to propose a change myself :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 01:44:13 2021 From: report at bugs.python.org (Andrey Petukhov) Date: Wed, 24 Feb 2021 06:44:13 +0000 Subject: [issue43310] Method __del__ with callable Message-ID: <1614149053.65.0.947728004035.issue43310@roundup.psfhosted.org> New submission from Andrey Petukhov : Is it possible to use callable to replace __del__ method of class? if so, how to get self variable? class A(object): """A.""" class C(object): """Callable.""" def __call__(self, *args, **kwargs): print("call", args, kwargs) def func_del(*args, **kwargs): """Method.""" print("func", args, kwargs) def del_function(): """ Test del. ('func', (<__main__.A object at 0x7f8ae5a82750>,), {}) ('call', (), {}) """ c = C() A.__del__ = func_del a = A() del a A.__del__ = c a = A() del a ---------- components: Interpreter Core messages: 387609 nosy: andribas404 priority: normal severity: normal status: open title: Method __del__ with callable versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 03:30:05 2021 From: report at bugs.python.org (junyixie) Date: Wed, 24 Feb 2021 08:30:05 +0000 Subject: [issue43311] PyInterpreterState_New use thread tstate before set. Message-ID: <1614155405.65.0.593028600281.issue43311@roundup.psfhosted.org> New submission from junyixie : PyInterpreterState_New use thread tstate before set. PyInterpreterState_New use tstate. but tstate is not set. tstate will set after PyInterpreterState_New. PyInterpreterState *interp = PyInterpreterState_New(); if (interp == NULL) { *tstate_p = NULL; return _PyStatus_OK(); } PyThreadState *tstate = PyThreadState_New(interp); if (tstate == NULL) { PyInterpreterState_Delete(interp); *tstate_p = NULL; return _PyStatus_OK(); } PyThreadState *save_tstate = PyThreadState_Swap(tstate); ---------- components: Subinterpreters messages: 387610 nosy: JunyiXie priority: normal severity: normal status: open title: PyInterpreterState_New use thread tstate before set. type: crash versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 03:33:41 2021 From: report at bugs.python.org (junyixie) Date: Wed, 24 Feb 2021 08:33:41 +0000 Subject: [issue43311] PyInterpreterState_New use thread tstate before set. In-Reply-To: <1614155405.65.0.593028600281.issue43311@roundup.psfhosted.org> Message-ID: <1614155621.55.0.402009409703.issue43311@roundup.psfhosted.org> Change by junyixie : ---------- keywords: +patch pull_requests: +23420 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24636 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 04:26:40 2021 From: report at bugs.python.org (Tzu-ping Chung) Date: Wed, 24 Feb 2021 09:26:40 +0000 Subject: [issue43312] Interface to select preferred "user" or "home" sysconfig scheme for an environment Message-ID: <1614158800.84.0.101101658017.issue43312@roundup.psfhosted.org> New submission from Tzu-ping Chung : While trying to migrate pip?s internal usages of distutils to sysconfig,[1] I noticed there isn?t a way for pip to select a scheme for sysconfig.get_paths() for `pip install --target` and `pip install --user`. I tried to implement some logic to "guess" a scheme ("posix_home" for `--home`, "nt_user" for `--user` when os.name is "nt", etc.), but eventually hit a wall trying to support alternative implementations. PyPy, for example, adds additional schemes "pypy" and "pypy_nt", and it?s not clear whether pip should use then for `--home` or not. @mattip helped clear this up for PyPy (which also prompts bpo-43307), but we are worried that other implementations may introduce even more special rules that causes problems, and it?s also not a good idea for pip to implement special logic for every implementation. I would propose two changes to sysconfig: 1. Make sysconfig._get_default_scheme() a public function. This function will be documented for implementations to return a default scheme to use when none is given to sysconfig.get_paths(). 2. Add a new function sysconfig.get_preferred_schemes() for implementations to return preferred schemes for prefix, home, and user installations. This function should return a dict[str, str] with three keys "prefix", "home", and "user", and their values the scheme names to use. I would be happy to work on a PR and iterate on the design if this sounds like a reasonable idea. For CPython, the implementation would be something like (to match distutils?s behaviour): def get_preferred_schemes(): if os.name == "nt": return { "prefix": "nt", "home": "posix_home", "user": "nt_user", } return { "prefix": "posix_prefix", "home": "posix_home", "user": "posix_user", } [1]: https://github.com/pypa/pip/pull/9626 ---------- components: Library (Lib) messages: 387611 nosy: uranusjr priority: normal severity: normal status: open title: Interface to select preferred "user" or "home" sysconfig scheme for an environment versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 04:28:34 2021 From: report at bugs.python.org (Tzu-ping Chung) Date: Wed, 24 Feb 2021 09:28:34 +0000 Subject: [issue43312] Interface to select preferred "user" or "home" sysconfig scheme for an environment In-Reply-To: <1614158800.84.0.101101658017.issue43312@roundup.psfhosted.org> Message-ID: <1614158914.64.0.515960973334.issue43312@roundup.psfhosted.org> Tzu-ping Chung added the comment: Adding Christian to the nosy list since IIRC you said something related to this a while ago. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 04:40:55 2021 From: report at bugs.python.org (mattip) Date: Wed, 24 Feb 2021 09:40:55 +0000 Subject: [issue43312] Interface to select preferred "user" or "home" sysconfig scheme for an environment In-Reply-To: <1614158800.84.0.101101658017.issue43312@roundup.psfhosted.org> Message-ID: <1614159655.15.0.973714647005.issue43312@roundup.psfhosted.org> mattip added the comment: I wonder if the distro maintainers might be able to use this to reduce the patching they do for their schema? ---------- nosy: +mattip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 04:43:34 2021 From: report at bugs.python.org (junyixie) Date: Wed, 24 Feb 2021 09:43:34 +0000 Subject: [issue43313] feature: support pymalloc for subinterpreters. each subinterpreter has pymalloc_state In-Reply-To: <1614159809.71.0.199865657429.issue43313@roundup.psfhosted.org> Message-ID: <1614159814.34.0.329620017875.issue43313@roundup.psfhosted.org> Change by junyixie : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 04:43:29 2021 From: report at bugs.python.org (junyixie) Date: Wed, 24 Feb 2021 09:43:29 +0000 Subject: [issue43313] feature: support pymalloc for subinterpreters. each subinterpreter has pymalloc_state Message-ID: <1614159809.71.0.199865657429.issue43313@roundup.psfhosted.org> New submission from junyixie : https://github.com/ericsnowcurrently/multi-core-python/issues/73 https://github.com/JunyiXie/cpython/commit/820954879fd546fcb29b654d10c424bd47da70ce changes: move pymalloc state in obmalloc.h _is add pymalloc_state pymalloc_allocxx api use subinterpreter pymalloc_state ---------- components: Subinterpreters messages: 387614 nosy: JunyiXie priority: normal severity: normal status: open title: feature: support pymalloc for subinterpreters. each subinterpreter has pymalloc_state _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 05:46:45 2021 From: report at bugs.python.org (Christian Heimes) Date: Wed, 24 Feb 2021 10:46:45 +0000 Subject: [issue43312] Interface to select preferred "user" or "home" sysconfig scheme for an environment In-Reply-To: <1614158800.84.0.101101658017.issue43312@roundup.psfhosted.org> Message-ID: <1614163605.09.0.762665252021.issue43312@roundup.psfhosted.org> Christian Heimes added the comment: Do you need all three items or would "get_preferred_scheme(name: str) -> str" be sufficient? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 05:48:54 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 24 Feb 2021 10:48:54 +0000 Subject: [issue43314] [sqlite3] remove pre SQLite 3.7.7 support code Message-ID: <1614163734.14.0.841142847915.issue43314@roundup.psfhosted.org> New submission from Erlend Egeberg Aasland : I missed the SQLITE_OPEN_URI #ifdef in GH-24106. The "open URI" interface was added in 3.7.7. The dead code can safely be removed. $ grep -r SQLITE_OPEN_URI sqlite-3.7.6/ $ grep -r SQLITE_OPEN_URI sqlite-3.7.7/ [...] sqlite-3.7.7/sqlite3.h:#define SQLITE_OPEN_URI 0x00000040 /* Ok for sqlite3_open_v2() */ ---------- components: Library (Lib) messages: 387616 nosy: berker.peksag, erlendaasland, serhiy.storchaka priority: normal severity: normal status: open title: [sqlite3] remove pre SQLite 3.7.7 support code type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 05:53:55 2021 From: report at bugs.python.org (Tzu-ping Chung) Date: Wed, 24 Feb 2021 10:53:55 +0000 Subject: [issue43312] Interface to select preferred "user" or "home" sysconfig scheme for an environment In-Reply-To: <1614158800.84.0.101101658017.issue43312@roundup.psfhosted.org> Message-ID: <1614164035.92.0.68259078656.issue43312@roundup.psfhosted.org> Tzu-ping Chung added the comment: That would work as well (raising KeyError or ValueError if `name` is not valid?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 05:54:30 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 24 Feb 2021 10:54:30 +0000 Subject: [issue43314] [sqlite3] remove pre SQLite 3.7.7 support code In-Reply-To: <1614163734.14.0.841142847915.issue43314@roundup.psfhosted.org> Message-ID: <1614164070.08.0.854622721513.issue43314@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +23422 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24637 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 05:59:48 2021 From: report at bugs.python.org (Szymon) Date: Wed, 24 Feb 2021 10:59:48 +0000 Subject: [issue43315] Decimal.__str__ has no way to force exact decimal representation Message-ID: <1614164388.53.0.057673280167.issue43315@roundup.psfhosted.org> New submission from Szymon : str(Decimal("0.00000001")) always returns "1E-8" and there is no way to directly get the "0.00000001" string back without writting custom method for converting DecimalTuple to string. This is caused by arbitrary choice of `and leftdigits > -6` condition in https://github.com/python/cpython/blob/master/Lib/_pydecimal.py#L1052 . The hardcoded value of -6 should be parametrizable. This can be done by adding it as argument to the __str__ method or maybe by adding it to the decimal context. ---------- messages: 387618 nosy: sim1234 priority: normal severity: normal status: open title: Decimal.__str__ has no way to force exact decimal representation type: enhancement versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 06:08:07 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 24 Feb 2021 11:08:07 +0000 Subject: [issue43290] [sqlite3] remove legacy code from pysqlite_step In-Reply-To: <1613949369.74.0.130974571749.issue43290@roundup.psfhosted.org> Message-ID: <1614164887.4.0.247405667939.issue43290@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: >From the SQLite 3.5.3 changelog: - sqlite3_step() returns SQLITE_MISUSE instead of crashing when called with a NULL parameter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 06:17:42 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 24 Feb 2021 11:17:42 +0000 Subject: [issue43290] [sqlite3] remove legacy code from pysqlite_step In-Reply-To: <1613949369.74.0.130974571749.issue43290@roundup.psfhosted.org> Message-ID: <1614165462.94.0.191898211786.issue43290@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +23423 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24638 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 06:22:52 2021 From: report at bugs.python.org (Eryk Sun) Date: Wed, 24 Feb 2021 11:22:52 +0000 Subject: [issue23634] os.fdopen reopening a read-only fd on windows In-Reply-To: <1426027309.83.0.475753794617.issue23634@psf.upfronthosting.co.za> Message-ID: <1614165772.37.0.46294743658.issue23634@roundup.psfhosted.org> Change by Eryk Sun : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 06:30:08 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 24 Feb 2021 11:30:08 +0000 Subject: [issue43251] [sqlite3] sqlite3_column_name() failures should raise MemoryError In-Reply-To: <1613647354.29.0.206061609144.issue43251@roundup.psfhosted.org> Message-ID: <1614166208.41.0.809014475388.issue43251@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: I believe we can proceed with this as planned. Serhiy, do you have additional comments or change requests? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 06:49:07 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 24 Feb 2021 11:49:07 +0000 Subject: [issue43315] Decimal.__str__ has no way to force exact decimal representation In-Reply-To: <1614164388.53.0.057673280167.issue43315@roundup.psfhosted.org> Message-ID: <1614167347.28.0.019979826038.issue43315@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +facundobatista, mark.dickinson, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 07:03:47 2021 From: report at bugs.python.org (Alexey Izbyshev) Date: Wed, 24 Feb 2021 12:03:47 +0000 Subject: [issue43308] subprocess.Popen leaks file descriptors opened for DEVNULL or PIPE stdin/stdout/stderr arguments In-Reply-To: <1614104782.38.0.966400001347.issue43308@roundup.psfhosted.org> Message-ID: <1614168227.38.0.347265870549.issue43308@roundup.psfhosted.org> Change by Alexey Izbyshev : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 07:03:57 2021 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 24 Feb 2021 12:03:57 +0000 Subject: [issue43315] Decimal.__str__ has no way to force exact decimal representation In-Reply-To: <1614164388.53.0.057673280167.issue43315@roundup.psfhosted.org> Message-ID: <1614168237.39.0.00372502116004.issue43315@roundup.psfhosted.org> Mark Dickinson added the comment: This is by design: the choice of -6 is not arbitrary, but follows the standard that the Decimal class is based on. Quoting from http://speleotrove.com/decimal/daconvs.html#reftostr: > If the exponent is less than or equal to zero and the adjusted exponent is greater than or equal to -6, [...] "str" isn't parameterizable (at least, not without a major change to the way that Python works), so if you're using it you have to accept the compromises it makes. If you want finer control over the string representation of Decimal objects, use Python's formatting capabilities: >>> from decimal import Decimal >>> x = Decimal("1e-8") >>> format(x, 'f') '0.00000001' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 09:34:01 2021 From: report at bugs.python.org (Ruben Vorderman) Date: Wed, 24 Feb 2021 14:34:01 +0000 Subject: [issue43316] python -m gzip handles error incorrectly Message-ID: <1614177240.99.0.73469579254.issue43316@roundup.psfhosted.org> New submission from Ruben Vorderman : `Python -m gzip -d myfile` will throw an error because myfile does not end in '.gz'. That is fair (even though a bit redundant, GzipFile contains a header check, so why bother checking the extension?). The problem is how this error is thrown. 1. Error is printed to stdout instead of stderr 2. Tool exits with exit 0. This is not the behaviour that is expected when using python -m gzip in a script. The error is even codified in a test: https://github.com/python/cpython/blob/1f433406bd46fbd00b88223ad64daea6bc9eaadc/Lib/test/test_gzip.py#L776 def test_decompress_infile_outfile_error(self): rc, out, err = assert_python_ok('-m', 'gzip', '-d', 'thisisatest.out') self.assertIn(b"filename doesn't end in .gz:", out) self.assertEqual(rc, 0) self.assertEqual(err, b'') This should be assert_python_failure, out and err should be swapped, and exit code should be something different than 0. >From the zen of python: Errors should never pass silently. I am willing to fix this in a PR, but first I would like some feedback on how to solve this exactly. I propose raising a ValueError("can not determine output filename: 'myfile' does not end in '.gz'"). ---------- components: Library (Lib) messages: 387622 nosy: rhpvorderman priority: normal severity: normal status: open title: python -m gzip handles error incorrectly versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 10:02:47 2021 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 24 Feb 2021 15:02:47 +0000 Subject: [issue43290] [sqlite3] remove legacy code from pysqlite_step In-Reply-To: <1613949369.74.0.130974571749.issue43290@roundup.psfhosted.org> Message-ID: <1614178967.54.0.894246107104.issue43290@roundup.psfhosted.org> Dong-hee Na added the comment: Hmm by the way the current implementation returns SQLITE_OK if the statement is NULL, but it looks like return SQLITE_MISUSE if we apply this patch. Does it not cause any behavior regression? if so we should add news also. ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 10:06:00 2021 From: report at bugs.python.org (Ruben Vorderman) Date: Wed, 24 Feb 2021 15:06:00 +0000 Subject: [issue43317] python -m gzip could use a larger buffer Message-ID: <1614179160.12.0.374051475595.issue43317@roundup.psfhosted.org> New submission from Ruben Vorderman : python -m gzip reads in chunks of 1024 bytes: https://github.com/python/cpython/blob/1f433406bd46fbd00b88223ad64daea6bc9eaadc/Lib/gzip.py#L599 This hurts performance somewhat. Using io.DEFAULT_BUFFER_SIZE will improve it. Also 'io.DEFAULT_BUFFER_SIZE' is better than: 'ARBITRARY_NUMBER_WITH_NO_COMMENT_EXPLAINING_WHY'. With 1024 blocks Decompression: $ hyperfine -r 10 -w 3 'cat ~/test/500000reads.fastq.gz | ./prefix/bin/python3 -m gzip -d > /dev/null' Benchmark #1: cat ~/test/500000reads.fastq.gz | ./prefix/bin/python3 -m gzip -d > /dev/null Time (mean ? ?): 926.9 ms ? 7.7 ms [User: 901.2 ms, System: 59.1 ms] Range (min ? max): 913.3 ms ? 939.4 ms 10 runs Compression: $ hyperfine -r 10 -w 3 'cat ~/test/500000reads.fastq | ./prefix/bin/python3 -m gzip --fast > /dev/null' Benchmark #1: cat ~/test/500000reads.fastq | ./prefix/bin/python3 -m gzip --fast > /dev/null Time (mean ? ?): 2.514 s ? 0.030 s [User: 2.469 s, System: 0.125 s] Range (min ? max): 2.472 s ? 2.563 s 10 runs with io.DEFAULT_BUFFER_SIZE Decompression: $ hyperfine -r 10 -w 3 'cat ~/test/500000reads.fastq.gz | ./prefix/bin/python3 -m gzip -d > /dev/null' Benchmark #1: cat ~/test/500000reads.fastq.gz | ./prefix/bin/python3 -m gzip -d > /dev/null Time (mean ? ?): 839.9 ms ? 7.3 ms [User: 816.0 ms, System: 57.3 ms] Range (min ? max): 830.1 ms ? 851.3 ms 10 runs Compression: $ hyperfine -r 10 -w 3 'cat ~/test/500000reads.fastq | ./prefix/bin/python3 -m gzip --fast > /dev/null' Benchmark #1: cat ~/test/500000reads.fastq | ./prefix/bin/python3 -m gzip --fast > /dev/null Time (mean ? ?): 2.275 s ? 0.024 s [User: 2.247 s, System: 0.096 s] Range (min ? max): 2.254 s ? 2.322 s 10 runs Speedups: - Decompression 840 / 927 = 0.906 ~= 9% reduction in runtime - Compression 2.275 / 2.514 = 0.905 ~= 9% reduction in runtime. It is not stellar, but it is a quite nice improvement for such a tiny change. ---------- components: Library (Lib) messages: 387624 nosy: rhpvorderman priority: normal severity: normal status: open title: python -m gzip could use a larger buffer versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 10:10:10 2021 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 24 Feb 2021 15:10:10 +0000 Subject: [issue43315] Decimal.__str__ has no way to force exact decimal representation In-Reply-To: <1614164388.53.0.057673280167.issue43315@roundup.psfhosted.org> Message-ID: <1614179410.89.0.281646838816.issue43315@roundup.psfhosted.org> Steven D'Aprano added the comment: Python 3.5 to 3.9 are all in feature freeze and can accept no new features; new features can only be added to 3.10. But having said that, I agree with Mark that the correct solution here is to use format, not str. Szymon, unless you have a very argument against format, I think this should be closed. ---------- nosy: +steven.daprano versions: -Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 10:31:16 2021 From: report at bugs.python.org (Dong-hee Na) Date: Wed, 24 Feb 2021 15:31:16 +0000 Subject: [issue43305] A typo in /Modules/_io/bufferedio.c In-Reply-To: <1614089158.05.0.547226223268.issue43305@roundup.psfhosted.org> Message-ID: <1614180676.77.0.94943062286.issue43305@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +serhiy.storchaka, vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 10:58:21 2021 From: report at bugs.python.org (Szymon) Date: Wed, 24 Feb 2021 15:58:21 +0000 Subject: [issue43315] Decimal.__str__ has no way to force exact decimal representation In-Reply-To: <1614164388.53.0.057673280167.issue43315@roundup.psfhosted.org> Message-ID: <1614182301.2.0.0640488351367.issue43315@roundup.psfhosted.org> Szymon added the comment: Thanks for the replies. The use of format works great. Maybe it's worth mentioning in the documentation because using "%f" % Decimal("0.00000001") leds to loosing precision (cast to float64 I guess) while using f"{"Decimal('0.00000001'):f}" does the thing correctly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 11:02:23 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 24 Feb 2021 16:02:23 +0000 Subject: [issue43290] [sqlite3] remove legacy code from pysqlite_step In-Reply-To: <1613949369.74.0.130974571749.issue43290@roundup.psfhosted.org> Message-ID: <1614182543.35.0.787201341613.issue43290@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: I?ll check all uses and see if we?ve got everything covered by the test suite. This is one of the core functions of the sqlite3 module (all queries call step at least once, but often multiple times), so I?d expect coverage is pretty good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 11:16:09 2021 From: report at bugs.python.org (hai shi) Date: Wed, 24 Feb 2021 16:16:09 +0000 Subject: [issue43235] Tools/scripts/stable_abi.py should also check PC/python3dll.c (Windows stable ABI) In-Reply-To: <1613434410.7.0.341389987333.issue43235@roundup.psfhosted.org> Message-ID: <1614183369.14.0.726718839833.issue43235@roundup.psfhosted.org> Change by hai shi : ---------- keywords: +patch nosy: +shihai1991 nosy_count: 4.0 -> 5.0 pull_requests: +23424 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24639 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 11:16:21 2021 From: report at bugs.python.org (Erik Soma) Date: Wed, 24 Feb 2021 16:16:21 +0000 Subject: [issue43310] Method __del__ with callable In-Reply-To: <1614149053.65.0.947728004035.issue43310@roundup.psfhosted.org> Message-ID: <1614183381.48.0.0601937390902.issue43310@roundup.psfhosted.org> Erik Soma added the comment: You can wrap your callable in a regular function: ``` def hack_c(): c = C() def _(*args, **kwargs): return c(*args, **kwargs) return _ A.__del__ = hack_c() ``` Or (untested) make your callable an extension type with Py_TPFLAGS_METHOD_DESCRIPTOR. Or instead of monkey-patching __del__ make __del__ call it: ``` class A: my_del = lambda *args, **kwargs: None def __del__(self): self.my_del(self) A.my_del = C() ``` This doesn't just apply to __del__, other dunders exhibit this behavior as well. It is unintuitive, but I'm pretty sure it's not a bug. ---------- nosy: +esoma _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 11:20:06 2021 From: report at bugs.python.org (hai shi) Date: Wed, 24 Feb 2021 16:20:06 +0000 Subject: [issue43235] Tools/scripts/stable_abi.py should also check PC/python3dll.c (Windows stable ABI) In-Reply-To: <1613434410.7.0.341389987333.issue43235@roundup.psfhosted.org> Message-ID: <1614183606.76.0.580228263287.issue43235@roundup.psfhosted.org> hai shi added the comment: > It would be great to have a tool to check that all symbols exported on Unix are also exported on Windows. I write a demo in PR 24639(compare the stable_abi.dat to python3dll.c). And the output result: ``` Some symbols from the limited API on windows are missing: PyMarshal_WriteObjectToFile, PyThread_allocate_lock, PyObject_GC_IsFinalized, PyThread_ReInitTLS, PyThread_acquire_lock, PyThread_GetInfo, PyDictRevIterValue_Type, PyThread_get_thread_native_id, PyThread_start_new_thread, PyThread_set_stacksize, PyDictRevIterKey_Type, PyOS_AfterFork_Child, PyThread_create_key, PyThread_get_thread_ident, PyOS_BeforeFork, Py_BytesMain, PyThread_get_key_value, PyCodec_Unregister, PyInterpreterState_Get, PyMember_GetOne, PyThread_init_thread, PyInterpreterState_GetDict, PyThread_set_key_value, PyThread_delete_key, PyMarshal_WriteObjectToString, PyOS_AfterFork_Parent, PyThread_delete_key_value, PyObject_GC_IsTracked, PyMarshal_ReadObjectFromString, PyMarshal_WriteLongToFile, PyThread_exit_thread, PyThread_acquire_lock_timed, PyThread_get_stacksize, PyMember_SetOne, PyDictRevIterItem_Type, PyThread_free_lock, PyThread_release_lock This error normally means that there are some missing symbols on windows. Check if this was a mistake and if not, update the file containing the limited API symbols. This file is located at: PC/python3dll.c You can read more about the limited API and its contracts at: https://docs.python.org/3/c-api/stable.html And in PEP 384: https://www.python.org/dev/peps/pep-0384/ ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 11:41:00 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Wed, 24 Feb 2021 16:41:00 +0000 Subject: [issue43317] python -m gzip could use a larger buffer In-Reply-To: <1614179160.12.0.374051475595.issue43317@roundup.psfhosted.org> Message-ID: <1614184860.47.0.603313393032.issue43317@roundup.psfhosted.org> Change by Karthikeyan Singaravelan : ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 12:02:37 2021 From: report at bugs.python.org (coyot linden) Date: Wed, 24 Feb 2021 17:02:37 +0000 Subject: [issue35077] Make TypeError message less ambiguous In-Reply-To: <1540569163.5.0.788709270274.issue35077@psf.upfronthosting.co.za> Message-ID: <1614186157.99.0.441943957384.issue35077@roundup.psfhosted.org> coyot linden added the comment: 3.8 has come and gone, resubmitting this for 3.10 ---------- versions: +Python 3.10 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 12:11:36 2021 From: report at bugs.python.org (Eryk Sun) Date: Wed, 24 Feb 2021 17:11:36 +0000 Subject: [issue22080] Add windows_helper module helper In-Reply-To: <1406378373.46.0.337360125553.issue22080@psf.upfronthosting.co.za> Message-ID: <1614186696.77.0.26444851223.issue22080@roundup.psfhosted.org> Eryk Sun added the comment: I rewrote windows_helper.py with cleaner ctypes code, better error handling, the correct implementation of restoring the previous privilege state, and without leaking the handle for the process token. It's kind of limited as a "Windows helper" module. It's just handling privileges, at least for now. This helper was intended to help with testing bpo-21518 (add winreg.UnLoadKey), another contribution from Claudiu. ---------- versions: +Python 3.10, Python 3.9 -Python 3.5, Python 3.6 Added file: https://bugs.python.org/file49832/windows_helper.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 12:25:37 2021 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 24 Feb 2021 17:25:37 +0000 Subject: [issue43310] Method __del__ with callable In-Reply-To: <1614149053.65.0.947728004035.issue43310@roundup.psfhosted.org> Message-ID: <1614187537.38.0.46890406504.issue43310@roundup.psfhosted.org> Mark Dickinson added the comment: The key difference between the func_del function and the instance C() is that func_del is a (non-data) descriptor in addition to being callable, while the instance C() is not. That makes func_del usable as a method. If you define C as follows, you'll see the behaviour you expect: class C: def __call__(self, *args, **kwargs): print("call", args, kwargs) def __get__(self, obj, objtype=None): return MethodType(self, obj) Useful reference for descriptors: https://docs.python.org/3/howto/descriptor.html I'll close here, since this is neither a bug nor a feature request. ---------- nosy: +mark.dickinson resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 12:27:08 2021 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 24 Feb 2021 17:27:08 +0000 Subject: [issue43310] Method __del__ with callable In-Reply-To: <1614149053.65.0.947728004035.issue43310@roundup.psfhosted.org> Message-ID: <1614187628.62.0.191721466682.issue43310@roundup.psfhosted.org> Mark Dickinson added the comment: Postscript: the "MethodType" that appears in the previous comment can be imported from the types module: "from types import MethodType". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 12:40:07 2021 From: report at bugs.python.org (John Hennig) Date: Wed, 24 Feb 2021 17:40:07 +0000 Subject: [issue39090] Document various options for getting the absolute path from pathlib.Path objects In-Reply-To: <1576693250.66.0.453775762211.issue39090@roundup.psfhosted.org> Message-ID: <1614188407.48.0.291286878478.issue39090@roundup.psfhosted.org> John Hennig added the comment: @Floris: > Not mentioning Path.resolve()'s behavior w.r.t. non-existing files since that's documented in resolve() itself. I don't see it mentioned in the documentation of `resolve()`, or anywhere else in the docs, that on Windows (but not on other platforms) `resolve()` does *not* resolve a relative path to an absolute path if the file does not exist. As opposed to `absolute()`, which works as expected on any platform. Linux: ``` Python 3.6.9 (default, Oct 8 2020, 12:12:24) [GCC 8.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from pathlib import Path >>> file = Path('new.txt') >>> file.exists() False >>> file.resolve() PosixPath('/home/user/new.txt') ``` Windows: ``` Python 3.9.2 (tags/v3.9.2:1a79785, Feb 19 2021, 13:44:55) [MSC v.1928 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from pathlib import Path >>> file = Path('new.txt') >>> file.exists() False >>> file.resolve() WindowsPath('new.txt') >>> file.absolute() WindowsPath('d:/home/new.txt') >>> file.touch() >>> file.resolve() WindowsPath('D:/home/new.txt') >>> file.unlink() >>> file.resolve() WindowsPath('new.txt') >>> ``` ---------- nosy: +John-Hennig _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 13:35:02 2021 From: report at bugs.python.org (Eryk Sun) Date: Wed, 24 Feb 2021 18:35:02 +0000 Subject: [issue24977] shutil copy to non-existant directory In-Reply-To: <1441106817.15.0.872685605647.issue24977@psf.upfronthosting.co.za> Message-ID: <1614191702.13.0.197690589505.issue24977@roundup.psfhosted.org> Change by Eryk Sun : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> shutil.copy raises IsADirectoryError when the directory does not actually exist _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 13:37:41 2021 From: report at bugs.python.org (Eryk Sun) Date: Wed, 24 Feb 2021 18:37:41 +0000 Subject: [issue24493] subprocess with env=os.environ doesn't preserve environment variables when calling a 32bit process on Windows 8.1 In-Reply-To: <1435091827.68.0.4316449172.issue24493@psf.upfronthosting.co.za> Message-ID: <1614191861.51.0.807956092534.issue24493@roundup.psfhosted.org> Change by Eryk Sun : ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 13:40:11 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Feb 2021 18:40:11 +0000 Subject: [issue43293] Move note about GIL to top of threading module In-Reply-To: <1613976245.39.0.497030592079.issue43293@roundup.psfhosted.org> Message-ID: <1614192011.41.0.911669269649.issue43293@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +23425 pull_request: https://github.com/python/cpython/pull/24640 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 13:40:12 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 24 Feb 2021 18:40:12 +0000 Subject: [issue43293] Move note about GIL to top of threading module In-Reply-To: <1613976245.39.0.497030592079.issue43293@roundup.psfhosted.org> Message-ID: <1614192012.25.0.734449190502.issue43293@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 32181be6081f6c70a1e0bd0540050805c8e88e83 by Guanzhong Chen in branch 'master': bpo-43293: Doc: move note about GIL to top of threading module (GH-24622) https://github.com/python/cpython/commit/32181be6081f6c70a1e0bd0540050805c8e88e83 ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 13:40:53 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Feb 2021 18:40:53 +0000 Subject: [issue43293] Move note about GIL to top of threading module In-Reply-To: <1613976245.39.0.497030592079.issue43293@roundup.psfhosted.org> Message-ID: <1614192053.19.0.591025965957.issue43293@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +23426 pull_request: https://github.com/python/cpython/pull/24641 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 13:49:30 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Feb 2021 18:49:30 +0000 Subject: [issue43293] Move note about GIL to top of threading module In-Reply-To: <1613976245.39.0.497030592079.issue43293@roundup.psfhosted.org> Message-ID: <1614192570.5.0.322220707731.issue43293@roundup.psfhosted.org> miss-islington added the comment: New changeset 2a9e6ab6adc82713e43cdf0aed09557d0d63e3bb by Miss Islington (bot) in branch '3.8': bpo-43293: Doc: move note about GIL to top of threading module (GH-24622) https://github.com/python/cpython/commit/2a9e6ab6adc82713e43cdf0aed09557d0d63e3bb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 14:01:41 2021 From: report at bugs.python.org (miss-islington) Date: Wed, 24 Feb 2021 19:01:41 +0000 Subject: [issue43293] Move note about GIL to top of threading module In-Reply-To: <1613976245.39.0.497030592079.issue43293@roundup.psfhosted.org> Message-ID: <1614193301.41.0.815327248841.issue43293@roundup.psfhosted.org> miss-islington added the comment: New changeset f82578ace103ec977cec3424b20e0b5f19cf720e by Miss Islington (bot) in branch '3.9': bpo-43293: Doc: move note about GIL to top of threading module (GH-24622) https://github.com/python/cpython/commit/f82578ace103ec977cec3424b20e0b5f19cf720e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 15:14:46 2021 From: report at bugs.python.org (Quantum) Date: Wed, 24 Feb 2021 20:14:46 +0000 Subject: [issue43293] Move note about GIL to top of threading module In-Reply-To: <1613976245.39.0.497030592079.issue43293@roundup.psfhosted.org> Message-ID: <1614197686.13.0.584206137606.issue43293@roundup.psfhosted.org> Change by Quantum : ---------- pull_requests: +23427 pull_request: https://github.com/python/cpython/pull/24642 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 15:15:53 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 24 Feb 2021 20:15:53 +0000 Subject: [issue42967] [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1614197753.09.0.16204677019.issue42967@roundup.psfhosted.org> Gregory P. Smith added the comment: FYI - This was somewhat of an unfortuate API change. I'm coming across code that relies on ; also being treated as a separator by parse_qs(). That code is now broken with no easy way around it. And I'm only seeing things lucky enough to have an explicit test that happens to rely in some way on that behavior. How much code doesn't? It's been a mix of some clearly broken code (ex & appearing in the URI being parsed) and code where it is not so immediately obvious if there is a problem or not (up to the code owners to dive in and figure that out...). The workarounds for people implementing "fixes" to previously working as intended rather than "oops that was a html charref" code are annoying. Our new separator= parameter does not allow one to achieve the previous behavior if mixing and matching & And ; was intended to be allowed, as it is a single separator rather than a set of separators. For security fixes, a way for people to explicitly opt-in to now-deemed-undesirable-by-default behavior they got from the API is desirable. We failed to provide that here. Just a heads up with no suggested remediation for now. I'm still unsure how big a problem this will turn out to be or not or if it is identifying actual worthwhile issues in code. It's certainly a headache for a few. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 16:09:34 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 24 Feb 2021 21:09:34 +0000 Subject: [issue43290] [sqlite3] remove legacy code from pysqlite_step In-Reply-To: <1613949369.74.0.130974571749.issue43290@roundup.psfhosted.org> Message-ID: <1614200974.06.0.056941670318.issue43290@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: There are six users of pysqlite_step(): $ grep -nrE "\" Modules/_sqlite Modules/_sqlite/util.c:27:int pysqlite_step(sqlite3_stmt* statement, pysqlite_Connection* connection) Modules/_sqlite/connection.c:393: rc = pysqlite_step(statement, self); Modules/_sqlite/connection.c:442: rc = pysqlite_step(statement, self); Modules/_sqlite/connection.c:493: rc = pysqlite_step(statement, self); Modules/_sqlite/util.h:32:int pysqlite_step(sqlite3_stmt* statement, pysqlite_Connection* connection); Modules/_sqlite/cursor.c:519: rc = pysqlite_step(self->statement->st, self->connection); Modules/_sqlite/cursor.c:715: rc = pysqlite_step(statement, self->connection); Modules/_sqlite/cursor.c:787: rc = pysqlite_step(self->statement->st, self->connection); The three users in Modules/_sqlite/connection.c ? _pysqlite_connection_begin(), pysqlite_connection_commit_impl(), and pysqlite_connection_rollback_impl() ? are all ok, following this pattern: 1) prepare the statement 2) verify that prepare was successful, bail if not 3) call step pysqlite_cursor_executescript() (line 715 in Modules/_sqlite/cursor.c) is also ok: 1) prepare the statement 2) verify that prepare was successful, bail if not 3) call step until there are no more rows I need a little bit more time to verify _pysqlite_query_execute() and pysqlite_cursor_iternext(). Note to self: pysqlite_cursor_executescript() calls sqlite3_finalize() three times. It would have been better to break out of the loop when rc != SQLITE_ROW, immediately call sqlite3_finalize() (error code is preserved if sqlite3_step() failed), and then check rc and PyErr_Occurred(). It will make the code easier to follow, IMO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 16:40:31 2021 From: report at bugs.python.org (Neil Schemenauer) Date: Wed, 24 Feb 2021 21:40:31 +0000 Subject: [issue37448] obmalloc: radix tree for tracking arena address ranges In-Reply-To: <1561849702.35.0.724599328196.issue37448@roundup.psfhosted.org> Message-ID: <1614202831.04.0.0970831386985.issue37448@roundup.psfhosted.org> Change by Neil Schemenauer : Added file: https://bugs.python.org/file49833/perf_compare_noradix.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 16:41:03 2021 From: report at bugs.python.org (Neil Schemenauer) Date: Wed, 24 Feb 2021 21:41:03 +0000 Subject: [issue37448] obmalloc: radix tree for tracking arena address ranges In-Reply-To: <1561849702.35.0.724599328196.issue37448@roundup.psfhosted.org> Message-ID: <1614202863.79.0.0449898793062.issue37448@roundup.psfhosted.org> Change by Neil Schemenauer : Added file: https://bugs.python.org/file49834/perf_compare_radix4x.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 16:50:23 2021 From: report at bugs.python.org (Eryk Sun) Date: Wed, 24 Feb 2021 21:50:23 +0000 Subject: [issue13368] Possible problem in documentation of module subprocess, method send_signal In-Reply-To: <1320722594.89.0.739080107592.issue13368@psf.upfronthosting.co.za> Message-ID: <1614203423.6.0.975365292541.issue13368@roundup.psfhosted.org> Eryk Sun added the comment: Popen.send_signal() documents that sending CTRL_C_EVENT (cancel) to a process group is possible, which is clearly a true statement and easily demonstrated. OTOH, the Windows documentation of GenerateConsoleCtrlEvent() claims it's not possible. If you know what the system really does for this case, then the latter claim reads as inconsistent in spirit with the "remarks" section on the very same page, as well as the documentation of SetConsoleCtrlHandler(). It's also strangely worded to say the event isn't "received" by processes in the group, when it's actually about whether each individual process elects to ignore the cancel event that it receives. The documentation of send_signal() could explain that the cancel event may be ignored in processes, which is initially the case for a new group and is inheritable by child processes. Sending the cancel event to all processes in the console session (process group 0) does nothing to resolve the general problem. It can help with a particular problem where the application has desired behavior for the cancel event and is known to be neutral about ignoring it, i.e. it never calls SetConsoleCtrlHandler(NULL, ...) to either enable or disable ignoring of the cancel event, and is known to not have been created as a new process group or by a parent process that ignores the cancel event. It's worth discussing that CTRL_BREAK_EVENT can never be ignored at the process level. An application has to go out of its way to ignore the break event. It's the preferred event to send a console application when you need to terminate the process. Often it calls the default handler, which calls ExitProcess(), which at least gives shared libraries a chance to detach cleanly (i.e. DLL_PROCESS_DETACH). The C runtime maps the break event to SIGBREAK, and it also maps CTRL_CLOSE_EVENT to SIGBREAK. Thus if all you can set is a C signal handler, as is the case for Python scripts by default, then you need to handle SIGBREAK in order to exit gracefully for the cases of closing the console, manual Ctrl+Break, and a generated break event. This includes using Task Manager or taskkill.exe to non-forcefully kill the process that effectively owns the console session, which is implemented by sending WM_CLOSE to the console window. ---------- versions: +Python 3.10, Python 3.9 -Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 17:39:58 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 24 Feb 2021 22:39:58 +0000 Subject: [issue37146] opcode cache for LOAD_GLOBAL emits false alarm in memory leak hunting In-Reply-To: <1559594083.93.0.475089830437.issue37146@roundup.psfhosted.org> Message-ID: <1614206398.6.0.968134629526.issue37146@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +23428 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/24643 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 17:41:42 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Wed, 24 Feb 2021 22:41:42 +0000 Subject: [issue43293] Move note about GIL to top of threading module In-Reply-To: <1613976245.39.0.497030592079.issue43293@roundup.psfhosted.org> Message-ID: <1614206502.41.0.550081726758.issue43293@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 17:52:56 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 24 Feb 2021 22:52:56 +0000 Subject: [issue43290] [sqlite3] remove legacy code from pysqlite_step In-Reply-To: <1613949369.74.0.130974571749.issue43290@roundup.psfhosted.org> Message-ID: <1614207176.29.0.581075020903.issue43290@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: pysqlite_cursor_iternext() has four users: - sqlite3.Cursor.fetchone() - sqlite3.Cursor.fetchall() - sqlite3.Cursor.fetchmany() - sqlite3.Cursor.__next__() All of these methods pass self to pysqlite_cursor_iternext(). pysqlite_cursor_iternext() starts by checking the state of the cursor (is it initialised, it the database open, etc.). If there is a Statement object, pysqlite_step() is called with the sqlite3_stmt pointer from the Statement object (Cursor->statement->st). The statement pointer of the Cursor object is set in _pysqlite_query_execute() ? the last pysqlite_step() user ? either from the LRU cache (line 470), or by creating a new Statement object (line 479). The latter only leaves a valid Cursor->statement->st pointer (sqlite3_stmt pointer) if the Statement object was successfully created, and the sqlite3_stmt successfully prepared. (I assume only valid Statement objects are added to the cache.) Before the main loop of _pysqlite_query_execute() starts, the statement is reset. In the loop, the next parameter set is fetched, the statement is (re)bound, and step is called. If Cursor.execute() called _pysqlite_query_execute(), the parameter list is initialised to a single-item list, and the loop is only run once. From what I can read, this function is also safe. (But it is very messy; for instance, if there's an active Statement, it is reset twice before the loop starts.) I tried forcing an error by using an uninitialised cursor: >>> cx = sqlite3.connect(":memory:") >>> cu = sqlite3.Cursor.__new__(sqlite3.Cursor) >>> sqlite3.Cursor.fetchone(cu) Traceback (most recent call last): File "", line 1, in sqlite3.ProgrammingError: Base Cursor.__init__ not called. >>> next(cu) Traceback (most recent call last): File "", line 1, in sqlite3.ProgrammingError: Base Cursor.__init__ not called. Ditto for fetchmany() and fetchall(). This is consistent with current behaviour. Calling fetch*() without first executing a statement: >>> cu = cx.cursor() >>> cu.fetchone() >>> cu.fetchmany() [] >>> cu.fetchall() [] >>> next(cu) Traceback (most recent call last): File "", line 1, in StopIteration This is consistent with current behaviour. I might have missed something, but from what I can see, there are no paths that lead to pysqlite_step() being called with a NULL pointer. Berker, Serhiy, please correct me if I'm wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 18:12:36 2021 From: report at bugs.python.org (Eryk Sun) Date: Wed, 24 Feb 2021 23:12:36 +0000 Subject: [issue26111] On Windows, os.scandir will keep a handle on the directory until the iterator is exhausted In-Reply-To: <1452797110.0.0.310492336724.issue26111@psf.upfronthosting.co.za> Message-ID: <1614208356.41.0.373312437798.issue26111@roundup.psfhosted.org> Eryk Sun added the comment: Issue 25994 added support for the context-manager protocol and close() method in 3.6. So it's at least much easier to ensure that the handle gets closed. The documentation of scandir() links to WinAPI FindFirstFile and FindNextFile, which at least mentions the "search handle". It's not made explicit that this encapsulates a handle for a kernel file object, nor are the operations (e.g. move, rename, delete) discussed that are allowed directly on the directory. Similarly, the directory stream that's returned by and used by POSIX opendir() and readdir() may or may not encapsulate a file descriptor. I don't think Python's documentation is the best place to discuss platform-specific implementation details in most cases. Exceptions should be made in some cases, but I don't think this is one of them because I can't even link to a document about the implementation details of FindNextFile. At a lower level I can link to documents about the NtQueryDirectoryFile[Ex] system call, but that's not much help in terms of officially documenting what FindNextFile does. Microsoft prefers to keep the Windows API details opaque, which gives them wiggle room. FYI, in Windows 10, deleting files and directories now tries a POSIX delete (if supported by the filesystem) that immediately unlinks the name as soon as the handle that's used to perform the delete is closed, such as the handle that's opened to implement DeleteFile (os.unlink) and RemoveDirectory (os.rmdir). NTFS supports this feature by moving the file/directory to a reserved "\$Extend\$Deleted" directory: >>> os.mkdir('spam') >>> h = win32file.CreateFile('spam', 0, 0, None, 3, 0x0200_0000, None) >>> print(win32file.GetFinalPathNameByHandle(h, 0)) \\?\C:\Temp\test\test\spam >>> os.rmdir('spam') >>> print(win32file.GetFinalPathNameByHandle(h, 0)) \\?\C:\$Extend\$Deleted\001000000000949A5E2FE5BB Of course, none of the above is documented for RemoveDirectory(). ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 18:23:25 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Wed, 24 Feb 2021 23:23:25 +0000 Subject: [issue43290] [sqlite3] remove legacy code from pysqlite_step In-Reply-To: <1613949369.74.0.130974571749.issue43290@roundup.psfhosted.org> Message-ID: <1614209005.71.0.705817005577.issue43290@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Regarding test coverage: _pysqlite_query_execute() has one coverage gap: lines 478-488 (if (self->statement->in_use)) are never executed. Except from that, the only missing are the hard-to-trigger goto error's (for example PyList_New and PyList_Append failures). I'm not sure if it's possible to trigger this, but I cannot see that it is relevant for our case here. Coverage for the other users of pysqlite_step is as complete as it can be; only the standard corner error cases are missing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 19:15:11 2021 From: report at bugs.python.org (Russell Owen) Date: Thu, 25 Feb 2021 00:15:11 +0000 Subject: [issue39758] StreamWriter.wait_closed() can hang indefinitely. In-Reply-To: <1582713366.75.0.743984348325.issue39758@roundup.psfhosted.org> Message-ID: <1614212111.24.0.474155438644.issue39758@roundup.psfhosted.org> Russell Owen added the comment: I am also seeing this in Python 3.8.6. I am not using SSL, but am simply calling `await writer.wait_closed()` on an `asyncio.StreamWriter`. Sometimes it works quickly and sometimes it hangs indefinitely. ---------- nosy: +r3owen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 19:16:14 2021 From: report at bugs.python.org (Russell Owen) Date: Thu, 25 Feb 2021 00:16:14 +0000 Subject: [issue39758] StreamWriter.wait_closed() can hang indefinitely. In-Reply-To: <1582713366.75.0.743984348325.issue39758@roundup.psfhosted.org> Message-ID: <1614212174.57.0.138981552598.issue39758@roundup.psfhosted.org> Russell Owen added the comment: Regarding my previous comment: I have never seen this in Python 3.7 (though I see that this particular bug is listed as being present there) so it may be a different underlying issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 24 19:21:53 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 25 Feb 2021 00:21:53 +0000 Subject: [issue43312] Interface to select preferred "user" or "home" sysconfig scheme for an environment In-Reply-To: <1614158800.84.0.101101658017.issue43312@roundup.psfhosted.org> Message-ID: <1614212513.82.0.0802662892877.issue43312@roundup.psfhosted.org> Steve Dower added the comment: This seems like a good change to me. Making sure that the implementation is easily patchable sounds like a good plan, though I don't have any specific suggestions on what would be best. ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 01:46:21 2021 From: report at bugs.python.org (Tzu-ping Chung) Date: Thu, 25 Feb 2021 06:46:21 +0000 Subject: [issue43312] Interface to select preferred "user" or "home" sysconfig scheme for an environment In-Reply-To: <1614158800.84.0.101101658017.issue43312@roundup.psfhosted.org> Message-ID: <1614235581.64.0.208466230516.issue43312@roundup.psfhosted.org> Change by Tzu-ping Chung : ---------- keywords: +patch pull_requests: +23429 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24644 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 01:55:08 2021 From: report at bugs.python.org (huzhaojie) Date: Thu, 25 Feb 2021 06:55:08 +0000 Subject: [issue43318] pdb can't output the prompt message when successfully clear a breakpoint by "filename:lineno" Message-ID: <1614236108.11.0.116062540393.issue43318@roundup.psfhosted.org> Change by huzhaojie : ---------- components: Library (Lib) nosy: hjzin priority: normal severity: normal status: open title: pdb can't output the prompt message when successfully clear a breakpoint by "filename:lineno" type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 02:42:08 2021 From: report at bugs.python.org (Ramin Farajpour Cami) Date: Thu, 25 Feb 2021 07:42:08 +0000 Subject: [issue43303] ASAN : Memory leak in compilation In-Reply-To: <1614059820.89.0.803150096137.issue43303@roundup.psfhosted.org> Message-ID: <1614238928.65.0.24052906726.issue43303@roundup.psfhosted.org> Change by Ramin Farajpour Cami : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 02:53:27 2021 From: report at bugs.python.org (Ruben Vorderman) Date: Thu, 25 Feb 2021 07:53:27 +0000 Subject: [issue43316] python -m gzip handles error incorrectly In-Reply-To: <1614177240.99.0.73469579254.issue43316@roundup.psfhosted.org> Message-ID: <1614239607.03.0.944695761806.issue43316@roundup.psfhosted.org> Change by Ruben Vorderman : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 02:53:46 2021 From: report at bugs.python.org (Ruben Vorderman) Date: Thu, 25 Feb 2021 07:53:46 +0000 Subject: [issue43317] python -m gzip could use a larger buffer In-Reply-To: <1614179160.12.0.374051475595.issue43317@roundup.psfhosted.org> Message-ID: <1614239626.31.0.642639958115.issue43317@roundup.psfhosted.org> Change by Ruben Vorderman : ---------- type: -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 03:01:24 2021 From: report at bugs.python.org (Ruben Vorderman) Date: Thu, 25 Feb 2021 08:01:24 +0000 Subject: [issue43317] python -m gzip could use a larger buffer In-Reply-To: <1614179160.12.0.374051475595.issue43317@roundup.psfhosted.org> Message-ID: <1614240084.2.0.578669326398.issue43317@roundup.psfhosted.org> Change by Ruben Vorderman : ---------- keywords: +patch pull_requests: +23430 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24645 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 03:07:39 2021 From: report at bugs.python.org (Inada Naoki) Date: Thu, 25 Feb 2021 08:07:39 +0000 Subject: [issue43316] python -m gzip handles error incorrectly In-Reply-To: <1614177240.99.0.73469579254.issue43316@roundup.psfhosted.org> Message-ID: <1614240459.01.0.48529613161.issue43316@roundup.psfhosted.org> Inada Naoki added the comment: I prefer `sys.exit("message")`. ---------- nosy: +methane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 03:08:46 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 25 Feb 2021 08:08:46 +0000 Subject: [issue43290] [sqlite3] remove legacy code from pysqlite_step In-Reply-To: <1613949369.74.0.130974571749.issue43290@roundup.psfhosted.org> Message-ID: <1614240525.99.0.263426337411.issue43290@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: > _pysqlite_query_execute() has one coverage gap: lines 478-488 (if (self->statement->in_use)) are never executed. I wonder if it is possible at all to reach this branch. If it is not, then I'm pretty sure Cursor.in_use is redundant, and all code relating to it can be removed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 03:11:10 2021 From: report at bugs.python.org (huzhaojie) Date: Thu, 25 Feb 2021 08:11:10 +0000 Subject: [issue43318] pdb can't output the prompt message when successfully clear breakpoints by "filename:lineno" Message-ID: <1614240670.83.0.613464478845.issue43318@roundup.psfhosted.org> New submission from huzhaojie : In Pdb, when successfully clear breakpoints, the Pdb should output a message:"Deleted XXX", but when breakpoints are cleared by filename:lineno, the message can't be output. I think it's related to the following code. ```python pdb.py: def do_clear(self, arg): ... if ':' in arg: # Make sure it works for "clear C:\foo\bar.py:12" i = arg.rfind(':') filename = arg[:i] arg = arg[i+1:] try: lineno = int(arg) except ValueError: err = "Invalid line number (%s)" % arg else: bplist = self.get_breaks(filename, lineno) err = self.clear_break(filename, lineno) if err: self.error(err) else: for bp in bplist: self.message('Deleted %s' % bp) return ``` self.get_breaks is called to get the breakpoints to be deleted, the result is in bplist. self.clear_break is called to delete the breakpoints in bplist. Each element in bplist is a reference to a Breakpoint object, so when all Breakpoint objects are removed, the bplist will become an empty list when self.clear_break is called, so pdb can't output the prompt message. It can be simply fixed by following code: ```python bplist = self.get_breaks(filename, lineno)[:] ``` ---------- title: pdb can't output the prompt message when successfully clear a breakpoint by "filename:lineno" -> pdb can't output the prompt message when successfully clear breakpoints by "filename:lineno" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 03:11:28 2021 From: report at bugs.python.org (huzhaojie) Date: Thu, 25 Feb 2021 08:11:28 +0000 Subject: [issue43318] pdb can't output the prompt message when successfully clear breakpoints by "filename:lineno" In-Reply-To: <1614240670.83.0.613464478845.issue43318@roundup.psfhosted.org> Message-ID: <1614240688.65.0.758035808897.issue43318@roundup.psfhosted.org> Change by huzhaojie : ---------- keywords: +patch pull_requests: +23431 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24646 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 03:15:21 2021 From: report at bugs.python.org (junyixie) Date: Thu, 25 Feb 2021 08:15:21 +0000 Subject: [issue43311] bpo-43311: PyInterpreterState_New use thread-specific data tstate before key create . In-Reply-To: <1614155405.65.0.593028600281.issue43311@roundup.psfhosted.org> Message-ID: <1614240921.21.0.218660562024.issue43311@roundup.psfhosted.org> Change by junyixie : ---------- title: PyInterpreterState_New use thread tstate before set. -> bpo-43311: PyInterpreterState_New use thread-specific data tstate before key create . _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 03:31:46 2021 From: report at bugs.python.org (cmhzc) Date: Thu, 25 Feb 2021 08:31:46 +0000 Subject: [issue43319] A possible misleading expression in the Virtual Environment Tutorial Message-ID: <1614241906.48.0.234906735386.issue43319@roundup.psfhosted.org> Change by cmhzc : ---------- assignee: docs at python components: Documentation nosy: cmhzc, docs at python priority: normal severity: normal status: open title: A possible misleading expression in the Virtual Environment Tutorial type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 03:34:57 2021 From: report at bugs.python.org (Ruben Vorderman) Date: Thu, 25 Feb 2021 08:34:57 +0000 Subject: [issue43316] python -m gzip handles error incorrectly In-Reply-To: <1614177240.99.0.73469579254.issue43316@roundup.psfhosted.org> Message-ID: <1614242097.8.0.989149880286.issue43316@roundup.psfhosted.org> Ruben Vorderman added the comment: That sounds perfect, I didn't think of that. I will make a PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 03:35:48 2021 From: report at bugs.python.org (cmhzc) Date: Thu, 25 Feb 2021 08:35:48 +0000 Subject: [issue12594] Docs for "Using Python on a Macintosh" needs to be updated In-Reply-To: <1311174057.47.0.56455855185.issue12594@psf.upfronthosting.co.za> Message-ID: <1614242148.58.0.0131032380884.issue12594@roundup.psfhosted.org> cmhzc added the comment: According to the official tutorial on virtual environment, """ This will create the tutorial-env directory if it doesn?t exist, and also create directories inside it containing a copy of the Python interpreter, **the standard library**, and various supporting files. """ But according to PEP 405 and the actual behavior of venv, the standard library won't be copied. I'm not sure if I'm having a misunderstanding of this expression. ---------- nosy: +cmhzc versions: -Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 03:36:12 2021 From: report at bugs.python.org (cmhzc) Date: Thu, 25 Feb 2021 08:36:12 +0000 Subject: [issue43319] A possible misleading expression in the Virtual Environment Tutorial Message-ID: <1614242172.25.0.356452528592.issue43319@roundup.psfhosted.org> New submission from cmhzc : According to the official tutorial on virtual environment, """ This will create the tutorial-env directory if it doesn?t exist, and also create directories inside it containing a copy of the Python interpreter, **the standard library**, and various supporting files. """ But according to PEP 405 and the actual behavior of venv, the standard library won't be copied. I'm not sure if I'm having a misunderstanding of this expression. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 03:40:48 2021 From: report at bugs.python.org (junyixie) Date: Thu, 25 Feb 2021 08:40:48 +0000 Subject: [issue43311] bpo-43311: PyInterpreterState_New use thread-specific data tstate before key create . In-Reply-To: <1614155405.65.0.593028600281.issue43311@roundup.psfhosted.org> Message-ID: <1614242448.01.0.710377018909.issue43311@roundup.psfhosted.org> junyixie added the comment: PyInterpreterState_New call and use PyThreadState *tstate = _PyThreadState_GET(); _PyRuntime.gilstate.autoTSSkey has to be initialized before pthread_getspecific() or pthread_setspecific() can be used. _PyRuntime.gilstate.autoTSSkey create in _PyGILState_Init. PyInterpreterState_New called before _PyGILState_Init. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 03:47:02 2021 From: report at bugs.python.org (cmhzc) Date: Thu, 25 Feb 2021 08:47:02 +0000 Subject: [issue12594] Docs for "Using Python on a Macintosh" needs to be updated In-Reply-To: <1311174057.47.0.56455855185.issue12594@psf.upfronthosting.co.za> Message-ID: <1614242822.97.0.47774055974.issue12594@roundup.psfhosted.org> cmhzc added the comment: sorry for posting a wrong message in this issue tracker, this is my first time using the Python issue tracker ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 03:48:18 2021 From: report at bugs.python.org (Ruben Vorderman) Date: Thu, 25 Feb 2021 08:48:18 +0000 Subject: [issue43316] python -m gzip handles error incorrectly In-Reply-To: <1614177240.99.0.73469579254.issue43316@roundup.psfhosted.org> Message-ID: <1614242898.54.0.382161678992.issue43316@roundup.psfhosted.org> Change by Ruben Vorderman : ---------- keywords: +patch pull_requests: +23432 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24647 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 04:21:55 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 25 Feb 2021 09:21:55 +0000 Subject: [issue25585] Bad path leads to: ImportError: DLL load failed: %1 is not a valid Win32 application. In-Reply-To: <1447004161.31.0.19011460804.issue25585@psf.upfronthosting.co.za> Message-ID: <1614244915.04.0.547927238346.issue25585@roundup.psfhosted.org> Eryk Sun added the comment: In 3.8+, the DLL search path for dependent DLLs when importing extension modules excludes PATH and the current working directory. So it's far less likely for an import to fail with ERROR_BAD_EXE_FORMAT. Currently the error message in Python 3 includes the base name of the extension module, e.g. "DLL load failed while importing _spam". No error codes are special cased to use custom error messages, so it still includes the localized error text from the system, which may contain parameterized inserts (%). The common errors when importing an extension module are missing and mismatched dependent DLLs: ERROR_MOD_NOT_FOUND (126) and ERROR_PROC_NOT_FOUND (127). The system messages for these two errors do not contain inserts. For example, if the UI language is Japanese, a missing DLL dependency raises the following exception: ImportError: DLL load failed while importing _spam: ??????????????????? ---------- components: +Extension Modules type: -> behavior versions: +Python 3.10, Python 3.9 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 05:24:58 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 25 Feb 2021 10:24:58 +0000 Subject: [issue26658] test_os fails when run on Windows ramdisk In-Reply-To: <1459183766.58.0.185896673203.issue26658@psf.upfronthosting.co.za> Message-ID: <1614248698.21.0.255569912483.issue26658@roundup.psfhosted.org> Eryk Sun added the comment: os.stat() was redesigned in issue 37834, which entailed extensive updates across the standard library to improve support for Windows reparse points. As part of this, Win32JunctionTests.tearDown() was changed to use a more reliable lexists() check, which resolves this issue. FYI, the new implementation of os.stat() supports an ImDisk virtual disk (v2.0.9 from 2015-12). In the following example, "junctest" is a mountpoint (junction) in an NTFS filesystem. The filesystem is mounted on an ImDisk device, as seen its VOLUME_NAME_NT (2) path: >>> flags = win32file.FILE_FLAG_OPEN_REPARSE_POINT >>> flags |= win32file.FILE_FLAG_BACKUP_SEMANTICS >>> h = win32file.CreateFile('junctest', 0, 0, None, 3, flags, None) >>> win32file.GetFinalPathNameByHandle(h, 2) '\\Device\\ImDisk0\\junctest' stat() traverses the mountpoint: >>> os.stat('junctest').st_reparse_tag == 0 True lstat() opens the mountpoint: >>> os.lstat('junctest').st_reparse_tag == stat.IO_REPARSE_TAG_MOUNT_POINT True This version of Imdisk doesn't support the mountpoint manager, so trying to get the VOLUME_NAME_DOS (0) name of r"\Device\ImDisk0" (e.g. r"\\?\R:") still fails the same as before: >>> win32file.GetFinalPathNameByHandle(h, 0) Traceback (most recent call last): File "", line 1, in pywintypes.error: (1, 'GetFinalPathNameByHandle', 'Incorrect function.') But os.stat() no longer needs it. ---------- resolution: -> fixed stage: -> resolved status: open -> closed superseder: -> readlink on Windows cannot read app exec links _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 05:39:12 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 25 Feb 2021 10:39:12 +0000 Subject: [issue26866] Inconsistent environment in Windows using "Open With" In-Reply-To: <1461686518.69.0.791676363676.issue26866@psf.upfronthosting.co.za> Message-ID: <1614249552.47.0.353509659036.issue26866@roundup.psfhosted.org> Change by Eryk Sun : ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 06:12:54 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 25 Feb 2021 11:12:54 +0000 Subject: [issue43290] [sqlite3] remove legacy code from pysqlite_step In-Reply-To: <1613949369.74.0.130974571749.issue43290@roundup.psfhosted.org> Message-ID: <1614251574.26.0.503614507282.issue43290@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: > I wonder if it is possible at all to reach this branch. If it is not, then I'm pretty sure Cursor.in_use is redundant Typo: should be Statement.in_use Corner error cases may cause the _pysqlite_query_execute() loop to exit without pysqlite_statement_reset() being called, thus leaving Statement.in_use == 1, but when _pysqlite_query_execute() is called again and if there's an active statement, pysqlite_statement_reset() will reset in_use to zero, before we ever reach the if (self->statement->in_use) { ... } statement. I can open a separate issue for considering removing Statement.in_use. > (I assume only valid Statement objects are added to the cache.) AFAICS, this is true. We can wait for Berker and/or Serhiy to confirm/correct my assumptions and findings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 06:27:16 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 25 Feb 2021 11:27:16 +0000 Subject: [issue26968] glob.glob incorrect results under windows when pathname exists but interpreter does not have access permissions to pathname In-Reply-To: <1462477111.96.0.426689886808.issue26968@psf.upfronthosting.co.za> Message-ID: <1614252436.36.0.0267178399447.issue26968@roundup.psfhosted.org> Eryk Sun added the comment: Issue 28075 extended the os.stat() and os.lstat() implementation to query basic stat informatiom from the parent directory if opening the file fails with ERROR_ACCESS_DENIED. This change first became available in Python 3.5.3. Previously it was only querying the parent directory for the case of ERROR_SHARING_VIOLATION, which is unlikely since the open doesn't request and data access that requires sharing. It does handle one case that I know of. NTFS refuses to share even metadata access for a system paging file such as "C:\pagefile.sys". ---------- resolution: -> fixed stage: -> resolved status: open -> closed superseder: -> os.stat fails when access is denied _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 06:30:52 2021 From: report at bugs.python.org (Inada Naoki) Date: Thu, 25 Feb 2021 11:30:52 +0000 Subject: [issue43316] python -m gzip handles error incorrectly In-Reply-To: <1614177240.99.0.73469579254.issue43316@roundup.psfhosted.org> Message-ID: <1614252652.28.0.545182891525.issue43316@roundup.psfhosted.org> Inada Naoki added the comment: New changeset cc3df6368d4f3f6c9c9b716876c7e7b79c7abf3f by Ruben Vorderman in branch 'master': bpo-43316: gzip: CLI uses non-zero return code on error. (GH-24647) https://github.com/python/cpython/commit/cc3df6368d4f3f6c9c9b716876c7e7b79c7abf3f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 06:31:05 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Feb 2021 11:31:05 +0000 Subject: [issue43316] python -m gzip handles error incorrectly In-Reply-To: <1614177240.99.0.73469579254.issue43316@roundup.psfhosted.org> Message-ID: <1614252665.04.0.589358570586.issue43316@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +23434 pull_request: https://github.com/python/cpython/pull/24649 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 06:30:56 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Feb 2021 11:30:56 +0000 Subject: [issue43316] python -m gzip handles error incorrectly In-Reply-To: <1614177240.99.0.73469579254.issue43316@roundup.psfhosted.org> Message-ID: <1614252656.39.0.574925716082.issue43316@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +23433 pull_request: https://github.com/python/cpython/pull/24648 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 06:39:24 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 25 Feb 2021 11:39:24 +0000 Subject: [issue17213] ctypes loads wrong version of C runtime, leading to error message box from system In-Reply-To: <1360992800.86.0.617349310494.issue17213@psf.upfronthosting.co.za> Message-ID: <1614253164.39.0.848968037372.issue17213@roundup.psfhosted.org> Change by Eryk Sun : ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 06:52:36 2021 From: report at bugs.python.org (miss-islington) Date: Thu, 25 Feb 2021 11:52:36 +0000 Subject: [issue43316] python -m gzip handles error incorrectly In-Reply-To: <1614177240.99.0.73469579254.issue43316@roundup.psfhosted.org> Message-ID: <1614253956.72.0.294997872507.issue43316@roundup.psfhosted.org> miss-islington added the comment: New changeset 69906c505b139cbd892866dbceeb607eff53ab3b by Miss Islington (bot) in branch '3.8': bpo-43316: gzip: CLI uses non-zero return code on error. (GH-24647) https://github.com/python/cpython/commit/69906c505b139cbd892866dbceeb607eff53ab3b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 07:00:28 2021 From: report at bugs.python.org (Irit Katriel) Date: Thu, 25 Feb 2021 12:00:28 +0000 Subject: [issue43318] pdb can't output the prompt message when successfully clear breakpoints by "filename:lineno" In-Reply-To: <1614240670.83.0.613464478845.issue43318@roundup.psfhosted.org> Message-ID: <1614254428.14.0.433185287323.issue43318@roundup.psfhosted.org> Irit Katriel added the comment: Please provide instructions how to reproduce the bug. The patch would need a unit test as well. ---------- nosy: +iritkatriel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 07:07:53 2021 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Feb 2021 12:07:53 +0000 Subject: [issue43290] [sqlite3] remove legacy code from pysqlite_step In-Reply-To: <1613949369.74.0.130974571749.issue43290@roundup.psfhosted.org> Message-ID: <1614254873.55.0.553353842132.issue43290@roundup.psfhosted.org> Serhiy Storchaka added the comment: Look at issue in which the workaround was added. Does it contain some examples? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 07:08:37 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 25 Feb 2021 12:08:37 +0000 Subject: [issue43290] [sqlite3] remove legacy code from pysqlite_step In-Reply-To: <1613949369.74.0.130974571749.issue43290@roundup.psfhosted.org> Message-ID: <1614254917.24.0.173100192929.issue43290@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: > Look at issue in which the workaround was added. Does it contain some examples? I'll check. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 07:27:52 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 25 Feb 2021 12:27:52 +0000 Subject: [issue20140] UnicodeDecodeError in ntpath.py when home dir contains non-ascii signs In-Reply-To: <1389005031.99.0.692658963376.issue20140@psf.upfronthosting.co.za> Message-ID: <1614256072.73.0.0794251278331.issue20140@roundup.psfhosted.org> Change by Eryk Sun : ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 07:28:23 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 25 Feb 2021 12:28:23 +0000 Subject: [issue43290] [sqlite3] remove legacy code from pysqlite_step In-Reply-To: <1613949369.74.0.130974571749.issue43290@roundup.psfhosted.org> Message-ID: <1614256103.29.0.92526616577.issue43290@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Introduced by Christian Heimes 2007-12-14 in commit 380532117c2547bb0dedf6f85efa66d18a9abb88, which is a merge from SVN (?) checkin r59471 by Gerhard H?ring (https://mail.python.org/pipermail/python-checkins/2007-December/063968.html) This corresponds to https://github.com/ghaering/pysqlite/commit/61b3cd9381750bdd96f8f8fc2c1b19f1dc4acef7, with a simple test added two commits later, https://github.com/ghaering/pysqlite/commit/7b0faed4ababbf1053caa2f5b2efc15929f66c4f That test was added to CPython in 2008-03-29 by Gerhard in commit e7ea7451a84636655927da4b9731d2eb37d1cf34, and it's still here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 07:32:39 2021 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Feb 2021 12:32:39 +0000 Subject: [issue43290] [sqlite3] remove legacy code from pysqlite_step In-Reply-To: <1613949369.74.0.130974571749.issue43290@roundup.psfhosted.org> Message-ID: <1614256359.12.0.53151194139.issue43290@roundup.psfhosted.org> Christian Heimes added the comment: Back in the day I was of several core devs that took care of syncing code between Python 2 and 3 branches with a tool called "svnmerge". Commit 380532117c2547bb0dedf6f85efa66d18a9abb88 is a svnmerge commit. The tool synced changesets in batches, which makes it harder to bisect changes. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 07:35:33 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 25 Feb 2021 12:35:33 +0000 Subject: [issue27889] ctypes interfers with signal handling In-Reply-To: <1472510858.82.0.884835264582.issue27889@psf.upfronthosting.co.za> Message-ID: <1614256533.57.0.740342211675.issue27889@roundup.psfhosted.org> Change by Eryk Sun : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 07:37:15 2021 From: report at bugs.python.org (huzhaojie) Date: Thu, 25 Feb 2021 12:37:15 +0000 Subject: [issue43318] pdb can't output the prompt message when successfully clear breakpoints by "filename:lineno" In-Reply-To: <1614240670.83.0.613464478845.issue43318@roundup.psfhosted.org> Message-ID: <1614256635.81.0.123593464592.issue43318@roundup.psfhosted.org> huzhaojie added the comment: Accroding to my test, it appears in python 3.8.0 and the latest 3.10 master branch, and I think other versions also have this bug. The steps to reproduce the bug: 1. start pdb: python -m pdb foo.py 2. set a breakpoint on any line of the file: (Pdb) b 2 Breakpoint 1 at foo.py:2 (Pdb) b Num Type Disp Enb Where 1 breakpoint keep yes at foo.py:2 3. when clear the breakpoint using breakpoint number, it will get a output("Deleted breakpoint 1 at ..."): (Pdb) cl 1 Deleted breakpoint 1 at foo.py:2 4. set another breakpoint: (Pdb) b 3 Breakpoint 2 at foo.py:3 5. if breakpoint is cleared using (filename:lineno), it gets nothing: (Pdb)cl foo.py:2 (Pdb) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 07:46:58 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 25 Feb 2021 12:46:58 +0000 Subject: [issue28356] Windows: os.rename different in python 2.7.12 and python 3.5.2 In-Reply-To: <1475588552.47.0.916118565333.issue28356@psf.upfronthosting.co.za> Message-ID: <1614257218.63.0.44984741237.issue28356@roundup.psfhosted.org> Eryk Sun added the comment: The documentation of os.rename() should mention that on Windows the "operation will fail if src and dst are on different filesystems". For POSIX, instead of "will" it says "may", but the failure is a certainty in Windows since MOVEFILE_COPY_ALLOWED isn't used. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python stage: -> needs patch versions: +Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 07:48:33 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 25 Feb 2021 12:48:33 +0000 Subject: [issue28364] Windows - Popen (subprocess.py) does not call _handle.Close() at all In-Reply-To: <1475679206.56.0.813487481998.issue28364@psf.upfronthosting.co.za> Message-ID: <1614257313.74.0.388191370246.issue28364@roundup.psfhosted.org> Change by Eryk Sun : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 07:58:16 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 25 Feb 2021 12:58:16 +0000 Subject: [issue43290] [sqlite3] remove legacy code from pysqlite_step In-Reply-To: <1613949369.74.0.130974571749.issue43290@roundup.psfhosted.org> Message-ID: <1614257896.15.0.0599936036308.issue43290@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Ah, at last I found the source of the confusion: The SQLite changelog. Quoting from msg387619 and https://sqlite.org/changes.html: > From the SQLite 3.5.3 changelog: > - sqlite3_step() returns SQLITE_MISUSE instead of crashing when called with a NULL parameter. I assumed this was correct without even trying it. This short snippet shows something else: int rc = sqlite3_reset(NULL); printf("reset with NULL: %d %s\n", rc, sqlite3_errstr(rc)); $ ./a.out reset with NULL: 0 not an error Gerhard's comment was right and the workaround was right. I'll adjust the comment. Dong-hee Na: > Hmm by the way the current implementation returns SQLITE_OK if the statement is NULL, but it looks like return SQLITE_MISUSE if we apply this patch. > Does it not cause any behavior regression? if so we should add news also. Behaviour stays the same; no regressions introduced. I learned a lot about the sqlite3 module, and I relearned I should not trust changelogs/documentation without trying stuff myself first. I'll adjust the erroneous comment and re-request a review, Dong-hee. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 08:09:19 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 25 Feb 2021 13:09:19 +0000 Subject: [issue43290] [sqlite3] remove legacy code from pysqlite_step In-Reply-To: <1613949369.74.0.130974571749.issue43290@roundup.psfhosted.org> Message-ID: <1614258559.61.0.0467161011859.issue43290@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: > int rc = sqlite3_reset(NULL); > printf("reset with NULL: %d %s\n", rc, sqlite3_errstr(rc)); Sorry, wrong test: int rc = sqlite3_step(NULL); printf("step with NULL: %d %s\n", rc, sqlite3_errstr(rc)); $ ./a.out step with NULL: 21 bad parameter or other API misuse ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 08:22:09 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 25 Feb 2021 13:22:09 +0000 Subject: [issue43290] [sqlite3] remove legacy code from pysqlite_step In-Reply-To: <1613949369.74.0.130974571749.issue43290@roundup.psfhosted.org> Message-ID: <1614259329.73.0.250196342623.issue43290@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: msg387668 was a little bit hasty. I'll try again: Dong-hee Na: > Hmm by the way the current implementation returns SQLITE_OK if the statement is NULL, but it looks like return SQLITE_MISUSE if we apply this patch. > Does it not cause any behavior regression? if so we should add news also. No, behaviour still stays the same; no regressions introduced. The bug is triggered by executing an empty statement. This will pass an empty statement to pysqlite_step() in line 519 of Modules/_sqlite/cursor.c. Earlier, this returned SQLITE_OK. sqlite3_column_count(NULL) returns 0, so we slide through the rest of the loop without much happening. Now, pysqlite_step() returns SQLITE_MISUSE, which only results in the statement being reset in line 529, and the error cleared in line 530. Then we bail out of the loop. So, the current comment is correct, the SQLite changelog was correct, the workaround and old comment was wrong. I'm done :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 08:23:32 2021 From: report at bugs.python.org (twoone3) Date: Thu, 25 Feb 2021 13:23:32 +0000 Subject: [issue43263] threading module unable to run In-Reply-To: <1613722745.98.0.253058139819.issue43263@roundup.psfhosted.org> Message-ID: <1614259412.48.0.217407942991.issue43263@roundup.psfhosted.org> twoone3 <3197653242 at qq.com> added the comment: Run Project1\x64\Release\Project2.exe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 08:41:32 2021 From: report at bugs.python.org (Fabian Beitler) Date: Thu, 25 Feb 2021 13:41:32 +0000 Subject: [issue43320] test test_webbrowser "can't locate runnable browser" with enable-optimizations Message-ID: <1614260492.83.0.266852228438.issue43320@roundup.psfhosted.org> New submission from Fabian Beitler : I downloaded the sources for python 3.8.8 (not tested with Python3.9.2. so far)and compiled it with enabled-optimisations parameter on a fresh Ubuntu 20.04 machine. Beside the test_ssl error (there is an existing workaround, but still not happy with that one tbh) I could solve, the test "test_webbrowser" fails and I don't know how to handle that one. ERROR: test_synthesize(test_webbrowser.ImportTest) ---------------------------------------------------------------- Traceback (most recent call last): File "Path/Python-3.8.8/Lib/test/test_webbrowser.py", line 299, in test_synthesize webbrowser.get(sys.executable) File "Path/Python-3.8.8/Lib/webbrowser.py", line 65, in get raise Error("could not locate runnable browser") webbrowser.Error: could not locate runnable browser ---------- components: Tests messages: 387672 nosy: swamper123 priority: normal severity: normal status: open title: test test_webbrowser "can't locate runnable browser" with enable-optimizations versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 09:05:07 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 25 Feb 2021 14:05:07 +0000 Subject: [issue28654] sys.stdout.isatty() returns True even if redirected to NUL In-Reply-To: <1478765918.44.0.71383121228.issue28654@psf.upfronthosting.co.za> Message-ID: <1614261907.69.0.355327667206.issue28654@roundup.psfhosted.org> Eryk Sun added the comment: Here's an example of how to change the isatty() method in Modules/_io/fileio.c to check for a console in Windows: _io_FileIO_isatty_impl(fileio *self) { long res; if (self->fd < 0) return err_closed(); Py_BEGIN_ALLOW_THREADS _Py_BEGIN_SUPPRESS_IPH res = isatty(self->fd); #ifdef MS_WINDOWS if (res) { DWORD mode; HANDLE h = (HANDLE)_get_osfhandle(self->fd); // It's a console if GetConsoleMode succeeds or if the last error // isn't ERROR_INVALID_HANDLE. e.g., if 'con' is opened with 'w' // mode, the error is ERROR_ACCESS_DENIED. res = GetConsoleMode(h, &mode) || GetLastError() != ERROR_INVALID_HANDLE; } #endif _Py_END_SUPPRESS_IPH Py_END_ALLOW_THREADS return PyBool_FromLong(res); } ---------- stage: -> needs patch type: -> behavior versions: +Python 3.10, Python 3.9 -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 09:27:15 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 25 Feb 2021 14:27:15 +0000 Subject: [issue43263] threading module unable to run In-Reply-To: <1613722745.98.0.253058139819.issue43263@roundup.psfhosted.org> Message-ID: <1614263235.98.0.920645078199.issue43263@roundup.psfhosted.org> Mark Dickinson added the comment: @twoone3: Shouldn't you be calling PyGILState_Ensure() before calling into Python from the C++ code? In any case, I'm removing myself from the nosy list on this issue, because I don't have access to Windows to try to reproduce. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 09:30:05 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 25 Feb 2021 14:30:05 +0000 Subject: [issue43263] threading module unable to run In-Reply-To: <1613722745.98.0.253058139819.issue43263@roundup.psfhosted.org> Message-ID: <1614263405.7.0.654549966278.issue43263@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: -mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 09:42:47 2021 From: report at bugs.python.org (twoone3) Date: Thu, 25 Feb 2021 14:42:47 +0000 Subject: [issue43263] threading module unable to run In-Reply-To: <1613722745.98.0.253058139819.issue43263@roundup.psfhosted.org> Message-ID: <1614264167.2.0.463478575985.issue43263@roundup.psfhosted.org> twoone3 <3197653242 at qq.com> added the comment: After adding GIL, the problem still exists. If you think this problem is incomprehensible, it may be because I used Google Translation .. ---------- Added file: https://bugs.python.org/file49835/Screenshot_20210225_224118.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 10:11:01 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 25 Feb 2021 15:11:01 +0000 Subject: [issue28824] os.environ should preserve the case of the OS keys ? In-Reply-To: <1480359346.4.0.287394822331.issue28824@psf.upfronthosting.co.za> Message-ID: <1614265861.98.0.181685468733.issue28824@roundup.psfhosted.org> Eryk Sun added the comment: In Windows, maybe the os.environ mapping could use a case-insensitive subclass of str for its keys, such as the following: @total_ordering class _CaseInsensitiveString(str): def __eq__(self, other): if not isinstance(other, str): return NotImplemented return self.upper() == other.upper() def __lt__(self, other): if not isinstance(other, str): return NotImplemented return self.upper() < other.upper() def __hash__(self): return hash(self.upper()) Change encodekey() to use this type. For example: def encodekey(key): return _CaseInsensitiveString(encode(key)) in which encode() is still check_str(). ---------- components: +Library (Lib) type: -> behavior versions: +Python 3.10, Python 3.9 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 10:12:45 2021 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Blondon?=) Date: Thu, 25 Feb 2021 15:12:45 +0000 Subject: [issue42914] pprint numbers with underscore In-Reply-To: <1610493681.29.0.683565759752.issue42914@roundup.psfhosted.org> Message-ID: <1614265965.43.0.0491684200471.issue42914@roundup.psfhosted.org> St?phane Blondon added the comment: I add the same idea but later than you, so I'm interested by such feature. Felipe: do you want to add a pull request to this issue (with Serhiy Storchaka implementation because it's the simplest one)? If not, I plan to write it. I will write it too if there is no reply in one month. ---------- nosy: +sblondon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 10:13:15 2021 From: report at bugs.python.org (Ammar Askar) Date: Thu, 25 Feb 2021 15:13:15 +0000 Subject: [issue43144] test_unicodedata: test_normalization uses network but doesn't depend on network resource In-Reply-To: <1612608486.69.0.149718284588.issue43144@roundup.psfhosted.org> Message-ID: <1614265995.03.0.80051501825.issue43144@roundup.psfhosted.org> Change by Ammar Askar : ---------- nosy: +ammar2 nosy_count: 3.0 -> 4.0 pull_requests: +23435 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24650 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 10:28:49 2021 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 25 Feb 2021 15:28:49 +0000 Subject: [issue42914] pprint numbers with underscore In-Reply-To: <1610493681.29.0.683565759752.issue42914@roundup.psfhosted.org> Message-ID: <1614266929.5.0.775669094233.issue42914@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 10:56:06 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 25 Feb 2021 15:56:06 +0000 Subject: [issue37609] support "UNC" device paths in ntpath.splitdrive In-Reply-To: <1563362794.09.0.456380769613.issue37609@roundup.psfhosted.org> Message-ID: <1614268566.92.0.00102673982445.issue37609@roundup.psfhosted.org> Change by Eryk Sun : Removed file: https://bugs.python.org/file48607/splitdrive.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 11:05:25 2021 From: report at bugs.python.org (Robert) Date: Thu, 25 Feb 2021 16:05:25 +0000 Subject: [issue43321] PyArg_ParseTuple() false-returns SUCCESS though SystemError and missing data (when PY_SSIZE_T_CLEAN not #define'd) Message-ID: <1614269125.06.0.289577576658.issue43321@roundup.psfhosted.org> New submission from Robert : When PY_SSIZE_T_CLEAN is not #defined in Py3.10, PyArg_ParseTuple() etc. sets a SystemError but the return value says 1 (=SUCCESS)! => Causes terrific crashes with unfilled variables - instead of a clean Python exception. Background: pywin32 suffers in masses from the drop of int support for the s#/y#/et#... formats in PyArg_ParseTuple() etc. (PY_SSIZE_T_CLEAN is required in Py3.10). And only part of the source is already PY_SSIZE_T_CLEAN. Now it is very difficult to even run tests and weed out / check, because of freezes instead of nice Python exceptions. => Instead of preventing such freezes, the PY_SSIZE_T_CLEAN mechanism became the opposite: a clever trap, a sword of Damocles :) The cause is in getargs.c: =================== getargs.c / convertsimple() ==== #define REQUIRE_PY_SSIZE_T_CLEAN \ if (!(flags & FLAG_SIZE_T)) { \ PyErr_SetString(PyExc_SystemError, \ "PY_SSIZE_T_CLEAN macro must be defined for '#' formats"); \ return NULL; \ } #define RETURN_ERR_OCCURRED return msgbuf =================== => The return NULL is further processed as no msg NULL -> no error. => Perhaps it should be a `return converterr(...)` or `return sstc_system_error(...)` !? ---------- components: Interpreter Core messages: 387678 nosy: kxrob priority: normal severity: normal status: open title: PyArg_ParseTuple() false-returns SUCCESS though SystemError and missing data (when PY_SSIZE_T_CLEAN not #define'd) type: crash versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 11:18:54 2021 From: report at bugs.python.org (Matthew Hughes) Date: Thu, 25 Feb 2021 16:18:54 +0000 Subject: [issue43322] Inconsistent '#include' notation in extensions tutorial doc Message-ID: <1614269934.51.0.264833374893.issue43322@roundup.psfhosted.org> New submission from Matthew Hughes : Just a small thing in these docs, there is a mix of "#include ", e.g. https://github.com/python/cpython/blame/master/Doc/extending/newtypes_tutorial.rst#L243 and '#include "structmember.h"', mostly in the included samples e.g. https://github.com/python/cpython/blob/master/Doc/includes/custom2.c#L3. Should these all be the same? ---------- assignee: docs at python components: Documentation messages: 387679 nosy: docs at python, mhughes priority: normal severity: normal status: open title: Inconsistent '#include' notation in extensions tutorial doc versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 11:47:38 2021 From: report at bugs.python.org (Anastasia Stefanyuk) Date: Thu, 25 Feb 2021 16:47:38 +0000 Subject: [issue28708] Low FD_SETSIZE limit on Windows In-Reply-To: <1479250358.07.0.768722440644.issue28708@psf.upfronthosting.co.za> Message-ID: <1614271658.01.0.370967743779.issue28708@roundup.psfhosted.org> Anastasia Stefanyuk added the comment: Hello! This piece of code is kind of a pain to solve, I guess you can somehow use the information here: https://mobilunity.com/blog/hire-sap-full-stack-developer/ - this will definitely help in some way or another. ---------- nosy: +stefanyuk.ana _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 12:01:38 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 25 Feb 2021 17:01:38 +0000 Subject: [issue28708] Low FD_SETSIZE limit on Windows In-Reply-To: <1479250358.07.0.768722440644.issue28708@psf.upfronthosting.co.za> Message-ID: <1614272498.47.0.149136398765.issue28708@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg387680 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 12:05:14 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 25 Feb 2021 17:05:14 +0000 Subject: [issue22302] Windows os.path.isabs UNC path bug In-Reply-To: <1409349502.55.0.177656049078.issue22302@psf.upfronthosting.co.za> Message-ID: <1614272714.4.0.71845296951.issue22302@roundup.psfhosted.org> Eryk Sun added the comment: > figure out whether to do `Path.cwd() / path` Thus a UNC path is absolute, i.e. any path that starts with 2 or more slashes, and all other paths are relative unless they have both a drive and a root. For example: def isabs(s): """Test whether a path is absolute""" s = os.fspath(s) seps = _get_bothseps(s) if len(s) > 1 and s[0] in seps and s[1] in seps: return True drive, rest = splitdrive(s) if drive and rest: return rest[0] in seps return False This also fixes the mistaken result that a rooted path such as "/spam" is absolute. When opened directly, a rooted path is relative to the drive of the current working directory. When accessed indirectly as the target of a symlink, a rooted path is relative to the volume device of the opened path. An example of the latter is a symlink named "link" that targets "\". If it's accessed as E:\link, it resolves to E:\. If it's accessed as C:\Mount\VolumeE\link, it resolves instead to C:\. The relative link resolves differently depending on the path traversed to access it. (Note that when resolving the target of a relative symlink, mountpoints such as "VolumeE" that are traversed in the opened path do not get replaced by their target path, unlike directory symlinks, which do get replaced by their target path. This behavior is basically the same as the way mountpoints and symlinks are handled in Unix.) ---------- versions: +Python 3.10, Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 12:21:34 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 25 Feb 2021 17:21:34 +0000 Subject: [issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior In-Reply-To: <1485882846.24.0.14620001579.issue29399@psf.upfronthosting.co.za> Message-ID: <1614273694.91.0.908437499596.issue29399@roundup.psfhosted.org> Eryk Sun added the comment: This issue affects Windows 7 and earlier, so I'm changing the affected version to Python 3.8, the last version to support Windows 7. I don't have access to Windows 7 currently. If someone has access to an updated Windows 7 installation (all required and optional updates) and has the free time to check this, please confirm whether resolving forwarded functions still fails when "python3.dll" is loaded with LOAD_WITH_ALTERED_SEARCH_PATH. Also, check the newer flags added by KB2533623: LOAD_LIBRARY_SEARCH_DEFAULT_DIRS | LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR. The update to support these flags may align the behavior with Windows 8.1 and 10. ---------- versions: +Python 3.8 -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 12:32:06 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 25 Feb 2021 17:32:06 +0000 Subject: [issue30460] file opened for updating cannot write after read In-Reply-To: <1495652852.75.0.455169730609.issue30460@psf.upfronthosting.co.za> Message-ID: <1614274326.36.0.293375858206.issue30460@roundup.psfhosted.org> Change by Eryk Sun : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 12:38:42 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 25 Feb 2021 17:38:42 +0000 Subject: [issue30979] the winapi fails to run shortcuts (because considers a shortcut not a valid Win32App) In-Reply-To: <1500589924.87.0.691040995571.issue30979@psf.upfronthosting.co.za> Message-ID: <1614274722.55.0.702838670179.issue30979@roundup.psfhosted.org> Change by Eryk Sun : ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 12:59:56 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 25 Feb 2021 17:59:56 +0000 Subject: [issue26111] On Windows, os.scandir will keep a handle on the directory until the iterator is exhausted In-Reply-To: <1452797110.0.0.310492336724.issue26111@psf.upfronthosting.co.za> Message-ID: <1614275996.55.0.489248473158.issue26111@roundup.psfhosted.org> Steve Dower added the comment: > FYI, in Windows 10, deleting files and directories now tries a POSIX delete Yeah, FWIW, I haven't been able to get clear guidance on what I can/cannot publicly announce we've done in this space. But since you've found it I guess I can say sorry that I couldn't announce it more loudly! :) A number of our other issues should be able to be closed soon once the changes get out in the open. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 13:07:06 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 25 Feb 2021 18:07:06 +0000 Subject: [issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior In-Reply-To: <1485882846.24.0.14620001579.issue29399@psf.upfronthosting.co.za> Message-ID: <1614276426.92.0.156422599023.issue29399@roundup.psfhosted.org> Steve Dower added the comment: I'm not sure we ever meant for LoadLibrary("python3.dll") to actively load the concrete python3X.dll. The APIs are the same, so you can (should) LoadLibrary the one that you want. It's when you use static imports in extensions that it matters, but in that case it's ensured that both python3X.dll and python3.dll are already loaded. I guess somewhere we just need to specify that python3.dll is for python3.lib, and not for LoadLibrary? I'm not even sure where the existing documentation is that we would change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 13:18:08 2021 From: report at bugs.python.org (Anders Kaseorg) Date: Thu, 25 Feb 2021 18:18:08 +0000 Subject: [issue43323] UnicodeEncodeError: surrogates not allowed when parsing invalid charset Message-ID: <1614277088.24.0.58040288739.issue43323@roundup.psfhosted.org> New submission from Anders Kaseorg : We ran into a UnicodeEncodeError exception using email.parser to parse this email , with full headers available in the raw archive . The offending header is hilariously invalid: Content-Type: text/plain; charset*=utf-8?''utf-8%E2%80%9D but I?m filing an issue since the parser is intended to be robust against invalid input. Minimal reproduction: >>> import email, email.policy >>> email.message_from_bytes(b"Content-Type: text/plain; charset*=utf-8\xE2\x80\x9D''utf-8%E2%80%9D", policy=email.policy.default) Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.10/email/__init__.py", line 46, in message_from_bytes return BytesParser(*args, **kws).parsebytes(s) File "/usr/local/lib/python3.10/email/parser.py", line 123, in parsebytes return self.parser.parsestr(text, headersonly) File "/usr/local/lib/python3.10/email/parser.py", line 67, in parsestr return self.parse(StringIO(text), headersonly=headersonly) File "/usr/local/lib/python3.10/email/parser.py", line 57, in parse return feedparser.close() File "/usr/local/lib/python3.10/email/feedparser.py", line 187, in close self._call_parse() File "/usr/local/lib/python3.10/email/feedparser.py", line 180, in _call_parse self._parse() File "/usr/local/lib/python3.10/email/feedparser.py", line 256, in _parsegen if self._cur.get_content_type() == 'message/delivery-status': File "/usr/local/lib/python3.10/email/message.py", line 578, in get_content_type value = self.get('content-type', missing) File "/usr/local/lib/python3.10/email/message.py", line 471, in get return self.policy.header_fetch_parse(k, v) File "/usr/local/lib/python3.10/email/policy.py", line 163, in header_fetch_parse return self.header_factory(name, value) File "/usr/local/lib/python3.10/email/headerregistry.py", line 608, in __call__ return self[name](name, value) File "/usr/local/lib/python3.10/email/headerregistry.py", line 196, in __new__ cls.parse(value, kwds) File "/usr/local/lib/python3.10/email/headerregistry.py", line 453, in parse kwds['decoded'] = str(parse_tree) File "/usr/local/lib/python3.10/email/_header_value_parser.py", line 126, in __str__ return ''.join(str(x) for x in self) File "/usr/local/lib/python3.10/email/_header_value_parser.py", line 126, in return ''.join(str(x) for x in self) File "/usr/local/lib/python3.10/email/_header_value_parser.py", line 798, in __str__ for name, value in self.params: File "/usr/local/lib/python3.10/email/_header_value_parser.py", line 783, in params value = value.decode(charset, 'surrogateescape') UnicodeEncodeError: 'utf-8' codec can't encode characters in position 5-7: surrogates not allowed ---------- components: email messages: 387685 nosy: andersk, barry, r.david.murray priority: normal severity: normal status: open title: UnicodeEncodeError: surrogates not allowed when parsing invalid charset versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 13:37:02 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 25 Feb 2021 18:37:02 +0000 Subject: [issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior In-Reply-To: <1485882846.24.0.14620001579.issue29399@psf.upfronthosting.co.za> Message-ID: <1614278222.29.0.640356557306.issue29399@roundup.psfhosted.org> Eryk Sun added the comment: > The APIs are the same, so you can (should) LoadLibrary the one > that you want. The issue is that python3.dll doesn't depend on python3x.dll in the normal way. For example, LoadLibraryExW("path/to/python3.dll", NULL, LOAD_WITH_ALTERED_SEARCH_PATH) doesn't automatically load "python38.dll". But the forwarded functions depend on "python38.dll", e.g. "Py_Main (forwarded to python38.Py_Main)". The loader doesn't try to load "python38.dll" until the application tries to resolve a forwarded function such as "Py_Main", which in the LoadLibraryExW case is the time that GetProcAddress(hpython3, "Py_Main") is called. It turns out, when I tested this in 2017, that the loader in Windows 7 doesn't remember the activation context from loading "python3.dll" and thus will fail to find "python38.dll", which in turn makes the GetProcAddress() call fail. In contrast, the loader in Windows 10 knows to search for "python38.dll" in the directory of "python3.dll". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 14:32:22 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 25 Feb 2021 19:32:22 +0000 Subject: [issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior In-Reply-To: <1485882846.24.0.14620001579.issue29399@psf.upfronthosting.co.za> Message-ID: <1614281542.53.0.531394705433.issue29399@roundup.psfhosted.org> Change by Eryk Sun : ---------- Removed message: https://bugs.python.org/msg387686 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 14:59:34 2021 From: report at bugs.python.org (Eryk Sun) Date: Thu, 25 Feb 2021 19:59:34 +0000 Subject: [issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior In-Reply-To: <1485882846.24.0.14620001579.issue29399@psf.upfronthosting.co.za> Message-ID: <1614283174.21.0.958855195269.issue29399@roundup.psfhosted.org> Eryk Sun added the comment: > I'm not sure we ever meant for LoadLibrary("python3.dll") to > actively load the concrete python3X.dll. IIRC, Paul Moore was doing something like this to create a script runner that loads "python3.dll", which runs as a regular application, not as a launcher for "python.exe". He didn't want to tie the executable to a particular "python3x.dll" or include the DLLs in the application directory beside the executable. I think he had the embedded distribution(s) in a subdirectory. That's solvable by defining an assembly in the subdirectory, which gets declared in the application manifest. But I think he wanted to keep it simple. So he was just manually loading "python3.dll" and calling GetProcAddress() to look up Py_Main(), which works in Windows 8+. Alternatively, for this kind of a script runner, the script itself can declare the version of Python it needs in a shebang (assuming a single architecture for the executable and Python), and the executable can then manually load the required Python DLL from a subdirectory, or other known location. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 16:43:57 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Thu, 25 Feb 2021 21:43:57 +0000 Subject: [issue43290] [sqlite3] remove legacy code from pysqlite_step In-Reply-To: <1613949369.74.0.130974571749.issue43290@roundup.psfhosted.org> Message-ID: <1614289437.49.0.278450604952.issue43290@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: Addendum to msg387641: > The latter only leaves a valid Cursor->statement->st pointer (sqlite3_stmt pointer) if the Statement object was successfully created, and the sqlite3_stmt successfully prepared. sqlite3_prepare_v2() actually returns SQLITE_OK but sets the statement pointer to NULL, if given an empty string or a comment. Only the sqlite3_prepare_v2() return code is checked in order to determine if pysqlite_statement_create() was successful or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 17:39:36 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 25 Feb 2021 22:39:36 +0000 Subject: [issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior In-Reply-To: <1485882846.24.0.14620001579.issue29399@psf.upfronthosting.co.za> Message-ID: <1614292776.35.0.52386347195.issue29399@roundup.psfhosted.org> Steve Dower added the comment: Yeah, but in that scenario, it is just as good to LoadLibrary("python39.dll") and use it as if it was LoadLibrary("python3.dll") because the interaction model is identical. The only reason to load python3.dll explicitly is if you are not keeping it adjacent to python39.dll, and so you need to pre-load it before the interpreter tries to import a native module. It doesn't provide any benefit for the host app other than not having to know what DLL you're loading, and most of us consider a critical security vulnerability rather than a feature ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 17:47:07 2021 From: report at bugs.python.org (Hasan) Date: Thu, 25 Feb 2021 22:47:07 +0000 Subject: [issue43324] asyncio Message-ID: <1614293227.43.0.791416347033.issue43324@roundup.psfhosted.org> New submission from Hasan : Added socket getfqdn and gethostbyaddr functions with threadpoolexecutor to asyncio library ---------- messages: 387690 nosy: AliyevH priority: normal severity: normal status: open title: asyncio type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 17:48:22 2021 From: report at bugs.python.org (Paul Moore) Date: Thu, 25 Feb 2021 22:48:22 +0000 Subject: [issue29399] python3.dll export forwarders not resolved in all situations due to missing python3?.dll dependency and DLL search path behavior In-Reply-To: <1485882846.24.0.14620001579.issue29399@psf.upfronthosting.co.za> Message-ID: <1614293302.64.0.925308139769.issue29399@roundup.psfhosted.org> Paul Moore added the comment: No, because I want to work with whatever version of Python the user puts there. Yes, I could search for "python3*.dll" and load the one I find, but I'm writing this in C, and I get a migraine whenever I have to write more than about 15 lines of C code these days :-) It's not a big deal either way, though. That project turned out to be too much effort to be worth it, so it's now mostly just a proof-of-concept experiment. > most of us consider a critical security vulnerability rather than a feature :-) Given that my execution model is "run a user-supplied Python script with a user-supplied interpreter" I think any attacker has far easier ways of compromising things than hijacking python3.dll... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 18:04:20 2021 From: report at bugs.python.org (Hasan) Date: Thu, 25 Feb 2021 23:04:20 +0000 Subject: [issue43324] asyncio In-Reply-To: <1614293227.43.0.791416347033.issue43324@roundup.psfhosted.org> Message-ID: <1614294260.62.0.484962753382.issue43324@roundup.psfhosted.org> Change by Hasan : ---------- keywords: +patch pull_requests: +23436 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24651 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 18:11:20 2021 From: report at bugs.python.org (Anthony Flury) Date: Thu, 25 Feb 2021 23:11:20 +0000 Subject: [issue43325] Documentation should warn that 'is' is not a safe comparison operator for most values. Message-ID: <1614294680.42.0.115546489096.issue43325@roundup.psfhosted.org> New submission from Anthony Flury : A frequent bug for beginners is to assume that 'is' is somehow 'better' then '==' when comparing values, and it is certainly a cause for confusion amongst beginners as to why: [1,2] is [1,2] evaluates to False but 'a' is 'a' evaluates to True and many similar examples. As far as I can see the first mention of the 'is' operator is under Section 5 - More on conditionals : https://docs.python.org/3/tutorial/datastructures.html?highlight=comparison#comparing-sequences-and-other-types; and it is mentioned thus : The operators is and is not compare whether two objects are really the same object; this only matters for mutable objects like lists. As we know though this statement is misleading - it suggests that 'is' can be used to compare immutable values (ints, strings, tuples) etc, and while for some values of some immutables (small ints, shortish strings) 'is' can be used as an equivalent of '==' it wont be clear from this 'statement' that 'is' is simply not a safe way to compare values. There needs to be a warning here about 'is' and how it is not an equivalent to '==' in any general sense. ---------- assignee: docs at python components: Documentation messages: 387692 nosy: anthony-flury, docs at python priority: normal severity: normal status: open title: Documentation should warn that 'is' is not a safe comparison operator for most values. type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 18:11:38 2021 From: report at bugs.python.org (twoone3) Date: Thu, 25 Feb 2021 23:11:38 +0000 Subject: [issue43263] threading module unable to run In-Reply-To: <1613722745.98.0.253058139819.issue43263@roundup.psfhosted.org> Message-ID: <1614294698.07.0.47220381669.issue43263@roundup.psfhosted.org> Change by twoone3 <3197653242 at qq.com>: ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware resolution: works for me -> wont fix type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 18:18:02 2021 From: report at bugs.python.org (Steve Dower) Date: Thu, 25 Feb 2021 23:18:02 +0000 Subject: [issue43263] threading module unable to run In-Reply-To: <1613722745.98.0.253058139819.issue43263@roundup.psfhosted.org> Message-ID: <1614295082.24.0.330725668327.issue43263@roundup.psfhosted.org> Steve Dower added the comment: Sorry, I can't help. My employer has strict rules about reviewing GPL code like that in your linked repository. I'd suggest checking your thread management in native code. Each new thread created in Python will create a new native thread, and they're all trying to acquire the GIL, so make sure you release it. I have no idea how you are waiting for the threads to complete their work, but you'll need to release the GIL while waiting (and maybe periodically reacquire it to check). In general, I find it's best to treat embedded CPython as running as a separate process, even if it's just in separate threads. If you try and mix arbitrary Python code into your own application, things like this happen all the time. Whereas if you are doing inter-thread communication as if there are no shared objects, you'll often be fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 18:39:48 2021 From: report at bugs.python.org (Berker Peksag) Date: Thu, 25 Feb 2021 23:39:48 +0000 Subject: [issue43290] [sqlite3] remove legacy code from pysqlite_step In-Reply-To: <1613949369.74.0.130974571749.issue43290@roundup.psfhosted.org> Message-ID: <1614296388.7.0.156483128261.issue43290@roundup.psfhosted.org> Berker Peksag added the comment: New changeset 91ea37c84af2dd5ea92802a4c2adad47861ac067 by Erlend Egeberg Aasland in branch 'master': bpo-43290: Remove workaround from pysqlite_step() (GH-24638) https://github.com/python/cpython/commit/91ea37c84af2dd5ea92802a4c2adad47861ac067 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 18:40:16 2021 From: report at bugs.python.org (Berker Peksag) Date: Thu, 25 Feb 2021 23:40:16 +0000 Subject: [issue43290] [sqlite3] remove legacy code from pysqlite_step In-Reply-To: <1613949369.74.0.130974571749.issue43290@roundup.psfhosted.org> Message-ID: <1614296416.05.0.077136853459.issue43290@roundup.psfhosted.org> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 19:36:19 2021 From: report at bugs.python.org (Inada Naoki) Date: Fri, 26 Feb 2021 00:36:19 +0000 Subject: [issue43321] PyArg_ParseTuple() false-returns SUCCESS though SystemError and missing data (when PY_SSIZE_T_CLEAN not #define'd) In-Reply-To: <1614269125.06.0.289577576658.issue43321@roundup.psfhosted.org> Message-ID: <1614299779.94.0.190341653857.issue43321@roundup.psfhosted.org> Change by Inada Naoki : ---------- nosy: +methane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 19:43:20 2021 From: report at bugs.python.org (twoone3) Date: Fri, 26 Feb 2021 00:43:20 +0000 Subject: [issue43263] threading module unable to run In-Reply-To: <1613722745.98.0.253058139819.issue43263@roundup.psfhosted.org> Message-ID: <1614300200.8.0.392341133782.issue43263@roundup.psfhosted.org> twoone3 <3197653242 at qq.com> added the comment: That's a pity. I'm going to send the Python source code to my project to compile it, and see if it can solve the problem. Of course, I can also try compiling it into a static library ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 19:46:31 2021 From: report at bugs.python.org (Inada Naoki) Date: Fri, 26 Feb 2021 00:46:31 +0000 Subject: [issue43321] PyArg_ParseTuple() false-returns SUCCESS though SystemError and missing data (when PY_SSIZE_T_CLEAN not #define'd) In-Reply-To: <1614269125.06.0.289577576658.issue43321@roundup.psfhosted.org> Message-ID: <1614300391.28.0.680495719844.issue43321@roundup.psfhosted.org> Inada Naoki added the comment: Thank you for reporting. @vstinner Can we provide a nice C traceback too? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 19:48:27 2021 From: report at bugs.python.org (Berker Peksag) Date: Fri, 26 Feb 2021 00:48:27 +0000 Subject: [issue43314] [sqlite3] remove pre SQLite 3.7.7 support code In-Reply-To: <1614163734.14.0.841142847915.issue43314@roundup.psfhosted.org> Message-ID: <1614300507.0.0.0659273839941.issue43314@roundup.psfhosted.org> Berker Peksag added the comment: New changeset 3150754f91fc1d15e3888e22c065672838a9c069 by Erlend Egeberg Aasland in branch 'master': bpo-43314: Remove SQLITE_OPEN_URI ifdef (GH-24637) https://github.com/python/cpython/commit/3150754f91fc1d15e3888e22c065672838a9c069 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 19:48:55 2021 From: report at bugs.python.org (Berker Peksag) Date: Fri, 26 Feb 2021 00:48:55 +0000 Subject: [issue43314] [sqlite3] remove pre SQLite 3.7.7 support code In-Reply-To: <1614163734.14.0.841142847915.issue43314@roundup.psfhosted.org> Message-ID: <1614300535.39.0.985495145358.issue43314@roundup.psfhosted.org> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 20:12:05 2021 From: report at bugs.python.org (Inada Naoki) Date: Fri, 26 Feb 2021 01:12:05 +0000 Subject: [issue43316] python -m gzip handles error incorrectly In-Reply-To: <1614177240.99.0.73469579254.issue43316@roundup.psfhosted.org> Message-ID: <1614301925.28.0.305974078671.issue43316@roundup.psfhosted.org> Change by Inada Naoki : ---------- pull_requests: +23437 pull_request: https://github.com/python/cpython/pull/24652 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 20:13:24 2021 From: report at bugs.python.org (Inada Naoki) Date: Fri, 26 Feb 2021 01:13:24 +0000 Subject: [issue43316] python -m gzip handles error incorrectly In-Reply-To: <1614177240.99.0.73469579254.issue43316@roundup.psfhosted.org> Message-ID: <1614302004.66.0.110662507341.issue43316@roundup.psfhosted.org> Inada Naoki added the comment: New changeset adea9b86a97794ca75054603497c195d5ba39aa5 by Miss Islington (bot) in branch '3.9': bpo-43316: gzip: CLI uses non-zero return code on error. (GH-24647) https://github.com/python/cpython/commit/adea9b86a97794ca75054603497c195d5ba39aa5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 20:40:33 2021 From: report at bugs.python.org (Alex Willmer) Date: Fri, 26 Feb 2021 01:40:33 +0000 Subject: [issue13559] Use sendfile where possible in httplib In-Reply-To: <1323377245.96.0.509517020675.issue13559@psf.upfronthosting.co.za> Message-ID: <1614303633.12.0.973669116745.issue13559@roundup.psfhosted.org> Alex Willmer added the comment: I would like to take a stab at this. Giampaolo, would it be okay if I made a pull request updated from your patch? With the appropriate "Co-authored-by: Author Name " line. ---------- nosy: +Alex.Willmer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 21:09:23 2021 From: report at bugs.python.org (Inada Naoki) Date: Fri, 26 Feb 2021 02:09:23 +0000 Subject: [issue43316] python -m gzip handles error incorrectly In-Reply-To: <1614177240.99.0.73469579254.issue43316@roundup.psfhosted.org> Message-ID: <1614305363.64.0.539847513926.issue43316@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 9525a18b5bb317d9fb206c992ab62aa41559b0c8 by Inada Naoki in branch 'master': bpo-43316: gzip: Fix sys.exit() usage. (GH-24652) https://github.com/python/cpython/commit/9525a18b5bb317d9fb206c992ab62aa41559b0c8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 21:09:31 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Feb 2021 02:09:31 +0000 Subject: [issue43316] python -m gzip handles error incorrectly In-Reply-To: <1614177240.99.0.73469579254.issue43316@roundup.psfhosted.org> Message-ID: <1614305371.22.0.382385673016.issue43316@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +23438 pull_request: https://github.com/python/cpython/pull/24653 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 21:09:44 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Feb 2021 02:09:44 +0000 Subject: [issue43316] python -m gzip handles error incorrectly In-Reply-To: <1614177240.99.0.73469579254.issue43316@roundup.psfhosted.org> Message-ID: <1614305384.18.0.650305269794.issue43316@roundup.psfhosted.org> Change by miss-islington : ---------- pull_requests: +23439 pull_request: https://github.com/python/cpython/pull/24654 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 21:11:43 2021 From: report at bugs.python.org (itchyny) Date: Fri, 26 Feb 2021 02:11:43 +0000 Subject: [issue43295] datetime.strptime emits IndexError on parsing 'z' as %z In-Reply-To: <1614002299.86.0.551520528109.issue43295@roundup.psfhosted.org> Message-ID: <1614305503.79.0.661276534169.issue43295@roundup.psfhosted.org> itchyny added the comment: @noormichael Thank you for submitting a patch, I confirmed the original issue is fixed. I'm ok this ticket is closed. Regarding the second issue, I learned it is a Turkish character (thanks!), but the error is same type so will not cause such a critical issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 21:36:48 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Feb 2021 02:36:48 +0000 Subject: [issue43316] python -m gzip handles error incorrectly In-Reply-To: <1614177240.99.0.73469579254.issue43316@roundup.psfhosted.org> Message-ID: <1614307008.64.0.846059038948.issue43316@roundup.psfhosted.org> miss-islington added the comment: New changeset 540749ed6d8e29a11368bc7f343baf7b7ea7e4a8 by Miss Islington (bot) in branch '3.9': bpo-43316: gzip: Fix sys.exit() usage. (GH-24652) https://github.com/python/cpython/commit/540749ed6d8e29a11368bc7f343baf7b7ea7e4a8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 21:36:52 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Feb 2021 02:36:52 +0000 Subject: [issue43316] python -m gzip handles error incorrectly In-Reply-To: <1614177240.99.0.73469579254.issue43316@roundup.psfhosted.org> Message-ID: <1614307012.25.0.968137989174.issue43316@roundup.psfhosted.org> miss-islington added the comment: New changeset 07ab490a7a966ce00a61bf56ccd0604434b143a5 by Miss Islington (bot) in branch '3.8': bpo-43316: gzip: Fix sys.exit() usage. (GH-24652) https://github.com/python/cpython/commit/07ab490a7a966ce00a61bf56ccd0604434b143a5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 21:37:07 2021 From: report at bugs.python.org (Inada Naoki) Date: Fri, 26 Feb 2021 02:37:07 +0000 Subject: [issue43316] python -m gzip handles error incorrectly In-Reply-To: <1614177240.99.0.73469579254.issue43316@roundup.psfhosted.org> Message-ID: <1614307027.75.0.860262887621.issue43316@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 Feb 25 22:21:08 2021 From: report at bugs.python.org (Joseph Shen) Date: Fri, 26 Feb 2021 03:21:08 +0000 Subject: [issue43278] unnecessary leading '\n' from Py_GetCompiler() when build with different complier In-Reply-To: <1613840541.54.0.110258286705.issue43278@roundup.psfhosted.org> Message-ID: <1614309668.45.0.102641652556.issue43278@roundup.psfhosted.org> Change by Joseph Shen : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 22:24:45 2021 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 26 Feb 2021 03:24:45 +0000 Subject: [issue43144] test_unicodedata: test_normalization uses network but doesn't depend on network resource In-Reply-To: <1612608486.69.0.149718284588.issue43144@roundup.psfhosted.org> Message-ID: <1614309885.61.0.0244386637385.issue43144@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset c6ccdfb479cb0a4a491575ef0bafaa0d29daae1a by Ammar Askar in branch 'master': bpo-43144: Mark unicodedata's test_normalization as requiring network (GH-24650) https://github.com/python/cpython/commit/c6ccdfb479cb0a4a491575ef0bafaa0d29daae1a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 22:26:12 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Feb 2021 03:26:12 +0000 Subject: [issue43144] test_unicodedata: test_normalization uses network but doesn't depend on network resource In-Reply-To: <1612608486.69.0.149718284588.issue43144@roundup.psfhosted.org> Message-ID: <1614309972.74.0.716894852301.issue43144@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +23440 pull_request: https://github.com/python/cpython/pull/24655 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 22:27:00 2021 From: report at bugs.python.org (Fcant) Date: Fri, 26 Feb 2021 03:27:00 +0000 Subject: [issue43326] About Zipfile Message-ID: <1614310020.48.0.485375340056.issue43326@roundup.psfhosted.org> New submission from Fcant : When I Unzip a package using the zipfile module, the package?s filename has a newline character, which causes the Unzip to fail, so the UNZIP filename needs to be processed ---------- components: Library (Lib) files: Fcant_2021-02-26_11-26-37.jpg messages: 387705 nosy: Fcscanf priority: normal severity: normal status: open title: About Zipfile type: behavior versions: Python 3.9 Added file: https://bugs.python.org/file49836/Fcant_2021-02-26_11-26-37.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 23:16:10 2021 From: report at bugs.python.org (Inada Naoki) Date: Fri, 26 Feb 2021 04:16:10 +0000 Subject: [issue43321] PyArg_ParseTuple() false-returns SUCCESS though SystemError and missing data (when PY_SSIZE_T_CLEAN not #define'd) In-Reply-To: <1614269125.06.0.289577576658.issue43321@roundup.psfhosted.org> Message-ID: <1614312970.99.0.277887524075.issue43321@roundup.psfhosted.org> Inada Naoki added the comment: I checked the warning, and now I think Python traceback is fine. PyArg_Parse*() is used on top of the C function. So python traceback is enough to find which function is using '#' without Py_SSIZE_T_CLEAN. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 23:22:11 2021 From: report at bugs.python.org (Inada Naoki) Date: Fri, 26 Feb 2021 04:22:11 +0000 Subject: [issue43321] PyArg_ParseTuple() false-returns SUCCESS though SystemError and missing data (when PY_SSIZE_T_CLEAN not #define'd) In-Reply-To: <1614269125.06.0.289577576658.issue43321@roundup.psfhosted.org> Message-ID: <1614313331.71.0.306102566218.issue43321@roundup.psfhosted.org> Change by Inada Naoki : ---------- keywords: +patch pull_requests: +23441 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24656 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 23:24:15 2021 From: report at bugs.python.org (Inada Naoki) Date: Fri, 26 Feb 2021 04:24:15 +0000 Subject: [issue41282] Deprecate and remove distutils In-Reply-To: <1594542625.3.0.789939298104.issue41282@roundup.psfhosted.org> Message-ID: <1614313455.99.0.0914839732066.issue41282@roundup.psfhosted.org> Change by Inada Naoki : ---------- nosy: +methane nosy_count: 17.0 -> 18.0 pull_requests: +23442 pull_request: https://github.com/python/cpython/pull/24657 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 23:24:28 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Feb 2021 04:24:28 +0000 Subject: [issue43278] unnecessary leading '\n' from Py_GetCompiler() when build with different complier In-Reply-To: <1613840541.54.0.110258286705.issue43278@roundup.psfhosted.org> Message-ID: <1614313468.14.0.0629848528244.issue43278@roundup.psfhosted.org> miss-islington added the comment: New changeset 28a30bc2e2d5a02d42e65ff7b7c6968fa966279d by Joseph Shen in branch 'master': closes bpo-43278: remove unnecessary leading '\n' from COMPILER when build with GCC/Clang (GH-24606) https://github.com/python/cpython/commit/28a30bc2e2d5a02d42e65ff7b7c6968fa966279d ---------- nosy: +miss-islington resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 25 23:57:42 2021 From: report at bugs.python.org (Pandu E POLUAN) Date: Fri, 26 Feb 2021 04:57:42 +0000 Subject: [issue27820] Possible bug in smtplib when initial_response_ok=False In-Reply-To: <1471739698.94.0.271523306415.issue27820@psf.upfronthosting.co.za> Message-ID: <1614315462.56.0.622314780975.issue27820@roundup.psfhosted.org> Pandu E POLUAN added the comment: PR available on GitHub and it's already more than one month since the PR was submitted, so I'm pinging this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 00:44:26 2021 From: report at bugs.python.org (miss-islington) Date: Fri, 26 Feb 2021 05:44:26 +0000 Subject: [issue43144] test_unicodedata: test_normalization uses network but doesn't depend on network resource In-Reply-To: <1612608486.69.0.149718284588.issue43144@roundup.psfhosted.org> Message-ID: <1614318266.78.0.0651543010791.issue43144@roundup.psfhosted.org> miss-islington added the comment: New changeset 6c4c11763fad106e43cdcfdbe3bd33ea2765a13f by Miss Islington (bot) in branch '3.9': bpo-43144: Mark unicodedata's test_normalization as requiring network (GH-24650) https://github.com/python/cpython/commit/6c4c11763fad106e43cdcfdbe3bd33ea2765a13f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 01:21:32 2021 From: report at bugs.python.org (Dong-hee Na) Date: Fri, 26 Feb 2021 06:21:32 +0000 Subject: [issue43144] test_unicodedata: test_normalization uses network but doesn't depend on network resource In-Reply-To: <1612608486.69.0.149718284588.issue43144@roundup.psfhosted.org> Message-ID: <1614320492.44.0.36443927274.issue43144@roundup.psfhosted.org> Change by Dong-hee Na : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 03:11:19 2021 From: report at bugs.python.org (Andrew Tomazos) Date: Fri, 26 Feb 2021 08:11:19 +0000 Subject: [issue40642] Cpython "pystate.h" subdirectory wrong In-Reply-To: <1589614857.55.0.73631693439.issue40642@roundup.psfhosted.org> Message-ID: <1614327079.85.0.62616574828.issue40642@roundup.psfhosted.org> Andrew Tomazos added the comment: The problem occurs if you: #include on *nix systems. Note `/usr/include/` is in the system include path. One workaround is to `-I/usr/include/python3.8` and then `#include `. Another workaround is to comment out: // #include "cpython/initconfig.h" in `cpython/pystate.h`. A fix would be appreciated, so that `#include ` would work out of the box (without having to add `-I`). ---------- nosy: +andrewtomazos _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 03:14:13 2021 From: report at bugs.python.org (Andrew Tomazos) Date: Fri, 26 Feb 2021 08:14:13 +0000 Subject: [issue40642] Cpython "pystate.h" subdirectory wrong In-Reply-To: <1589614857.55.0.73631693439.issue40642@roundup.psfhosted.org> Message-ID: <1614327253.02.0.959696827087.issue40642@roundup.psfhosted.org> Andrew Tomazos added the comment: Related: https://stackoverflow.com/q/63211981/1131467 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 03:20:03 2021 From: report at bugs.python.org (Matej Cepl) Date: Fri, 26 Feb 2021 08:20:03 +0000 Subject: [issue42967] [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1614327603.94.0.64094915809.issue42967@roundup.psfhosted.org> Matej Cepl added the comment: > FYI - This was somewhat of an unfortuate API change. I'm coming across code that relies on ; also being treated as a separator by parse_qs(). That code is now broken with no easy way around it. So far, we at openSUSE had to package at least SQLAlchemy, Twisted, yarl and furl. The author of the first one acknowledged use of semicolon as a bug. I don't think it was so bad. ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 03:46:27 2021 From: report at bugs.python.org (Andrew Tomazos) Date: Fri, 26 Feb 2021 08:46:27 +0000 Subject: [issue40642] Cpython "pystate.h" subdirectory wrong In-Reply-To: <1589614857.55.0.73631693439.issue40642@roundup.psfhosted.org> Message-ID: <1614329187.67.0.910553611311.issue40642@roundup.psfhosted.org> Andrew Tomazos added the comment: After studying the include directives in the Include folder, I think the best fix would be: In Include/cpython/state.h: - #include "cpython/initconfig.h" + #include "initconfig.h" this will mean that state.h will find initconfig.h using a file-relative include (as all the other include directives do), instead of relying on the installed Include directory being put in the header search path. As this include directive is the only one with this property, the benefit of this change would be that the Include folder would be able to be installed in any subdirectory of a search path, rather than requiring its own dedicated one. This would mean (for example) you could install different versions of the Python headers side by side and then select between them using preprocessor directives - rather than having to switch up global compiler options. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 03:48:07 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 26 Feb 2021 08:48:07 +0000 Subject: [issue43294] [sqlite3] unused variables in Connection begin, commit, and rollback In-Reply-To: <1613988407.68.0.840775188908.issue43294@roundup.psfhosted.org> Message-ID: <1614329287.61.0.929216921179.issue43294@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +23443 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24658 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 04:15:47 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 26 Feb 2021 09:15:47 +0000 Subject: [issue43326] About Zipfile In-Reply-To: <1614310020.48.0.485375340056.issue43326@roundup.psfhosted.org> Message-ID: <1614330947.14.0.173255444997.issue43326@roundup.psfhosted.org> Ronald Oussoren added the comment: I'm not sure what you are asking here. Looking at the screenshot I'd say that the zipfile you are trying to extract contains files with a newline in their name. That's a perfectly valid (although annoying) name on unix-y platforms. The zipfile module does not have an API for rewriting the file name when extracting. It is far from clear to me that adding such a API would be generally useful. Emulating this is fairly easy though, something like: zf = zipfile.ZipFile(...) for name in zf.namelist(): stream = zf.open(name) data = stream.read() stream.close() with open(name.replace(...), "w") as stream: stream.write(data) ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 04:21:11 2021 From: report at bugs.python.org (Fcant) Date: Fri, 26 Feb 2021 09:21:11 +0000 Subject: [issue43326] About Zipfile In-Reply-To: <1614330947.14.0.173255444997.issue43326@roundup.psfhosted.org> Message-ID: Fcant added the comment: Because these special symbols are not handled under the Window, he will report an error and will not work properly From???? Email?fcscanf at outlook.com Tel?17826260016 ???: Ronald Oussoren ????: 2021?2?26? ?? 17:15 ???: fcscanf at outlook.com ??: [issue43326] About Zipfile Ronald Oussoren added the comment: I'm not sure what you are asking here. Looking at the screenshot I'd say that the zipfile you are trying to extract contains files with a newline in their name. That's a perfectly valid (although annoying) name on unix-y platforms. The zipfile module does not have an API for rewriting the file name when extracting. It is far from clear to me that adding such a API would be generally useful. Emulating this is fairly easy though, something like: zf = zipfile.ZipFile(...) for name in zf.namelist(): stream = zf.open(name) data = stream.read() stream.close() with open(name.replace(...), "w") as stream: stream.write(data) ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 04:39:06 2021 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 26 Feb 2021 09:39:06 +0000 Subject: [issue43327] The docs falsely state that PyImport_ImportFrozenModuleObject() returns a new reference Message-ID: <1614332346.77.0.251072894564.issue43327@roundup.psfhosted.org> New submission from Zackery Spytz : The docs state that PyImport_ImportFrozenModuleObject() returns a new reference, but it actually returns an int. https://docs.python.org/3.10/c-api/import.html#c.PyImport_ImportFrozenModuleObject ---------- assignee: docs at python components: Documentation messages: 387716 nosy: ZackerySpytz, docs at python priority: normal severity: normal status: open title: The docs falsely state that PyImport_ImportFrozenModuleObject() returns a new reference versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 04:42:23 2021 From: report at bugs.python.org (Zackery Spytz) Date: Fri, 26 Feb 2021 09:42:23 +0000 Subject: [issue43327] The docs falsely state that PyImport_ImportFrozenModuleObject() returns a new reference In-Reply-To: <1614332346.77.0.251072894564.issue43327@roundup.psfhosted.org> Message-ID: <1614332543.99.0.582447704807.issue43327@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch pull_requests: +23444 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24659 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 04:45:39 2021 From: report at bugs.python.org (Carl Friedrich Bolz-Tereick) Date: Fri, 26 Feb 2021 09:45:39 +0000 Subject: [issue41972] bytes.find consistently hangs in a particular scenario In-Reply-To: <1602113519.53.0.297229304628.issue41972@roundup.psfhosted.org> Message-ID: <1614332739.51.0.867082552215.issue41972@roundup.psfhosted.org> Carl Friedrich Bolz-Tereick added the comment: > BTW, this initialization in the FASTSEARCH code appears to me to be a mistake: > skip = mlast - 1; Thanks for pointing that out Tim! Turns out PyPy had copied that mindlessly and I just fixed it. (I'm also generally following along with this issue, I plan to implement the two-way algorithm for PyPy as well, once you all have decided on a heuristic. We are occasionally in a slightly easier situation, because for constant-enough needles we can have the JIT do the pre-work on the needle during code generation.) ---------- nosy: +Carl.Friedrich.Bolz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 04:46:13 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 26 Feb 2021 09:46:13 +0000 Subject: [issue43296] [sqlite3] Fix sqlite3_value_blob() usage In-Reply-To: <1614004633.85.0.0676920983033.issue43296@roundup.psfhosted.org> Message-ID: <1614332773.58.0.752273369012.issue43296@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- title: [sqlite3] sqlite3_value_bytes() should be called after sqlite3_value_blob() -> [sqlite3] Fix sqlite3_value_blob() usage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 05:29:14 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 26 Feb 2021 10:29:14 +0000 Subject: [issue43293] Move note about GIL to top of threading module In-Reply-To: <1613976245.39.0.497030592079.issue43293@roundup.psfhosted.org> Message-ID: <1614335354.23.0.776143122381.issue43293@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset 30927fa4658a36f647155e9582b598434582a5ce by Guanzhong Chen in branch '3.7': [3.7] bpo-43293: Doc: move note about GIL to top of threading module (GH-24622) (#24642) https://github.com/python/cpython/commit/30927fa4658a36f647155e9582b598434582a5ce ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 06:22:20 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Fri, 26 Feb 2021 11:22:20 +0000 Subject: [issue43296] [sqlite3] Fix sqlite3_value_blob() usage In-Reply-To: <1614004633.85.0.0676920983033.issue43296@roundup.psfhosted.org> Message-ID: <1614338540.57.0.185180748159.issue43296@roundup.psfhosted.org> Erlend Egeberg Aasland added the comment: > If sqlite3_value_blob() returns NULL, we should check if sqlite3_errcode() equals SQLITE_NOMEM and raise MemoryError if it does. This also applies to sqlite3_value_text(). It also applies to sqlite3_value_bytes() if a conversion takes place. We don't need to care about that as long as we call sqlite3_value_bytes() after conversion. Also, PyTuple_SetItem() errors are not checked. I would also suggest using PyUnicode_FromStringAndSize() iso. PyUnicode_FromString() in case SQLITE_TEXT, to avoid the unneeded strlen(). After sqlite3_value_text() is called, we can just use sqlite3_value_bytes(), since the length is precomputed as a result of the conversion. Berker, would you allow a PR to improve all these issues in _pysqlite_build_py_params(), or would you prefer them split up in multiple PR's? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 06:25:49 2021 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 26 Feb 2021 11:25:49 +0000 Subject: [issue43326] About Zipfile In-Reply-To: <1614310020.48.0.485375340056.issue43326@roundup.psfhosted.org> Message-ID: <1614338749.79.0.201937204033.issue43326@roundup.psfhosted.org> Eric V. Smith added the comment: I don't think there's a problem with Python here. The complaint seems to be one or more of: - The creating software allowed a newline to be in the filename. - Windows allows the creation of filenames with newlines. - The Windows UI doesn't handle filenames with newlines well. In any event, Python can't do anything about these problems. I suggest we close this issue. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 06:37:42 2021 From: report at bugs.python.org (Ivan Marton) Date: Fri, 26 Feb 2021 11:37:42 +0000 Subject: [issue40469] TimedRotatingFileHandler rotating on use not time In-Reply-To: <1588345322.69.0.523914781015.issue40469@roundup.psfhosted.org> Message-ID: <1614339462.62.0.303083809272.issue40469@roundup.psfhosted.org> Change by Ivan Marton : ---------- keywords: +patch nosy: +martonivan nosy_count: 1.0 -> 2.0 pull_requests: +23445 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24660 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 07:05:12 2021 From: report at bugs.python.org (=?utf-8?q?Pawe=C5=82_Miech?=) Date: Fri, 26 Feb 2021 12:05:12 +0000 Subject: [issue17343] Add a version of str.split which returns an iterator In-Reply-To: <1362359066.58.0.311917237277.issue17343@psf.upfronthosting.co.za> Message-ID: <1614341112.29.0.0138622697197.issue17343@roundup.psfhosted.org> Pawe? Miech added the comment: Making string.split iterator sounds like an interesting task. I found this issue because recently we talked in project that string.split returns a list and it can cause increased memory usage footprint for some tasks when there is large response to parse. Here is small script, created by my friend Juancarlo Anez, with iterator version of string.split. Compared with default string split it uses much less memory. When running with memory-profiler tool: https://pypi.org/project/memory-profiler/ It creates this output 3299999 Filename: main.py Line # Mem usage Increment Occurences Line Contents ============================================================ 24 39.020 MiB 39.020 MiB 1 @profile 25 def generate_string(): 26 39.020 MiB 0.000 MiB 1 n = 100000 27 49.648 MiB 4.281 MiB 100003 long_string = " ".join([uuid.uuid4().hex.upper() for _ in range(n)]) 28 43.301 MiB -6.348 MiB 1 print(len(long_string)) 29 30 43.301 MiB 0.000 MiB 1 z = isplit(long_string) 31 43.301 MiB 0.000 MiB 100001 for line in z: 32 43.301 MiB 0.000 MiB 100000 continue 33 34 52.281 MiB 0.297 MiB 100001 for line in long_string.split(): 35 52.281 MiB 0.000 MiB 100000 continue You can see that default string.split uses much more memory. ---------- nosy: +Pawe? Miech Added file: https://bugs.python.org/file49837/main.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 07:18:00 2021 From: report at bugs.python.org (Inada Naoki) Date: Fri, 26 Feb 2021 12:18:00 +0000 Subject: [issue43317] python -m gzip could use a larger buffer In-Reply-To: <1614179160.12.0.374051475595.issue43317@roundup.psfhosted.org> Message-ID: <1614341880.2.0.807025473621.issue43317@roundup.psfhosted.org> Inada Naoki added the comment: New changeset 7956ef884965ac6f9f7f2a27b835ea80e471c886 by Ruben Vorderman in branch 'master': bpo-43317: Use io.DEFAULT_BUFFER_SIZE instead of 1024 in gzip CLI (#24645) https://github.com/python/cpython/commit/7956ef884965ac6f9f7f2a27b835ea80e471c886 ---------- nosy: +methane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 07:18:14 2021 From: report at bugs.python.org (Inada Naoki) Date: Fri, 26 Feb 2021 12:18:14 +0000 Subject: [issue43317] python -m gzip could use a larger buffer In-Reply-To: <1614179160.12.0.374051475595.issue43317@roundup.psfhosted.org> Message-ID: <1614341894.14.0.744105448777.issue43317@roundup.psfhosted.org> Change by Inada Naoki : ---------- nosy: -methane resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 07:27:17 2021 From: report at bugs.python.org (Alexei S) Date: Fri, 26 Feb 2021 12:27:17 +0000 Subject: [issue43328] make test errors Message-ID: <1614342437.38.0.34857180933.issue43328@roundup.psfhosted.org> New submission from Alexei S : this commands are successful: CXX=/usr/bin/g++ ./configure --enable-optimizations >> log_configure.log make -j4 >> log_make.log errors on make test: make -j4 test >> log_make_test.log my system: uname -a Linux home 5.8.0-43-generic #49~20.04.1-Ubuntu SMP Fri Feb 5 09:57:56 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux Linux Mint 20.1 x64 Cinnamon ---------- files: PythonCompileLogs.tar.gz messages: 387723 nosy: asholomitskiy84 priority: normal severity: normal status: open title: make test errors type: compile error versions: Python 3.9 Added file: https://bugs.python.org/file49838/PythonCompileLogs.tar.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 08:06:03 2021 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 26 Feb 2021 13:06:03 +0000 Subject: [issue43060] Convert _decimal C API from pointer array to struct In-Reply-To: <1611913613.83.0.451385849535.issue43060@roundup.psfhosted.org> Message-ID: <1614344763.38.0.437704887741.issue43060@roundup.psfhosted.org> Change by Mark Dickinson : ---------- nosy: -mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 08:30:28 2021 From: report at bugs.python.org (Szymon) Date: Fri, 26 Feb 2021 13:30:28 +0000 Subject: [issue43315] Decimal.__str__ has no way to force exact decimal representation In-Reply-To: <1614164388.53.0.057673280167.issue43315@roundup.psfhosted.org> Message-ID: <1614346228.98.0.497110278018.issue43315@roundup.psfhosted.org> Szymon added the comment: One more thing: It's worth mentioning that by default, you'll get only 28 significant digits of precision, so doing f"{Decimal('1234567890123456789012.12345678').normalize():f}" will produce '1234567890123456789012.123457' (two last digits got rounded). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 09:30:29 2021 From: report at bugs.python.org (Berker Peksag) Date: Fri, 26 Feb 2021 14:30:29 +0000 Subject: [issue43294] [sqlite3] unused variables in Connection begin, commit, and rollback In-Reply-To: <1613988407.68.0.840775188908.issue43294@roundup.psfhosted.org> Message-ID: <1614349829.53.0.744759313776.issue43294@roundup.psfhosted.org> Berker Peksag added the comment: New changeset 5e48e836883ac577acd69c7b9bdfe5c439cef47f by Erlend Egeberg Aasland in branch 'master': bpo-43294: Remove unused variables in pysqlite_connection_*() (GH-24658) https://github.com/python/cpython/commit/5e48e836883ac577acd69c7b9bdfe5c439cef47f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 09:30:54 2021 From: report at bugs.python.org (Berker Peksag) Date: Fri, 26 Feb 2021 14:30:54 +0000 Subject: [issue43294] [sqlite3] unused variables in Connection begin, commit, and rollback In-Reply-To: <1613988407.68.0.840775188908.issue43294@roundup.psfhosted.org> Message-ID: <1614349854.21.0.510629281154.issue43294@roundup.psfhosted.org> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 09:31:42 2021 From: report at bugs.python.org (Michael L. Boom) Date: Fri, 26 Feb 2021 14:31:42 +0000 Subject: [issue43329] Multiprocessing Manager Client Not Reconnecting Message-ID: <1614349902.25.0.128405443976.issue43329@roundup.psfhosted.org> New submission from Michael L. Boom : The client doesn't reconnect automatically, or explicitly. I just get BrokenPipeError over and over. Manager: import multiprocessing.managers, os, sys, time class TestClass(object): def test_method(self): print("In test_method") return "TEST" class TestManager(multiprocessing.managers.BaseManager): pass address = ("127.0.0.1", 54321) TestManager.register("Test", TestClass) manager = TestManager(address = address, authkey = "1234".encode("utf-8")) manager.get_server().serve_forever() Client: import multiprocessing.managers, os, sys, time class TestManager(multiprocessing.managers.BaseManager): pass address = ("127.0.0.1", 54321) TestManager.register("Test") manager = TestManager(address = address, authkey = "1234".encode("utf-8")) manager.connect() test_class = manager.Test() def call_it(): time.sleep(1) result = test_class.test_method() print("result: '" + str(type(result)) + ", " + str(result) + "'") call_it() print("Kill and restart the server and press return") sys.stdin.readline() error = False while (True): try: if (error): print("Reconnecting") manager.connect() test_class = manager.Test() call_it() error = False except Exception as e: print("Got exception " + str(type(e)) + ", " + repr(e)) error = True time.sleep(1) ---------- components: Library (Lib) messages: 387726 nosy: boom0192 priority: normal severity: normal status: open title: Multiprocessing Manager Client Not Reconnecting type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 09:40:56 2021 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 26 Feb 2021 14:40:56 +0000 Subject: [issue43315] Decimal.__str__ has no way to force exact decimal representation In-Reply-To: <1614164388.53.0.057673280167.issue43315@roundup.psfhosted.org> Message-ID: <1614350456.21.0.630561320024.issue43315@roundup.psfhosted.org> Mark Dickinson added the comment: Sure, but that has nothing to do with string representations or formatting, so I don't see how it's relevant for this issue: the rounding happens when you call `normalize`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 10:28:56 2021 From: report at bugs.python.org (=?utf-8?q?Juancarlo_A=C3=B1ez?=) Date: Fri, 26 Feb 2021 15:28:56 +0000 Subject: [issue17343] Add a version of str.split which returns an iterator In-Reply-To: <1362359066.58.0.311917237277.issue17343@psf.upfronthosting.co.za> Message-ID: <1614353336.21.0.57142441782.issue17343@roundup.psfhosted.org> Juancarlo A?ez added the comment: def isplit(text, sep=None, maxsplit=-1): """ A lowmemory-footprint version of: iter(text.split(sep, maxsplit)) Adapted from https://stackoverflow.com/a/9770397 """ if maxsplit == 0: yield text else: rsep = re.escape(sep) if sep else r'\s+' regex = fr'(?:^|{rsep})((?:(?!{rsep}).)*)' for n, p in enumerate(re.finditer(regex, text)): if 0 <= maxsplit <= n: yield p.string[p.start(1):] return yield p.group(1) ---------- nosy: +apalala _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 11:04:01 2021 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 26 Feb 2021 16:04:01 +0000 Subject: [issue13559] Use sendfile where possible in httplib In-Reply-To: <1323377245.96.0.509517020675.issue13559@psf.upfronthosting.co.za> Message-ID: <1614355441.68.0.588745754748.issue13559@roundup.psfhosted.org> Senthil Kumaran added the comment: Alex, https://bugs.python.org/issue23740 is identified as a dependency on this issue. We will have to resolve that first, and come back to this. And yes, if you contribute on other's patch, both the contributions will be included and appropriately credited. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 11:57:18 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 26 Feb 2021 16:57:18 +0000 Subject: [issue23425] Windows getlocale unix-like with french, german, portuguese, spanish In-Reply-To: <1423515310.7.0.637877209066.issue23425@psf.upfronthosting.co.za> Message-ID: <1614358638.29.0.261456413589.issue23425@roundup.psfhosted.org> Change by Eryk Sun : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware versions: +Python 3.10, Python 3.9 -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 11:59:12 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 26 Feb 2021 16:59:12 +0000 Subject: [issue23425] Windows getlocale unix-like with french, german, portuguese, spanish In-Reply-To: <1423515310.7.0.637877209066.issue23425@psf.upfronthosting.co.za> Message-ID: <1614358752.73.0.390194331507.issue23425@roundup.psfhosted.org> Change by Eryk Sun : ---------- versions: +Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 12:01:10 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 26 Feb 2021 17:01:10 +0000 Subject: [issue24747] ctypes silently truncates ints larger than C int In-Reply-To: <1438171886.06.0.632497745661.issue24747@psf.upfronthosting.co.za> Message-ID: <1614358870.07.0.15262818097.issue24747@roundup.psfhosted.org> Change by Eryk Sun : ---------- type: -> behavior versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 12:02:19 2021 From: report at bugs.python.org (Julien Castiaux) Date: Fri, 26 Feb 2021 17:02:19 +0000 Subject: [issue43330] xmlrpc.Server URI query and fragment are discarded from HTTP query since py3 Message-ID: <1614358939.96.0.184711772416.issue43330@roundup.psfhosted.org> New submission from Julien Castiaux : Hello, There is a backward incompatibility between xmlrpc.client and xmlrpclib in server classes about how the URI is parsed and used to connect to the remote server. While py2's xmlrpclib use the path, query and fragment parts of the URI request the server, py3's xmlrpc.client solely uses the path and discard both the query and the fragment parts. In the ProxyServer init method, py2 xmlrpclib does the following to extract the URI: def __init__(self, uri, transport=None, encoding=None, verbose=0, allow_none=0, use_datetime=0, context=None): import urllib type, uri = urllib.splittype(uri) self.__host, self.__handler = urllib.splithost(uri) if not self.__handler: self.__handler = "/RPC2" While in ProxyServer init method, py3 xmlrpc.client does the following: def __init__(self, uri, transport=None, encoding=None, verbose=False, allow_none=False, use_datetime=False, use_builtin_types=False, *, headers=(), context=None): p = urllib.parse.urlparse(uri) self.__host = p.netloc self.__handler = p.path or "/RPC2" A Pull Request is coming shortly ---------- components: Library (Lib) messages: 387730 nosy: Julien Castiaux priority: normal severity: normal status: open title: xmlrpc.Server URI query and fragment are discarded from HTTP query since py3 type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 12:16:10 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 26 Feb 2021 17:16:10 +0000 Subject: [issue20503] super behaviour and abstract base classes (either implementation or documentation/error message is wrong) In-Reply-To: <1391441802.61.0.557224247712.issue20503@psf.upfronthosting.co.za> Message-ID: <1614359770.18.0.17533606281.issue20503@roundup.psfhosted.org> Eryk Sun added the comment: The docs still need to clarified that isinstance(obj, type) is a necessary but not sufficient condition for success. It would also be helpful if the error message were less confusing in the case of registered subclasses such as numbers.Number. ---------- type: -> enhancement versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 12:25:06 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 26 Feb 2021 17:25:06 +0000 Subject: [issue26158] File truncate() not defaulting to current position as documented In-Reply-To: <1453216784.99.0.234942868429.issue26158@psf.upfronthosting.co.za> Message-ID: <1614360306.8.0.382677397059.issue26158@roundup.psfhosted.org> Change by Eryk Sun : ---------- type: -> behavior versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 12:28:24 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 26 Feb 2021 17:28:24 +0000 Subject: [issue11361] suggestion for os.kill(pid,CTRL_C_EVENT) in tests In-Reply-To: <1298986221.06.0.20392871991.issue11361@psf.upfronthosting.co.za> Message-ID: <1614360504.55.0.885220265706.issue11361@roundup.psfhosted.org> Change by Eryk Sun : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 12:29:48 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 26 Feb 2021 17:29:48 +0000 Subject: [issue20010] time.strftime('%z') didn't make +HHMM return in windows xp In-Reply-To: <1387319931.23.0.412917689607.issue20010@psf.upfronthosting.co.za> Message-ID: <1614360588.26.0.164681191618.issue20010@roundup.psfhosted.org> Change by Eryk Sun : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 12:33:21 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 26 Feb 2021 17:33:21 +0000 Subject: [issue26565] [ctypes] Add value attribute to non basic pointers. In-Reply-To: <1458007329.36.0.71536825947.issue26565@psf.upfronthosting.co.za> Message-ID: <1614360801.21.0.123965738114.issue26565@roundup.psfhosted.org> Change by Eryk Sun : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 12:36:04 2021 From: report at bugs.python.org (El Samuko) Date: Fri, 26 Feb 2021 17:36:04 +0000 Subject: [issue42962] Windows: SystemError during os.kill(..., signal.CTRL_C_EVENT) In-Reply-To: <1611007954.59.0.488720921329.issue42962@roundup.psfhosted.org> Message-ID: <1614360964.71.0.0844140879081.issue42962@roundup.psfhosted.org> El Samuko added the comment: FWIW, I could send CTRL-C to ffmpeg (else it won't write a valid mp4 header) under Windows by using the WINPID and not the PID returned from ps . ``` WINPID=$(ps aux | grep ffmpeg | awk '{print $4}') python -c "import os, signal; os.kill($WINPID, signal.CTRL_C_EVENT)" ``` I put an example here: https://gist.github.com/elsamuko/9c3fe69f00a0f847251ffa3ef1d080a2 ---------- nosy: +elsamuko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 12:37:30 2021 From: report at bugs.python.org (meanboy Sarikavanich) Date: Fri, 26 Feb 2021 17:37:30 +0000 Subject: [issue20503] super behaviour and abstract base classes (either implementation or documentation/error message is wrong) In-Reply-To: <1391441802.61.0.557224247712.issue20503@psf.upfronthosting.co.za> Message-ID: <1614361050.38.0.972956903811.issue20503@roundup.psfhosted.org> Change by meanboy Sarikavanich : ---------- components: +Argument Clinic nosy: +larry type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 12:51:17 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 26 Feb 2021 17:51:17 +0000 Subject: [issue27263] Tkinter sets the HOME environment variable, breaking scripts In-Reply-To: <1465352687.77.0.957460905896.issue27263@psf.upfronthosting.co.za> Message-ID: <1614361877.56.0.327020649405.issue27263@roundup.psfhosted.org> Eryk Sun added the comment: ntpath.expanduser() no longer uses HOME (though the doc string still refers to $HOME), so at least that problem is resolved. I suppose IDLE could work around the HOME issue in Windows by passing env=os.environ.copy() in the subprocess.Popen() call that creates the subprocess. os.environ will not contain the HOME value that TCL sets in the underlying process environment. ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 13:04:55 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 26 Feb 2021 18:04:55 +0000 Subject: [issue42962] Windows: SystemError during os.kill(..., signal.CTRL_C_EVENT) In-Reply-To: <1611007954.59.0.488720921329.issue42962@roundup.psfhosted.org> Message-ID: <1614362695.44.0.704949330225.issue42962@roundup.psfhosted.org> Eryk Sun added the comment: El Samuko, is that a Windows (Win32), Cygwin, MSYS2, WSL, or some other version of bash? The same for Python, and which version of Python is it. With these details, I can tell you what `os.kill($WINPID, signal.CTRL_C_EVENT)"` is probably doing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 13:05:18 2021 From: report at bugs.python.org (Matej Cepl) Date: Fri, 26 Feb 2021 18:05:18 +0000 Subject: [issue42967] [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1614362718.34.0.519054026595.issue42967@roundup.psfhosted.org> Matej Cepl added the comment: Port of the patch to 2.7.18. ---------- Added file: https://bugs.python.org/file49839/CVE-2021-23336-only-amp-as-query-sep.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 13:08:26 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 26 Feb 2021 18:08:26 +0000 Subject: [issue27496] unicodedata.name() doesn't have names for control characters In-Reply-To: <1468329049.33.0.201400438769.issue27496@psf.upfronthosting.co.za> Message-ID: <1614362906.56.0.464223514202.issue27496@roundup.psfhosted.org> Change by Eryk Sun : ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 14:07:45 2021 From: report at bugs.python.org (Alix Lourme) Date: Fri, 26 Feb 2021 19:07:45 +0000 Subject: [issue43331] [Doc][urllib.request] Explicit the fact that header keys are sent in Camel case Message-ID: <1614366465.63.0.480408878251.issue43331@roundup.psfhosted.org> New submission from Alix Lourme : Currently, the Request (https://docs.python.org/3/library/urllib.request.html#urllib.request.Request) send header keys in Camel case. This is a choice strategy (no problem with that) and even if headers should be considered insensitively (RFC 7230 - 3.2. Header Fields: https://tools.ietf.org/html/rfc7230#section-3.2), this is not always the case. The fact that header keys are "rewritten" (in Camel case) could occurs complexity in troubleshooting (for sample: https://github.com/probot/adapter-aws-lambda-serverless/issues/62). Having a note/mention about that in documentation would be nice. PR will come. ---------- assignee: docs at python components: Documentation messages: 387736 nosy: axel3rd, docs at python priority: normal severity: normal status: open title: [Doc][urllib.request] Explicit the fact that header keys are sent in Camel case type: behavior versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 14:10:57 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 26 Feb 2021 19:10:57 +0000 Subject: [issue27612] socket.gethostbyname resolving octal IP addresses incorrectly In-Reply-To: <1469428074.1.0.701366093272.issue27612@psf.upfronthosting.co.za> Message-ID: <1614366657.17.0.598539220619.issue27612@roundup.psfhosted.org> Eryk Sun added the comment: Update from my previous comment in 2016: in Python 3.7+, the socket module's setipaddr() function calls Winsock inet_pton() instead of inet_addr(), and falls back on getaddrinfo(). Neither supports octal addresses. At least using octal fails instead of mistakenly parsing as decimal. ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.3, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 14:14:45 2021 From: report at bugs.python.org (Alix Lourme) Date: Fri, 26 Feb 2021 19:14:45 +0000 Subject: [issue43331] [Doc][urllib.request] Explicit the fact that header keys are sent in Camel case In-Reply-To: <1614366465.63.0.480408878251.issue43331@roundup.psfhosted.org> Message-ID: <1614366885.58.0.380097393847.issue43331@roundup.psfhosted.org> Change by Alix Lourme : ---------- keywords: +patch pull_requests: +23446 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24661 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 14:30:31 2021 From: report at bugs.python.org (El Samuko) Date: Fri, 26 Feb 2021 19:30:31 +0000 Subject: [issue42962] Windows: SystemError during os.kill(..., signal.CTRL_C_EVENT) In-Reply-To: <1611007954.59.0.488720921329.issue42962@roundup.psfhosted.org> Message-ID: <1614367831.9.0.45108893676.issue42962@roundup.psfhosted.org> El Samuko added the comment: @eryksun I can run the script successfully under cygwin and mingw(git bash). The python version is 3.9.2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 14:32:10 2021 From: report at bugs.python.org (El Samuko) Date: Fri, 26 Feb 2021 19:32:10 +0000 Subject: [issue42962] Windows: SystemError during os.kill(..., signal.CTRL_C_EVENT) In-Reply-To: <1611007954.59.0.488720921329.issue42962@roundup.psfhosted.org> Message-ID: <1614367930.34.0.364241667467.issue42962@roundup.psfhosted.org> El Samuko added the comment: I'm getting [WinError 87], too, when using the PID. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 14:37:05 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 26 Feb 2021 19:37:05 +0000 Subject: [issue24045] Behavior of large returncodes (sys.exit(nn)) In-Reply-To: <1429836429.07.0.888331603842.issue24045@psf.upfronthosting.co.za> Message-ID: <1614368225.47.0.915107209673.issue24045@roundup.psfhosted.org> Eryk Sun added the comment: It's still the case in 3.10 that unsigned status codes are limited to 0x7FFF_FFFF, and any larger value gets mapped to -1 (0xFFFF_FFFF). For example: >>> rc = subprocess.call([sys.executable, '-c', 'raise SystemExit(0x7FFF_FFFF)']) >>> hex(rc) '0x7fffffff' >>> rc = subprocess.call([sys.executable, '-c', 'raise SystemExit(0x8000_0000)']) >>> hex(rc) '0xffffffff' >>> rc = subprocess.call([sys.executable, '-c', 'raise SystemExit(0xC000_0005)']) >>> hex(rc) '0xffffffff' WinAPI ExitProcess() and GetExitCodeProcess() use unsigned values. The latter is called by subprocess.Popen.wait(). In practice, this return code, which may be larger than 0x7FFF_FFFF, might get passed to SystemExit() or os._exit(). ---------- type: -> behavior versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 14:51:54 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 26 Feb 2021 19:51:54 +0000 Subject: [issue28462] subprocess pipe can't see EOF from a child in case of a few children run with subprocess In-Reply-To: <1476718684.05.0.447400261666.issue28462@psf.upfronthosting.co.za> Message-ID: <1614369114.96.0.478051720544.issue28462@roundup.psfhosted.org> Change by Eryk Sun : ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 14:58:49 2021 From: report at bugs.python.org (Brett Cannon) Date: Fri, 26 Feb 2021 19:58:49 +0000 Subject: [issue38302] [3.10] __pow__ and __rpow__ are not reached when __ipow__ returns NotImplemented for **= In-Reply-To: <1569621315.69.0.377751123288.issue38302@roundup.psfhosted.org> Message-ID: <1614369529.21.0.772969630551.issue38302@roundup.psfhosted.org> Brett Cannon added the comment: New changeset cc02b4f2e810ab524d845daa18bc94df5b092dd8 by Alex in branch 'master': bpo-38302: __pow__/__rpow__ now called when __ipow__ returns NotImplemented (#16459) https://github.com/python/cpython/commit/cc02b4f2e810ab524d845daa18bc94df5b092dd8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 14:59:01 2021 From: report at bugs.python.org (Brett Cannon) Date: Fri, 26 Feb 2021 19:59:01 +0000 Subject: [issue38302] [3.10] __pow__ and __rpow__ are not reached when __ipow__ returns NotImplemented for **= In-Reply-To: <1569621315.69.0.377751123288.issue38302@roundup.psfhosted.org> Message-ID: <1614369541.21.0.218789712293.issue38302@roundup.psfhosted.org> Change by Brett Cannon : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 15:18:00 2021 From: report at bugs.python.org (Zveinn) Date: Fri, 26 Feb 2021 20:18:00 +0000 Subject: [issue43332] def _tunnel(self): - uses multiple network writes, possibly causing unnecessary implementation complexity on the receiving end Message-ID: <1614370680.1.0.103129903648.issue43332@roundup.psfhosted.org> New submission from Zveinn : Hey, some time ago I ran into some code in the cpython code I thought might be possible to improve it a little bit. https://github.com/python/cpython/blob/master/Lib/http/client.py#L903 This code specifically. Notice how the self.send() method is used multiple time to construct the CONNECT request. When the network load is high, these different parts actually get split into separate network frames. This causes additional meta data to be sent, effectively costing more bandwidth and causing the request to be split into multiple network frames. This has some interesting behavior on the receiving end as well. If you send everything as a single network frame, then the receiver can read the entire thing in a single read call. If you send multiple frames, the main reader pipe now needs a temporary buffer to encapsulate the multiple calls. Because of this, sending requests as many network frames actually causes a rise in processing complexity on the receiving end. Here is a github issue I made about this problem some time ago: https://github.com/psf/requests/issues/5384 In this issue you will find detailed information and screenshots. My recommendation would be to construct the query as a whole before using a single self.send() to send the whole payload in one network frame. Even if we ignore the added complexity on the receivers end, the gain in network performance is worth it. ---------- components: C API messages: 387742 nosy: zveinn priority: normal severity: normal status: open title: def _tunnel(self): - uses multiple network writes, possibly causing unnecessary implementation complexity on the receiving end type: performance versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 15:18:51 2021 From: report at bugs.python.org (Zveinn) Date: Fri, 26 Feb 2021 20:18:51 +0000 Subject: [issue43332] def _tunnel(self): - uses multiple network writes, possibly causing excessive network usage and increased implementation complexity on the other end In-Reply-To: <1614370680.1.0.103129903648.issue43332@roundup.psfhosted.org> Message-ID: <1614370731.0.0.972952967083.issue43332@roundup.psfhosted.org> Change by Zveinn : ---------- title: def _tunnel(self): - uses multiple network writes, possibly causing unnecessary implementation complexity on the receiving end -> def _tunnel(self): - uses multiple network writes, possibly causing excessive network usage and increased implementation complexity on the other end _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 15:23:19 2021 From: report at bugs.python.org (Zveinn) Date: Fri, 26 Feb 2021 20:23:19 +0000 Subject: [issue43332] http/client.py: - uses multiple network writes, possibly causing excessive network usage and increased implementation complexity on the other end In-Reply-To: <1614370680.1.0.103129903648.issue43332@roundup.psfhosted.org> Message-ID: <1614370999.21.0.546202152485.issue43332@roundup.psfhosted.org> Change by Zveinn : ---------- title: def _tunnel(self): - uses multiple network writes, possibly causing excessive network usage and increased implementation complexity on the other end -> http/client.py: - uses multiple network writes, possibly causing excessive network usage and increased implementation complexity on the other end _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 15:25:41 2021 From: report at bugs.python.org (Zveinn) Date: Fri, 26 Feb 2021 20:25:41 +0000 Subject: [issue43332] http/client.py: - uses multiple network writes, possibly causing excessive network usage and increased implementation complexity on the other end In-Reply-To: <1614370680.1.0.103129903648.issue43332@roundup.psfhosted.org> Message-ID: <1614371141.05.0.36573203969.issue43332@roundup.psfhosted.org> Zveinn added the comment: P.s. Sorry for the formatting of the previous message, I?m new :S ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 15:32:21 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 26 Feb 2021 20:32:21 +0000 Subject: [issue28474] WinError(): Python int too large to convert to C long In-Reply-To: <1476862081.01.0.00079290874453.issue28474@psf.upfronthosting.co.za> Message-ID: <1614371541.98.0.460428407272.issue28474@roundup.psfhosted.org> Eryk Sun added the comment: format_error() can use format "L" (long long) and then check for a value in the accepted range `value >= LONG_MIN && value <= ULONG_MAX`. If the value is out of range, raise OverflowError. Otherwise assign the value to DWORD `code`. ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 15:38:30 2021 From: report at bugs.python.org (Zveinn) Date: Fri, 26 Feb 2021 20:38:30 +0000 Subject: [issue43332] http/client.py: - uses multiple network writes, possibly causing excessive network usage and increased implementation complexity on the other end In-Reply-To: <1614370680.1.0.103129903648.issue43332@roundup.psfhosted.org> Message-ID: <1614371910.37.0.961874820267.issue43332@roundup.psfhosted.org> Zveinn added the comment: def _tunnel(self): connect_str = "CONNECT %s:%d HTTP/1.0\r\n" % (self._tunnel_host, self._tunnel_port) connect_bytes = connect_str.encode("ascii") < _______________________________________ From report at bugs.python.org Fri Feb 26 15:45:06 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 26 Feb 2021 20:45:06 +0000 Subject: [issue29045] Outdated C api doc about Windows error In-Reply-To: <1482386780.7.0.302567843382.issue29045@psf.upfronthosting.co.za> Message-ID: <1614372306.65.0.54031738988.issue29045@roundup.psfhosted.org> Eryk Sun added the comment: The documentation still has two references to PyErr_SetFromWindowsErrWithFilenameObject, which is not a defined function in the C API. https://docs.python.org/3.10/c-api/exceptions.html#c.PyErr_SetFromWindowsErrWithFilename ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware type: -> enhancement versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 15:45:35 2021 From: report at bugs.python.org (Zveinn) Date: Fri, 26 Feb 2021 20:45:35 +0000 Subject: [issue43332] http/client.py: - uses multiple network writes, possibly causing excessive network usage and increased implementation complexity on the other end In-Reply-To: <1614370680.1.0.103129903648.issue43332@roundup.psfhosted.org> Message-ID: <1614372335.34.0.0066679575032.issue43332@roundup.psfhosted.org> Zveinn added the comment: also found this: https://dynatrace.github.io/OneAgent-SDK-for-Python/docs/encoding.html It might be relevant ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 16:17:25 2021 From: report at bugs.python.org (Eryk Sun) Date: Fri, 26 Feb 2021 21:17:25 +0000 Subject: [issue29829] Documentation lacks clear warning of subprocess issue with pythonw In-Reply-To: <1489683501.47.0.952186876903.issue29829@psf.upfronthosting.co.za> Message-ID: <1614374245.09.0.610173472852.issue29829@roundup.psfhosted.org> Eryk Sun added the comment: This problem can be addressed most easily in _get_handles() by combining the case of an invalid standard handle with that of a NULL standard handle, for which a file handle is validated via GetFileType(). However, that leaves a small window for the handle to become invalid before duplicating it. Instead, _get_handles() could deal with a failed _make_inheritable() call by substituting a pipe handle. ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 16:49:21 2021 From: report at bugs.python.org (jakirkham) Date: Fri, 26 Feb 2021 21:49:21 +0000 Subject: [issue40007] An attempt to make asyncio.transport.writelines (selector) use Scatter I/O In-Reply-To: <1584565201.4.0.349669786045.issue40007@roundup.psfhosted.org> Message-ID: <1614376161.23.0.834889213149.issue40007@roundup.psfhosted.org> Change by jakirkham : ---------- nosy: +jakirkham _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 16:49:49 2021 From: report at bugs.python.org (jakirkham) Date: Fri, 26 Feb 2021 21:49:49 +0000 Subject: [issue27149] Implement socket.sendmsg() for Windows In-Reply-To: <1464501034.91.0.597053336572.issue27149@psf.upfronthosting.co.za> Message-ID: <1614376189.25.0.324263482154.issue27149@roundup.psfhosted.org> Change by jakirkham : ---------- nosy: +jakirkham _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 16:50:13 2021 From: report at bugs.python.org (Darcy Beurle) Date: Fri, 26 Feb 2021 21:50:13 +0000 Subject: [issue43333] utf8 in BytesGenerator Message-ID: <1614376213.69.0.504043333554.issue43333@roundup.psfhosted.org> New submission from Darcy Beurle : I have some emails that I'm importing from an XML format according to rfc822. Some of these have some encoding other than ascii. I create the message with the default policy: message = email.message_from_string( # Extract text from xml message_name.find("property_string").text, policy=email.policy.default) Then I want to convert this to bytes so I can append it to an IMAP folder using the imap_tools package: mailbox.append(email.as_bytes(), "INBOX", dt=None, flag_set=(imap_tools.MailMessageFlags.SEEN)) Which then leads to the following output: line 405, in parse_goldmine_output email.as_bytes(), File "/usr/lib64/python3.9/email/message.py", line 178, in as_bytes g.flatten(self, unixfrom=unixfrom) File "/usr/lib64/python3.9/email/generator.py", line 116, in flatten self._write(msg) File "/usr/lib64/python3.9/email/generator.py", line 181, in _write self._dispatch(msg) File "/usr/lib64/python3.9/email/generator.py", line 218, in _dispatch meth(msg) File "/usr/lib64/python3.9/email/generator.py", line 276, in _handle_multipart g.flatten(part, unixfrom=False, linesep=self._NL) File "/usr/lib64/python3.9/email/generator.py", line 116, in flatten self._write(msg) File "/usr/lib64/python3.9/email/generator.py", line 181, in _write self._dispatch(msg) File "/usr/lib64/python3.9/email/generator.py", line 218, in _dispatch meth(msg) File "/usr/lib64/python3.9/email/generator.py", line 436, in _handle_text super(BytesGenerator,self)._handle_text(msg) File "/usr/lib64/python3.9/email/generator.py", line 253, in _handle_text self._write_lines(payload) File "/usr/lib64/python3.9/email/generator.py", line 155, in _write_lines self.write(line) File "/usr/lib64/python3.9/email/generator.py", line 410, in write self._fp.write(s.encode('ascii', 'surrogateescape')) UnicodeEncodeError: 'ascii' codec can't encode characters in position 41-43: ordinal not in range(128) If I change the line: self._fp.write(s.encode('ascii', 'surrogateescape')) to: self._fp.write(s.encode('utf8', 'surrogateescape')) then it writes the email body with the strange characters (same as in the xml). I'm not sure how to proceed. Those emails should be able to be processed, but the bytes writer doesn't seem to inherit the utf8 encoding from anywhere (e.g. if a utf8 policy is used). ---------- components: email messages: 387749 nosy: barry, darcy.beurle, r.david.murray priority: normal severity: normal status: open title: utf8 in BytesGenerator type: crash versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 17:27:08 2021 From: report at bugs.python.org (Alexei S) Date: Fri, 26 Feb 2021 22:27:08 +0000 Subject: [issue43328] make test errors In-Reply-To: <1614342437.38.0.34857180933.issue43328@roundup.psfhosted.org> Message-ID: <1614378428.01.0.202515886854.issue43328@roundup.psfhosted.org> Alexei S added the comment: == Tests result: FAILURE == 403 tests OK. 3 tests failed: test_embed test_ssl test_tabnanny ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 17:37:45 2021 From: report at bugs.python.org (Alex Willmer) Date: Fri, 26 Feb 2021 22:37:45 +0000 Subject: [issue13559] Use sendfile where possible in httplib In-Reply-To: <1323377245.96.0.509517020675.issue13559@psf.upfronthosting.co.za> Message-ID: <1614379065.3.0.957056994376.issue13559@roundup.psfhosted.org> Alex Willmer added the comment: To check my understanding Is the motivation for the closer to 1. using sendfile() will break $X, and we know X 2. there's high probability sendfile() will break something 3. there's unknown probability sendfile() will break something 4. there's low probability sendfile() will break something, but it is still too high 5. any non-trivial change here is too risky, regardless of sendfile() 6. something else? My guess is 5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 17:40:16 2021 From: report at bugs.python.org (Anup Parikh) Date: Fri, 26 Feb 2021 22:40:16 +0000 Subject: [issue43334] venv does not install libpython Message-ID: <1614379216.7.0.137032053148.issue43334@roundup.psfhosted.org> New submission from Anup Parikh : The libpython.a or libpython.so objects are not copied/linked in new virtual environments when created with venv. ---------- components: C API, Installation, Library (Lib) messages: 387752 nosy: anuppari priority: normal severity: normal status: open title: venv does not install libpython type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 17:52:02 2021 From: report at bugs.python.org (Brandt Bucher) Date: Fri, 26 Feb 2021 22:52:02 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1614379922.54.0.155414846445.issue42128@roundup.psfhosted.org> Brandt Bucher added the comment: New changeset 145bf269df3530176f6ebeab1324890ef7070bf8 by Brandt Bucher in branch 'master': bpo-42128: Structural Pattern Matching (PEP 634) (GH-22917) https://github.com/python/cpython/commit/145bf269df3530176f6ebeab1324890ef7070bf8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 18:27:53 2021 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 26 Feb 2021 23:27:53 +0000 Subject: [issue13559] Use sendfile where possible in httplib In-Reply-To: <1323377245.96.0.509517020675.issue13559@psf.upfronthosting.co.za> Message-ID: <1614382073.89.0.924273050429.issue13559@roundup.psfhosted.org> Senthil Kumaran added the comment: Yes, the point number 5. We will have to evaluate if sendfile side-steps and avoids the issues noted in issue23740 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 18:28:21 2021 From: report at bugs.python.org (DANIEL VILLENEUVE) Date: Fri, 26 Feb 2021 23:28:21 +0000 Subject: [issue43335] _ctypes/callbacks.c cannot be compiled by gcc 4.4.7 (RHEL6) Message-ID: <1614382101.65.0.823517794704.issue43335@roundup.psfhosted.org> New submission from DANIEL VILLENEUVE : gcc 4.4.7 does not accept #pragma's inside functions. I made the following patch, inspired by code found in other Python source files. diff -r U/Python-3.9.2/Modules/_ctypes/callbacks.c V/Python-3.9.2/Modules/_ctypes/callbacks.c 433c433 < #if defined(__GNUC__) --- > #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) 442c442 < #if defined(__GNUC__) --- > #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) Regards ---------- components: ctypes messages: 387755 nosy: dvilleneuve priority: normal severity: normal status: open title: _ctypes/callbacks.c cannot be compiled by gcc 4.4.7 (RHEL6) type: compile error versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 19:59:33 2021 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 27 Feb 2021 00:59:33 +0000 Subject: [issue42967] [CVE-2021-23336] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator In-Reply-To: <1611068809.96.0.58823274544.issue42967@roundup.psfhosted.org> Message-ID: <1614387573.54.0.604270147273.issue42967@roundup.psfhosted.org> Gregory P. Smith added the comment: An example code snippet to detect if the API supports the new parameter at runtime for code that wants to use to use something other than the default '&'. ``` if 'separator' in inspect.signature(urllib.parse.parse_qs).parameters: ... parse_qs(..., separator=';') else: ... parse_qs(...) ``` calling it with the arg and catching TypeError if that fails would also work, but might not be preferred as catching things like TypeError is non-specific and could hide other problems, making it a code maintenance headache. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 21:05:04 2021 From: report at bugs.python.org (Kubilay Kocak) Date: Sat, 27 Feb 2021 02:05:04 +0000 Subject: [issue43233] test_os: test_copy_file_range_offset fails on FreeBSD CURRENT In-Reply-To: <1613417170.64.0.402539389952.issue43233@roundup.psfhosted.org> Message-ID: <1614391504.54.0.424808125383.issue43233@roundup.psfhosted.org> Kubilay Kocak added the comment: I'll see if I can isolate ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 21:15:37 2021 From: report at bugs.python.org (Christoph Anton Mitterer) Date: Sat, 27 Feb 2021 02:15:37 +0000 Subject: [issue43336] document whether io.TextIOBase.readline(size>0) will always read the full newline Message-ID: <1614392137.45.0.448589201829.issue43336@roundup.psfhosted.org> New submission from Christoph Anton Mitterer : Hey. It would be nice if the following behaviour could be definitely clarified: When reading from a text stream with readline(size) with a n > 0size it says: "If size is specified, at most size characters will be read." Also, depending on the settings of newlines of the stream, \r\n would be converted to \n. It's not definitely clear whether a string like "abc\r\n" read with a size of = 4 will return "abc\n" (which it seems to do, in other words, it reads actually 5 characters, but sill returns only 4), or whether it returns "abc\r". Cheers, Chris. ---------- assignee: docs at python components: Documentation messages: 387758 nosy: calestyo, docs at python priority: normal severity: normal status: open title: document whether io.TextIOBase.readline(size>0) will always read the full newline _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 21:16:17 2021 From: report at bugs.python.org (Christoph Anton Mitterer) Date: Sat, 27 Feb 2021 02:16:17 +0000 Subject: [issue43336] document whether io.TextIOBase.readline(size>0) will always read the full newline In-Reply-To: <1614392137.45.0.448589201829.issue43336@roundup.psfhosted.org> Message-ID: <1614392177.99.0.499640842216.issue43336@roundup.psfhosted.org> Christoph Anton Mitterer added the comment: "a n > 0size" should have read "a size > 0" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 21:21:00 2021 From: report at bugs.python.org (Larry Hastings) Date: Sat, 27 Feb 2021 02:21:00 +0000 Subject: [issue20503] super behaviour and abstract base classes (either implementation or documentation/error message is wrong) In-Reply-To: <1391441802.61.0.557224247712.issue20503@psf.upfronthosting.co.za> Message-ID: <1614392460.97.0.334067541446.issue20503@roundup.psfhosted.org> Change by Larry Hastings : ---------- components: +Interpreter Core -Argument Clinic, Documentation nosy: -larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 21:33:48 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Feb 2021 02:33:48 +0000 Subject: [issue43273] Mock `_mock_wraps` is undocumented and inconsistently named In-Reply-To: <1613810665.37.0.436661907336.issue43273@roundup.psfhosted.org> Message-ID: <1614393228.72.0.430536159868.issue43273@roundup.psfhosted.org> Terry J. Reedy added the comment: Private attributes are not documented because they are private and subject to change. Their use is at one's own risk. I don't know mock well enough to understand 'inconsistent' or comment on the change proposal. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 21:36:30 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Feb 2021 02:36:30 +0000 Subject: [issue43281] Walrus comprehension rebind checking behavior In-Reply-To: <1613870404.85.0.640514140391.issue43281@roundup.psfhosted.org> Message-ID: <1614393390.83.0.094153969709.issue43281@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 21:41:41 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Feb 2021 02:41:41 +0000 Subject: [issue43289] step bug in turtle's for loop In-Reply-To: <1613942999.52.0.979246620938.issue43289@roundup.psfhosted.org> Message-ID: <1614393701.83.0.319585316966.issue43289@roundup.psfhosted.org> Terry J. Reedy added the comment: Yehuda, one can also ask questions like this on python-list. In the future, when responding by email, please delete the message being responded to, so it does not get repeated when posted to the web page. ---------- nosy: +terry.reedy resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 22:35:41 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Feb 2021 03:35:41 +0000 Subject: [issue43300] "bisect" module should support reverse-sorted sequences In-Reply-To: <1614017554.0.0.495039898854.issue43300@roundup.psfhosted.org> Message-ID: <1614396941.4.0.50292590522.issue43300@roundup.psfhosted.org> Terry J. Reedy added the comment: I think that we should just document the use of the new key parameter (and otherwise do nothing). ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 22:38:03 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Feb 2021 03:38:03 +0000 Subject: [issue43306] Error in multiprocessing.Pool's initializer doesn't stop execution In-Reply-To: <1614095710.79.0.438522017133.issue43306@roundup.psfhosted.org> Message-ID: <1614397083.44.0.271667352182.issue43306@roundup.psfhosted.org> Terry J. Reedy added the comment: Can you add a minimal example with the ignore behavior? ---------- assignee: docs at python -> nosy: +davin, pitrou, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 22:44:43 2021 From: report at bugs.python.org (Ma Lin) Date: Sat, 27 Feb 2021 03:44:43 +0000 Subject: [issue43305] A typo in /Modules/_io/bufferedio.c In-Reply-To: <1614089158.05.0.547226223268.issue43305@roundup.psfhosted.org> Message-ID: <1614397483.12.0.767356422813.issue43305@roundup.psfhosted.org> Ma Lin added the comment: I am trying to write a test-case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 22:45:54 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Feb 2021 03:45:54 +0000 Subject: [issue43307] Sync site.py and sysconfig.py with PyPy In-Reply-To: <1614099697.74.0.00793474139311.issue43307@roundup.psfhosted.org> Message-ID: <1614397554.36.0.990566594088.issue43307@roundup.psfhosted.org> Terry J. Reedy added the comment: You marked 3.7 here, which only gets security patches, but submitted a PR for master, which is appropriate for enhancements. ('backport' here on the tracker means apply to older version after patching master.) ---------- nosy: +terry.reedy type: -> enhancement versions: +Python 3.10 -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 22:52:12 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Feb 2021 03:52:12 +0000 Subject: [issue43323] UnicodeEncodeError: surrogates not allowed when parsing invalid charset In-Reply-To: <1614277088.24.0.58040288739.issue43323@roundup.psfhosted.org> Message-ID: <1614397932.49.0.494852393542.issue43323@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 22:52:23 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Feb 2021 03:52:23 +0000 Subject: [issue43323] UnicodeEncodeError: surrogates not allowed when parsing invalid charset In-Reply-To: <1614277088.24.0.58040288739.issue43323@roundup.psfhosted.org> Message-ID: <1614397943.79.0.620939572107.issue43323@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 22:53:44 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Feb 2021 03:53:44 +0000 Subject: [issue43324] asyncio: add socket getfqdn and gethostbyaddr functions In-Reply-To: <1614293227.43.0.791416347033.issue43324@roundup.psfhosted.org> Message-ID: <1614398024.35.0.967779957927.issue43324@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- nosy: +asvetlov, yselivanov title: asyncio -> asyncio: add socket getfqdn and gethostbyaddr functions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 22:54:42 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Feb 2021 03:54:42 +0000 Subject: [issue43325] Documentation should warn that 'is' is not a safe comparison operator for most values. In-Reply-To: <1614294680.42.0.115546489096.issue43325@roundup.psfhosted.org> Message-ID: <1614398082.44.0.974933678432.issue43325@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 23:33:19 2021 From: report at bugs.python.org (Fcant) Date: Sat, 27 Feb 2021 04:33:19 +0000 Subject: [issue43326] About Zipfile In-Reply-To: <1614310020.48.0.485375340056.issue43326@roundup.psfhosted.org> Message-ID: <1614400399.0.0.470500972094.issue43326@roundup.psfhosted.org> Change by Fcant : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 26 23:58:18 2021 From: report at bugs.python.org (Ma Lin) Date: Sat, 27 Feb 2021 04:58:18 +0000 Subject: [issue43305] A typo in /Modules/_io/bufferedio.c In-Reply-To: <1614089158.05.0.547226223268.issue43305@roundup.psfhosted.org> Message-ID: <1614401898.39.0.14054737246.issue43305@roundup.psfhosted.org> Ma Lin added the comment: Close as invalid. They the same effect: PyErr_GivenExceptionMatches(v, PyExc_BlockingIOError)) PyErr_GivenExceptionMatches(t, PyExc_BlockingIOError)) ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 00:45:28 2021 From: report at bugs.python.org (Christoph Anton Mitterer) Date: Sat, 27 Feb 2021 05:45:28 +0000 Subject: [issue43337] export the set newline value on TextIOBase/TextIOWrapper Message-ID: <1614404728.94.0.258919800539.issue43337@roundup.psfhosted.org> New submission from Christoph Anton Mitterer : Hey. It seems there is no way to determine the newline value (None, '', \n, \r, \r\n) of a given text stream. .newlines rather gives the newlines that have been encountered so far. Just like .encoding and .errors this would be quite useful for anything that gets a stream and operates on it, possibly needing to know which newlines it will see when reading from the stream. One example would be, after line = stream.readline(4096+n) one want's to know whether actually a full line of 4096 characters has been read. Putting aside newline="", for simplicity here, n already depends on whether newline was None, \n, \r or \r\n, as would any check like line.endswith(foo). Maybe some attribute, that indicates the most recently read newline in newline="" mode, would be helpful, too. Cheers, Chris. ---------- components: IO messages: 387767 nosy: calestyo priority: normal severity: normal status: open title: export the set newline value on TextIOBase/TextIOWrapper type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 00:46:20 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 27 Feb 2021 05:46:20 +0000 Subject: [issue43281] Walrus comprehension rebind checking behavior In-Reply-To: <1613870404.85.0.640514140391.issue43281@roundup.psfhosted.org> Message-ID: <1614404780.94.0.980693800413.issue43281@roundup.psfhosted.org> Guido van Rossum added the comment: I'd like Emily to have a look at that. ---------- nosy: +emilyemorehouse _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 00:48:49 2021 From: report at bugs.python.org (Karthikeyan Singaravelan) Date: Sat, 27 Feb 2021 05:48:49 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1614404929.9.0.871834708602.issue42128@roundup.psfhosted.org> Karthikeyan Singaravelan added the comment: I am not sure if this was mentioned. There are a couple of places where switch/case is mentioned in the docs and it will be good if these places were updated to the tutorial or PEP. https://docs.python.org/3/faq/design.html#why-isn-t-there-a-switch-or-case-statement-in-python https://docs.python.org/3/tutorial/controlflow.html#if-statements (This is a tutorial so linking PEP 634 might be little advanced topic) Thanks for all the effort into docs. ---------- nosy: +xtreak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 01:53:48 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 27 Feb 2021 06:53:48 +0000 Subject: [issue43335] _ctypes/callbacks.c cannot be compiled by gcc 4.4.7 (RHEL6) In-Reply-To: <1614382101.65.0.823517794704.issue43335@roundup.psfhosted.org> Message-ID: <1614408828.01.0.418012263201.issue43335@roundup.psfhosted.org> Change by Dong-hee Na : ---------- nosy: +corona10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 01:59:43 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 27 Feb 2021 06:59:43 +0000 Subject: [issue43335] _ctypes/callbacks.c cannot be compiled by gcc 4.4.7 (RHEL6) In-Reply-To: <1614382101.65.0.823517794704.issue43335@roundup.psfhosted.org> Message-ID: <1614409183.42.0.232585085838.issue43335@roundup.psfhosted.org> Change by Dong-hee Na : ---------- keywords: +patch pull_requests: +23448 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24662 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 02:01:52 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sat, 27 Feb 2021 07:01:52 +0000 Subject: [issue43335] _ctypes/callbacks.c cannot be compiled by gcc 4.4.7 (RHEL6) In-Reply-To: <1614382101.65.0.823517794704.issue43335@roundup.psfhosted.org> Message-ID: <1614409312.63.0.791369456267.issue43335@roundup.psfhosted.org> Dong-hee Na added the comment: @Daniel Do you want to submit the patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 02:55:45 2021 From: report at bugs.python.org (Yehuda Katz) Date: Sat, 27 Feb 2021 07:55:45 +0000 Subject: [issue43289] step bug in turtle's for loop In-Reply-To: <1614393701.83.0.319585316966.issue43289@roundup.psfhosted.org> Message-ID: Yehuda Katz added the comment: Thank you Terry, and take care. Yehuda Virus-free. www.avg.com <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> On Sat, Feb 27, 2021 at 4:41 AM Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > Yehuda, one can also ask questions like this on python-list. > > In the future, when responding by email, please delete the message being > responded to, so it does not get repeated when posted to the web page. > > ---------- > nosy: +terry.reedy > resolution: -> not a bug > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 03:56:06 2021 From: report at bugs.python.org (STINNER Victor) Date: Sat, 27 Feb 2021 08:56:06 +0000 Subject: [issue21109] tarfile: Traversal attack vulnerability In-Reply-To: <1396253659.12.0.842636239516.issue21109@psf.upfronthosting.co.za> Message-ID: <1614416166.57.0.767921461349.issue21109@roundup.psfhosted.org> STINNER Victor added the comment: What is the status of this issue? ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 04:01:53 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 27 Feb 2021 09:01:53 +0000 Subject: [issue43326] About Zipfile In-Reply-To: <1614310020.48.0.485375340056.issue43326@roundup.psfhosted.org> Message-ID: <1614416513.47.0.540715837111.issue43326@roundup.psfhosted.org> Change by Eric V. Smith : ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 04:44:17 2021 From: report at bugs.python.org (Daniel Moisset) Date: Sat, 27 Feb 2021 09:44:17 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1614419057.1.0.356351181125.issue42128@roundup.psfhosted.org> Daniel Moisset added the comment: Thanks @xtreak, I'll make some changes in these sections too. The docs are coming along well, there's still some refinement to do in the compound statements section (it's there, but looks to big), I'll submit a draft PR during the weekend so interested people can review ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 05:07:25 2021 From: report at bugs.python.org (Zhang Boyang) Date: Sat, 27 Feb 2021 10:07:25 +0000 Subject: [issue43338] [feature request] Please provide offical installers for security releases Message-ID: <1614420445.03.0.702209147206.issue43338@roundup.psfhosted.org> New submission from Zhang Boyang : Hello, Thanks for developing Python! I noticed there is no offical installers for security releases of old python version. This looks a little strange to me. As a python user & developer, it's often to stay with some old version of python, because some package's version constraints, or we need to support old platforms. The offical installer is the most trusted installaion source, but it's not provided with security releases. Lacking of installers makes installaion extreme difficult (impossible for end users), and there's no (free) way for a individual to create a code signed copy of python. Non-code-signed binarys will lead a lot of problem on recent operating systems. The choice of providing no offical installer leads a lot of user stay with lastest bug-fix release and not upgrading to latest security releases. Individuals who want to stay with a old version must either use lastest bug-fix release or risk running a non-code-signed python binary. The former lacks recent python security fix, and the latter is vulnerable to binary modifications such as virus infection. To sum up, if offical installer is provided, it will make life a lot easier for users who want to stay with old python version. It would be appreciated if you could accept my feature request. Thank you! ---------- components: Installation messages: 387774 nosy: zby1234 priority: normal severity: normal status: open title: [feature request] Please provide offical installers for security releases type: enhancement versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 05:33:32 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 27 Feb 2021 10:33:32 +0000 Subject: [issue31030] sys.executable can be not normalized In-Reply-To: <1500986510.69.0.620251860274.issue31030@psf.upfronthosting.co.za> Message-ID: <1614422012.06.0.895306636624.issue31030@roundup.psfhosted.org> Eryk Sun added the comment: In Python 3.10 in POSIX, it's still the case that executable, prefix, exec_prefix, base_prefix, and base_exec_prefix in the sys module do not get normalized. For example, in Linux: $ .local/bin/../bin/python3.10 -c "import sys; print(sys.executable)" /home/someone/.local/bin/../bin/python3.10 In test/test_sys.py, assertEqual(os.path.abspath(sys.executable), sys.executable) fails. In test/test_venv.py, assertIn('home = %s' % path, data) and assertEqual(out.strip(), expected.encode()) both fail, respectively in test_defaults and test_prefixes. In Windows, prior to Python 3.6, this can be a problem if Python is run via CreateProcessW using a non-normalized path in lpApplicationName (rare, but possible) instead of letting the system search for the executable in lpCommandLine. For example: >>> cmd = 'python -c "import sys; print(sys.executable)"' >>> exe = r'C:\Program Files\Python35\..\Python35\python.exe' >>> subprocess.call(cmd, executable=exe) C:\Program Files\Python35\..\Python35\python.exe 0 It's no longer an issue in Windows with Python 3.6 and above. When getting the program path while initializing, the GetModuleFileNameW(NULL, ..) result gets canonicalized (e.g. via PathCchCanonicalizeEx). For example: >>> exe = r'C:\Program Files\Python36\..\Python36\python.exe' >>> subprocess.call(cmd, executable=exe) C:\Program Files\Python36\python.exe 0 ---------- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 06:31:19 2021 From: report at bugs.python.org (Inada Naoki) Date: Sat, 27 Feb 2021 11:31:19 +0000 Subject: [issue43321] PyArg_ParseTuple() false-returns SUCCESS though SystemError and missing data (when PY_SSIZE_T_CLEAN not #define'd) In-Reply-To: <1614269125.06.0.289577576658.issue43321@roundup.psfhosted.org> Message-ID: <1614425479.78.0.370707933915.issue43321@roundup.psfhosted.org> Change by Inada Naoki : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 06:31:31 2021 From: report at bugs.python.org (Inada Naoki) Date: Sat, 27 Feb 2021 11:31:31 +0000 Subject: [issue43321] PyArg_ParseTuple() false-returns SUCCESS though SystemError and missing data (when PY_SSIZE_T_CLEAN not #define'd) In-Reply-To: <1614269125.06.0.289577576658.issue43321@roundup.psfhosted.org> Message-ID: <1614425491.36.0.223928524285.issue43321@roundup.psfhosted.org> Inada Naoki added the comment: New changeset c71d24f55828e7f0f2c8750d2e1b04d04539beff by Inada Naoki in branch 'master': bpo-43321: Fix SystemError in getargs.c (GH-24656) https://github.com/python/cpython/commit/c71d24f55828e7f0f2c8750d2e1b04d04539beff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 06:43:37 2021 From: report at bugs.python.org (Samuel Marks) Date: Sat, 27 Feb 2021 11:43:37 +0000 Subject: [issue43339] Could not build the ssl module! | macOS with `CPPFLAGS` and `LDFLAGS` set Message-ID: <1614426217.53.0.648681369165.issue43339@roundup.psfhosted.org> New submission from Samuel Marks : I was on 3.10a4 on macOS 11.1 for ages, finally decided to upgrade to a5, building from source. With latest `brew install openssl zlib`. ``` $ export LDFLAGS='-L/usr/local/opt/openssl at 1.1/lib -L/usr/local/opt/zlib/lib' $ export CPPFLAGS='-I/usr/local/opt/openssl at 1.1/include -I/usr/local/opt/zlib/include' $ ./configure --enable-optimizations --prefix /opt/python3.10 ``` I suppose I could set this which I forgot, but I doubt it's the problem, unless pkg_config is how the CPython build system find OpenSSL? ``` export PKG_CONFIG_PATH='/usr/local/opt/openssl at 1.1/lib/pkgconfig' ``` Error: ``` Python build finished successfully! The necessary bits to build these optional modules were not found: _hashlib _ssl ossaudiodev spwd 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 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 ``` Happy to test alternative configurations ---------- components: Build messages: 387777 nosy: samuelmarks priority: normal severity: normal status: open title: Could not build the ssl module! | macOS with `CPPFLAGS` and `LDFLAGS` set versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 06:59:13 2021 From: report at bugs.python.org (Samuel Marks) Date: Sat, 27 Feb 2021 11:59:13 +0000 Subject: [issue43339] Could not build the ssl module! | macOS with `CPPFLAGS` and `LDFLAGS` set In-Reply-To: <1614426217.53.0.648681369165.issue43339@roundup.psfhosted.org> Message-ID: <1614427153.94.0.0162652173817.issue43339@roundup.psfhosted.org> Samuel Marks added the comment: Nevermind it actually was that missing `PKG_CONFIG_PATH` line? ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 11:07:59 2021 From: report at bugs.python.org (Jacob Walls) Date: Sat, 27 Feb 2021 16:07:59 +0000 Subject: [issue24650] Error in yield expression documentation In-Reply-To: <1437116019.06.0.685229534138.issue24650@psf.upfronthosting.co.za> Message-ID: <1614442079.17.0.405232935975.issue24650@roundup.psfhosted.org> Change by Jacob Walls : ---------- keywords: +patch nosy: +jacobtylerwalls nosy_count: 4.0 -> 5.0 pull_requests: +23449 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/24663 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 12:10:38 2021 From: report at bugs.python.org (DANIEL VILLENEUVE) Date: Sat, 27 Feb 2021 17:10:38 +0000 Subject: [issue43335] _ctypes/callbacks.c cannot be compiled by gcc 4.4.7 (RHEL6) In-Reply-To: <1614382101.65.0.823517794704.issue43335@roundup.psfhosted.org> Message-ID: <1614445838.41.0.820337409901.issue43335@roundup.psfhosted.org> DANIEL VILLENEUVE added the comment: I'll let you do so if it's ok for you, since I'm not equipped with Python dev tools. Regards ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 13:24:21 2021 From: report at bugs.python.org (Matthew Woodcraft) Date: Sat, 27 Feb 2021 18:24:21 +0000 Subject: [issue43340] json.load() can raise UnicodeDecodeError, but this is not documented Message-ID: <1614450261.52.0.147425024304.issue43340@roundup.psfhosted.org> New submission from Matthew Woodcraft : The documentation for json.load() and json.loads() says: ? If the data being deserialized is not a valid JSON document, a JSONDecodeError will be raised. ? But this is not currently entirely true: if the data is provided in bytes form and is not properly encoded in one of the three accepted encodings, UnicodeDecodeError is raised instead. (I have no opinion on whether the documentation or the behaviour should be changed.) ---------- components: Library (Lib) messages: 387780 nosy: mattheww priority: normal severity: normal status: open title: json.load() can raise UnicodeDecodeError, but this is not documented type: behavior versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 13:37:25 2021 From: report at bugs.python.org (Dan Snider) Date: Sat, 27 Feb 2021 18:37:25 +0000 Subject: [issue43341] functools.partial missing __weakref__ descriptor? Message-ID: <1614451045.31.0.00161523259974.issue43341@roundup.psfhosted.org> New submission from Dan Snider : The only way to lookup weak references to functools.partial objects is with weakref.getweakrefs. I don't know if it's normal for extension types that define tp_weaklistoffset to not add a __weakref__ descriptor, but I figured at the very least a subtype specifying "__weakref__" in its __slots__ could get one. Instead, it fails with the partially true TypeError: __weakref__ slot disallowed: either we already got one, or __itemsize__ != 0. ---------- messages: 387781 nosy: bup priority: normal severity: normal status: open title: functools.partial missing __weakref__ descriptor? type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 13:48:27 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Feb 2021 18:48:27 +0000 Subject: [issue31030] sys.executable can be not normalized In-Reply-To: <1500986510.69.0.620251860274.issue31030@psf.upfronthosting.co.za> Message-ID: <1614451707.93.0.821507756032.issue31030@roundup.psfhosted.org> Terry J. Reedy added the comment: This issue was opened with 2 related facts of 2017: a) sys.executable is not normalized b) as a result, two tests failed Serhiy then said "I don't know what is wrong: the value of sys.executable or the test." If it was the tests, they seem to have been fixed elsewhere. If it is the non-normalization of sys.executable, my concern for IDLE is that it starts the execution subprocess with subprocess.Popen([sys.executable, ...]). Could this be a reason for mysterious IDLE failures? Eryk, you stated above that on Windows a \\?\ path is possible but will not work for startup, and that you would open an issue for this. Have you? Do any of the non-normalized Linux (or *nix) executable paths fail for startup? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 14:08:59 2021 From: report at bugs.python.org (Piyush Patel) Date: Sat, 27 Feb 2021 19:08:59 +0000 Subject: [issue43342] Error while using Python C API Message-ID: <1614452939.17.0.0398730160049.issue43342@roundup.psfhosted.org> New submission from Piyush Patel : Hi, I am facing a very strange issue. I am working on a C++ application which embeds a python. As per documentation i have the dependencies added from python (/libs and /include directories) to C++ application. I am using Py_RunString() to run simple python code. Python code is simple: import os def Func(): return 10.0 The application run smoothly when i have python installation in directory like "C:\PythonXY\" but if python installation is in directory like "C:\MyPython\" or default installation path AppData\local\program\python\pythonxy\ , python code errors out. the error i am getting is "__import__ not found". I have used PyErr_Fetch to retrieve error. It's really strange that the python installation directory affects how Python code is run. It seems it have a problem running "import os" statement or any "import" statement. Could you help me how i can resolve this issue? Thanks, Piyush ---------- components: C API messages: 387783 nosy: piyush115 priority: normal severity: normal status: open title: Error while using Python C API type: compile error versions: Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 14:32:06 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 27 Feb 2021 19:32:06 +0000 Subject: [issue32795] subprocess.check_output() with timeout does not exit if child process does not generate output after timeout In-Reply-To: <1518081067.06.0.467229070634.issue32795@psf.upfronthosting.co.za> Message-ID: <1614454326.1.0.0358774553273.issue32795@roundup.psfhosted.org> Eryk Sun added the comment: Issue 37424 fixed this for Python 3.7+ in POSIX. It's still broken in Windows, for which I'm leaving issue 31447 open. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed superseder: -> subprocess.run timeout does not function if shell=True and capture_output=True _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 14:33:33 2021 From: report at bugs.python.org (Ashwin Ramaswami) Date: Sat, 27 Feb 2021 19:33:33 +0000 Subject: [issue25024] Allow passing "delete=False" to TemporaryDirectory In-Reply-To: <1441690580.39.0.270846340544.issue25024@psf.upfronthosting.co.za> Message-ID: <1614454413.91.0.90410476267.issue25024@roundup.psfhosted.org> Ashwin Ramaswami added the comment: I agree -- as a user, it wasn't clear to me from looking at the documentation that mkdtemp was the right way to go to not delete directories. I had expected that NamedTemporaryDirectory would also support delete=False, just like NamedTemporaryFile. Given that we say in the documentation that "mkstemp() and mkdtemp() are lower-level functions which require manual cleanup", it seems to make sense to allow Python users who don't care / know about mkstemp / mkdtemp to just use the more user-friendly NamedTemporaryDirectory / NamedTemporaryFile classes. This would make the language more accessible. Would we be fine with reopening this issue so someone can contribute a patch? ---------- nosy: +epicfaace _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 14:33:44 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 27 Feb 2021 19:33:44 +0000 Subject: [issue31447] proc communicate not exiting on python subprocess timeout using PIPES In-Reply-To: <1505297487.8.0.0553413859223.issue31447@psf.upfronthosting.co.za> Message-ID: <1614454424.01.0.102355206133.issue31447@roundup.psfhosted.org> Change by Eryk Sun : ---------- components: +Library (Lib), Windows -Interpreter Core nosy: +paul.moore, steve.dower, tim.golden, zach.ware versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 14:57:15 2021 From: report at bugs.python.org (Chigozirim Chukwu) Date: Sat, 27 Feb 2021 19:57:15 +0000 Subject: [issue43343] argparse.REMAINDER missing in online documentation for 3.9.x Message-ID: <1614455835.4.0.44415044742.issue43343@roundup.psfhosted.org> New submission from Chigozirim Chukwu : Since 3.9.0, the online documentation for the argparse module is missing reference for argparse.REMAINDER. If the feature has been deprecated, can we get atleast a mention in the deprecation notes as to what one should now prefer. If it was just a mistake, then I guess I'm just here to bring some attention to it. Thanks ---------- components: Library (Lib) messages: 387786 nosy: smac89 priority: normal severity: normal status: open title: argparse.REMAINDER missing in online documentation for 3.9.x type: enhancement versions: Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 15:06:55 2021 From: report at bugs.python.org (Eryk Sun) Date: Sat, 27 Feb 2021 20:06:55 +0000 Subject: [issue31030] sys.executable can be not normalized In-Reply-To: <1500986510.69.0.620251860274.issue31030@psf.upfronthosting.co.za> Message-ID: <1614456415.25.0.131387614172.issue31030@roundup.psfhosted.org> Eryk Sun added the comment: > If it was the tests, they seem to have been fixed elsewhere. The cited tests haven't been changed to work with non-normalized sys.executable, sys.prefix, etc. But it's not common to run the test suite with a non-normalized path such as "Lib/../build/python". > you stated above that on Windows a \\?\ path is possible but > will not work for startup, and that you would open an issue Sorry, I don't remember the details of the bug that I mentioned. But it became a non-issue in 3.6+, which canonicalizes the executable path. For example: >>> exe = r'\\?\C:\Program Files\Python36\python.exe' >>> cmd = 'python -c "import sys; print(sys.executable)"' >>> subprocess.call(cmd, executable=exe) C:\Program Files\Python36\python.exe 0 Compare the latter to the output of GetModuleFileNameW(NULL, ...) in this case, which returns a \\?\ extended (verbatim) path: >>> exe = r'\\?\C:\Program Files\Python36\python.exe' >>> cmd = 'python -c "import _winapi; print(_winapi.GetModuleFileName(0))"' >>> subprocess.call(cmd, executable=exe) \\?\C:\Program Files\Python36\python.exe 0 > Do any of the non-normalized Linux (or *nix) executable paths fail for startup? Not that I'm aware of. AFAIK, it's just about the particular tests failing in this case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 16:15:12 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Feb 2021 21:15:12 +0000 Subject: [issue43341] functools.partial missing __weakref__ descriptor? In-Reply-To: <1614451045.31.0.00161523259974.issue43341@roundup.psfhosted.org> Message-ID: <1614460512.6.0.0992822043561.issue43341@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 16:21:49 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Feb 2021 21:21:49 +0000 Subject: [issue43060] Convert _decimal C API from pointer array to struct In-Reply-To: <1611913613.83.0.451385849535.issue43060@roundup.psfhosted.org> Message-ID: <1614460909.21.0.556782422368.issue43060@roundup.psfhosted.org> Raymond Hettinger added the comment: > In my opinion, an array of pointers is a bad API; The existing code is how types were made for most of Python's history. It is not "bad"; it is just more wordy. Given that the current code is correct, I don't see any strong reason to churn the code. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 17:16:05 2021 From: report at bugs.python.org (Piyush Patel) Date: Sat, 27 Feb 2021 22:16:05 +0000 Subject: [issue43342] Error while using Python C API In-Reply-To: <1614452939.17.0.0398730160049.issue43342@roundup.psfhosted.org> Message-ID: <1614464165.22.0.587590445254.issue43342@roundup.psfhosted.org> Piyush Patel added the comment: So upon further investigation, it seems all the built-in functions are not working. def func(): max(10,20) this code errors out saying "name 'max' is not defined" so when python installation is in custom location or parent folder name is "python", the embedded python in C++ application behavior is bad and inconsistent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 17:19:39 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Sat, 27 Feb 2021 22:19:39 +0000 Subject: [issue41972] bytes.find consistently hangs in a particular scenario In-Reply-To: <1602113519.53.0.297229304628.issue41972@roundup.psfhosted.org> Message-ID: <1614464379.54.0.84495254236.issue41972@roundup.psfhosted.org> Dennis Sweeney added the comment: Any chance PR 22904 can make it into 3.10 before the May 03 feature freeze? The text document in that PR has some notes on how the algorithm works, so that may be a good place to start reviewing if anyone is interested. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 17:25:48 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 27 Feb 2021 22:25:48 +0000 Subject: [issue41972] bytes.find consistently hangs in a particular scenario In-Reply-To: <1602113519.53.0.297229304628.issue41972@roundup.psfhosted.org> Message-ID: <1614464748.7.0.901729160624.issue41972@roundup.psfhosted.org> Guido van Rossum added the comment: If Tim approves we might get it into alpha 6 which goes out Monday. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 17:32:12 2021 From: report at bugs.python.org (Tim Peters) Date: Sat, 27 Feb 2021 22:32:12 +0000 Subject: [issue41972] bytes.find consistently hangs in a particular scenario In-Reply-To: <1602113519.53.0.297229304628.issue41972@roundup.psfhosted.org> Message-ID: <1614465132.08.0.474074388634.issue41972@roundup.psfhosted.org> Tim Peters added the comment: I'm very sorry for not keeping up with this - my health has been poor, and I just haven't been able to make enough time. Last time I looked to a non-trivial depth, I was quite happy, and just quibbling about possible tradeoffs. I can't honestly commit to doing better in the near future, so where does that leave us? I'd personally "risk it". I just added Raymond to the nosy list, on the off chance he can make some "emergency time" to give a more informed yes/no. He's routinely sucked up weeks of my life with random review requests, so I figure turnabout is fair play ;-) ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 17:44:17 2021 From: report at bugs.python.org (Kevin Hollingshead) Date: Sat, 27 Feb 2021 22:44:17 +0000 Subject: [issue43344] RotatingFileHandler breaks file type associations Message-ID: <1614465857.24.0.529577943251.issue43344@roundup.psfhosted.org> New submission from Kevin Hollingshead : The filenames generated by logging.RotatingFileHandler breaks the ability to associate a program (e.g. notepad++, sublime text, etc.) with the log files using Windows or OSX file associations because the extension is overridden by the added suffix. For example, if I specify the filename as "test.log" for a TimeBasedRotatingFileHandler with a suffix of "%Y%m%d", rolled over files are named test.log.YYYYMMDD. There is no way to associate a program with this type of file extension. A good non-breaking fix would be to add a parameter "extension" to RotatingFileHandler, and if specified would be applied to all filenames. Thus if I specify filename="test" and "extension="log" for my handler it would give "test.log" for the initial file and "test.YYYYMMDD.log" for rollover files. ---------- components: Extension Modules files: logger_bug.py messages: 387793 nosy: kh14821 priority: normal severity: normal status: open title: RotatingFileHandler breaks file type associations type: behavior Added file: https://bugs.python.org/file49840/logger_bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 18:25:43 2021 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 27 Feb 2021 23:25:43 +0000 Subject: [issue43340] json.load() can raise UnicodeDecodeError, but this is not documented In-Reply-To: <1614450261.52.0.147425024304.issue43340@roundup.psfhosted.org> Message-ID: <1614468343.4.0.957737180959.issue43340@roundup.psfhosted.org> Eric V. Smith added the comment: As a rule we don't try and document every exception that can be raised. I could go either way on documenting encoding errors with the json module, although it seems pretty clear that an encoding error would be possible in this case. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python, eric.smith versions: -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 18:43:36 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Feb 2021 23:43:36 +0000 Subject: [issue43340] json.load() can raise UnicodeDecodeError, but this is not documented In-Reply-To: <1614450261.52.0.147425024304.issue43340@roundup.psfhosted.org> Message-ID: <1614469416.73.0.0520763843563.issue43340@roundup.psfhosted.org> Raymond Hettinger added the comment: Normally, we don't (or can't) enumerate all possible exceptions. But in this case, it is worth expanding the documentation so that person can know which of two common input errors they need to catch: "If the data being deserialized is not valid UTF-8 a UnicodeDecodeError will be raised, and if the decoded file is not a valid JSON document, a JSONDecodeError will be raised". ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 18:49:07 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Feb 2021 23:49:07 +0000 Subject: [issue43325] Documentation should warn that 'is' is not a safe comparison operator for most values. In-Reply-To: <1614294680.42.0.115546489096.issue43325@roundup.psfhosted.org> Message-ID: <1614469747.84.0.795989760428.issue43325@roundup.psfhosted.org> Raymond Hettinger added the comment: I'll add a note to this effect in the tutorial. Also, in the FAQ, we could have an entry about the three circumstances when "is" can relied upon: 1) variable assignment doesn't change identity, 2) containers that use references don't change identity, and 3) singletons don't change identity. ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 18:52:52 2021 From: report at bugs.python.org (Daniel Moisset) Date: Sat, 27 Feb 2021 23:52:52 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1614469972.95.0.495430483143.issue42128@roundup.psfhosted.org> Change by Daniel Moisset : ---------- pull_requests: +23450 pull_request: https://github.com/python/cpython/pull/24664 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 19:10:50 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Feb 2021 00:10:50 +0000 Subject: [issue20503] super behaviour and abstract base classes (either implementation or documentation/error message is wrong) In-Reply-To: <1391441802.61.0.557224247712.issue20503@psf.upfronthosting.co.za> Message-ID: <1614471050.42.0.619402795142.issue20503@roundup.psfhosted.org> Raymond Hettinger added the comment: This is a bit out of date. The isinstance() docs now specify that the predicate tests for direct, indirect, and virtual inheritance. Likewise, the super() docs already specify that only the __mro__ is searched. So those docs are already precise. Am thinking of adding a FAQ entry about when direct inheritance is required and include the OP's example. FWIW, this isn't really about super(). It affects any attribute lookup or any other property of inheritance. A true result from instance() doesn't imply that actual inheritance has occurred. ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 19:16:32 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 28 Feb 2021 00:16:32 +0000 Subject: [issue43335] _ctypes/callbacks.c cannot be compiled by gcc 4.4.7 (RHEL6) In-Reply-To: <1614382101.65.0.823517794704.issue43335@roundup.psfhosted.org> Message-ID: <1614471392.56.0.866729942385.issue43335@roundup.psfhosted.org> Dong-hee Na added the comment: New changeset bf9de7ab24d9d7068645b202bc47146b9a4f2726 by Dong-hee Na in branch 'master': bpo-43335: Update macro to check gcc version (GH-24662) https://github.com/python/cpython/commit/bf9de7ab24d9d7068645b202bc47146b9a4f2726 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 19:16:52 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Feb 2021 00:16:52 +0000 Subject: [issue43335] _ctypes/callbacks.c cannot be compiled by gcc 4.4.7 (RHEL6) In-Reply-To: <1614382101.65.0.823517794704.issue43335@roundup.psfhosted.org> Message-ID: <1614471412.59.0.306291722831.issue43335@roundup.psfhosted.org> Change by miss-islington : ---------- nosy: +miss-islington nosy_count: 2.0 -> 3.0 pull_requests: +23451 pull_request: https://github.com/python/cpython/pull/24665 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 19:20:22 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 28 Feb 2021 00:20:22 +0000 Subject: [issue43335] _ctypes/callbacks.c cannot be compiled by gcc 4.4.7 (RHEL6) In-Reply-To: <1614382101.65.0.823517794704.issue43335@roundup.psfhosted.org> Message-ID: <1614471622.94.0.543989145333.issue43335@roundup.psfhosted.org> Change by Dong-hee Na : ---------- versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 19:51:43 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Feb 2021 00:51:43 +0000 Subject: [issue43335] _ctypes/callbacks.c cannot be compiled by gcc 4.4.7 (RHEL6) In-Reply-To: <1614382101.65.0.823517794704.issue43335@roundup.psfhosted.org> Message-ID: <1614473503.54.0.0220333692537.issue43335@roundup.psfhosted.org> miss-islington added the comment: New changeset 132e31f4bf20818a469cbcdba75068f26cb19a65 by Miss Islington (bot) in branch '3.9': bpo-43335: Update macro to check gcc version (GH-24662) https://github.com/python/cpython/commit/132e31f4bf20818a469cbcdba75068f26cb19a65 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 27 19:52:47 2021 From: report at bugs.python.org (Dong-hee Na) Date: Sun, 28 Feb 2021 00:52:47 +0000 Subject: [issue43335] _ctypes/callbacks.c cannot be compiled by gcc 4.4.7 (RHEL6) In-Reply-To: <1614382101.65.0.823517794704.issue43335@roundup.psfhosted.org> Message-ID: <1614473567.96.0.844216711859.issue43335@roundup.psfhosted.org> Dong-hee Na added the comment: Thank you Daniel for reporting and suggestion! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 00:04:11 2021 From: report at bugs.python.org (Carol Willing) Date: Sun, 28 Feb 2021 05:04:11 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1614488651.0.0.126001936884.issue42128@roundup.psfhosted.org> Change by Carol Willing : ---------- pull_requests: +23452 pull_request: https://github.com/python/cpython/pull/24667 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 00:11:34 2021 From: report at bugs.python.org (Carol Willing) Date: Sun, 28 Feb 2021 05:11:34 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1614489094.44.0.976790136226.issue42128@roundup.psfhosted.org> Carol Willing added the comment: Folks, The What's New PR is open now. I've tried to focus more on the data type/shape examples over literal example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 00:18:12 2021 From: report at bugs.python.org (Paul Bryan) Date: Sun, 28 Feb 2021 05:18:12 +0000 Subject: [issue43345] Add __required_keys__ and __optional_keys__ to TypedDict documentation Message-ID: <1614489492.56.0.834982416077.issue43345@roundup.psfhosted.org> New submission from Paul Bryan : >From Typing-sig list: On Thu, Feb 11, 2021 at 10:54 PM Paul Bryan wrote: > I don't think __required_keys__ or __optional_keys__ are documented, at least not in https://docs.python.org/3.10/library/typing.html. Is there any reason we can't codify them in 3.10 docs? On Fri, 2021-02-12 at 14:23 -0800, Guido van Rossum wrote: > Nobody got to it yet? Maybe you'd be willing to submit a small PR for this? ---------- assignee: docs at python components: Documentation messages: 387802 nosy: docs at python, pbryan priority: normal severity: normal status: open title: Add __required_keys__ and __optional_keys__ to TypedDict documentation versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 00:19:15 2021 From: report at bugs.python.org (Paul Bryan) Date: Sun, 28 Feb 2021 05:19:15 +0000 Subject: [issue43345] Add __required_keys__ and __optional_keys__ to TypedDict documentation In-Reply-To: <1614489492.56.0.834982416077.issue43345@roundup.psfhosted.org> Message-ID: <1614489555.54.0.403542511523.issue43345@roundup.psfhosted.org> Change by Paul Bryan : ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 00:24:51 2021 From: report at bugs.python.org (Paul Bryan) Date: Sun, 28 Feb 2021 05:24:51 +0000 Subject: [issue43345] Add __required_keys__ and __optional_keys__ to TypedDict documentation In-Reply-To: <1614489492.56.0.834982416077.issue43345@roundup.psfhosted.org> Message-ID: <1614489891.5.0.785082589611.issue43345@roundup.psfhosted.org> Change by Paul Bryan : ---------- keywords: +patch pull_requests: +23453 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24668 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 02:02:22 2021 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 28 Feb 2021 07:02:22 +0000 Subject: [issue43345] Add __required_keys__ and __optional_keys__ to TypedDict documentation In-Reply-To: <1614489492.56.0.834982416077.issue43345@roundup.psfhosted.org> Message-ID: <1614495742.03.0.649423707792.issue43345@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset 1e3c68246ee738b5ec5450b1eb39af2fca300cb9 by Paul Bryan in branch 'master': bpo-43345: Enhance TypedDict documentation. (#24668) https://github.com/python/cpython/commit/1e3c68246ee738b5ec5450b1eb39af2fca300cb9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 02:17:39 2021 From: report at bugs.python.org (Paul Bryan) Date: Sun, 28 Feb 2021 07:17:39 +0000 Subject: [issue43345] Add __required_keys__ and __optional_keys__ to TypedDict documentation In-Reply-To: <1614489492.56.0.834982416077.issue43345@roundup.psfhosted.org> Message-ID: <1614496659.23.0.592762861182.issue43345@roundup.psfhosted.org> Change by Paul Bryan : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 03:27:51 2021 From: report at bugs.python.org (cmhzc) Date: Sun, 28 Feb 2021 08:27:51 +0000 Subject: [issue43319] A possible misleading expression in the Virtual Environment Tutorial In-Reply-To: <1614242172.25.0.356452528592.issue43319@roundup.psfhosted.org> Message-ID: <1614500871.99.0.408912831388.issue43319@roundup.psfhosted.org> Change by cmhzc : ---------- type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 04:14:16 2021 From: report at bugs.python.org (Tzu-ping Chung) Date: Sun, 28 Feb 2021 09:14:16 +0000 Subject: [issue43312] Interface to select preferred "user" or "home" sysconfig scheme for an environment In-Reply-To: <1614158800.84.0.101101658017.issue43312@roundup.psfhosted.org> Message-ID: <1614503656.79.0.388245744963.issue43312@roundup.psfhosted.org> Tzu-ping Chung added the comment: How do we move the discussion forward? I would really want this to be included in 3.10. Assuming distutils is going to be removed in 3.12, pip would be left with an extremely short window if this has to wait for another year. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 04:18:18 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 28 Feb 2021 09:18:18 +0000 Subject: [issue42129] Support resources in namespace packages In-Reply-To: <1603469006.87.0.128715336786.issue42129@roundup.psfhosted.org> Message-ID: <1614503898.24.0.221767478463.issue42129@roundup.psfhosted.org> Jason R. Coombs added the comment: > I would harmonize towards what the concrete implementations... For FileReader and ZipReader, both rely on TraversableResources to implement contents, which rely on `files().iterdir()`, which could raise FileNotFoundError and definitely don't return lists. Most importantly, this method is an abstract method, so subclasses can't rely on it (must override it). Searching Github, I couldn't find any other classes subclassing this ABC. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 04:47:59 2021 From: report at bugs.python.org (pmp-p) Date: Sun, 28 Feb 2021 09:47:59 +0000 Subject: [issue22100] Use $HOSTPYTHON when determining candidate interpreter for $PYTHON_FOR_BUILD. In-Reply-To: <1406648042.0.0.0162670058613.issue22100@psf.upfronthosting.co.za> Message-ID: <1614505679.49.0.325581242191.issue22100@roundup.psfhosted.org> Change by pmp-p : ---------- nosy: +pmpp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 04:49:58 2021 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 28 Feb 2021 09:49:58 +0000 Subject: [issue43054] What does the existence of a struct in a header file imply about the C-API In-Reply-To: <1611832325.97.0.674198865532.issue43054@roundup.psfhosted.org> Message-ID: <1614505798.18.0.280275379424.issue43054@roundup.psfhosted.org> Ronald Oussoren added the comment: Sorry about the slow response. I misread your initial message, the distinction between (1) and (2) in your list is clear. to (3): New fields can be added while maintaining API (but not ABI) compatibility as long as the default value is the default value for static initialisers (assuming the usual way we initialise structs in CPython). That is, adding a new field to PyTypeObject is ok, as long as it at the end and defaults to NULL or 0. Especially with category 1 it is not entirely clear which structs are in that category. Is PyLongObject in this category? The struct is not documented, but has a name that seems to indicate that it is public. Likewise for PyTupleObject, where the shape of the struct is used by documented APIs but the shape of the strut itself is not documented. BTW. For my own code I do directly access structs where necessary, even if they aren't documented. I totally expect that this will require adjustments for new Python releases (such as when the unicode representation changed). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 04:53:51 2021 From: report at bugs.python.org (=?utf-8?b?TWljaGHFgiBHw7Nybnk=?=) Date: Sun, 28 Feb 2021 09:53:51 +0000 Subject: [issue40059] Provide a toml module in the standard library In-Reply-To: <1585119261.47.0.818238682424.issue40059@roundup.psfhosted.org> Message-ID: <1614506031.39.0.221695361492.issue40059@roundup.psfhosted.org> Micha? G?rny added the comment: It seems that the spec has reached 1.0.0: > 1.0.0 / 2021-01-11 I guess that there are still ~2 months left to do this before 3.10 reaches beta. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 05:11:19 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 28 Feb 2021 10:11:19 +0000 Subject: [issue42129] Support resources in namespace packages In-Reply-To: <1603469006.87.0.128715336786.issue42129@roundup.psfhosted.org> Message-ID: <1614507079.98.0.343082997046.issue42129@roundup.psfhosted.org> Jason R. Coombs added the comment: I've pushed [this branch](https://github.com/python/cpython/tree/feature/42129-resources-namespace-packages), which includes fixes for the above two identified issues. Still one issue remains: ERROR: test_package_has_no_reader_fallback (test.test_importlib.test_resource.ResourceCornerCaseTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/jaraco/code/public/cpython/Lib/test/test_importlib/test_resource.py", line 98, in test_package_has_no_reader_fallback self.assertFalse(resources.is_resource(module, 'A')) File "/Users/jaraco/code/public/cpython/Lib/importlib/resources.py", line 157, in is_resource package_contents = set(contents(package)) File "/Users/jaraco/code/public/cpython/Lib/importlib/resources.py", line 174, in contents transversable = _common.from_package(package) File "/Users/jaraco/code/public/cpython/Lib/importlib/_common.py", line 75, in from_package reader = spec.loader.get_resource_reader(spec.name) AttributeError: 'object' object has no attribute 'get_resource_reader' This same test passes on importlib_resources, and the difference seems to be rooted in how [from_package resolves the package spec using a compatibility wrapper](https://github.com/python/importlib_resources/blob/1401cc48e5077088036aa7e729c8995ffbbb9e88/importlib_resources/_common.py#L76). On the backport, this causes the package without a resource reader to have a resource reader and return a degenerate value: ``` > /Users/jaraco/code/public/importlib_resources/importlib_resources/_py3.py(139)is_resource() -> package_contents = set(contents(package)) (Pdb) _common.from_package(package) PosixPath('/path/which/shall/not/be') (Pdb) from . import _compat (Pdb) _compat.package_spec(package).loader.get_resource_reader('any').files().is_dir() False ``` This means that the compatibility shim in from_package is masking test failure in the backport, and probably the best course of action will be to unmask that failure in the backport and figure out the best behavior there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 07:47:16 2021 From: report at bugs.python.org (Christoph Zwerschke) Date: Sun, 28 Feb 2021 12:47:16 +0000 Subject: [issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition In-Reply-To: <1471355745.98.0.805545529346.issue27777@psf.upfronthosting.co.za> Message-ID: <1614516436.52.0.733053752069.issue27777@roundup.psfhosted.org> Christoph Zwerschke added the comment: Just created a test case for this problem after a pentest provoked this error on one of my web apps. Then I found this bug report which already has a similar test case attached. The problem is that read_binary() as the name says reads binary data, but then writes it to a file which may or may not be binary, depending on whether self._binary_file is set, which depends on whether a filename was set via the content-disposition header. Jakub's patch looks good and works for me. Please merge this! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 11:44:21 2021 From: report at bugs.python.org (Zackery Spytz) Date: Sun, 28 Feb 2021 16:44:21 +0000 Subject: [issue42484] get_obs_local_part fails to handle empty local part In-Reply-To: <1606480619.96.0.472096710567.issue42484@roundup.psfhosted.org> Message-ID: <1614530661.32.0.627148196646.issue42484@roundup.psfhosted.org> Change by Zackery Spytz : ---------- keywords: +patch nosy: +ZackerySpytz nosy_count: 3.0 -> 4.0 pull_requests: +23455 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24669 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 12:01:15 2021 From: report at bugs.python.org (Berker Peksag) Date: Sun, 28 Feb 2021 17:01:15 +0000 Subject: [issue43251] [sqlite3] sqlite3_column_name() failures should raise MemoryError In-Reply-To: <1613647354.29.0.206061609144.issue43251@roundup.psfhosted.org> Message-ID: <1614531675.24.0.1308301934.issue43251@roundup.psfhosted.org> Berker Peksag added the comment: New changeset 2183d06bc8a481098d62a4ebed8d6982b3d1602a by Erlend Egeberg Aasland in branch 'master': bpo-43251: sqlite3_column_name() failures now raise MemoryError (GH-24609) https://github.com/python/cpython/commit/2183d06bc8a481098d62a4ebed8d6982b3d1602a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 12:01:29 2021 From: report at bugs.python.org (Berker Peksag) Date: Sun, 28 Feb 2021 17:01:29 +0000 Subject: [issue43251] [sqlite3] sqlite3_column_name() failures should raise MemoryError In-Reply-To: <1613647354.29.0.206061609144.issue43251@roundup.psfhosted.org> Message-ID: <1614531689.19.0.835623361348.issue43251@roundup.psfhosted.org> Change by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 12:10:14 2021 From: report at bugs.python.org (hai shi) Date: Sun, 28 Feb 2021 17:10:14 +0000 Subject: [issue43343] argparse.REMAINDER missing in online documentation for 3.9.x In-Reply-To: <1614455835.4.0.44415044742.issue43343@roundup.psfhosted.org> Message-ID: <1614532214.37.0.563660859802.issue43343@roundup.psfhosted.org> hai shi added the comment: Hi, Chigozirim Chukwu. Thanks for your report. There have releated comment in: https://bugs.python.org/issue17050#msg315716 ---------- nosy: +paul.j3, rhettinger, shihai1991 versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 13:20:42 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Feb 2021 18:20:42 +0000 Subject: [issue43343] argparse.REMAINDER missing in online documentation for 3.9.x In-Reply-To: <1614455835.4.0.44415044742.issue43343@roundup.psfhosted.org> Message-ID: <1614536442.8.0.201836341526.issue43343@roundup.psfhosted.org> Raymond Hettinger added the comment: Chigozirim, thanks for the report. REMAINDER is now an undocumented legacy feature. It isn't deprecated because we don't plan to remove it. It isn't documented because it is buggy in a way that isn't easy to fix. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 13:20:56 2021 From: report at bugs.python.org (Tim Peters) Date: Sun, 28 Feb 2021 18:20:56 +0000 Subject: [issue41972] bytes.find consistently hangs in a particular scenario In-Reply-To: <1602113519.53.0.297229304628.issue41972@roundup.psfhosted.org> Message-ID: <1614536456.6.0.517740826267.issue41972@roundup.psfhosted.org> Tim Peters added the comment: New changeset 73a85c4e1da42db28e3de57c868d24a089b8d277 by Dennis Sweeney in branch 'master': bpo-41972: Use the two-way algorithm for string searching (GH-22904) https://github.com/python/cpython/commit/73a85c4e1da42db28e3de57c868d24a089b8d277 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 13:26:16 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Feb 2021 18:26:16 +0000 Subject: [issue43344] RotatingFileHandler breaks file type associations In-Reply-To: <1614465857.24.0.529577943251.issue43344@roundup.psfhosted.org> Message-ID: <1614536776.86.0.711150262137.issue43344@roundup.psfhosted.org> Raymond Hettinger added the comment: +1 The ability to customize the filenames seems like a reasonable feature request. Perhaps an optional *format* option could introduced. ---------- nosy: +rhettinger, vinay.sajip versions: +Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 14:31:24 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 28 Feb 2021 19:31:24 +0000 Subject: [issue42129] Support resources in namespace packages In-Reply-To: <1603469006.87.0.128715336786.issue42129@roundup.psfhosted.org> Message-ID: <1614540684.25.0.667153608734.issue42129@roundup.psfhosted.org> Change by Jason R. Coombs : ---------- keywords: +patch pull_requests: +23456 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24670 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 14:46:46 2021 From: report at bugs.python.org (Brandt Bucher) Date: Sun, 28 Feb 2021 19:46:46 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1614541606.4.0.823447161112.issue42128@roundup.psfhosted.org> Brandt Bucher added the comment: @BTaskaya, do you think you'll have time to open a PR with your AST validator this weekend? It looks good to me (assuming tests pass). Also, we should add the AST docs to our documentation to-do list (should be just adding entries for ast.Match, ast.MatchAs, ast.MatchOr, and ast.match_case). I'll try to find time to review the open doc PRs today. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 15:04:32 2021 From: report at bugs.python.org (David Bolen) Date: Sun, 28 Feb 2021 20:04:32 +0000 Subject: [issue43271] AMD64 Windows10 3.x crash with Windows fatal exception: stack overflow In-Reply-To: <1613766414.64.0.363657915419.issue43271@roundup.psfhosted.org> Message-ID: <1614542672.75.0.0532162490902.issue43271@roundup.psfhosted.org> David Bolen added the comment: I don't think it's actually any change in ceval per se, or any new buffers, just how the compiler code generation has changed due to this commit. Based on some local testing, the triggering issue is the exclusion of the optimization pragma entirely in debug mode. It appears that the existing code required the pragma to be enabled to stay within the available stack space. A quick reproduction is running test_pickletools. It fails abruptly and quickly, at least on the worker, without the pragma, but runs to completion if enabled. Perhaps that aspect of the commit should be reverted, maybe with a separate flag for debugging ceval (but not normal testing)? Alternatively, is there a way to increase the stack in debug mode to compensate? Though I guess that would risk missing a release-build only stack issue. ---------- nosy: +db3l _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 15:10:07 2021 From: report at bugs.python.org (Batuhan Taskaya) Date: Sun, 28 Feb 2021 20:10:07 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1614543007.89.0.327832195671.issue42128@roundup.psfhosted.org> Batuhan Taskaya added the comment: > @BTaskaya, do you think you'll have time to open a PR with your AST validator this weekend? It looks good to me (assuming tests pass). Unfortunately not. I believe it still lacks tests for invalid cases, but other than that should work. If you'd like to take it on feel free, if not I'll create a PR next weekend with tests (probably after release, though I believe it is not a blocker as is). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 15:32:11 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Feb 2021 20:32:11 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1614544331.13.0.0510480194346.issue42128@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: I can pick up the AST docs PR ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 15:32:16 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Feb 2021 20:32:16 +0000 Subject: [issue40469] TimedRotatingFileHandler rotating on use not time In-Reply-To: <1588345322.69.0.523914781015.issue40469@roundup.psfhosted.org> Message-ID: <1614544336.5.0.650657185356.issue40469@roundup.psfhosted.org> Change by Raymond Hettinger : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 16:12:53 2021 From: report at bugs.python.org (Dennis Sweeney) Date: Sun, 28 Feb 2021 21:12:53 +0000 Subject: [issue41972] bytes.find consistently hangs in a particular scenario In-Reply-To: <1602113519.53.0.297229304628.issue41972@roundup.psfhosted.org> Message-ID: <1614546773.96.0.935115820378.issue41972@roundup.psfhosted.org> Change by Dennis Sweeney : ---------- pull_requests: +23457 pull_request: https://github.com/python/cpython/pull/24672 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 17:08:09 2021 From: report at bugs.python.org (Brandt Bucher) Date: Sun, 28 Feb 2021 22:08:09 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1614550089.19.0.720426182617.issue42128@roundup.psfhosted.org> Brandt Bucher added the comment: Thanks Pablo! > If you'd like to take it on feel free, if not I'll create a PR next weekend with tests (probably after release, though I believe it is not a blocker as is). No problem, I'm pretty busy too. Next weekend is fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 17:38:18 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Feb 2021 22:38:18 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1614551898.64.0.798315385205.issue42128@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- pull_requests: +23458 pull_request: https://github.com/python/cpython/pull/24673 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 17:41:15 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Feb 2021 22:41:15 +0000 Subject: [issue37146] opcode cache for LOAD_GLOBAL emits false alarm in memory leak hunting In-Reply-To: <1559594083.93.0.475089830437.issue37146@roundup.psfhosted.org> Message-ID: <1614552075.73.0.0711660589403.issue37146@roundup.psfhosted.org> Pablo Galindo Salgado added the comment: New changeset af5fa13ef6f648fc7a7a33a7556db13887e7d643 by Pablo Galindo in branch 'master': bpo-37146: Deactivate opcode cache only when using huntrleaks in the test suite (GH-24643) https://github.com/python/cpython/commit/af5fa13ef6f648fc7a7a33a7556db13887e7d643 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 17:42:42 2021 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Sun, 28 Feb 2021 22:42:42 +0000 Subject: [issue37146] opcode cache for LOAD_GLOBAL emits false alarm in memory leak hunting In-Reply-To: <1559594083.93.0.475089830437.issue37146@roundup.psfhosted.org> Message-ID: <1614552162.13.0.189985550144.issue37146@roundup.psfhosted.org> Change by Pablo Galindo Salgado : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 17:43:27 2021 From: report at bugs.python.org (miss-islington) Date: Sun, 28 Feb 2021 22:43:27 +0000 Subject: [issue29753] Ctypes Packing Bitfields Incorrectly - Linux In-Reply-To: <1488933400.56.0.160685455632.issue29753@psf.upfronthosting.co.za> Message-ID: <1614552207.15.0.61561873582.issue29753@roundup.psfhosted.org> miss-islington added the comment: New changeset 0d7ad9fb38c041c46094087b0cf2c8ce44916b11 by Filipe La?ns in branch 'master': bpo-29753: fix merging packed bitfields in ctypes struct/union (GH-19850) https://github.com/python/cpython/commit/0d7ad9fb38c041c46094087b0cf2c8ce44916b11 ---------- nosy: +miss-islington _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 17:54:01 2021 From: report at bugs.python.org (Eryk Sun) Date: Sun, 28 Feb 2021 22:54:01 +0000 Subject: [issue43346] subprocess.run() sometimes ignores timeout in Windows Message-ID: <1614552841.1.0.31217184811.issue43346@roundup.psfhosted.org> New submission from Eryk Sun : subprocess.run() handles TimeoutExpired by terminating the process and waiting on it. In POSIX, the exception object contains the partially read stdout and stderr bytes. For example: cmd = 'echo spam; echo eggs >&2; sleep 2' try: p = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=1) except subprocess.TimeoutExpired as e: ex = e >>> ex.stdout, ex.stderr (b'spam\n', b'eggs\n') In Windows, subprocess.run() has to finish reading output with a second communicate() call, after which it manually sets the exception's stdout and stderr attributes. The poses the problem that the second communicate() call may block indefinitely, even though the child process has terminated. The primary issue is that the pipe handles may be inherited by one or more descendant processes (e.g. via shell=True), which are all regarded as potential writers that keep the pipe from closing. Reading from an open pipe that's empty will block until data becomes available. This is generally desirable for efficiency, compared to polling in a loop. But in this case, the downside is that run() in Windows will effectively ignore the given timeout. Another problem is that _communicate() writes the input to stdin on the calling thread with a single write() call. If the input exceeds the pipe capacity (4 KiB by default -- but a pipesize 'suggested' size could be supported), the write will block until the child process reads the excess data. This could block indefinitely, which will effectively ignore a given timeout. The POSIX implementation, in contrast, correctly handles a timeout in this case. Another problem is that Popen.__exit__() closes the stdout, stderr, and stdin files without regard to the _communicate() worker threads. This may seem innocuous, but if a worker thread is blocked on synchronous I/O with one of these files, WinAPI CloseHandle() will also block if it's closing the last handle for the file in the current process. (In this case, the kernel I/O manager has a close procedure that waits to acquire the file for the current thread before performing various housekeeping operations, primarily in the filesystem, such as clearing byte-range locks set by the current process.) A blocked close() is easy to demonstrate. For example: args = 'python -c "import time; time.sleep(99)"' p = subprocess.Popen(args, shell=True, stdout=subprocess.PIPE) try: p.communicate(timeout=1) except: pass p.kill() # terminates the shell process -- not python.exe with p: pass # stdout.close() blocks until python.exe exits I think the Windows implementation of Popen._communicate() needs to be redesigned as follows: * read in chunks, with a size from 1 byte up to the maximum available, as determined by _winapi.PeekNamedPipe() * write to the child's stdin on a separate thread * after communicate() has started, ensure that synchronous I/O in worker threads has been canceled via CancelSynchronousIo() before closing the pipes. The _winapi module would need to wrap OpenThread() and CancelSynchronousIo(), plus define the TERMINATE_THREAD (0x0001) access right. With the proposed changes, subprocess.run() would no longer special case TimeoutExpired for Windows. ---------- components: Library (Lib), Windows messages: 387822 nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: subprocess.run() sometimes ignores timeout in Windows type: behavior versions: Python 3.10, Python 3.8, Python 3.9 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 17:54:30 2021 From: report at bugs.python.org (Eryk Sun) Date: Sun, 28 Feb 2021 22:54:30 +0000 Subject: [issue43346] subprocess.run() sometimes ignores timeout in Windows In-Reply-To: <1614552841.1.0.31217184811.issue43346@roundup.psfhosted.org> Message-ID: <1614552870.84.0.216348213018.issue43346@roundup.psfhosted.org> Eryk Sun added the comment: Demo Popen() methods, for discussion: def _read_output(self, fileobj): handle = msvcrt.get_osfhandle(fileobj.fileno()) output = self._fileobj2output[fileobj] while True: try: size = _winapi.PeekNamedPipe(handle)[0] or 1 data = _winapi.ReadFile(handle, size)[0] except BrokenPipeError: break except OSError as e: if e.winerror == _winapi.ERROR_OPERATION_ABORTED: # Should this be mapped to InterruptedError # (EINTR) in PC/errmap.h? break raise output.append(data) fileobj.close() def _communicate(self, input, endtime, orig_timeout): if not self._communication_started: self._fileobj2thread = {} self._fileobj2output = {} if self.stdout: self._fileobj2output[self.stdout] = [] if self.stderr: self._fileobj2output[self.stderr] = [] stdout = self._fileobj2output.get(self.stdout) stderr = self._fileobj2output.get(self.stderr) thread_list = [] for fileobj in (self.stdin, self.stdout, self.stderr): if fileobj is None: continue if fileobj in self._fileobj2thread: thread = self._fileobj2thread[fileobj] else: if fileobj == self.stdin: target, args = self._stdin_write, (input,) else: target, args = self._read_output, (fileobj,) thread = threading.Thread(target=target, args=args, daemon=True) thread.start() self._fileobj2thread[fileobj] = thread thread_list.append(thread) for thread in thread_list: thread.join(self._remaining_time(endtime)) if thread.is_alive(): self._check_timeout(endtime, orig_timeout, stdout, stderr, skip_check_and_raise=True) # Join partial reads. if stdout is not None: stdout = b''.join(stdout) if stderr is not None: stderr = b''.join(stderr) if self.text_mode: if stdout is not None: stdout = self._translate_newlines(stdout, self.stdout.encoding, self.stdout.errors) if stderr is not None: stderr = self._translate_newlines(stderr, self.stderr.encoding, self.stderr.errors) return (stdout, stderr) def _cancel_io(self): if not hasattr(self, '_fileobj2thread'): return for fileobj in (self.stdin, self.stdout, self.stderr): thread = self._fileobj2thread.get(fileobj) if thread is None or not thread.is_alive(): continue try: handle = _winapi.OpenThread( _winapi.TERMINATE_THREAD, False, thread.ident) except OSError: pass else: try: try: _winapi.CancelSynchronousIo(handle) except OSError: pass finally: _winapi.CloseHandle(handle) def __exit__(self, exc_type, value, traceback): if _mswindows: self._cancel_io() # rest unchanged... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 18:09:01 2021 From: report at bugs.python.org (Erlend Egeberg Aasland) Date: Sun, 28 Feb 2021 23:09:01 +0000 Subject: [issue43296] [sqlite3] Fix sqlite3_value_blob() usage In-Reply-To: <1614004633.85.0.0676920983033.issue43296@roundup.psfhosted.org> Message-ID: <1614553741.4.0.651394652304.issue43296@roundup.psfhosted.org> Change by Erlend Egeberg Aasland : ---------- keywords: +patch pull_requests: +23459 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24674 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 19:44:04 2021 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 01 Mar 2021 00:44:04 +0000 Subject: [issue43347] IDLE crashes in Message-ID: <1614559444.76.0.552687903275.issue43347@roundup.psfhosted.org> New submission from Raymond Hettinger : I'm running a python.org Mac build on Apple silicon. Python 3.10.0a5 (v3.10.0a5:b0478d738a, Feb 2 2021, 16:30:44) [Clang 12.0.0 (clang-1200.0.32.29)] on darwin Periodically, Python freezes and requires a force quit. I'm not certain but think the trigger event is the display of a pop-up box showing attribute completions. The box is correctly shaped but filled with a solid light gray. I suspect the problem is partly in the O/S because after the freeze, I see something similar when clicking the system ? icon, so the effect extends beyond Python. However, the problem does not occur on my Mac with Intel silicon and it does not happen with Python 3.9 running on Apple silicon. This has been occurring for a while and has persisted through O/S updates. Today, it happened on Big Sur 11.2.2. Will try to get a screen shot and more details when this happens again. The event occurs often enough to make IDLE unusable for classroom demonstrations or for development. ---------- assignee: terry.reedy components: IDLE, Tkinter messages: 387824 nosy: rhettinger, ronaldoussoren, terry.reedy priority: normal severity: normal status: open title: IDLE crashes in versions: Python 3.10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 20:05:03 2021 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 01 Mar 2021 01:05:03 +0000 Subject: [issue43271] AMD64 Windows10 3.x crash with Windows fatal exception: stack overflow In-Reply-To: <1613766414.64.0.363657915419.issue43271@roundup.psfhosted.org> Message-ID: <1614560703.48.0.845834539035.issue43271@roundup.psfhosted.org> Guido van Rossum added the comment: Thanks David! So the crash only happens in debug mode? PEP 651 promises to take reduce the C stack usage in the future. Therefore, I would be okay with rolling this back for the time being. If we do roll it back, maybe add a comment to ceval.c explaining that even in debug mode this file is optimized? (The change to the pragma can stay, those two letters have been unused for a decade.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 20:39:40 2021 From: report at bugs.python.org (David Bolen) Date: Mon, 01 Mar 2021 01:39:40 +0000 Subject: [issue43271] AMD64 Windows10 3.x crash with Windows fatal exception: stack overflow In-Reply-To: <1613766414.64.0.363657915419.issue43271@roundup.psfhosted.org> Message-ID: <1614562780.24.0.079219594637.issue43271@roundup.psfhosted.org> David Bolen added the comment: I hadn't tested release mode earlier, since the commit only removed the pragma in debug builds, but I just built a release build with the commit in place on the worker and it seems fine. So barring stack changes (enlarging or improving usage) it appears the optimize pragma is required on Windows, at least in order to pass the current test suite. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 21:08:45 2021 From: report at bugs.python.org (Carol Willing) Date: Mon, 01 Mar 2021 02:08:45 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1614564525.02.0.08563491777.issue42128@roundup.psfhosted.org> Carol Willing added the comment: New changeset a8e2615aa885a121b8cf8e9cd07696207356a25a by Pablo Galindo in branch 'master': bpo-42128: Add documentation for the new match-based AST nodes (GH-24673) https://github.com/python/cpython/commit/a8e2615aa885a121b8cf8e9cd07696207356a25a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 21:14:40 2021 From: report at bugs.python.org (Carol Willing) Date: Mon, 01 Mar 2021 02:14:40 +0000 Subject: [issue36346] Prepare for removing the legacy Unicode C API In-Reply-To: <1552918981.83.0.901300276481.issue36346@roundup.psfhosted.org> Message-ID: <1614564880.17.0.331983150323.issue36346@roundup.psfhosted.org> Carol Willing added the comment: New changeset 346afeb159a5a8b2e260d3de740019b64352660e by Miss Islington (bot) in branch '3.8': bpo-36346: Document removal schedule of deprecate APIs (GH-20879) (#24626) https://github.com/python/cpython/commit/346afeb159a5a8b2e260d3de740019b64352660e ---------- nosy: +willingc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 21:20:15 2021 From: report at bugs.python.org (Carol Willing) Date: Mon, 01 Mar 2021 02:20:15 +0000 Subject: [issue43266] "String conversion and formatting" formatting messes up array subscripting In-Reply-To: <1613726497.48.0.989705999924.issue43266@roundup.psfhosted.org> Message-ID: <1614565215.09.0.00314678319472.issue43266@roundup.psfhosted.org> Carol Willing added the comment: New changeset 4ebd637dde7d7e56b18926d2a70657abcac73df0 by Miss Islington (bot) in branch '3.8': closes bpo-43266: Improve array formatting. (GH-24573) (GH-24585) https://github.com/python/cpython/commit/4ebd637dde7d7e56b18926d2a70657abcac73df0 ---------- nosy: +willingc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 21:48:17 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 01 Mar 2021 02:48:17 +0000 Subject: [issue30837] Mac OS High Sierra Beta - Python Crash In-Reply-To: <1499092741.8.0.363302866556.issue30837@psf.upfronthosting.co.za> Message-ID: <1614566897.92.0.139168599185.issue30837@roundup.psfhosted.org> Jason R. Coombs added the comment: I've stumbled into this issue and it's started occurring reliably on keyring in Python 3.6 as found on Github CI (https://github.com/jaraco/keyring/runs/1994652010?check_suite_focus=true). It's not a highly-reproducible environment. I can't replicate it on my local machine, so there's probably something about how Github CI has changed the environment that's started to trigger the error. It happens in the multiprocessing tests. ---------- nosy: +jaraco versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 21:54:55 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 01 Mar 2021 02:54:55 +0000 Subject: [issue30837] Mac OS High Sierra Beta - Python Crash In-Reply-To: <1499092741.8.0.363302866556.issue30837@psf.upfronthosting.co.za> Message-ID: <1614567295.58.0.143528598221.issue30837@roundup.psfhosted.org> Jason R. Coombs added the comment: I started tracking it down in https://github.com/jaraco/keyring/issues/494 and found I'd previously delved deep into a related issue (https://github.com/jaraco/keyring/issues/281). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 21:58:43 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 01 Mar 2021 02:58:43 +0000 Subject: [issue30837] Mac OS High Sierra Beta - Python Crash In-Reply-To: <1499092741.8.0.363302866556.issue30837@psf.upfronthosting.co.za> Message-ID: <1614567523.14.0.194413879067.issue30837@roundup.psfhosted.org> Ned Deily added the comment: If the crashes are occurring while the multiprocessing fork tests are running, it's likely the issue described in Issue33725. In Python 3.8, the default start method for multiprocessing on macOS was changed to be "spawn" rather than "fork" because of the inherent issues with fork/no-exec on macOS. You could try backporting that to your 3.6. https://docs.python.org/3.8/library/multiprocessing.html#contexts-and-start-methods ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 22:00:23 2021 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 01 Mar 2021 03:00:23 +0000 Subject: [issue30837] Mac OS High Sierra Beta - Python Crash In-Reply-To: <1499092741.8.0.363302866556.issue30837@psf.upfronthosting.co.za> Message-ID: <1614567623.08.0.704289883413.issue30837@roundup.psfhosted.org> Jason R. Coombs added the comment: All good. Thanks for the references. As with the prior issues, I'm going to just suppress those failures. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 22:30:03 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 01 Mar 2021 03:30:03 +0000 Subject: [issue42603] Tkinter: pkg-config is not used to get location of tcl and tk headers/libraries In-Reply-To: <1607450864.79.0.446942772761.issue42603@roundup.psfhosted.org> Message-ID: <1614569403.38.0.0529061086994.issue42603@roundup.psfhosted.org> Ned Deily added the comment: New changeset d20279494a3a311c7aefa313174c45d32aa7f5d1 by Manolis Stamatogiannakis in branch 'master': bpo-42603: Use pkg-config to get TCL/TK paths for tkinter. (GH-23721) https://github.com/python/cpython/commit/d20279494a3a311c7aefa313174c45d32aa7f5d1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 22:32:06 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 01 Mar 2021 03:32:06 +0000 Subject: [issue42603] Tkinter: pkg-config is not used to get location of tcl and tk headers/libraries In-Reply-To: <1607450864.79.0.446942772761.issue42603@roundup.psfhosted.org> Message-ID: <1614569526.23.0.0234155268933.issue42603@roundup.psfhosted.org> Ned Deily added the comment: Thanks for the PR. Merged for inclusion in 3.10.0a6. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 23:08:44 2021 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 01 Mar 2021 04:08:44 +0000 Subject: [issue42128] Structural Pattern Matching (PEP 634) In-Reply-To: <1603466540.96.0.7677855399.issue42128@roundup.psfhosted.org> Message-ID: <1614571724.25.0.861748105799.issue42128@roundup.psfhosted.org> Guido van Rossum added the comment: New changeset a22bca6b1e2f3dc11a58f3e5ef5c22e26b8a2d80 by Daniel F Moisset in branch 'master': bpo-42128: Add documentation for pattern matching (PEP 634) (#24664) https://github.com/python/cpython/commit/a22bca6b1e2f3dc11a58f3e5ef5c22e26b8a2d80 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 23:16:18 2021 From: report at bugs.python.org (Tim Magee) Date: Mon, 01 Mar 2021 04:16:18 +0000 Subject: [issue43348] XMLRPC behaves strangely under pythonw, not under python Message-ID: <1614572178.19.0.35807455239.issue43348@roundup.psfhosted.org> New submission from Tim Magee : Summary: I run a SimpleXMLRPCServer in pythonw. When I call an exposed function the call appears to be made twice and the connection ends abnormally. This is Python 3.8.3 Windows 64-bit, with the pywin32 additions, and under Windows 7. Boo, hiss, I know -- I won't have access to a win10 machine for a week or so, but I get the impression that that won't affect this behaviour, and the post-3.8.3 changelog doesn't have anything that (to me) looks relevant in it. I've made a small reproduction that will run on one Windows machine. You need two small source files (see below): * demosrv.py - the server * democli.py - the client The method, in a CMD window: * run: start "demosrv" python demosrv.py [ runs in its own console window ] * run: python democli.py [ one instance of notepad appears and the client exits normally ] * Ctrl+C in the demosrv window to stop that * run: pythonw demosrv.py [ runs in background ] * run: python democli.py [ TWO notepad instances pop up ] [ the client crashes with an unexpected connection ] I've pasted in the two files and an example session below. This is very much cut-down from the original. Before deciding to submit I used logging at the top of the exposed function, which appeared to show it being called twice. Logging immediately before the call in the client showed only one call. Thanks, Tim #--------------8<---- demosrv.py ----8<------------------------------ from xmlrpc.server import SimpleXMLRPCServer from subprocess import Popen, DEVNULL def notepad_me(): try: cmd = ['c:\\windows\\notepad.exe'] p = Popen(cmd, stdin=DEVNULL, stdout=DEVNULL, stderr=DEVNULL) return True except Exception as e: return False class NetServer(SimpleXMLRPCServer): def __init__(self, address): super(NetServer, self).__init__(address) self.register_introspection_functions() self.register_function(notepad_me) with NetServer(("0.0.0.0", 7777)) as server: server.serve_forever() #---------------8<---- democli.py ----8<----------------------------- import sys from xmlrpc.client import ServerProxy, Error def go(): try: with ServerProxy("http://localhost:7777/") as proxy: if proxy.notepad_me(): return 0 except Error as e: pass return 1 sys.exit(go()) #-------------------------------------------------------------------- d:\temp\demo>REM Run the server under python.exe d:\temp\demo>start "demosrv" python demosrv.py d:\temp\demo>python democli.py d:\temp\demo>REM That ran up one instance of notepad d:\temp\demo>REM Ctrl+C to break out the running demosrv.py d:\temp\demo>pythonw demosrv.py d:\temp\demo>REM that runs in the background d:\temp\demo>python democli.py Traceback (most recent call last): File "democli.py", line 13, in sys.exit(go()) File "democli.py", line 7, in go if proxy.notepad_me(): File "C:\Python\lib\xmlrpc\client.py", line 1109, in __call__ return self.__send(self.__name, args) File "C:\Python\lib\xmlrpc\client.py", line 1450, in __request response = self.__transport.request( File "C:\Python\lib\xmlrpc\client.py", line 1153, in request return self.single_request(host, handler, request_body, verbose) File "C:\Python\lib\xmlrpc\client.py", line 1166, in single_request resp = http_conn.getresponse() File "C:\Python\lib\http\client.py", line 1332, in getresponse response.begin() File "C:\Python\lib\http\client.py", line 303, in begin version, status, reason = self._read_status() File "C:\Python\lib\http\client.py", line 272, in _read_status raise RemoteDisconnected("Remote end closed connection without" http.client.RemoteDisconnected: Remote end closed connection without response d:\temp\demo>REM as you see that ran amok d:\temp\demo>REM and it created two instances of notepad ---------- components: Windows messages: 387837 nosy: paul.moore, steve.dower, tim.golden, tim_magee, zach.ware priority: normal severity: normal status: open title: XMLRPC behaves strangely under pythonw, not under python type: behavior versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 23:35:39 2021 From: report at bugs.python.org (Chigozirim Chukwu) Date: Mon, 01 Mar 2021 04:35:39 +0000 Subject: [issue43343] argparse.REMAINDER missing in online documentation for 3.9.x In-Reply-To: <1614455835.4.0.44415044742.issue43343@roundup.psfhosted.org> Message-ID: <1614573338.99.0.872355086363.issue43343@roundup.psfhosted.org> Chigozirim Chukwu added the comment: Alright thanks for the info everyone ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 23:38:07 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 01 Mar 2021 04:38:07 +0000 Subject: [issue43347] IDLE crashes in macOS Apple chip, maybe completions In-Reply-To: <1614559444.76.0.552687903275.issue43347@roundup.psfhosted.org> Message-ID: <1614573487.02.0.53415756973.issue43347@roundup.psfhosted.org> Terry J. Reedy added the comment: Completions are in a Listbox. listboxes are used for completions, stackviewer, and a few places in the settings dialog, in particular the keys list. And maybe the drop down list for themes and keysets. The latter two are the only one normally gray. Try the different settings tabs. ---------- nosy: +ned.deily title: IDLE crashes in -> IDLE crashes in macOS Apple chip, maybe completions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 23:38:28 2021 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 01 Mar 2021 04:38:28 +0000 Subject: [issue43347] IDLE crashes in macOS Apple chip, maybe completions In-Reply-To: <1614559444.76.0.552687903275.issue43347@roundup.psfhosted.org> Message-ID: <1614573508.39.0.501391562852.issue43347@roundup.psfhosted.org> Change by Terry J. Reedy : ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 23:41:20 2021 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 01 Mar 2021 04:41:20 +0000 Subject: [issue43271] AMD64 Windows10 3.x crash with Windows fatal exception: stack overflow In-Reply-To: <1614562780.24.0.079219594637.issue43271@roundup.psfhosted.org> Message-ID: Guido van Rossum added the comment: Thanks! That's new info, at least, it wasn't clear to me from Victor's original comment that this was for a debug build (even though as you say it can be deduced from context). Do you feel like submitting a PR along the lines I suggested? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 23:53:31 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 01 Mar 2021 04:53:31 +0000 Subject: [issue43347] IDLE crashes in macOS Apple chip, maybe completions In-Reply-To: <1614559444.76.0.552687903275.issue43347@roundup.psfhosted.org> Message-ID: <1614574411.27.0.866138498309.issue43347@roundup.psfhosted.org> Ned Deily added the comment: What version of Python (and Tcl/Tk) are you running on your Intel Macn that does not fail? Currently, we use Tcl/Tk 8.6.11 with the macOS 64-bit universal2 installer variant as of Python 3.9.2 and 3.10.0a4; previously, they used 8.6.10. All other current installer variants use 8.6.8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 28 23:56:00 2021 From: report at bugs.python.org (Ned Deily) Date: Mon, 01 Mar 2021 04:56:00 +0000 Subject: [issue42603] Tkinter: pkg-config is not used to get location of tcl and tk headers/libraries In-Reply-To: <1607450864.79.0.446942772761.issue42603@roundup.psfhosted.org> Message-ID: <1614574560.39.0.790644342685.issue42603@roundup.psfhosted.org> Change by Ned Deily : ---------- pull_requests: +23460 pull_request: https://github.com/python/cpython/pull/24675 _______________________________________ Python tracker _______________________________________