[issue46864] Deprecate ob_shash in BytesObject

2022-03-21 Thread Inada Naoki


Inada Naoki  added the comment:

I'm sorry. Maybe, ccache hides the warning from me.

--

___
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 Inada Naoki


Change by Inada Naoki :


--
pull_requests: +30132
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/32042

___
Python tracker 

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



[issue25489] sys.exit() caught in async event loop exception handler

2022-03-21 Thread Guido van Rossum


Guido van Rossum  added the comment:

Andrew, thanks for explaining this.

The key thing I was missing was that the root cause of the problem is that 
Future.__del__ is trying to log an error about the un-awaited task by calling 
the exception handler directly. That actually feels a little dodgy.

This is why I'm not yet comfortable with (d). Looking at 
call_exception_handler(), whether it calls the default handler or a custom 
handler, it explicitly checks for SystemExit and KeyboardInterrupt and 
re-raises those. And only those -- everything ends up logging an error.

Which makes me wonder. Maybe that error in Future.__del__ should not call any 
exception handler at all, but just call logger.error()? Or maybe Future.__del__ 
should catch exceptions coming out of there and log an error? Maybe a modified 
version of (d), but only implemented in Future.__del__, not in 
call_exception_handler()?

--

___
Python tracker 

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



[issue40172] ZipInfo corrupts file names in some old zip archives

2022-03-21 Thread Daniel Hillier


Daniel Hillier  added the comment:

Related to issue https://bugs.python.org/issue28080 which has a patch that 
covers a bit of this issue

--

___
Python tracker 

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



[issue46614] Add option to output UTC datetimes as "Z" in `.isoformat()`

2022-03-21 Thread Matt Wozniski


Change by Matt Wozniski :


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

___
Python tracker 

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



[issue47030] singledispatch does not work with positional arguments with default values.

2022-03-21 Thread Andrei Kulakov


Andrei Kulakov  added the comment:

This would be problematic for two reasons:

 - possible confusion between the default function that runs when an argument 
doesn't match any registered types, and another "default" which runs when 
argument is omitted.

 - to see which function will run when argument is omitted, you would need to 
check in two places - the default value of arg and then find the registered 
function that matches it. If we end up deciding there is a need to run a 
default handler when an argument is omitted, it would be more explicit and 
convenient and visually obvious to decorate the "default if no arg" handler in 
some way, which also means there'd be a single place where this behavior is 
defined.

We can also consider adding a note to documentation that the first argument 
used for dispatch should not have a default value, to make it more explicit 
that dispatching on default value is not supported.

--
nosy: +andrei.avk

___
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 David Foster


Change by David Foster :


--
nosy: +David Foster

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

It's a Linux kernel 5.17 regression on static-pie programs affecting AArch64:
https://bugzilla.kernel.org/show_bug.cgi?id=215720

--

___
Python tracker 

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



[issue25489] sys.exit() caught in async event loop exception handler

2022-03-21 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Guido, perhaps you had problems with the problem detection because the asyncio 
uses _asyncio C Extesions by default. It drops some calls from the python stack 
trace.

--

___
Python tracker 

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



[issue25489] sys.exit() caught in async event loop exception handler

2022-03-21 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

I can describe what happens with test_sys_exit_in_exception_handler.py 

1. The 'boom' task raises an exception.
2. The task is not awaited, Future.__del__ calls the exception handler with 
'Task exception was never retrieved' message.
3. The custom handler raises SystemExit.
4. SystemExit bubbles up and swallowed by __del__, the __del__ method cannot 
re-raise.

The question is: what is the behavior expected?
a) Now an exception raised by a custom exception handler is swallowed in this 
particular case (but is propagated if `loop.call_exception_handler()` is called 
from a function other than __del__).
b) Yuri suggested re-schedule an exception generated by 
`loop.call_exception_handler` by `loop.call_soon()`.  asyncio.Handle catches it 
and... calls `call_exception_handler()` with 'Exception in callback ...' 
message.  At the end, we have an endless recursion.
c) asyncio loop can call `loop.stop()` if an exception is raised by 
`loop.call_exception_handler()` from __del__.  I think this behavior is 
terrible: a subtle error can terminate asyncio program.
d) Assume that a custom exception handler should not raise an exception. Catch 
all exceptions in `call_exception_handler`, call sys.unraisablehook(), and 
suppress the exception.

I believe that d) is the best thing that we can do here.

I can prepare a fix if we agree on the solution.

--

___
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


Steve Dower  added the comment:

Leaving this open and assigned to myself for a couple of days to deal with any 
other fallout. In particular, I wasn't able to test the (minor) changes to the 
publishing steps (e.g. GPG signing), so will have to wait for the next release 
to see what works/doesn't there.

--
assignee:  -> steve.dower
stage: patch review -> commit review

___
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


Steve Dower  added the comment:


New changeset 3751b6b030b4a3b88959b4f3c4ef2e58d325e497 by Steve Dower in branch 
'main':
bpo-47086: Remove .chm from Windows installer and add HTML docs (GH-32038)
https://github.com/python/cpython/commit/3751b6b030b4a3b88959b4f3c4ef2e58d325e497


--

___
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 Guido van Rossum


Guido van Rossum  added the comment:

I'd like to look at this as a case of simplifying something to its simplest 
canonical form, but no simpler. This is what the existing fixed-typevar 
expansion does: e.g. tuple[str, T, T][int] becomes tuple[str, int, int].

I propose that we try to agree on a set of rules for what can be simplified 
further and what cannot, when we have B = C[...]; A = B[...], (IOW A = 
C[...][...]), for various shapes of the subscripts to C and B. Note that what's 
relevant for the second subscript is C[...].__parameters__, so I'll call that 
"left" below.

1. Some edge case seems to be that if *tuple[...] is involved on either side we 
will never simplify. Or perhaps a better rule is that *tuple[...] is never 
simplified away (but fixed items before and after it may be).

2. Another edge case is that if neither side has any starred items we will 
always simplify (since this is the existing behavior in 3.10). This may raise 
an error if the number of subscripts on the right does not match the number of 
parameters on the left.

3. If there's a single *Ts on the left but not on the right, we should be able 
to simplify, which again may raise an error if there are not enough values on 
the right, but if there are more than enough, the excess will be consumed by 
*Ts (in fact that's the only way *Ts is fed).

4. If there's a *Ts on the right but not on the left, we should _not_ simplify, 
since whatever we have on the left serves as a constraint for *Ts. (E.g. 
tuple[int, int][*Ts] constrains *Ts to being (int, int).)

5. If there's exactly one *Ts on the left and one on the right, we _might__ be 
able to simplify if the prefix and suffix of the __parameters__ match the 
prefix and suffix of the subscript on the right. E.g. C[int, T, *Ts, 
float][str, *Ts] can be simplified to C[int, str, *Ts, float]. OTOH C[int, T, 
*Ts, float][*Ts] cannot be simplified -- but we cannot flag it as an error 
either. Note that __parameters__ in this example is (T, Ts); we have to assume 
that typevartuples in __parameters__ are always used as *Ts (since the PEP 
recognizes no valid unstarred uses of Ts).

TBH case 5 is the most complex and I may have overlooked something. I'm more 
sure of cases 1-4.

--

___
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 Brett Cannon


Brett Cannon  added the comment:

One thing I forgot to mention is that I will be updating What's New as the code 
deprecations land.

--

___
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 c3538355f49f9394140428a848f2acf08175ff1a by Miss Islington (bot) 
in branch '3.10':
[3.10] bpo-47061: document module deprecations due to PEP 594 (GH-31984) 
(GH-32039)
https://github.com/python/cpython/commit/c3538355f49f9394140428a848f2acf08175ff1a


--

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

Jeremy - backports need to be done manually. Can I leave that with you and just 
ping me on here when you're ready for a merge?

--
stage:  -> backport needed

___
Python tracker 

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



[issue44336] Windows buildbots hang after fatal exit

2022-03-21 Thread Steve Dower


Steve Dower  added the comment:


New changeset 19058b9f6271338bcc46b7d30fe79a83990cc35c by Jeremy Kloth in 
branch 'main':
bpo-44336: Prevent tests hanging on child process handles on Windows (GH-26578)
https://github.com/python/cpython/commit/19058b9f6271338bcc46b7d30fe79a83990cc35c


--

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

> The problem is more that a sleep is not a reliable synchronization primitive

Yes, sure! I'm trying to avoid 'sleep for synchronization' when I'm writing new 
tests or fixing existing ones.

The problem with this particular queue tests is: I rewrote old-styled tests 
that used a loop time shift generator with IsolatedAsyncioTestCase keeping the 
minimal invasive changes.  It doesn't work well, now tiny shifts are removed; 
only 'await sleep(0)' are left when a bare context switch is needed without a 
delay.

--

___
Python tracker 

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



[issue22013] Add at least minimal support for thread groups

2022-03-21 Thread Irit Katriel


Irit Katriel  added the comment:

And now we have TaskGroups in asyncio as well.

I'm closing this as it seems to have been abandoned. Feel free to reopen if 
this is still needed.

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



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

2022-03-21 Thread Andrew Svetlov


Change by Andrew Svetlov :


--
pull_requests: +30130
pull_request: https://github.com/python/cpython/pull/32040

___
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 Eryk Sun


Eryk Sun  added the comment:

I was just wondering whether it's worth implementing it using the API. To be 
clear, I wasn't implying to hold off on applying Jeremy's PR. The existing code 
is causing him problems, and he has a working solution.

--
nosy: +eryksun

___
Python tracker 

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



[issue47010] Implement zero copy writes in SelectorSocketTransport in asyncio

2022-03-21 Thread jakirkham


Change by jakirkham :


--
nosy: +jakirkham

___
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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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


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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



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

___
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



[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



[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



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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



[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



  1   2   >