[issue46510] Update Python2-style exception handling

2022-01-24 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +patch
pull_requests: +29058
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30878

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46510] Update Python2-style exception handling

2022-01-24 Thread Irit Katriel


New submission from Irit Katriel :

Following issue45711 the redundancy in exc_info is now explicit. This means 
that we can now safely update places that still use python2-style exception 
handling code, like:

exc_type, exc_value = sys.exc_info()[:2]
try:
response = dumps(
Fault(1, "%s:%s" % (exc_type, exc_value)),
encoding=self.encoding, allow_none=self.allow_none)
response = response.encode(self.encoding, 'xmlcharrefreplace')
finally:
# Break reference cycle
exc_type = exc_value = None

--
assignee: iritkatriel
components: Library (Lib)
messages: 411561
nosy: iritkatriel
priority: normal
severity: normal
status: open
title: Update Python2-style exception handling
type: enhancement
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46496] idlelib/NEWS.txt for 3.11.0 and backports

2022-01-24 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +29057
pull_request: https://github.com/python/cpython/pull/30877

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46496] idlelib/NEWS.txt for 3.11.0 and backports

2022-01-24 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +29056
pull_request: https://github.com/python/cpython/pull/30876

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46496] idlelib/NEWS.txt for 3.11.0 and backports

2022-01-24 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch
pull_requests: +29055
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30875

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2022-01-24 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 8464fbc42ecc9ce504faac499711dcdc6eedef16 by Christian Heimes in 
branch 'main':
bpo-40280: Skip subprocess-based tests on wasm32-emscripten (GH-30615)
https://github.com/python/cpython/commit/8464fbc42ecc9ce504faac499711dcdc6eedef16


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41841] idlelib/NEWS.txt for 3.10.0 and backports

2022-01-24 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset ce79b504a790d02c080449d31356d33a5aaf19dd by Miss Islington (bot) 
in branch '3.10':
bpo-41841: update idlelib News up to 3.10.0. (GH-30868) (GH-30870)
https://github.com/python/cpython/commit/ce79b504a790d02c080449d31356d33a5aaf19dd


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41841] idlelib/NEWS.txt for 3.10.0 and backports

2022-01-24 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 98cabce59958914b59914abbffbfde7129d4c47f by Terry Jan Reedy in 
branch '3.9':
bpo-41841: update idlelib News up to 3.10.0 (GH-30871)
https://github.com/python/cpython/commit/98cabce59958914b59914abbffbfde7129d4c47f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46491] typing: allow Annotated in outermost scope

2022-01-24 Thread miss-islington


miss-islington  added the comment:


New changeset e1abffca45b60729c460e3e2ad50c8c1946cfd4e by Gregory Beauregard in 
branch 'main':
bpo-46491: Allow Annotated on outside of Final/ClassVar (GH-30864)
https://github.com/python/cpython/commit/e1abffca45b60729c460e3e2ad50c8c1946cfd4e


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46491] typing: allow Annotated in outermost scope

2022-01-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29054
pull_request: https://github.com/python/cpython/pull/30874

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46491] typing: allow Annotated in outermost scope

2022-01-24 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +29053
pull_request: https://github.com/python/cpython/pull/30873

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46476] Not all memory allocated by _Py_Quicken() is released at Python exit

2022-01-24 Thread Kumar Aditya


Kumar Aditya  added the comment:

In the end I was able to restore the codeobjects before they were quickened so 
it works for both embedded and python command now. See the latest commits and 
it is also ready for review now.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44796] Add __parameters__ and __getitem__ in TypeVar and ParamSpec

2022-01-24 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

The linked PR makes `T = TypeVar("T"); T[int]` work. That's not currently 
meaningful syntax to the type checker, but we may want it in the future for 
higher-kinded types. I would rather not make this change without a clear static 
typing use case in mind.

--
nosy: +Jelle Zijlstra

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46509] Type-specialized Py_DECREF

2022-01-24 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

This attempts to avoid the dispatch dance of

Py_DECREF(op) :: Py_TYPE(op)->tp_dealloc(op) :: Py_TYPE(op)->tp_free((PyObject 
*)op);

I suspect this earns the most speedup from floats, where freelist manipulation 
can be inlined. This might make a single-digit-int freelist more impactful.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46509] Type-specialized Py_DECREF

2022-01-24 Thread Dennis Sweeney


Change by Dennis Sweeney :


--
keywords: +patch
pull_requests: +29052
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30872

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46509] Type-specialized Py_DECREF

