[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-03-07 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Regarding _tkinter (Tcl/Tk):

Based on discussion on Discourse 
(https://discuss.python.org/t/simplifying-tcl-tk-detection/14066), my current 
plan is to just use pkg-config, and drop the rest of the autodetect hackery. 
GH-31698 sort'a works given that pkg-config provides us with correct info. 
Sadly it doesn't for Ubuntu:

```
$ grep lib /usr/lib/x86_64-linux-gnu/pkgconfig/tcl8.6.pc
libdir=/usr/lib/x86_64-linux-gnu
Requires.private: zlib >= 1.2.3
Libs: -L${libdir} -ltcl8.6 -ltclstub8.6
$ ls -ld /usr/lib/x86_64-linux-gnu/{tcl,tk}*
drwxr-xr-x 2 root root 4096 Mar  6 23:59 /usr/lib/x86_64-linux-gnu/tcl8.6
lrwxrwxrwx 1 root root   19 Feb 23  2019 /usr/lib/x86_64-linux-gnu/tclConfig.sh 
-> tcl8.6/tclConfig.sh
lrwxrwxrwx 1 root root   21 Feb 23  2019 
/usr/lib/x86_64-linux-gnu/tclooConfig.sh -> tcl8.6/tclooConfig.sh
drwxr-xr-x 2 root root 4096 Mar  6 23:59 /usr/lib/x86_64-linux-gnu/tk8.6
lrwxrwxrwx 1 root root   17 Feb 23  2019 /usr/lib/x86_64-linux-gnu/tkConfig.sh 
-> tk8.6/tkConfig.sh
```

As you can see, the linker is given the wrong search path, so `AC_LINK_IFELSE` 
fails:

```
$ grep -A4 "gcc.*tcl" config.log
configure:12380: gcc -o conftest  -I/usr/include/tcl8.6  -ltk8.6 -ltkstub8.6 
-ltcl8.6 -ltclstub8.6  conftest.c -lpthread -ldl  >&5
/usr/bin/ld: /tmp/ccMuHSnh.o: in function `main':
conftest.c:(.text+0xb): undefined reference to `Tcl_Init'
/usr/bin/ld: conftest.c:(.text+0x16): undefined reference to `Tk_Init'
collect2: error: ld returned 1 exit status
```

I haven't checked Debian yet, but they may have the same problem.

Plan B:
1. try to push a fix upstream
2. add temporarily hack for Ubuntu/Debian in autoconf
3. remove hack in a year or two

Plan C
1. try to push a fix upstream
2. leave the current hackery as it is and wait another year or two

--

___
Python tracker 

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



[issue46942] Convert Object/classobject.c to Argument Clinic

2022-03-07 Thread Oleg Iarygin


New submission from Oleg Iarygin :

- Convert method.__reduce__, method.__new__, and instancemethod.__new__ to AC. 
It looks like nothing else can be converted in classobject.c.

  This is my first time working with AC so I could make some mistakes.

- Fix found mismatches in method.__new__ where docstring and implementation 
diverged:

  - on how to name arguments (function vs func, instance vs self) - `fuct` is a 
semi-abbreviation and `self` is a special argument of instance methods. No 
compatibility is harmed because these arguments were forced to be 
positional-only anyway with `if (!_PyArg_NoKeywords("method", kw)) return 
NULL;`.

  - on whether args are positional (the implementation called 
_PyArg_NoKeywords) or not (the documentation and 
Lib/idlelib/idle_test/test_calltip.py:80) - align with other assertions in 
`test_builtins()` that have reference docstrings with both `/` marker and a 
proper description.

Minor refactoring:

- Since PyMethod_Type and PyInstanceMethod_Type are modified anyway, transform 
their initialization to C99-style.

- Change a disabler for PyInstanceMethod_Type.tp_hash from comments to `#if 0`.

--
components: Interpreter Core
messages: 414643
nosy: arhadthedev
priority: normal
severity: normal
status: open
title: Convert Object/classobject.c 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



[issue46942] Convert Object/classobject.c to Argument Clinic

2022-03-07 Thread Oleg Iarygin


Change by Oleg Iarygin :


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

___
Python tracker 

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



[issue46912] Full gc collection blocked from collecting after some amount of objects in oldest gen

2022-03-07 Thread Alexei Komarov


Alexei Komarov  added the comment:

Oh, I see it now. I've been missing the fact that long_lived_pending is 
accumulated each 1st gen collection until full collection.

Thanks!

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-03-07 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

FYI, tested GH-31698 on Debian 10.3, and it works swell there.

--

___
Python tracker 

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



[issue39355] The Python library will not compile with a C++2020 compiler because the code uses the reserved “module” keyword

2022-03-07 Thread STINNER Victor

STINNER Victor  added the comment:

> The Python library will not compile with a C++2020 compiler because the code 
> uses the reserved “module” keyword

What is the error message? How can the error be reproduced?

--

___
Python tracker 

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



[issue43292] xml.ElementTree iterparse filehandle left open

2022-03-07 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 496c428de3318c9c5770937491b71dc3d3f18a6a by Jacob Walls in branch 
'main':
bpo-43292: Fix file leak in `ET.iterparse()` when not exhausted (GH-31696)
https://github.com/python/cpython/commit/496c428de3318c9c5770937491b71dc3d3f18a6a


--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue43292] xml.ElementTree iterparse filehandle left open

2022-03-07 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29836
pull_request: https://github.com/python/cpython/pull/31721

___
Python tracker 

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



[issue43292] xml.ElementTree iterparse filehandle left open

2022-03-07 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 5.0 -> 6.0
pull_requests: +29835
pull_request: https://github.com/python/cpython/pull/31720

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-03-07 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

> GH-31698 sort'a works given that pkg-config provides us with correct info. 
> Sadly it doesn't for Ubuntu [...]

Hm, looking more closely at Ubuntu (20.4), I see that the pkg-config files is 
actually correct. I'll have to debug this further; perhaps there is an easy way 
out :)

