[issue42238] Deprecate suspicious.py?

2022-01-25 Thread Julien Palard


Change by Julien Palard :


--
pull_requests: +29059
pull_request: https://github.com/python/cpython/pull/30879

___
Python tracker 

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



[issue46496] idlelib/NEWS.txt for 3.11.0 and backports

2022-01-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset b1a3446f077b7d56b89f55d98dadb8018986a3e5 by Terry Jan Reedy in 
branch 'main':
bpo-46496: Update IDLE News to 2021 Jan 24 (GH-30875)
https://github.com/python/cpython/commit/b1a3446f077b7d56b89f55d98dadb8018986a3e5


--

___
Python tracker 

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



[issue46496] idlelib/NEWS.txt for 3.11.0 and backports

2022-01-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 367a37a18c4411c42da9006947dd95b0afbdf200 by Terry Jan Reedy in 
branch '3.10':
[3.10] bpo-46496: Update IDLE News to 2021 Jan 24 (GH-30876)
https://github.com/python/cpython/commit/367a37a18c4411c42da9006947dd95b0afbdf200


--

___
Python tracker 

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



[issue46496] idlelib/NEWS.txt for 3.11.0 and backports

2022-01-25 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 3178efbf0409107237a3cfe61ba85a5d3a26 by Terry Jan Reedy in 
branch '3.9':
[3.9] bpo-46496: Update IDLE News to 2021 Jan 24 (GH-30877)
https://github.com/python/cpython/commit/3178efbf0409107237a3cfe61ba85a5d3a26


--

___
Python tracker 

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



[issue46496] idlelib/NEWS.txt for 3.11.0 and backports

2022-01-25 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
stage: patch review -> needs patch

___
Python tracker 

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



[issue42238] Deprecate suspicious.py?

2022-01-25 Thread Julien Palard


Julien Palard  added the comment:

I slowly started to work on rstlint in its own tree because working in a single 
file felt inconfortable.

The more I advanced in this direction the more it made sense to me:

- I first added tests, I may have been able to do so in the cpython tree though.
- It would ease the publication of it to pypi.org so it can be used by other 
projects.
- It may ease contributions (some non-core-devs could be given rights to the 
repo, which make sense as it's not really Python related but more Sphinx 
related).

It currently looks like this: https://github.com/JulienPalard/sphinxlint but 
should obviously be moved to github.com/python/ if we adopt this direction.

So what do you think? (cc Georg as the main author of the script)

If so I'd also like to rename the thing, it's currently named `rstlint`, but 
it's more a `sphinxlint` as Sphinx has adds a lot to rst and existing rst 
linters does not handle Sphinx well.

--
nosy: +georg.brandl

___
Python tracker 

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



[issue42982] Update suggested number of iterations for pbkdf2_hmac()

2022-01-25 Thread Christian Heimes


Christian Heimes  added the comment:

My question from last year has not been answered yet. Is there any valid 
scientific research on the number of rounds or duration? I neither know nor do 
I understand how Django came up with the numbers. PyCA cryptography copied the 
numbers without questioning them.

Were does 250ms come from? 250ms at 100% CPU load sound way too costly for a 
website login and too fast for a password manager. For comparison Argon2's 
default runtime on my laptop is 50ms.

--

___
Python tracker 

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



[issue46511] dataclasses: Allow typing.Annotated to wrap dataclasses-specific annotations

2022-01-25 Thread Gregory Beauregard


New submission from Gregory Beauregard :

In https://bugs.python.org/issue46491 the typing runtime behavior was changed 
so that `Annotated[Classvar[...]]` is now valid at runtime in order to 
alleviate tension between typing and non-typing annotation space uses. 
dataclasses.py should likely follow suit in its runtime use of `ClassVar` and 
`InitVar`.

Reviewing the code I see two areas that would need addressed:

1) `InitVar` needs changed so `Annotated[InitVar[...]]` is no longer a runtime 
error. This is currently a runtime error completely by accident: typing.py 
expects special type forms to be `callable()`, usually by implementing a 
`__call__` that throws an error, but `InitVar` does not implement this. Adding 
an  implementation like in typing.py would fix the runtime error:
https://github.com/python/cpython/blob/b1a3446f077b7d56b89f55d98dadb8018986a3e5/Lib/typing.py#L391-L392

2) The dataclasses-specific typehint introspection implementation needs 
modified to accommodate being wrapped by an `Annotated` annotation. I see in 
the comments the code is performance sensitive so I'm not sure what you want to 
do; f.ex. the regex needs modified, but it's not clean.

What are your thoughts?

--
components: Library (Lib)
messages: 411567
nosy: GBeauregard, Jelle Zijlstra, eric.smith
priority: normal
severity: normal
status: open
title: dataclasses: Allow typing.Annotated to wrap dataclasses-specific 
annotations
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



[issue46376] PyMapping_Check returns 1 for list

2022-01-25 Thread Ben Avrahami


Ben Avrahami  added the comment:

IMHO, I don't think any alternative to aviramha's solution addresses the issue, 
And I don't think the need is niche enough to be ignored.

PyType_HasFeature excludes strings, bytes, and other esoteric types.
PyMapping_Check includes mappings like dict and MappingProxyType.
PySequence_Check includes non-dict mappings like MappingProxyType.

The only possible solutions right now are:

a. Import the "collections.abc.Sequence" class into C and run 
"PyObject_IsInstance" on it. This would be the correct solution, but it would 
be slower than aviramha's propsal.
b. Perform's aviramha's proposal manually: first check the 
"Py_TPFLAGS_SEQUENCE" feature flag, and fallback for instance checking strings, 
bytecodes, and other esoteric types individually. This would be correct and 
fast, but is cumbersome to perform, and users are bound to forget some types.

A question as simple as "would isinstance(X, ) returns true?" 
should be easier to answer for low-level developer, one only needs to look at 
the finagling numpy, among others, has to perform to parse a sequence (the 
relevant function in numpy is called "PyArray_FromAny").