2022-01-24 Thread Dennis Sweeney


New submission from Dennis Sweeney :

GCC --enable-optimizations --with-lto on WSL:

Slower (7):
- json_dumps: 12.8 ms +- 0.2 ms -> 13.1 ms +- 0.3 ms: 1.02x slower
- meteor_contest: 106 ms +- 2 ms -> 109 ms +- 3 ms: 1.02x slower
- telco: 6.50 ms +- 0.17 ms -> 6.58 ms +- 0.18 ms: 1.01x slower
- fannkuch: 383 ms +- 5 ms -> 388 ms +- 8 ms: 1.01x slower
- regex_compile: 143 ms +- 2 ms -> 145 ms +- 4 ms: 1.01x slower
- mako: 11.1 ms +- 0.1 ms -> 11.2 ms +- 0.2 ms: 1.01x slower
- chameleon: 7.08 ms +- 0.07 ms -> 7.12 ms +- 0.10 ms: 1.01x slower

Faster (27):
- unpack_sequence: 45.9 ns +- 1.1 ns -> 41.6 ns +- 1.0 ns: 1.10x faster
- logging_silent: 108 ns +- 11 ns -> 101 ns +- 3 ns: 1.06x faster
- nbody: 95.6 ms +- 3.2 ms -> 90.2 ms +- 1.9 ms: 1.06x faster
- spectral_norm: 98.3 ms +- 2.3 ms -> 92.8 ms +- 1.6 ms: 1.06x faster
- regex_dna: 202 ms +- 3 ms -> 194 ms +- 3 ms: 1.04x faster
- scimark_fft: 342 ms +- 12 ms -> 331 ms +- 7 ms: 1.03x faster
- crypto_pyaes: 89.6 ms +- 1.7 ms -> 86.8 ms +- 1.1 ms: 1.03x faster
- json_loads: 27.4 us +- 0.9 us -> 26.5 us +- 1.3 us: 1.03x faster
- scimark_monte_carlo: 69.3 ms +- 1.5 ms -> 67.3 ms +- 1.2 ms: 1.03x faster
- pickle_list: 4.62 us +- 0.21 us -> 4.51 us +- 0.15 us: 1.02x faster
- scimark_sparse_mat_mult: 5.14 ms +- 0.21 ms -> 5.02 ms +- 0.18 ms: 1.02x 
faster
- xml_etree_parse: 161 ms +- 5 ms -> 157 ms +- 6 ms: 1.02x faster
- regex_effbot: 3.07 ms +- 0.05 ms -> 3.00 ms +- 0.07 ms: 1.02x faster
- deltablue: 4.36 ms +- 0.14 ms -> 4.27 ms +- 0.14 ms: 1.02x faster
- pickle_pure_python: 343 us +- 6 us -> 335 us +- 8 us: 1.02x faster
- sqlite_synth: 2.60 us +- 0.06 us -> 2.55 us +- 0.04 us: 1.02x faster
- xml_etree_iterparse: 110 ms +- 2 ms -> 108 ms +- 2 ms: 1.02x faster
- go: 146 ms +- 2 ms -> 143 ms +- 3 ms: 1.02x faster
- pathlib: 20.2 ms +- 0.5 ms -> 19.8 ms +- 0.3 ms: 1.02x faster
- scimark_sor: 117 ms +- 3 ms -> 115 ms +- 2 ms: 1.02x faster
- dulwich_log: 80.9 ms +- 2.0 ms -> 79.6 ms +- 1.7 ms: 1.02x faster
- nqueens: 84.4 ms +- 1.7 ms -> 83.1 ms +- 2.0 ms: 1.02x faster
- python_startup: 8.84 ms +- 0.07 ms -> 8.76 ms +- 0.07 ms: 1.01x faster
- 2to3: 269 ms +- 4 ms -> 266 ms +- 3 ms: 1.01x faster
- float: 77.0 ms +- 1.2 ms -> 76.5 ms +- 1.5 ms: 1.01x faster
- sympy_integrate: 22.7 ms +- 0.3 ms -> 22.5 ms +- 0.2 ms: 1.01x faster
- xml_etree_process: 55.7 ms +- 0.7 ms -> 55.4 ms +- 0.6 ms: 1.01x faster