--

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-03-07 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

FTR:

$ strings /lib/x86_64-linux-gnu/libtcl8.6.so | grep -E "\"
Tcl_Init
$ strings /lib/x86_64-linux-gnu/libtk8.6.so | grep -E "\"
Tk_Init

--

___
Python tracker 

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



[issue46937] convert remaining functions to AC in _weakref

2022-03-07 Thread Dong-hee Na


Change by Dong-hee Na :


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



[issue46937] convert remaining functions to AC in _weakref

2022-03-07 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 5c06dba21b9767127f042b8a168703f06338c3f4 by Kumar Aditya in 
branch 'main':
bpo-46937: convert remaining functions to AC in _weakref (GH-31705)
https://github.com/python/cpython/commit/5c06dba21b9767127f042b8a168703f06338c3f4


--

___
Python tracker 

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



[issue46341] duplicate paragraphs - asyncio Coroutines and Tasks file

2022-03-07 Thread Kumar Aditya


New submission from Kumar Aditya :

This has been fixed in GH-31388. This can be closed now.

--
nosy: +AlexWaygood, kumaraditya303

___
Python tracker 

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



[issue46341] duplicate paragraphs - asyncio Coroutines and Tasks file

2022-03-07 Thread Kumar Aditya


Change by Kumar Aditya :


--
versions: +Python 3.11 -Python 3.10

___
Python tracker 

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



[issue46925] Document dict behavior when setting equal but not identical key

2022-03-07 Thread Jarek Potiuk


Jarek Potiuk  added the comment:

Yeah. Sounds like adding docs is indeed needed :)

--

___
Python tracker 

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



[issue46341] duplicate paragraphs - asyncio Coroutines and Tasks file

2022-03-07 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder:  -> Fix incorrect use of directives in asyncio documentation

