[issue47209] Documentation for asserting values of `unittest.mock.Mock.call_args_list`

2022-04-03 Thread himkt
himkt added the comment: > It only need to wrap an argument when it is a singular value. It is also wrong..., sorry. To compare a single value, I should have passed a tuple of tuples. ``` > python demo.py >

[issue46337] urllib.parse: Allow more flexibility in schemes and URL resolution behavior

2022-04-03 Thread Ned Deily
Change by Ned Deily : -- assignee: docs@python -> components: -2to3 (2.x to 3.x conversion tool), Argument Clinic, Build, C API, Cross-Build, Demos and Tools, Documentation, Extension Modules, FreeBSD, Interpreter Core, Parser, Regular Expressions, SSL, Tests, Unicode, Windows,

[issue46337] urllib.parse: Allow more flexibility in schemes and URL resolution behavior

2022-04-03 Thread Ned Deily
Change by Ned Deily : -- hgrepos: -414 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47209] Documentation for asserting values of `unittest.mock.Mock.call_args_list`

2022-04-03 Thread himkt
himkt added the comment: So sorry, documentation is not wrong. It only need to wrap an argument when it is a singular value. But I'm still wondering if we can unify documentation to wrap `call` (e.g.

[issue46337] urllib.parse: Allow more flexibility in schemes and URL resolution behavior

2022-04-03 Thread Ned Deily
Change by Ned Deily : Removed file: https://bugs.python.org/file50716/mitre_f188eec1268fd49bdc7375fc5b77ded657c150875fede1a4d797f818d2514e88_120.csv ___ Python tracker ___

[issue46337] urllib.parse: Allow more flexibility in schemes and URL resolution behavior

2022-04-03 Thread qweqwe4844m
Change by qweqwe4844m : -- assignee: -> docs@python components: +2to3 (2.x to 3.x conversion tool), Argument Clinic, Build, C API, Cross-Build, Demos and Tools, Documentation, Extension Modules, FreeBSD, Interpreter Core, Parser, Regular Expressions, SSL, Tests, Unicode, Windows,

[issue47194] Upgrade to zlib v1.2.12 in CPython binary releases

2022-04-03 Thread Ned Deily
Ned Deily added the comment: New changeset 387f93c156288c170ff0016a75af06e109d48ee1 by Miss Islington (bot) in branch '3.7': bpo-47194: Update zlib to v1.2.12 on Windows to resolve CVE-2018-25032 (GH-32241) (GH-32251)

[issue47209] Documentation for asserting values of `unittest.mock.Mock.call_args_list`

2022-04-03 Thread himkt
New submission from himkt : Currently documentation says we can check call_args_list by providing a list of tuples of arguments. ``` >>> expected = [(), ((3, 4),), ({'key': 'fish', 'next': 'w00t!'},)] >>> mock.call_args_list == expected True ``` (from

[issue47000] Make encoding="locale" uses locale encoding even in UTF-8 mode is enabled.

2022-04-03 Thread Inada Naoki
Inada Naoki added the comment: New changeset 4216dce04b7d3f329beaaafc82a77c4ac6cf4d57 by Inada Naoki in branch 'main': bpo-47000: Make `io.text_encoding()` respects UTF-8 mode (GH-32003) https://github.com/python/cpython/commit/4216dce04b7d3f329beaaafc82a77c4ac6cf4d57 --

[issue46614] Add option to output UTC datetimes as "Z" in `.isoformat()`

2022-04-03 Thread Matt Wozniski
Matt Wozniski added the comment: > My main hesitation with this name is that I suspect users may think that > `use_utc_designator` means that they *unconditionally* want to use `Z` — > without reading the documentation (which we can assume 99% of users won't do) I was thinking along similar

[issue47205] test_sched_getaffinity and setaffinity fail on FreeBSD buildbit

2022-04-03 Thread Kubilay Kocak
Kubilay Kocak added the comment: Investigating -- stage: patch review -> type: -> behavior ___ Python tracker ___ ___

[issue47208] Support libffi implementations that cannot support invocations with 1024 arguments

2022-04-03 Thread Hood Chatham
Change by Hood Chatham : -- nosy: +amaury.forgeotdarc, belopolsky, christian.heimes, meador.inge ___ Python tracker ___ ___

[issue47208] Support libffi implementations that cannot support invocations with 1024 arguments

2022-04-03 Thread Hood Chatham
New submission from Hood Chatham : ctypes defines `CTYPES_MAX_ARGCOUNT` to be 1024: https://github.com/python/cpython/blob/6db2db91b96aaa1270c200ec931a2250fe2799c7/Modules/_ctypes/ctypes.h#L21 If a function call is attempted with more than 1024 arguments, it will fail. The libffi emscripten

[issue47190] Integrating tkinter and asyncio event loops

2022-04-03 Thread Skip Montanaro
Change by Skip Montanaro : -- keywords: +patch pull_requests: +30355 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32293 ___ Python tracker ___

[issue47176] Interrupt handling for wasm32-emscripten builds without pthreads

2022-04-03 Thread Christian Heimes
Christian Heimes added the comment: Thanks for your patch! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue47197] ctypes mishandles `void` return type

2022-04-03 Thread Christian Heimes
Change by Christian Heimes : -- components: +Tests type: -> behavior versions: +Python 3.11 ___ Python tracker ___ ___

[issue47196] Function pointer cast in test_imp

2022-04-03 Thread Christian Heimes
Change by Christian Heimes : -- components: +Tests resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement versions: +Python 3.11 ___ Python tracker

[issue40280] Consider supporting emscripten/webassembly as a build target

2022-04-03 Thread Christian Heimes
Change by Christian Heimes : -- dependencies: +Function pointer cast in test_imp, ctypes mishandles `void` return type ___ Python tracker ___

[issue47176] Interrupt handling for wasm32-emscripten builds without pthreads

2022-04-03 Thread Christian Heimes
Christian Heimes added the comment: New changeset 087d0fa5b97796560c0d8ceab4f0360fd54baf4f by Hood Chatham in branch 'main': bpo-47176: Interrupt handling for wasm32-emscripten builds without pthreads (GH-32209)

[issue42238] Deprecate suspicious.py?

2022-04-03 Thread Julien Palard
Julien Palard added the comment: New changeset bdc497496548e30fa208a8d98c30bf6d1833ac4c by Julien Palard in branch 'main': bpo-42238: [doc]: make suspicious: false positive. (GH-32292) https://github.com/python/cpython/commit/bdc497496548e30fa208a8d98c30bf6d1833ac4c --

[issue47133] enhance unittest to show test name and docstring on one line

2022-04-03 Thread Gregory P. Smith
Gregory P. Smith added the comment: A more fundamental issue behind this: unittest's plain text verbose output is not intended to be parsable and consumable by machines. It is 22 years old and was intended for use in 80 column wide terminals as a progress report while watching it run as

[issue46126] Unittest output drives developers to avoid docstrings

2022-04-03 Thread miss-islington
miss-islington added the comment: New changeset 84acb5cad1b871bb8729cbf1d036b84cbe1636f0 by Jason R. Coombs in branch 'main': bpo-46126: Restore 'descriptions' when running tests internally. (GH-32128) https://github.com/python/cpython/commit/84acb5cad1b871bb8729cbf1d036b84cbe1636f0

[issue47205] test_sched_getaffinity and setaffinity fail on FreeBSD buildbit

2022-04-03 Thread miss-islington
miss-islington added the comment: New changeset 470dfe20cb6e741c42c52619e122fc218e27aebd by Miss Islington (bot) in branch '3.10': bpo-47205: Skip error check of sched_get/setaffinity on FreeBSD (GH-32285) https://github.com/python/cpython/commit/470dfe20cb6e741c42c52619e122fc218e27aebd

[issue42238] Deprecate suspicious.py?

2022-04-03 Thread Julien Palard
Julien Palard added the comment: One true positive and one false positive this week, see: - 7f9c084fdec7ddcfe8855aa79f98545591ae2261 - ec8906fb5930b1f078e2a2170cdf445e6c6faf57 -- ___ Python tracker

[issue42238] Deprecate suspicious.py?

2022-04-03 Thread Julien Palard
Change by Julien Palard : -- pull_requests: +30354 pull_request: https://github.com/python/cpython/pull/32292 ___ Python tracker ___

[issue30964] Mention ensurepip in package installation docs

2022-04-03 Thread Sam Ezeh
Change by Sam Ezeh : -- pull_requests: -30352 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39064] ValueError in zipfile.ZipFile

2022-04-03 Thread Sam Ezeh
Change by Sam Ezeh : -- pull_requests: +30353 pull_request: https://github.com/python/cpython/pull/32291 ___ Python tracker ___ ___

[issue30964] Mention ensurepip in package installation docs

2022-04-03 Thread Sam Ezeh
Change by Sam Ezeh : -- nosy: +sam_ezeh nosy_count: 3.0 -> 4.0 pull_requests: +30352 pull_request: https://github.com/python/cpython/pull/32291 ___ Python tracker ___

[issue46614] Add option to output UTC datetimes as "Z" in `.isoformat()`

2022-04-03 Thread Éric Araujo
Éric Araujo added the comment: Bad idea: pass `zulu=True` It is short, memorable if you know about it, otherwise obscure enough to push people to read the docs and be clear about what it does. Also strange and far from obvious, so a bad idea. Unless… ? --

[issue47185] code.replace(co_code=new_code) no longer catch exceptions on Python 3.11

2022-04-03 Thread Guido van Rossum
Guido van Rossum added the comment: [Victor] > Do you consider that .replace() must reject changing co_code if other tables > are not updated? I simply don't believe it can always do that correctly, so I believe it should not do it. > Debugging tables are not strictly required just to

[issue39064] ValueError in zipfile.ZipFile

2022-04-03 Thread Sam Ezeh
Sam Ezeh added the comment: Yes, of course. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39064] ValueError in zipfile.ZipFile

2022-04-03 Thread Irit Katriel
Irit Katriel added the comment: Sam, can you put that in a PR please? -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39064] ValueError in zipfile.ZipFile

2022-04-03 Thread Sam Ezeh
Sam Ezeh added the comment: One way of doing this is by making the central directory offset negative by first taking the zip file containing just an EOCD record and then listing the total size of the central directory records as positive. ``` Python 3.11.0a4+ (heads/bpo-39064:eb1935dacf,

[issue46337] urllib.parse: Allow more flexibility in schemes and URL resolution behavior

2022-04-03 Thread Senthil Kumaran
Senthil Kumaran added the comment: Hi all, I was looking at it. Introducing an enum at the last parameter is going to add cost of understanding the behavior to this function. I am doing further reading on the previous discussions and PR(s) now. --

[issue47152] Reorganize the re module sources

2022-04-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +30351 pull_request: https://github.com/python/cpython/pull/32290 ___ Python tracker ___

[issue39064] ValueError in zipfile.ZipFile

2022-04-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Try to create a normal ZIP file (it can be empty), then try to set some byte to FF (or a pair of bytes to , or 4 consequent bytes to , until you get the exactly same error). Then you can just add the binary dump of that file in tests.

[issue23689] Memory leak in Modules/sre_lib.h

2022-04-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Ma Lin for all your work. The fix changes interfaces of some internal functions which can be used in third-party code, and the bug occurs only in special circumstances, so it is not practical to backport it. -- resolution: -> fixed

[issue23689] Memory leak in Modules/sre_lib.h

2022-04-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 6e3eee5c11b539e9aab39cff783acf57838c355a by Ma Lin in branch 'main': bpo-23689: re module, fix memory leak when a match is terminated by a signal or memory allocation failure (GH-32283)

[issue26792] docstrings of runpy.run_{module,path} are rather sparse

2022-04-03 Thread Antony Lee
Change by Antony Lee : -- nosy: -Antony.Lee ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39064] ValueError in zipfile.ZipFile

