[issue19065] sqlite3 timestamp adapter chokes on timezones

2021-10-07 Thread Ian Fisher


Change by Ian Fisher :


--
nosy: +iafisher

___
Python tracker 

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



[issue29410] Moving to SipHash-1-3

2021-10-07 Thread Christian Heimes


Christian Heimes  added the comment:

I have contacted JP Aumasson to get his feedback on this proposal.

--

___
Python tracker 

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



[issue26651] Deprecate register_adapter() and register_converter() in sqlite3

2021-10-07 Thread Ian Fisher


Change by Ian Fisher :


--
nosy: +iafisher

___
Python tracker 

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



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

2021-10-07 Thread Alex Zaslavskis


Alex Zaslavskis  added the comment:

Beter solution . Using match in python 3.10

--
Added file: https://bugs.python.org/file50331/main.py

___
Python tracker 

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



[issue26651] Deprecate register_adapter() and register_converter() in sqlite3

2021-10-07 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

Yes, deprecating the preconfigured adapters and converters, but keeping the 
ability to register adapters/converters sounds like a very good idea to me. As 
you point out, Marc-Andre, they are application specific. Also, implementing 
converters and adapters is very trivial.

In any case, the documentation for registering converters should be improved, 
IMHO.

--
nosy: +erlendaasland

___
Python tracker 

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



[issue45402] ERROR: test_sundry (test.test_tools.test_sundry.TestSundryScripts): SystemExit: ERROR: missing _freeze_module

2021-10-07 Thread Miro Hrončok

Miro Hrončok  added the comment:

I can also reproduce this without the additional configure flags:

[cpython]$ git clean -fdx
[cpython]$ mkdir -p build/debug
[cpython]$ cd build/debug
[debug]$ ../../configure --with-pydebug
[debug]$ make
[debug]$ cd ../..
[cpython]$ build/debug/python -m test -v test_tools
...
SystemExit: ERROR: missing _freeze_module

As well as from the build dir:

[cpython]$ cd build/debug
[debug]$ ./python -m test -v test_tools
...
SystemExit: ERROR: missing _freeze_module

But when I build from the source directory directly:

[cpython]$ git clean -fdx
[cpython]$ ./configure --with-pydebug
[cpython]$ make
[cpython]$ ./python -m test -v test_tools
...
Tests result: SUCCESS

Hence, I assume the culprit is in building from a subdirectory.

--

___
Python tracker 

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



[issue29410] Moving to SipHash-1-3

2021-10-07 Thread Christian Heimes


Christian Heimes  added the comment:

> I don't quite follow. Why is it fine that you discuss DoS, but it's not
fine when others discuss DoS ?

But this BPO is not about discussing mitigations against DoS attacks in 
general. It's about adding SipHash1-3- and following the example of Rust and 
Ruby.

If you like to discuss DoS attacks on hashing of numeric types or other 
mitigations, then please do this in a dedicated ticket. I like to keep this BPO 
focused on a single topic.

--

___
Python tracker 

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



[issue45402] ERROR: test_sundry (test.test_tools.test_sundry.TestSundryScripts): SystemExit: ERROR: missing _freeze_module

2021-10-07 Thread Miro Hrončok

Miro Hrončok  added the comment:

I can reproduce this from git main branch:

$ git clean -fdx
$ mkdir -p build/debug
$ cd build/debug
$ ../../configure --with-platlibdir=lib64 --enable-shared --without-ensurepip 
--with-pydebug
$ make
$ cd ../..
$ LD_LIBRARY_PATH=$PWD/build/debug build/debug/python -m test -v test_tools

--

___
Python tracker 

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



[issue29410] Moving to SipHash-1-3

2021-10-07 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

On 07.10.2021 12:16, Christian Heimes wrote:
> 
>> That's certainly true, but at the same time, just focusing on string
> hashes only doesn't really help either, e.g. it is very easy to
> create a DoS with numeric keys or other objects which use trivial
> hashing algorithms.
> 
> Marc-Andre, Victor, your postings are off-topic. Please move your discussion 
> to a new BPO.

I don't quite follow. Why is it fine that you discuss DoS, but it's not
fine when others discuss DoS ?

You're statement comes across as an attempt to shut down a possibly
fruitful discussion. Not sure if you intended it that way.

We could open a new issue to discuss faster alternatives to siphash
and then close this one, or simply rename this issue, if it bothers you
that we're not strictly focusing on siphash 1-3 :-)

--

___
Python tracker 

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



