[issue34875] Change .js mime to "text/javascript"

2022-01-21 Thread jiahua wang


Change by jiahua wang :


--
nosy: +wangjiahua
nosy_count: 3.0 -> 4.0
pull_requests: +28927
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/30740

___
Python tracker 

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



[issue21987] TarFile.getmember on directory requires trailing slash iff over 100 chars

2022-01-21 Thread miss-islington


miss-islington  added the comment:


New changeset 1d11fdd3eeff77ba600278433b7ab0ce4d2a7f3b by Miss Islington (bot) 
in branch '3.10':
bpo-21987: Fix TarFile.getmember getting a dir with a trailing slash (GH-30283)
https://github.com/python/cpython/commit/1d11fdd3eeff77ba600278433b7ab0ce4d2a7f3b


--

___
Python tracker 

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



[issue45452] Support crash tolerance feature for gdbm module

2022-01-21 Thread Dong-hee Na


Dong-hee Na  added the comment:

After discussion with Victor by using DM, I decided to provide high-level API 
instead of low-level APIs.

- gdbm.open(filename, snapshots=(foo, bar)) 

will do everything at once.

Regards,
Dong-hee

--

___
Python tracker 

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



[issue45452] Support crash tolerance feature for gdbm module

2022-01-21 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +vstinner

___
Python tracker 

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



[issue46449] Deep-freezed modules create inconsistency in sys.gettotalrefcount() (_Py_Reftotal)

2022-01-21 Thread STINNER Victor


STINNER Victor  added the comment:

> Hm, the deep-frozen objects are statically initialized with a very large 
> refcount that isn't accounted for (they are intended to be immortal). It 
> seems that Py_Finalize() somehow decrefs those objects. I guess this means we 
> need some kind of flag indicating certain objects are immortal (Eric has 
> proposed several schemes), then we could just mark these objects as immortal.

The problem is only _Py_RefTotal. Maybe frozen_only_do_patchups() should 
increment _Py_RefTotal when Python it build with Py_DEBUG macro defined, so it 
can be safely decremented in Py_Finalize()?

Adding a flag in PyObject/PyTypeObject and modifying Py_DECREF() sounds more 
controversial. I suggest to do that later ;-) (I am not convinced that it's the 
best approach.) I would suggest to write a PEP for immortal objects.

--

___
Python tracker 

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



[issue46449] Deep-freezed modules create inconsistency in sys.gettotalrefcount() (_Py_Reftotal)

2022-01-21 Thread STINNER Victor


STINNER Victor  added the comment:

> This reminds me, since https://github.com/python/cpython/pull/30715 (which I 
> merged yesterday) the deep-frozen objects also reference the small ints 
> directly, as well as the singleton for b"". Is this even safe across 
> Py_Finalize()/Py_Initialize()? If not, we'll need to roll that back as well.

I don't know.

--

___
Python tracker 

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



[issue46080] argparse.BooleanOptionalAction with default=argparse.SUPPRESS and help specified raises exception

2022-01-21 Thread Tal Einat


Tal Einat  added the comment:

Thanks for the report and the PR, Felix!

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



[issue46448] TypedDict inspect.signature error

2022-01-21 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This could be due to issue40187

--
nosy: +serhiy.storchaka, xtreak

___
Python tracker 

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



[issue41857] Document timeout arguments to poll() in select module

2022-01-21 Thread Tal Einat


Change by Tal Einat :


--
pull_requests: +28928
pull_request: https://github.com/python/cpython/pull/30741

___
Python tracker 

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



[issue41857] Document timeout arguments to poll() in select module

2022-01-21 Thread Tal Einat


Change by Tal Einat :


--
pull_requests: +28929
pull_request: https://github.com/python/cpython/pull/30742

___
Python tracker 

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



[issue46399] Addition of `mapping` attribute to dict views classes has inadvertently broken type-checkers

2022-01-21 Thread Akuli


Akuli  added the comment:

I now agree that `# type: ignore` in dict subclasses makes sense the most, and 
exposing the views doesn't solve practical problems.

We talked more with the people who brought this up in typing. Turns out that 
the correct solution to their problems was to just inherit from MutableMapping 
instead of inheriting from dict. If you really need to inherit from dict and 
make .keys() do something else than it does by default, you're most likely 
trying to override all dict methods that do something with the keys, and you 
should just inherit from MutableMapping instead.

--

___
Python tracker 

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



[issue41857] Document timeout arguments to poll() in select module

2022-01-21 Thread Tal Einat


Tal Einat  added the comment:


New changeset f6e5972fa984c10d47694973db1c91c6486d654a by Tal Einat in branch 
'3.10':
[3.10] bpo-41857: mention timeout argument units in select.poll() and 
select.depoll() doc-strings (GH-22406)
https://github.com/python/cpython/commit/f6e5972fa984c10d47694973db1c91c6486d654a


--

___
Python tracker 

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



[issue44686] use pkgutil.resolve_name in unittest.mock

2022-01-21 Thread Yassir Karroum


Yassir Karroum  added the comment:

I think we can close this one

--
nosy: +ukarroum

___
Python tracker 

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



[issue41857] Document timeout arguments to poll() in select module

2022-01-21 Thread Tal Einat


Tal Einat  added the comment:


New changeset 656971e4953a70a6048170377888db5530eea0a6 by Tal Einat in branch 
'3.9':
[3.9] bpo-41857: mention timeout argument units in select.poll() and 
select.depoll() doc-strings (GH-22406)
https://github.com/python/cpython/commit/656971e4953a70a6048170377888db5530eea0a6


--

___
Python tracker 

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



[issue41857] Document timeout arguments to poll() in select module

2022-01-21 Thread Tal Einat


Tal Einat  added the comment:

Thanks for this improvement, Zane!

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



[issue46450] namedtuple leaks data between instances when field's default value is empty list

2022-01-21 Thread Eric V. Smith


Eric V. Smith  added the comment:

Also see 
https://docs.python.org/3/faq/programming.html#why-are-default-values-shared-between-objects