2022-04-03 Thread Sam Ezeh
Change by Sam Ezeh : -- nosy: +sam_ezeh ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47203] ImportError: DLL load failed while importing binascii: %1 is not a valid Win32 application.

2022-04-03 Thread Jeremy Kloth
Jeremy Kloth added the comment: Well, to really see where things are going wrong, there is always the verbose option when launching Python: py -v -c "import binascii" This will output a lot of information but should help pin down what is exactly being imported when the error occurs. If

[issue47207] Switch datetime docstrings / documentation to using "Returns" rather than "Return"?

2022-04-03 Thread Paul Ganssle
New submission from Paul Ganssle : In bpo-9305, Fred Drake recommends preferring `Returns ...` over the imperative `Return ...`: https://bugs.python.org/issue9305#msg110912 Currently we're pretty consistent about `Return ...`, which is consistent with PEP 257:

[issue47197] ctypes mishandles `void` return type

2022-04-03 Thread Hood Chatham
Change by Hood Chatham : -- nosy: +amaury.forgeotdarc, belopolsky, meador.inge ___ Python tracker ___ ___ Python-bugs-list mailing

[issue15795] Zipfile.extractall does not preserve file permissions

2022-04-03 Thread Sam Ezeh
Change by Sam Ezeh : -- pull_requests: +30350 pull_request: https://github.com/python/cpython/pull/32289 ___ Python tracker ___ ___