[issue29410] Moving to SipHash-1-3

2021-10-07 Thread Christian Heimes


Christian Heimes  added the comment:

> I am not sure its worth enough. Adding algorithm increase some maintenance 
> cost... Is it really make someone happy?

siphash13 is a short function. I wrote and designed PEP 456 so we can easily 
add new hashing functions. IMHO the maintenance cost is minimal.

--

___
Python tracker 

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



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

2021-10-07 Thread Alex Zaslavskis


Alex Zaslavskis  added the comment:

That nice idea . So the dist can contain the minimal build required to say that 
is for example windows 11 . The simplest solution that came in mind is . Is far 
from perfect but it works.

--
Added file: https://bugs.python.org/file50330/main.py

___
Python tracker 

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



[issue29410] Moving to SipHash-1-3

2021-10-07 Thread Christian Heimes


Christian Heimes  added the comment:

> That's certainly true, but at the same time, just focusing on string
hashes only doesn't really help either, e.g. it is very easy to
create a DoS with numeric keys or other objects which use trivial
hashing algorithms.

Marc-Andre, Victor, your postings are off-topic. Please move your discussion to 
a new BPO.

--

___
Python tracker 

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



[issue45402] ERROR: test_sundry (test.test_tools.test_sundry.TestSundryScripts): SystemExit: ERROR: missing _freeze_module

2021-10-07 Thread Miro Hrončok

New submission from Miro Hrončok :

When we build Python 3.10.0a1 (from the git tag) in Fedora, we see:

==
ERROR: test_sundry (test.test_tools.test_sundry.TestSundryScripts)
--
Traceback (most recent call last):
  File 
"/builddir/build/BUILD/Python-3.11.0a1/Lib/test/test_tools/test_sundry.py", 
line 43, in test_sundry
import_tool(name)
^
  File "/builddir/build/BUILD/Python-3.11.0a1/Lib/test/test_tools/__init__.py", 
line 35, in import_tool
return importlib.import_module(toolname)
   ^
  File "/builddir/build/BUILD/Python-3.11.0a1/Lib/importlib/__init__.py", line 
126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
   
  File "", line 1072, in _gcd_import
  File "", line 1044, in _find_and_load
  File "", line 1015, in _find_and_load_unlocked
  File "", line 689, in _load_unlocked
  File "", line 894, in exec_module
  File "", line 241, in _call_with_frames_removed
  File "/builddir/build/BUILD/Python-3.11.0a1/Tools/scripts/freeze_modules.py", 
line 37, in 
sys.exit("ERROR: missing _freeze_module")
^
SystemExit: ERROR: missing _freeze_module

--
Ran 3 tests in 0.209s


I see in the build log we use Programs/_freeze_module regularly in the build 
process, so no idea why this fails. I'll try to come up with a reporducer.

--
components: Tests
messages: 403377
nosy: hroncok, pablogsal, vstinner
priority: normal
severity: normal
status: open
title: ERROR: test_sundry (test.test_tools.test_sundry.TestSundryScripts): 
SystemExit: ERROR: missing _freeze_module
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



[issue45400] test_name_error_suggestions_do_not_trigger_for_too_many_locals: AssertionError: 'a1' unexpectedly found in Traceback

2021-10-07 Thread Miro Hrončok

Change by Miro Hrončok :


--
components: +Tests

___
Python tracker 

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



[issue29410] Moving to SipHash-1-3

2021-10-07 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

On 07.10.2021 11:49, Inada Naoki wrote:
> Hash DoS is not only for HTTP headers. Everywhere creating dict from 
> untrusted source can be attack vector.
> For example, many API servers receive JSON as HTTP request body. Limiting 
> HTTP header don't protect it.

That's certainly true, but at the same time, just focusing on string
hashes only doesn't really help either, e.g. it is very easy to
create a DoS with numeric keys or other objects which use trivial
hashing algorithms.

I wouldn't focus too much on this at the Python core level.
Server implementations have other ways to protect themselves against
DoS, e.g. by monitoring process memory, CPU load or runtime, applying
limits on incoming data.

IMO, it's much better to use application and use case specific methods
for this, than trying to fix basic data types in Python to address
the issue and making all Python application suffer as a result.

--

___
Python tracker 

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



[issue29410] Moving to SipHash-1-3

2021-10-07 Thread Inada Naoki


Inada Naoki  added the comment:

> I recommend that you add SipHash-1-3 as an additional algorithm and make it 
> the default. The removal of --with-hash-algorithm=siphash24 should go through 
> regular deprecation cycle of two Python versions.

I am not sure its worth enough. Adding algorithm increase some maintenance 
cost... Is it really make someone happy?

--

___
Python tracker 

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



[issue45398] Bugs in set operations in 3.8.10 (detected in Win7)

2021-10-07 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +rhettinger

___
Python tracker 

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



[issue45400] test_name_error_suggestions_do_not_trigger_for_too_many_locals: AssertionError: 'a1' unexpectedly found in Traceback

2021-10-07 Thread Miro Hrončok

Miro Hrončok  added the comment:

I see this was previously added to 3.10 beta, so this never triggered. The test 
only fails when building from a directory that contains the full Python version.

--

___
Python tracker 

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



[issue29410] Moving to SipHash-1-3

2021-10-07 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

Since the days this was discussed, a lot of new and faster hash algorithms have 
been developed. It may be worthwhile looking at those instead.

E.g. xxHash is a lot more performant than siphash: 
https://github.com/Cyan4973/xxHash (the link also has a comparison of hash 
algorithms)

--

___
Python tracker 

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



[issue29410] Moving to SipHash-1-3

2021-10-07 Thread Inada Naoki


Inada Naoki  added the comment:

> I know that it's not a popular opinion, but I don't think that this denial of 
> service (DoS) is important. IMO there are enough other ways to crash a 
> server. Moreover, the initial attack vector was a HTTP request with tons of 
> header lines. In the meanwhile, the Python http module was modified to put 
> arbitrary limits on the number of HTTP headers and the maximum length of a 
> single HTTP header.


Hash DoS is not only for HTTP headers. Everywhere creating dict from untrusted 
source can be attack vector.
For example, many API servers receive JSON as HTTP request body. Limiting HTTP 
header don't protect it.

--

___
Python tracker 

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



[issue45400] test_name_error_suggestions_do_not_trigger_for_too_many_locals: AssertionError: 'a1' unexpectedly found in Traceback

2021-10-07 Thread Miro Hrončok

New submission from Miro Hrončok :

The test_name_error_suggestions_do_not_trigger_for_too_many_locals test fails 
with the to-be-released 3.11.0a1:

==
FAIL: test_name_error_suggestions_do_not_trigger_for_too_many_locals 
(test.test_exceptions.NameErrorTests)
--
Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-3.11.0a1/Lib/test/test_exceptions.py", 
line 1843, in test_name_error_suggestions_do_not_trigger_for_too_many_locals
self.assertNotIn("a1", err.getvalue())
^^
AssertionError: 'a1' unexpectedly found in 'Traceback (most recent call 
last):\n  File 
"/builddir/build/BUILD/Python-3.11.0a1/Lib/test/test_exceptions.py", line 1838, 
in test_name_error_suggestions_do_not_trigger_for_too_many_locals\nf()\n
^^^\n  File 
"/builddir/build/BUILD/Python-3.11.0a1/Lib/test/test_exceptions.py", line 1835, 
in f\nprint(a0)\n  ^^\nNameError: name \'a0\' is not defined\n'

--
Ran 1 test in 0.016s


I believe it is the version string that triggers this failure.

--
messages: 403370
nosy: hroncok, pablogsal, vstinner
priority: normal
severity: normal
status: open
title: test_name_error_suggestions_do_not_trigger_for_too_many_locals: 
AssertionError: 'a1' unexpectedly found in Traceback
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



