[issue46571] Strange `@typing.no_type_check` behavior for class variables

2022-02-01 Thread Nikita Sobolev


Change by Nikita Sobolev :


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

___
Python tracker 

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



[issue46596] PyLineTable_InitAddressRange isn't exported - causing C Extensions to fail at import

2022-02-01 Thread Nathan Shain


New submission from Nathan Shain :

I'm trying to develop C++ Extension that needs to access the new line table. I 
have a call to PyLineTable_InitAddressRange in my extension. After compiling, 
"_PyLineTable_InitAddressRange" symbol is undefined in the .so (which is ok so 
far).

When importing the extension, it fails with this error:

ImportError: /usr/foo/foo.cpython-310-x86_64-linux-gnu.so: undefined symbol: 
_PyLineTable_InitAddressRange

Obviously python isn't exporting this symbol, and making the dlopen fail

I'd make a PR with a fix, but I'm not sure which approach is appropriate

--
components: C API
messages: 412237
nosy: nathan3
priority: normal
severity: normal
status: open
title: PyLineTable_InitAddressRange isn't exported - causing C Extensions to 
fail at import
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



[issue45339] concurrent.future.ThreadPoolExecutor should parameterize class used for threads

2022-02-01 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

I guess if you are asking for initialization and finalization of 
thread-specific data in a thread pool -- you need exactly these things (or a 
context manager).
A custom thread class reveals too many implementation details.
I personally prefer an explicit initializer/finalizer based approach.

--

___
Python tracker 

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



[issue46487] `_SSLProtocolTransport` doesn't have the `get_write_buffer_limits` implementation.

2022-02-01 Thread Andrew Svetlov


Change by Andrew Svetlov :


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



[issue46482] `typing.Annotation.__new__` is not covered

2022-02-01 Thread Ken Jin


Ken Jin  added the comment:


New changeset 4c0612ad00ba45dbea2a86f7db6d21546cf243f8 by Nikita Sobolev in 
branch 'main':
bpo-46482: add a test for `typing.Annotation.__new__` (GH-30821)
https://github.com/python/cpython/commit/4c0612ad00ba45dbea2a86f7db6d21546cf243f8


--

___
Python tracker 

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



[issue46482] `typing.Annotation.__new__` is not covered

2022-02-01 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +29225
pull_request: https://github.com/python/cpython/pull/31044

___
Python tracker 

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



[issue46482] `typing.Annotation.__new__` is not covered

2022-02-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29226
pull_request: https://github.com/python/cpython/pull/31045

___
Python tracker 

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



[issue43721] Documentation of property.{getter, setter, deleter} fails to mention that a *new* property is returned

2022-02-01 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +patch
nosy: +iritkatriel
nosy_count: 3.0 -> 4.0
pull_requests: +29227
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/31046

___
Python tracker 

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



[issue43721] Documentation of property.{getter, setter, deleter} fails to mention that a *new* property is returned

2022-02-01 Thread Irit Katriel


Change by Irit Katriel :


--
type:  -> behavior
versions: +Python 3.10, Python 3.11, Python 3.9

___
Python tracker 

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



[issue46451] Tracing causes module globals to be mutated when calling functions from C

2022-02-01 Thread Mark Shannon


Mark Shannon  added the comment:

Can you reproduce this in pure Python?
If not, can you produce a minimal reproducer using just NumPy?

If you can't do either, I'm going to have to assume that this is a NumPy or 
Pandas bug.

Maybe NumPy or Pandas is accessing CPython internals, but not via the C-API, 
and those internals changed between 3.9 and 3.10?

--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue46355] [C API] Document PyFrameObject and PyThreadState changes and explain how to port code to Python 3.11

2022-02-01 Thread miss-islington


miss-islington  added the comment:


New changeset a4cb31927a1f0ee31025ea1ca82fcbfad44755dc by Petr Viktorin in 
branch 'main':
bpo-46355: What's New: Note that PyFrameObject are private (GH-31032)
https://github.com/python/cpython/commit/a4cb31927a1f0ee31025ea1ca82fcbfad44755dc


--
nosy: +miss-islington

___
Python tracker 

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



[issue46482] `typing.Annotation.__new__` is not covered

2022-02-01 Thread miss-islington


miss-islington  added the comment:


New changeset 2532b7c820ec2dc87b19eb322ab92b47f3c77866 by Miss Islington (bot) 
in branch '3.9':
[3.9] bpo-46482: add a test for `typing.Annotation.__new__` (GH-30821) 
(GH-31045)
https://github.com/python/cpython/commit/2532b7c820ec2dc87b19eb322ab92b47f3c77866


--

___
Python tracker 

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



[issue46482] `typing.Annotation.__new__` is not covered

2022-02-01 Thread miss-islington


miss-islington  added the comment:


New changeset 6a188d88c562bfd68ef3a32d148d9b234d50646e by Miss Islington (bot) 
in branch '3.10':
bpo-46482: add a test for `typing.Annotation.__new__` (GH-30821)
https://github.com/python/cpython/commit/6a188d88c562bfd68ef3a32d148d9b234d50646e


--

___
Python tracker 

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



[issue44031] test_embed and test_tabnanny fails if the current directory is non-ASCII

2022-02-01 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 108e66b6d23efd0fc2966163ead9434b328c5f17 by Irit Katriel in 
branch 'main':
bpo-44031: fix test_tabnanny failure in non-ascii CWD (GH-31014)
https://github.com/python/cpython/commit/108e66b6d23efd0fc2966163ead9434b328c5f17


--

___
Python tracker 

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



[issue44031] test_embed and test_tabnanny fails if the current directory is non-ASCII

2022-02-01 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue44031] test_embed and test_tabnanny fails if the current directory is non-ASCII

2022-02-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29229
pull_request: https://github.com/python/cpython/pull/31048

___
Python tracker 

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



[issue46597] Remove Python 3.3 compatibility code from overlapped.c

2022-02-01 Thread Kumar Aditya


New submission from Kumar Aditya :

Remove Python 3.3 compatibility code from overlapped.c.

https://github.com/python/cpython/blob/108e66b6d23efd0fc2966163ead9434b328c5f17/Modules/overlapped.c#L27