[issue15795] Zipfile.extractall does not preserve file permissions

2022-04-03 Thread Sam Ezeh
Change by Sam Ezeh : -- nosy: +sam_ezeh ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47205] test_sched_getaffinity and setaffinity fail on FreeBSD buildbit

2022-04-03 Thread miss-islington
miss-islington added the comment: New changeset 490ccbd6e0e5aad07a40c79a6b0c45ffca91724b by Miss Islington (bot) in branch '3.9': bpo-47205: Skip error check of sched_get/setaffinity on FreeBSD (GH-32285) https://github.com/python/cpython/commit/490ccbd6e0e5aad07a40c79a6b0c45ffca91724b

[issue47203] ImportError: DLL load failed while importing binascii: %1 is not a valid Win32 application.

2022-04-03 Thread Eryk Sun
Eryk Sun added the comment: The user site packages directory is architecture specific starting with 3.10, e.g. "%AppData%\Python\Python310-32\site-packages". The PYTHONPATH environment variable is shared by all versions. However, I don't understand how the binascii module could be a

[issue46126] Unittest output drives developers to avoid docstrings

2022-04-03 Thread Jason R. Coombs
Change by Jason R. Coombs : -- pull_requests: +30349 pull_request: https://github.com/python/cpython/pull/32288 ___ Python tracker ___

