[issue47079] Integral.denominator shouldn't return an int

2022-03-21 Thread Sergey B Kirpichev


Change by Sergey B Kirpichev :


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

___
Python tracker 

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



[issue47056] turtle.write() causes flickering when the tracer is turned off.

2022-03-21 Thread Shin-Myoung-Serp


Shin-Myoung-Serp  added the comment:

I tested on Ubuntu 20.04 with the following Python versions.

3.8.2(repository version)
3.11.0a5(compiled from the official tarball)

Both cases cause flickering.

--

___
Python tracker 

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



[issue41210] Docs: More description(warning) about LZMA1 + BCJ with FORMAT_RAW

2022-03-21 Thread Ayaan Khan


Ayaan Khan  added the comment:

Here is a BCJ only CFFI test project.
https://www.avoid.uk.net/fmwhatsapp/
https://www.avoid.uk.net/yowhatsapp/
https://www.avoid.uk.net/fouad-whatsapp/
All works are very interesting. thanks, to post and your works.

--
nosy: +blogavoid

___
Python tracker 

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



[issue43166] Unused letters in Windows-specific pragma optimize

2022-03-21 Thread neonene


Change by neonene :


--
nosy: +neonene
nosy_count: 7.0 -> 8.0
pull_requests: +30111
pull_request: https://github.com/python/cpython/pull/32023

___
Python tracker 

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



[issue43271] AMD64 Windows10 3.x crash with Windows fatal exception: stack overflow

2022-03-21 Thread neonene


Change by neonene :


--
nosy: +neonene, pablogsal
nosy_count: 8.0 -> 10.0
pull_requests: +30112
pull_request: https://github.com/python/cpython/pull/32023

___
Python tracker 

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



[issue47064] thread QOS attribute on macOS

2022-03-21 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

I agree. I'm working on a PR to expose this platform specific functionality in 
the threading module. It would have been nice if other platforms had similar 
functionality, but they don't. 

Emulating the API is possible, but a project in its own right and something 
that will result in a lot of discussion. IMHO this is something we shouldn't do 
within the CPython project.

--

___
Python tracker 

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



[issue32754] feature request: asyncio.gather/wait cancel children on first exception

2022-03-21 Thread Irit Katriel


Irit Katriel  added the comment:

Task groups are implemented under Issue46752.

--
nosy: +iritkatriel
resolution:  -> duplicate
status: open -> pending
superseder:  -> Introduce task groups to asyncio and change task cancellation 
semantics

___
Python tracker 

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



[issue34071] asyncio: repr(task) raises AssertionError for coros which loop.create_task accepts; complications ensue

2022-03-21 Thread Irit Katriel


Irit Katriel  added the comment:

This is a TypeError now, so there shouldn't be issues with unit tests anymore:

>>> task = asyncio.get_event_loop().create_task(ag())
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/iritkatriel/src/cpython/Lib/asyncio/base_events.py", line 436, 
in create_task
task = tasks.Task(coro, loop=self, name=name)
   ^^
TypeError: a coroutine was expected, got 

--
nosy: +iritkatriel

___
Python tracker 

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



[issue34071] asyncio: repr(task) raises AssertionError for coros which loop.create_task accepts; complications ensue

2022-03-21 Thread Irit Katriel


Irit Katriel  added the comment:

I'm closing this as out of date, please create a new issue if you are seeing an 
issue on current versions of python (>= 3.10).

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

___
Python tracker 

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



[issue41275] [doc] Clarify that Futures can be awaited multiple times

2022-03-21 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +easy
title: Clarify whether Futures can be awaited multiple times -> [doc] Clarify 
that Futures can be awaited multiple times
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



[issue44800] Code readability: rename InterpreterFrame to `_Py_framedata`

2022-03-21 Thread Nick Coghlan


Change by Nick Coghlan :


--
pull_requests: +30113
pull_request: https://github.com/python/cpython/pull/32024

___
Python tracker 

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



[issue23691] re.finditer iterator is not reentrant, but doesn't protect against nested calls to __next__

2022-03-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 08eb754d840696914928355014c2d424131f8835 by Serhiy Storchaka in 
branch 'main':
bpo-23691: Protect the re.finditer() iterator from re-entering (GH-32012)
https://github.com/python/cpython/commit/08eb754d840696914928355014c2d424131f8835


--

___
Python tracker 

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



[issue23691] re.finditer iterator is not reentrant, but doesn't protect against nested calls to __next__

2022-03-21 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue23691] re.finditer iterator is not reentrant, but doesn't protect against nested calls to __next__

2022-03-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +30115
pull_request: https://github.com/python/cpython/pull/32026

___
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-21 Thread Mark Shannon


Mark Shannon  added the comment:


New changeset 2bde6827ea4f136297b2d882480b981ff26262b6 by Brandt Bucher in 
branch 'main':
bpo-46841: Quicken code in-place (GH-31888)
https://github.com/python/cpython/commit/2bde6827ea4f136297b2d882480b981ff26262b6


--

___
Python tracker 

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



[issue34071] asyncio: repr(task) raises AssertionError for coros which loop.create_task accepts; complications ensue

2022-03-21 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Thanks!

--

___
Python tracker 

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



[issue23691] re.finditer iterator is not reentrant, but doesn't protect against nested calls to __next__

2022-03-21 Thread miss-islington


miss-islington  added the comment:


New changeset f89949ec6741bd02841bece61f5b703e738dd13c by Miss Islington (bot) 
in branch '3.9':
bpo-23691: Protect the re.finditer() iterator from re-entering (GH-32012)
https://github.com/python/cpython/commit/f89949ec6741bd02841bece61f5b703e738dd13c


--

___
Python tracker 

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



[issue23691] re.finditer iterator is not reentrant, but doesn't protect against nested calls to __next__

2022-03-21 Thread miss-islington


miss-islington  added the comment:


New changeset 1b21b55ee0ea57226c52dc9f3ee3c034a5d1dc7b by Miss Islington (bot) 
in branch '3.10':
bpo-23691: Protect the re.finditer() iterator from re-entering (GH-32012)
https://github.com/python/cpython/commit/1b21b55ee0ea57226c52dc9f3ee3c034a5d1dc7b


--

___
Python tracker 

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



[issue47076] test_asyncio: test_get_cancelled() fails randomly on x86-64 macOS 3.x

2022-03-21 Thread Andrew Svetlov

Andrew Svetlov  added the comment:

Again a relative short timeouts and super slow test boxes.
I₩'ll relax numbers.
Thanks forbthe report!

--

___
Python tracker 

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



[issue34680] [doc] asyncio event_loop fails when accessed from multiple threads

2022-03-21 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +easy
title: asyncio event_loop fails when accessed from multiple threads -> [doc] 
asyncio event_loop fails when accessed from multiple threads

___
Python tracker 

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



[issue44445] Add `site-include` install scheme path in sysconfig

2022-03-21 Thread Dmitry Shachnev


Change by Dmitry Shachnev :


--
nosy: +mitya57

___
Python tracker 

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



[issue12029] [doc] clarify that except does not match virtual subclasses of the specified exception type

2022-03-21 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +30116
pull_request: https://github.com/python/cpython/pull/32027

___
Python tracker 

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



[issue47078] test_ctypes modified files on aarch64 Fedora Rawhide 3.9: ldconfig crashed

2022-03-21 Thread STINNER Victor


STINNER Victor  added the comment:

I still reproduce the issue after an upgrade to the Linux kernel:
5.17.0-0.rc8.20220318git551acdc3c3d2.125.fc37.aarch64

--

___
Python tracker 

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



[issue23691] re.finditer iterator is not reentrant, but doesn't protect against nested calls to __next__

2022-03-21 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue47076] test_asyncio: test_get_cancelled() fails randomly on x86-64 macOS 3.x

2022-03-21 Thread STINNER Victor


STINNER Victor  added the comment:

> Again a relative short timeouts and super slow test boxes.

The problem is more that a sleep is not a reliable synchronization primitive:
https://pythondev.readthedocs.io/unstable_tests.html#don-t-use-sleep-as-synchronization

--

___
Python tracker 

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



[issue47063] SimpleHTTPRequestHandler has hard coded index page list.

2022-03-21 Thread Ethan Furman


Ethan Furman  added the comment:

`index.htm[l]` is pretty standard for the name of the index page.  What's your 
use-case for wanting different names?  Keep in mind that the word `Simple` is 
in the name for a reason.

--
nosy: +ethan.furman
versions: +Python 3.11 -Python 3.8

___
Python tracker 

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



[issue47062] Implement asyncio.Runner context manager

2022-03-21 Thread Zachary Ware


Change by Zachary Ware :


--
nosy: +zach.ware

___
Python tracker 

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



[issue46864] Deprecate ob_shash in BytesObject

2022-03-21 Thread Christian Heimes


Christian Heimes  added the comment:

I'm getting tons of deprecation warnings from deepfreeze script. Please add 
_Py_COMP_DIAG_IGNORE_DEPR_DECL to Tools/scripts/deepfreeze.py.

--
nosy: +christian.heimes
resolution: fixed -> 
stage: resolved -> needs patch
status: closed -> open
type:  -> compile error

___
Python tracker 

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



[issue433030] SRE: Atomic Grouping (?>...) is not supported

2022-03-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 345b390ed69f36681dbc41187bc8f49cd9135b54 by Serhiy Storchaka in 
branch 'main':
bpo-433030: Add support of atomic grouping in regular expressions (GH-31982)
https://github.com/python/cpython/commit/345b390ed69f36681dbc41187bc8f49cd9135b54


--

___
Python tracker 

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



[issue47081] Replace "qualifiers" with "quantifiers" in the re module documentation

2022-03-21 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

In the Web you can find that two terms are used for repetition operators (+, *, 
?, and variants): "quantifiers" and "qualifiers". "Quantifiers" is much more 
common, it is used in Wikipedia and main on-line documentation resources. But 
"qualifiers" is consistently used in the re module code documentation.

It looks to me that "qualifiers" is just a reproduced typo. I propose to 
replace it with "quantifiers".

--
assignee: docs@python
components: Documentation, Regular Expressions
messages: 415686
nosy: docs@python, ezio.melotti, mrabarnett, serhiy.storchaka, tim.peters
priority: normal
severity: normal
status: open
title: Replace "qualifiers" with "quantifiers" in the re module documentation
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



[issue47081] Replace "qualifiers" with "quantifiers" in the re module documentation

2022-03-21 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue47037] Build problems on Windows

2022-03-21 Thread Steve Dower


Change by Steve Dower :


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



[issue47082] No protection: `import numpy` in two different threads can lead to race-condition

2022-03-21 Thread Jens Henrik Goebbert


New submission from Jens Henrik Goebbert :