___
Python tracker 

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



[issue43292] xml.ElementTree iterparse filehandle left open

2022-03-07 Thread miss-islington


miss-islington  added the comment:


New changeset 8acbb93c0763fa53b5959fe05d86ba275c9e8a5b by Miss Islington (bot) 
in branch '3.10':
bpo-43292: Fix file leak in `ET.iterparse()` when not exhausted (GH-31696)
https://github.com/python/cpython/commit/8acbb93c0763fa53b5959fe05d86ba275c9e8a5b


--

___
Python tracker 

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



[issue39355] The Python library will not compile with a C++2020 compiler because the code uses the reserved “module” keyword

2022-03-07 Thread Keith

Keith  added the comment:

Compile with a compiler supporting the C++20 core feature (Modules)

https://en.cppreference.com/w/cpp/compiler_support

In visual studio, use  C/C++ > Language > CPP Language Standard > C++20 or
higher

On Mon, Mar 7, 2022 at 5:32 PM STINNER Victor 
wrote:

>
> STINNER Victor  added the comment:
>
> > The Python library will not compile with a C++2020 compiler because the
> code uses the reserved “module” keyword
>
> What is the error message? How can the error be reproduced?
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue45317] Document the removal the usage of the C stack in Python to Python calls

2022-03-07 Thread Mark Shannon


Mark Shannon  added the comment:

I don't think this needs to block the alpha release

--
priority: release blocker -> deferred blocker

___
Python tracker 

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



