[issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved

2022-03-07 Thread Alex Waygood

Alex Waygood  added the comment:

Thanks so much to Ken, Łukasz, Jelle, Guido, and everybody else who helped 
review these PRs!

--

___
Python tracker 

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



[issue46953] use FASTCALL for __import__ builtin

2022-03-07 Thread Kumar Aditya


New submission from Kumar Aditya :

Use FASTCALL for __import__ builtin.

Benchmark:
--
import pyperf

runner = pyperf.Runner()
runner.timeit(name="bench __import__",
  stmt="__import__('asyncio')"


Result:

Mean +- std dev: [base] 191 ns +- 16 ns -> [patch] 112 ns +- 11 ns: 1.71x faster

--
components: Interpreter Core
messages: 414729
nosy: Dennis Sweeney, Mark.Shannon, kumaraditya303
priority: normal
pull_requests: 29865
severity: normal
status: open
title: use FASTCALL for __import__ builtin
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



[issue43574] Regression in overallocation for literal list initialization in v3.9+

2022-03-07 Thread Inada Naoki


Inada Naoki  added the comment:

Relating issue: https://twitter.com/nedbat/status/1489233208713437190
Current overallocation strategy is rough. We need to make it more smooth.

--
versions: +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



[issue43574] Regression in overallocation for literal list initialization in v3.9+

2022-03-07 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



[issue39829] __len__ called twice in the list() constructor

2022-03-07 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



[issue39829] __len__ called twice in the list() constructor

2022-03-07 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

Related to Matt's idea is https://bugs.python.org/issue43574

--
nosy: +Dennis Sweeney

___
Python tracker 

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



[issue46952] pip progress bar display bug

2022-03-07 Thread Dennis Sweeney


Change by Dennis Sweeney :


--
resolution:  -> third party
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



[issue46952] pip progress bar display bug

2022-03-07 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

pip is maintained externally at https://github.com/pypa/pip , so that is likely 
a better place to open an issue about pip.

--
nosy: +Dennis Sweeney

___
Python tracker 

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



[issue46952] pip progress bar display bug

2022-03-07 Thread 미사일

Change by 미사일 :


Added file: https://bugs.python.org/file50663/screen.jpg

___
Python tracker 

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



[issue46952] pip progress bar display bug

2022-03-07 Thread 미사일

Change by 미사일 :


--
components:  -2to3 (2.x to 3.x conversion tool)

___
Python tracker 

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



[issue46952] pip progress bar display bug

2022-03-07 Thread 미사일

New submission from 미사일 :

Pip progress bar isn't connect each other and overlap with other components.

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 414725
nosy: misileminecord
priority: normal
severity: normal
status: open
title: pip progress bar display bug
versions: Python 3.8

___
Python tracker 

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



[issue2771] Test issue

2022-03-07 Thread Ezio Melotti


Change by Ezio Melotti :


--
dependencies: +Add math.tau, Python source code build fails with old mercurial
superseder:  -> Test issue

___
Python tracker 

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



[issue39829] __len__ called twice in the list() constructor

2022-03-07 Thread Matt Wozniski


Matt Wozniski  added the comment:

Pardon me for necroing an old issue, but someone pointed out the surprising 
behavior of `__len__` being called twice by `list(iterable)`, and it caught my 
curiosity.

https://github.com/python/cpython/commit/372d705d958964289d762953d0a61622755f5386
 made it so that `list.__init__(iterable)` calls `iterable.__len__()` before 
calling `list.extend()`, to preallocate exactly the right amount of space, 
rather than allowing `list.extend()` to grow the array. That's because 
`list.extend()` can over-allocate.

What if instead, we made it so that `list.extend(iterable)` doesn't 
over-allocate when called on an empty list? In the two places where 
`list_extend` calls `list_resize` to grow the array, we'd check if 
`self->ob_item == NULL` and if so call `list_preallocate_exact` instead, and 
we'd remove the call to `list_preallocate_exact` from `list___init___impl`.

It seems like that ought to achieve the same goal as making `__init__` call 
preallocate exactly, without requiring the extra call to `__len__`.

--
nosy: +godlygeek

___
Python tracker 

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



[issue46951] Zipapp contents are in filesystem-dependent order

2022-03-07 Thread Henry Finucane


New submission from Henry Finucane :

Which makes builds non-reproducible. There was some mention of fixing this in 
https://bugs.python.org/issue30693, but it never got done.

--
components: Library (Lib)
messages: 414723
nosy: h.finucane
priority: normal
pull_requests: 29864
severity: normal
status: open
title: Zipapp contents are in filesystem-dependent order
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



[issue46494] Mention typing_extensions in the typing documentation

2022-03-07 Thread miss-islington


miss-islington  added the comment:


New changeset 0c718e02f60f98275c62e8a2a152f086650e88ea by Miss Islington (bot) 
in branch '3.9':
bpo-46494: Mention the typing_extensions pkg in typing docs (GH-31260)
https://github.com/python/cpython/commit/0c718e02f60f98275c62e8a2a152f086650e88ea


--

___
Python tracker 

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



[issue46494] Mention typing_extensions in the typing documentation

2022-03-07 Thread miss-islington


miss-islington  added the comment:


New changeset e053f0e9f41791095a924e2aceaaa025a058ed57 by Miss Islington (bot) 
in branch '3.10':
bpo-46494: Mention the typing_extensions pkg in typing docs (GH-31260)
https://github.com/python/cpython/commit/e053f0e9f41791095a924e2aceaaa025a058ed57


--

___
Python tracker 

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



[issue46878] [sqlite3] remove "non-standard" from docstrings

2022-03-07 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:


New changeset 4d95fa1ac5d31ff450fb2f31b55ce1eb99d6efcb by Erlend Egeberg 
Aasland in branch 'main':
bpo-46878: Purge 'non-standard' from sqlite3 docstrings (GH-31612)
https://github.com/python/cpython/commit/4d95fa1ac5d31ff450fb2f31b55ce1eb99d6efcb


--

___
Python tracker 

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



[issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved

2022-03-07 Thread miss-islington


miss-islington  added the comment:


New changeset e83f084084296a9b16b83b324a715045d3614c92 by Miss Islington (bot) 
in branch '3.9':
bpo-45680: Improve docs on subscriptions w.r.t. `GenericAlias` objects 
(GH-29479)
https://github.com/python/cpython/commit/e83f084084296a9b16b83b324a715045d3614c92


--

___
Python tracker 

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



[issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved

2022-03-07 Thread miss-islington


miss-islington  added the comment:


New changeset 06108c08ddbb4efda804eb74dd33928348102e6f by Miss Islington (bot) 
in branch '3.10':
bpo-45680: Improve docs on subscriptions w.r.t. `GenericAlias` objects 
(GH-29479)
https://github.com/python/cpython/commit/06108c08ddbb4efda804eb74dd33928348102e6f


--

___
Python tracker 

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



[issue46494] Mention typing_extensions in the typing documentation

2022-03-07 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29863
pull_request: https://github.com/python/cpython/pull/31747

___
Python tracker 

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



[issue46494] Mention typing_extensions in the typing documentation

2022-03-07 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 7.0 -> 8.0
pull_requests: +29862
pull_request: https://github.com/python/cpython/pull/31746

___
Python tracker 

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



[issue46494] Mention typing_extensions in the typing documentation

2022-03-07 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

Thanks for the patch!

--
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



[issue46494] Mention typing_extensions in the typing documentation

2022-03-07 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:


New changeset 8debeed3075bf4d7e568e65da16bec63cf276f4f by Meer Suri in branch 
'main':
bpo-46494: Mention the typing_extensions pkg in typing docs (GH-31260)
https://github.com/python/cpython/commit/8debeed3075bf4d7e568e65da16bec63cf276f4f


--

___
Python tracker 

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



[issue43224] Add support for PEP 646

2022-03-07 Thread Jelle Zijlstra


New submission from Jelle Zijlstra :


New changeset 7a793a388b017be635ea41ef75b0fd8bcf75a309 by Matthew Rahtz in 
branch 'main':
bpo-43224: Implement PEP 646 changes to typing.py (GH-31021)
https://github.com/python/cpython/commit/7a793a388b017be635ea41ef75b0fd8bcf75a309


--

___
Python tracker 

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



[issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved

2022-03-07 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

And now I think we're really done! Thanks for all your work here @AlexWaygood.

--
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



[issue46170] Improving the error message when subclassing NewType

2022-03-07 Thread Jelle Zijlstra


Change by Jelle Zijlstra :


--
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



[issue46170] Improving the error message when subclassing NewType

2022-03-07 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:


New changeset f391f9bf28f0bba7939d9f9e5a7a6396d2b0df62 by James Hilton-Balfe in 
branch 'main':
bpo-46170: Improve the error message when subclassing NewType (GH-30268)
https://github.com/python/cpython/commit/f391f9bf28f0bba7939d9f9e5a7a6396d2b0df62


--
nosy: +Jelle Zijlstra

___
Python tracker 

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



[issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved

2022-03-07 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:


New changeset 50731297a9b6d57eec3b3f89522785b23f7b3e71 by Alex Waygood in 
branch 'main':
bpo-45680: Improve docs on subscriptions w.r.t. `GenericAlias` objects 
(GH-29479)
https://github.com/python/cpython/commit/50731297a9b6d57eec3b3f89522785b23f7b3e71


--
nosy: +Jelle Zijlstra

___
Python tracker 

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



[issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved

2022-03-07 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29861
pull_request: https://github.com/python/cpython/pull/31744

___
Python tracker 

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



[issue45680] Documentation on `GenericAlias` objects and `__class_getitem__` could be improved

2022-03-07 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29860
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/31743

___
Python tracker 

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



[issue46948] [CVE-2022-26488] Escalation of privilege via Windows Installer

2022-03-07 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Is there anything on our end we can do to prevent this kind of issue in the 
future?

Am I wrong to see this as just fixing our package to avoid a design flaw in 
Windows OS level package management?

Certainly other packages in the world must run into similar problems.

--
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



[issue46947] unicodedata.name gives ValueError for control characters

2022-03-07 Thread Joe Cool

Joe Cool  added the comment:

My recommendation would be to add a keyword parameter, defaulting to False, to 
name(), something like give_full_alias, or maybe errors=“give_full_alias” like 
the IO functions.

In the meantime, as the author of perllib, I had to make my own dict to return 
to the user the same thing perl does, which is the full alias for these.

--

___
Python tracker 

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



[issue43923] Can't create generic NamedTuple as of py3.9

2022-03-07 Thread Guido van Rossum


Guido van Rossum  added the comment:

Playing tricks where compile-time and run-time see slightly different types is 
probably more productive than trying to revert a PR that was in Python 3.9 and 
3.10. :-)

I'm not opposed to supporting generic NamedTuple, but I expect the fix will 
never hit 3.9 and 3.10, and it needs to be a "fix forward" PR.

Would you mind closing the "revert" PR unmerged?

--

___
Python tracker 

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



[issue46841] Inline bytecode caches

2022-03-07 Thread Brandt Bucher


Change by Brandt Bucher :


--
pull_requests: +29859
pull_request: https://github.com/python/cpython/pull/31742

___
Python tracker 

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



[issue46947] unicodedata.name gives ValueError for control characters

2022-03-07 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

The behaviour is technically correct, but confusing and unfortunate, and I 
don't think we can fix it.

Unicode does not define names for the ASCII control characters. But it does 
define aliases for them, based on the C0 control char standard.

unicodedata.lookup() looks for aliases as well as names (since version 3.3).

https://www.unicode.org/Public/UNIDATA/UnicodeData.txt
https://www.unicode.org/Public/UNIDATA/NameAliases.txt

It is unfortunate that we have only a single function for looking up a unicode 
code point by name, alias, alias-abbreviation, and named-sequence. That keeps 
the API simple, but in corner cases like this it leads to confusion.

The obvious "fix" is to make name() return the alias if there is no official 
name to return, but that is a change in behaviour. I have code that assumes 
that C0 and C1 control characters have no name, and relies on name() raising an 
exception for them.

Even if we changed the behaviour to return the alias, which alias should be 
returned, the full alias or the abbreviation?

This doesn't fix the problem that name() and lookup() aren't inverses of each 
other:

lookup('NUL') -> '\0  # using the abbreviated alias
name('\0') -> 'NULL'  # returns the full alias (or vice versa)

It gets worse with named sequences:

>>> c = lookup('LATIN CAPITAL LETTER A WITH MACRON AND GRAVE')
>>> name(c)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: name() argument 1 must be a unicode character, not str
>>> len(c)
2

So we cannot possibly make name() and lookup() inverses of each other.

What we really should have had is separate functions for name and alias 
lookups, or better still, to expose the raw unicode tables as mappings and let 
people create their own higher-level interfaces.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue46932] Please update bundled libexpat to 2.4.7 with an important fix

2022-03-07 Thread Ned Deily


Ned Deily  added the comment:


New changeset f656bc1cdbdfaaa07f66ed97e011b258b97e2788 by Miss Islington (bot) 
in branch '3.7':
bpo-46932: Update bundled libexpat to 2.4.7 (GH-31736) (GH-31741)
https://github.com/python/cpython/commit/f656bc1cdbdfaaa07f66ed97e011b258b97e2788


--

___
Python tracker 

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



[issue45806] Cannot Recover From StackOverflow in 3.9 Tests

2022-03-07 Thread Dennis Sweeney


Dennis Sweeney  added the comment:

Should this be backported to make the 3.8 Buildbots happy?

--

___
Python tracker 

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



[issue43923] Can't create generic NamedTuple as of py3.9

2022-03-07 Thread Steven Silvester


Steven Silvester  added the comment:

The use case that prompted https://github.com/python/cpython/pull/31679 is that 
we are adding typings to `PyMongo`.  We are late to using typings,  because we 
only recently dropped Python 2.7 support.  

We have an existing options class that subclasses `NamedTuple`.  We would like 
to make that class `Generic`, but are currently blocked.  

Our current workaround is to create a separate stub file that uses `class 
CodecOptions(Tuple, Generic[T])` and explicitly re-declares the `NamedTuple` 
API.

Switching to `dataclass` would be disruptive, since we still support Python 3.6 
and only rely on the standard library.  We would also require a major version 
update since it would be an API change.

--
nosy: +Steven Silvester

___
Python tracker 

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



[issue46933] Make pwd module optional for wasm32-emscripten and wasi

2022-03-07 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 47cca0492b3c379823d4bdb600be56a633e5bb88 by Erlend Egeberg 
Aasland in branch 'main':
bpo-46933: Fix make distclean regression (GH-31737)
https://github.com/python/cpython/commit/47cca0492b3c379823d4bdb600be56a633e5bb88


--

___
Python tracker 

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



[issue46932] Please update bundled libexpat to 2.4.7 with an important fix

2022-03-07 Thread miss-islington


miss-islington  added the comment:


New changeset f46a04469114047ff7a4078619450c590ae3f287 by Miss Islington (bot) 
in branch '3.9':
bpo-46932: Update bundled libexpat to 2.4.7 (GH-31736)
https://github.com/python/cpython/commit/f46a04469114047ff7a4078619450c590ae3f287


--

___
Python tracker 

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



[issue46932] Please update bundled libexpat to 2.4.7 with an important fix

2022-03-07 Thread miss-islington


miss-islington  added the comment:


New changeset 1e52e782f9742242923dec43c2bf8c1455a531e7 by Miss Islington (bot) 
in branch '3.10':
bpo-46932: Update bundled libexpat to 2.4.7 (GH-31736)
https://github.com/python/cpython/commit/1e52e782f9742242923dec43c2bf8c1455a531e7


--

___
Python tracker 

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



[issue46890] venv does not create "python" link in python 3.11

2022-03-07 Thread Steve Dower


Steve Dower  added the comment:

> This could be problematic, adding a suitably named file outside of $PREFIX 
> breaks the python installation.

Might be worth changing it then. I double/triple checked whether 
searching up for the zip file was the old behaviour, and it sure seemed 
to be (it wasn't on Windows). Will only be a little tweak to change, 
since both codepaths are already there.

My assumption was that any higher-level directories in that tree would 
be at least as restricted as where Python is installed, so anyone who 
could hijack it there could also have modified it closer to the actual file.

--

___
Python tracker 

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



[issue46932] Please update bundled libexpat to 2.4.7 with an important fix

2022-03-07 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29858
pull_request: https://github.com/python/cpython/pull/31741

___
Python tracker 

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



[issue46932] Please update bundled libexpat to 2.4.7 with an important fix

2022-03-07 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29857
pull_request: https://github.com/python/cpython/pull/31740

___
Python tracker 

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



[issue46932] Please update bundled libexpat to 2.4.7 with an important fix

2022-03-07 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29856
pull_request: https://github.com/python/cpython/pull/31739

___
Python tracker 

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



[issue46932] Please update bundled libexpat to 2.4.7 with an important fix

2022-03-07 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +29855
pull_request: https://github.com/python/cpython/pull/31738

___
Python tracker 

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



[issue46932] Please update bundled libexpat to 2.4.7 with an important fix

2022-03-07 Thread Steve Dower


Steve Dower  added the comment:


New changeset 176835c3d5c70f4c1b152cc2062b549144e37094 by Steve Dower in branch 
'main':
bpo-46932: Update bundled libexpat to 2.4.7 (GH-31736)
https://github.com/python/cpython/commit/176835c3d5c70f4c1b152cc2062b549144e37094


--

___
Python tracker 

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



[issue46890] venv does not create "python" link in python 3.11

2022-03-07 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

WITH_NEXT_FRAMEWORK is a compile time option, I've added it to globals in 
values like PREFIX are added. That way the python code can behave differently 
for framework builds (which appears to be needed).

There are two big problems with my patches:
- Calculation of sys.prefix doesn't work in test_venv_framework_macos, but 
somehow works with a real installation. I haven't managed to track down the 
difference yet.
- Calculation for test_framework_macos appears to be ok on first glance, but 
adding "/Library/lib/python9.8.zip" as a known file shows that the code to look 
for the stdlib is misbehaving.

The latter appears to be a wider problem, if I add a test case based on 
test_normal_posix with PREFIX=/opt/python9.8 the getpath code looks for 
/opt/lib/python98.zip and uses that when found.

Test case for this (test passed when 
``ns.add_known_file("/opt/lib/python98.zip")`` is commented out:

def test_normal_posix_in_opt(self):
  """Test a 'standard' install layout on *nix
  
  This uses '/opt/python9.8' as PREFIX
  """
  ns = MockPosixNamespace(
  PREFIX="/opt/python9.8",
  argv0="python",
  ENV_PATH="/usr/bin:/opt/python9.8/bin",
  )
  ns.add_known_xfile("/opt/python9.8/bin/python")
  ns.add_known_file("/opt/python9.8/lib/python9.8/os.py")
  ns.add_known_dir("/opt/python9.8/lib/python9.8/lib-dynload")
  
  # This shouldn't matter:
  ns.add_known_file("/opt/lib/python98.zip")
  
  expected = dict(
  executable="/opt/python9.8/bin/python",
  base_executable="/opt/python9.8/bin/python",
  prefix="/opt/python9.8",
  exec_prefix="/opt/python9.8",
  module_search_paths_set=1,
  module_search_paths=[
  "/opt/python9.8/lib/python98.zip",
  "/opt/python9.8/lib/python9.8",
  "/opt/python9.8/lib/python9.8/lib-dynload",
  ],
  )
  actual = getpath(ns, expected)
  self.assertEqual(expected, actual)

This could be problematic, adding a suitably named file outside of $PREFIX 
breaks the python installation.  I haven't checked this with an unchanged 
getpath.py yet, but I shouldn't have made any changes that affect a 
non-framework install.

--

___
Python tracker 

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



[issue46933] Make pwd module optional for wasm32-emscripten and wasi

2022-03-07 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
nosy: +erlendaasland
nosy_count: 1.0 -> 2.0
pull_requests: +29854
pull_request: https://github.com/python/cpython/pull/31737

___
Python tracker 

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



[issue46932] Please update bundled libexpat to 2.4.7 with an important fix

2022-03-07 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue46947] unicodedata.name gives ValueError for control characters

2022-03-07 Thread Joe Cool


Joe Cool  added the comment:

Note: This is an issue for all chars in the ordinal range 0 thru 31.

--

___
Python tracker 

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



[issue44549] Update Windows installer to use bzip2 1.0.8

2022-03-07 Thread Steve Dower


Steve Dower  added the comment:


New changeset e1639f361ee0dfbf08bb8538839d3d557c1a995c by Steve Dower in branch 
'3.9':
bpo-44549: Update bzip2 to 1.0.8 in Windows builds to mitigate CVE-2016-3189 
and CVE-2019-12900 (GH-31732)
https://github.com/python/cpython/commit/e1639f361ee0dfbf08bb8538839d3d557c1a995c


--

___
Python tracker 

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



[issue46932] Please update bundled libexpat to 2.4.7 with an important fix

2022-03-07 Thread Steve Dower


Change by Steve Dower :


--
nosy: +steve.dower

___
Python tracker 

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



[issue46841] Inline bytecode caches

2022-03-07 Thread Brandt Bucher


Brandt Bucher  added the comment:


New changeset f193631387bfee99a812e39b05d5b7e6384b57f5 by Brandt Bucher in 
branch 'main':
bpo-46841: Use inline caching for calls (GH-31709)
https://github.com/python/cpython/commit/f193631387bfee99a812e39b05d5b7e6384b57f5


--

___
Python tracker 

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



[issue44549] Update Windows installer to use bzip2 1.0.8

2022-03-07 Thread Ned Deily


Ned Deily  added the comment:


New changeset 4a3c610cd635f14747cf02c77908e80620aae6ea by Steve Dower in branch 
'3.7':
bpo-44549: Update bzip2 to 1.0.8 in Windows builds to mitigate CVE-2016-3189 
and CVE-2019-12900 (GH-31732) (GH-31735)
https://github.com/python/cpython/commit/4a3c610cd635f14747cf02c77908e80620aae6ea


--

___
Python tracker 

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



[issue46913] UBSAN: test_ctypes, test_faulthandler and test_hashlib are failing

2022-03-07 Thread Martin Panter


Martin Panter  added the comment:

The ctypes overflow is probably the same as described in Issue 28169 and Issue 
15119

--
nosy: +martin.panter

___
Python tracker 

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



[issue44549] Update Windows installer to use bzip2 1.0.8

2022-03-07 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +29851
pull_request: https://github.com/python/cpython/pull/31734

___
Python tracker 

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



[issue44549] Update Windows installer to use bzip2 1.0.8

2022-03-07 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +29852
pull_request: https://github.com/python/cpython/pull/31735

___
Python tracker 

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



[issue44549] Update Windows installer to use bzip2 1.0.8

2022-03-07 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +29850
pull_request: https://github.com/python/cpython/pull/31733

___
Python tracker 

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



[issue44549] Update Windows installer to use bzip2 1.0.8

2022-03-07 Thread Steve Dower


Steve Dower  added the comment:


New changeset 58d576a43cb1800dd68f06a429d7d41f746a8c01 by Steve Dower in branch 
'3.10':
bpo-44549: Update bzip2 to 1.0.8 in Windows builds to mitigate CVE-2016-3189 
and CVE-2019-12900 (GH-31732)
https://github.com/python/cpython/commit/58d576a43cb1800dd68f06a429d7d41f746a8c01


--

___
Python tracker 

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



[issue46945] Quantifier and Expanded Regex Expression Gives Different Results

2022-03-07 Thread Eric V. Smith


Change by Eric V. Smith :


--
components: +Regular Expressions -Library (Lib)
nosy: +ezio.melotti, mrabarnett

___
Python tracker 

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



[issue46932] Please update bundled libexpat to 2.4.7 with an important fix

2022-03-07 Thread Ned Deily


Ned Deily  added the comment:

We haven't released 2.4.6 yet for maintenance/security branches so we probably 
should update to 2.4.7 first.

--
nosy: +corona10, lukasz.langa, ned.deily, pablogsal
priority: normal -> release blocker

___
Python tracker 

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



[issue44549] Update Windows installer to use bzip2 1.0.8

2022-03-07 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +29849
pull_request: https://github.com/python/cpython/pull/31732

___
Python tracker 

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



[issue46950] Windows 11 venv

2022-03-07 Thread Darrel O'Pry


New submission from Darrel O'Pry :

I created a virtual env on windows 11. 
When I run pip install -r "..."
I get the error 
```
C:\Users\dopry\src\Client\some.domain.com\django> pip install -r 
.\requirements_to_freeze.txt
Traceback (most recent call last):
  File "C:\Users\dopry\AppData\Local\Programs\Python\Python310\lib\runpy.py", 
line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
  File "C:\Users\dopry\AppData\Local\Programs\Python\Python310\lib\runpy.py", 
line 86, in _run_code
exec(code, run_globals)
  File 
"C:\Users\dopry\src\Client\some.domain.com\django\venv310\Scripts\pip.exe\__main__.py",
 line 4, in 
ModuleNotFoundError: No module named 'pip'
```

When I run get command to verify that the venv is activated I get

```
(venv310) PS C:\Users\dopry\src\Client\some.domain.com\django> Get-Command 
python

CommandType Name   Version
Source
---    ---
--
Application python.exe 3.10.21... 
C:\Users\dopry\src\Client\some.domain.com\django\venv310\Scripts\python.exe
```

When I update the `venv310\pyenv.cfg` and set `include-system-site-packages = 
true` to true, it was defaulted to false, it seems that I can pip install my 
requirements successfully. 

When I try to start my app though, the requirements are not found.

--
components: Windows
messages: 414691
nosy: darrel.opry, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Windows 11 venv
type: crash
versions: Python 3.10, Python 3.9

___
Python tracker 

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



[issue44549] Update Windows installer to use bzip2 1.0.8

2022-03-07 Thread Steve Dower


Steve Dower  added the comment:


New changeset 105b9ac00174d7bcc653f9e9dc5052215e197c77 by Steve Dower in branch 
'main':
bpo-44549: Update bzip2 to 1.0.8 in Windows builds to mitigate CVE-2016-3189 
and CVE-2019-12900 (GH-31731)
https://github.com/python/cpython/commit/105b9ac00174d7bcc653f9e9dc5052215e197c77


--

___
Python tracker 

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



[issue44549] Update Windows installer to use bzip2 1.0.8

2022-03-07 Thread Ned Deily


Change by Ned Deily :


--
priority: critical -> release blocker

___
Python tracker 

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



[issue46744] installers on ARM64 suggest wrong folders

2022-03-07 Thread Steve Dower


Steve Dower  added the comment:

Good call on the batch file. It should be easy enough to make those options 
case-insensitive, and to support both forms of x86 flag. I'll leave this issue 
open for that if someone wants to have a go, otherwise I'll get to them at some 
point.

--

___
Python tracker 

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



[issue41370] PEP 585 and ForwardRef

2022-03-07 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset b465b606049f6f7dd0711cb031fdaa251818741a by Niklas Rosenstein in 
branch 'main':
bpo-41370: Evaluate strings as forward refs in PEP 585 generics (GH-30900)
https://github.com/python/cpython/commit/b465b606049f6f7dd0711cb031fdaa251818741a


--

___
Python tracker 

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



[issue44549] Update Windows installer to use bzip2 1.0.8

2022-03-07 Thread Steve Dower


Steve Dower  added the comment:

Adding RMs - this should get merged before we do any security releases for 
issue46948

--
nosy: +lukasz.langa, pablogsal
versions: +Python 3.7, Python 3.8

___
Python tracker 

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



[issue44549] Update Windows installer to use bzip2 1.0.8

2022-03-07 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +29848
pull_request: https://github.com/python/cpython/pull/31731

___
Python tracker 

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



[issue44549] Update Windows installer to use bzip2 1.0.8

2022-03-07 Thread Steve Dower


Steve Dower  added the comment:

cpython-source-deps was updated middle of last year, but apparently we never 
merged the main repo change to use it. I'll do it now.

--

___
Python tracker 

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



[issue46948] [CVE-2022-26488] Escalation of privilege via Windows Installer

2022-03-07 Thread Ned Deily


Ned Deily  added the comment:


New changeset 97476271275a4bd1340230677b7301d7b78b3317 by Steve Dower in branch 
'3.7':
bpo-46948: Fix CVE-2022-26488 by ensuring the Windows Installer correctly uses 
the install path during repair (GH-31730)
https://github.com/python/cpython/commit/97476271275a4bd1340230677b7301d7b78b3317


--

___
Python tracker 

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



[issue46949] Print an indication if traceback exceeds sys.tracebacklimit

2022-03-07 Thread Irit Katriel

Irit Katriel  added the comment:

Re what the limit means, it’s a bit messier than that, see issue38197.

--

___
Python tracker 

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



[issue46948] [CVE-2022-26488] Escalation of privilege via Windows Installer

2022-03-07 Thread Steve Dower


Steve Dower  added the comment:


New changeset 101a1bee1953b82339115c5e648e1717359c78eb by Steve Dower in branch 
'3.9':
bpo-46948: Fix CVE-2022-26488 by ensuring the Windows Installer correctly uses 
the install path during repair (GH-31728)
https://github.com/python/cpython/commit/101a1bee1953b82339115c5e648e1717359c78eb


--

___
Python tracker 

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



[issue46948] [CVE-2022-26488] Escalation of privilege via Windows Installer

2022-03-07 Thread Steve Dower


Steve Dower  added the comment:


New changeset 77446d2aa56e9e3262d9d22473420ff5e907 by Steve Dower in branch 
'main':
bpo-46948: Fix CVE-2022-26488 by ensuring the Windows Installer correctly uses 
the install path during repair (GH-31726)
https://github.com/python/cpython/commit/77446d2aa56e9e3262d9d22473420ff5e907


--

___
Python tracker 

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



[issue46948] [CVE-2022-26488] Escalation of privilege via Windows Installer

2022-03-07 Thread Steve Dower


Steve Dower  added the comment:


New changeset 136842c91b5783e205e217c4855baa9dadd4ad41 by Steve Dower in branch 
'3.10':
bpo-46948: Fix CVE-2022-26488 by ensuring the Windows Installer correctly uses 
the install path during repair (GH-31727)
https://github.com/python/cpython/commit/136842c91b5783e205e217c4855baa9dadd4ad41


--

___
Python tracker 

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



[issue46949] Print an indication if traceback exceeds sys.tracebacklimit

2022-03-07 Thread Eric V. Smith


Eric V. Smith  added the comment:

If you go with the second idea, I'd say something like f"More than {2 * 
tracebacklimit} additional stack frames not shown". It seems handy to know the 
magnitude of the problem.

--
nosy: +eric.smith

___
Python tracker 

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



[issue46948] [CVE-2022-26488] Escalation of privilege via Windows Installer

2022-03-07 Thread Steve Dower


Steve Dower  added the comment:

Yeah, this is fine to still be in alpha 6. Very unlikely that anyone is making 
it a system-wide default anyway, and certainly not in secure/production systems.

--

___
Python tracker 

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



[issue46948] [CVE-2022-26488] Escalation of privilege via Windows Installer

2022-03-07 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

The 3.11.0a6 release is ongoing. I assume is ok to not block this release on 
this issue, given that an alpha is inherently unsafe

--

___
Python tracker 

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



[issue46949] Print an indication if traceback exceeds sys.tracebacklimit

2022-03-07 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

It skips the least recent frames:

>>> def error(): 1 / 0
... 
>>> def g(): error()
... 
>>> def f(): g()
... 
>>> sys.tracebacklimit = 2
>>> f()
Traceback (most recent call last):
  File "", line 1, in g
  File "", line 1, in error
ZeroDivisionError: division by zero
>>> sys.tracebacklimit = 5
>>> f()
Traceback (most recent call last):
  File "", line 1, in 
  File "", line 1, in f
  File "", line 1, in g
  File "", line 1, in error
ZeroDivisionError: division by zero

(tried on current main)

I think that's the right behavior because it tells you the function that 
actually throws the error, which is much harder to figure out from scratch than 
where the call started.

--

___
Python tracker 

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



[issue46890] venv does not create "python" link in python 3.11

2022-03-07 Thread Steve Dower


Steve Dower  added the comment:

> I have a patch that seems to do the right thing. It required adding 
> WITH_NEXT_FRAMEWORK to the globals when evaluating getpath.py to detect this 
> scenario.

I haven't had a chance to go through all your changes, and I'm only very 
vaguely familiar with this space anyway, but isn't WITH_NEXT_FRAMEWORK a 
compile-time option? I'm sure that's how it was used in the old getpath.

> Is there a way to find the values that get put into the globals dict for 
> getpath.py without using a debugger

warn(str(globals())) or some variant at the top of getpath.py should do it. 
There's also an "#if 0" section in getpath.c that will print it out (unless I 
deleted it before merging). There's nothing permanently built in to do this, as 
I suspect the security concerns (information leakage) would come up more often 
than the debugging concerns.

--

___
Python tracker 

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



[issue46949] Print an indication if traceback exceeds sys.tracebacklimit

2022-03-07 Thread Guido van Rossum


Guido van Rossum  added the comment:

There is general confusion as to which part of the traceback is truncated. If I 
have main() -> f() -> g() -> error(), and the limit is 2, does it print main() 
-> f(), or does it print g() -> error()? (I'm not even sure which would be more 
useful.)

FWIW the reason I suggested printing "many" is a worry that somehow a bug could 
cause counting the length of the list to take forever (e.g. if it ends in a 
cycle). It would seem more robust to limit the count.

--

___
Python tracker 

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



[issue46949] Print an indication if traceback exceeds sys.tracebacklimit

2022-03-07 Thread Jelle Zijlstra


New submission from Jelle Zijlstra :

If the number of frames in a traceback exceeds sys.tracebacklimit (which 
defaults to 1000), any remaining frames are silently dropped. See 
https://docs.python.org/3.10/library/sys.html#sys.tracebacklimit.

This is confusing to users. We should print some indication like "N additional 
stack frames not shown".

Here are some specific ideas:
- tracebacklimit <= 0 is documented as dropping the whole traceback. In that 
case, we don't need too print any message.
- It may be expensive to compute a complete count. Perhaps we can count frames 
up to 2 * tracebacklimit, and just say "Many additional stack frames not shown".
- The C implementation is in tb_print_internal() in traceback.c, and the Python 
one in _extract_from_extended_frame_gen in traceback.py.

--
components: Interpreter Core
messages: 414674
nosy: Jelle Zijlstra, gvanrossum, iritkatriel
priority: normal
severity: normal
status: open
title: Print an indication if traceback exceeds sys.tracebacklimit
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



[issue46948] [CVE-2022-26488] Escalation of privilege via Windows Installer

2022-03-07 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +29847
pull_request: https://github.com/python/cpython/pull/31730

___
Python tracker 

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



[issue46948] [CVE-2022-26488] Escalation of privilege via Windows Installer

2022-03-07 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +29846
pull_request: https://github.com/python/cpython/pull/31729

___
Python tracker 

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



[issue46948] [CVE-2022-26488] Escalation of privilege via Windows Installer

2022-03-07 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +29845
pull_request: https://github.com/python/cpython/pull/31728

___
Python tracker 

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



[issue46948] [CVE-2022-26488] Escalation of privilege via Windows Installer

2022-03-07 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +29844
pull_request: https://github.com/python/cpython/pull/31727

___
Python tracker 

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



[issue46948] [CVE-2022-26488] Escalation of privilege via Windows Installer

2022-03-07 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue46948] [CVE-2022-26488] Escalation of privilege via Windows Installer

2022-03-07 Thread Steve Dower


New submission from Steve Dower :

CVE-2022-26488 is an escalation of privilege vulnerability in the Windows 
installer for the following releases of CPython:

* 3.11.0a6 and earlier
* 3.10.2 and earlier
* 3.9.10 and earlier
* 3.8.12 and earlier
* All end-of-life releases of 3.5, 3.6 and 3.7

The vulnerability exists when installed for all users, and when the "Add Python 
to PATH" option has been selected. A local user without administrative 
permissions can trigger a repair operation that adds incorrect additional paths 
to the system PATH variable, and then use search path hijacking to achieve 
escalation of privilege. Per-user installs (the default) are also affected, but 
cannot be used for escalation of privilege.

Besides updating, this vulnerability may be mitigated by modifying an existing 
install to disable the "Add Python to PATH" or "Add Python to environment 
variables" option. Manually adding the install directory to PATH is not 
affected.

Thanks to the Lockheed Martin Red Team for detecting and reporting the issue to 
the Python Security Response Team.

--
assignee: steve.dower
components: Windows
messages: 414673
nosy: lukasz.langa, ned.deily, pablogsal, paul.moore, steve.dower, tim.golden, 
zach.ware
priority: release blocker
severity: normal
stage: needs patch
status: open
title: [CVE-2022-26488] Escalation of privilege via Windows Installer
type: security
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



[issue46947] unicodedata.name gives ValueError for control characters

2022-03-07 Thread Joe Cool


New submission from Joe Cool :

unicodedata.name gives ValueError for control characters, for example:

>>> unicodedata.name('\x00')
Traceback (most recent call last):
  File "", line 1, in 
ValueError: no such name
>>> unicodedata.name('\t')
Traceback (most recent call last):
  File "", line 1, in 
ValueError: no such name


Where unicodedata.lookup clearly knows the names for these characters:
>>> unicodedata.lookup('NULL')
'\x00'
>>> unicodedata.lookup('TAB')
'\t'

--
components: Library (Lib)
messages: 414672
nosy: snoopyjc
priority: normal
severity: normal
status: open
title: unicodedata.name gives ValueError for control characters
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



[issue46936] Fix grammar_grapher with the new forced directive

2022-03-07 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
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



[issue46936] Fix grammar_grapher with the new forced directive

2022-03-07 Thread Luca


Change by Luca :


--
pull_requests: +29842
pull_request: https://github.com/python/cpython/pull/31719

___
Python tracker 

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



[issue46945] Quantifier and Expanded Regex Expression Gives Different Results

2022-03-07 Thread Vedran Čačić

Vedran Čačić  added the comment:

Confirmed. On Python 3.10.2,

>>> 
re.findall(r"(((\w)+\w*\3){2}|(\w)+(?=\w*\4)\w*(?!\4)(\w)\w*\5)\w*",'alabama')
[]

yet https://regex101.com/r/uT8gag/1 (with "Python" selected) says it should 
match.

--
nosy: +veky

___
Python tracker 

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



[issue46946] Port core types to Argument Clinic

2022-03-07 Thread Oleg Iarygin


Change by Oleg Iarygin :


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

___
Python tracker 

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



[issue46946] Port core types to Argument Clinic

2022-03-07 Thread Oleg Iarygin


New submission from Oleg Iarygin :

This is done to:

- update docstrings to current standards enforced by AC
- get proper naming for arguments of impl-functions (for example, self instead 
of obj and instance)
- strip boilerplate reducing current 16k lines of code to something little more 
manageable
- get a proper excuse to collapse overbloated PyTypeObject initializers by 
throwing out zeroes with designated initialization thanks to C99&11 being 
promoted. For example, EncodingMapType in unicodeobject.c reduced from 43 lines 
to 8, five times less.

--
components: Interpreter Core
messages: 414670
nosy: arhadthedev
priority: normal
severity: normal
status: open
title: Port core types to Argument Clinic
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



[issue46890] venv does not create "python" link in python 3.11

2022-03-07 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I've attached a new patch file with some more tweaks, including the additional 
test case from msg414665.

I've pretty sure that the changes to getpath.py are slightly worse in the new 
version, but aren't fully correct in the initial version as well (see my 
previous message about searching outside of the framework). 

I may return to this later when I have time to try to really understand what's 
going on and compare the logic with the previous C code (especially for 
framework builds).  But for now I'm giving up.

--
Added file: https://bugs.python.org/file50662/issue-46890-v2.txt

___
Python tracker 

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



[issue46890] venv does not create "python" link in python 3.11

2022-03-07 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I'm now in the fun position where the code works, but the test test_getpath.py 
fails.

The test case below tries to test a venv in a framework build, but somehow 
fails to calculate prefix and exec_prefix correctly.  The calculation does work 
when using a framework build with my patch...


def test_venv_framework_macos(self):
"""Test a venv layout on macOS using a framework build
"""
venv_path = "/tmp/workdir/venv"
ns = MockPosixNamespace(
os_name="darwin",

argv0="/Library/Frameworks/Python.framework/Versions/9.8/Resources/Python.app/Contents/MacOS/Python",
WITH_NEXT_FRAMEWORK=1,
PREFIX="/Library/Frameworks/Python.framework/Versions/9.8",
EXEC_PREFIX="/Library/Frameworks/Python.framework/Versions/9.8",
ENV___PYVENV_LAUNCHER__=f"{venv_path}/bin/python",

real_executable="/Library/Frameworks/Python.framework/Versions/9.8/Resources/Python.app/Contents/MacOS/Python",
library="/Library/Frameworks/Python.framework/Versions/9.8/Python",
)
ns.add_known_dir(venv_path)
ns.add_known_xfile(f"{venv_path}/bin/python")
ns.add_known_dir(f"{venv_path}/lib/python9.8")

ns.add_known_xfile("/Library/Frameworks/Python.framework/Versions/9.8/Resources/Python.app/Contents/MacOS/Python")

ns.add_known_xfile("/Library/Frameworks/Python.framework/Versions/9.8/bin/python9.8")

ns.add_known_dir("/Library/Frameworks/Python.framework/Versions/9.8/lib/python9.8/lib-dynload")

ns.add_known_xfile("/Library/Frameworks/Python.framework/Versions/9.8/lib/python9.8/os.py")
ns.add_known_file(f"{venv_path}/pyvenv.cfg", [
"home = /Library/Frameworks/Python.framework/Versions/9.8/bin"
])
expected = dict(
executable=f"{venv_path}/bin/python",
prefix=venv_path,
exec_prefix=venv_path,

base_executable="/Library/Frameworks/Python.framework/Versions/9.8/bin/python9.8",
base_prefix="/Library/Frameworks/Python.framework/Versions/9.8",

base_exec_prefix="/Library/Frameworks/Python.framework/Versions/9.8",
module_search_paths_set=1,
module_search_paths=[

"/Library/Frameworks/Python.framework/Versions/9.8/lib/python98.zip",

"/Library/Frameworks/Python.framework/Versions/9.8/lib/python9.8",

"/Library/Frameworks/Python.framework/Versions/9.8/lib/python9.8/lib-dynload",
],
)
actual = getpath(ns, expected)
self.assertEqual(expected, actual)

--

___
Python tracker 

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



[issue46940] Suggestion messages don't properly work in nested getattr calls

2022-03-07 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
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



[issue46890] venv does not create "python" link in python 3.11

2022-03-07 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

This is also dodgy:

test_framework_macos (test.test_getpath.MockGetPathTests) ... Read link from 
/Library/Frameworks/Python.framework/Versions/9.8/Resources/Python.app/Contents/MacOS/Python
Check if 
/Library/Frameworks/Python.framework/Versions/9.8/Resources/Python.app/Contents/MacOS/Modules/Setup.local
 is a file
Check if /Library/Frameworks/Python.framework/Versions/9.8/lib/python98.zip is 
a file
Check if /Library/Frameworks/Python.framework/Versions/lib/python98.zip is a 
file
Check if /Library/Frameworks/Python.framework/lib/python98.zip is a file
Check if /Library/Frameworks/lib/python98.zip is a file
Check if /Library/lib/python98.zip is a file
Check if /Library/Frameworks/Python.framework/Versions/9.8/lib/python9.8/os.py 
is a file
Check if 
/Library/Frameworks/Python.framework/Versions/9.8/bin/lib/python9.8/lib-dynload 
is a dir
Check if 
/Library/Frameworks/Python.framework/Versions/9.8/lib/python9.8/lib-dynload is 
a dir


Note how the code checks for the standard library outside of the framework 
itself.

--

___
Python tracker 

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



[issue46945] Quantifier and Expanded Regex Expression Gives Different Results

2022-03-07 Thread Vivian D

New submission from Vivian D :

Here are the steps that I went through to test my regular expressions in my 
command prompt (a file attachment shows this as well). I am using Windows 11, 
version 21H2:

>>> import re
>>> regex = r"(((\w)+\w*\3){2}|(\w)+(?=\w*\4)\w*(?!\4)(\w)\w*\5)\w*"
>>> testString = "Alabama and Mississippi are next to each other"
>>> re.findall(regex,testString,re.IGNORECASE)
[('Mississipp', 'ipp', 'p', '', '')]
>>> testString = "alabama and Mississippi are next to each other"
>>> re.findall(regex,testString,re.IGNORECASE)
[('Mississipp', 'ipp', 'p', '', '')]
>>> regex = r"((\w)+\w*\2(\w)+\w*\3|(\w)+(?=\w*\4)\w*(?!\4)(\w)\w*\5)\w*"
>>> re.findall(regex,testString,re.IGNORECASE)
[('alabama', 'a', 'a', '', ''), ('Mississipp', 's', 'p', '', '')]
>>> testString = "Alabama and Mississippi are next to each other"
>>> re.findall(regex,testString,re.IGNORECASE)
[('Alabama', 'A', 'a', '', ''), ('Mississipp', 's', 'p', '', '')]

I created a regular expression to match any words with two sets of the same 
vowel, including words with four of the same vowel, ignoring case. My first 
regular expression “(((\w)+\w*\3){2}|(\w)+(?=\w*\4)\w*(?!\4)(\w)\w*\5)\w*" was 
able to match “Mississippi” but unable to match “Alabama” as it should have. To 
make sure that this error wasn’t somehow caused by a case sensitivity issue, I 
retested the regex with “alabama” instead of “Alabama”, but still I got no 
match on “alabama”. Then I tried replacing the quantifier {2} with just 
expression that was supposed to be repeated. This gave me the regex: 
"((\w)+\w*\2(\w)+\w*\3|(\w)+(?=\w*\4)\w*(?!\4)(\w)\w*\5)\w*". For some reason, 
this was able to match on both “alabama” and “Alabama” now, as shown above, and 
continued to match on Mississippi like expected. However, this result seems to 
contradict my understand of regular expressions because all I did to get these 
different results was copy the expression that was supposed to be executed 
twice by the quantifier.

--
components: Library (Lib)
files: ComandPrompt.pdf
messages: 414668
nosy: vmd3.14
priority: normal
severity: normal
status: open
title: Quantifier and Expanded Regex Expression Gives Different Results
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file50661/ComandPrompt.pdf

___
Python tracker 

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



  1   2   >