Benchmark hidden because not significant (24): chaos, django_template, hexiom, 
logging_format, logging_simple, pickle, pickle_dict, pidigits, pyflate, 
python_startup_no_site, raytrace, regex_v8, richards, scimark_lu, 
sqlalchemy_declarative, sqlalchemy_imperative, sympy_expand, sympy_sum, 
sympy_str, tornado_http, unpickle, unpickle_list, unpickle_pure_python, 
xml_etree_generate

Geometric mean: 1.01x faster

--
components: Interpreter Core
messages: 411553
nosy: Dennis Sweeney
priority: normal
severity: normal
status: open
title: Type-specialized Py_DECREF
type: performance
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41841] idlelib/NEWS.txt for 3.10.0 and backports

2022-01-24 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +29051
pull_request: https://github.com/python/cpython/pull/30871

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41841] idlelib/NEWS.txt for 3.10.0 and backports

2022-01-24 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 1.0 -> 2.0
pull_requests: +29050
pull_request: https://github.com/python/cpython/pull/30870

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41841] idlelib/NEWS.txt for 3.10.0 and backports

2022-01-24 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 9d3c9788a6ccd4f2f53a147dd0026a316c396976 by Terry Jan Reedy in 
branch 'main':
bpo-41841: update idlelib News up to 3.10.0. (GH-30868)
https://github.com/python/cpython/commit/9d3c9788a6ccd4f2f53a147dd0026a316c396976


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41841] idlelib/NEWS.txt for 3.10.0 and backports

2022-01-24 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
superseder: IDLE subsection of What's New 3.11 -> idlelib/NEWS.txt for 3.11.0 
and backports

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41841] idlelib/NEWS.txt for 3.10.0 and backports

2022-01-24 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +29049
pull_request: https://github.com/python/cpython/pull/30868

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46503] assertion failure in Parser/string_parser.c

2022-01-24 Thread Eric V. Smith


Change by Eric V. Smith :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46503] assertion failure in Parser/string_parser.c

2022-01-24 Thread Eric V. Smith


Eric V. Smith  added the comment:


New changeset 894e8c13484822458d53cc77c9265b7a88450a4b by Miss Islington (bot) 
in branch '3.10':
bpo-46503: Prevent an assert from firing when parsing some invalid \N sequences 
in f-strings. (GH-30865) (GH-30866)
https://github.com/python/cpython/commit/894e8c13484822458d53cc77c9265b7a88450a4b


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46503] assertion failure in Parser/string_parser.c

2022-01-24 Thread Eric V. Smith


Eric V. Smith  added the comment:


New changeset c314e3e829943b186e1c894071f00c613433cfe5 by Miss Islington (bot) 
in branch '3.9':
bpo-46503: Prevent an assert from firing when parsing some invalid \N sequences 
in f-strings. (GH-30865) (30867)
https://github.com/python/cpython/commit/c314e3e829943b186e1c894071f00c613433cfe5


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46503] assertion failure in Parser/string_parser.c

2022-01-24 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29048
pull_request: https://github.com/python/cpython/pull/30867

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46503] assertion failure in Parser/string_parser.c

2022-01-24 Thread Eric V. Smith


Eric V. Smith  added the comment:


New changeset 0daf72194bd4e31de7f12020685bb39a14d6f45e by Eric V. Smith in 
branch 'main':
bpo-46503: Prevent an assert from firing when parsing some invalid \N sequences 
in f-strings. (GH-30865)
https://github.com/python/cpython/commit/0daf72194bd4e31de7f12020685bb39a14d6f45e


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46503] assertion failure in Parser/string_parser.c

2022-01-24 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 4.0 -> 5.0
pull_requests: +29047
pull_request: https://github.com/python/cpython/pull/30866

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46503] assertion failure in Parser/string_parser.c

2022-01-24 Thread Eric V. Smith


Eric V. Smith  added the comment:

Note that f'\N ' (with a single space) isn't enough to trigger this behavior. 
It requires at least two characters after the '\N'. The first is when the 
invalid string is recognized, and it's the presence of the second character 
that triggers the failed assert.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44733] Feature request: maxtasksperchild for ProcessPoolExecutor

2022-01-24 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

As this is a new feature, it would also be reasonable to have specifying 
max_tasks_per_child without explicitly specifying a mp_context default to a 
safe mp_context.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44733] Feature request: maxtasksperchild for ProcessPoolExecutor

2022-01-24 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

from discussion on the other bug it looks like we should have a way to keep 
this; we just need to not allow it when the mp_context to be used is the 'fork' 
one.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46464] concurrent.futures.ProcessPoolExecutor can deadlock when tcmalloc is used