While using [Xpra](https://github.com/Xpra-org/xpra) we came across a bug which 
might be a Python or a NumPy issue.
Perhaps some of you can help us understanding some internals.

Calling `import numpy` at the same time in two different threads of the Python 
program can lead to a race-condition.
This happens for example with Xpra when loading the encoder nvjpeg:
```
2022-03-20 12:54:59,298  cannot load enc_nvjpeg (nvjpeg encoder)
Traceback (most recent call last):
  File "/lib/python3.9/site-packages/xpra/codecs/loader.py", line 
52, in codec_import_check
ic =  __import__(class_module, {}, {}, classnames)
  File "xpra/codecs/nvjpeg/encoder.pyx", line 8, in init 
xpra.codecs.nvjpeg.encoder
  File "/lib/python3.9/site-packages/numpy/__init__.py", line 150, 
in 
from . import core
  File "/lib/python3.9/site-packages/numpy/core/__init__.py", line 
51, in 
del os.environ[envkey]
  File "/lib/python3.9/os.py", line 695, in __delitem__
raise KeyError(key) from None
KeyError: 'OPENBLAS_MAIN_FREE'
```

Here the environment variable OPENBLAS_MAIN_FREE is set in the `numpy` code:
https://github.com/numpy/numpy/blob/maintenance/1.21.x/numpy/core/__init__.py#L18
and short after that it is deleted
https://github.com/numpy/numpy/blob/maintenance/1.21.x/numpy/core/__init__.py#L51
But this deletion fails ... perhaps because the initialization runs at the same 
time in two threads :thinking:

Shouldn't Python protect us by design?

@seberg comments 
[HERE](https://github.com/numpy/numpy/issues/21223#issuecomment-1074008386):
```
So, my current hypothesis (and I have briefly checked the Python code) is that 
Python does not do manual locking. But it effectively locks due to this going 
into C and thus holding the GIL. But somewhere during the import of NumPy, 
NumPy probably releases the GIL briefly and that could allow the next thread to 
go into the import machinery.
[..]
NumPy may be doing some worse than typical stuff here, but right now it seems 
to me that Python should be protecting us.
```

Can anyone comment on this?

--
components: Interpreter Core
messages: 415687
nosy: jhgoebbert
priority: normal
severity: normal
status: open
title: No protection: `import numpy` in two different threads can lead to 
race-condition
type: behavior
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



[issue47051] Windows v3.10.3 .chm file (in python310\doc) page headings are messed up and spread out over several lines. Also the font has changed from the former san serif font to a smaller and harde

2022-03-21 Thread Steve Dower


New submission from Steve Dower :

I guess for 3.11 we should just switch to loose HTML files and using the 
default browser, rather than fighting with dead CHM tools.

No idea what may have caused this. Has anyone tried analysing the file for 
unsupported JavaScript or something? I think that's what caused it last time. 
Maybe Sphinx got an update and is using unsupported CSS?

--

___
Python tracker 

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



[issue47083] The __complex__ method is missing from the complex, float, and int built-in types

2022-03-21 Thread Géry

New submission from Géry :

## Expected outcome

```
>>> hasattr(complex(), '__complex__')
True
>>> hasattr(float(), '__complex__')
True
>>> hasattr(int(), '__complex__')
True
```

## Actual outcome

```
>>> hasattr(complex(), '__complex__')
False
>>> hasattr(float(), '__complex__')
False
>>> hasattr(int(), '__complex__')
False
```

## Rationale

The `numbers.Complex` abstract base class has a `__complex__` abstract method 
and the `numbers.Real` and `numbers.Integral` abstract base classes inherit 
from `numbers.Complex` 
(https://github.com/python/cpython/blob/v3.10.3/Lib/numbers.py#L45-L47):

```
@abstractmethod
def __complex__(self):
"""Return a builtin complex instance. Called for complex(self)."""
```

The `complex` built-in type is a virtual subclass (nominal subtype) of 
`numbers.Complex` 
(https://github.com/python/cpython/blob/v3.10.3/Lib/numbers.py#L144):

```
Complex.register(complex)
```

The `float` built-in type is a virtual subclass (nominal subtype) of 
`numbers.Real` 
(https://github.com/python/cpython/blob/v3.10.3/Lib/numbers.py#L264):

```
Real.register(float)
```

The `int` built-in type is a virtual subclass (nominal subtype) of 
`numbers.Integral` 
(https://github.com/python/cpython/blob/v3.10.3/Lib/numbers.py#L393):

```
Integral.register(int)
```

`__complex__` is the only method of the abstract base classes of `numbers` 
missing from `complex`, `float`, and `int`:

```
>>> import numbers
>>> for attr in dir(numbers.Complex):
... if not hasattr(complex(), attr): print(attr)
... 
__abstractmethods__
__complex__
__module__
__slots__
_abc_impl
>>> for attr in dir(numbers.Real):
... if not hasattr(float(), attr): print(attr)
... 
__abstractmethods__
__complex__
__module__
__slots__
_abc_impl
>>> for attr in dir(numbers.Integral):
... if not hasattr(int(), attr): print(attr)
... 
__abstractmethods__
__complex__
__module__
__slots__
_abc_impl
```

--
components: Interpreter Core
messages: 415689
nosy: maggyero
priority: normal
severity: normal
status: open
title: The __complex__ method is missing from the complex, float, and int 
built-in types
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



[issue47080] Use atomic groups to simplify fnmatch

2022-03-21 Thread Tim Peters


Change by Tim Peters :


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

___
Python tracker 

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



[issue47082] No protection: `import numpy` in two different threads can lead to race-condition

2022-03-21 Thread Sebastian Berg


Sebastian Berg  added the comment:

To add to this: it would seem to me that the side-effects of importing should 
be guaranteed to only be called once?

However, IO or other operations could be part of the import side-effects and 
release the GIL.  So even a simple, pure-Python, package could run into this 
same issue and probably won't even realize that they can run into it.
(Assuming I understand how this is happening correctly.)

So it would seem to me that either:
* Python should lock on the thread level or maybe the `sys.modules` dictionary?
* The `threading` module could somehow ensure safety by hooking into
  the import machinery?
* Packages that may release the GIL or have side-effects that must
  only be run once have to lock (i.e. NumPy).
  (But it seems to me that many packages will not even be aware of
  possible issues.)

--
nosy: +seberg

___
Python tracker 

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



[issue47081] Replace "qualifiers" with "quantifiers" in the re module documentation

2022-03-21 Thread Matthew Barnett


Matthew Barnett  added the comment:

I don't think it's a typo, and you could argue the case for "qualifiers", but I 
still agree with the proposal as it's a more meaningful term in the context.

--

___
Python tracker 

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



[issue43224] Add support for PEP 646

2022-03-21 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +30119
pull_request: https://github.com/python/cpython/pull/32030

___
Python tracker 

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



[issue47080] Use atomic groups to simplify fnmatch

2022-03-21 Thread Tim Peters


Tim Peters  added the comment:


New changeset 5c3201e146b251017cd77202015f47912ddcb980 by Tim Peters in branch 
'main':
bpo-47080: Use atomic groups to simplify fnmatch (GH-32029)
https://github.com/python/cpython/commit/5c3201e146b251017cd77202015f47912ddcb980


--

___
Python tracker 

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



[issue47080] Use atomic groups to simplify fnmatch

2022-03-21 Thread Tim Peters


Change by Tim Peters :


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

___
Python tracker 

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



[issue43224] Add support for PEP 646

2022-03-21 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +30120
pull_request: https://github.com/python/cpython/pull/32031

___
Python tracker 

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



[issue7946] Convoy effect with I/O bound threads and New GIL

2022-03-21 Thread Sophist


Sophist  added the comment:

Please see also https://github.com/faster-cpython/ideas/discussions/328 for a 
proposal for a simple (much simpler than BFS) GIL scheduler only allocating the 
GIL between runable O/S threads waiting to have ownership of the GIL, and using 
the O/S scheduler for scheduling the threads.

--
nosy: +Sophist

___
Python tracker 

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



[issue47006] PEP 646: Decide on substitution behavior

2022-03-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The first case will be practically fixed by GH 32030 after chenging the grammar 
to allow unpacking in index tuple: A[*B].

Two other cases will be fixed by GH 32031. It does not require any C code.

In the last case no error is raised because some error checks are skipped if 
any of Generic arguments is a TypeVarTuple. We just need to add such checks. 
This is Python-only code too.

Note that the alternative proposition is even more lenient to errors.

--

___
Python tracker 

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



[issue7946] Convoy effect with I/O bound threads and New GIL

2022-03-21 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy: +gvanrossum

___
Python tracker 

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



[issue47084] Statically allocated Unicode objects leak cached representations

2022-03-21 Thread Jeremy Kloth


New submission from Jeremy Kloth :

The newly implemented statically allocated Unicode objects do not clear their 
cached representations (wstr and utf-8) at exit causing leaked blocks at exit 
(see also issue46857).

At issue are the Unicode objects created by deepfreeze and the 1-character 
strings (ordinals < 256).

--
components: Interpreter Core, Unicode
messages: 415695
nosy: ezio.melotti, jkloth, vstinner
priority: normal
severity: normal
status: open
title: Statically allocated Unicode objects leak cached representations
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



[issue46084] Python 3.9.6 scan_dir returns filenotfound on long paths, but os_walk does not

2022-03-21 Thread Jeremy Kloth


Change by Jeremy Kloth :


--
keywords: +patch
nosy: +jkloth
nosy_count: 7.0 -> 8.0
pull_requests: +30121
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/32032

___
Python tracker 

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



[issue46084] Python 3.9.6 scan_dir returns filenotfound on long paths, but os_walk does not

2022-03-21 Thread Jeremy Kloth


Change by Jeremy Kloth :


--
pull_requests:  -30121

___
Python tracker 

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



[issue47084] Statically allocated Unicode objects leak cached representations

2022-03-21 Thread Jeremy Kloth


Change by Jeremy Kloth :


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

___
Python tracker 

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



[issue46084] Python 3.9.6 scan_dir returns filenotfound on long paths, but os_walk does not

2022-03-21 Thread Jeremy Kloth


Change by Jeremy Kloth :


--
pull_requests: +30123
pull_request: https://github.com/python/cpython/pull/32032

___
Python tracker 

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



[issue46084] Python 3.9.6 scan_dir returns filenotfound on long paths, but os_walk does not

2022-03-21 Thread Jeremy Kloth


Change by Jeremy Kloth :


--
pull_requests:  -30123

___
Python tracker 

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



[issue46788] regrtest fails to start on missing performance counter names

2022-03-21 Thread Jeremy Kloth


Jeremy Kloth  added the comment:

OK, I know it has been a busy month for Python, but this issue is really 
hampering my bug fixing efforts.  It makes the complete regrtest useless for 
me.  I am required to run each affected test directly so it is possible to miss 
side-effects of changes made.

The original PR is now 9 months old.

--

___
Python tracker 

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



[issue46315] Add support for WebAssembly System Interface (wasm32-wasi)

2022-03-21 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +30124
pull_request: https://github.com/python/cpython/pull/32033

___
Python tracker 

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



[issue47085] missing frame.f_lineno on JUMP_ABSOLUTE

2022-03-21 Thread Thomas Grainger


New submission from Thomas Grainger :

the following code prints:

import sys
import dis

import pprint

def demo():
for i in range(1):
if i >= 0:
pass


class Tracer:
def __init__(self):
self.events = []

def trace(self, frame, event, arg):
self.events.append((frame.f_lineno, frame.f_lasti, event))
frame.f_trace_lines = True
frame.f_trace_opcodes = True
return self.trace

def main():
t = Tracer()
old_trace = sys.gettrace()
try:
sys.settrace(t.trace)
demo()
finally:
sys.settrace(old_trace)
dis.dis(demo)
pprint.pp(t.events)


if __name__ == "__main__":
sys.exit(main())



  7   0 LOAD_GLOBAL  0 (range)
  2 LOAD_CONST   1 (1)
  4 CALL_FUNCTION1
  6 GET_ITER
>>8 FOR_ITER 7 (to 24)
 10 STORE_FAST   0 (i)

  8  12 LOAD_FAST0 (i)
 14 LOAD_CONST   2 (0)
 16 COMPARE_OP   5 (>=)
 18 POP_JUMP_IF_FALSE   11 (to 22)

  9  20 NOP
>>   22 JUMP_ABSOLUTE4 (to 8)

  7 >>   24 LOAD_CONST   0 (None)
 26 RETURN_VALUE
[(6, -1, 'call'),
 (7, 0, 'line'),
 (7, 0, 'opcode'),
 (7, 2, 'opcode'),
 (7, 4, 'opcode'),
 (7, 6, 'opcode'),
 (7, 8, 'opcode'),
 (7, 10, 'opcode'),
 (8, 12, 'line'),
 (8, 12, 'opcode'),
 (8, 14, 'opcode'),
 (8, 16, 'opcode'),
 (8, 18, 'opcode'),
 (9, 20, 'line'),
 (9, 20, 'opcode'),
 (None, 22, 'opcode'),
 (7, 8, 'line'),
 (7, 8, 'opcode'),
 (7, 24, 'opcode'),
 (7, 26, 'opcode'),
 (7, 26, 'return')]


but I'd expect  (9, 22, 'opcode') instead of (None, 22, 'opcode'),

--
messages: 415697
nosy: graingert
priority: normal
severity: normal
status: open
title: missing frame.f_lineno on JUMP_ABSOLUTE
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



[issue47085] missing frame.f_lineno on JUMP_ABSOLUTE

2022-03-21 Thread Ned Batchelder


Change by Ned Batchelder :


--
nosy: +Mark.Shannon, nedbat

___
Python tracker 

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



[issue7946] Convoy effect with I/O bound threads and New GIL

2022-03-21 Thread Omer Katz


Omer Katz  added the comment:

I think that we should focus our efforts on removing the GIL, now that we
have a feasible solution for doing so without breaking anything (hopefully)
however the removal of the GIL is still far from being complete and will
need to be rebased upon the latest Python version to be merged.

This issue would probably hurt Celery since some users use it with a thread
pool and it uses a few threads itself but it seems like fixing it is too
much effort so if we were to invest a lot of effort, I'd focus on removing
the problem entirely.

Instead, I suggest we document this with a warning in the relevant place so
that people would know to avoid or workaround the problem entirely.

On Mon, Mar 21, 2022, 20:32 Guido van Rossum  wrote:

>
> Change by Guido van Rossum :
>
>
> --
> nosy: +gvanrossum
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue47067] Add vectorcall for generica alias object

2022-03-21 Thread Dennis Sweeney


Dennis Sweeney  added the comment:


New changeset 1ea055bd53ccf976e88018983a3c13447c4502be by penguin_wwy in branch 
'main':
bpo-47067: Optimize calling GenericAlias objects (GH-31996)
https://github.com/python/cpython/commit/1ea055bd53ccf976e88018983a3c13447c4502be


--

___
Python tracker 

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



[issue12029] [doc] clarify that except does not match virtual subclasses of the specified exception type

2022-03-21 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 45833b50f0ccf2abb01304c900afee05b6d01b9e by Irit Katriel in 
branch 'main':
bpo-12029: [doc] clarify that except does not match virtual subclasses of the 
specified exception type (GH-32027)
https://github.com/python/cpython/commit/45833b50f0ccf2abb01304c900afee05b6d01b9e


--

___
Python tracker 

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



[issue47086] Include HTML docs with Windows installer instead of CHM

2022-03-21 Thread Steve Dower


New submission from Steve Dower :

CHM is getting too hard to handle (see e.g. issue47051 for the latest issue), 
so let's just bite the bullet and ship the HTML docs instead.

--
components: Windows
messages: 415701
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: Include HTML docs with Windows installer instead of CHM
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



[issue32592] Drop support of Windows Vista and Windows 7

2022-03-21 Thread Steve Dower


Change by Steve Dower :


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



[issue45336] xml.etree.ElementTree.write does not support `standalone` option

2022-03-21 Thread Ned Deily


Change by Ned Deily :


--
nosy: +eli.bendersky, scoder

___
Python tracker 

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



[issue12029] [doc] clarify that except does not match virtual subclasses of the specified exception type

2022-03-21 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +30125
pull_request: https://github.com/python/cpython/pull/32034

___
Python tracker 

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



[issue34071] asyncio: repr(task) raises AssertionError for coros which loop.create_task accepts; complications ensue

2022-03-21 Thread Jim DeLaHunt


Jim DeLaHunt  added the comment:

As the original reporter, I have no objection to closing this old report. It 
remains in the historical record. That was its purpose all along. Thank you to 
all the bug data maintainers!

--

___
Python tracker 

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



[issue47027] subprocess.run(), subprocess.Popen() should accept file descriptor as cwd parameter

2022-03-21 Thread Ned Deily


Change by Ned Deily :


--
nosy: +gregory.p.smith

___
Python tracker 

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



[issue12029] [doc] clarify that except does not match virtual subclasses of the specified exception type

2022-03-21 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +30126
pull_request: https://github.com/python/cpython/pull/32035

___
Python tracker 

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



[issue7946] Convoy effect with I/O bound threads and New GIL

2022-03-21 Thread Sophist


Sophist  added the comment:

> I think that we should focus our efforts on removing the GIL, now that we 
> have a feasible solution for doing so without breaking anything

Is this really a thing? Something that is definitely happening in a reasonable 
timescale?

Or are there some big compatibility issues likely to rear up and at best create 
delays, and at worse derail it completely?

Can someone give me some links about this please?

--

___
Python tracker 

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



[issue47067] Add vectorcall for generic alias object

2022-03-21 Thread Guido van Rossum


Change by Guido van Rossum :


--
title: Add vectorcall for generica alias object -> Add vectorcall for generic 
alias object

___
Python tracker 

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



[issue47087] Implement PEP 655 (Required/NotRequired)

2022-03-21 Thread Jelle Zijlstra


New submission from Jelle Zijlstra :

PEP 655 was just accepted, so we should implement it in typing.py! We should be 
able to largely reuse the typing-extensions implementation.

(I can't find David Foster on BPO but I'll point him to this issue.)

--
messages: 415704
nosy: AlexWaygood, JelleZijlstra, gvanrossum, kj
priority: normal
severity: normal
status: open
title: Implement PEP 655 (Required/NotRequired)

___
Python tracker 

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



[issue12029] [doc] clarify that except does not match virtual subclasses of the specified exception type

2022-03-21 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 7fc12540e3e873d8ff49711e70fd691185f977b9 by Irit Katriel in 
branch '3.10':
bpo-12029: [doc] clarify that except does not match virtual subclasses of the 
specified exception type (GH-32027) (GH-32034)
https://github.com/python/cpython/commit/7fc12540e3e873d8ff49711e70fd691185f977b9


--

___
Python tracker 

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



[issue47088] Implement PEP 675 (LiteralString)

2022-03-21 Thread Jelle Zijlstra


New submission from Jelle Zijlstra :

This one should be quite simple at runtime. I'll send a PR this week.

--
assignee: JelleZijlstra
messages: 415706
nosy: AlexWaygood, JelleZijlstra, gvanrossum, kj
priority: normal
severity: normal
stage: needs patch
status: open
title: Implement PEP 675 (LiteralString)
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



[issue47088] Implement PEP 675 (LiteralString)

2022-03-21 Thread Jelle Zijlstra


Change by Jelle Zijlstra :


--
components: +Library (Lib)

___
Python tracker 

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



[issue47087] Implement PEP 655 (Required/NotRequired)

2022-03-21 Thread Jelle Zijlstra


Change by Jelle Zijlstra :


--
components: +Library (Lib)
stage:  -> needs patch
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



[issue12029] [doc] clarify that except does not match virtual subclasses of the specified exception type

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



[issue12029] [doc] clarify that except does not match virtual subclasses of the specified exception type

2022-03-21 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 2d5e9f8d6296cc52da9823bb57e7f03d60b34d27 by Irit Katriel in 
branch '3.9':
bpo-12029: [doc] clarify that except does not match virtual subclasses of the 
specified exception type (GH-32027) (GH-32035)
https://github.com/python/cpython/commit/2d5e9f8d6296cc52da9823bb57e7f03d60b34d27


--

___
Python tracker 

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



[issue7946] Convoy effect with I/O bound threads and New GIL

2022-03-21 Thread Guido van Rossum


Guido van Rossum  added the comment:

Start here: 
https://docs.google.com/document/d/18CXhDb1ygxg-YXNBJNzfzZsDFosB5e6BfnXLlejd9l0/edit

AFAICT the SC hasn't made up their minds about this.

--

___
Python tracker 

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



[issue47006] PEP 646: Decide on substitution behavior

2022-03-21 Thread Matthew Rahtz


Matthew Rahtz  added the comment:

[Guido]

> What would be an example of a substitution that's too complex to do?

We also need to remember the dreaded arbitrary-length tuple. For example, I 
think it should be the case that:

```python
T = TypeVar('T')
Ts = TypeVarTuple('Ts')
class C(Generic[*Ts]): pass
Alias = C[T, *Ts]
Alias2 = Alias[*tuple[int, ...]]
# Alias2 should be C[int, *tuple[int, ...]]
```

Ok, this is a bit of a silly example, but if we're committing to evaluating 
substitutions correctly, we should probably make even this kind of example 
behave correctly so that users who accidentally do something silly can debug 
what's gone wrong.

[Serhiy]

> A repr can be less readable.

Definitely true.

> It will break equality comparison and hashing. Good bye caching.

Huh, I didn't know about this one. Fair enough, this is totally a downside.

> What about __origin__, __parameters__, __args__? How will they be calculated?

This could admittedly be thorny. We'd have to think it through carefully. 
Admittedly also a downside.

> It can break code which uses annotations for something. For example it can 
> break dataclasses.

Oh, also interesting - I didn't know about this one either. Could you give an 
example?

> The first case will be practically fixed by GH 32030 after chenging the 
> grammar to allow unpacking in index tuple: A[*B].

We actually deliberately chose not to unpack concrete tuple types - see the 
description of https://github.com/python/cpython/pull/30398, under the heading 
'Starred tuple types'. (If you see another way around it, though, let me know.)

> Two other cases will be fixed by GH 32031. It does not require any C code.

I'm also not sure about this one; disallowing unpacked TypeVarTuples in 
argument lists to generic aliases completely (if I've understood right?) seems 
like too restrictive a solution. I can imagine there might be completely 
legitimate cases where the ability to do this would be important. For example:

```python
DType = TypeVar('DType')
Shape = TypeVarTuple('Shape')
class Tensor(Generic[DType, *Shape]): ...
Uint8Tensor = Tensor[uint8, *Shape]
Unit8BatchTensor = Uint8Tensor[Batch, *Shape]
```

> Note that the alternative proposition is even more lenient to errors.

True, but at least it's predictably lenient to errors - I think the repr makes 
it very clear that "Woah, you're doing something advanced here. You're on your 
own!" I think it better fits the principle of least astonishment to have 
something that consistently lets through all errors of a certain class than 
something that sometimes catches errors and sometimes doesn't.

--

___
Python tracker 

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



[issue19961] MacOSX: Tkinter build failure when building without command-line tools

2022-03-21 Thread Ned Deily


Ned Deily  added the comment:

I think we can close this without further action as we no longer support using 
the Apple-supplied system Tcl and Tk and we know it is possible to build and 
link current version of Python 3.x with Tcl/Tk 8.6.8, at least, on macOS 10.9.

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

___
Python tracker 

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



[issue47089] Avoid sporadic failure of test_compileall on Windows

2022-03-21 Thread Jeremy Kloth


New submission from Jeremy Kloth :

Testing on Windows occasionally has issues in test_compileall when running with 
multiple processes.  This is due to other test files importing stdlib modules 
at the same time that compileall is doing its own testing.  While not fatal 
(test_compileall succeeds on re-run), the transient warnings obfuscate the test 
results for other "real" warnings (e.g., compiler warnings) without digging 
into each run separately.

This can be avoided by using the PYTHONPYCACHEPREFIX functionality to compile 
the stdlib modules locally.

--
components: Tests
messages: 415711
nosy: jkloth
priority: normal
severity: normal
status: open
title: Avoid sporadic failure of test_compileall on Windows
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



[issue47006] PEP 646: Decide on substitution behavior

2022-03-21 Thread Matthew Rahtz


Matthew Rahtz  added the comment:

P.s. To be clear, (I think?) these are all substitutions that are computable. 
We *could* implement the logic to make all these evaluate correctly if we 
wanted to. It's just a matter of how much complexity we want to allow in 
typing.py (or in the runtime in general, if we say farmed some of this logic 
out to a separate module).

--

___
Python tracker 

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



[issue47089] Avoid sporadic failure of test_compileall on Windows

2022-03-21 Thread Jeremy Kloth


Change by Jeremy Kloth :


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

___
Python tracker 

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



[issue46788] regrtest fails to start on missing performance counter names

2022-03-21 Thread Steve Dower


Steve Dower  added the comment:

You're closer to this stuff than I am, so if you say it works for your 
scenarios and it doesn't break the existing ones, I'll merge it.

Do we need to backport to 3.8 at this point?

--

___
Python tracker 

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



[issue26052] pydoc for __init__ with not docstring

2022-03-21 Thread Irit Katriel


Irit Katriel  added the comment:

Is the "See help(type(self)) for accurate signature." part of object.__init__ 
docstring useful? May we can just remove it?

--
nosy: +iritkatriel

___
Python tracker 

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



[issue7946] Convoy effect with I/O bound threads and New GIL

2022-03-21 Thread Sophist


Sophist  added the comment:

> https://docs.google.com/document/d/18CXhDb1ygxg-YXNBJNzfzZsDFosB5e6BfnXLlejd9l0/edit

1. The steering committee hasn't given the go ahead for this yet, and we have 
no idea when such a decision will be made nor whether the decision with be yes 
or no.

2. Even after the decision is made "Removing the GIL will be a large, 
multi-year undertaking with increased risk for introducing bugs and 
regressions."

3. The promised performance gains are actually small by comparison to the 
existing project that Guido is running is hoping to achieve. It is unclear 
whether the no-gil implementation would impact those gains, and if so whether a 
small reduction in the large planned performance gains would actually more than 
wipe out the modest performance gains promised by the no-gil project.

4. Given that this "Removing the GIL will require making trade-offs and taking 
on substantial risk", it is easy to see that this project could come across an 
unacceptable risk or insurmountable technical problem at any point and thus 
fall by the wayside.

Taking all of the above points together, I think that there is still merit in 
considering the pros and cons of a GIL scheduler.

--

___
Python tracker 

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



[issue47027] subprocess.run(), subprocess.Popen() should accept file descriptor as cwd parameter

2022-03-21 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Basically you want it to call fchdir() instead of chdir() when passed a fd 
(integer) instead of a string/Path-like.  That makes sense and should be a 
reasonably straight forward set of changes to _posixsubprocess.c.

(A way to convert a fd into a Path-like object would _not_ work as that'd 
reintroduce the TOCTOU on the directory - that'd be a pathlib feature request 
anyways, not a subprocess one)

--
stage:  -> needs patch
versions: +Python 3.11 -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



[issue47086] Include HTML docs with Windows installer instead of CHM

2022-03-21 Thread Steve Dower


Change by Steve Dower :


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

___
Python tracker 

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



[issue47048] Python 3.10.3 + Osx Lion : fatal error (make) signalmodule or more

2022-03-21 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the report. This problem was reported previously in bpo-24844 and 
was determined to be due a partial implementation of atomics support in the 
early versions of LLVM compilers provided in the Apple Developer Tools for 
macOS 10.7. While the start of a patch was proposed there, it languished for 
lack of interest and the issue was subsequently closed by the submitter. Since 
you have already have a workaround (and using a newer compiler is a good idea 
in this), I think there will be little interest in reviving this issue.

By the way, since you need to continue to use macOS 10.7, you may want to 
consider using Python (and many other third-party packages) from the MacPorts 
project. They provide pre-built binaries for these packages, including the 
latest versions of Python 3.10, built for multiple versions of macOS including 
10.7 Lion. I was able to install MacPorts and a fully functional Python 3.10.3 
on a 10.7.5 system in fewer than 5 minutes.  
https://www.macports.org/install.php#installing

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Python 3.5rc1 compilation error with Apple clang 4.2 included 
with Xcode 4
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



[issue47082] No protection: `import numpy` in two different threads can lead to race-condition

2022-03-21 Thread Christian Heimes


Christian Heimes  added the comment:

Python used to have a global import lock. The global import lock prevented 
recursive imports from other threads while the current thread was importing. 
The import lock was source of issues and dead locks. Antoine replaced it with a 
fine grained import lock in bpo-9260.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue46788] regrtest fails to start on missing performance counter names

2022-03-21 Thread Jeremy Kloth


Jeremy Kloth  added the comment:

With 3.8 so close to security only, I would doubt it is worth it anymore.  I've 
just run the PR against HEAD and it still works as is, so should be good to go.

--
versions:  -Python 3.8

___
Python tracker 

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



[issue27198] Adding an assertClose() method to unittest.TestCase

2022-03-21 Thread Chris Barker

Chris Barker  added the comment:

Yes -- it was on me years ago to do this.

Honestly, I haven't done it yet because I lost the momentum of PyCon, and I 
don't personally use unittest at all anyway.

But I still think it's a good idea, and I'd like to keep it open with the 
understanding that if I don't get it done soon, it'll be closed (or someone 
else is welcome to do it, of course, if they want)

is, say, three weeks soon enough?


@Vedran Čačić wrote:
"... and in the moment that you're deciding on this, you have the exact value 
expected right in front of you."

Well, yes and no. First of all, not always a literal, though yes, most often it 
is. But:

1) If the "correct" value is, e.g. 1.2345678e23 -- the delta is not exactly 
"right there in front of you" -- yes, not that hard to figure out, but it takes 
a bit of thought, compared to "I want it to be close to this number within 
about 6 decimal places" (rel_tol=1e-6)

2) Sometimes you have a bunch of values that you are looping over in your 
tests, or doing parameterized tests -- it which case the relative tolerance 
could be constant, but the delta is not.

3) With that argument, why do we have the "decimal places" tolerance, rather 
than a delta always?

Anyway, if I didn't consistently use pytest, I'd want this, so I'm happy to get 
it done.

Thanks for the ping, @Irit Katriel

--

___
Python tracker 

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



[issue47026] BytesWarning in zipimport paths on sys.path

2022-03-21 Thread Brett Cannon


Change by Brett Cannon :


--
dependencies: +bytes do not work on sys.path

___
Python tracker 

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



[issue47026] BytesWarning in zipimport paths on sys.path

2022-03-21 Thread Brett Cannon


Brett Cannon  added the comment:

bpo-47025 is a bigger discussion about bytes paths that probably needs to be 
resolved first before worrying about zipimport.

--

___
Python tracker 

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



[issue47082] No protection: `import numpy` in two different threads can lead to race-condition

2022-03-21 Thread Sebastian Berg


Sebastian Berg  added the comment:

Thanks, so there should already be a lock in place (sorry, I missed that).  But 
somehow we seem to get around it?

Do you know what may cause the locking logic to fail in this case?  Recursive 
imports in NumPy itself?  Or Cython using low-level C-API?

I.e. can you think of something to investigate that may help NumPy/Cython to 
make sure that locking is successful?


/* Cythons Import code (slightly cleaned up for Python 3 only): */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
PyObject *empty_list = 0;
PyObject *module = 0;
PyObject *global_dict = 0;
PyObject *empty_dict = 0;
PyObject *list;
if (from_list)
list = from_list;
else {
empty_list = PyList_New(0);
if (!empty_list)
goto bad;
list = empty_list;
}
global_dict = PyModule_GetDict(__pyx_m);
if (!global_dict)
goto bad;
empty_dict = PyDict_New();
if (!empty_dict)
goto bad;
{
if (level == -1) {
if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) {
module = PyImport_ImportModuleLevelObject(
name, global_dict, empty_dict, list, 1);
if (!module) {
if (!PyErr_ExceptionMatches(PyExc_ImportError))
goto bad;
PyErr_Clear();
}
}
level = 0;
}
if (!module) {
module = PyImport_ImportModuleLevelObject(
name, global_dict, empty_dict, list, level);
}
}
bad:
Py_XDECREF(empty_list);
Py_XDECREF(empty_dict);
return module;
}

