[issue45382] platform() is not able to detect windows 11

2022-01-26 Thread Alex Zaslavskis

Alex Zaslavskis  added the comment:

The quick research on web gived me that C/C++ developers will just get the
build version and compare it with predefined list.
See more there:
https://docs.microsoft.com/answers/questions/672988/c-detect-windows-build.html

ср, 26 янв. 2022 г., 05:05 Eryk Sun :

>
> Eryk Sun  added the comment:
>
> > sys.getwindowsversion() which exposes GetVersionEx() looks fine to me.
>
> In Windows 8+, sys.getwindowsversion() returns a version that can vary
> from 6.2.9200 (Windows 8) up to the actual OS version. It depends on the OS
> versions supported by the application manifest -- with 6.2.9200 used when
> there's no application manifest. The platform module uses the shell's VER
> command because it returns the real OS version.
>
> The version number for Windows 11 is 10.0.22000+. The platform module
> misreports this as Windows 10. In msg403452, I suggested a modification to
> use build numbers. In msg404451 Steve said we may as well use the WMI
> result to identify Windows 11 based on the OS caption. If we use WMI, we
> can choose to rely on wmic.exe (deprecated), PowerShell, or implement our
> own code in C/C++.
>
> > I don't understand why we have to handle XML or JSON and encoding...
>
> Using JSON or XML (ElementTree) isn't required, if you'd rather parse
> human-readable output. AFAIK, the Win32_OperatingSystem caption is always
> ASCII.
>
> In general, wmic.exe writes output text to a pipe that's encoded with the
> system OEM code page. pwsh.exe, powershell.exe, and cmd.exe write output
> text to a pipe (from their internal commands/cmdlets) that's encoded using
> the console's output code page. cmd.exe also supports a /U option to use
> UTF-16.
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue45382] platform() is not able to detect windows 11

2022-01-26 Thread Alex Zaslavskis


Alex Zaslavskis  added the comment:

The quick research on web gived me that C/C++ developers will just get the 
build version and compare it with predefined list.
See more there: 
https://docs.microsoft.com/answers/questions/672988/c-detect-windows-build.html

--

___
Python tracker 

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



[issue35829] datetime: parse "Z" timezone suffix in fromisoformat()

2022-01-26 Thread Matt Wozniski


Matt Wozniski  added the comment:

I agree with Brett. Adding `allow_z` (or perhaps `compact` or 
`use_utc_designator` if we're bikeshedding) as an optional keyword only 
argument to `.isoformat()` would allow us to keep the explanation that what 
`.fromisoformat()` can parse is exactly what `.isoformat()` can produce, while 
giving a feature to `.fromisoformat()` that many have asked for and that would 
have minimal overhead in terms of code complexity or runtime performance.

Would you accept a PR that implements that, Paul?

--
nosy: +godlygeek

___
Python tracker 

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



[issue45382] platform() is not able to detect windows 11

2022-01-26 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

On 26.01.2022 01:29, Eryk Sun wrote:
> 
> Eryk Sun  added the comment:
> 
>> Bit wmic seems nice solution.
>> Is still working for windows lower than 11?
> 
> wmic.exe is still included in Windows 10 and 11, but it's officially 
> deprecated [1], which means it's no longer being actively developed, and it 
> might be removed in a future update. PowerShell is the preferred way to use 
> WMI.

All of these require shelling out to the OS, so why not stick to
`ver` as we've done in the past. This has existed for ages and
will most likely not disappear anytime soon.

Is there a good reason to prefer wmic or PowerShell (which are
less likely to be available or reliable) ?

> ---
> [1] 
> https://docs.microsoft.com/en-us/windows/deployment/planning/windows-10-deprecated-features
-- 
Marc-Andre Lemburg
eGenix.com

--

___
Python tracker 

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



[issue46529] Improve test coverage of `Union` and `Optional` repr()

2022-01-26 Thread Nikita Sobolev


New submission from Nikita Sobolev :

There are several important cases that are missing from current `repr()` tests 
of `typing.Union` and `typing.Optional`:
1. This condition is not covered at all: `if args[0] is type(None):` 
https://github.com/python/cpython/blob/7cf285d82ec722d4225297366013e924805171f2/Lib/typing.py#L1236
3. `repr()` of `Union[str, None]` is not directly tested as well
3. `repr()` of `Union` with more that 2 parameters with `None` is not covered. 
This is an important corner case because of this condition: `if len(args) == 
2:` 
https://github.com/python/cpython/blob/7cf285d82ec722d4225297366013e924805171f2/Lib/typing.py#L1235

I will send a PR with new assertions.

--
components: Tests
messages: 411715
nosy: gvanrossum, kj, sobolevn
priority: normal
severity: normal
status: open
title: Improve test coverage of `Union` and `Optional` repr()
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



[issue44734] turtle: tests for Vec2D.__abs__ are too strict

2022-01-26 Thread Karolina Surma


Change by Karolina Surma :


--
nosy: +ksurma
nosy_count: 4.0 -> 5.0
pull_requests: +29089
pull_request: https://github.com/python/cpython/pull/30910

___
Python tracker 

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



[issue46529] Improve test coverage of `Union` and `Optional` repr()

2022-01-26 Thread Nikita Sobolev


Change by Nikita Sobolev :


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

___
Python tracker 

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



[issue24398] Update test_capi to use test.support.script_helper

2022-01-26 Thread Nikita Sobolev


Change by Nikita Sobolev :


--
nosy: +sobolevn
nosy_count: 2.0 -> 3.0
pull_requests: +29091
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/30912

___
Python tracker 

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



[issue33205] GROWTH_RATE prevents dict shrinking

2022-01-26 Thread Inada Naoki


Inada Naoki  added the comment:

We do not have *fill* since Python 3.6.
There is a `dk_nentries` instead. But when `insertion_resize()` is called, 
`dk_nentries` is equal to `USABLE_FRACTION(dk_size)` (dk_size is `1 << 
dk_log2_size` for now). So it is different from *fill* in the old dict.

I chose `dk_used*3` as GROWTH_RATE because it reserves more spaces when there 
are dummies than when there is no dummy, as I described in the same comment:

> In case of dict growing without deletion, dk_size is doubled for each resize 
> as current behavior.
> When there are deletion, dk_size is growing aggressively than Python 3.3 
> (used*2 -> used*3).  And it allows dict shrinking after massive deletions.

For example, when current dk_size == 16 and USABLE_FRACTION(dk_size) == 10, new 
dk_size is:

* used = 10 (dummy=0) -> 32 (31.25%)
* used = 9 (dummy=1)  -> 32 (28.125%)
(snip)
* used = 6 (dummy=4)  -> 32 (18.75%)
* used = 5 (dummy=5)  -> 16 (31.25%)
* used = 4 (dummy=6)  -> 16 (25%)
(snip)
* used = 2 (dummy=8)  -> 8 (25%)

As you can see, dict is more sparse when there is dummy than when there is no 
dummy, except used=5/dummy=5 case.

There may be a small room for improvement, especially for `used=5/dummy=5` 
case. But I am not sure it is worth enough to use more complex GROWTH_RATE than 
used*3.
Any good idea?

--

___
Python tracker 

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



[issue46530] `'thread_time'` is missing from `test_get_clock_info`

2022-01-26 Thread Nikita Sobolev


New submission from Nikita Sobolev :

Right now here's how `test_get_clock_info` looks like:

```
def test_get_clock_info(self):
clocks = ['monotonic', 'perf_counter', 'process_time', 'time']

for name in clocks:
info = time.get_clock_info(name)

#self.assertIsInstance(info, dict)
self.assertIsInstance(info.implementation, str)
self.assertNotEqual(info.implementation, '')
self.assertIsInstance(info.monotonic, bool)
self.assertIsInstance(info.resolution, float)
# 0.0 < resolution <= 1.0
self.assertGreater(info.resolution, 0.0)
self.assertLessEqual(info.resolution, 1.0)
self.assertIsInstance(info.adjustable, bool)
```

It tests for out of five possible arguments to `time.get_clock_info`.
Docs: https://docs.python.org/3/library/time.html#time.get_clock_info
`'thread_time'` is missing for some reason.

I think we should add it to the test.

Link: 
https://github.com/python/cpython/blob/7cf285d82ec722d4225297366013e924805171f2/Lib/test/test_time.py#L559

PR is incoming.

--
components: Tests
messages: 411717
nosy: sobolevn
priority: normal
severity: normal
status: open
title: `'thread_time'` is missing from `test_get_clock_info`
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



[issue46530] `'thread_time'` is missing from `test_get_clock_info`

2022-01-26 Thread Nikita Sobolev


Change by Nikita Sobolev :


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

___
Python tracker 

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



[issue46513] AC_C_CHAR_UNSIGNED from configure.ac confuses GCC 12+ by defining __CHAR_UNSIGNED__

2022-01-26 Thread miss-islington


miss-islington  added the comment:


New changeset 6e5a193816e1bdf11f5fb78d620995fd6987ccf8 by Christian Heimes in 
branch 'main':
bpo-46513: Remove AC_C_CHAR_UNSIGNED / __CHAR_UNSIGNED__ (GH-30851)
https://github.com/python/cpython/commit/6e5a193816e1bdf11f5fb78d620995fd6987ccf8


--
nosy: +miss-islington

___
Python tracker 

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



[issue46513] AC_C_CHAR_UNSIGNED from configure.ac confuses GCC 12+ by defining __CHAR_UNSIGNED__

2022-01-26 Thread Petr Viktorin


Petr Viktorin  added the comment:

Yeah, that looks like it's for some long-forgotten compiler that didn't 
implement `signed char` at all. 1994 was a fun time, apparently.

--
nosy:  -miss-islington

___
Python tracker 

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



[issue46513] AC_C_CHAR_UNSIGNED from configure.ac confuses GCC 12+ by defining __CHAR_UNSIGNED__

2022-01-26 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +29093
pull_request: https://github.com/python/cpython/pull/30914

___
Python tracker 

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



[issue46513] AC_C_CHAR_UNSIGNED from configure.ac confuses GCC 12+ by defining __CHAR_UNSIGNED__

2022-01-26 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +29094
pull_request: https://github.com/python/cpython/pull/30915

___
Python tracker 

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



[issue46531] Simplify exception handling in `doctest.py`

2022-01-26 Thread Nikita Sobolev


New submission from Nikita Sobolev :

Right now there are two places where `sys.exc_info()` calls are not required 
anymore:
1. 
https://github.com/python/cpython/blob/6e5a193816e1bdf11f5fb78d620995fd6987ccf8/Lib/doctest.py#L1352-L1353
2. 
https://github.com/python/cpython/blob/6e5a193816e1bdf11f5fb78d620995fd6987ccf8/Lib/doctest.py#L2640-L2641

There are also places where it is exposed as a part of public API (I am not 
going to change that, at least in this PR):
- 
https://github.com/python/cpython/blob/6e5a193816e1bdf11f5fb78d620995fd6987ccf8/Lib/doctest.py#L1757
- 
https://github.com/python/cpython/blob/6e5a193816e1bdf11f5fb78d620995fd6987ccf8/Lib/doctest.py#L1262

And some private APIs (out of scope as well):
- 
https://github.com/python/cpython/blob/6e5a193816e1bdf11f5fb78d620995fd6987ccf8/Lib/doctest.py#L244

PR is on its way!

--
components: Library (Lib)
messages: 411720
nosy: iritkatriel, sobolevn
priority: normal
severity: normal
status: open
title: Simplify exception handling in `doctest.py`
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



[issue46531] Simplify exception handling in `doctest.py`

2022-01-26 Thread Nikita Sobolev


Change by Nikita Sobolev :


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

___
Python tracker 

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



[issue46532] Improve effeciency of PRECALL/CALL instructions

2022-01-26 Thread Mark Shannon


New submission from Mark Shannon :

The PRECALL/CALL bytecode pair for calls is new (still in review at time of 
writing) and is not as efficient as it could be.

Some possible improvements are:

Transfer refcount of func when making a frame.

NULL call_shape.kwnames after use instead of in PRECALL, as many specialized 
instructions already assert that it is NULL.

Specialize the PRECALL instructions. Either for simple cases like `type(arg)` 
so we can skip the CALL, or for complex cases like `PythonClass(args)` where 
PRECALL can create object, and set up the frame so that `CALL` calls the 
__init__ function.

--
assignee: Mark.Shannon
messages: 411721
nosy: Mark.Shannon
priority: normal
severity: normal
status: open
title: Improve effeciency of PRECALL/CALL instructions

___
Python tracker 

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



[issue46531] Simplify exception handling in `doctest.py`

2022-01-26 Thread Irit Katriel


Irit Katriel  added the comment:

I don't think this is worth doing in a module where we can't completely get rid 
of the exc_info triplet.

--

___
Python tracker 

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



[issue46532] Improve effeciency of PRECALL/CALL instructions

2022-01-26 Thread Mark Shannon


Mark Shannon  added the comment:

Possibly consider replacing the specializations for `str(arg)` and `tuple(arg)` 
with a more general bytecode that can be used for other objects as well.

--

___
Python tracker 

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



[issue46531] Simplify exception handling in `doctest.py`

2022-01-26 Thread Irit Katriel


Irit Katriel  added the comment:

In other words, I don't see why it's an improvement to replace

exception = sys.exc_info()

by 

exception = type(exc), exc, exc.__traceback__

when sys.exc_info() does exactly what your inlined version does.

--

___
Python tracker 

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



[issue46533] Specialize for staticmethods and classmethods

2022-01-26 Thread Mark Shannon


New submission from Mark Shannon :

Calls of the form `x.m(args)` where either `x = X` or x = X()` and X is a 
class, and `m` is a classmethod or staticmethod are not currently specialized.

Typically the `x.m()` will translate to:

LOAD_FAST x
LOAD_METHOD "m"
PRECALL_METHOD 0
CALL 0

Since classmethods and staticmethods are descriptors, only the LOAD_METHOD 
should need specializing. The PRECALL/CALL will be able to handle the resulting 
values without modification.

--
messages: 411725
nosy: Mark.Shannon, kj
priority: normal
severity: normal
status: open
title: Specialize for staticmethods and classmethods

___
Python tracker 

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



[issue45578] Missing tests for the dis module

2022-01-26 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 84f093918a4be663775afe2933f4be86f72fe495 by Nikita Sobolev in 
branch 'main':
bpo-45578: add a test case for `dis.findlabels` (GH-30058)
https://github.com/python/cpython/commit/84f093918a4be663775afe2933f4be86f72fe495


--
nosy: +corona10

___
Python tracker 

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



[issue43698] Use syntactically correct examples on abc package page

2022-01-26 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset b9d8980d89bfaa4bf16d60f0488adcc9d2cbf5ef by Nikita Sobolev in 
branch 'main':
bpo-43698: do not use `...` as argument name in docs (GH-30502)
https://github.com/python/cpython/commit/b9d8980d89bfaa4bf16d60f0488adcc9d2cbf5ef


--
nosy: +corona10

___
Python tracker 

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



[issue43698] Use syntactically correct examples on abc package page

2022-01-26 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue43698] Use syntactically correct examples on abc package page

2022-01-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29097
pull_request: https://github.com/python/cpython/pull/30918

___
Python tracker 

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



[issue46531] Simplify exception handling in `doctest.py`

2022-01-26 Thread Nikita Sobolev


Nikita Sobolev  added the comment:

Fair enough! The only improvement is that we don't call `sys.exc_info` twice 
here: 
https://github.com/python/cpython/blob/6e5a193816e1bdf11f5fb78d620995fd6987ccf8/Lib/doctest.py#L2641-L2644

But, I think it is a minor thing.

Looks like I've misunderstood the long time goal of `sys.exc_info` 
refactorings. Thanks a lot for the feedback!

--
resolution:  -> not a bug
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



[issue46529] Improve test coverage of `Union` and `Optional` repr()

2022-01-26 Thread Ken Jin


Ken Jin  added the comment:


New changeset d0c690b5f85c679de6059cf353fe0524e905530e by Nikita Sobolev in 
branch 'main':
bpo-46529: increase coverage of `typing.Union.__repr__` method (GH-30911)
https://github.com/python/cpython/commit/d0c690b5f85c679de6059cf353fe0524e905530e


--

___
Python tracker 

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



[issue46529] Improve test coverage of `Union` and `Optional` repr()

2022-01-26 Thread miss-islington


Change by miss-islington :


--
pull_requests: +29099
pull_request: https://github.com/python/cpython/pull/30920

___
Python tracker 

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



[issue46531] Simplify exception handling in `doctest.py`

2022-01-26 Thread Irit Katriel


Irit Katriel  added the comment:

In the long term we will want to not have the triplet, but this is a process 
that will take a few python versions to complete (when 3.11 is the oldest 
supported version). And it is not going to be simple.

In the meantime, where there is an advantage to removing exc_info because the 
code would be simplified or something else is changing nearby, we can do it. 
But I wouldn't remove exc_info just for the sake of it - such code churn makes 
it hard to backport other changes.

--

___
Python tracker 

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



[issue46529] Improve test coverage of `Union` and `Optional` repr()

2022-01-26 Thread miss-islington


miss-islington  added the comment:


New changeset c730342005edf67333c37b575b419e2fc67d232b by Miss Islington (bot) 
in branch '3.10':
bpo-46529: increase coverage of `typing.Union.__repr__` method (GH-30911)
https://github.com/python/cpython/commit/c730342005edf67333c37b575b419e2fc67d232b


--

___
Python tracker 

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



[issue46533] Specialize for staticmethods and classmethods

2022-01-26 Thread Ken Jin


Ken Jin  added the comment:

Slightly off topic rambling:

My own toy attempts at classmethod specialization suggested that it barely sped 
anything up. Most of the time went to creation of the new classmethod object. 
I'd imagine supporting Py_TPFLAGS_METHOD_DESCRIPTOR would speed things up, but 
they cover such a small % of calls that Py_TPFLAGS_METHOD_DESCRIPTOR's 
complexity might not be worth it.

Increasing specialization percentage is always a plus though. LOAD_METHOD needs 
better specialization success rates.

--

___
Python tracker 

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



[issue46529] Improve test coverage of `Union` and `Optional` repr()

2022-01-26 Thread miss-islington


miss-islington  added the comment:


New changeset 29eefcc9c688bc4097f2660de1fa846c5ea54735 by Miss Islington (bot) 
in branch '3.9':
bpo-46529: increase coverage of `typing.Union.__repr__` method (GH-30911)
https://github.com/python/cpython/commit/29eefcc9c688bc4097f2660de1fa846c5ea54735


--

___
Python tracker 

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



[issue34680] asyncio event_loop fails when accessed from multiple threads

2022-01-26 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

BaseEventLoop has _check_loop() method that is closed in debug mode only.
UnixEventLoop doesn't call this method for unix-specific API.

Adding the check to add_signal_handler()/remove_signal_handler() doesn't hurt, 
sure. 
But it doesn't help as the script is executed in non-debug mode.

Performing a check on every call_soon() call kills the performance, that's why 
debug mode is required.

--

___
Python tracker 

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



[issue23556] [doc] Scope for raise without argument is different in Python 2 and 3

2022-01-26 Thread Kinshuk Dua


Kinshuk Dua  added the comment:

@iritkatriel I thought the PR won't be reviewed after being marked as stale 
that's why I closed it. I've reopened it and I'm interested in finishing it.

--
nosy: +kinshukdua2

___
Python tracker 

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



[issue46534] Implementing PEP 673 (Self type)

2022-01-26 Thread Gobot1234


New submission from Gobot1234 :

See [PEP 673](https://www.python.org/dev/peps/pep-0673)

I'm planning to implement this in cpython some point today.

--
components: Library (Lib)
messages: 411736
nosy: Gobot1234, Jelle Zijlstra, gvanrossum, kj
priority: normal
severity: normal
status: open
title: Implementing PEP 673 (Self type)
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



[issue46534] Implementing PEP 673 (Self type)

2022-01-26 Thread Alex Waygood


Change by Alex Waygood :


--
nosy: +AlexWaygood, sobolevn

___
Python tracker 

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



[issue46533] Specialize for staticmethods and classmethods

2022-01-26 Thread Mark Shannon


Mark Shannon  added the comment:

For classmethods, I expect the savings to come from not creating a bound-method 
and from better specialization of the following call.

classmethod case:

>>> class C:
... @classmethod
... def m(*args):
...  pass
... 
>>> C.m
>
>>> C().m
>

So, without specialization LOAD_METHOD "m" has the following stack effect (with 
`x = C()`):
x -> NULL 
C -> NULL 
With specialization:
x -> C 
C -> C 

For static methods the saving is less as there is no change in stack effect, 
but we do save the lookup, and we can reuse existing bytecodes.


Neither classmethod or staticmethod should have Py_TPFLAGS_METHOD_DESCRIPTOR 
set, as they have different semantics.

--

___
Python tracker 

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



[issue46535] Possible bug: pdb causes exception

2022-01-26 Thread Stefan Ecklebe


New submission from Stefan Ecklebe :

Consider a script called snippet.py, containing the lines

--
import numpy as np
import pandas as pd

np.finfo(float)
idx = pd.MultiIndex.from_tuples([(1, 2)])
np.finfo(float)
print("Done")
--

When running via 'python snippet.py' no errors occur. However when running via 
'python -m pdb snippet.py' the following happens:
> snippet.py(1)()
-> import numpy as np
(Pdb) r
--Return--
> snippet.py(6)()->None
-> np.finfo(float)
(Pdb) c
Traceback (most recent call last):
  File "VENV/lib/python3.10/site-packages/numpy/core/getlimits.py", line 459, 
in __new__
dtype = numeric.dtype(dtype)
TypeError: 'NoneType' object is not callable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.10/pdb.py", line 1723, in main
pdb._runscript(mainpyfile)
  File "/usr/lib/python3.10/pdb.py", line 1583, in _runscript
self.run(statement)
  File "/usr/lib/python3.10/bdb.py", line 597, in run
exec(cmd, globals, locals)
  File "", line 1, in 
  File "snippet.py", line 6, in 
np.finfo(float)
  File "VENV/lib/python3.10/site-packages/numpy/core/getlimits.py", line 462, 
in __new__
dtype = numeric.dtype(type(dtype))
TypeError: 'NoneType' object is not callable
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program

Commenting the MultiIndex line will will get rid of the problem but I am not 
quite sure why.

Please note that this error only occurs if the script is run via 'r' in pdb. 
Running via 'c' does not cause any problems.
Therefore, I suspect that the problem may be with pdb instead of the external 
packages.

My setup:
$ python --version
Python 3.10.1
$ pip list | grep numpy
numpy1.22.1
$ pip list | grep pandas
pandas   1.4.0

--
components: Library (Lib)
messages: 411738
nosy: cklb
priority: normal
severity: normal
status: open
title: Possible bug: pdb causes exception
type: crash
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



[issue46513] AC_C_CHAR_UNSIGNED from configure.ac confuses GCC 12+ by defining __CHAR_UNSIGNED__

2022-01-26 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 04772cd6f164c1219c8c74d55626ba114f01aa96 by Christian Heimes in 
branch '3.9':
[3.9] bpo-46513: Remove AC_C_CHAR_UNSIGNED / __CHAR_UNSIGNED__ (GH-30851) 
(GH-30915)
https://github.com/python/cpython/commit/04772cd6f164c1219c8c74d55626ba114f01aa96


--

___
Python tracker 

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



[issue46513] AC_C_CHAR_UNSIGNED from configure.ac confuses GCC 12+ by defining __CHAR_UNSIGNED__

2022-01-26 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 4371fbd4328781496f5f2c6938c4d9a84049b187 by Christian Heimes in 
branch '3.10':
[3.10] bpo-46513: Remove AC_C_CHAR_UNSIGNED / __CHAR_UNSIGNED__ (GH-30851) 
(GH-30914)
https://github.com/python/cpython/commit/4371fbd4328781496f5f2c6938c4d9a84049b187


--

___
Python tracker 

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



[issue46513] AC_C_CHAR_UNSIGNED from configure.ac confuses GCC 12+ by defining __CHAR_UNSIGNED__

2022-01-26 Thread Christian Heimes


Christian Heimes  added the comment:

The fix is in all stable branches. 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



[issue46520] `ast.unparse` produces syntactically illegal code for identifiers that look like reserved words

2022-01-26 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

Technically, this is a bug on the fact that it breaks the only guarantee of 
ast.unparse:

> Unparse an ast.AST object and generate a string with code that would produce 
> an equivalent ast.AST object if parsed back with ast.parse().

But I am not really sure if it should be handled at all, since we don't have 
access to the original form of the identifier in the AST due to the parser's 
normalization behavior.

If we want to only create a source that would give the same AST, abusing the 
fact that original keywords are always basic ASCII we could embed a map of 
characters that convert ASCII 'a', 'b', 'c', ... to their most similar unicode 
versions (https://util.unicode.org/UnicodeJsps/confusables.jsp). But I feel 
like this is a terrible idea, with no possible gain (very limited use case) and 
very prone to a lot of confusions. 

I think just adding a warning to the documentation regarding this should be the 
definite resolution, unless @pablogsal has any other idea.

--

___
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-01-26 Thread Kumar Aditya


Change by Kumar Aditya :


--
pull_requests: +29100
pull_request: https://github.com/python/cpython/pull/30921

___
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-01-26 Thread Nova


Change by Nova :


--
versions: +Python 3.11, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue46524] test_peg_generator takes 8 minutes on Windows

2022-01-26 Thread Kumar Aditya


Kumar Aditya  added the comment:

Would it be possible to skip these tests when no changes to the parser  related 
code are made to speed up tests?

--
nosy: +kumaraditya303

___
Python tracker 

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



[issue34680] asyncio event_loop fails when accessed from multiple threads

2022-01-26 Thread Irit Katriel


Irit Katriel  added the comment:

Perhaps this is just a doc issue - state explicitly that a loop should be used 
only in one thread, and mention that this is checked in debug mode.

--

___
Python tracker 

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



[issue45578] Missing tests for the dis module

2022-01-26 Thread Tal Einat


Tal Einat  added the comment:

Thanks for your work on this Nikita!

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



[issue43698] Use syntactically correct examples on abc package page

2022-01-26 Thread miss-islington


miss-islington  added the comment:


New changeset a57ec7a4feaf24f470a9d1e5b1b3f2cb1b062af7 by Miss Islington (bot) 
in branch '3.10':
bpo-43698: do not use `...` as argument name in docs (GH-30502)
https://github.com/python/cpython/commit/a57ec7a4feaf24f470a9d1e5b1b3f2cb1b062af7


--

___
Python tracker 

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



[issue43698] Use syntactically correct examples on abc package page

2022-01-26 Thread miss-islington


miss-islington  added the comment:


New changeset 49971b2d1890c15eeec2d83ea3e8d178f266c4f9 by Miss Islington (bot) 
in branch '3.9':
bpo-43698: do not use `...` as argument name in docs (GH-30502)
https://github.com/python/cpython/commit/49971b2d1890c15eeec2d83ea3e8d178f266c4f9


--

___
Python tracker 

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



[issue46536] Better for loop

2022-01-26 Thread The vivid & versatile channel


New submission from The vivid & versatile channel :

for i in range(number), question in questions:
...

instead of

 for i, question in zip(range(number), questions):
...

--
messages: 411748
nosy: vividnversatile1
priority: normal
severity: normal
status: open
title: Better for loop
type: enhancement

___
Python tracker 

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



[issue46536] Better for loop

2022-01-26 Thread Anonymous


Change by Anonymous :


--
nosy: +me -vividnversatile1
resolution:  -> not a bug

___
Python tracker 

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



[issue46505] Simplify exception handling code in py_compile

2022-01-26 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> wont fix
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



[issue46536] Better for loop

2022-01-26 Thread Eric V. Smith


Eric V. Smith  added the comment:

Thank you for the suggestion.

This is unlikely to gain acceptance. zip is usable in places outside of for 
loops, whereas your suggestion appears to be only useful in for loops. In 
addition, I don't see a way to specify the "strict" option using your syntax. 
Your syntax also doesn't seem to add any new functionality or expressiveness to 
python, which is one of the usual criteria for adding new syntax.

I'm going to close this, but if you'd like to pursue it, I suggest opening a 
discussion on the python-ideas mailing list.

--
nosy: +eric.smith
resolution: not a bug -> rejected
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



[issue46537] zipfile crash on windows, detected during pip install pyodbc-4.0.32-cp310-cp310-win_amd64.whl

2022-01-26 Thread Martin Forster


New submission from Martin Forster :

pyth10n 3.10.1, windows x64  install of yodbc-4.0.32-cp310-cp310-win_amd64.whl 
crashes.

 pos: 74196
 pos: 74226
 pos: -3
ERROR: Could not install packages due to an OSError.
Traceback (most recent call last):
  File 
"C:\git\idfunctiondb\venv\lib\site-packages\pip\_internal\commands\install.py", 
line 390, in run
installed = install_given_reqs(
  File 
"C:\git\idfunctiondb\venv\lib\site-packages\pip\_internal\req\__init__.py", 
line 73, in install_given_reqs
requirement.install(
  File 
"C:\git\idfunctiondb\venv\lib\site-packages\pip\_internal\req\req_install.py", 
line 758, in install
install_wheel(
  File 
"C:\git\idfunctiondb\venv\lib\site-packages\pip\_internal\operations\install\wheel.py",
 line 794, in install_wheel
_install_wheel(
  File 
"C:\git\idfunctiondb\venv\lib\site-packages\pip\_internal\operations\install\wheel.py",
 line 637, in _install_wheel
file.save()
  File 
"C:\git\idfunctiondb\venv\lib\site-packages\pip\_internal\operations\install\wheel.py",
 line 404, in save
with self._zip_file.open(zipinfo) as f:
  File "C:\Python310\lib\zipfile.py", line 1520, in open
fheader = zef_file.read(sizeFileHeader)
  File "C:\Python310\lib\zipfile.py", line 743, in read
self._file.seek(self._pos)
OSError: [Errno 22] Invalid argument

Please note i added the line 742 with the content: print(str(self) + ' pos: ' + 
str(self._pos) )

to help to find the root cause.
it Looks like that file.tell, returns a negative number, which kill file.seek.

--
components: Windows
messages: 411750
nosy: Martin-Forster, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: zipfile crash on windows, detected during pip install  
pyodbc-4.0.32-cp310-cp310-win_amd64.whl
type: crash
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



[issue46537] zipfile crash on windows, detected during pip install pyodbc-4.0.32-cp310-cp310-win_amd64.whl

2022-01-26 Thread Christian Heimes


Christian Heimes  added the comment:

https://pypi.org/project/pyodbc/4.0.32/#files has no wheels for Python 3.10. 
Where did you get the binary wheels from?

--
nosy: +christian.heimes
type: crash -> behavior

___
Python tracker 

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



[issue46513] AC_C_CHAR_UNSIGNED from configure.ac confuses GCC 12+ by defining __CHAR_UNSIGNED__

2022-01-26 Thread STINNER Victor


STINNER Victor  added the comment:

IMO making the assumption that "char" is signed or not in C code is bad. If 
Python has code like that, it must be signed to explicitly use one of these 
types: unsigned char or uint8_t, signed char or int8_t. Hopefully, Python can 
now use C99  since Python 3.6.

On my x86-64 Fedora 35 (GCC 11.2.1), the "char" type is signed. I built Python 
with -funsigned-char and I ran the test suite: the whole test suite pass! 
Commands:

---
make distclean
./configure --with-pydebug CFLAGS="-O0 -funsigned-char" --with-system-expat 
--with-system-ffi
make
./python -m test -j0 -r
---

Using ./configure CFLAGS, -funsigned-char is also used to build C extensions. 
Example: 

   gcc (...) -O0 -funsigned-char (...) Modules/_elementtree.c (...)


For completeness, I also built Python with -fsigned-char. Again, the full test 
suite passed ;-)

---
make distclean
./configure --with-pydebug CFLAGS="-O0 -fsigned-char" --with-system-expat 
--with-system-ffi
make
./python -m test -r -j0
---

--

___
Python tracker 

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



[issue46513] AC_C_CHAR_UNSIGNED from configure.ac confuses GCC 12+ by defining __CHAR_UNSIGNED__

2022-01-26 Thread STINNER Victor


STINNER Victor  added the comment:

In short, I did my checks on my side, and the merged change now LGTM. Thanks 
Christian for fixing it ;-)

--

___
Python tracker 

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



[issue45382] platform() is not able to detect windows 11

2022-01-26 Thread STINNER Victor


Change by STINNER Victor :


--
nosy:  -vstinner

___
Python tracker 

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



[issue46537] zipfile crash on windows, detected during pip install pyodbc-4.0.32-cp310-cp310-win_amd64.whl

2022-01-26 Thread Martin Forster


Martin Forster  added the comment:

it tried one built on my own, 
and the one from https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyodbc

--

___
Python tracker 

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



[issue46537] zipfile crash on windows, detected during pip install pyodbc-4.0.32-cp310-cp310-win_amd64.whl

2022-01-26 Thread Martin Forster


Martin Forster  added the comment:

i opened a issue at pyodbc as well, 
https://github.com/mkleehammer/pyodbc/issues/1015

--

___
Python tracker 

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



[issue46524] test_peg_generator takes 8 minutes on Windows

2022-01-26 Thread STINNER Victor


STINNER Victor  added the comment:

> Would it be possible to skip these tests when no changes to the parser  
> related code are made to speed up tests?

Maybe, some CIs could export an environment variable which contains the list of 
modified files, and then each file would be able to decide if it should be 
skipped or not. The risk is skipping a test because the change looks 
"unrelated", whereas it causes the test to fail.

Currently, we only skip tests if no code is changed: if only the documentation 
is modified.

--

___
Python tracker 

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



[issue46529] Improve test coverage of `Union` and `Optional` repr()

2022-01-26 Thread Ken Jin


Change by Ken Jin :


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



[issue46516] Use existing unbound_local_error label in DELETE_FAST opcode

2022-01-26 Thread Ken Jin


Ken Jin  added the comment:

Not sure why the merge message didn't appear here, but thanks!

--
resolution:  -> fixed
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



[issue46533] Specialize for staticmethods and classmethods

2022-01-26 Thread Ken Jin


Ken Jin  added the comment:

Ah woops, my bad, I mixed up the two concepts. Thanks for the thorough 
explanation here!

--

___
Python tracker 

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



[issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache

2022-01-26 Thread Petr Viktorin


Change by Petr Viktorin :


--
pull_requests: +29101
pull_request: https://github.com/python/cpython/pull/30922

___
Python tracker 

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



[issue45703] importlib.invalidate_caches() does not invalidate _NamespacePath's _last_parent_path-based cache

2022-01-26 Thread Petr Viktorin


Petr Viktorin  added the comment:

Embarassingly, it seems it bust needs regen-importlib, at least for 3.10

--

___
Python tracker 

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



[issue46527] enumerate no longer accepts iterable keyword argument

2022-01-26 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset ac0c6e128cb6553585af096c851c488b53a6c952 by Jelle Zijlstra in 
branch 'main':
bpo-46527: allow calling enumerate(iterable=...) again (GH-30904)
https://github.com/python/cpython/commit/ac0c6e128cb6553585af096c851c488b53a6c952


--

___
Python tracker 

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



[issue46527] enumerate no longer accepts iterable keyword argument

2022-01-26 Thread Dong-hee Na


Dong-hee Na  added the comment:

So since no more regression is expected, I would like to propose merging the PR 
and once we need to change the implementation, we can revert Vectorcall 
anytime, Rollbacking Vectorcall will not raise any behavior regression so 
anytime we can rollback it.

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



[issue45382] platform() is not able to detect windows 11

2022-01-26 Thread Eryk Sun

Eryk Sun  added the comment:

> AFAIK, the Win32_OperatingSystem caption is always ASCII. 

I think I was wrong here. The "Caption" field is localized, so the wmic.exe OEM 
encoded output to a pipe isn't reliable. The system OEM code page doesn't 
necessarily match the display/preferred language of the current user. It could 
be a lossy encoding with default and best-fit translations (e.g. "?"; "α" -> 
"a"). If using wmic.exe, it's better to redirect the output to a temp file, 
which will be UTF-16.

--

___
Python tracker 

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



[issue45382] platform() is not able to detect windows 11

2022-01-26 Thread Steve Dower


Steve Dower  added the comment:

sys.getwindowsversion() is affected to Microsoft's minimal rebuilds of 
OS components causing core DLLs to have older versions than the release, 
and also to compatibility modes that may report earlier versions if API 
behaviour is being emulated.

The best way for us to use WMI is to call it directly. There are native 
APIs to access it and retrieve the data directly. It's just nobody has 
written it yet.

Calling out to Powershell needs to account for cases where Powershell is 
not present, is disabled/blocked/limited, or is a different version. We 
can rely on the native APIs (at least, if they fail, there's nothing 
better we could possibly have done).

WMI is essentially the Windows equivalent of the platform module, so 
there's no reason all the APIs in platform.py shouldn't use it, and 
every reason that sys/os *shouldn't* use it.

--

___
Python tracker 

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



[issue45382] platform() is not able to detect windows 11

2022-01-26 Thread Steve Dower


Steve Dower  added the comment:

>> AFAIK, the Win32_OperatingSystem caption is always ASCII.
> 
> I think I was wrong here. The "Caption" field is localized, so the wmic.exe 
> OEM encoded output to a pipe isn't reliable.

Correct. And while "Windows" itself is never translated, the caption may 
include terms that are translated (e.g., IIRC, the extra names for 
point-of-sales versions).

--

___
Python tracker 

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



[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2022-01-26 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +29102
pull_request: https://github.com/python/cpython/pull/30923

___
Python tracker 

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



[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor


New submission from STINNER Victor :

While working on the PEP 674 implementation, I noticed that PyDescr_NAME() and 
PyDescr_TYPE() macros are used as l-value by two projects: M2Crypto and 
mecab-python3. Both are code generated by SWIG.

M2Crypto-0.38.0/src/SWIG/_m2crypto_wrap.c and 
mecab-python3-1.0.4/src/MeCab/MeCab_wrap.cpp contain the function:

SWIGINTERN PyGetSetDescrObject *
SwigPyStaticVar_new_getset(PyTypeObject *type, PyGetSetDef *getset) {

  PyGetSetDescrObject *descr;
  descr = (PyGetSetDescrObject *)PyType_GenericAlloc(SwigPyStaticVar_Type(), 0);
  assert(descr);
  Py_XINCREF(type);
  PyDescr_TYPE(descr) = type;
  PyDescr_NAME(descr) = PyString_InternFromString(getset->name);
  descr->d_getset = getset;
  if (PyDescr_NAME(descr) == NULL) {
Py_DECREF(descr);
descr = NULL;
  }
  return descr;
}

ref: https://bugs.python.org/issue45476#msg407410


SwigPyStaticVar_new_getset() is more of less an outdated copy of Python 2.7 
descr_copy() of Python Objects/descrobject.c.


I tried to prevent using the PyDescr_NAME() and PyDescr_TYPE() macros as 
l-value in two ways:

* Add PyDescr_SET_NAME() and PyDescr_SET_Type()
* Add PyDescr_New()

The problem of the PyDescr_SET_NAME() and PyDescr_SET_Type() approach is that 
SWIG code is outdated: it doesn't initialized the PyDescrObject.d_qualname 
member added to Python 3.3 (bpo-13577, commit 
9d57481f043cb9b94bfc45c1ee041415d915cf8a).

So I implemented PyDescr_New() function: in CPython, it means basically to 
rename descr_new() to PyDescr_New(). Problem: implementating this function for 
older Python versions is non trivial. Code that I wrote for the 
pythoncapi_compat project:

// bpo-45476 added PyDescr_New() to Python 3.11.0a5
#if PY_VERSION_HEX < 0x030B00A5
PyDescrObject *
PyDescr_New(PyTypeObject *descr_type, PyTypeObject *type, const char *name)
{
assert(descr_type != NULL);
assert(type != NULL);
assert(name != NULL);

PyObject *name_obj;
#if PY_MAJOR_VERSION >= 3
name_obj = PyUnicode_InternFromString(name);
#else
name_obj = PyString_InternFromString(name);
#endif
if (name_obj == NULL) {
return NULL;
}

PyDescrObject *descr = (PyDescrObject *)PyType_GenericAlloc(descr_type, 0);
if (descr == NULL) {
Py_DECREF(name_obj);
return NULL;
}


descr->d_type = (PyTypeObject*)Py_NewRef(type);
descr->d_name = name_obj;
// PyDescrObject.d_qualname was added to Python 3.3.0a1
#if PY_VERSION_HEX >= 0x030300A1
descr->d_qualname = NULL;
#endif
return descr;
}
#endif


The even more complicated part is to write unit tests for this function in 
pythoncapi_compat. It requires to implement a whole type with tp_traverse 
tp_dealloc functions.

In Python, this function must be at least documented.

At the end, IMO it's not really worth it to add so much complexity to Python 
and pythoncapi_compat just for 2 projects using SWIG. I created this issue to 
keep a track of my analysis, if someone else tries to do something similar 
tomorrow.


I attached my WIP patches to keep a copy of this work, in case if we need to 
revisit this idea later.

For the PEP 674, IMO it's better to leave the two PyDescr_NAME() and 
PyDescr_TYPE() macros unchanged. There is no need in the short term to make 
PyDescrObject structure and structures using it opaque in the short term. Well, 
SWIG code looks incorrect (it doesn't initialize d_qualname), but a fix just 
for SWIG should be enough.

--
components: C API
messages: 411765
nosy: vstinner
priority: normal
severity: normal
status: open
title: [C API] Make the PyDescrObject structure opaque
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



[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor


STINNER Victor  added the comment:

pydescr_set_type.patch: Python patch to add PyDescr_SET_TYPE() and 
PyDescr_SET_NAME() functions.

--
keywords: +patch
Added file: https://bugs.python.org/file50585/pydescr_set_type.patch

___
Python tracker 

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



[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor


STINNER Victor  added the comment:

pydescr_new.patch: Python patch adding the PyDescr_New() function.

--
Added file: https://bugs.python.org/file50586/pydescr_new.patch

___
Python tracker 

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



[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor


STINNER Victor  added the comment:

pythoncapi_compat_pydescr_new.patch: pythoncapi_compat patch adding 
PyDescr_New() function with tests.

--
Added file: 
https://bugs.python.org/file50587/pythoncapi_compat_pydescr_new.patch

___
Python tracker 

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



[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor


STINNER Victor  added the comment:

swig_pydescr_new.patch: SWIG patch adding PyDescr_New() and using it.

--
Added file: https://bugs.python.org/file50588/swig_pydescr_new.patch

___
Python tracker 

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



[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor


Change by STINNER Victor :


Removed file: https://bugs.python.org/file50588/swig_pydescr_new.patch

___
Python tracker 

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



[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor


Change by STINNER Victor :


Added file: https://bugs.python.org/file50589/swig_pydescr_new.patch

___
Python tracker 

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



[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor


STINNER Victor  added the comment:

Since making PyDescrObject opaque is not really worth it, I close this issue.

I mean, it's worth it, but there are more important structures like PyObject, 
PyTypeObject or PyListObject.

--
resolution:  -> rejected
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



[issue43853] [sqlite3] Improve sqlite3_value_text() error handling

2022-01-26 Thread Guido van Rossum


Guido van Rossum  added the comment:


New changeset 3eb3b4f270757f66c7fb6dcf5afa416ee1582a4b by Erlend Egeberg 
Aasland in branch 'main':
bpo-43853: Expand test suite for SQLite UDF's (GH-27642)
https://github.com/python/cpython/commit/3eb3b4f270757f66c7fb6dcf5afa416ee1582a4b


--
nosy: +gvanrossum

___
Python tracker 

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



[issue35134] Add a new Include/cpython/ subdirectory for the "CPython API" with implementation details

2022-01-26 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset d4a85f104bf9d2e368f25c9a567eaaa2cc39a96a by Victor Stinner in 
branch 'main':
bpo-35134: Add Include/cpython/descrobject.h (GH-30923)
https://github.com/python/cpython/commit/d4a85f104bf9d2e368f25c9a567eaaa2cc39a96a


--

___
Python tracker 

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



[issue46538] [C API] Make the PyDescrObject structure opaque

2022-01-26 Thread STINNER Victor


STINNER Victor  added the comment:

> The problem of the PyDescr_SET_NAME() and PyDescr_SET_Type() approach is that 
> SWIG code is outdated: it doesn't initialized the PyDescrObject.d_qualname 
> member added to Python 3.3 (bpo-13577, commit 
> 9d57481f043cb9b94bfc45c1ee041415d915cf8a).

I checked: Oh, in practice, it's not an issue since PyType_GenericAlloc() 
initializes the memory to zero. So the code "just works".

--

___
Python tracker 

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



[issue46538] [C API] Make the PyDescrObject structure opaque: PyDescr_NAME() and PyDescr_TYPE()

2022-01-26 Thread STINNER Victor


Change by STINNER Victor :


--
title: [C API] Make the PyDescrObject structure opaque -> [C API] Make the 
PyDescrObject structure opaque: PyDescr_NAME() and PyDescr_TYPE()

___
Python tracker 

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



[issue45476] [C API] PEP 674: Disallow using macros as l-value

2022-01-26 Thread STINNER Victor


STINNER Victor  added the comment:

> In the PyPI top 5000, I found two projects using PyDescr_TYPE() and 
> PyDescr_NAME() as l-value: M2Crypto and mecab-python3. In both cases, it was 
> code generated by SWIG

I created bpo-46538 "[C API] Make the PyDescrObject structure opaque" to handle 
PyDescr_NAME() and PyDescr_TYPE() macros. But IMO it's not really worth it to 
make the PyDescrObject structure opaque. It's just too much work, whereas 
PyDescrObject is not performance sensitive. It's ok to continue exposing this 
structure in public for now.

I will exclude PyDescr_NAME() and PyDescr_TYPE() from the PEP 674.

--

___
Python tracker 

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



[issue46537] zipfile crash on windows, detected during pip install pyodbc-4.0.32-cp310-cp310-win_amd64.whl

2022-01-26 Thread Martin Forster


Martin Forster  added the comment:

The wheel file was corrupt, due to git taking care of "CRLF/LF" conversion.
Sorry for the fuss

--
resolution:  -> not a bug
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



[issue46454] '0 -> /dev/null' is lost

2022-01-26 Thread Eryk Sun

Eryk Sun  added the comment:

> stdin is closed
> os.open() is called and creates a new fd=0
> a call to os.dup2(fd, 0) is made but is a noop

The dup2() silent noop case is a problem, but not the problem that's reported 
in msg43. 

The two examples for this issue are fd.py and fd2.py. In fd.py, "/dev/null" is 
opened, and then, if the fd isn't 0, the fd is duped to inheritable fd 0. In 
fd2.py, fd 0 is closed, and then "/dev/null" is opened as fd 0, which isn't 
inheritable in Python 3.

I think the only problems regarding fd2.py are cross-platform inconsistency 
and/or documentation. If a similar example is tested in Windows it actually 
works, assuming os.devnull is used and that "sleep.exe" is available (e.g. from 
MSYS2). The child's stdin will be the same file as the parent's stdin.

In regard to the standard files, the subprocess documentation states the 
following:

 With the default settings of None, no redirection will occur; 
 the child’s file handles will be inherited from the parent.

 If close_fds is true, all file descriptors except 0, 1 and 2 
 will be closed before the child process is executed.

The above applies only to POSIX. It's not wrong in that case, but it should be 
emphasized that any of the standard file descriptors that's not overridden has 
to be inheritable in POSIX. Also, if overriding to a specific file, the file 
descriptor must be inheritable in POSIX. By default, file descriptors for 
opened files are not inheritable, so the subprocess documentation should 
reference os.set_inheritable(). 

For Windows it says the following:

 if close_fds is true then no handles will be inherited by
 the child process unless explicitly passed in the handle_list
 element of STARTUPINFO.lpAttributeList, or by standard handle 
 redirection.

That's mostly right, except the last part about standard handle redirection is 
vague. If close_fds is true, none of the standard handles of the current 
process is ever inherited in Windows. They could be in principle, but 
subprocess wasn't designed that way. When close_fds is true, and the standard 
handles aren't overridden, subprocess relies on the OS to duplicate (not 
inherit) the standard handles to the child when spawning a console application 
(e.g. "python.exe", but not "pythonw.exe"). If at least one is overridden, 
subprocess duplicates all three as inheritable handles via _make_inheritable(). 
(This is a choice. It doesn't have to do this. It could simply ensure that its 
own pipe/null files are inheritable.) Thus, when close_fds is true it never 
matters whether the current standard handles are inheritable, or whether a 
specified override is inheritable. This behavior is in stark contrast to how 
subprocess works in POSIX.

--

___
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-01-26 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Technically it should not provide the method according to the current design.
get_write_buffer_limits() is not a part of public transports API, this method 
is defined by private class _FlowControlMixin only.

WriteTransport requires only get_write_buffer_size() and 
set_write_buffer_limits() *setter* but not get_write_buffer_limits() getter.

I agree, looks weird.
The best solution maybe is adding get_write_buffer_limits() to WriteTransport 
definition and documenting the change.

Would you prepare a pull request? I'm happy to review/merge it.

--

___
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-01-26 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Forgot to write, after making the method public we can implement it in SSL 
transport easily.

--

___
Python tracker 

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



[issue34680] asyncio event_loop fails when accessed from multiple threads

2022-01-26 Thread epiphyte


epiphyte  added the comment:

For additional context, this was encountered when porting an application from 
threading to asyncio, and at the time we were still running the ioloop in its 
own thread as opposed to the mainthread. We no longer do that :D

Updating the documentation to clarify that the loop won't work across threads, 
like what we ran into at the time, would resolve this.

--

___
Python tracker 

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



[issue46520] `ast.unparse` produces syntactically illegal code for identifiers that look like reserved words

2022-01-26 Thread Kodiologist

Kodiologist  added the comment:

I've done very little work on CPython, but I do a lot of AST construction and 
call `ast.unparse` a lot in my work on Hylang, and I think this is a wart worth 
fixing. The real mistake was letting the user say `𝕕𝕖𝕗 = 1`, but that's been 
legal Python syntax for a long time, so I doubt a change to that would be 
welcome, especially one affecting old stable versions of Python like 3.9. 
Python has made its bed and now it must lie in it.

I think that with a pretty small amount of code (using code-point arithmetic 
instead of a dictionary with every ASCII letter), I can add Unicode "escaping" 
of reserved words to the part of `ast.unparse` that renders variable names. 
Would a patch of this kind be welcome?

--

___
Python tracker 

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



[issue46520] `ast.unparse` produces syntactically illegal code for identifiers that look like reserved words

2022-01-26 Thread Kodiologist


Kodiologist  added the comment:

And yes, while this behavior will look strange, the only code that will parse 
to AST nodes that require it will be code that uses exactly the same trick.

--

___
Python tracker 

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



[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2022-01-26 Thread STINNER Victor


STINNER Victor  added the comment:

> Should the immutable flag also be applied to the heap types converted in and 
> before Python 3.9 before closing this issue?

I don't think that Python 3.9 should be changed. It's too late. IMO this issue 
is not important enough to introduce a new type flag in a minor Python 3.9.x 
bugfix release. I suggest to close this issue.

--

___
Python tracker 

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



[issue34680] asyncio event_loop fails when accessed from multiple threads

2022-01-26 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Please feel free to propose pull request for documentation tuning.

--

___
Python tracker 

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



[issue43908] array.array should remain immutable: add Py_TPFLAGS_IMMUTABLETYPE flag

2022-01-26 Thread STINNER Victor


STINNER Victor  added the comment:

In Python 3.11, 68 heap types have the Py_TPFLAGS_IMMUTABLETYPE flag:

* _blake2.blake2b
* _blake2.blake2s
* _bz2.BZ2Compressor
* _bz2.BZ2Decompressor
* _csv.Dialect
* _csv.reader
* _csv.writer
* _dbm.dbm
* _gdbm.gdbm
* _hashlib.HASH
* _hashlib.HASHXOF
* _hashlib.HMAC
* _lsprof.Profiler
* _lzma.LZMACompressor
* _lzma.LZMADecompressor
* _md5.md5
* _multibytecodec.MultibyteCodec
* _multibytecodec.MultibyteIncrementalDecoder
* _multibytecodec.MultibyteIncrementalEncoder
* _multibytecodec.MultibyteStreamReader
* _multibytecodec.MultibyteStreamWriter
* _overlapped.Overlapped
* _queue.SimpleQueue
* _sha1.sha1
* _sha256.sha224
* _sha256.sha256
* _sha3.keccak_224
* _sha3.keccak_256
* _sha3.keccak_384
* _sha3.keccak_512
* _sha3.sha3_224
* _sha3.sha3_256
* _sha3.sha3_384
* _sha3.sha3_512
* _sha512.sha384
* _sha512.sha512
* _sre.SRE_Scanner
* _ssl.Certificate
* _ssl.MemoryBIO
* _ssl.SSLSession
* _ssl._SSLContext
* _ssl._SSLSocket
* ssl.SSLError
* _thread.RLock
* _thread._local
* _thread._localdummy
* _thread.lock
* _tokenize.TokenizerIter
* _winapi.Overlapped
* array.array
* array.arrayiterator
* functools.KeyWrapper
* functools._lru_cache_wrapper
* functools._lru_list_elem
* functools.partial
* mmap.mmap
* operator.attrgetter
* operator.itemgetter
* operator.methodcaller
* pyexpat.xmlparser
* re.Match
* re.Pattern
* sqlite3.Connection
* sqlite3.Cursor
* sqlite3.PrepareProtocol
* sqlite3.Row
* sqlite3.Statement
* unicodedata.UCD

--

___
Python tracker 

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



[issue46465] Regression caused by CALL_FUNCTION specialization for C function calls

2022-01-26 Thread Brandt Bucher


Change by Brandt Bucher :


--
nosy: +brandtbucher

___
Python tracker 

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



[issue42926] Split compiler into code-gen, optimizer and assembler.

2022-01-26 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

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



[issue43916] Mark static types newly converted to heap types as immutable: add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag

2022-01-26 Thread STINNER Victor


STINNER Victor  added the comment:

In Python 3.11, 41 types are declared explicitly with the
Py_TPFLAGS_DISALLOW_INSTANTIATION flag:

* _curses_panel.panel
* _dbm.dbm
* _gdbm.gdbm
* _hashlib.HASH
* _hashlib.HASHXOF
* _hashlib.HMAC
* _md5.md5
* _multibytecodec.MultibyteCodec
* _sha1.sha1
* _sha256.sha224
* _sha256.sha256
* _sha512.sha384
* _sha512.sha512
* _sre.SRE_Scanner
* _ssl.Certificate
* _thread._localdummy
* _thread.lock
* _tkinter.Tcl_Obj
* _tkinter.tkapp
* _tkinter.tktimertoken
* _winapi.Overlapped
* _xxsubinterpreters.ChannelID
* array.arrayiterator
* curses.ncurses_version
* functools.KeyWrapper
* functools._lru_list_elem
* os.DirEntry
* os.ScandirIterator
* pyexpat.xmlparser
* re.Match
* re.Pattern
* select.devpoll
* select.poll
* sqlite3.Statement
* stderrprinter
* sys.flags
* sys.getwindowsversion
* sys.version_info
* unicodedata.UCD
* zlib.Compress
* zlib.Decompress

--

___
Python tracker 

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



[issue43916] Mark static types newly converted to heap types as immutable: add Py_TPFLAGS_DISALLOW_INSTANTIATION type flag

2022-01-26 Thread STINNER Victor


STINNER Victor  added the comment:

Can we close this issue? Or is there a remaining task?

--

___
Python tracker 

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



  1   2   >