2022-01-24 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

and similarly, the dynamic spawning could be kept when the mp_context is spawn 
(and possibly forkserver).

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46503] assertion failure in Parser/string_parser.c

2022-01-24 Thread Eric V. Smith


Change by Eric V. Smith :


--
keywords: +patch
pull_requests: +29046
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/30865

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46464] concurrent.futures.ProcessPoolExecutor can deadlock when tcmalloc is used

2022-01-24 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

It sounds like we need to introspect the mp_context= passed to 
ProcessPoolExecutor (and it's default when None) to raise an error when 
max_tasks_per_child is incompatible with it.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44723] Codec name normalization breaks custom codecs

2022-01-24 Thread Inada Naoki


Change by Inada Naoki :


--
nosy: +methane

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46464] concurrent.futures.ProcessPoolExecutor can deadlock when tcmalloc is used

2022-01-24 Thread Inada Naoki


Inada Naoki  added the comment:

> The only way to safely launch worker processes on demand is to spawn a worker 
> launcher process spawned prior to any thread creation that remains idle, with 
> a sole job of spawn new worker processes for us. That sounds complicated. 
> That'd be a feature. Lets go with the bugfix first.

fork is not the only way to launch worker process. We have spawn. And sapwn is 
the default for macOS since Python 3.8.

Simple reverting seems not good for macOS users, since they need to pay cost 
for both of pre-spawning and spawn.
Can't we just pre-spawn only when fork is used?

--
nosy: +methane

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46504] Faster code for trial quotient in x_divrem

2022-01-24 Thread Tim Peters


Change by Tim Peters :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46504] Faster code for trial quotient in x_divrem

2022-01-24 Thread Tim Peters


Tim Peters  added the comment:


New changeset 7c26472d09548905d8c158b26b6a2b12de6cdc32 by Tim Peters in branch 
'main':
bpo-46504: faster code for trial quotient in x_divrem() (GH-30856)
https://github.com/python/cpython/commit/7c26472d09548905d8c158b26b6a2b12de6cdc32


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46406] optimize int division

2022-01-24 Thread Tim Peters


Tim Peters  added the comment:


New changeset 7c26472d09548905d8c158b26b6a2b12de6cdc32 by Tim Peters in branch 
'main':
bpo-46504: faster code for trial quotient in x_divrem() (GH-30856)
https://github.com/python/cpython/commit/7c26472d09548905d8c158b26b6a2b12de6cdc32


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46508] codec name acceptance became way too lenient in 3.9

2022-01-24 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

while figuring this issue out, it may also make sense to address 
https://bugs.python.org/issue44723 as well.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32958] socket module calls with long host names can fail with idna codec error

2022-01-24 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

ablack: the basic auth username:password@ part of the string is not part of a 
hostname.  What code are you seeing that is trying to send that to a name 
resolver rather than stripping the obviously private info up through the @ sign?

--
nosy: +gregory.p.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44723] Codec name normalization breaks custom codecs

2022-01-24 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
nosy: +gregory.p.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.

2022-01-24 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

note that Bodo's own followup issue about the breaking change for python-iconv 
was filed as https://bugs.python.org/issue44723

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.

2022-01-24 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

(note: this might not be the true cause of that issue; though it sounds 
potentially related - I haven't investigated far enough yet)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37751] In codecs, function 'normalizestring' should convert both spaces and hyphens to underscores.

2022-01-24 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

https://bugs.python.org/issue46508 filed to track fixing the acceptance and use 
of garbage codec values regression that this caused.

--
nosy: +gregory.p.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46508] codec name acceptance became way too lenient in 3.9

2022-01-24 Thread Gregory P. Smith

New submission from Gregory P. Smith :

in 3.8 this was not a valid codec name: "เ_เ_เ_iDnA"
in 3.9 it gets treated as idna and triggers the punycode decoder when passed to 
bytes.decode(codec).

Discovered by oss-fuzz.

_Likely_ a consequence of https://bugs.python.org/issue37751

The consequences of this change are that anyone can stuff heinous strings into 
codec names and get a non-LookupError behavior out of them. Anywhere codecs can 
be part of user input this has many interesting potential negative consequences.

<=3.8 gave `LookupError("unknown encoding: ...`

--
keywords: 3.9regression
messages: 411535
nosy: gregory.p.smith
priority: normal
severity: normal
stage: needs patch
status: open
title: codec name acceptance became way too lenient in 3.9
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33205] GROWTH_RATE prevents dict shrinking