A simple implementation of a new function for non-CPython alternatives will be 
to do implement solution a: import "collections.abc.Sequence", and check for 
instance. For CPYTHON, this can be optimized by implementing solution b.

There is already a precedence for ABI functions that only exist because its 
trivial implementation can be optimized with CPython specific behaviour. I 
don't understand the reluctance to add this one.

--
nosy: +avrahami.ben

___
Python tracker 

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



[issue46483] `pathlib.PurePath.__class_getitem__` does not return `GenericAlias`

2022-01-25 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It is not related to email and asyncio either.

--
components:  -asyncio, email

___
Python tracker 

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



[issue46512] Explicit or correct behavior of filecmp.cmpfiles w/ absolute path names

2022-01-25 Thread bers


New submission from bers :

It is very easy to use filecmp.cmpfiles incorrectly by passing absolute path 
names. This is because
1. the documentations does not say that relative path names have to be passed, 
and
2. filecmp.cmpfiles does not issue a warning when absolute path names are 
passed.

Consider this example code, which does look sensible at first glance:

files = dir_a.glob("*")
(equal, _, _) = filecmp.cmpfiles(dir_a, dir_b, files, shallow=False)
print("equal:", *equal)

However, in the full example below, you will see that this code fails to detect 
that two files are actually different.

"""Demo behavior of filecmp.cmpfiles with absolute path names."""
import filecmp
import tempfile
from pathlib import Path

with tempfile.TemporaryDirectory() as tmpdirname:
# prepare two different files
tmpdir = Path(tmpdirname)
dir_a = tmpdir / "a"
dir_b = tmpdir / "b"
file_a = dir_a / "foo.txt"
file_b = dir_b / "foo.txt"

dir_a.mkdir()
dir_b.mkdir()
file_a.write_text("A")
file_b.write_text("B")

# actually diff the files
files = dir_a.glob("*")
# filecmp should issue a warning here!
(equal, _, _) = filecmp.cmpfiles(dir_a, dir_b, files, shallow=False)
# otherwise, this result is easy to misinterpret - files are reported as 
equal
print("equal:", *equal)

--
components: Library (Lib)
messages: 411570
nosy: bers
priority: normal
severity: normal
status: open
title: Explicit or correct behavior of filecmp.cmpfiles w/ absolute path names
type: behavior
versions: Python 3.9

___
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-25 Thread Brett Randall


Change by Brett Randall :


--
nosy: +javabrett

___
Python tracker 

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



[issue42238] Deprecate suspicious.py?

2022-01-25 Thread Georg Brandl


Georg Brandl  added the comment:

> I was not here 21 years ago when it was introduced

You gave me a small shock, but I checked and it was only 11/12 years ago :D

I'm fine with moving this out of tree; please coordinate with the Sphinx 
maintainers whether it should be an "official" extension or completely separate.

--

___
Python tracker 

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



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

2022-01-25 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.11 -Python 3.6

___
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-25 Thread Brett Randall


Brett Randall  added the comment:

For the possible benefit of future readers of this issue, the sequence and 
behaviour here which may cause confusion:

- say stdin is closed, perhaps along with stdout and stderr via a call to 
os.closerange(0, 3) or otherwise
- os.open() is called and creates a new fd=0, which will always be 0 since 0 is 
now available and lowest.  Per PEP 446 this fd is non-inheritable.
- a call to os.dup2(fd, 0) is made but is a noop, since fd=0 and dup2() ignores 
copy-to-same.  This behaviour may go unnoticed - it may not be noticed that the 
new fd=0 (it should always be this), or that dup2() has this noop behaviour.  
Per PEP 446, dup2() still creates inheritable by-default, so the caller may 
expect that they have just assigned an inheritable fd to stdin, instead of a 
noop.
- subprocess() is called and the subprocess does not have stdin/0 fd assigned, 
since it was not inheritable.

It seems the main way to avoid this is to os.open() the replacement fd _before_ 
closing stdin/0, in which case it will receive an fd >= 3.  The dup2(fd, 0) 
call will then work and the resulting fd 0 will be inheritable, including 
by-default by subprocess() processes.

--

___
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-25 Thread Brett Randall


Brett Randall  added the comment:

docker run -i --rm python:3.9 <<-EOF

import os

print(os.get_inheritable(0))

fd_null_before_close = os.open("/dev/null", os.O_RDWR)
os.close(0)
fd_null = os.open("/dev/null", os.O_RDWR)

print(fd_null_before_close)
print(fd_null)

os.dup2(fd_null, 0)
print(os.get_inheritable(0))

os.dup2(fd_null_before_close, 0)
print(os.get_inheritable(0))

EOF
True
3
0
False
True

--

___
Python tracker 

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



[issue46510] Update Python2-style exception handling

2022-01-25 Thread Irit Katriel


Change by Irit Katriel :


--
pull_requests: +29060
pull_request: https://github.com/python/cpython/pull/30880

___
Python tracker 

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



[issue46464] concurrent.futures.ProcessPoolExecutor can deadlock when tcmalloc is used

2022-01-25 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

Indeed, it seems this should only be disabled when the "fork" model is used, 
especially as the optimization is mostly valuable when spawning a worker is 
expensive.

--
nosy: +pitrou

___
Python tracker 

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



[issue46510] Update Python2-style exception handling

2022-01-25 Thread Kumar Aditya


Change by Kumar Aditya :


--
nosy: +kumaraditya303
nosy_count: 1.0 -> 2.0
pull_requests: +29061
pull_request: https://github.com/python/cpython/pull/30881

___
Python tracker 

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



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

2022-01-25 Thread Miro Hronฤok

New submission from Miro Hronฤok :

As described at 
https://mail.python.org/archives/list/python-...@python.org/thread/MPHZ3TGSHMSF7C4P7JEP2ZCYLRA3ERC5/
 the AC_C_CHAR_UNSIGNED macro from configure.ac confuses GCC 12+ as it exports 