[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-07 Thread STINNER Victor


New submission from STINNER Victor :

One way to disable logging in a configuration file is to use /dev/null as the 
filename for logs. It is fine to use that with FileHandler.

The problem is when TimedRotatingFileHandler is used. When Python decides to 
rotate the "file", it calls os.rename() on /dev/null *device* and create a new 
/dev/null *file* which will be quickly filled by all applications on the system 
writing into /dev/null.

The problem is only possible if the process is allowed to rename the device 
/dev/null. For example, a regular user gets a permission error.

I see different options:

* TimedRotatingFileHandler should disable rotation if it detects that the file 
is a device (not a regular file)
* logging should switch to NullHandler if filename is equal to os.path.devnull.

I guess that the problem is the same if the filename points to a socket or a 
named pipe.


RotatingFileHandler may also be affected, I didn't check.


... I'm quite sure that I had the same issue with Twisted years ago, but I 
don't recall the details :-) Twisted didn't use the logging module if I recall 
correctly.


RHEL downstream issue: https://bugzilla.redhat.com/show_bug.cgi?id=2009200

--
components: Library (Lib)
messages: 403371
nosy: vinay.sajip, vstinner
priority: normal
severity: normal
status: open
title: logging TimedRotatingFileHandler must not rename devices like /dev/null
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



[issue45398] Bugs in set operations in 3.8.10 (detected in Win7)

2021-10-07 Thread Алексей

Алексей  added the comment:

In 3.8.9 version (in Win7 too) the bug is not reproduced!

--

___
Python tracker 

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



[issue45399] Remove hostflags from PySSLContext

2021-10-07 Thread ramikg


New submission from ramikg :

The PySSLContext struct mentions that "OpenSSL has no API to get hostflags from 
X509_VERIFY_PARAM* struct. We have to maintain our own copy".
Since OpenSSL 1.1.0i added the function X509_VERIFY_PARAM_get_hostflags, this 
statement is no longer true.
Because Python 3.10 requires OpenSSL 1.1.1 (PEP 644), we no longer have to 
maintain a copy of the host flags.

The related PR removes the hostflags member from the PySSLContext struct.

--
assignee: christian.heimes
components: SSL
messages: 403368
nosy: christian.heimes, ramikg
priority: normal
pull_requests: 27117
severity: normal
status: open
title: Remove hostflags from PySSLContext
type: enhancement
versions: Python 3.10, Python 3.11

___
Python tracker 

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



[issue29410] Moving to SipHash-1-3

2021-10-07 Thread Christian Heimes


Christian Heimes  added the comment:

I recommend that you add SipHash-1-3 as an additional algorithm and make it the 
default. The removal of --with-hash-algorithm=siphash24 should go through 
regular deprecation cycle of two Python versions.

--

___
Python tracker 

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



[issue43669] PEP 644: Require OpenSSL 1.1.1 or newer

2021-10-07 Thread ramikg


Change by ramikg :


--
nosy: +ramikg
nosy_count: 4.0 -> 5.0
pull_requests: +27116
pull_request: https://github.com/python/cpython/pull/28602

___
Python tracker 

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



[issue45041] [sqlite3] simplify executescript()

2021-10-07 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 3f2c433da560d7999a52f9fcba4bbd0898848520 by Erlend Egeberg 
Aasland in branch 'main':
bpo-45041: Restore `sqlite3` executescript behaviour for `SELECT` queries 
(GH-28509)
https://github.com/python/cpython/commit/3f2c433da560d7999a52f9fcba4bbd0898848520


--

___
Python tracker 

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



[issue29410] Moving to SipHash-1-3

2021-10-07 Thread Christian Heimes


Christian Heimes  added the comment:

I support this change, too.

SipHash-1-3 is more than good enough for our use case. It provides sufficient 
diffusion of str and bytes hashes and has sufficient reliance against timing 
attacks on the PRF key.

Also 64bit platforms are less affected less by hash collision DoS attacks 
anyway. The issue was far greater on 32bit systems. Nowadays virtually all 
production systems are 64bit.

--

___
Python tracker 

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



[issue29410] Moving to SipHash-1-3

2021-10-07 Thread STINNER Victor


STINNER Victor  added the comment:

"1.67 us +- 0.03 us: 1.78x faster" with a bytes string of 6k bytes sounds worth 
it to me.

When we talk about "security" here, we are talking about a denial of service 
attack on the dict worst case performance:
https://python-security.readthedocs.io/vuln/hash-dos.html

I know that it's not a popular opinion, but I don't think that this denial of 
service (DoS) is important. IMO there are enough other ways to crash a server. 
Moreover, the initial attack vector was a HTTP request with tons of header 
lines. In the meanwhile, the Python http module was modified to put arbitrary 
limits on the number of HTTP headers and the maximum length of a single HTTP 
header.

It's nice to limit the risk of a DoS, but I don't think that we should go too 
far. If it worked for Rust and Ruby, SipHash-1-3 should be good as well for 
Python.

I expect even more interesting speedup with bytes string longer than 6k bytes. 
And I'm quite sure that it's common that people manipulates long strings in 
Python :-)

I retarget this change to Python 3.11. Please don't backport it since it 
changes the Python build system (configure options).

--
versions: +Python 3.11 -Python 3.7

___
Python tracker 

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



[issue29410] Moving to SipHash-1-3

2021-10-07 Thread Mark Shannon


Mark Shannon  added the comment:

Yes, this is worth doing, IMO.