--

___
Python tracker 

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



[issue41210] Docs: More description(warning) about LZMA1 + BCJ with FORMAT_RAW

2022-03-21 Thread Ned Deily


Change by Ned Deily :


--
Removed message: https://bugs.python.org/msg415670

___
Python tracker 

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



[issue47051] Windows v3.10.3 .chm file (in python310\doc) page headings are messed up and spread out over several lines. Also the font has changed from the former san serif font to a smaller and harde

2022-03-21 Thread Steve Dower


Steve Dower  added the comment:

Doesn't seem to be any relevant changes in the repo between v3.10.2 and 
v3.10.3, and the theme hasn't changed. Obviously the HTMLHelp tools haven't 
changed in a decade or so, and the only difference in the build logs looks like 
less errors in the later one (apparently index terms didn't get fixed up 
properly in 3.10.2).

So other than running the build again and hoping (which we'll likely be doing 
later this week anyway), doesn't seem to be anything that can be fixed here.

--

___
Python tracker 

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



[issue18241] Add unique option to heapq functions

2022-03-21 Thread Irit Katriel


Irit Katriel  added the comment:

I would dedup when extracting items from the queue, because it is trivial to 
find duplicates then. It can be done with a simple wrapper, without any changes 
to the queue.

--
nosy: +iritkatriel