--
components: asyncio
messages: 412245
nosy: asvetlov, kumaraditya303, yselivanov
priority: normal
severity: normal
status: open
title: Remove Python 3.3 compatibility code from overlapped.c
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



[issue46597] Remove Python 3.3 compatibility code from overlapped.c

2022-02-01 Thread Kumar Aditya


Change by Kumar Aditya :


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

___
Python tracker 

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



[issue46482] `typing.Annotation.__new__` is not covered

2022-02-01 Thread Nikita Sobolev


Nikita Sobolev  added the comment:

Thanks!

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



[issue46598] ElementTree: wrong XML prolog for the utf-8-sig encoding

2022-02-01 Thread Petr Prikryl


New submission from Petr Prikryl :

When ElementTree object is to be written to the file, and when BOM is needed, 
the 'utf-8-sig' can be used for the purpose. However, the XML prolog then looks 
like...



... and that encoding in the prolog makes no sense. Therefore,
the utf-8-sig is changed to utf-8 for the purpose.

To fix the situation, the following two lines should be added to
`cpython/Lib/xml/etree/ElementTree.py`

`elif enc_lower == "utf-8-sig":
 declared_encoding = "utf-8"
`

just above the line 741 that says 
`write("\n" % (
   declared_encoding,))`

I have already cloned the main branch, added the lines to 
`https://github.com/pepr/cpython.git`, and sent pull request.

I have tested the functionality locally with `Python 3.10.2 
(tags/v3.10.2:a58ebcc, Jan 17 2022, 14:12:15) [MSC v.1929 64 bit (AMD64)] on 
win32`

--
components: Library (Lib)
messages: 412247
nosy: prikryl
priority: normal
pull_requests: 29231
severity: normal
status: open
title: ElementTree: wrong XML prolog for the utf-8-sig encoding
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



[issue43721] Documentation of property.{getter, setter, deleter} fails to mention that a *new* property is returned

2022-02-01 Thread Antony Lee


Change by Antony Lee :


--
nosy:  -Antony.Lee

___
Python tracker 

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



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

2022-02-01 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +29232
pull_request: https://github.com/python/cpython/pull/31050

___
Python tracker 

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



[issue44031] test_embed and test_tabnanny fails if the current directory is non-ASCII

2022-02-01 Thread miss-islington


miss-islington  added the comment:


New changeset 1dcd77280410e4b3bd7b0680f00a38cea466ebd1 by Miss Islington (bot) 
in branch '3.10':
bpo-44031: fix test_tabnanny failure in non-ascii CWD (GH-31014)
https://github.com/python/cpython/commit/1dcd77280410e4b3bd7b0680f00a38cea466ebd1


--

___
Python tracker 

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



[issue44031] test_embed and test_tabnanny fails if the current directory is non-ASCII

2022-02-01 Thread miss-islington


miss-islington  added the comment:


New changeset 2e9f77f9d4fc282666ff85051b6e7ade0eed1d4c by Miss Islington (bot) 
in branch '3.9':
[3.9] bpo-44031: fix test_tabnanny failure in non-ascii CWD (GH-31014) 
(GH-31048)
https://github.com/python/cpython/commit/2e9f77f9d4fc282666ff85051b6e7ade0eed1d4c


--

___
Python tracker 

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



[issue44031] test_embed and test_tabnanny fails if the current directory is non-ASCII

2022-02-01 Thread Irit Katriel


Change by Irit Katriel :


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



[issue43224] Add support for PEP 646

2022-02-01 Thread Marc Mueller


Change by Marc Mueller :


--
nosy: +cdce8p

___
Python tracker 

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



[issue46561] Descriptor resolution should own arguments passed to descriptors

2022-02-01 Thread Mark Shannon


Mark Shannon  added the comment:

# This needs to be C code for this to fail, I'm writing it in Python for 
clarity and brevity

class D:
def __get__(self, instance, owner):
   del C.d
   # There are now no strong references to self
   self.whatever # Access to freed memory

# This can be Python

class C:
d = D()

C.d

--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue46072] Unify handling of stats in the CPython VM

2022-02-01 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +29233
pull_request: https://github.com/python/cpython/pull/31051

___
Python tracker 

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



[issue46599] Objects/object.c:767:24: runtime error: member access within null pointer of type 'PyObject' (aka 'struct _object')

2022-02-01 Thread A-Shvedov


New submission from A-Shvedov :

Hello. Got an error with AFLplusplus, with crafted sample:
https://github.com/a-shvedov/res/blob/master/fuzzing/python/crashes/id:00%2Csig:11%2Csrc:009074%2Ctime:446401660%2Cexecs:16120011%2Cop:arith8%2Cpos:16%2Cval:-21

Compiled with: clang (version 6.0.0-3) ;

Configure params: --enable-optimizations --prefix= .

Package version: Python-3.9.9 ;

Builded binary info:
python: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically 
linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, not 
stripped ;

Stderr with run crafted sample: Segmentation fault ;

AddressSanitizer run:
Objects/object.c:767:24: runtime error: member access within null pointer of 
type 'PyObject' (aka 'struct _object') ;

AddressSanitizer log attached in logfile.

--
components: Interpreter Core
files: issue-file_asanlog.log
messages: 412251
nosy: a-shvedov
priority: normal
severity: normal
status: open
title: Objects/object.c:767:24: runtime error: member access within null 
pointer of type 'PyObject' (aka 'struct _object')
type: crash
versions: Python 3.9
Added file: https://bugs.python.org/file50599/issue-file_asanlog.log

___
Python tracker 

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



[issue46600] Python built with clang -O0 allocates 10x more stack memory than clang -O3 on a Python function call

2022-02-01 Thread STINNER Victor


New submission from STINNER Victor :

Measure using this script on the main branch (commit 
108e66b6d23efd0fc2966163ead9434b328c5f17):
---
import _testcapi
def f(): yield _testcapi.stack_pointer()
print(_testcapi.stack_pointer() - next(f()))
---

Stack usage depending on the compiler and compiler optimization level:

* clang -O0: 9,104 bytes
* clang -Og: 736 bytes
* gcc -O0: 6,784 bytes
* gcc -Og: 624 bytes

-O0 allocates around 10x more memory.