It adds no more code and probably reduces maintenance costs as any 
improvements/bug-fixes to the rust/ruby versions can be easily ported.

Even if the benefit is small, the cost is basically zero.

--
nosy: +Mark.Shannon

___
Python tracker 

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



[issue45398] Bugs in set operations in 3.8.10 (detected in Win7)

2021-10-07 Thread Алексей

New submission from Алексей :

x = set('abcde')
y = set('bdxyz')

x | y
result:
 {'b', 'c', 'd', 'z', 'x', 'a', 'y'}
but should be:
 {'b', 'c', 'd', 'z', 'x', 'a', 'y', 'e'}

--
messages: 403362
nosy: bfx683
priority: normal
severity: normal
status: open
title: Bugs in set operations in 3.8.10 (detected in Win7)
type: behavior
versions: Python 3.8

___
Python tracker 

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



[issue31399] Let OpenSSL verify hostname and IP address

2021-10-07 Thread ramikg


Change by ramikg :


--
nosy: +ramikg
nosy_count: 4.0 -> 5.0
pull_requests: +27115
pull_request: https://github.com/python/cpython/pull/28602

___
Python tracker 

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



[issue29410] Moving to SipHash-1-3

2021-10-07 Thread Inada Naoki


Inada Naoki  added the comment:

I am not sure this is worth doing.

Microbenchmarks:

## import time

```
$ main/opt/bin/pyperf command main/opt/bin/python3 -c 'import typing,asyncio'
.
command: Mean +- std dev: 49.6 ms +- 0.1 ms

$ siphash13/opt/bin/pyperf command siphash13/opt/bin/python3 -c 'import 
typing,asyncio'
.
command: Mean +- std dev: 49.3 ms +- 0.1 ms
```

0.6% faster.

## hash(s+'a')

```
# 6+1
$ siphash13/opt/bin/pyperf timeit --compare-to main/opt/bin/python3 
--python-names siphash24:siphash13 -s 'b=b"x"*6' -- 'hash(b+b"a")'
siphash24: . 87.7 ns +- 2.8 ns
siphash13: . 84.8 ns +- 1.6 ns

Mean +- std dev: [siphash24] 87.7 ns +- 2.8 ns -> [siphash13] 84.8 ns +- 1.6 
ns: 1.03x faster

# 6000+1
$ siphash13/opt/bin/pyperf timeit --compare-to main/opt/bin/python3 
--python-names siphash24:siphash13 -s 'b=b"x"*6000' -- 'hash(b+b"a")'
siphash24: . 2.98 us +- 0.03 us
siphash13: . 1.67 us +- 0.03 us

Mean +- std dev: [siphash24] 2.98 us +- 0.03 us -> [siphash13] 1.67 us +- 0.03 
us: 1.78x faster
```

--

___
Python tracker 

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



[issue45390] asyncio.Task doesn't propagate CancelledError() exception correctly.

2021-10-07 Thread Thomas Grainger


Thomas Grainger  added the comment:

afaik this is intentional https://bugs.python.org/issue31033

--
nosy: +graingert

___
Python tracker 

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



[issue31155] Encode set, frozenset, bytearray, and iterators as json arrays

2021-10-07 Thread sedrubal


Change by sedrubal :


--
nosy: +sedrubal

___
Python tracker 

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



[issue44603] REPL: exit when the user types exit instead of asking them to explicitly type exit()

2021-10-07 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Steven's list left out the standard way of closing *any* windowed app -- click 
the close button on the title bar.  Works on all major systems.

Its does a little too much when python is started on a command line (by closing 
the console), but beginners, at least on Windows, usually click an icon to 
start Python.

--

___
Python tracker 

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



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

2021-10-07 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

It's probably time to extend the marketing version detection mechanism to use
the build number as reference instead of the major.minor system version numbers.

Here's a good reference for this:

https://en.wikipedia.org/wiki/List_of_Microsoft_Windows_versions

MS resources:

https://docs.microsoft.com/en-us/windows/win32/sysinfo/operating-system-version
https://docs.microsoft.com/en-us/windows/release-health/release-information

--

___
Python tracker 

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



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

2021-10-07 Thread Alex Zaslavskis


Alex Zaslavskis  added the comment:

systeminfo can be option

--
Added file: https://bugs.python.org/file50329/import subprocess.py

___
Python tracker 

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



[issue26651] Deprecate register_adapter() and register_converter() in sqlite3

2021-10-07 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

