[issue43882] [security] CVE-2022-0391: urllib.parse should sanitize urls containing ASCII newline and tabs.

2022-02-06 Thread STINNER Victor
STINNER Victor added the comment: CVE-2022-0391 has been assigned to this vulnerability. -- nosy: +vstinner title: [security] urllib.parse should sanitize urls containing ASCII newline and tabs. -> [security] CVE-2022-0391: urllib.parse should sanitize urls containing ASCII newline a

[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-06 Thread Dong-hee Na
Dong-hee Na added the comment: @hydroflask It does not show impressive performance enhancement, so I decided not to change it See PR 31138 -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue46670] Build Python with -Wundef: don't use undefined macros

2022-02-06 Thread STINNER Victor
New submission from STINNER Victor : Building Python with "gcc -Wundef" emits many warnings about usage of undefined macros. If a macro is not defined, it is equal to 0. The problem is that a macro can be undefined because of a missing #include, or because of a typo in its name, or because "#

[issue46670] Build Python with -Wundef: don't use undefined macros

2022-02-06 Thread STINNER Victor
Change by STINNER Victor : -- keywords: +patch pull_requests: +29347 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31176 ___ Python tracker ___ _

[issue46670] Build Python with -Wundef: don't use undefined macros

2022-02-06 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29348 pull_request: https://github.com/python/cpython/pull/31177 ___ Python tracker ___ __

[issue46670] Build Python with -Wundef: don't use undefined macros

2022-02-06 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29349 pull_request: https://github.com/python/cpython/pull/31178 ___ Python tracker ___ __

[issue46670] Build Python with -Wundef: don't use undefined macros

2022-02-06 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29350 pull_request: https://github.com/python/cpython/pull/31179 ___ Python tracker ___ __

[issue46668] encodings: the "mbcs" alias doesn't work

2022-02-06 Thread Eryk Sun
Eryk Sun added the comment: > The Python 3.6 and 3.7 "codecs.register(_alias_mbcs)" doesn't work > because "search_function()" is tested before and it works for "cpXXX" > encodings. Isn't the 3.6-3.10 ordering of search_function() and _alias_mbcs() correct as a fallback? In this case, Pytho