2022-01-24 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Should this have been "filled*3" rather than "used*3"?

The intent was to give a larger resize to dict that had a lot of dummy entries 
and a smaller resize to dicts without deletions.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26276] Inconsistent behaviour of PEP 3101 formatting between versions

2022-01-24 Thread Irit Katriel


Irit Katriel  added the comment:

Reproduced on 3.11.

--
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22045] Python make issue

2022-01-24 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46491] typing: allow Annotated in outermost scope

2022-01-24 Thread Gregory Beauregard


Change by Gregory Beauregard :


--
keywords: +patch
pull_requests: +29045
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30864

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13011] Frozen programs require the original build directory in order to run.

2022-01-24 Thread Irit Katriel


Irit Katriel  added the comment:

This seems very outdated, can we close it?

--
nosy: +iritkatriel
resolution:  -> out of date
status: open -> pending

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue11322] encoding package's normalize_encoding() function is too slow

2022-01-24 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
nosy: +gregory.p.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46503] assertion failure in Parser/string_parser.c

2022-01-24 Thread Eric V. Smith


Eric V. Smith  added the comment:

This triggers the same problem:
f'\N  '
ast.literal_eval() isn't needed.

I think it's just the assert that's wrong, but I'm still checking.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43545] Use LOAD_GLOBAL to set __module__ in class def

2022-01-24 Thread Irit Katriel


Irit Katriel  added the comment:

Can you explain what the bug is with code to reproduce it?

--
nosy: +iritkatriel
status: open -> pending

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue40735] test_nntplib depends on unreliable external servers

2022-01-24 Thread Irit Katriel


Irit Katriel  added the comment:

Following discussion with Zach and Victor: This is probably an issue with the 
external servers these tests used. The fix would be to rewrite the tests so 
that they don't rely on external infrastructure.

--
nosy: +iritkatriel, vstinner, zach.ware
title: test_nntplib: sporadic failures, 
NetworkedNNTP_SSLTests.test_with_statement -> test_nntplib depends on 
unreliable external servers
type: behavior -> enhancement
versions: +Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41209] Scripts Folder is Empty

2022-01-24 Thread Irit Katriel


Irit Katriel  added the comment:

3.8 is no longer maintained. Please create a new issue if you are having this 
problem with a current python version.

--
nosy: +iritkatriel
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38886] permissions too restrictive in zipfile.writestr

2022-01-24 Thread Irit Katriel


Irit Katriel  added the comment:

Closed issue23976 as duplicate of this.

--
nosy: +iritkatriel
type: behavior -> enhancement
versions: +Python 3.11 -Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32202] [ctypes] all long double tests fail on android-24-x86_64

2022-01-24 Thread Irit Katriel


Irit Katriel  added the comment:

3.7 is no longer being maintained. Please create a new issue if you are having 
this problem on a current version (>= 3.9)

--
nosy: +iritkatriel
resolution:  -> out of date
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32203] [ctypes] test_struct_by_value fails on android-24-arm64

2022-01-24 Thread Irit Katriel


Irit Katriel  added the comment:

3.7 is no longer being maintained. Please create a new issue if you are having 
this problem on a current version (>= 3.9)

--
nosy: +iritkatriel
resolution:  -> out of date
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31357] Expose `worker_target` and `workitem_cls` as arugments to customize `ThreadPoolExecutor` behaviour

2022-01-24 Thread Irit Katriel


Change by Irit Katriel :


--
type: behavior -> enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42982] Update suggested number of iterations for pbkdf2_hmac()

2022-01-24 Thread April King


April King  added the comment:

Django uses 390,000 iterations as of late 2021, as does the Python Cryptography 
project. We should be aligned with their recommendations, or at least a good 
deal closer than we are now.

390,000 actually makes it a conservative recommendation for key derivation, as 
that number of rounds takes ~133ms to compute on my M1 versus 36ms. Usually 
you're shooting for ~250ms.

Being off by ~50% is probably okay, being off by this much is considerably 
worse.

Anyways, I'd be happy to make such a PR if folks are amenable to it.

--
nosy: +april

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39064] ValueError in zipfile.ZipFile

2022-01-24 Thread Irit Katriel


Irit Katriel  added the comment:

It's easy enough to convert the exception type (see patch), but I don't know 
how to write a unit test for this.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39064] ValueError in zipfile.ZipFile

2022-01-24 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +patch
pull_requests: +29044
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30863

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46416] Direct invocation of `Lib/test/test_typing.py` fails