--
nosy: +eric.smith
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



[issue23325] Turn SIG_DFL and SIG_IGN into functions

2022-01-21 Thread Christian Heimes


Christian Heimes  added the comment:

Understood, thanks!

A trivial fix for the integer comparison bug would solve my issue:

--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -527,21 +527,20 @@ signal_signal_impl(PyObject *module, int signalnum, 
PyObject *handler)
  "signal number out of range");
 return NULL;
 }
-if (handler == modstate->ignore_handler) {
+if (PyCallable_Check(handler)) {
+func = signal_handler;
+}
+else if (PyObject_RichCompareBool(handler, modstate->ignore_handler, 
Py_EQ) == 1) {
 func = SIG_IGN;
 }
-else if (handler == modstate->default_handler) {
+else if (PyObject_RichCompareBool(handler, modstate->default_handler, 
Py_EQ) == 1) {
 func = SIG_DFL;
-}
-else if (!PyCallable_Check(handler)) {
+} else {
 _PyErr_SetString(tstate, PyExc_TypeError,
  "signal handler must be signal.SIG_IGN, "
  "signal.SIG_DFL, or a callable object");
 return NULL;
 }
-else {
-func = signal_handler;
-}
 
 /* Check for pending signals before changing signal handler */
 if (_PyErr_CheckSignalsTstate(tstate)) {

--

___
Python tracker 

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



[issue46452] Possible false detection of Windows LZMA library as a malware by Avast

2022-01-21 Thread Nathan/Eilisha Shiraini


New submission from Nathan/Eilisha Shiraini :

Sending this here for information mostly

On Windows, a recent (2022-01-21) Avast update makes it target the binary LZMA 
module embedded in Python 3.9 and 3.10.

I'm talking about this file: \DLLs\_lzma.pyd

I've run a VirusTotal scan of the 3.10 version of the file, which has returned 
2 positives out of 67 at the time I'm writing this:
https://www.virustotal.com/gui/file/f904b02720b6498634fc045e3cc2a21c04505c6be81626fe99bdb7c12cc26dc6

Can you confirm this is a false positive? Given the VirusTotal result I'm 
assuming it is, however I'd like to get official confirmation.

--
components: Windows
messages: 411105
nosy: paul.moore, steve.dower, thfetoile, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Possible false detection of Windows LZMA library as a malware by Avast
versions: Python 3.10, Python 3.9

___
Python tracker 

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



[issue46452] Possible false detection of Windows LZMA library as a malware by Avast

2022-01-21 Thread Nathan/Eilisha Shiraini


Nathan/Eilisha Shiraini  added the comment:

Also I should have added: I have already reported the file to Avast as a 
possible false positive, and I'm working on an app that heavily relies on LZMA 
so this has a high impact for me.

--

___
Python tracker 

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



[issue31876] python363.chm includes gibberish

2022-01-21 Thread Irit Katriel


Irit Katriel  added the comment:

3.6 is no longer maintained.

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

___
Python tracker 

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



[issue42197] Disable automatic update of frame locals during tracing

2022-01-21 Thread Mark Shannon


Mark Shannon  added the comment:

While the various frame and debugger PEPs that are open offer a better solution 
to this, they might not be accepted for 3.11.

So I'd like to revisit this.


Removing the calls to `PyFrame_FastToLocals` and friends cuts the overhead of 
tracing down a lot. A *lot*.

Using Fabio's example I get the following slowdowns:
No calls to   PyFrame_FastToLocals`: x10
Main branch with one local variable: x16
Main branch with six locals variables: x50

This is quite a compelling reason to remove the calls to `PyFrame_FastToLocals`.

The questions is "what will we break doing this"?
All the tests pass, so that seems promising.

Ned, how would this impact coverage.py?

--
nosy: +nedbat

___
Python tracker 

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



[issue34875] Change .js mime to "text/javascript"

2022-01-21 Thread Oleg Iarygin


Oleg Iarygin  added the comment:

Myles, it looks like the draft 14 contains a mismatch in 6.2.1:

> # 6.2.1. text/ecmascript
>
> Type name: application
> Subtype name: ecmascript

In header it's `text`, in details it's `application`. Is it intended?

I believe that a typo wouldn't pass though fourteen revisions but nevertheless, 
just to be safe.

--
nosy: +arhadthedev

___
Python tracker 

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



[issue46417] Clear static types in Py_Finalize() for embedded Python

2022-01-21 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +28930
pull_request: https://github.com/python/cpython/pull/30743

___
Python tracker 

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



[issue46417] Clear static types in Py_Finalize() for embedded Python

2022-01-21 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +28931
pull_request: https://github.com/python/cpython/pull/30744

___
Python tracker 

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



[issue46453] argparse subparser help text is not escaped before string formatting

2022-01-21 Thread Peder Bergebakken Sundt


New submission from Peder Bergebakken Sundt :

The `help` text in add_argument of a subparser in argparse can not contain a 
`%`, as it will affect string formatting. This often results in an exception.

See repro.py for a reproduction, tested in Python 3.7 - 3.10.

--
components: Library (Lib)
files: repro.py
messages: 40
nosy: pbsds
priority: normal
severity: normal
status: open
title: argparse subparser help text is not escaped before string formatting
versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9
Added file: https://bugs.python.org/file50569/repro.py

___
Python tracker 

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



[issue46453] argparse subparser help text is not escaped before string formatting

2022-01-21 Thread Peder Bergebakken Sundt


Change by Peder Bergebakken Sundt :


--
type:  -> crash

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2022-01-21 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +28932
pull_request: https://github.com/python/cpython/pull/30744

___
Python tracker 

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



[issue42197] Disable automatic update of frame locals during tracing

2022-01-21 Thread Ned Batchelder


Ned Batchelder  added the comment:

Off the top of my head, I'm not sure this affects coverage.py at all, but I 
could be missing something.  Does PR 23028 have all the changes, or is there 
some other python/cpython branch I can test with?

--

___
Python tracker 

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



[issue42197] Disable automatic update of frame locals during tracing

2022-01-21 Thread Mark Shannon


Mark Shannon  added the comment:

Yes the PR has all the changes.

It is just the changes sysmodule.c that you need:
https://github.com/python/cpython/pull/23028/files#diff-a3a5c73931235f7f344c072dc755d6508e13923db3f5d581c5e88652075871cb

--

___
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-21 Thread tongxiaoge


New submission from tongxiaoge :

I found a problem in the environment of python2 and python3, as follows:

in python2:
```
VM-0-13-suse:~ # python2 -V
Python 2.7.13
VM-0-13-suse:~ #
VM-0-13-suse:~ # ps -aux|grep python2
root 29414  0.1  0.7  37096  6632 pts/3S+   19:41   0:00 python2 fd2.py
root 29442  0.0  0.1  10540  1656 pts/5S+   19:41   0:00 grep 
--color=auto python2
VM-0-13-suse:~ #
VM-0-13-suse:~ # ps -aux|grep sleep
root 29415  0.0  0.1   5760  1256 pts/3S+   19:41   0:00 sleep 12345
root 29451  0.0  0.1  10540  1648 pts/5S+   19:41   0:00 grep 
--color=auto sleep
VM-0-13-suse:~ #
VM-0-13-suse:~ # ls -l /proc/29415/fd
total 0
lrwx-- 1 root root 64 Jan 21 19:41 0 -> /dev/null
lrwx-- 1 root root 64 Jan 21 19:41 1 -> /dev/pts/3
lrwx-- 1 root root 64 Jan 21 19:41 2 -> /dev/pts/3
VM-0-13-suse:~ #
VM-0-13-suse:~ # kill -9 29415 29414
VM-0-13-suse:~ #
VM-0-13-suse:~ # ps -aux|grep python2
root 29551  0.1  0.7  37096  6632 pts/3S+   19:42   0:00 python2 fd.py
root 29564  0.0  0.1  10540  1608 pts/5S+   19:42   0:00 grep 
--color=auto python2
VM-0-13-suse:~ # ps -aux|grep sleep
root 29552  0.0  0.1   5760  1260 pts/3S+   19:42   0:00 sleep 12345
root 29576  0.0  0.1  10540  1628 pts/5S+   19:42   0:00 grep 
--color=auto sleep
VM-0-13-suse:~ #
VM-0-13-suse:~ # ls -l /proc/29552/fd
total 0
lrwx-- 1 root root 64 Jan 21 19:42 0 -> /dev/null
lrwx-- 1 root root 64 Jan 21 19:42 1 -> /dev/pts/3
lrwx-- 1 root root 64 Jan 21 19:42 2 -> /dev/pts/3
lrwx-- 1 root root 64 Jan 21 19:42 3 -> /dev/null
VM-0-13-suse:~ #
```

in python3.4.6:
```
VM-0-13-suse:~ # python3 -V
Python 3.4.6
VM-0-13-suse:~ # ps -aux|grep python3
root 29086  0.1  0.9  33628  8136 pts/3S+   19:39   0:00 python3 fd2.py
root 29143  0.0  0.1  10540  1616 pts/5S+   19:39   0:00 grep 
--color=auto python3
VM-0-13-suse:~ #
VM-0-13-suse:~ # ps -aux|grep sleep
root 29087  0.0  0.1   5760  1284 pts/3S+   19:39   0:00 sleep 12345
root 29164  0.0  0.1  10540  1620 pts/5S+   19:39   0:00 grep 
--color=auto sleep
VM-0-13-suse:~ #
VM-0-13-suse:~ # ls -l /proc/29087/fd
total 0
lrwx-- 1 root root 64 Jan 21 19:39 1 -> /dev/pts/3
lrwx-- 1 root root 64 Jan 21 19:39 2 -> /dev/pts/3
VM-0-13-suse:~ #
VM-0-13-suse:~ # kill -9 29087 29086
VM-0-13-suse:~ #
VM-0-13-suse:~ # ps -aux|grep python3
root 29257  0.3  0.9  33628  8076 pts/3S+   19:40   0:00 python3 fd.py
root 29270  0.0  0.1  10540  1620 pts/5S+   19:40   0:00 grep 
--color=auto python3
VM-0-13-suse:~ #
VM-0-13-suse:~ # ps -aux|grep sleep
root 29258  0.0  0.1   5760  1264 pts/3S+   19:40   0:00 sleep 12345
root 29281  0.0  0.1  10540  1628 pts/5S+   19:40   0:00 grep 
--color=auto sleep
VM-0-13-suse:~ #
VM-0-13-suse:~ # ls -l /proc/29258/fd
total 0
lrwx-- 1 root root 64 Jan 21 19:40 0 -> /dev/null
lrwx-- 1 root root 64 Jan 21 19:40 1 -> /dev/pts/3
lrwx-- 1 root root 64 Jan 21 19:40 2 -> /dev/pts/3
```

in python3.10.0:
```
bash-5.1# python3 -V
Python 3.10.0
bash-5.1#
bash-5.1# ps -aux|grep python3
root 28688  0.0  0.9  11664  8732 ?S+   11:36   0:00 python3 fd2.py
root 28725  0.0  0.2   6408  2216 ?S+   11:36   0:00 grep python3
bash-5.1#
bash-5.1# ps -aux|grep sleep
root 28694  0.0  0.1   5524   908 ?S+   11:36   0:00 sleep 12345
root 28729  0.0  0.2   6408  2276 ?S+   11:36   0:00 grep sleep
bash-5.1#
bash-5.1# ls -l /proc/28694/fd
total 0
lrwx-- 1 root root 64 Jan 21 11:36 1 -> /dev/pts/3
lrwx-- 1 root root 64 Jan 21 11:36 2 -> /dev/pts/3
bash-5.1#
bash-5.1#
bash-5.1# kill -9 28694 28688
bash-5.1#
bash-5.1# ps -aux|grep python3
root 28846  0.5  0.9  11680  8428 ?S+   11:37   0:00 python3 fd.py
root 28854  0.0  0.2   6408  2064 ?S+   11:37   0:00 grep python3
bash-5.1#
bash-5.1# ps -aux|grep sleep
root 28847  0.0  0.0   5524   872 ?S+   11:37   0:00 sleep 12345
root 28863  0.0  0.2   6408  2220 ?S+   11:37   0:00 grep sleep
bash-5.1#
bash-5.1# ls -l /proc/28847/fd
total 0
lrwx-- 1 root root 64 Jan 21 11:37 0 -> /dev/null
lrwx-- 1 root root 64 Jan 21 11:37 1 -> /dev/pts/3
lrwx-- 1 root root 64 Jan 21 11:37 2 -> /dev/pts/3
bash-5.1#
```

When we execute the script fd2.py in the python 3 environment, we can find that 
 '0 -> /dev/null' is lost. I wonder if this is a bug in Python3 or a new 
feature? If it is a bug, how to fix it? I will look forward to your reply very 
much.

--
components: Library (Lib)
messages: 43
nosy: shihai1991, sxt1001, vstinner
priority: normal
severity: normal
status: open
title: '0 -> /dev/null' is lost
type: behavior
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mai

[issue42197] Disable automatic update of frame locals during tracing

2022-01-21 Thread Mark Shannon


Mark Shannon  added the comment:

Or you can use this branch:
https://github.com/faster-cpython/cpython/tree/dont-fast-to-locals-in-trampoline

--

___
Python tracker 

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



[issue46399] Addition of `mapping` attribute to dict views classes has inadvertently broken type-checkers

2022-01-21 Thread Alex Waygood


Alex Waygood  added the comment:

I have also been persuaded that my suggested solution is not the way to go. 
Thanks everybody for the useful discussion.

--

___
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-21 Thread tongxiaoge


Change by tongxiaoge :


Added file: https://bugs.python.org/file50570/fd.py

___
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-21 Thread tongxiaoge


Change by tongxiaoge :


Added file: https://bugs.python.org/file50571/fd2.py

___
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-21 Thread tongxiaoge


Change by tongxiaoge :


Added file: https://bugs.python.org/file50572/python2.7.13-out.png

___
Python tracker 

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



[issue46417] Clear static types in Py_Finalize() for embedded Python

2022-01-21 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset ea38e436fe1e585fb8c1f0badf5482f525b7f9ff by Victor Stinner in 
branch 'main':
bpo-46417: Call _PyDebug_PrintTotalRefs() later (GH-30744)
https://github.com/python/cpython/commit/ea38e436fe1e585fb8c1f0badf5482f525b7f9ff


--

___
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-21 Thread tongxiaoge


Change by tongxiaoge :


Added file: https://bugs.python.org/file50573/python3.10.0-out.png

___
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-21 Thread tongxiaoge


Change by tongxiaoge :


Added file: https://bugs.python.org/file50574/python3.4.6-out.png

___
Python tracker 

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



[issue1635741] Py_Finalize() doesn't clear all Python objects at exit

2022-01-21 Thread STINNER Victor


STINNER Victor  added the comment:

Using "./python -IsS" command, sys.modules now only has 3 extensions which are 
not created by PyModuleDef_Init():

* builtins
* _io
* sys

The builtins and sys extensions use many static types. Converting these static 
types to heap types is blocked by bpo-40601. Soon, bpo-46417 will clear these 
types. Py_Finalize() does its best to clear explicitly builtins and sys 
namespaces.

--

___
Python tracker 

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



[issue46417] Clear static types in Py_Finalize() for embedded Python

2022-01-21 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 595225e86dcc6ea520a584839925a878dce7a9b2 by Victor Stinner in 
branch 'main':
bpo-46417: Py_Finalize() clears static types (GH-30743)
https://github.com/python/cpython/commit/595225e86dcc6ea520a584839925a878dce7a9b2


--

___
Python tracker 

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



[issue46071] Graphlib documentation (edge direction)

2022-01-21 Thread David Mc Dougall


David Mc Dougall  added the comment:

I can post literally hundreds of examples of directed graphs that are 
traversable in the forward direction. This might be the only one which is 
*only* traversable backwards.


> As to the meaning of "point to"

Here is one: If I have a pointer in memory, I might represent that with an 
arrow,
Like: ADDRESS -> VALUE

Or if I have a dictionary I might write:
KEY -> VALUE

But in the graph the edges are directed the opposite way:
KEY <- VALUE

The edges in the graph point in the opposite direction as the underlying memory 
pointers. This is unexpected and confusing.

--

___
Python tracker 

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



[issue37776] [subinterpreters] Test Py_Finalize() from a subinterpreter

2022-01-21 Thread STINNER Victor


STINNER Victor  added the comment:

I mark this issue as a duplicate of bpo-38865.

--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> [subinterpreters] Can Py_Finalize() be called if the current 
interpreter is not the main interpreter?

___
Python tracker 

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



[issue38865] [subinterpreters] Can Py_Finalize() be called if the current interpreter is not the main interpreter?

2022-01-21 Thread STINNER Victor


STINNER Victor  added the comment:

I marked bpo-37776 "[subinterpreters] Test Py_Finalize() from a subinterpreter" 
as a duplicate of this issue.

--

___
Python tracker 

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



[issue29858] inspect.signature includes bound argument for wrappers around decorated bound methods

2022-01-21 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue46417] Clear static types in Py_Finalize() for embedded Python

2022-01-21 Thread STINNER Victor


STINNER Victor  added the comment:

> bpo-46417: Py_Finalize() clears static types (GH-30743)

Oh, test_unittest crashed on s390x Debian 3.x:
https://buildbot.python.org/all/#/builders/49/builds/1789

I fail to see the relationship between my change and this crash. I don't expect 
test_unittest to call Py_Finalize() and then Py_Initialize() again.

---
0:01:32 load avg: 4.77 [152/432/1] test_unittest crashed (Exit code -11) -- 
running: test_peg_generator (48.3 sec)
Fatal Python error: Segmentation fault

Current thread 0x03ff89cf8720 (most recent call first):
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/inspect.py", line 
2179 in _signature_fromstr
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/inspect.py", line 
2273 in _signature_from_builtin
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/inspect.py", line 
2461 in _signature_from_callable
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/inspect.py", line 
2465 in _signature_from_callable
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/inspect.py", line 
2966 in from_callable
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/inspect.py", line 
3218 in signature
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/unittest/mock.py", 
line 112 in _get_signature_object
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/unittest/mock.py", 
line 505 in _mock_add_spec
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/unittest/mock.py", 
line 487 in mock_add_spec
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/unittest/test/testmock/testmock.py",
 line 1767 in test_mock_add_spec
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/unittest/case.py", 
line 547 in _callTestMethod
  (...)
  File 
"/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/test/regrtest.py", 
line 47 in 
  File "", line 88 in _run_code
  File "", line 198 in _run_module_as_main

Extension modules: _testcapi (total: 1)
---

--

___
Python tracker 

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



[issue46455] Deprecate / remove os.name=java

2022-01-21 Thread Xavier Morel


New submission from Xavier Morel :

os.name is defined as:

> The following names have currently been registered: 'posix', 'nt', 'java'.

In my understanding, the value `'java'` is for the benefit of jython, which is 
rather poorly. Other third-party implementations which may or may not have a 
"full os module" (e.g. ironpython) do not -- as far as I can tell -- get to be 
registered against this value, and Python 3.3's addition of 
`sys.implementation` seems like a more reliable (and better supported) way to 
perform implementation-specific checks.

Therefore I feel `os.name == 'java'` only exists to confuse readers of the 
documentation, but doesn't really provide any value, and should be removed.

--
components: Library (Lib)
messages: 411123
nosy: xmorel
priority: normal
severity: normal
status: open
title: Deprecate / remove os.name=java
versions: Python 3.10, Python 3.11, Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

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



[issue40757] tarfile: ignore_zeros = True won't raise exception even on invalid (non-zero) TARs

2022-01-21 Thread Irit Katriel


Irit Katriel  added the comment:

I am unable to reproduce this on 3.11:

>>> import tarfile

>>> tarfile.open( "foo.txt" )
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/iritkatriel/src/cpython-1/Lib/tarfile.py", line 1613, in open
return func(name, "r", fileobj, **kwargs)
   ^^
  File "/Users/iritkatriel/src/cpython-1/Lib/tarfile.py", line 1679, in gzopen
fileobj = GzipFile(name, mode + "b", compresslevel, fileobj)
  ^^
  File "/Users/iritkatriel/src/cpython-1/Lib/gzip.py", line 174, in __init__
fileobj = self.myfileobj = builtins.open(filename, mode or 'rb')
   ^
FileNotFoundError: [Errno 2] No such file or directory: 'foo.txt'



>>> tarfile.open( "foo.txt", ignore_zeros = True )
Traceback (most recent call last):
  File "", line 1, in 
  File "/Users/iritkatriel/src/cpython-1/Lib/tarfile.py", line 1613, in open
return func(name, "r", fileobj, **kwargs)
   ^^
  File "/Users/iritkatriel/src/cpython-1/Lib/tarfile.py", line 1679, in gzopen
fileobj = GzipFile(name, mode + "b", compresslevel, fileobj)
  ^^
  File "/Users/iritkatriel/src/cpython-1/Lib/gzip.py", line 174, in __init__
fileobj = self.myfileobj = builtins.open(filename, mode or 'rb')
   ^
FileNotFoundError: [Errno 2] No such file or directory: 'foo.txt'
>>>

--
nosy: +iritkatriel
resolution:  -> out of date
status: open -> pending

___
Python tracker 

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



[issue46455] Deprecate / remove os.name=java

2022-01-21 Thread Xavier Morel


Xavier Morel  added the comment:

PS: "platform.system()" also documents `Java` as a value which doesn't seem to 
make that much sense, however it's an open set so probably less of an issue / 
source of confusion.

--

___
Python tracker 

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



[issue40729] Update the list of auto-generated files in .gitattributes

2022-01-21 Thread Batuhan Taskaya


New submission from Batuhan Taskaya :

Superseeded by https://github.com/python/core-workflow/issues/425

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



[issue46425] Multiple test modules fail to run if invoked directly

2022-01-21 Thread Nikita Sobolev


Change by Nikita Sobolev :


--
pull_requests: +28933
pull_request: https://github.com/python/cpython/pull/30746

___
Python tracker 

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



[issue10202] ftplib doesn't check close status after sending file

2022-01-21 Thread mike mcleod


Change by mike mcleod :


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

___
Python tracker 

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



[issue46038] Mark /configure file as generated in .gitattributes

2022-01-21 Thread Oleg Iarygin


Change by Oleg Iarygin :


--
pull_requests: +28935
pull_request: https://github.com/python/cpython/pull/30745

___
Python tracker 

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



[issue46417] Clear static types in Py_Finalize() for embedded Python

2022-01-21 Thread STINNER Victor


STINNER Victor  added the comment:

Maybe the problem is that I changed the order in which types are initialized in 
_PyTypes_InitTypes()?

So far, test_unittest crashed on 4 buildbot workers:

* s390x Debian 3.x: ./configure --prefix '$(PWD)/target' --with-pydebug
  https://buildbot.python.org/all/#/builders/49/builds/1789

* aarch64 Fedora Stable 3.x: ../configure --prefix '$(PWD)/target' 
--with-pydebug --with-platlibdir=lib64 --enable-ipv6 --enable-shared 
--with-computed-gotos=yes --with-dbmliborder=gdbm:ndbm:bdb 
--enable-loadable-sqlite-extensions --with-ssl-default-suites=openssl 
--without-static-libpython --with-lto
  https://buildbot.python.org/all/#/builders/125/builds/1263

* aarch64 RHEL8 3.x: ../configure --prefix '$(PWD)/target' --with-pydebug 
--with-platlibdir=lib64 --enable-ipv6 --enable-shared --with-computed-gotos=yes 
--with-dbmliborder=gdbm:ndbm:bdb --enable-loadable-sqlite-extensions 
--with-ssl-default-suites=openssl --without-static-libpython --with-lto
  https://buildbot.python.org/all/#/builders/529/builds/1357

* PPC64LE RHEL8 3.x: ../configure --prefix '$(PWD)/target' --with-pydebug 
--with-platlibdir=lib64 --enable-ipv6 --enable-shared --with-computed-gotos=yes 
--with-dbmliborder=gdbm:ndbm:bdb --enable-loadable-sqlite-extensions 
--with-ssl-default-suites=openssl --without-static-libpython --with-lto
  https://buildbot.python.org/all/#/builders/559/builds/1196

--

___
Python tracker 

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



[issue46038] Mark /configure file as generated in .gitattributes

2022-01-21 Thread Oleg Iarygin


Oleg Iarygin  added the comment:

Superseded by . The PR 
itself is included as a part of PR30745.

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



[issue46417] Clear static types in Py_Finalize() for embedded Python

2022-01-21 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +28936
pull_request: https://github.com/python/cpython/pull/30749

___
Python tracker 

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



[issue46212] Avoid temporary `varargs` tuple creation in argument passing

2022-01-21 Thread Batuhan Taskaya


Batuhan Taskaya  added the comment:

> Note that _PyArg_UnpackKeywordsWithVararg is defined with PyAPI_FUNC. 
> Changing its argument spec is strictly a backwards incompatible change, IIUC.

AFAIK we have committed _PyArg_UnpackKeywordsWithVararg on 3.11 alpha, so I 
think it should be fine. Also CC: @pablogsal

--
nosy: +pablogsal

___
Python tracker 

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



[issue45877] Inconsistency in minimal supported version of Microsoft Visual Studio

2022-01-21 Thread Oleg Iarygin


Change by Oleg Iarygin :


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



[issue46212] Avoid temporary `varargs` tuple creation in argument passing

2022-01-21 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

> AFAIK we have committed _PyArg_UnpackKeywordsWithVararg on 3.11 alpha, so I 
> think it should be fine.

I see, so no ABI worries then.

--

___
Python tracker 

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



[issue46417] Clear static types in Py_Finalize() for embedded Python

2022-01-21 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +28937
pull_request: https://github.com/python/cpython/pull/30750

___
Python tracker 

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



[issue46427] Correct MSBuild's configuration for _freeze_module.exe

2022-01-21 Thread Steve Dower


Steve Dower  added the comment:

Windows ARM64 devices all support x86 and x64 emulation, so while it's less 
than ideal performance-wise to use a non-native build for this step, it's 
hardly fatal. That step doesn't rely on the underlying architecture, just the 
current Python bytecode format (which is platform independent).

Leaving the Platform blank is not acceptable. It needs to be set to the 
preferred tool architecture, which as it happens, is 
$(PreferredToolArchitecture).

As I said, if you've hit a *real* issue around this, please describe it. There 
is no theoretical issue here, and as far as I'm aware, no practical issues 
either.

--

___
Python tracker 

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



[issue46450] namedtuple leaks data between instances when field's default value is empty list

2022-01-21 Thread maximus733


maximus733 <3ed7qja...@liamekaens.com> added the comment:

Thanks for the clarification.

--

___
Python tracker 

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



[issue46452] Possible false detection of Windows LZMA library as a malware by Avast

2022-01-21 Thread Steve Dower


Steve Dower  added the comment:

I don't think we've changed anything here in years, so I'd be very 
surprised if something new was in there.

More likely somebody PyInstaller'd some malware and the scanners picked 
up a generic part of it as the signature. Reporting it as a false 
positive should let them compare against the original sample and correct it.

--

___
Python tracker 

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



[issue46456] Add mime type "image/avif"

2022-01-21 Thread jiahua wang


New submission from jiahua wang :

https://www.iana.org/assignments/media-types/image/avif

--
components: Library (Lib)
messages: 411134
nosy: wangjiahua
priority: normal
severity: normal
status: open
title: Add mime type "image/avif"
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



[issue46452] Possible false detection of Windows LZMA library as a malware by Avast

2022-01-21 Thread Nathan/Eilisha Shiraini


Nathan/Eilisha Shiraini  added the comment:

Thanks for the quick response. It seems Avast was just as quick, I updated my 
AV's databases a few minutes ago and now it doesn't repost the files as 
malware. Same for the VirusTotal scans.

--

___
Python tracker 

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



[issue46457] test_unittest: TestAsyncCase.test_debug_cleanup_same_loop() hangs with gc.set_threshold(500)

2022-01-21 Thread STINNER Victor


New submission from STINNER Victor :

The following command hangs:

./python -u -m test -v test_unittest -m test_debug_cleanup_same_loop -v 
2>/dev/null

if the following patch is applied on Python:

diff --git a/Lib/unittest/test/test_async_case.py 
b/Lib/unittest/test/test_async_case.py
index 3717486b265..c6759a13494 100644
--- a/Lib/unittest/test/test_async_case.py
+++ b/Lib/unittest/test/test_async_case.py
@@ -2,6 +2,7 @@
 import unittest
 from test import support
 
+import gc; gc.set_threshold(500)
 
 class MyException(Exception):
 pass

--
components: Tests, asyncio
messages: 411136
nosy: asvetlov, vstinner, yselivanov
priority: normal
severity: normal
status: open
title: test_unittest: TestAsyncCase.test_debug_cleanup_same_loop() hangs with 
gc.set_threshold(500)
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



[issue46458] Optimise try-except code generation for the happy path

2022-01-21 Thread Irit Katriel


New submission from Irit Katriel :

The compiler emits code for try-except-else-finally in the order in which it 
appears in the source, but it could probably produce faster code if it 
optimizes for the no-exception path.

--
assignee: iritkatriel
components: Interpreter Core
messages: 411137
nosy: iritkatriel
priority: normal
severity: normal
status: open
title: Optimise try-except code generation for the happy path
type: performance
versions: Python 3.11

___
Python tracker 

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



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

2022-01-21 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

This sounds like a consequence of PEP 446.

--
nosy: +Jelle Zijlstra

___
Python tracker 

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



[issue46417] Clear static types in Py_Finalize() for embedded Python

2022-01-21 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset fda88864980ffce57add0ea03fb9cbda2798975e by Victor Stinner in 
branch 'main':
bpo-46417: Revert remove_subclass() change (GH-30750)
https://github.com/python/cpython/commit/fda88864980ffce57add0ea03fb9cbda2798975e


--

___
Python tracker 

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



[issue46458] Optimise try-except code generation for the happy path

2022-01-21 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue46459] Installing python to external drive (USB) using python installer failure

2022-01-21 Thread oMqngo


New submission from oMqngo :

When trying to install python to a external drive, such as a USB drive, using 
the python installer (while having python installed on the local PC), the 
installer continues to the "download finished" window without installing 
anything to the USB drive.

--
components: Windows
messages: 411140
nosy: oMqngo, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Installing python to external drive (USB) using python installer failure
type: behavior
versions: Python 3.10

___
Python tracker 

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



[issue46458] Optimise try-except code generation for the happy path

2022-01-21 Thread Irit Katriel


Irit Katriel  added the comment:

See also the discussion on https://github.com/faster-cpython/ideas/issues/226.

--

___
Python tracker 

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



[issue46459] Installing python to external drive (USB) using python installer failure

2022-01-21 Thread Steve Dower


Steve Dower  added the comment:

The installer doesn't support installing twice on the same machine, even to 
different locations.

What you probably want to do is to install it normally, then copy all the files 
onto the USB. You will need to "python -m pip install --force pip" in the new 
copy to fix up its scripts, and it may interfere with a system install if you 
use it on a machine that also has its own installation (though that's mostly 
been cleaned up since ~3.5), but should otherwise be fine.

--

___
Python tracker 

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



[issue46417] Clear static types in Py_Finalize() for embedded Python

2022-01-21 Thread STINNER Victor


STINNER Victor  added the comment:

> bpo-46417: Revert remove_subclass() change (GH-30750)

Ok, this change fixed buildbots.

I saw code in typeobject.c which uses a borrowed reference to tp_subclasses 
with a loop which can modify tp_subclasses. This code should be modified to 
hold a strong reference to tp_subclasses while accessing it.

The test_mock_add_spec() test of test_unittest modifies the subclasses of many 
types and so is indirectly a stress tests for code accessing tp_subclasses. 
That's why the regression was only seen in this specific test.

--

___
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-21 Thread STINNER Victor


STINNER Victor  added the comment:

That's not a bug, but a deliberate choice. In Python 3, file descriptors are no 
longer inherited by default by child processes (fork+exec). Jelle is right, it 
was changed by my PEP 446.

You must use pass_fds=[fd] parameter of subprocess.

Or at least, make the file descriptor inheritable (worse solution).

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



[issue42197] Disable automatic update of frame locals during tracing

2022-01-21 Thread STINNER Victor


STINNER Victor  added the comment:

As I already wrote previously, I'm a supporter of requiring debuggers and 
profilers to explicitly call PyFrame_FastToLocalsWithError() and 
PyFrame_LocalsToFast(). It should only impact a minority of users, whereas the 
majority will benefit of way better performance, no?

--

___
Python tracker 

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



[issue46442] testExceptionCleanupNames doesn't test anything?

2022-01-21 Thread Yellow Dusk


Yellow Dusk  added the comment:

Great point, it's indeed a good thing to test. So I guess the test is just 
incomplete.

--

___
Python tracker 

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



[issue46460] Doc/library/dis.rst lists `versionchange` twice for `WITH_EXCEPT_START`

2022-01-21 Thread Nikita Sobolev


New submission from Nikita Sobolev :

Right now it has two sections:

```
.. versionchanged:: 3.11
   The ``__exit__`` function is in position 8 of the stack rather than 7.

```

And

```
.. versionchanged:: 3.11
   The ``__exit__`` function is in position 4 of the stack rather than 7.
   Exception representation on the stack now consist of one, not three, 
items.
```

Furthermore, they seem to contradict each other.
I think that we should only keep the last one.

I will send a PR for it.

--
assignee: docs@python
components: Documentation
messages: 411147
nosy: docs@python, sobolevn
priority: normal
severity: normal
status: open
title: Doc/library/dis.rst lists `versionchange` twice for `WITH_EXCEPT_START`
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



[issue46460] Doc/library/dis.rst lists `versionchange` twice for `WITH_EXCEPT_START`

2022-01-21 Thread Nikita Sobolev


Change by Nikita Sobolev :


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

___
Python tracker 

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



[issue46417] Clear static types in Py_Finalize() for embedded Python

2022-01-21 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset a1bf329bca80a0259da454c936075e11e6af710f by Victor Stinner in 
branch 'main':
bpo-46417: Add missing types of _PyTypes_InitTypes() (GH-30749)
https://github.com/python/cpython/commit/a1bf329bca80a0259da454c936075e11e6af710f


--

___
Python tracker 

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



[issue46442] testExceptionCleanupNames doesn't test anything?

2022-01-21 Thread Yellow Dusk


Change by Yellow Dusk :


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

___
Python tracker 

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



[issue46434] pdb help fails with AttributeError when using Windows embeddable package

2022-01-21 Thread miss-islington


Change by miss-islington :


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

___
Python tracker 

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



[issue46434] pdb help fails with AttributeError when using Windows embeddable package

2022-01-21 Thread Steve Dower


Steve Dower  added the comment:


New changeset 60705cff70576482fea31dcafbf8a37cbb751ea5 by Tom Sparrow in branch 
'main':
bpo-46434: Handle missing docstrings in pdb help (GH-30705)
https://github.com/python/cpython/commit/60705cff70576482fea31dcafbf8a37cbb751ea5


--

___
Python tracker 

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



[issue46434] pdb help fails with AttributeError when using Windows embeddable package

2022-01-21 Thread miss-islington


Change by miss-islington :


--
pull_requests: +28942
pull_request: https://github.com/python/cpython/pull/30755

___
Python tracker 

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



[issue31817] Compilation Error with Python 3.6.1/3.6.3 with Tkinter

2022-01-21 Thread Irit Katriel


Irit Katriel  added the comment:

3.6 is no longer maintained. Is this a problem on current versions or can be 
close this?

--
nosy: +iritkatriel
resolution:  -> out of date
status: open -> pending

___
Python tracker 

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



[issue40120] Undefined C behavior going beyond end of struct via a [1] arrays.

2022-01-21 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

How about:

#ifdef __cplusplus
char array[1];
#else
char array[];
#endif

?

--

___
Python tracker 

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



[issue46449] Deep-freezed modules create inconsistency in sys.gettotalrefcount() (_Py_Reftotal)

2022-01-21 Thread Guido van Rossum


Guido van Rossum  added the comment:

I was hoping @eric.snow could tell me.

--

___
Python tracker 

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



[issue32976] linux/random.h present but cannot be compiled

2022-01-21 Thread Irit Katriel


Irit Katriel  added the comment:

Thanks for reporting this. Since 3.6 is no longer maintained it's unlikely that 
this will be investigated. Please create a new issue if you are seeing this 
with a current version of Python (>= 3.9).

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

___
Python tracker 

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



[issue41906] logging.config.dictConfig does not work with callable filters

2022-01-21 Thread Mario Corchero


Change by Mario Corchero :


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

___
Python tracker 

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



[issue33994] python build egg fails with error while compiling test cases

2022-01-21 Thread Irit Katriel


Irit Katriel  added the comment:

3.6 is no longer maintained. Please create a new issue if you are seeing this 
on a current version (>= 3.9).

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

___
Python tracker 

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



[issue33286] Conflict between tqdm and multiprocessing on windows

2022-01-21 Thread Irit Katriel


Irit Katriel  added the comment:

The tqdm_multi.py works for me on 3.11 on windows.

--
nosy: +iritkatriel
resolution:  -> works for me
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



[issue46426] Improve tests for the dir_fd argument

2022-01-21 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +28944
pull_request: https://github.com/python/cpython/pull/30757

___
Python tracker 

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



[issue46426] Improve tests for the dir_fd argument

2022-01-21 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset a1015c6478e8cbec2ecb984a3cba733783d168b5 by Miss Islington (bot) 
in branch '3.10':
bpo-46426: Improve tests for the dir_fd argument (GH-30668) (GH-30739)
https://github.com/python/cpython/commit/a1015c6478e8cbec2ecb984a3cba733783d168b5


--

___
Python tracker 

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



[issue29541] Python3 error while building on Alt-F

2022-01-21 Thread Irit Katriel


Irit Katriel  added the comment:

3.6 is no longer maintained, please create a new issue if you are seeing this 
problem on a current version (>= 3.9).

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

___
Python tracker 

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



[issue10434] Document the rules for "public names"

2022-01-21 Thread mike mcleod


mike mcleod  added the comment:

I would like to help on this issue. Is there anyone available to push a PR 
through? If I make the changes.

--
nosy: +mikecmcleod

___
Python tracker 

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



[issue46434] pdb help fails with AttributeError when using Windows embeddable package

2022-01-21 Thread miss-islington


miss-islington  added the comment:


New changeset c3ad850b57f92bd7c5515616b59afbd9e1c79538 by Miss Islington (bot) 
in branch '3.9':
bpo-46434: Handle missing docstrings in pdb help (GH-30705)
https://github.com/python/cpython/commit/c3ad850b57f92bd7c5515616b59afbd9e1c79538


--

___
Python tracker 

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



[issue46442] testExceptionCleanupNames doesn't test anything?

2022-01-21 Thread Yellow Dusk


Change by Yellow Dusk :


--
pull_requests: +28945
pull_request: https://github.com/python/cpython/pull/30758

___
Python tracker 

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



[issue1521051] Allow passing DocTestRunner and DocTestCase in doctest

2022-01-21 Thread mike mcleod


mike mcleod  added the comment:

I would like to help on this issue.

--
nosy: +mikecmcleod

___
Python tracker 

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



[issue46071] Graphlib documentation (edge direction)

2022-01-21 Thread Tim Peters


Tim Peters  added the comment:

Now you may be getting somewhere ;-) Complaining about the docs wasn't getting 
traction because they're using standard terminology with the standard meanings, 
and tell the plain truth about what the class requires and delivers.

You wish it required something else instead. Fine: be direct about that! 
Suggest a feature enhancement rather than contorting the docs to pretend the 
class "really" requires what you _wish_ it required and is computing "the 
reverse" of what it claims to be computing. That won't be accepted  because 
it's not true.

How about, e.g., suggesting instead a new optional constructor argument, like 
`successor_graph=False`, which can be passed as `True` to say that the `graph` 
argument is a successor dict rather than the default predecessor dict?

I wouldn't oppose that, and it would be easy to implement (indeed, way back 
when here I already posted code to do it).

--

___
Python tracker 

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



[issue39952] Using VS2019 to automatically build Python3 and it failed to build

2022-01-21 Thread Irit Katriel


Irit Katriel  added the comment:

3.6 is no longer maintained. Can we close this now, or is this a problem on 
newer versions as well?

--
nosy: +iritkatriel
resolution:  -> out of date
status: open -> pending

___
Python tracker 

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



[issue39952] Using VS2019 to automatically build Python3 and it failed to build

2022-01-21 Thread Steve Dower


Steve Dower  added the comment:

I think we can close it.

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

___
Python tracker 

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



  1   2   3   >