a reserved symbol __CHAR_UNSIGNED__ through pyconfig.h.

My assumption was that AC_C_CHAR_UNSIGNED can be dropped entirely and the PR in 
https://github.com/python/cpython/pull/30851 confirmed that all the buildbots 
are happy with such change. Hence, I open this issue to actually do it.

Thanks

--
components: Build
messages: 411575
nosy: christian.heimes, hroncok, petr.viktorin, vstinner
priority: normal
severity: normal
status: open
title: AC_C_CHAR_UNSIGNED from configure.ac confuses GCC 12+ by defining 
__CHAR_UNSIGNED__
type: compile error
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



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

2022-01-25 Thread Christian Heimes


Change by Christian Heimes :


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

___
Python tracker 

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



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

2022-01-25 Thread Christian Heimes


Christian Heimes  added the comment:

Modules/audioop.c uses __CHAR_UNSIGNED__, but the absence or presence of the 
symbol does not affect behavior:

#if defined(__CHAR_UNSIGNED__)
#if defined(signed)
/* This module currently does not work on systems where only unsigned
   characters are available.  Take it out of Setup.  Sorry. */
#endif
#endif

--

___
Python tracker 

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



[issue46514] Pathlib Path.touch() seems to ignore groups write bit for mode parameter

2022-01-25 Thread Savo Vuksan


New submission from Savo Vuksan :

The touch function of the Path Object in the Pathlib module seems to ignore the 
write bit for the second octal number for the groups permission in the mode 
parameter

In the provided script you can see that the output prints
-rwxr-xr--
but it should be
-rwxrwxr--

I use python 3.9 on a Linux machine running manjaro with following kernel: 
5.13.19-2-MANJARO

--
components: IO
files: bug.py
messages: 411577
nosy: SavoVuksan
priority: normal
severity: normal
status: open
title: Pathlib Path.touch() seems to ignore groups write bit for mode parameter
type: behavior
versions: Python 3.9
Added file: https://bugs.python.org/file50583/bug.py

___
Python tracker 

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



[issue46515] Benefits Of Phool Makhana

2022-01-25 Thread Faizan javed


New submission from Faizan javed :

Makhanas are widely cultivated throughout Asia and often used in traditional 
forms of medicine to treat various
https://www.hunzabazar.com/product/phool-makhana-price-in-pakistan/
https://www.hunzabazar.com/

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 411578
nosy: faizanjaved2021
priority: normal
severity: normal
status: open
title: Benefits Of Phool Makhana
type: behavior

___
Python tracker 

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



[issue46516] Use existing unbound_local_error label in DELETE_FAST opcode

2022-01-25 Thread Kumar Aditya


New submission from Kumar Aditya :

There was already a unbound_local_error label defined so use it in DELETE_FAST 
opcode too.

--
components: Interpreter Core
messages: 411579
nosy: Mark.Shannon, kj, kumaraditya303
priority: normal
pull_requests: 29063
severity: normal
status: open
title: Use existing unbound_local_error label in DELETE_FAST opcode
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



[issue46510] Update Python2-style exception handling

2022-01-25 Thread Irit Katriel


Irit Katriel  added the comment:

It's not my intention here to go on a search-and-destroy mission to remove all 
calls to sys.exc_info(), that would cause unnecessary code churn. I am 
reviewing them to see where the call the sys.exc_info is close to other legacy 
problems/significant complexity/missing tests.

--

___
Python tracker 

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



[issue46510] Update Python2-style exception handling

2022-01-25 Thread Kumar Aditya


Kumar Aditya  added the comment:

> It's not my intention here to go on a search-and-destroy mission to remove 
> all calls to sys.exc_info(), that would cause unnecessary code churn. I am 
> reviewing them to see where the call the sys.exc_info is close to other 
> legacy problems/significant complexity/missing tests.

That's my intention too, in argparse it was used to get the currently handled 
exception value which can be easily accessed by using "as" in exception 
handling, so it makes sense to change it, not to mention that using exc_info 
creates a temporary tuple which is of no use in this scenario.

--

___
Python tracker 

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



[issue46503] assertion failure in Parser/string_parser.c

2022-01-25 Thread Eric V. Smith


Change by Eric V. Smith :


--
pull_requests: +29064
pull_request: https://github.com/python/cpython/pull/30883

___
Python tracker 

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



[issue46420] Use NOTRACE_DISPATCH in specialized opcodes

2022-01-25 Thread Mark Shannon


New submission from Mark Shannon :


New changeset 96bf84d57a7c29544866a6c20231603049de4919 by Dennis Sweeney in 
branch 'main':
bpo-46420: Use NOTRACE_DISPATCH() in specialized opcodes (GH-30652)
https://github.com/python/cpython/commit/96bf84d57a7c29544866a6c20231603049de4919


--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue40077] Convert static types to heap types: use PyType_FromSpec()

2022-01-25 Thread Yu Zhao


Change by Yu Zhao :


--
nosy: +CharlieZhao
nosy_count: 14.0 -> 15.0
pull_requests: +29065
pull_request: https://github.com/python/cpython/pull/30884

___
Python tracker 

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



[issue46517] Review exception handling in urllib.parse

2022-01-25 Thread Irit Katriel


New submission from Irit Katriel :

Is there a reason for this raising, catching and reraising the exception here:

https://github.com/python/cpython/blob/main/Lib/urllib/parse.py#L934


rather than just:

if len(query) and not isinstance(query[0], tuple):
raise TypeError("not a valid non-string sequence "
"or mapping object")

?

--
components: Library (Lib)
messages: 411583
nosy: iritkatriel, orsenthil
priority: normal
severity: normal
status: open
title: Review exception handling in urllib.parse
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



[issue46517] Review exception handling in urllib.parse

2022-01-25 Thread Irit Katriel


Irit Katriel  added the comment:

In urllib.request, there are in a few places things like:

  except OSError as msg:
 raise OSError('socket error', msg).with_traceback(sys.exc_info()[2])