2022-01-24 Thread Nikita Sobolev

Nikita Sobolev  added the comment:

During this work some people have mentioned that they actually use
`'__main__'` for local debugging of tests.
I don't think that I am familiar enough with the existing workflow to make
any educated decision :)

пн, 24 янв. 2022 г. в 19:34, Christian Heimes :

>
> Christian Heimes  added the comment:
>
> I noticed that you have been looking into the __main__ block of test
> modules. Wouldn't it make more sense to just remove the __main__ and have
> all tests go through regrtest? Everybody should use
>
>./python -m regrtest test_typing
>
> or the Windows equivalent to run typing tests.
>
> --
> nosy: +christian.heimes
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46431] Trouble subclassing ExceptionGroup

2022-01-24 Thread Irit Katriel


Irit Katriel  added the comment:

Thank you Petr.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46431] Trouble subclassing ExceptionGroup

2022-01-24 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset b18fd54f8c27e4b2aac222e75ac58aa85e5a7988 by Irit Katriel in 
branch 'main':
bpo-46431: Add example of subclassing ExceptionGroup. Document the message and 
exceptions attributes (GH-30852)
https://github.com/python/cpython/commit/b18fd54f8c27e4b2aac222e75ac58aa85e5a7988


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46431] Trouble subclassing ExceptionGroup

2022-01-24 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 573b54515740ce51dcf2402038a9d953aa6c317f by Irit Katriel in 
branch 'main':
bpo-46431: improve error message on invalid calls to BaseExceptionGroup.__new__ 
(GH-30854)
https://github.com/python/cpython/commit/573b54515740ce51dcf2402038a9d953aa6c317f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46483] `pathlib.PurePath.__class_getitem__` does not return `GenericAlias`

2022-01-24 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This issue is not related to the parser, so I am unmarking it.

--
components:  -Parser

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation

2022-01-24 Thread Humbdrag


Change by Humbdrag :


--
keywords: +patch
nosy: +humbdrag
nosy_count: 5.0 -> 6.0
pull_requests: +29043
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/30862

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46507] enabling cProfile to profile code given as an argument "à la" timeit

2022-01-24 Thread julien tayon


Change by julien tayon :


--
nosy: +matrixise

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46483] `pathlib.PurePath.__class_getitem__` does not return `GenericAlias`

2022-01-24 Thread Popo Al


Change by Popo Al :


--
components: +Parser, asyncio, email
nosy: +barry, lys.nikolaou, pablogsal, r.david.murray, yselivanov
type: behavior -> 
versions: +Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46507] enabling cProfile to profile code given as an argument "à la" timeit

2022-01-24 Thread julien tayon

New submission from julien tayon :

well, you want to use
python3 -mcProfile -othis.prof 'oneliner in python to test something'

And weirdly enough this normally expected behaviour does not work.

It's because last argument is expected to be the path of the script name to 
profile.

But, it can be fixed easily with no downside

Since it is an expected behaviour and is minimal changing anything in 
documentation or news seems to superfluous

An exemple of « this is a standard de fait » is the fact that the awesome 
module of vstinner timeit does this already.


https://github.com/python/cpython/pull/30859

--
components: Library (Lib)
messages: 411517
nosy: jul2, vstinner
priority: normal
pull_requests: 29042
severity: normal
status: open
title: enabling cProfile to profile code given as an argument "à la" timeit
type: enhancement
versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46490] Add "follow_symlinks=False" support for "os.utime()" on Windows

2022-01-24 Thread Eryk Sun


Change by Eryk Sun :


--
dependencies: +[Windows] wrap CreateFile to support follow_symlinks

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46506] [Windows] wrap CreateFile to support follow_symlinks

2022-01-24 Thread Eryk Sun


New submission from Eryk Sun :

Issue 46490 proposes to support follow_symlinks in os.utime() on Windows. 
Instead of duplicating the os.stat() implementation of follow_symlinks, I 
suggest factoring out a common _Py_CreateFile() function with two additional 
parameters: traverse (input) and pFileInfo (output).

The `traverse` parameter would indicate whether to traverse or open a 
name-surrogate reparse point. However, FILE_FLAG_OPEN_REPARSE_POINT should take 
precedence over `traverse` and open any type of reparse point.

The pFileInfo parameter would be an optional pointer to a struct that receives 
the file type (disk, char, pipe), file attributes, and reparse tag. Querying 
this information is required when `traverse` is false. There may as well be a 
way to return it.