FWIW: I'm -1 on removing the possibility to register conversion or adapter 
hooks in sqlite3. Such mechanisms have become a standard with Python database 
modules and are widely used to adapt them to applications or middleware using 
the modules.

The database module defaults don't always work well everywhere and there needs 
to be an efficient way to modify this behavior. Fixing all input to .execute() 
et al. and all output from .fetch*() is not efficient.

I'd suggest to close this as rejected. The deprecation won't do anyone good.

Related to the few such implementations in dbapi2.py of sqlite2, which I 
believe triggered this issue:

Those are not necessarily ideal, since they don't handle all possible cases.

The adapters (conversion from Python data type to SQLite data type) are always 
used, but the converters (conversion from SQLite data type to Python type) are 
not, since those rely on SQLite providing type information, which it only does 
if you pass in detect_types to the .connect() method. Many people don't notice 
the missing time offset support in the converters due to this (sqlite3 returns 
strings instead).

Modifying those preconfigured adapters / converters would need to be a separate 
issue, though. E.g. deprecating the date/timestamp converters would be a way 
forward, since applications will know better what to do in their particular use 
case. Such a deprecation would have to take a longer while, though, for the 
reasons stated by Raymond.

--
nosy: +lemburg

___
Python tracker 

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



[issue45385] Fix reference leak from descr_check

2021-10-07 Thread Dong-hee Na


Dong-hee Na  added the comment:


New changeset 35d4857375b6ef8f1243db4da9c2cba0bee63ad6 by Miss Islington (bot) 
in branch '3.10':
bpo-45385: Fix reference leak from descr_check (GH-28719) (GH-28779)
https://github.com/python/cpython/commit/35d4857375b6ef8f1243db4da9c2cba0bee63ad6


--

___
Python tracker 

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



[issue45335] Default TIMESTAMP converter in sqlite3 ignores UTC offset

2021-10-07 Thread Erlend E. Aasland


Erlend E. Aasland  added the comment:

See also:

- bpo-19065: sqlite3 timestamp adapter chokes on timezones
- bpo-26651 Deprecate register_adapter() and register_converter() in sqlite3


(Adding Berker to nosy list.)

--
nosy: +berker.peksag

___
Python tracker 

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



[issue45395] Frozen stdlib modules are discarded if custom frozen modules added.

2021-10-07 Thread Marc-Andre Lemburg


Marc-Andre Lemburg  added the comment:

I'm not sure I follow, but in any case, please make sure that
the freeze tool in Tools/ continues to work with the new mechanism.

The freeze tool would also need to know which modules are already
frozen via the new script, so that modules don't get included twice.

--

___
Python tracker 

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



[issue45397] Doc for turtle.write missing the tuple part of the font param in 3.10+

2021-10-07 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Seems it was fixed in Sphinx a year ago: 
https://github.com/sphinx-doc/sphinx/pull/8265. Maybe we need to update the 
Sphinx version (but it can introduce new incompatibilities).

--

___
Python tracker 

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



[issue45390] asyncio.Task doesn't propagate CancelledError() exception correctly.

2021-10-07 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

> But, once the asyncio.Task is cancelled, is impossible to retrieve that 
> original asyncio.CancelledError(msg) exception with the message, because it 
> seems that *a new* asyncio.CancelledError() [without the message] is raised 
> when asyncio.Task.result() or asyncio.Task.exception() methods are called.

You say it's "impossible", but isn't the message accessible via the exception 
chain (and visible in the traceback)? One benefit of not duplicating the 
message on the internal call to cancel() is that it makes it easier to pinpoint 
which CancelledError object is associated with the user's call to cancel(), and 
which is associated with the call done by asyncio internals, which is a 
different cancellation. Another benefit is that it prevents info from being 
duplicated in the traceback.

--
nosy: +chris.jerdonek

___
Python tracker 

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



[issue45397] Doc for turtle.write missing the tuple part of the font param in 3.10+

2021-10-07 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

This looks like some Sphinx bug.

In Python 3.8, using Sphinx:

>>> from sphinx.pycode import ast
>>> ast.unparse(ast.parse("('Arial', 8, 'normal')", 'eval').body)
"'Arial', 8, 'normal'"

For comparison, using builtin ast module in Python 3.9:

>>> import ast
>>> ast.unparse(ast.parse("('Arial', 8, 'normal')", 'eval').body)
"('Arial', 8, 'normal')"

--
nosy: +georg.brandl, serhiy.storchaka
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



<    1   2