___
Python tracker 

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



[issue47061] Deprecate modules listed in PEP 594

2022-03-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +30129
pull_request: https://github.com/python/cpython/pull/32039

___
Python tracker 

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



[issue47061] Deprecate modules listed in PEP 594

2022-03-21 Thread miss-islington


miss-islington  added the comment:


New changeset 9ac2de922a0f783bd43b8e026e4fb70fd1888572 by Brett Cannon in 
branch 'main':
bpo-47061: document module deprecations due to PEP 594 (GH-31984)
https://github.com/python/cpython/commit/9ac2de922a0f783bd43b8e026e4fb70fd1888572


--
nosy: +miss-islington

___
Python tracker 

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



[issue43141] `asdict` fails with frozen dataclass keys, using raw dict form

2022-03-21 Thread GalaxySnail


Change by GalaxySnail :


--
nosy: +GalaxySnail

___
Python tracker 

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



[issue1703592] [doc] mention that setlocale raises exception if given a nonexisting locale

2022-03-21 Thread Irit Katriel


Change by Irit Katriel :


--
keywords: +easy
title: have a way to ignore nonexisting locales in locale.setlocale -> [doc] 
mention that setlocale raises exception if given a nonexisting locale
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.4

___
Python tracker 

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



[issue46788] regrtest fails to start on missing performance counter names

2022-03-21 Thread Steve Dower


Steve Dower  added the comment:

"So close" being some months ago ;)

I need to retrigger address sanitiser so that it passes before merging, but 
after that, I'll merge (and hopefully the backport is clean).

Copying Eryk Sun's comment here for posterity:

This would be less fragile and more useful in general if support were added to 
_winapi for PdhOpenQueryW(), PdhAddEnglishCounterW(), PdhCollectQueryData(), 
PdhCollectQueryDataEx(), PdhGetFormattedCounterValue(), and PdhCloseQuery(). 
The English counter name is "\System\Processor Queue Length" -- no need to 
worry about localized names, hard-coded values, or hard-coded struct sizes and 
offsets.

--

___
Python tracker 

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



  1   2   >