I imagine this predates chaining - is there a reason not to raise..from here 
instead of wrapping the "msg" exception (I'm guessing from the name that this 
used to be a string, but now it's actually an exception).

--

___
Python tracker 

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



[issue46518] SSL socket timeout not set after client connects via accept

2022-01-25 Thread tomazas


New submission from tomazas :

Once a client connects to a SSL server over socket accept() the newly returned 
client socket `newsock` is wrapped in SSL context.
Since the new client `newsock` does not have a socket timeout set (i.e. None), 
the final returned SSL context socket is also assigned `None` socket timeout. 
Clients are then able to connect to such server and hold the connection 
indefinitely without sending any data to server (ghosting the server 
connections).

Problematic excerpt from Lib/ssl.py:
```
def accept(self):
"""Accepts a new connection from a remote client, and returns
a tuple containing that new connection wrapped with a server-side
SSL channel, and the address of the remote client."""

newsock, addr = super().accept()
newsock = self.context.wrap_socket(newsock,
do_handshake_on_connect=self.do_handshake_on_connect,
suppress_ragged_eofs=self.suppress_ragged_eofs,
server_side=True)
return newsock, addr
```

Attached minimal https.py server Python3 example producing the issue.
After the server is working run the bellow ghost client script to produce the 
issue:

```
# Script implements ghost client (that does not send anything to server but 
keeps connection active until server socket timeouts or forever if socket 
timeouts are not working)
# Usage - after https.py server is launched run using: python3 ghost.py
import socket

sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.connect(("localhost", 443))
print("connected")

while True:
print("ghosting started")
data = sock.recv(4096) # read to block
if not data:
break
print(data)

print("done.")
```

Possible workarounds:
1. socket.setdefaulttimeout(2) - works but interferes with all possible socket 
operations 
2. Patch the socket accept() operation and set the timeout value there before 
doing any socket operations, e.g.:

```
import socket
old_accept = socket.socket.accept
def patch_accept(self):
newsock, addr = old_accept(self)
newsock.settimeout(2) # sets the client socket timeout
print("socket.accept patched")
return newsock, addr

socket.socket.accept = patch_accept

# TODO: now run all the SSL server socket code here
```

--
files: https.py
messages: 411585
nosy: tomazas
priority: normal
severity: normal
status: open
title: SSL socket timeout not set after client connects via accept
type: behavior
versions: Python 3.10, Python 3.11
Added file: https://bugs.python.org/file50584/https.py

___
Python tracker 

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



[issue46517] Review exception handling in urllib

2022-01-25 Thread Irit Katriel


Change by Irit Katriel :


--
title: Review exception handling in urllib.parse -> Review exception handling 
in urllib

___
Python tracker 

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



[issue33125] Windows 10 ARM64 platform support

2022-01-25 Thread Steve Dower


Steve Dower  added the comment:

> Our challenge with the installer is the portability of Wix Toolset. I'm 
> pretty sure our current version doesn't support ARM64, and they haven't 
> released a newer version that does yet. 

Turns out they've released some test versions that support it (partially, but 
enough), just nothing that they've declared stable. I'll push updated tools for 
3.11 so we have a chance to discover any breakage in earlier versions, but 
should be able to do ARM64 regular installer next alpha (Pablo, FYI - this will 
require updates to your side of things).

--
nosy: +pablogsal

___
Python tracker 

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



[issue46519] test_typing failing on branch 3.10

2022-01-25 Thread Matheus Castanho


New submission from Matheus Castanho :

test_typing on branch 3.10 is failing after GH-30770 [1]

test test_typing failed -- Traceback (most recent call last):
  File 
"/home/mscastanho/AT/python-next-220124/opt/at-next-16.0-0-alpha/lib64/python3.10/test/test_typing.py",
 line 3917, in setUpClass
UserId = NewType('UserId', int)
NameError: name 'NewType' is not defined

Looks like `from typing import NewType` is not needed anymore in this file on 
the main branch (where this commit originated), but still is for 3.10.

[1] https://github.com/python/cpython/pull/30770

--
components: Tests
messages: 411587
nosy: mscastanho
priority: normal
severity: normal
status: open
title: test_typing failing on branch 3.10
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



[issue46515] Benefits Of Phool Makhana

2022-01-25 Thread Matthew Barnett


Change by Matthew Barnett :


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



[issue46517] Review exception handling in urllib

2022-01-25 Thread Irit Katriel


Irit Katriel  added the comment:

Note that test.support has special handling for urllib's nested exception 
structure:

https://github.com/python/cpython/blob/3.10/Lib/test/support/socket_helper.py#L250

--

___
Python tracker 

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



[issue33125] Windows 10 ARM64 platform support

2022-01-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

No problem! What do I need to update? The script to add the binaries to the 
release page?

--

___
Python tracker 

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



[issue46396] `Concatenate` should not raise any semantic errors

2022-01-25 Thread Nikita Sobolev


Nikita Sobolev  added the comment:

I think that in case when we preserve the runtime checks, they should be 
covered by tests. Right now - they are not.

So, I will switch my PR to the initial version with a new test case.

Does this sound right? :)

--

___
Python tracker 

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



[issue45945] compileall.py throws a traceback when using -j0 and thus 'make install' locks up

2022-01-25 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> "dictionary changed size during iteration" error in 
_ExecutorManagerThread

___
Python tracker 

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



[issue46515] Benefits Of Phool Makhana

2022-01-25 Thread Eric V. Smith


Change by Eric V. Smith :


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

___
Python tracker 

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



[issue46515] SPAM

2022-01-25 Thread Eric V. Smith


Change by Eric V. Smith :


--
nosy:  -faizanjaved2021
title: Benefits Of Phool Makhana -> SPAM

___
Python tracker 

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



[issue46502] Py_CompileString no longer allows to tell "incomplete input" from "invalid input"

2022-01-25 Thread Irit Katriel


Irit Katriel  added the comment:

The python parser was completely rewritten in version 3.9, so it's likely that 
this caused changes to error messages.

Adding @pablogsal and @lys.nikolaou in case they can say more.

--
nosy: +iritkatriel, lys.nikolaou, pablogsal

___
Python tracker 

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



[issue25970] py_compile.compile fails if existing bytecode file is unwritable

2022-01-25 Thread Irit Katriel


Irit Katriel  added the comment:

It is explicitly documented that existing files are not overwritten and the 
script fails in this case, so I think this is a feature:

https://docs.python.org/3/library/py_compile.html#py_compile.compile

--
nosy: +iritkatriel
resolution:  -> rejected
status: open -> pending

___
Python tracker 

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



[issue5884] pydoc to return error status code

2022-01-25 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder:  -> pydoc should return non-zero exit code when a query is not found

___
Python tracker 

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



[issue46503] assertion failure in Parser/string_parser.c

2022-01-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Thanks for the quick fix, Eric!

--

___
Python tracker 

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



[issue31305] 'pydoc -w import' report "no Python documentation found for 'import'"

2022-01-25 Thread Irit Katriel


Irit Katriel  added the comment:

It is still relevant, but there is another issue for this: issue11831.

--
nosy: +iritkatriel
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> "pydoc -w" causes "no Python documentation found" error when 
the path is not current directory

___
Python tracker 

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



[issue11831] "pydoc -w" causes "no Python documentation found" error when the path is not current directory

2022-01-25 Thread Irit Katriel


Irit Katriel  added the comment:

Closed Issue31305 as a duplicate of this.

--
nosy: +iritkatriel
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 2.7, Python 3.2

___
Python tracker 

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



[issue46502] Py_CompileString no longer allows to tell "incomplete input" from "invalid input"

2022-01-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Indeed, these new errors are due to the new parser. Unfortunately, the new 
parser doesn't allow to check against incomplete input the way the old one did 
so that piece of documentation is unfortunately outdated.

We should remove it to avoid further confusion.

--

___
Python tracker 

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



[issue46502] Py_CompileString no longer allows to tell "incomplete input" from "invalid input"

2022-01-25 Thread Irit Katriel


Irit Katriel  added the comment:

Mateusz, would you like to submit a patch to remove this section from the faq?

--

___
Python tracker 

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



[issue46502] Py_CompileString no longer allows to tell "incomplete input" from "invalid input"

2022-01-25 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +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



[issue46491] typing: allow Annotated in outermost scope

2022-01-25 Thread miss-islington


miss-islington  added the comment:


New changeset 41e0aead3defa6d0486514e313b6975fbf375998 by Miss Islington (bot) 
in branch '3.10':
bpo-46491: Allow Annotated on outside of Final/ClassVar (GH-30864)
https://github.com/python/cpython/commit/41e0aead3defa6d0486514e313b6975fbf375998


--

___
Python tracker 

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



[issue46491] typing: allow Annotated in outermost scope

2022-01-25 Thread miss-islington


miss-islington  added the comment:


New changeset b0b8388a1c29dc9203dd1a9e8b1420a6a5e88c97 by Miss Islington (bot) 
in branch '3.9':
bpo-46491: Allow Annotated on outside of Final/ClassVar (GH-30864)
https://github.com/python/cpython/commit/b0b8388a1c29dc9203dd1a9e8b1420a6a5e88c97


--

___
Python tracker 

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



[issue46491] typing: allow Annotated in outermost scope

2022-01-25 Thread Ken Jin


Ken Jin  added the comment:

Thanks Gregory for fixing this!

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



[issue31057] pydoc for tempfile.TemporaryDirectory should say it returns the name

2022-01-25 Thread Irit Katriel


Irit Katriel  added the comment:

The OP seems to have abandoned this and all it got was a +0 for changing, so I 
suggest we close it.

--
nosy: +iritkatriel
resolution:  -> wont fix
status: open -> pending

___
Python tracker 

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



[issue46519] test_typing failing on branch 3.10

2022-01-25 Thread Ken Jin


Ken Jin  added the comment:

Thanks Matheus for the report. I can reproduce this too.

Unrelated: I'm confused why the CI checks passed on 3.10. Furthermore the 
buildbots aren't complaining.

--
nosy: +kj, sobolevn

___
Python tracker 

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



[issue33125] Windows 10 ARM64 platform support

2022-01-25 Thread Steve Dower


Steve Dower  added the comment:

Yeah, will just be the same files again but with "arm64" in place of 
"win32"/"amd64".

I'm also going to stop uploading the old webinstall files with my change here, 
though that shouldn't matter. The code we added to filter them out should 
handle them being completely absent, IIRC.

--

___
Python tracker 

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



[issue33125] Windows 10 ARM64 platform support

2022-01-25 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +29066
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/30885

___
Python tracker 

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



[issue26120] pydoc: move __future__ imports out of the DATA block

2022-01-25 Thread Irit Katriel


Irit Katriel  added the comment:

It's like this:

>>> import foo
>>> dir(foo)
['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', 
'__package__', '__spec__', 'annotations', 'x']
>>> foo.annotations
_Feature((3, 7, 0, 'beta', 1), (3, 11, 0, 'alpha', 0), 16777216)


So the attribute in foo is called annotations, i.e. it's not private.

--

___
Python tracker 

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



[issue46445] Multiple inheritance of TypedDict is not covered in `test_typing`

2022-01-25 Thread Ken Jin


Change by Ken Jin :


--
pull_requests: +29067
pull_request: https://github.com/python/cpython/pull/30886

___
Python tracker 

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



[issue46519] test_typing failing on branch 3.10

2022-01-25 Thread Ken Jin


Change by Ken Jin :


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

___
Python tracker 

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



[issue46502] Py_CompileString no longer allows to tell "incomplete input" from "invalid input"

2022-01-25 Thread Mateusz Loskot


Mateusz Loskot  added the comment:

Irit, I can and I will submit a patch.