[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-06 Thread hydroflask
hydroflask added the comment: @corona10 Thank you for looking into it. The benchmark you did is not reflective of my use-case. I have a codebase that I have completely converted into a C extension using mypyc. So the ctypes callback does not call into interpreted Python code but actually an

[issue46665] IDLE Windows shortcuts by default

2022-02-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: I wish it were otherwise, but configuration defaults cannot be changed as some people would not like it and it would badly interact with custom configurations. We can add new themes and keysets, but that should be very rare. We can consider adding bindings

[issue46671] "ValueError: min() arg is an empty sequence" is wrong (builtins.min/max)

2022-02-06 Thread Nnarol
New submission from Nnarol : Incorrect error message by min_max(): "ValueError: min() arg is an empty sequence" when using the form min(iterable, *[, default=obj, key=func]) -> value and "iterable" is empty, like so: min([]) or: min(set()) "Sequence" is referred to, even thoug

[issue46670] Build Python with -Wundef: don't use undefined macros

2022-02-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset 16f96a4cf9ab1e91e6e8e18232378bc4b42bb796 by Victor Stinner in branch 'main': bpo-46670: Remove unused get_frame_state() function (GH-31177) https://github.com/python/cpython/commit/16f96a4cf9ab1e91e6e8e18232378bc4b42bb796 -- _

[issue46670] Build Python with -Wundef: don't use undefined macros

2022-02-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset 097f74a5a37e2a8a26d529cede456ede7011b66f by Victor Stinner in branch 'main': bpo-46670: Define all macros for stringlib (GH-31176) https://github.com/python/cpython/commit/097f74a5a37e2a8a26d529cede456ede7011b66f -- __

[issue46670] Build Python with -Wundef: don't use undefined macros

2022-02-06 Thread STINNER Victor
Change by STINNER Victor : -- pull_requests: +29351 pull_request: https://github.com/python/cpython/pull/31180 ___ Python tracker ___ __

[issue46671] "ValueError: min() arg is an empty sequence" is wrong (builtins.min/max)

2022-02-06 Thread Nnarol
Change by Nnarol : -- keywords: +patch pull_requests: +29352 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31181 ___ Python tracker ___ _

[issue46670] Build Python with -Wundef: don't use undefined macros

2022-02-06 Thread STINNER Victor
STINNER Victor added the comment: New changeset b556f53785cb9ad8cc088ad8c10efee91fe3da58 by Victor Stinner in branch 'main': bpo-46670: Test if a macro is defined, not its value (GH-31178) https://github.com/python/cpython/commit/b556f53785cb9ad8cc088ad8c10efee91fe3da58 --

[issue46666] IDLE Add indent guide

2022-02-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: [Please just select the current development version. Others can be marked if and when backported. 3.8 and before only get security fixes. Same for 3.9 after about next May 31.] Please explain exactly what you want and rewrite something like the following.

[issue46671] "ValueError: min() arg is an empty sequence" is wrong (builtins.min/max)

2022-02-06 Thread Nnarol
Change by Nnarol : -- components: +Interpreter Core -Library (Lib) ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-06 Thread Dong-hee Na
Dong-hee Na added the comment: @hydroflask I am one of the big fans of applying vectorcall :) > The benchmark you did is not reflective of my use-case. I have a codebase > that I have completely converted into a C extension using mypyc. Can you provide me a minimal benchmarkable script(if y

[issue46665] IDLE Windows shortcuts by default

2022-02-06 Thread primexx
primexx added the comment: > I wish it were otherwise, but configuration defaults cannot be changed as > some people would not like it and it would badly interact with custom > configurations. that is a good point. perhaps just adding alternate keysets. this is clearly not a high priority i

[issue46611] Improve coverage of `__instancecheck__` and `__subclasscheck__` methods in `typing.py`

2022-02-06 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 067c03bf40d13393209f0138fa9c4d5980c4ff8a by Nikita Sobolev in branch 'main': bpo-46611: add coverage to instance and class checks in `typing.py` (GH-31078) https://github.com/python/cpython/commit/067c03bf40d13393209f0138fa9c4d5980c4ff8a ---

[issue46666] IDLE Add indent guide

2022-02-06 Thread primexx
primexx added the comment: > Please just select the current development version. Others can be marked if > and when backported oh sorry about that! > Please explain exactly what you want these dotted lines in the attached screenshot > What you see in the editor is what is saved (includin

[issue46589] Improve documentation for typing._GenericAlias

2022-02-06 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset a335d98f19b7fa66159d12932cc9a05eb2d8395f by Matthew Rahtz in branch 'main': bpo-46589: Improve documentation for typing._GenericAlias (GH-31026) https://github.com/python/cpython/commit/a335d98f19b7fa66159d12932cc9a05eb2d8395f -- __

[issue44796] Add __parameters__ and __getitem__ in TypeVar and ParamSpec

2022-02-06 Thread Guido van Rossum
Guido van Rossum added the comment: Super subtle stuff. Tonight I do not have time to really dive into this, but I think Serhiy is on to something. KJ or Jelle, do you have the guts to dive in here? -- ___ Python tracker

[issue43882] [security] CVE-2022-0391: urllib.parse should sanitize urls containing ASCII newline and tabs.

2022-02-06 Thread Mike Lissner
Mike Lissner added the comment: Looks like that CVE isn't public yet. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-0391 Any chance I can get access (I originally reported this vuln.). My email is m...@free.law, if it's possible and my email is needed. Thanks! -- ___

[issue45955] Calling read() on HTTPError may cause KeyError in tempfile

2022-02-06 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue46666] IDLE Add indent guide

2022-02-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: I loaded a .py file into N++ and see them. Under 3 x, there are clearly separate minidots. Under 10x, the dots are hardly visible. They are not characters in the text (cannot be copied) but a special manipulation of the column of pixels 'between' spaces.

[issue46666] IDLE Add indent guide

2022-02-06 Thread Raymond Hettinger
Raymond Hettinger added the comment: If this were possible, it would be really nice to have. FWIW, the rich¹ project was able to pull this off in regular text terminal window: $ python3.10 -m pip install rich $ python3.10 -m rich.pretty { │ 'foo': [1, 'Hello World!', 100.123, 323.232, 43232

[issue46666] IDLE Add indent guide

2022-02-06 Thread Terry J. Reedy
Terry J. Reedy added the comment: '│' is a bit taller that ascii bar '|'; hex(ord('│')) = '0x2502'. It is a bit heavy. In this Windows Firefox box it is slightly lighter than | but in IDLE with Source Code Pro, it is slightly darder. Worse is being centered instead of on one edge. We wou

[issue46672] NameError in asyncio.gather when passing a invalid type as an arg with multiple awaitables

2022-02-06 Thread arl
New submission from arl : It is possible to cause a NameError in asyncio.gather if the second presumed coroutine fails the internal type check. Sample code: import asyncio async def main(): coros = (asyncio.sleep(1), {1: 1}) await asyncio.gather(*coros) asyncio.run(main()) Excepti

[issue46611] Improve coverage of `__instancecheck__` and `__subclasscheck__` methods in `typing.py`

2022-02-06 Thread Nikita Sobolev
Change by Nikita Sobolev : -- pull_requests: +29354 pull_request: https://github.com/python/cpython/pull/31182 ___ Python tracker ___ __

[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-06 Thread hydroflask
hydroflask added the comment: Okay I put together a benchmark that better exemplifies my use case and results are in favor of adding patch. When bench_callback_v2.py is not compiled with mypyc I see a ~10% reduction in runtime: $ unpatched-env/bin/python bench_callback_v2.py 1.12622

[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-06 Thread Dong-hee Na
Dong-hee Na added the comment: @vstinner I got a similar result from hydroflask's benchmark. I think that is worth reopening this issue WDYT? -- nosy: +erlendaasland, vstinner ___ Python tracker ___

[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-06 Thread Dong-hee Na
Dong-hee Na added the comment: @hydroflask Would you like to run your benchmark with my latest PR? -- ___ Python tracker ___ ___ P

[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-06 Thread hydroflask
hydroflask added the comment: Vanilla bench_callback_v2.py, not compiled with mypyc: $ env/bin/python bench_callback_v2.py 1.114047016017139 $ env2/bin/python bench_callback_v2.py 0.9644024870358407 ~13% reduction in runtime. Nice job! --

[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-06 Thread Dong-hee Na
Change by Dong-hee Na : Added file: https://bugs.python.org/file50610/bench_callback_v3.py ___ Python tracker ___ ___ Python-bugs-list maili

[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-06 Thread Dong-hee Na
Dong-hee Na added the comment: With v3 benchmark Mean +- std dev: [base] 1.32 us +- 0.02 us -> [opt] 1.18 us +- 0.02 us: 1.13x faster -- ___ Python tracker ___ _

[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-06 Thread Dong-hee Na
Change by Dong-hee Na : -- stage: resolved -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue46323] Use _PyObject_Vectorcall in Modules/_ctypes/callbacks.c

2022-02-06 Thread Dong-hee Na
Change by Dong-hee Na : -- resolution: wont fix -> status: closed -> open ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue40479] Port _hashlib to OpenSSL 3.0.0

2022-02-06 Thread miss-islington
miss-islington added the comment: New changeset 59e004af63742361b67d1e1ae70229ff0db1059d by Zackery Spytz in branch 'main': bpo-40479: Fix undefined behavior in Modules/_hashopenssl.c (GH-31153) https://github.com/python/cpython/commit/59e004af63742361b67d1e1ae70229ff0db1059d -- __

[issue40479] Port _hashlib to OpenSSL 3.0.0

2022-02-06 Thread miss-islington
Change by miss-islington : -- pull_requests: +29355 pull_request: https://github.com/python/cpython/pull/31183 ___ Python tracker ___ __

[issue40479] Port _hashlib to OpenSSL 3.0.0

2022-02-06 Thread miss-islington
Change by miss-islington : -- pull_requests: +29356 pull_request: https://github.com/python/cpython/pull/31184 ___ Python tracker ___ __

<    1   2