[issue47206] pickle docs are wrong about nested classes

2022-04-03 Thread Jelle Zijlstra
New submission from Jelle Zijlstra : https://docs.python.org/3.10/library/pickle.html#what-can-be-pickled-and-unpickled says that only "classes that are defined at the top level of a module" can be pickled. But in fact these work fine in current Python, probably since 3.3 when __qualname__

[issue47205] test_sched_getaffinity and setaffinity fail on FreeBSD buildbit

2022-04-03 Thread Christian Heimes
Christian Heimes added the comment: New changeset b82cdd1dac9a9be52051abd90a1ce69236ac41f4 by Christian Heimes in branch 'main': bpo-47205: Skip error check of sched_get/setaffinity on FreeBSD (GH-32285) https://github.com/python/cpython/commit/b82cdd1dac9a9be52051abd90a1ce69236ac41f4

[issue47205] test_sched_getaffinity and setaffinity fail on FreeBSD buildbit

2022-04-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +30348 pull_request: https://github.com/python/cpython/pull/32287 ___ Python tracker ___

[issue47205] test_sched_getaffinity and setaffinity fail on FreeBSD buildbit

2022-04-03 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +30347 pull_request: https://github.com/python/cpython/pull/32286 ___ Python tracker

[issue47205] test_sched_getaffinity and setaffinity fail on FreeBSD buildbit

2022-04-03 Thread Christian Heimes
Christian Heimes added the comment: Koob's build bot is a FreeBSD 14 host. FreeBSD 14 is under development and has not reached stable yet. I bet that the issue was caused by a recent system and Kernel upgrade. -- ___ Python tracker

[issue46614] Add option to output UTC datetimes as "Z" in `.isoformat()`

2022-04-03 Thread Paul Ganssle
Paul Ganssle added the comment: I think this approach is probably the best we can do, but I could also imagine that users might find it to be confusing behavior. I wonder if there's any informal user testing we can do? I guess the ISO 8601 spec does call "Z" the "UTC designator", so

[issue47205] test_sched_getaffinity and setaffinity fail on FreeBSD buildbit

2022-04-03 Thread Ken Jin
Ken Jin added the comment: FWIW, seems like the buildbot started failing at either commit cb495a1e9f3acfcd8cb94a6b89c79d0909e3383f or 708812085355c92f32e547d1f1d1f29aefbbc27e. But I have no clue how commits changing the Windows build config can lead to test_posix failing. -- nosy:

[issue47205] test_sched_getaffinity and setaffinity fail on FreeBSD buildbit

2022-04-03 Thread Christian Heimes
Change by Christian Heimes : -- components: +FreeBSD ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47205] test_sched_getaffinity and setaffinity fail on FreeBSD buildbit

2022-04-03 Thread Christian Heimes
Christian Heimes added the comment: Koobs, please take a look. -- nosy: +koobs ___ Python tracker ___ ___ Python-bugs-list mailing

[issue47142] Document importlib.resources.abc.Traversable