Since Windows 7 hasn't been supported since 3.8, this is also an opportunity to 
switch to the newer CreateFile2() function [1], which is required in order to 
use new file flags added to the API such as FILE_FLAG_OPEN_REQUIRING_OPLOCK. 

---
[1] 
https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfile2

--
components: Extension Modules, Windows
messages: 411516
nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: [Windows] wrap CreateFile to support follow_symlinks
type: enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46500] make timeit module accept files

2022-01-24 Thread Arjun


Arjun  added the comment:

I was modifying the try/except/finally/else code generation and wanted to run 
my own benchmarks.

It's cumbersome to edit them in a command to test different variations, 
especially when you have to indent.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35095] Implement pathlib.Path.append_bytes and pathlib.Path.append_text

2022-01-24 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy:  -pablogsal

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35095] Implement pathlib.Path.append_bytes and pathlib.Path.append_text

2022-01-24 Thread Nuno André

Change by Nuno André :


--
nosy: +nuno
nosy_count: 3.0 -> 4.0
pull_requests: +29041
pull_request: https://github.com/python/cpython/pull/3811

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2022-01-24 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset d5fd438b38248a0d2e91898475369361e34f74b7 by Christian Heimes in 
branch 'main':
bpo-40280: Get help() working and more (GH-30858)
https://github.com/python/cpython/commit/d5fd438b38248a0d2e91898475369361e34f74b7


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46483] `pathlib.PurePath.__class_getitem__` does not return `GenericAlias`

2022-01-24 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy:  -gvanrossum

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2022-01-24 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +29040
pull_request: https://github.com/python/cpython/pull/30858

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue43333] utf8 in BytesGenerator

2022-01-24 Thread R. David Murray


R. David Murray  added the comment:

Yeah, I think we need a complete example here.

Note that in the general case there is no such thing as an RFC-valid email in 
unicode (which is what python strings are), though with utf8=True and an email 
involving only text you might get away with it.  I assume you've tried 
policy=policy.default.clone(utf=True) when creating the email?

It will probably help to encode the 'text' to utf8 and use message_from_bytes 
to read it, but that may not be your only problem.  It depends on exactly what 
is in the message and how the message gets recorded in your XML whether this is 
even going to work in the general case.  The xml conversion may have already 
lost information, but hopefully not.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46505] Simplify exception handling code in py_compile

2022-01-24 Thread Irit Katriel


Change by Irit Katriel :


--
components: +Library (Lib)
type:  -> enhancement
versions: +Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39511] [subinterpreters] Per-interpreter singletons (None, True, False, etc.)

2022-01-24 Thread Kuba Sunderland-Ober


Kuba Sunderland-Ober  added the comment:

I'm looking very much forward to isolated subinterpreters and thus the 
per-subinterpreter GIL, as I've been keeping a private exploratory project 
where I had to make them work.

Here are my thoughts:

1. Any sort of reference count on heavily used objects cannot be shared between 
the threads, even if its value is otherwise ignored. I.e., a write-only shared 
refcount is already a no-no. The mere fact that it's being modified from 
different threads is a performance bottleneck, as the cacheline that holds the 
refcount has to be shuttled between cores. That's a bad thing and the penalty 
only becomes worse as the time marches on.

2. For platforms where the C language supports thread-local storage (TLS) at 
the declaration level, it's trivial to have "global static" immortal objects 
become thread-local static. This could be perhaps an escape to keep old code 
working to an extent, as opposed to immediately breaking. On such platforms, 
the `PyGet_Foo` API can be on equal footing with the legacy `Py_Foo` statics, 
i.e. both would do the same thing. That's how I've done it in my experiment. 
The obvious problem is that on platforms without compiler support for TLS, 
`Py_Foo` would be unavailable, and that's probably a no-go for an API that 
wouldn't be deprecated. For portability, everyone should be using `PyGet_Foo`, 
iff platforms without language-level TLS support are of interest (are they? 
what would they be?)

--
nosy: +KubaO

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46505] Simplify exception handling code in py_compile

2022-01-24 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +patch
pull_requests: +29039
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/30857

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46503] assertion failure in Parser/string_parser.c

2022-01-24 Thread Eric V. Smith


Eric V. Smith  added the comment:

I'll take a look.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46503] assertion failure in Parser/string_parser.c

2022-01-24 Thread Eric V. Smith


Change by Eric V. Smith :