However, I'm very keen to learn what is an alternative solution then to 
distinguish hard invalid from incomplete input. IOW, what would be the new way 
of achieving what's described in the old FAQ?

I believe it would be more useful to the community if I updated the sample in 
the FAQ instead of just removing it.

--

___
Python tracker 

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



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

2022-01-25 Thread Kodiologist

New submission from Kodiologist :

This works:

๐••๐•–๐•— = 1

This raises SyntaxError:

import ast
exec(ast.unparse(ast.parse("๐••๐•–๐•— = 1")))

It looks like `ast.parse` creates a `Name` node with `id='def'`, which is 
correct per PEP 3131, but `ast.unparse` doesn't know it needs to mangle the 
output somehow, as "๐••๐•–๐•—" or a similar Unicode replacement.

--
components: Library (Lib)
messages: 411606
nosy: Kodiologist
priority: normal
severity: normal
status: open
title: `ast.unparse` produces syntactically illegal code for identifiers that 
look like reserved words
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



[issue46519] test_typing failing on branch 3.10

2022-01-25 Thread Nikita Sobolev


Nikita Sobolev  added the comment:

One of the first things to think of: maybe `NewTypeTests` are not executed at 
all on 3.10?

--

___
Python tracker 

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



[issue46521] compile_command not raising syntax error when command ends with triple quotes

2022-01-25 Thread Tushar Sadhwani


New submission from Tushar Sadhwani :

compile_command used to raise error for this until Python 3.9:

```
>>> import code
>>> code.compile_command("abc def '''")
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.9/codeop.py", line 132, in compile_command
return _maybe_compile(_compile, source, filename, symbol)
  File "/usr/lib/python3.9/codeop.py", line 106, in _maybe_compile
raise err1
  File "/usr/lib/python3.9/codeop.py", line 93, in _maybe_compile
code1 = compiler(source + "\n", filename, symbol)
  File "/usr/lib/python3.9/codeop.py", line 111, in _compile
return compile(source, filename, symbol, PyCF_DONT_IMPLY_DEDENT)
  File "", line 1
abc def '''
^
SyntaxError: invalid syntax
```

But in Python 3.10.0 it no longer is an error:

```
>>> import code
>>> code.compile_command("abc def '''")
>>>
```

--
components: Parser
messages: 411608
nosy: lys.nikolaou, pablogsal, tusharsadhwani
priority: normal
severity: normal
status: open
title: compile_command not raising syntax error when command ends with triple 
quotes
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



[issue46502] Py_CompileString no longer allows to tell "incomplete input" from "invalid input"

2022-01-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> However, I'm very keen to learn what is an alternative solution then to 
> distinguish hard invalid from incomplete input. IOW, what would be the new 
> way of achieving what's described in the old FAQ?

Unfortunately, there is no new way to do this from C due to how the new parser 
works. The only supported way is to manually import the codeop module from C 
(https://docs.python.org/3/library/codeop.html#module-codeop) and use its API 
as IDLE does, but this API can differ and will present its own complications, 
as unfortunately is implemented in a bit hacky way.

--

___
Python tracker 

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



[issue42982] Update suggested number of iterations for pbkdf2_hmac()

2022-01-25 Thread April King


April King  added the comment:

Django probably stores and computes more passwords than every other Python 
framework combined, and it doesn't provide you any control over the number of 
iterations. And it hasn't for years. If this were truly a problem, wouldn't 
their users be complaining about it constantly?

Werkzeug was doing 150,000 iterations as of 0.15.x, released three years ago, 
and does 260,000 iterations today. Again, no complaints or issues.

In practicality, this is almost never a problem - user logins and password 
changes are extremely rare events compared to all other activity, and so the 
computation time is essentially irrelevant outside response time for that 
individual user. No matter how many users, the systems are scaling such that 
the computation time of that rare event remains a fraction of overall CPU use.

--

___
Python tracker 

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



[issue46522] concurrent.futures.__getattr__ raises the wrong AttributeError message

2022-01-25 Thread Thomas Grainger


New submission from Thomas Grainger :

>>> import types
>>> types.ModuleType("concurrent.futures").missing_attribute
Traceback (most recent call last):
  File "", line 1, in 
AttributeError: module 'concurrent.futures' has no attribute 'missing_attribute'
>>> import concurrent.futures
>>> concurrent.futures.missing_attribute
Traceback (most recent call last):
  File "", line 1, in 
  File 
"/home/graingert/miniconda3/lib/python3.9/concurrent/futures/__init__.py", line 
53, in __getattr__
raise AttributeError(f"module {__name__} has no attribute {name}")
AttributeError: module concurrent.futures has no attribute missing_attribute

--
messages: 411611
nosy: graingert
priority: normal
pull_requests: 29069
severity: normal
status: open
title: concurrent.futures.__getattr__ raises the wrong AttributeError message
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



[issue46521] compile_command not raising syntax error when command ends with triple quotes

2022-01-25 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy:  -pablogsal

___
Python tracker 

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



[issue46396] `Concatenate` should not raise any semantic errors

2022-01-25 Thread Guido van Rossum


Guido van Rossum  added the comment:

No, that would make the behavior normative.

Let sleeping dogs lie.

--
resolution:  -> wont fix
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue46519] test_typing failing on branch 3.10

2022-01-25 Thread Ken Jin


Ken Jin  added the comment:

The test correctly fails on the first run in the CI, then skips itself on the 
second run, tricking the CI into thinking everything's passed. E.g. search for 
"test_typing" here 
https://github.com/python/cpython/runs/4902363883?check_suite_focus=true.

As to why it does that, I still have no clue.

--

___
Python tracker 

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



[issue46511] dataclasses: Allow typing.Annotated to wrap dataclasses-specific annotations

2022-01-25 Thread Jelle Zijlstra


Jelle Zijlstra  added the comment:

Related: issue44799 about InitVar.

--

___
Python tracker 

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



[issue46522] concurrent.futures.__getattr__ raises the wrong AttributeError message