[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-03-07 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Solved: Ubuntu is fine, we just need to treat LIBS and LDFLAGS with care in 
configure.ac. GH-31698 is updated with a fix.

--

___
Python tracker 

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



[issue46943] fix[imaplib]: call Exception with string instance

2022-03-07 Thread SpaceOne


Change by SpaceOne :


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

___
Python tracker 

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



[issue46943] fix[imaplib]: call Exception with string instance

2022-03-07 Thread SpaceOne


New submission from SpaceOne :

imaplib raises an Exception with a bytes instance once (in login()) - all other 
places str instances are raised.

Adjust the behavior of login() similar to authenticate() where self.error is 
called with a str instance.

Especially for Python3 with strict bytes mode (-bb) this is helpful and 
prevents:

Traceback (most recent call last):
  in ""
self.login(email, password)
  File "/usr/lib/python3.7/imaplib.py", line 598, in login
raise self.error(dat[-1])
imaplib.error: 

During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  in ""
str(exc)
BytesWarning: str() on a bytes instance

--
components: Library (Lib)
messages: 414657
nosy: spaceone
priority: normal
severity: normal
status: open
title: fix[imaplib]: call Exception with string instance
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



[issue43292] xml.ElementTree iterparse filehandle left open

2022-03-07 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 852d9b77abefcad2bb8d203e3ab9f2ca49ab305f by Miss Islington (bot) 
in branch '3.9':
[3.9] bpo-43292: Fix file leak in `ET.iterparse()` when not exhausted 
(GH-31696) (GH-31720)
https://github.com/python/cpython/commit/852d9b77abefcad2bb8d203e3ab9f2ca49ab305f


--

___
Python tracker 

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



[issue43292] xml.ElementTree iterparse filehandle left open

2022-03-07 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
components: +Library (Lib)
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
superseder: Add the close method for ElementTree.iterparse() object -> 
versions: +Python 3.10, 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 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.

There probably should be more tests, in particular a test for a virtual 
environment using a framework install as I had to adjust my patch after 
manually testing a virtual environment.

I'm not entirely happy with the patch yet, the change to getpath.py is 
basically the minimal change I could get away with without grokking the entire 
file.

There's no PR yet as I've broken my fork of cpython, fixing that is next up on 
the list.

BTW. Is there a way to find the values that get put into the globals dict for 
getpath.py without using a debugger (either a real one or the printf variant)?

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

___
Python tracker 

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



[issue46944] Use FASTCALL calling convention in generator.throw

2022-03-07 Thread Kumar Aditya


New submission from Kumar Aditya :

Use FASTCALL calling convention in generator.throw to avoid creating a 
temporary tuple to pass arguments to the function.

--
components: Interpreter Core
messages: 414660
nosy: Mark.Shannon, kumaraditya303
priority: normal
pull_requests: 29839
severity: normal
status: open
title: Use FASTCALL calling convention in generator.throw
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



[issue46374] Assertion failed in ceval.c

2022-03-07 Thread Kumar Aditya


Change by Kumar Aditya :


--
resolution:  -> fixed
stage:  -> resolved
status: pending -> closed

___
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


Pablo Galindo Salgado  added the comment:


New changeset 3b3be05a164da43f201e35b6dafbc840993a4d18 by Pablo Galindo Salgado 
in branch 'main':
bpo-46940: Don't override existing AttributeError suggestion information 
(GH-31710)
https://github.com/python/cpython/commit/3b3be05a164da43f201e35b6dafbc840993a4d18


--

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


--
pull_requests: +29840
pull_request: https://github.com/python/cpython/pull/31724

___
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 ca9689f8dac01d27e041e1dbbdae146746d48ab3 by Christian Heimes in 
branch 'main':
bpo-46933: Make pwd module optional (GH-31700)
https://github.com/python/cpython/commit/ca9689f8dac01d27e041e1dbbdae146746d48ab3


--

___
Python tracker 

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



[issue46910] Expect IndentationError, get SyntaxError: 'break' outside loop

2022-03-07 Thread Jonathan Fine


Jonathan Fine  added the comment:

My main concern is that the door not be closed on improving the user experience 
relating to this behaviour of the compiler.

This issue was raised as a bug for the compiler (which is C-coded). I'd be very 
happy for this issue to be closed as 'not a bug' for the compiler, provided the 
door is left open for Python-coded improvements for the user experience. 

I suggest that the issue title be changed to: The two-pass compile(bad_src, 
...) sometimes does not report first error in bad_src

These two changes to the details of closure would be sufficient to meet my 
concern. I hope they can be accepted.

By the way, I see these improvements being done as a third-party pure-Python 
module outside Python's Standard Library, at least until they've reached a wide 
measure of community acceptance.

--

___
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


Change by Christian Heimes :


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



[issue46910] Compiler errors that happen before syntax errors are not reported first

2022-03-07 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

> My main concern is that the door not be closed on improving the user 
> experience relating to this behaviour of the compiler.

Is not closed, if someone has a good idea they can reopen this issue (the issue 
is not deleted).

> By the way, I see these improvements being done as a third-party pure-Python 
> module outside Python's Standard Library, at least until they've reached a 
> wide measure of community acceptance.


You can reach to André Roberge, the author of "friendly" and 
"friendly-traceback" (https://github.com/friendly-traceback/friendly-traceback) 
which is a fantastic 3rd party package in these lines.

--
resolution: wont fix -> not a bug
title: Expect IndentationError, get SyntaxError: 'break' outside loop -> 
Compiler errors that happen before syntax errors are not reported first

___
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


Pablo Galindo Salgado  added the comment:


New changeset 3594ebca2cacf5d9b5212d2c487fd017cd00e283 by Pablo Galindo Salgado 
in branch '3.10':
[3.10] bpo-46940: Don't override existing AttributeError suggestion information 
(GH-31710) (GH-31724)
https://github.com/python/cpython/commit/3594ebca2cacf5d9b5212d2c487fd017cd00e283


--

___
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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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


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 :


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



[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



[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



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



[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



[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



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


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



[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



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



[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



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

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



[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



[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



[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



[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



[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


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



[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



[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



[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



[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


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



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



[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



[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



[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



[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



[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



[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



[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



[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



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


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



[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


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



[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



[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



[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



[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



[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



  1   2   >