Moreover, "./configure --with-pydebug CC=clang" uses -O0 in CFLAGS, because 
"clang --help" output doesn't containt "-Og". I'm working on a configure change 
to use -Og on clang which supports it.

--
components: Build
messages: 412252
nosy: vstinner
priority: normal
severity: normal
status: open
title: Python built with clang -O0 allocates 10x more stack memory than clang 
-O3 on a Python function call
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



[issue46600] Python built with clang -O0 allocates 10x more stack memory than clang -O3 on a Python function call

2022-02-01 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue46600] Python built with clang -O0 allocates 10x more stack memory than clang -O3 on a Python function call

2022-02-01 Thread STINNER Victor


STINNER Victor  added the comment:

GH-31052 enables -Og when using clang and ./configure --with-pydebug and so the 
example uses 736 bytes instead of 9,104 bytes.

--

___
Python tracker 

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



[issue46600] Python built with clang -O0 allocates 10x more stack memory than clang -O3 on a Python function call

2022-02-01 Thread STINNER Victor


STINNER Victor  added the comment:

This issue is a follow-up of bpo-46542 "test_json and test_lib2to3 crash on 
s390x Fedora Clang 3.x buildbot".

--

___
Python tracker 

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



[issue46600] Python built with clang -O0 allocates 10x more stack memory than clang -O3 on a Python function call

2022-02-01 Thread STINNER Victor


STINNER Victor  added the comment:

Previous issues about stack memory usage, work done in 2017:

* bpo-28870: Reduce stack consumption of PyObject_CallFunctionObjArgs() and like
* bpo-29227: Reduce C stack consumption in function calls
* bpo-29465: Modify _PyObject_FastCall() to reduce stack consumption
29464

I summarized the results in the "Stack consumption" section of my article: 
https://vstinner.github.io/contrib-cpython-2017q1.html

--

___
Python tracker 

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



[issue46600] Python built with clang -O0 allocates 10x more stack memory than clang -O3 on a Python function call

2022-02-01 Thread STINNER Victor


STINNER Victor  added the comment:

See also bpo-30866: "Add _testcapi.stack_pointer() to measure the C stack 
consumption".

--

___
Python tracker 

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



[issue46601] Instructions do not work

2022-02-01 Thread Chris Drake


New submission from Chris Drake :

See https://github.com/python/pythondotorg/issues/1774#issuecomment-1025250329

--
components: macOS
messages: 412257
nosy: cryptophoto, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Instructions do not work
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



[issue46600] Python built with clang -O0 allocates 10x more stack memory than clang -O3 on a Python function call

2022-02-01 Thread STINNER Victor


STINNER Victor  added the comment:

stack_overflow-4.py: Update script from bpo-30866 to measure stack memory usage 
before Python crash or raises a RecursionError.

I had to modify the script since calling a Python function from a Python 
function no longer allocates (additional) memory on the stack! See bpo-45256 
"Remove the usage of the C stack in Python to Python calls".

--
Added file: https://bugs.python.org/file50600/stack_overflow-4.py

___
Python tracker 

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



[issue46564] Near zero-cost super().meth() calls via adaptive superinstructions

2022-02-01 Thread Ken Jin


Ken Jin  added the comment:


New changeset b9ebde8db7e176e021103745cd012bae700828b5 by Kumar Aditya in 
branch 'main':
bpo-46564: do not create frame object for super object (GH-31002)
https://github.com/python/cpython/commit/b9ebde8db7e176e021103745cd012bae700828b5


--

___
Python tracker 

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



[issue46600] Python built with clang -O0 allocates 10x more stack memory than clang -O3 on a Python function call

2022-02-01 Thread STINNER Victor


STINNER Victor  added the comment:

stack_overflow-4.py output depending on the compiler and compiler flags.

gcc -O3 (./configure):
---
test_python_call: 11904 calls before crash, stack: 704.1 bytes/call
test_python_iterator: 17460 calls before crash, stack: 480.0 bytes/call
test_python_getitem: 245760 calls before recursion error, stack: 0.2 bytes/call

=> total: 275124 calls, 1184.3 bytes per call
---

It's better than stack memory usage in 2017: 
https://bugs.python.org/issue30866#msg297826


clang -O3 (./configure CC=clang):
---
test_python_call: 10270 calls before crash, stack: 816.1 bytes/call
test_python_iterator: 14155 calls before crash, stack: 592.0 bytes/call
test_python_getitem: 245760 calls before recursion error, stack: 0.3 bytes/call

=> total: 270185 calls, 1408.4 bytes per call
---

clang allocates a little bit more memory on the stack than gcc.

I didn't try PGO or LTO yet.

--

___
Python tracker 

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



[issue46600] Python built with clang -O0 allocates 10x more stack memory than clang -O3 on a Python function call

2022-02-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 0515eafe55ce7699e3bbc3c1555f08073d43b790 by Victor Stinner in 
branch 'main':
bpo-46600: ./configure --with-pydebug uses -Og with clang (GH-31052)
https://github.com/python/cpython/commit/0515eafe55ce7699e3bbc3c1555f08073d43b790


--

___
Python tracker 

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



[issue46584] Modernize `ctypes/test_python_api` by removing old version check

2022-02-01 Thread miss-islington


miss-islington  added the comment:


New changeset 913e340a323c7e61ae6e4acbb1312b4342657bec by Nikita Sobolev in 
branch 'main':
bpo-46584: remove check for `py2.3` from `ctypes/test_python_api` (GH-31024)
https://github.com/python/cpython/commit/913e340a323c7e61ae6e4acbb1312b4342657bec


--
nosy: +miss-islington

___
Python tracker 

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



[issue46180] Button clicked failed when mouse hover tooltip and tooltip destroyed

2022-02-01 Thread PySimpleGUI


PySimpleGUI  added the comment:

This issue is impacting multiple PySimpleGUI users in particular.  One 
commented today:  
"I already spent a day trying to figure out what was happening to my UI when I 
found this open issue."
Until a fix is found, I'm going to add a specific check for 8.6.12 and disable 
the tooltip feature and issue a warning to users as to why.  Not sure what 
other options are available at the moment.

--
nosy: +PySimpleGUI