2022-01-25 Thread Thomas Grainger


Thomas Grainger  added the comment:

this also applies to io and _pyio

--

___
Python tracker 

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



[issue46445] Multiple inheritance of TypedDict is not covered in `test_typing`

2022-01-25 Thread Ken Jin


Ken Jin  added the comment:


New changeset 9a7d01046723a8a0a10f9a26702c5e39e73d4414 by Ken Jin in branch 
'3.10':
[3.10] bpo-46445, bpo-46519: Re-import typing.NewType (GH-30886)
https://github.com/python/cpython/commit/9a7d01046723a8a0a10f9a26702c5e39e73d4414


--

___
Python tracker 

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



[issue46519] test_typing failing on branch 3.10

2022-01-25 Thread Ken Jin


Ken Jin  added the comment:


New changeset 9a7d01046723a8a0a10f9a26702c5e39e73d4414 by Ken Jin in branch 
'3.10':
[3.10] bpo-46445, bpo-46519: Re-import typing.NewType (GH-30886)
https://github.com/python/cpython/commit/9a7d01046723a8a0a10f9a26702c5e39e73d4414


--

___
Python tracker 

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



[issue46519] test_typing failing on branch 3.10

2022-01-25 Thread Ken Jin


Change by Ken Jin :


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

___
Python tracker 

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



[issue46510] Update Python2-style exception handling

2022-01-25 Thread Irit Katriel


Irit Katriel  added the comment:


New changeset 45f5f52601ebccb195c19cb0a77beaf7f7dfa56a by Kumar Aditya in 
branch 'main':
bpo-46510: update Python2-style exception handling in argparse (GH-30881)
https://github.com/python/cpython/commit/45f5f52601ebccb195c19cb0a77beaf7f7dfa56a


--

___
Python tracker 

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



[issue46519] test_typing failing on branch 3.10

2022-01-25 Thread Nikita Sobolev


Nikita Sobolev  added the comment:

These lines seem suspicious:

```
0:09:12 load avg: 6.37 Re-running failed tests in verbose mode
0:09:12 load avg: 6.37 Re-running test_typing in verbose mode (matching: 
setUpClass)

1 re-run test:
test_typing

1 test run no tests:
test_typing
```

Probably this happens because the failure is in `setupClass` method, not in a 
test.

When it try to rerun this, it does not do anything. And happily ends the suite.

--

___
Python tracker 

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



[issue46523] Test suite skips failing tests

2022-01-25 Thread Nikita Sobolev


New submission from Nikita Sobolev :

Here's what happened. We had an error in `test_typing.py`, which was silently 
ignored.

```
 ==
ERROR: setUpClass (test.test_typing.NewTypeTests)
--
Traceback (most recent call last):
  File "D:\a\cpython\cpython\lib\test\test_typing.py", line 3917, in setUpClass
UserId = NewType('UserId', int)
NameError: name 'NewType' is not defined

--
Ran 396 tests in 0.085s

FAILED (errors=1, skipped=1)
test test_typing failed
```

Link: https://github.com/python/cpython/runs/4902363883?check_suite_focus=true

But, later the suite runner tried to rerun it:

```
0:09:12 load avg: 6.37 Re-running failed tests in verbose mode
0:09:12 load avg: 6.37 Re-running test_typing in verbose mode (matching: 
setUpClass)

1 re-run test:
test_typing

1 test run no tests:
test_typing
```

And since nothing matched `setUpClass` - no tests were executed and the CI went 
green instead of red.

What can we do?
1. Only schedule real `test_` item to be rerun, fail for everything else
2. Convert `setupClass` failure into the whole class rerun
3. Other options?

I would like to work on this, when we will decide which way is best.

--
components: Tests
messages: 411620
nosy: sobolevn
priority: normal
severity: normal
status: open
title: Test suite skips failing tests
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



[issue46519] test_typing failing on branch 3.10

2022-01-25 Thread Guido van Rossum


Guido van Rossum  added the comment:

Exactly what I just thought. A bit more research might find a buggy assumption 
in the test "framework".

--
nosy: +gvanrossum

___
Python tracker 

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



[issue46519] test_typing failing on branch 3.10

2022-01-25 Thread Nikita Sobolev


Nikita Sobolev  added the comment:

I filled a new issue: https://bugs.python.org/issue46523

--

___
Python tracker 

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



[issue42982] Update suggested number of iterations for pbkdf2_hmac()

2022-01-25 Thread Paul Kehrer


Paul Kehrer  added the comment:

NIST provides no official guidance on iteration count other than NIST SP 
800-132 Appendix A.2.2, which states "The number of iterations should be set as 
high as can be tolerated for the environment, while maintaining acceptable 
performance."

I can think of no better resource for what constitutes acceptable performance 
at the highest iteration count than popular packages like Django. Django's 
choice (and lack of evidence that they've had any cause to revert due to 
performance issues) argues that 390k iterations is a reasonable number in 2022. 
Certainly the 100k suggested in these docs as of 2013 is no longer best 
practice as we've seen 9 years of computational improvement in the intervening 
time.

I would, additionally, suggest that the documentation recommend the use of 
scrypt where possible over any iteration count of PBKDF2, but increasing the 
iteration count is still a useful improvement to the docs!

--
nosy: +reaperhulk

___
Python tracker 

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



[issue26120] pydoc: move __future__ imports out of the DATA block

2022-01-25 Thread Irit Katriel


Change by Irit Katriel :


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

___
Python tracker 

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



[issue26120] pydoc: move __future__ imports out of the DATA block

2022-01-25 Thread Irit Katriel


Change by Irit Katriel :


--
components: +Library (Lib)

___
Python tracker 

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



[issue42982] Update suggested number of iterations for pbkdf2_hmac()

2022-01-25 Thread Christian Heimes


Christian Heimes  added the comment:

You are arguing from the perspective of a Django/werkzeug developer and you are 
using experiential domain knowledge to argue for higher recommendation.