--
assignee: pablogsal -> eric.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46503] assertion failure in Parser/string_parser.c

2022-01-24 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Adding Eric as this seems to be in the f-string parser.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46505] Simplify exception handling code in py_compile

2022-01-24 Thread Irit Katriel


New submission from Irit Katriel :

PyCompileError takes both type and value of the exception, which is no longer 
necessary. Fortunately neither its constructor signature nor its fields are 
documented so it can be simplified.

--
messages: 411509
nosy: iritkatriel
priority: normal
severity: normal
status: open
title: Simplify exception handling code in py_compile

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46503] assertion failure in Parser/string_parser.c

2022-01-24 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +eric.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue41682] [Windows] test_asyncio: Proactor test_sendfile_close_peer_in_the_middle_of_receiving failure

2022-01-24 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Guido, I can not confirm your suggestion but it seems correct to me.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34680] asyncio event_loop fails when accessed from multiple threads

2022-01-24 Thread Irit Katriel


Irit Katriel  added the comment:

I think the script does violate the rule: 

t = threading.Thread(target=do_loop, args=(loop,))

and then do_loop closes the loop that was created in the main thread.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46504] Faster code for trial quotient in x_divrem

2022-01-24 Thread Tim Peters


Change by Tim Peters :


--
assignee:  -> tim.peters
nosy: +gregory.p.smith, mark.dickinson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34680] asyncio event_loop fails when accessed from multiple threads

2022-01-24 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

All asyncio loop methods except `loop.call_soon_threadsafe()` should be done 
from the same thread as been used for the loop creation.
Did you violate this rule?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46504] Faster code for trial quotient in x_divrem

2022-01-24 Thread Tim Peters


Change by Tim Peters :


--
keywords: +patch
pull_requests: +29037
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/30856

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46406] optimize int division

2022-01-24 Thread Tim Peters


Change by Tim Peters :


--
pull_requests: +29038
pull_request: https://github.com/python/cpython/pull/30856

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46504] Faster code for trial quotient in x_divrem

2022-01-24 Thread Tim Peters


Change by Tim Peters :


--
versions: +Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46504] Faster code for trial quotient in x_divrem

2022-01-24 Thread Tim Peters


New submission from Tim Peters :

x_divrem1() was recently (bpo-46406) changed to generate faster code for 
division, essentially nudging optimizing compilers into recognizing that modern 
processors compute the quotient and remainder with a single machine instruction.

The same can be done for x_divrem(), although it's less valuable there because 
the HW division generally accounts for a much smaller percent of its total 
runtime.

Still, it does cut a multiply and subtract out of the loop, and makes the code 
more obvious (since it brings x_divrem1() and x_divrem() back into synch).

--
components: Interpreter Core
messages: 411505
nosy: tim.peters
priority: normal
severity: normal
stage: needs patch
status: open
title: Faster code for trial quotient in x_divrem
type: performance

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34680] asyncio event_loop fails when accessed from multiple threads

2022-01-24 Thread Irit Katriel


Change by Irit Katriel :


--
title: asyncio event_loop close fails off main thread if signal handler 
registered -> asyncio event_loop fails when accessed from multiple threads

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46503] assertion failure in Parser/string_parser.c

2022-01-24 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
assignee:  -> pablogsal

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34680] asyncio event_loop close fails off main thread if signal handler registered

2022-01-24 Thread Irit Katriel


Irit Katriel  added the comment:

The documentation should explicitly mention that an event loop should be 
accessed from only one thread (it hints at this by referring to "the loop of 
the current thread" but I don't see this stated clearly).

In the code, it would be good if multi-threaded access failed with a clearer 
error.

--
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46503] assertion failure in Parser/string_parser.c

2022-01-24 Thread Gregory P. Smith


New submission from Gregory P. Smith :

```
>>> v = r"""f'\N  '"""
>>> import ast
>>> ast.literal_eval(v)
python: ../gpshead/Parser/string_parser.c:487: fstring_find_literal: Assertion 
`s == end || *s == '{' || *s == '}'' failed.
Aborted
```

this comes from oss-fuzz after enabling assert checks in its cpython builds. :)

https://oss-fuzz.com/testcase-detail/4805529363415040 & 
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=43730 for those who have 
access.

--
components: Parser
messages: 411503
nosy: gregory.p.smith, lys.nikolaou, pablogsal
priority: high
severity: normal
stage: needs patch
status: open
title: assertion failure in Parser/string_parser.c
type: crash
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   >