___
Python tracker 

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



[issue46584] Modernize `ctypes/test_python_api` by removing old version check

2022-02-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29236
pull_request: https://github.com/python/cpython/pull/31054

___
Python tracker 

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



[issue46584] Modernize `ctypes/test_python_api` by removing old version check

2022-02-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29235
pull_request: https://github.com/python/cpython/pull/31053

___
Python tracker 

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



[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2022-02-01 Thread STINNER Victor


STINNER Victor  added the comment:

Would it be possible to revert the change until Cython and numpy are ready for 
it?

> bpo-45711: Remove type and traceback from exc_info (GH-30122)

This change broke numpy which uses C code generated by Cython for coroutines in 
numpy/random/_mt19937.c (file generated from numpy/random/_mt19937.pyx).

Example of Cython code which no fails with a compiler error since 
exc_info->exc_type has been removed:

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
_PyErr_StackItem *exc_info = tstate->exc_info;
while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) &&
   exc_info->previous_item != NULL)
{
exc_info = exc_info->previous_item;
}
return exc_info;
}
#endif

I propose this plan:

* (1) Revert this specific change
* (2) Wait until a change is merged in Cython 0.29.x
* (3) Wait until a new Cython 0.29.x version is released
* (4) Wait until numpy is released with regenerated code compatible with this 
change
* (5) Apply again the change

It should increase the number of packages when Python 3.11 will be released.

In Cython, the issue is tracked as: https://github.com/cython/cython/issues/4500

--
nosy: +vstinner
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2022-02-01 Thread Irit Katriel


Irit Katriel  added the comment:

I can probably just put back the two fields in _PyErr_StackItem and make sure 
they get updated when exc_value is set. 

Reverting the whole thing would include big changes in compile.c and ceval.c, 
so I'd rather avoid that if we can.

--

___
Python tracker 

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



[issue46581] _typevar_types and _paramspec_tvars are missing from _GenericAlias.copy_with

2022-02-01 Thread Matt B


Matt B  added the comment:

I am happy to attempt a patch, but I don't understand what's going on with 
_ConcatenateGenericAlias. Or rather, I don't fully understand the various 
copy_with semantics. This code is *very* hard to follow.

Patching _GenericAlias.copy_with seems relatively straightforward:

 def copy_with(self, params):
-return self.__class__(self.__origin__, params, name=self._name, 
inst=self._inst)
+return self.__class__(self.__origin__, params, name=self._name, 
inst=self._inst,
+  _typevar_types=self._typevar_types,
+  _paramspec_tvars=self._paramspec_tvars)

_ConcatenateGenericAlias.copy_with, on the other hand, appears to return a 
tuple rather than a type until it falls back to the parent implementation. What 
does one do with that?

Also, what about _AnnotatedAlias, _SpecialGenericAlias, _UnionGenericAlias, or 
_strip_annotations? Do any of those need to be modified?

I can't find any tests that deal with copy_with directly, so I'm assuming its 
use is stressed via higher level code paths, but it's not clear what use cases 
that method is supposed to serve. The good news is that its use is confined to 
typing.py. The bad news is that file gives little insight to those who aren't 
already experts in that territory.

In short, I will do my best, but I suspect I will need patience and guidance in 
arriving something acceptable.

--

___
Python tracker 

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



[issue46584] Modernize `ctypes/test_python_api` by removing old version check

2022-02-01 Thread miss-islington


miss-islington  added the comment:


New changeset 8765b01bcf6514602affcca66e7deeeb998f9cef by Miss Islington (bot) 
in branch '3.10':
[3.10] bpo-46584: remove check for `py2.3` from `ctypes/test_python_api` 
(GH-31024) (GH-31054)
https://github.com/python/cpython/commit/8765b01bcf6514602affcca66e7deeeb998f9cef


--

___
Python tracker 

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



[issue46584] Modernize `ctypes/test_python_api` by removing old version check

2022-02-01 Thread miss-islington


miss-islington  added the comment:


New changeset 7368ca1b889d7fa16423e69034bf4c5fe7b00268 by Miss Islington (bot) 
in branch '3.9':
[3.9] bpo-46584: remove check for `py2.3` from `ctypes/test_python_api` 
(GH-31024) (GH-31053)
https://github.com/python/cpython/commit/7368ca1b889d7fa16423e69034bf4c5fe7b00268


--

___
Python tracker 

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



[issue46584] Modernize `ctypes/test_python_api` by removing old version check

2022-02-01 Thread Zachary Ware


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