2022-04-03 Thread Jason R. Coombs
Jason R. Coombs added the comment: Correction. In msg416618, link should have been: [docs for zipfile](https://docs.python.org/3/library/zipfile.html#zipinfo-objects) -- ___ Python tracker

[issue47142] Document importlib.resources.abc.Traversable

2022-04-03 Thread Jason R. Coombs
Jason R. Coombs added the comment: > Are the methods expected to raise specific exception types (e.g. if a > resource is missing, or you call iterdir on a “file”)? The short answer is no. The protocol does not stipulate specific exceptions. Perhaps it should be documented that any exceptions

[issue47142] Document importlib.resources.abc.Traversable

2022-04-03 Thread Jason R. Coombs
Jason R. Coombs added the comment: > Can the argument to `joinpath` contain path separators? Good question. Currently, I'm aware of three concrete implementations of Traversable.joinpath: - pathlib.Path.joinpath - zipfile.Path.joinpath - importlib.resources.simple.ResourceContainer.joinpath

[issue47205] test_sched_getaffinity and setaffinity fail on FreeBSD buildbit

2022-04-03 Thread Christian Heimes
Change by Christian Heimes : -- keywords: +patch pull_requests: +30346 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32285 ___ Python tracker

[issue47205] test_sched_getaffinity and setaffinity fail on FreeBSD buildbit

2022-04-03 Thread Christian Heimes
New submission from Christian Heimes : Two test cases have been failing on FreeBSD buildbot for a while. Let's skip the error check on FreeBSD for now. 0:27:24 load avg: 1.97 Re-running test_posix in verbose mode (matching: test_sched_getaffinity, test_sched_setaffinity)

[issue47185] code.replace(co_code=new_code) no longer catch exceptions on Python 3.11

2022-04-03 Thread Dominic Davis-Foster
Change by Dominic Davis-Foster : -- nosy: +dom1310df ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47152] Reorganize the re module sources

2022-04-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are two very different classes with similar names: _sre.SRE_Scanner and re.Scanner. The former is used to implement the Pattern.finditer() method, but it could be used in other cases. The latter is an experimental implementation of generalized lexer

[issue40280] Consider supporting emscripten/webassembly as a build target

2022-04-03 Thread Christian Heimes
Change by Christian Heimes : -- pull_requests: +30345 pull_request: https://github.com/python/cpython/pull/32284 ___ Python tracker ___

[issue23689] Memory leak in Modules/sre_lib.h

2022-04-03 Thread Ma Lin
Change by Ma Lin : -- pull_requests: +30344 pull_request: https://github.com/python/cpython/pull/32283 ___ Python tracker ___ ___

[issue46014] functools.singledispatch does not support Union types

2022-04-03 Thread Yurii Karabas
Change by Yurii Karabas <1998uri...@gmail.com>: -- pull_requests: +30343 pull_request: https://github.com/python/cpython/pull/32282 ___ Python tracker ___

[issue47196] Function pointer cast in test_imp

2022-04-03 Thread miss-islington
miss-islington added the comment: New changeset 3faa9f78d4b9a8c0fd4657b434bdb08ae1f28800 by Hood Chatham in branch 'main': bpo-47196: Fix one more PyInit function signature (GH-32280) https://github.com/python/cpython/commit/3faa9f78d4b9a8c0fd4657b434bdb08ae1f28800 --

[issue44800] Code readability: rename InterpreterFrame to `_Py_framedata`

2022-04-03 Thread Nick Coghlan
Nick Coghlan added the comment: New changeset 124227c95f310d2ecd4b567271ab1919fc7000cb by Nick Coghlan in branch 'main': bpo-44800: Document internal frame naming conventions (GH-32281) https://github.com/python/cpython/commit/124227c95f310d2ecd4b567271ab1919fc7000cb --

[issue47204] Ensure PyEval_GetGlobals() doesn't set an exception when returning NULL

2022-04-03 Thread Nick Coghlan
Nick Coghlan added the comment: Core dev forum thread for the C API question: https://discuss.python.org/t/subtle-c-api-discrepancy-pyeval-getlocals-vs-pyeval-getglobals-with-no-python-frame/14797 -- ___ Python tracker

[issue47204] Ensure PyEval_GetGlobals() doesn't set an exception when returning NULL

2022-04-03 Thread Nick Coghlan
New submission from Nick Coghlan : While working on the first PR for bpo-44800 I provoked an obscure failure in PyImport_ImportModule by making PyEval_GetGlobals set an exception when returning NULL (as PyEval_GetLocals has done since bpo-18408 was implemented for Python 3.4). This ticket