I'm asking for a scientific answer. Based on my experience 100k PBKDF2 
HMAC-SHA256 rounds is already a DoS issue for some use cases. For other uses 
cases even 500k rounds is not the right answer, because the application should 
rather use a different algorithm all together.

If you are concerned about PBKDF2's strength, then better switch to Scrypt or 
Argon2. They are better suited against GPU-based crackers. PBKDF2 is still 
required for FIPS compliance, but most people can (and should!) ignore FIPS.

--

___
Python tracker 

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



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

2022-01-25 Thread Jelle Zijlstra


Change by Jelle Zijlstra :


--
nosy: +BTaskaya, Jelle Zijlstra, benjamin.peterson, pablogsal

___
Python tracker 

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



[issue46523] Test suite skips failing tests

2022-01-25 Thread Ken Jin


Ken Jin  added the comment:

I vote for option 2.

--
nosy: +ezio.melotti, gvanrossum, kj

___
Python tracker 

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



[issue46523] Test suite skips failing tests when setUp[Class] fails

2022-01-25 Thread Ken Jin


Change by Ken Jin :


--
title: Test suite skips failing tests -> Test suite skips failing tests when 
setUp[Class] fails

___
Python tracker 

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



[issue46521] compile_command not raising syntax error when command ends with triple quotes

2022-01-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This is due to the fact that the new parser doesn't detect the syntax error of 
"abc def" after it has parsed the full text, but before that happens, the 
tokenizer has detected a problem (the ''' is not closed) and this is considered 
incomplete output for code (the same if you do code.compile_command('"""')).

Unfortunately, this is not easy to fix once we have the tokenizer error in 
place so I am afraid we probably need to close this as "won't fix", unless 
someone has a good idea on how to accommodate for this case.

--
nosy: +BTaskaya, pablogsal

___
Python tracker 

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



[issue30424] make pydoc-topics fails

2022-01-25 Thread Irit Katriel


Irit Katriel  added the comment:

We're have minimum sphinx version set to 1.8 now, so this should no longer be 
an issue.

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



[issue46497] IDLE macOS shortcut ctrl+S doesnโ€™t work for show completions

2022-01-25 Thread David Contreras


Change by David Contreras :


--
assignee:  -> terry.reedy
components: +IDLE
nosy: +terry.reedy
type:  -> behavior
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



[issue46521] compile_command not raising syntax error when command ends with triple quotes

2022-01-25 Thread Tushar Sadhwani


Tushar Sadhwani  added the comment:

wontfix would really suck, because that would mean every REPL written with the 
`code` module will be broken, even IPython:

```
$ ipython
Python 3.10.0 (default, Oct 11 2021, 05:33:59) [GCC 11.2.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.0.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: abc def '''
   ...: 
   ...: 
```

--

___
Python tracker 

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



[issue46521] compile_command not raising syntax error when command ends with triple quotes

2022-01-25 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

> wontfix would really suck, because that would mean every REPL written with 
> the `code` module will be broken, even IPython:

I understand, but I don't see a way to fix this without reverting the change to 
detect unclosed triple quites or without committing a lot of code to handle 
special cases.

Also notice that in your example with python, as soon as you close the quotes 
you get an error:

In [1]: asdf dsfsd """
   ...:
   ...:
   ...: """
  Input In [1]
asdf dsfsd """
 ^
SyntaxError: invalid syntax

So is not as dramatic as you mention when you say "every REPL written with the 
`code` module will be broken". Although I understand it depends on the optics.

--

___
Python tracker 

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



[issue46282] return value of builtins is not clearly indicated

2022-01-25 Thread James Gerity


Change by James Gerity :


--
title: print() docs do not indicate its return value -> return value of 
builtins is not clearly indicated

___
Python tracker 

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



[issue40077] Convert static types to heap types: use PyType_FromSpec()

2022-01-25 Thread STINNER Victor


STINNER Victor  added the comment:

Converting further static types to heap types require a discussion. See what 
the Python Steering Council wrote at Feb 8, 2021:

"The Steering Council discussed the ongoing work on porting types in the 
standard library to heap-types and the subinterpreter-related changes. It was 
decided that through Pablo, the Steering Council will ask the core developers 
driving those changes to create an informational PEP and not to make any more 
changes in this area after beta 1, as per our general policy."

https://github.com/python/steering-council/blob/1d85eefdc5861a096c3859e9990dbc8527c5973b/updates/2021-02-steering-council-update.md

--

___
Python tracker 

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



[issue33125] Windows 10 ARM64 platform support

2022-01-25 Thread Guido van Rossum


Change by Guido van Rossum :


--
nosy:  -Guido.van.Rossum

___
Python tracker 

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



[issue46514] Pathlib Path.touch() seems to ignore groups write bit for mode parameter

2022-01-25 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

The touch method combines the mode you specify with the active umask (set by 
os.umask()).  This is fairly standard behaviour for Unix APIs that accept a 
file mode.

This is documented at: 
https://docs.python.org/3/library/pathlib.html#pathlib.Path.touch

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



[issue46282] return value of builtins is not clearly indicated

2022-01-25 Thread ร‰ric Araujo

ร‰ric Araujo  added the comment:

The new title is puzzling; the discussion moved to advertising that all 
functions default to returning None, this is not related to the built-in status.

--

___
Python tracker 

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



[issue46521] compile_command not raising syntax error when command ends with triple quotes

2022-01-25 Thread Tushar Sadhwani


Tushar Sadhwani  added the comment:

You're right. There was another bug in my code that was causing the SyntaxError 
to not show up at all, sorry about that.

Can you help me figure out why this bug doesn't show up in the normal Python 
REPL?

```
>>> abc def '''
  File "", line 1
abc def '''
^^^
SyntaxError: invalid syntax
```

I could then use whatever logic the REPL itself uses instead of relying on 
`code.compile_command()`, because my requirement is to detect if a code can be 
incomplete Python code, without ever compiling it.

--

___
Python tracker 

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



  1   2   3   >