[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2022-02-01 Thread Irit Katriel


Irit Katriel  added the comment:

Does unsetting CYTHON_USE_EXC_INFO_STACK still work?



#if CYTHON_USE_EXC_INFO_STACK
// See  https://bugs.python.org/issue25612
#define __Pyx_ExcInfoStruct  _PyErr_StackItem
#else
// Minimal replacement struct for Py<3.7, without the Py3.7 exception state 
stack.
typedef struct {
PyObject *exc_type;
PyObject *exc_value;
PyObject *exc_traceback;
} __Pyx_ExcInfoStruct;
#endif

--

___
Python tracker 

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



[issue46072] Unify handling of stats in the CPython VM

2022-02-01 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 48be46ec1f3f8010570165daa1da4bf9961f3a83 by Mark Shannon in 
branch 'main':
bpo-46072: Add some object layout and allocation stats (GH-31051)
https://github.com/python/cpython/commit/48be46ec1f3f8010570165daa1da4bf9961f3a83


--

___
Python tracker 

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



[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2022-02-01 Thread STINNER Victor


STINNER Victor  added the comment:

> In Cython, the issue is tracked as: 
> https://github.com/cython/cython/issues/4500

I don't understand the Cython status. The code was updated in the master branch:

* https://github.com/cython/cython/pull/4584
* 
https://github.com/cython/cython/commit/776957022d062ed24edea192b719720118ee3576

https://github.com/cython/cython/issues/4500 was closed even if the change was 
not backported to 0.29.x.

I understand that there is no released Cython 0.29.x version compatible with 
this change.

--

___
Python tracker 

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



[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2022-02-01 Thread STINNER Victor


STINNER Victor  added the comment:

I commented the Cython issue:
https://github.com/cython/cython/issues/4500#issuecomment-1026949365

I also opened a discussion on python-dev: "Please update Cython before 
introcuding C API incompatible changes in Python".
https://mail.python.org/archives/list/python-...@python.org/thread/RS2C53LDZPXHRR2VCY2G2YSPDVA4LNQU/

--

___
Python tracker 

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



[issue46581] _typevar_types and _paramspec_tvars are missing from _GenericAlias.copy_with

2022-02-01 Thread Ken Jin


Ken Jin  added the comment:

> In short, I will do my best, but I suspect I will need patience and guidance 
> in arriving something acceptable.

Yeah no worries. typing.py is really complex for many historical reasons. I 
still don't grasp all of it and probably never will.

> what about _AnnotatedAlias, _SpecialGenericAlias, _UnionGenericAlias, or 
> _strip_annotations?

They shouldn't need modification. And there's an elegant reason why. Currently 
ParamSpec is only valid in Generic, Callable and Concatenate. We don't care 
about any other types. As long as ParamSpec appears in their __parameters__ and 
the copy_with of those 3 have the correct settings.

Well what about when they're nested? The other types blindly copy over whatever 
they see in __parameters__ of any nested types. So even if you don't pass those 
settings to their copy_with, it doesn't matter (well of course, until someone 
else uses this setting and expands its scope, then proceeds to trip over it :(. 
this seems like a potential trap affecting PEP 646's runtime.)

>>> X = Concatenate[int, ParamSpec('P')]
>>> Container[X]
typing.Container[typing.Concatenate[int, ~P]]
>>> Container[X].copy_with(X).__parameters__
(~P,)
^ Works even though this uses _SpecialGenericAlias, which doesn't properly pass 
in the settings!

> I can't find any tests that deal with copy_with directly, so I'm assuming its 
> use is stressed via higher level code paths, but it's not clear what use 
> cases that method is supposed to serve.

Yeah. If you search for "copy_with" in typing.py. You'll find that it's called 
in __getitem__. Now __getitem__ is used when we subscript an already 
subscripted type. What I mean is:

T = TypeVar('T')
X = List[T] (__class_getitem__ is called, returning a new genericalias object)
X[int] (__getitem__ is called, returning a new genericalias object)

We need copy_with because we want to create a full "copy" of all the args into 
the new GenericAlias object and not face weird problems with mutability. That 
specific use case is tested super often.

> _ConcatenateGenericAlias.copy_with, on the other hand, appears to return a 
> tuple rather than a type until it falls back to the parent implementation. 
> What does one do with that?

Frankly, I was quite lost too until I saw that it was part of bpo-44791, which 
deals with special special (undefined) cases in PEP 612 and Concatenate. 
Basically for a very weird Concatenate, the core dev there has chosen to return 
a tuple of types instead of another type. Let's just ignore those strange tuple 
paths, and only care about the path using the parent implementation.

--

___
Python tracker 

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



[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2022-02-01 Thread STINNER Victor


STINNER Victor  added the comment:

Irit Katriel:
> Reverting the whole thing would include big changes in compile.c and ceval.c, 
> so I'd rather avoid that if we can.

It was a good idea to split changes of this issue into multiple commits :-) I'm 
only proposing to revert the one which introduces the C API incompatible 
changes: the commit 396b58345f81d4c8c5a52546d2288e666a1b9b8b "bpo-45711: Remove 
type and traceback from exc_info (GH-30122)".

Maybe Cython can be quickly updated, but the situation seems to be complicated 
:-( https://github.com/cython/cython/issues/4500

--

___
Python tracker 

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



[issue46451] Tracing causes module globals to be mutated when calling functions from C

2022-02-01 Thread Sebastian Berg

Sebastian Berg  added the comment:

Thanks for having a look. I have confirmed this is related to Cython (no 
pandas/NumPy involved) – repro at https://github.com/seberg/bpo46451.  What 
happens under the hood in Cython is probably:

https://github.com/cython/cython/blob/master/Cython/Utility/ObjectHandling.c#L2569-L2611

Which generates `PyEval_EvalCodeEx`, and I could not repro with just a 
`PyObject_FastCallDict`, so I assume Cython is doing something wrong and will 
open an issue there, but if you have a quick tip as to what might wrong, that 
could be nice :).

Otherwise, will just close this, and may reopen if Cython hits a wall.

--

___
Python tracker 

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



[issue46451] Tracing causes module globals to be mutated when calling functions from C

2022-02-01 Thread Sebastian Berg


Change by Sebastian Berg :


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



[issue46561] Descriptor resolution should own arguments passed to descriptors

2022-02-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

If this can only be triggered from C code, it less of a concern.

The PR increases cost on a critical path, so we ought to be wary of applying it 
unless a known problem is being solved.

Note, this code path has survived two decades of deployment.  Also, the PR 
doesn't have a test to demonstrate that it fixes anything.  Those facts give 
some evidence that the PR has every user paying to solve a problem that almost 
no one actually has.

--
nosy: +rhettinger

___
Python tracker 

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



[issue46600] Python built with clang -O0 allocates 10x more stack memory than clang -O3 on a Python function call

2022-02-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

PR 31052 seems to have broken a bunch of buildbots. If no fix is provided in 24 
hours, we will need to revert :(

--
nosy: +pablogsal

___
Python tracker 

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



[issue46180] Button clicked failed when mouse hover tooltip and tooltip destroyed

2022-02-01 Thread Ned Deily


Ned Deily  added the comment:

Can you say which platforms are affected by this? The OP's example appears to 
be from a Windows system. Are Unix (X11) and/or macOS versions of Tk affected, 
too?

--
nosy: +ned.deily

___
Python tracker 

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



[issue46451] Tracing causes module globals to be mutated when calling functions from C

2022-02-01 Thread Sebastian Berg


Sebastian Berg  added the comment:

Not reopening for now, but I will note again that (AFAIK) Cython uses 
`PyEval_EvalCodeEx`, and the docs say that it is not used internally to CPython 
anymore.

So it seems pretty plausible that the bug is in `PyEval_EvalCodeEx` and not the 
generated Cython code?

--

___
Python tracker 

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



[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2022-02-01 Thread Irit Katriel


Irit Katriel  added the comment:

That commit has significant changes in ceval.c and compile.c. They don't need 
to be reverted to unbreak cython.  I'm working on a PR for a simpler change.

Have you tried with CYTHON_USE_EXC_INFO_STACK undefined?

--

___
Python tracker 

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



[issue46599] Objects/object.c:767:24: runtime error: member access within null pointer of type 'PyObject' (aka 'struct _object')

2022-02-01 Thread Christian Heimes


Christian Heimes  added the comment:

The crash occurs inside marshal module (Python/marshal.c). The marshal module 
is unsafe and cannot safely parse malicious code. Bad marshal code is expected 
to crash the interpreter.

--
nosy: +christian.heimes
resolution:  -> wont fix
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



[issue46581] _typevar_types and _paramspec_tvars are missing from _GenericAlias.copy_with

2022-02-01 Thread Matt B

Matt B  added the comment:

Thanks, @kj! Fantastic education and insight! I'm sad that I needed you as an 
interpreter but very grateful you were around to provide the interpretation. 
Working on a patch now….

--

___
Python tracker 

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



[issue45925] Upgrade macOS and Windows installers to use SQLite 3.37.2

2022-02-01 Thread Ned Deily


Ned Deily  added the comment:


New changeset 0e4bef7a7f6f25a6f39755778c73e7026901611f by Kumar Aditya in 
branch 'main':
bpo-45925: Update macOS installer to SQLite 3.37.2 (GH-30921)
https://github.com/python/cpython/commit/0e4bef7a7f6f25a6f39755778c73e7026901611f


--

___
Python tracker 

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



[issue46487] `_SSLProtocolTransport` doesn't have the `get_write_buffer_limits` implementation.

2022-02-01 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 3.0 -> 4.0
pull_requests: +29237
pull_request: https://github.com/python/cpython/pull/31055

___
Python tracker 

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



[issue46487] `_SSLProtocolTransport` doesn't have the `get_write_buffer_limits` implementation.

2022-02-01 Thread Andrew Svetlov


Andrew Svetlov  added the comment:


New changeset 64568acbd88a88d54ac9b8215447f88280448dd5 by Emiya in branch 
'main':
bpo-46487: Add `get_write_buffer_limits` to Write and _SSLProtocol transports 
(GH-30958)
https://github.com/python/cpython/commit/64568acbd88a88d54ac9b8215447f88280448dd5


--

___
Python tracker 

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



[issue46487] `_SSLProtocolTransport` doesn't have the `get_write_buffer_limits` implementation.

2022-02-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29238
pull_request: https://github.com/python/cpython/pull/31056

___
Python tracker 

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



[issue46600] Python built with clang -O0 allocates 10x more stack memory than clang -O3 on a Python function call

2022-02-01 Thread STINNER Victor


STINNER Victor  added the comment:

> PR 31052 seems to have broken a bunch of buildbots. If no fix is provided in 
> 24 hours, we will need to revert :(

test_gdb fails if Python is built with clang -Og. I don't think that it's a 
regression. It's just that previously, buildbots using clang only build Python 
with -O0 or -O3.

I'm investigating the test_gdb issue: it's easy to reproduce on Linux (clang 
13.0.0). I may skip test_gdb is Python is built with clang -Og.

--

___
Python tracker 

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



[issue45925] Upgrade macOS and Windows installers to use SQLite 3.37.2

2022-02-01 Thread Ned Deily


Change by Ned Deily :


--
pull_requests: +29239
pull_request: https://github.com/python/cpython/pull/31057

___
Python tracker 

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



[issue46600] Python built with clang -O0 allocates 10x more stack memory than clang -O3 on a Python function call

2022-02-01 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +29240
pull_request: https://github.com/python/cpython/pull/31058

___
Python tracker 

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



[issue45925] Upgrade macOS and Windows installers to use SQLite 3.37.2

2022-02-01 Thread Ned Deily


Ned Deily  added the comment:


New changeset 519eb6ad74f946a9aa7676e2d6579a3a765a8b50 by Ned Deily in branch 
'3.10':
bpo-45925: Update macOS installer to SQLite 3.37.2 (GH-30921) (GH-31057)
https://github.com/python/cpython/commit/519eb6ad74f946a9aa7676e2d6579a3a765a8b50


--

___
Python tracker 

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



[issue45925] Upgrade macOS and Windows installers to use SQLite 3.37.2

2022-02-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29241
pull_request: https://github.com/python/cpython/pull/31059

___
Python tracker 

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



[issue46451] Tracing causes module globals to be mutated when calling functions from C

2022-02-01 Thread Sebastian Berg


Sebastian Berg  added the comment:

While I have a repro for Python, I think the pre release of cython already 
fixes it (and I just did not regenerated the C sources when trying, I guess.  A 
`git clean` to the rescue...).

--

___
Python tracker 

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



[issue46072] Unify handling of stats in the CPython VM

2022-02-01 Thread Mark Shannon


Change by Mark Shannon :


--
pull_requests: +29242
pull_request: https://github.com/python/cpython/pull/31060

___
Python tracker 

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



[issue46598] ElementTree: wrong XML prolog for the utf-8-sig encoding

2022-02-01 Thread Ned Deily


Change by Ned Deily :


--
nosy: +eli.bendersky, scoder
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



[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2022-02-01 Thread Irit Katriel


Irit Katriel  added the comment:

If this is still the position of cython maintainers:

https://github.com/cython/cython/issues/4581#issuecomment-1016503683

then I will need to revert the change until 3.12.

--

___
Python tracker 

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



[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2022-02-01 Thread Guido van Rossum


Guido van Rossum  added the comment:

Time to insist on directly communicating with the Cython team (esp. @scoder) 
and broker some kind of compromise.

--

___
Python tracker 

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



[issue45953] Statically allocate interpreter states as much as possible.

2022-02-01 Thread miss-islington


miss-islington  added the comment:


New changeset f78be59c83c151d94902daef56218530c52e29e7 by Eric Snow in branch 
'main':
bpo-45953: Preserve backward compatibility on some PyThreadState field names. 
(GH-31038)
https://github.com/python/cpython/commit/f78be59c83c151d94902daef56218530c52e29e7


--
nosy: +miss-islington

___
Python tracker 

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



[issue46581] _typevar_types and _paramspec_tvars are missing from _GenericAlias.copy_with

2022-02-01 Thread Matt Bogosian


Change by Matt Bogosian :


--
keywords: +patch
nosy: +mbogosian
nosy_count: 4.0 -> 5.0
pull_requests: +29243
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/31061

___
Python tracker 

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



[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2022-02-01 Thread STINNER Victor


STINNER Victor  added the comment:

> __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)

Python provides a *private* _PyErr_GetTopmostException(tstate) function, but 
Cython reimplements its own function. I'm not sure why.

GH-30531 proposes adding PyErr_GetActiveException() function which has no 
parameter, but Cython __Pyx_PyErr_GetTopmostException() has a tstate parameter.

Simplified example numpy/random/_mt19937.c code:

static CYTHON_INLINE void
__Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type,
 PyObject **value, PyObject **tb)
{
_PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
*type = exc_info->exc_type;
*value = exc_info->exc_value;
*tb = exc_info->exc_traceback;
Py_XINCREF(*type);
Py_XINCREF(*value);
Py_XINCREF(*tb);
}

static CYTHON_INLINE void
__Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type,
  PyObject *value, PyObject *tb)
{
PyObject *tmp_type, *tmp_value, *tmp_tb;
_PyErr_StackItem *exc_info = tstate->exc_info;
tmp_type = exc_info->exc_type;
tmp_value = exc_info->exc_value;
tmp_tb = exc_info->exc_traceback;
exc_info->exc_type = type;
exc_info->exc_value = value;
exc_info->exc_traceback = tb;
Py_XDECREF(tmp_type);
Py_XDECREF(tmp_value);
Py_XDECREF(tmp_tb);
}

Cython saves/restores the current exception of tstate. Maybe we need to provide 
a high-level API for that as well?

--

___
Python tracker 

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



[issue46601] macOS installer "Install Certificates.command" fails if pip is not installed

2022-02-01 Thread Ned Deily


Ned Deily  added the comment:

Thanks for opening the issue. From the pythondotorg issue, the output from the 
failed command:

Last login: Sat May 8 17:08:01 on ttys005
/Applications/Python\ 3.9/Install\ Certificates.command ; exit;
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LC_ALL = (unset),
LC_CTYPE = "en_AU.UTF-8.UTF-8",
LANG = "en_AU.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
[cnd@mac ~]$ /Applications/Python\ 3.9/Install\ Certificates.command ; exit;
-- pip install --upgrade certifi
/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9: No module 
named pip
Traceback (most recent call last):
File "", line 44, in 
File "", line 24, in main
File 
"/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py",
 line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 
'['/Library/Frameworks/Python.framework/Versions/3.9/bin/python3.9', '-E', 
'-s', '-m', 'pip', 'install', '--upgrade', 'certifi']' returned non-zero exit 
status 1.
logout

[Process completed]

So the failure is due to pip not being installed. Install Certificates assumes 
pip will be available but that may not necessarily be the case, for instance, 
if a custom install of Python was selected and the "Install or upgrade pip" 
package is deselected. Install Certificates should protect itself, if nothing 
else, by providing a useful message.

(For the record, the "perl warnings" at the start of the terminal session are 
presumably coming from one of the shell startup scripts that are run 
automatically at the beginning of a terminal session. Install Certificates does 
not use perl.)

--
assignee:  -> ned.deily
stage:  -> needs patch
title: Instructions do not work -> macOS installer "Install 
Certificates.command" fails if pip is not installed
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



[issue46600] Python built with clang -O0 allocates 10x more stack memory than clang -O3 on a Python function call

2022-02-01 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset bebaa95fd0f44babf8b6bcffd8f2908c73ca259e by Victor Stinner in 
branch 'main':
bpo-46600: Fix test_gdb.test_pycfunction() for clang -Og (GH-31058)
https://github.com/python/cpython/commit/bebaa95fd0f44babf8b6bcffd8f2908c73ca259e


--

___
Python tracker 

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



[issue45925] Upgrade macOS and Windows installers to use SQLite 3.37.2

2022-02-01 Thread Ned Deily


Ned Deily  added the comment:


New changeset a22dd00f2da4f6ff96f58fd8d551f16bdb870c8d by Miss Islington (bot) 
in branch '3.9':
bpo-45925: Update macOS installer to SQLite 3.37.2 (GH-30921) (GH-31057) 
(GH-31059)
https://github.com/python/cpython/commit/a22dd00f2da4f6ff96f58fd8d551f16bdb870c8d


--

___
Python tracker 

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



[issue45925] Upgrade macOS and Windows installers to use SQLite 3.37.2

2022-02-01 Thread Ned Deily


Change by Ned Deily :


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



[issue46601] macOS installer "Install Certificates.command" fails if pip is not installed

2022-02-01 Thread Chris Drake


Chris Drake  added the comment:

So it looks like a dependency error in the installer then?

It obviously makes no sense for pip to required before the python installer can 
work - chicken-and-egg issue - the installer should install what it needs of 
course, which I guess includes pip if that's really needed at this stage...

--

___
Python tracker 

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



[issue46364] asyncio subprocess cannot read from /dev/stdin

2022-02-01 Thread xoph


xoph  added the comment:

Created a PR: https://github.com/python/cpython/pull/30596

It's ready for review. Happy about any feedback!

--

___
Python tracker 

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



[issue46602] Subtle trouble with heredoc append in configure.

2022-02-01 Thread Nathan Howard


New submission from Nathan Howard :

TODO: (see PR)

--
components: Installation
messages: 412298
nosy: adanhawth
priority: normal
severity: normal
status: open
title: Subtle trouble with heredoc append in configure.
type: compile error
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



[issue46487] `_SSLProtocolTransport` doesn't have the `get_write_buffer_limits` implementation.

2022-02-01 Thread miss-islington


miss-islington  added the comment:


New changeset e4a6e549027b33bbe87f49fcfccc880243e49834 by Miss Islington (bot) 
in branch '3.9':
bpo-46487: Add `get_write_buffer_limits` to Write and _SSLProtocol transports 
(GH-30958)
https://github.com/python/cpython/commit/e4a6e549027b33bbe87f49fcfccc880243e49834


--

___
Python tracker 

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



[issue46487] `_SSLProtocolTransport` doesn't have the `get_write_buffer_limits` implementation.

2022-02-01 Thread miss-islington


miss-islington  added the comment:


New changeset e5e1441d41907f92cc3bb5de675a2c519068173d by Miss Islington (bot) 
in branch '3.10':
bpo-46487: Add `get_write_buffer_limits` to Write and _SSLProtocol transports 
(GH-30958)
https://github.com/python/cpython/commit/e5e1441d41907f92cc3bb5de675a2c519068173d


--

___
Python tracker 

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



[issue46487] `_SSLProtocolTransport` doesn't have the `get_write_buffer_limits` implementation.

2022-02-01 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Done, thanks!

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



[issue45413] Add install scheme for virtual environments

2022-02-01 Thread Miro Hrončok

Miro Hrončok  added the comment:

The PR is now ready for review.

--

___
Python tracker 

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



[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2022-02-01 Thread Irit Katriel


Irit Katriel  added the comment:

This is a backport of @scoder's patch to 0.29.x. (I don't know if this is 
helpful).

https://github.com/cython/cython/compare/master...iritkatriel:exc_info?expand=1

--

___
Python tracker 

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



[issue45711] Simplify the interpreter's (type, val, tb) exception representation

2022-02-01 Thread Irit Katriel


Irit Katriel  added the comment:

> GH-30531 proposes adding PyErr_GetActiveException() function which has no 
> parameter, but Cython __Pyx_PyErr_GetTopmostException() has a tstate 
> parameter.


I've now updated it to follow the pattern of other functions, where the is a 
private function that takes tstate and the public function calls it.

So it adds in Include/pyerrors.h 

PyAPI_FUNC(PyObject*) PyErr_GetActiveException(void);
PyAPI_FUNC(void) PyErr_SetActiveException(PyObject *);

and in Include/cpython/pyerrors.h

PyAPI_FUNC(PyObject*) _PyErr_GetActiveException(PyThreadState *);
PyAPI_FUNC(void) _PyErr_SetActiveException(PyThreadState *, PyObject *);

--

___
Python tracker 

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



[issue46602] Subtle trouble with heredoc append in configure.

2022-02-01 Thread Nathan Howard


Change by Nathan Howard :


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

___
Python tracker 

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



[issue46602] Subtle trouble with heredoc append in configure.

2022-02-01 Thread Nathan Howard


Change by Nathan Howard :


--
components: +Build -Installation
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



[issue44359] test_ftplib.test_makeport() fails as "env changes" if a socket operation times out in a thread: TimeoutError is not catched

2022-02-01 Thread Guido van Rossum


Guido van Rossum  added the comment:

Maybe it's time to actually try to fix this test rather than just complaining 
about it? Surely *somebody* here has an idea? Else maybe we need to just 
disable it.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue46540] dylibs not loading properly from NFS mounts

2022-02-01 Thread embassy_vfx


embassy_vfx  added the comment:

Hi Ned,

Thanks for the reply. I figured that this may be the case but wanted to
report it anyway.

I currently do not have access to a more up-to-date Mac OS but once I do I
will test and report anything unusual back. I also have not tested other
file systems but will most likely do that as well. Thanks again for your
time here.

Kenny

On Sun, Jan 30, 2022 at 5:48 PM Ned Deily  wrote:

>
> Ned Deily  added the comment:
>
> Thanks for the report but there are a lot of variables here that make this
> very difficult to act on. First, there have been many changes in macOS
> 10.15 regarding file permissions and file system layouts (with APFS et al)
> and further changes in the more recent versions of macOS, 11 Big Sur and
> now 12 Monterey. Further, Python 3.7 is now in the security-fix-only phase
> of its life cycle which means we no longer produce binary installers for
> macOS or Windows for 3.7. 3.7.9 was released prior to the official release
> of macOS 11 and so, as noted on the changelog for 3.7.9, macOS 11+ is not
> fully supported by 3.7.x. We have also learned more about these operating
> systems since then and there are changes in Python and in how we
> manufacture python.org macOS installers that are reflected in current
> releases of Python 3.9.x and 3.10.x. Beyond that, AFAIK, we do not do any
> testing of macOS NFS clients or servers and have no setup for that at hand.
> And throwing in a third-party extension module (shiboken2.abi3.so) plus
> use of @rpath on top of all that adds even more variability.
>
> My suggestion is to try to reproduce this with a current, fully-supported
> python.org macOS installer download (i.e. the 3.10.2 universal2
> installer) and preferably on a current version of macOS, currently 12.2 or
> possibly 11.6.3, and also check "System Preferences" -> "Security &
> Privacy" -> "Privacy settings" like "Full Disk Access" and "Files and
> Folders"; if problems persist, try doing some dynamic loader debugging
> using the DYLD_* environment variables documented in the macOS dyld man
> page (man dyld). Otherwise, as your issue stands now, it seems unlikely
> that anyone here would be willing to invest the significant time to try to
> reproduce and debug what seems to be an unusual macOS configuration with
> out-of-date OS and Python versions.
>
> Perhaps a simpler option is to just avoid use of NFS file systems on macOS
> for this purpose.
>
> Sorry I don't have a more positive answer for you.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue46540] dylibs not loading properly from NFS mounts

2022-02-01 Thread Ned Deily


Ned Deily  added the comment:

> I currently do not have access to a more up-to-date Mac OS but once I do I
will test and report anything unusual back.

Good luck! Since there's a good chance that this issue will languish in our 
open backlog, I am going to mark it as closed for now. But please re-open this 
issue if you find anything that appears to be an issue with Python rather than 
just macOS. Two other suggestions for debugging:
1. You've probably already done this but double-check file and directory access 
permissions on the NFS-mounted file system up to root. We have seen other 
issues with relative paths on 10.15+ with the introduction of the read-only 
system volume and related file system layout complications.
2. You might try using install_name_tool to alter copies of those third-party 
.so(s) and dylib(s) that use @rpath and instead use an absolute path to their 
installed location(s). That would eliminate one variable.

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



  1   2   >