[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-06 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 489c36920e94bfb4988b6f965bd0aafdfaff0d4f by Inada Naoki in branch 
'master':
bpo-43651: PEP 597: Fix pdeps used locale encoding (GH-25204)
https://github.com/python/cpython/commit/489c36920e94bfb4988b6f965bd0aafdfaff0d4f


--

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-05 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +23943
pull_request: https://github.com/python/cpython/pull/25204

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-05 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 4663e5f39e9f872dcd69545f293e832d5855d084 by Inada Naoki in branch 
'master':
bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25190)
https://github.com/python/cpython/commit/4663e5f39e9f872dcd69545f293e832d5855d084


--

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



[issue43510] PEP 597: Implemente encoding="locale" option and EncodingWarning

2021-04-05 Thread Inada Naoki


Change by Inada Naoki :


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

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-05 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset fb78692f2ad5ee4747f13a73943fbf134b637669 by Inada Naoki in branch 
'master':
bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25189)
https://github.com/python/cpython/commit/fb78692f2ad5ee4747f13a73943fbf134b637669


--

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-05 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 3d4af4a876e679431c6a3751667ded63cc6f66c1 by Inada Naoki in branch 
'master':
bpo-43651: Fix EncodingWarning in sysconfig (GH-25192)
https://github.com/python/cpython/commit/3d4af4a876e679431c6a3751667ded63cc6f66c1


--

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-05 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +23934
pull_request: https://github.com/python/cpython/pull/25192

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



[issue43735] PEP 597: os.popen() and pipes uses locale encoding

2021-04-05 Thread Inada Naoki


Change by Inada Naoki :


--
title: os.popen() and pipes uses locale encoding -> PEP 597: os.popen() and 
pipes uses locale encoding

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



[issue43735] os.popen() and pipes uses locale encoding

2021-04-05 Thread Inada Naoki


New submission from Inada Naoki :

os.popen() and pipes module doesn't have `encoding` parameter. They use the 
default (locale) encoding implicitly.

As PEP 597, subprocess module won't emit EncodingWarning for PIPEs in Python 
3.10.
Like that, we should just add `encoding=None` parameter but don't emit  
EncodingWarning.

--
components: Library (Lib)
messages: 390234
nosy: methane
priority: normal
severity: normal
status: open
title: os.popen() and pipes uses locale encoding
versions: Python 3.10

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



[issue43734] PEP 597: pdb uses locale encoding for pdbrc file

2021-04-05 Thread Inada Naoki


New submission from Inada Naoki :

I think we should use UTF-8 for pdbrc files because the default encoding of 
Python source files is UTF-8.

--
components: Library (Lib)
messages: 390233
nosy: methane
priority: normal
severity: normal
status: open
title: PEP 597: pdb uses locale encoding for pdbrc file
versions: Python 3.10

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



[issue43733] PEP 597: netrc uses locale encoding.

2021-04-05 Thread Inada Naoki


New submission from Inada Naoki :

https://github.com/python/cpython/blob/c8e5eb904e12010d2302364e1037c24a30f5e241/Lib/netrc.py#L29

Can we change the encoding="utf-8" and errors="replace"?

IMHO, comments are source of UnicodeDecodeError. So we can open file with 
binary mode and skip comments without decoding it.
But we need to decode non-comment lines lines with some encoding anyway.

--
components: Library (Lib)
messages: 390232
nosy: methane
priority: normal
severity: normal
status: open
title: PEP 597: netrc uses locale encoding.
versions: Python 3.10

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



[issue43732] PEP 597: mailcap uses locale encoding

2021-04-05 Thread Inada Naoki


New submission from Inada Naoki :

mailcap.getcaps() uses locale encoding.
https://github.com/python/cpython/blob/c8e5eb904e12010d2302364e1037c24a30f5e241/Lib/mailcap.py#L33

As my understanding, RFC 1524 uses only ASCII characters.
Can we change the encoding to ASCII or UTF-8?

--
components: Library (Lib)
messages: 390231
nosy: methane
priority: normal
severity: normal
status: open
title: PEP 597: mailcap uses locale encoding
versions: Python 3.10

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-05 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +23932
pull_request: https://github.com/python/cpython/pull/25190

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



[issue43731] PEP 597: logging.basicConfig() uses locale encoding.

2021-04-04 Thread Inada Naoki


New submission from Inada Naoki :

logging.basicConfig() uses locale encoding when reading config file.

We need to add `encoding=None` parameter and 
`encoding=io.text_encoding(encoding)` in it.

--
components: Library (Lib)
messages: 390223
nosy: methane
priority: normal
severity: normal
status: open
title: PEP 597: logging.basicConfig() uses locale encoding.
versions: Python 3.10

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-04 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +23931
pull_request: https://github.com/python/cpython/pull/25189

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-04 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset c8e5eb904e12010d2302364e1037c24a30f5e241 by Inada Naoki in branch 
'master':
bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25181)
https://github.com/python/cpython/commit/c8e5eb904e12010d2302364e1037c24a30f5e241


--

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-04 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset ee952b5c7355cb64179ca9bb77b13e7738132d3d by Inada Naoki in branch 
'master':
bpo-43651: PEP 597: Fix EncodingWarning in test_filecmp (GH-25159)
https://github.com/python/cpython/commit/ee952b5c7355cb64179ca9bb77b13e7738132d3d


--

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-04 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset de522a89e42a35da9275169b113460c3581e32d7 by Inada Naoki in branch 
'master':
bpo-43651: PEP 597: Fix test_email (GH-25158)
https://github.com/python/cpython/commit/de522a89e42a35da9275169b113460c3581e32d7


--

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-04 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +23923
pull_request: https://github.com/python/cpython/pull/25181

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-04 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 3caea9adda7f79ab5d4c5a1905ca62b44e0b3b7b by Inada Naoki in branch 
'master':
bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25171)
https://github.com/python/cpython/commit/3caea9adda7f79ab5d4c5a1905ca62b44e0b3b7b


--

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



[issue43722] PEP 597: FileCookieJar uses locale encoding

2021-04-03 Thread Inada Naoki


New submission from Inada Naoki :

During fixing EncodingWarning in stdlibs, I found FileCookieJar, LWPCookieJar, 
and MozillaCookieJar use locale encoding for cookie files.

I don't know much about cookie file format. If locale encoding is right 
encoding, we can just use `encoding="locale"` since Python 3.10.

Or cookie files should be encoded in UTF-8, or latin-1?

--
components: Library (Lib)
messages: 390160
nosy: methane
priority: normal
severity: normal
status: open
title: PEP 597: FileCookieJar uses locale encoding
versions: Python 3.10

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-03 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +23912
pull_request: https://github.com/python/cpython/pull/25171

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-03 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 35715d1e72b7e15e337087863c75af447199e0fb by Inada Naoki in branch 
'master':
bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25145)
https://github.com/python/cpython/commit/35715d1e72b7e15e337087863c75af447199e0fb


--

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



[issue41139] cgi uses the locale encoding for log files

2021-04-03 Thread Inada Naoki


Inada Naoki  added the comment:

+1 for removing.
But let's emit DeprecationWarning for now, and remove it later.

--
components: +Library (Lib)
versions:  -Python 3.8, Python 3.9

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



[issue41139] cgi uses the locale encoding for log files

2021-04-03 Thread Inada Naoki


Change by Inada Naoki :


--
nosy: +methane

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



[issue43712] PEP 597: fileinput uses locale encoding

2021-04-03 Thread Inada Naoki


New submission from Inada Naoki :

fileinput.input() and fileinput.FileInput() don't have `encoding` parameter.

User can specify encoding by `openhook=hook_encoded("utf-8")`. But we can not 
utilize PEP 597, and `encoding="utf-8"` is more user friendly.

Additionally, `hook_compressed` doesn't have the encoding parameter. User need 
to use binary mode or locale encoding.

--
components: Library (Lib)
messages: 390121
nosy: methane
priority: normal
severity: normal
status: open
title: PEP 597: fileinput uses locale encoding
versions: Python 3.10

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



[issue43711] cgi.log() uses locale encoding

2021-04-03 Thread Inada Naoki


Change by Inada Naoki :


--
title: cgi.log() uses default encoding -> cgi.log() uses locale encoding

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



[issue43711] cgi.log() uses default encoding

2021-04-03 Thread Inada Naoki

New submission from Inada Naoki :

See cgi.initlog():
https://github.com/python/cpython/blob/b2a91e0c9ee18b50cc86b21211c2258520a9f5d0/Lib/cgi.py#L82

```
logfp = open(logfile, "a")
```

This feature is not documented but can be used like this.

```
import cgi
cgi.logfile="myapp.log"
cgi.log("こんにちは")
```

I want to change log file encoding to UTF-8. Although this is backward 
incompatible change, it unlikely break user application because it just change 
the logfile encoding.

UTF-8 is safer than locale encoding because UTF-8 supports all valid Unicode 
strings.

--
components: Library (Lib)
messages: 390120
nosy: methane
priority: normal
severity: normal
status: open
title: cgi.log() uses default encoding
versions: Python 3.10

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-03 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +23906
pull_request: https://github.com/python/cpython/pull/25159

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-03 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +23905
pull_request: https://github.com/python/cpython/pull/25158

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



[issue43510] PEP 597: Implemente encoding="locale" option and EncodingWarning

2021-04-02 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset bec8c787ec72d73b39011bde3f3a93e9bb1174b7 by Inada Naoki in branch 
'master':
bpo-43510: Fix emitting EncodingWarning from _io module. (GH-25146)
https://github.com/python/cpython/commit/bec8c787ec72d73b39011bde3f3a93e9bb1174b7


--

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



[issue43510] PEP 597: Implemente encoding="locale" option and EncodingWarning

2021-04-02 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +23893
pull_request: https://github.com/python/cpython/pull/25146

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-01 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +23892
pull_request: https://github.com/python/cpython/pull/25145

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-01 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 8bbfeb3330c10d52274bb85fce59ae614f0500bf by Inada Naoki in branch 
'master':
bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25142)
https://github.com/python/cpython/commit/8bbfeb3330c10d52274bb85fce59ae614f0500bf


--

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-01 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +23889
pull_request: https://github.com/python/cpython/pull/25142

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-01 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 80017752ba938852d53f9d83a404b4ecd9ff2baa by Inada Naoki in branch 
'master':
bpo-43651: Fix test_compileall with PEP 597 (GH-25128)
https://github.com/python/cpython/commit/80017752ba938852d53f9d83a404b4ecd9ff2baa


--

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-01 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset c0ec4486dc7dd70fea39d1473ac9a9ac568378fe by Inada Naoki in branch 
'master':
bpo-43651: Fix EncodingWarning in lib2to3/pgen2/pgen.py (GH-25127)
https://github.com/python/cpython/commit/c0ec4486dc7dd70fea39d1473ac9a9ac568378fe


--

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-04-01 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 036fc7de24cc961d65b60fba266104009feb2797 by Inada Naoki in branch 
'master':
bpo-43651: Fix EncodingWarning in test_warnings (GH-25126)
https://github.com/python/cpython/commit/036fc7de24cc961d65b60fba266104009feb2797


--

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



[issue43670] Typo in 3.10 changelog

2021-04-01 Thread Inada Naoki


Inada Naoki  added the comment:

Thank you for reporting. This typo is fixed in GH-43574.

--
nosy: +methane
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-03-31 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +23875
pull_request: https://github.com/python/cpython/pull/25128

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-03-31 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +23874
pull_request: https://github.com/python/cpython/pull/25127

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-03-31 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +23873
pull_request: https://github.com/python/cpython/pull/25126

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-03-31 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 58cffba1874f0e9a9731b25a3e11a011bfbbf95f by Inada Naoki in branch 
'master':
bpo-43651: Fix EncodingWarning in test_io (GH-25097)
https://github.com/python/cpython/commit/58cffba1874f0e9a9731b25a3e11a011bfbbf95f


--

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-03-31 Thread Inada Naoki


New submission from Inada Naoki :


New changeset 55f31be44b7e3ee24a67134f99543512a9b630e4 by Inada Naoki in branch 
'master':
bpo-43651: Fix EncodingWarning in test_file and test_file_eintr (GH-25109)
https://github.com/python/cpython/commit/55f31be44b7e3ee24a67134f99543512a9b630e4


--

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



Re: memory consumption

2021-03-31 Thread Inada Naoki
> ** Before first run:
> # arenas allocated total   =  776
> # arenas reclaimed =  542
> # arenas highwater mark=  234
> # arenas allocated current =  234
> 234 arenas * 262144 bytes/arena=   61,341,696
> ** After first run:
> # arenas allocated total   =   47,669
> # arenas reclaimed =   47,316
> # arenas highwater mark=   10,114
> # arenas allocated current =  353
> 353 arenas * 262144 bytes/arena=   92,536,832
>  ** After second run:
> # arenas allocated total   =   63,635
> # arenas reclaimed =   63,238
> # arenas highwater mark=   10,114
> # arenas allocated current =  397
> 397 arenas * 262144 bytes/arena=  104,071,168


OK, memory allocated by obmalloc is 61MB -> 92MB -> 104MB.

Memory usage increasing, but it is much smaller than 1GB. 90% memory
is allocated by malloc().

You should try jemalloc. Trying jemalloc is not hard. You don't need
to rebuild Python.
Google " jemalloc LD_PRELOAD".


-- 
Inada Naoki  
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue43510] PEP 597: Implemente encoding="locale" option and EncodingWarning

2021-03-31 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset cfa176685a5e788bafc7749d7a93f43ea3e4de9f by Inada Naoki in branch 
'master':
Revert "bpo-43510: PEP 597: Accept `encoding="locale"` in binary mode 
(GH-25103)" (#25108)
https://github.com/python/cpython/commit/cfa176685a5e788bafc7749d7a93f43ea3e4de9f


--

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-03-31 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +23853
pull_request: https://github.com/python/cpython/pull/25109

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



[issue43510] PEP 597: Implemente encoding="locale" option and EncodingWarning

2021-03-31 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +23852
pull_request: https://github.com/python/cpython/pull/25108

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



[issue43510] PEP 597: Implemente encoding="locale" option and EncodingWarning

2021-03-31 Thread Inada Naoki


Inada Naoki  added the comment:

I'm sorry, I was wrong. Allowing `encoding="locale"` didn't help OpenWrapper. 
See GH-25107.

If we use `encoding = text_encoding(encoding)` in binary mode, `open(filename, 
"rb")` will be warned. This doesn't make sense at all.

Adding `mode` parameter to the `text_encoding()` doesn't make sense too. 
Because it is used for functions wrapping not only open(), but also 
TextIOWrapper().

So we must not call `text_encoding()` in binary mode. Allowing 
`encoding="locale"` in binary mode doesn't make it easy. I will revert GH-25103.

--

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



[issue43510] PEP 597: Implemente encoding="locale" option and EncodingWarning

2021-03-30 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +23851
pull_request: https://github.com/python/cpython/pull/25107

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



[issue43510] PEP 597: Implemente encoding="locale" option and EncodingWarning

2021-03-30 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset ff3c9739bd69aa8b58007e63c9e40e6708b4761e by Inada Naoki in branch 
'master':
bpo-43510: PEP 597: Accept `encoding="locale"` in binary mode (GH-25103)
https://github.com/python/cpython/commit/ff3c9739bd69aa8b58007e63c9e40e6708b4761e


--

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



[issue43510] PEP 597: Implemente encoding="locale" option and EncodingWarning

2021-03-30 Thread Inada Naoki


Change by Inada Naoki :


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

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-03-30 Thread Inada Naoki


Change by Inada Naoki :


--
superseder:  -> PEP 597: Implemente encoding="locale" option and EncodingWarning

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



Re: memory consumption

2021-03-30 Thread Inada Naoki
On Mon, Mar 29, 2021 at 7:16 PM Alexey  wrote:
>
> Problem. Before executing, my interpreter process weighs ~100Mb, after first 
> run memory increases up to 500Mb
> and after second run it weighs 1Gb. If I will continue to run this class, 
> memory wont increase, so I think
> it's not a memory leak, but rather Python wont release allocated memory back 
> to OS. Maybe I'm wrong.
>

First of all, I recommend upgrading your Python. Python 3.6 is a bit old.

As you saying, Python can not return the memory to OS until the whole
arena become unused.
If your task releases all objects allocated during the run, Python can
release the memory.
But if your task keeps at least one object, it may prevent releasing
the whole arena (256KB).

Python manages only small (~256bytes) objects. Larger objects is
allocated by malloc().
And glibc malloc may not efficient for some usage. jemalloc is better
for many use cases.

You can get some hints from sys._debugmallocstats(). It prints
obmalloc (allocator for small objects) stats to stderr.
Try printing stats before and after 1st run, and after 2nd run. And
post it in this thread if you can. (no sensible information in the
stats).

That is all I can advise.

-- 
Inada Naoki  
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue43510] PEP 597: Implemente encoding="locale" option and EncodingWarning

2021-03-30 Thread Inada Naoki


Inada Naoki  added the comment:

In bpo-43651, I found code pattern that it's difficult to use 
io.text_encoding():

class OpenWrapper:
def __new__(cls, *args, **kwargs):
return open(*args, **kwargs)

`kwargs["encoding"] = text_encoding(kwargs.get("encoding)` doesn't work because 
`open(filename, "b", encoding="locale")` raises `ValueError: binary mode 
doesn't take an encoding argument`.

I think we should accept `encoding="locale"` even in binary mode. It makes easy 
to use `text_encoding()` and `encoding="locale"`.

--
resolution: fixed -> 
status: closed -> open

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



[issue43651] PEP 597: Fix EncodingWarning warnings in the Python stdlib

2021-03-30 Thread Inada Naoki


Change by Inada Naoki :


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

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



[issue43510] PEP 597: Implemente encoding="locale" option and EncodingWarning

2021-03-30 Thread Inada Naoki


Inada Naoki  added the comment:

I created bpo-43651 to track fixing EncodingError in Python stdlibs.
I close this issue for now.

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

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



[issue33164] Blake 2 module update

2021-03-30 Thread Inada Naoki


Change by Inada Naoki :


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

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



[issue33164] Blake 2 module update

2021-03-29 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 068ebf9729d440cef03e4c57e3db83c851146172 by Inada Naoki in branch 
'master':
bpo-33164: blake2: Fix Coverity scan (GH-25060)
https://github.com/python/cpython/commit/068ebf9729d440cef03e4c57e3db83c851146172


--

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



[issue43653] Typo in the random.shuffle docs

2021-03-29 Thread Inada Naoki


Inada Naoki  added the comment:

https://en.wikipedia.org/wiki/Interval_(mathematics)

See "Notations for intervals" section in the Wikipedia page.

--
nosy: +methane

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



[issue37945] [Windows] test_locale.TestMiscellaneous.test_getsetlocale_issue1813() fails

2021-03-28 Thread Inada Naoki


Change by Inada Naoki :


--
keywords: +patch
nosy: +methane
nosy_count: 13.0 -> 14.0
pull_requests: +23809
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/19481

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



[issue43651] PEP 597: Fix EncodingError

2021-03-28 Thread Inada Naoki


Change by Inada Naoki :


--
nosy: methane
priority: normal
severity: normal
status: open
title: PEP 597: Fix EncodingError
versions: Python 3.10

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



[issue43510] PEP 597: Implemente encoding="locale" option and EncodingWarning

2021-03-28 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 4827483f47906fecee6b5d9097df2a69a293a85c by Inada Naoki in branch 
'master':
bpo-43510: Implement PEP 597 opt-in EncodingWarning. (GH-19481)
https://github.com/python/cpython/commit/4827483f47906fecee6b5d9097df2a69a293a85c


--

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



[issue33164] Blake 2 module update

2021-03-28 Thread Inada Naoki


Change by Inada Naoki :


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

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



[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread Inada Naoki

Inada Naoki  added the comment:

> Why is it being specified that the current LC_CTYPE encoding should be 
> ignored in Windows when a "locale" encoding is requested?

Because `encoding="locale"` must be replacement of the current `encoding=None` 
(i.e. locale.getpreferredencoding(False).

`encoding=None` behavior will be changed if we change the default encoding or 
enable UTF-8 mode by default. So we are adding an explicit name to current 
behavior.

So It is not an option to assign other encoding. ​See PEP 597 for detail.

I know you are proposing to use CRT locale on Windows. If we change the 
`locale.getpreferredencoding(False)` to use CRT locale, `encoding="locale"` 
follow it.
But please discuss it in another issue.

--

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



[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread Inada Naoki


Inada Naoki  added the comment:

> Please address UTF-8 mode explicitly in open() or elsewhere. The locale
> module is about the state of the lib C, not what Python enforces via
> options in its own I/O layers.

I agree with you. APIs in locale module shouldn't aware UTF-8 mode.

`locale.getpreferredencoding()` is special, because it "Return the encoding 
used for text data, according to user preferences. User preferences are 
expressed differently on different systems, and might not be available 
programmatically on some systems, so this function only returns a guess."


> As mentioned, both should ideally be synchronized, though, so
> UTF-8 mode in Python should trigger setting a UTF-8 encoding
> via setlocale().

There is PEP 538 already :)

--

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



[issue43510] PEP 597: Implemente encoding="locale" option and EncodingWarning

2021-03-19 Thread Inada Naoki


Inada Naoki  added the comment:

> (1) "UTF-8" in the UTF-8 Mode, or the locale encoding
> (2) Always use the locale encoding, ignore the UTF-8 Mode
>
> What I don't expect is the current behavior, before PEP 597. Who uses open() 
> without specifying an encoding but always want to use the locale encoding? 
> (case 2) So this use case is already broken when the UTF-8 Mode is enabled 
> explicitly?

Yes, it is broken already.  So they can not use UTF-8 mode.

If `encoding="locale"` ignore UTF-8 mode, it save the use case. They can add 
`encoding="locale"` where they need to use locale/GetACP encoding and enable 
UTF-8 mode.

That's why it is important If we enable UTF-8 mode by default in the future.

--

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



[issue43510] PEP 597: Implemente encoding="locale" option and EncodingWarning

2021-03-19 Thread Inada Naoki


Inada Naoki  added the comment:

> Since the final goal is to move everybody towards to UTF-8, I'm not sure how 
> it's a good thing.

The final goal (the third motivation of the pep 597) is changing the default 
encoding (i.e. encoding used when it is not specified) to UTF-8.

But forcing people to use UTF-8 even they specify locale encoding explicitly is 
not the goal. That's why I want to ignore UTF-8 mode when `encoding="locale"` 
is specified.

I think this is almost Windows-only issue, and "mbcs" can be used in Windows 
already. It is documented in 
https://docs.python.org/3/using/windows.html#utf-8-mode

So this is not a blocker. Just my preference.

--

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



[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread Inada Naoki


Inada Naoki  added the comment:

> Is it about the current implementation of the PEP 597, or are you thinking at 
> the future Python which would use UTF-8 by default?

I had forgot to consider about UTF-8 mode while finishing PEP 597. If possible, 
I want to ignore UTF-8 mode when `encoding="locale"` is specified from Python 
3.10.
Otherwise, behavior will be changed between Python 3.10 and 3.11.

> Currently, getpreferredencoding(False) respects the behavior that you 
> described, no?

getpreferredencoding(False) respects UTF-8 mode. That's what PEP 597 said 
(because the PEP don't define behavior in UTF-8 mode) and GH-19481 implements. 

But it is not what I want for now. I want to ignore UTF-8 mode when 
`encoding="locale"` is specified.

This is almost "only in Windows" issue, and users can use `encoding="mbcs"` in 
Windows-only script.

But `encoding="locale"` is new and recommended way to specify using "locale" 
encoding explicitly. When user specify "locale" encoding explicitly, I think we 
should respect it regardless UTF-8 mode.

--

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



[issue43552] Add locale.get_locale_encoding() and locale.get_current_locale_encoding()

2021-03-19 Thread Inada Naoki


Inada Naoki  added the comment:

> I created this issue while reviewing the implementation of the PEP 597: PR 
> 19481.

What I want is same to `locale.getpreferredencoding(False)` but ignores UTF-8 
mode.

Background: PEP 597 adds new `encoding="locale"`option to open() and 
TextIOWrapper(). It is same to `encoding=None` for now, but it means using 
"locale encoding" explicitly.

But this is wrong in UTF-8 mode.

In UTF-8 mode, it's fine to `open(filename)` uses UTF-8. But I want to use 
"locale encoding" for `open(filename, encoding="locale")` because "locale" 
encoding is specified.

I don't want to add new meaning here. It should be same to 
`locale.getpreferredencoding(False)` without UTF-8 mode. So I need "cp%d" % 
GetACP() on Windows, not CRT locale encoding.

I don't care its name. both of sys.locale_encoding() and locale.get_encoding() 
are OK.

--

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



[issue43214] site: Potential UnicodeDecodeError when handling pth file

2021-03-17 Thread Inada Naoki


Inada Naoki  added the comment:

locale-specific encoding is not good especially for Windows.
But we used it for a long time. Changing the encoding for pth files is breaking 
change.

--
resolution:  -> not a bug
stage: patch review -> resolved
status: open -> closed

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



[issue42578] Add tip when encountering UnicodeDecode/EncodeError in open()

2021-03-15 Thread Inada Naoki


Inada Naoki  added the comment:

PEP 597 is accepted. May I close this?

--

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



[issue43506] PEP 624: Update document for removal schedule

2021-03-15 Thread Inada Naoki


Change by Inada Naoki :


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

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



[issue43506] PEP 624: Update document for removal schedule

2021-03-15 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset dc8558ef302f1b14b45c21abd7451e4fb56b4604 by Miss Islington (bot) 
in branch '3.8':
bpo-43506: Doc: Update removal schedule for Py_UNICODE encoder APIs (GH-24885)
https://github.com/python/cpython/commit/dc8558ef302f1b14b45c21abd7451e4fb56b4604


--

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



[issue43510] PEP 597: Implemente encoding="locale" option and EncodingWarning

2021-03-15 Thread Inada Naoki


Change by Inada Naoki :


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

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



[issue43506] PEP 624: Update document for removal schedule

2021-03-15 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 1330338583d183250186a8123b99d2283e945b4f by Inada Naoki in branch 
'master':
bpo-43506: Doc: Update removal schedule for Py_UNICODE encoder APIs (GH-24885)
https://github.com/python/cpython/commit/1330338583d183250186a8123b99d2283e945b4f


--

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



[issue41123] Remove Py_UNICODE APIs except PEP 623

2021-03-15 Thread Inada Naoki


Change by Inada Naoki :


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

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



[issue43510] PEP 597: Implemente encoding="locale" option and EncodingWarning

2021-03-15 Thread Inada Naoki


New submission from Inada Naoki :

PEP 597 is accepted.

--
components: IO
messages: 388809
nosy: methane
priority: normal
severity: normal
status: open
title: PEP 597: Implemente encoding="locale" option and EncodingWarning
versions: Python 3.10

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



[issue43506] PEP 624: Update document for removal schedule

2021-03-15 Thread Inada Naoki


Change by Inada Naoki :


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

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



[issue43506] PEP 624: Update document for removal schedule

2021-03-15 Thread Inada Naoki


New submission from Inada Naoki :

They are documented as "will be removed in 4.0" now.

--
components: C API
messages: 388800
nosy: methane
priority: normal
severity: normal
status: open
title: PEP 624: Update document for removal schedule
versions: Python 3.10, Python 3.9

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



[issue43214] site: Potential UnicodeDecodeError when handling pth file

2021-03-12 Thread Inada Naoki


Change by Inada Naoki :


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

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



[issue43214] site: Potential UnicodeDecodeError when handling pth file

2021-03-12 Thread Inada Naoki


Change by Inada Naoki :


--
superseder:  -> Use io.open_code for .pth files

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



[issue43452] Microoptimize PyType_Lookup for cache hits

2021-03-11 Thread Inada Naoki


Inada Naoki  added the comment:

$ ./python -m pyperf compare_to -G --min-speed=3 master.json pytype.json
Slower (1):
- unpack_sequence: 62.2 ns +- 0.6 ns -> 66.1 ns +- 0.9 ns: 1.06x slower

Faster (29):
- nbody: 182 ms +- 1 ms -> 152 ms +- 2 ms: 1.19x faster
- regex_effbot: 4.00 ms +- 0.05 ms -> 3.45 ms +- 0.08 ms: 1.16x faster
- spectral_norm: 178 ms +- 1 ms -> 158 ms +- 2 ms: 1.13x faster
- crypto_pyaes: 140 ms +- 1 ms -> 125 ms +- 1 ms: 1.12x faster
- dulwich_log: 88.0 ms +- 11.8 ms -> 80.1 ms +- 0.5 ms: 1.10x faster
- scimark_fft: 522 ms +- 4 ms -> 477 ms +- 14 ms: 1.09x faster
- mako: 18.2 ms +- 0.1 ms -> 16.7 ms +- 0.1 ms: 1.09x faster
- raytrace: 542 ms +- 4 ms -> 497 ms +- 3 ms: 1.09x faster
- regex_dna: 251 ms +- 1 ms -> 230 ms +- 1 ms: 1.09x faster
- regex_v8: 29.6 ms +- 0.2 ms -> 27.2 ms +- 0.1 ms: 1.09x faster
- pidigits: 227 ms +- 0 ms -> 210 ms +- 0 ms: 1.08x faster
- fannkuch: 564 ms +- 7 ms -> 525 ms +- 4 ms: 1.08x faster
- telco: 7.70 ms +- 0.12 ms -> 7.17 ms +- 0.18 ms: 1.07x faster
- float: 130 ms +- 1 ms -> 122 ms +- 1 ms: 1.07x faster
- unpickle_pure_python: 350 us +- 4 us -> 327 us +- 3 us: 1.07x faster
- scimark_sparse_mat_mult: 6.86 ms +- 0.08 ms -> 6.47 ms +- 0.07 ms: 1.06x 
faster
- chaos: 122 ms +- 1 ms -> 115 ms +- 1 ms: 1.06x faster
- nqueens: 113 ms +- 1 ms -> 107 ms +- 1 ms: 1.06x faster
- json_dumps: 15.4 ms +- 0.1 ms -> 14.7 ms +- 0.1 ms: 1.05x faster
- pickle_pure_python: 505 us +- 6 us -> 480 us +- 5 us: 1.05x faster
- logging_simple: 9.88 us +- 0.17 us -> 9.40 us +- 0.18 us: 1.05x faster
- deltablue: 8.19 ms +- 0.13 ms -> 7.79 ms +- 0.15 ms: 1.05x faster
- scimark_lu: 190 ms +- 3 ms -> 182 ms +- 5 ms: 1.05x faster
- scimark_monte_carlo: 125 ms +- 2 ms -> 120 ms +- 2 ms: 1.05x faster
- pickle: 11.3 us +- 0.2 us -> 10.8 us +- 0.1 us: 1.05x faster
- logging_silent: 189 ns +- 4 ns -> 182 ns +- 4 ns: 1.04x faster
- pickle_dict: 31.7 us +- 0.2 us -> 30.5 us +- 0.1 us: 1.04x faster
- django_template: 51.6 ms +- 0.7 ms -> 49.8 ms +- 0.6 ms: 1.04x faster
- pyflate: 755 ms +- 7 ms -> 730 ms +- 7 ms: 1.03x faster

Benchmark hidden because not significant (30): 2to3, chameleon, genshi_text, 
genshi_xml, go, hexiom, json_loads, logging_format, meteor_contest, pathlib, 
pickle_list, python_startup, python_startup_no_site, regex_compile, richards, 
scimark_sor, sqlalchemy_declarative, sqlalchemy_imperative, sqlite_synth, 
sympy_expand, sympy_integrate, sympy_sum, sympy_str, tornado_http, unpickle, 
unpickle_list, xml_etree_parse, xml_etree_iterparse, xml_etree_generate, 
xml_etree_process

Geometric mean: 1.04x faster

--
nosy: +methane

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



[issue43364] Windows: Make UTF-8 mode more accessible

2021-03-10 Thread Inada Naoki


Inada Naoki  added the comment:

> Maybe as a global setting, the better thing to copy is the button at the end 
> of installation that offers to change the long path policy?

I tried it but there is no enough space.
See GH-24813 and attached screenshot.

--
Added file: https://bugs.python.org/file49864/utf8mode-screenshot1.png

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



[issue43364] Windows: Make UTF-8 mode more accessible

2021-03-10 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +23579
pull_request: https://github.com/python/cpython/pull/24813

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



[issue43457] Include simple file loading and saving functions in JSON standard library.

2021-03-09 Thread Inada Naoki


Inada Naoki  added the comment:

I created a new vote for naming.
https://discuss.python.org/t/vote-new-function-for-reading-json-from-path/7603

--

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



[issue43457] Include simple file loading and saving functions in JSON standard library.

2021-03-09 Thread Inada Naoki


Inada Naoki  added the comment:

This idea is discussed several times. Last discussion thread is:
https://mail.python.org/archives/list/python-id...@python.org/thread/YHO575YY4FQC3GBDF4SKOWIEAUSY3OQX/#YHO575YY4FQC3GBDF4SKOWIEAUSY3OQX

--
nosy: +methane

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



[issue31466] No easy way to change float formatting when subclassing encoder.JSONEncoder

2021-03-07 Thread Inada Naoki


Change by Inada Naoki :


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

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



[issue43405] DeprecationWarnings in test_unicode

2021-03-06 Thread Inada Naoki


Change by Inada Naoki :


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

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



[issue43405] DeprecationWarnings in test_unicode

2021-03-06 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 8aabfa8550692a76d8a96e138c48faf5a7b2752c by Zackery Spytz in 
branch 'master':
bpo-43405: Fix DeprecationWarnings in test_unicode (GH-24754)
https://github.com/python/cpython/commit/8aabfa8550692a76d8a96e138c48faf5a7b2752c


--

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



[issue43364] Windows: Make UTF-8 mode more accessible

2021-03-04 Thread Inada Naoki


Change by Inada Naoki :


--
title: Add shortcut to enable UTF-8 mode in start menu. -> Windows: Make UTF-8 
mode more accessible

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



[issue43364] Add shortcut to enable UTF-8 mode in start menu.

2021-03-04 Thread Inada Naoki


Inada Naoki  added the comment:

User may install Python from python.org installer, scoop, conda, and Windows 
Store.
So envvar is not a right tool to configure only one installation.

Anyway, adding more complex way to configure Python can be discussed later.

Paul Moore againsted adding more way to configure Python [1].
So let's focus on promoting existing way in Python 3.10.

[1] 
https://mail.python.org/archives/list/python-id...@python.org/message/BDOV2F3LDSC2YDUR4LCPNHZFJWEZNX5U/

> Yes, if the installer directly sets an environment variable, then the setting 
> should be specific to the installed version, such as PYTHONUTF8_310-32.

Then, suspend GH-24742 (adding checkbox to installer).

In GH-24743, I added the shortcut from the installer. But I am not sure it is 
the best way, because only Python installed from the installer have it.

I will check how conda installs Python on Windows. If it contains Tools, we may 
add `enable-utf8mode.bat` and `disable-utf8mode.bat` to the Tools.

--

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



[issue43364] Add shortcut to enable UTF-8 mode in start menu.

2021-03-04 Thread Inada Naoki


Change by Inada Naoki :


--
pull_requests: +23513
pull_request: https://github.com/python/cpython/pull/24743

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



[issue43364] Add shortcut to enable UTF-8 mode in start menu.

2021-03-04 Thread Inada Naoki


Change by Inada Naoki :


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

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



[issue43364] Add shortcut to enable UTF-8 mode in start menu.

2021-03-02 Thread Inada Naoki


Inada Naoki  added the comment:

> You can run "[WindowsFolder]System32\setx.exe" directly. It's not a shell 
> command.

Thank you. I will do.

> For modifying an environment variable, please clone the entire path MSI and 
> use an Environment element to update it. Should be a little simpler than that 
> one, because it's a constant.

How about having both? Shortcut menu is more accessible when user want to 
enable UTF-8 mode after they install Python. (e.g. they got troubled by 
UnicodeDecodeError and are adviced to enable UTF-8 mode).

> Alternatively, for this kind of policy option, it might be nice to set up 
> some common registry keys to define it. That is a function I've been thinking 
> about for enabling some security features (such as malware scanning), and it 
> mimics how Windows distributes its own configuration already. That'll take a 
> whole PEP, though, and I doubt I'll get it ready in time for 3.10 given the 
> other stuff I've got going on right now.

Registry is also discussed in the thread, but there are no consensus about 
adding new way to enable UTF-8 mode.
I conclude that we should promote existing way (i.e. envvar) and get feedback 
from users.

> So provided we adequately document that the setting may impact other versions 
> of Python besides the one being installed, and it's not enabled by default, 
> I'm okay with an MSI-based addable/removable setting for PYTHONUTF8.

--

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



[issue43321] PyArg_ParseTuple() false-returns SUCCESS though SystemError and missing data (when PY_SSIZE_T_CLEAN not #define'd)

2021-02-27 Thread Inada Naoki


Change by Inada Naoki :


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

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



[issue43321] PyArg_ParseTuple() false-returns SUCCESS though SystemError and missing data (when PY_SSIZE_T_CLEAN not #define'd)

2021-02-27 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset c71d24f55828e7f0f2c8750d2e1b04d04539beff by Inada Naoki in branch 
'master':
bpo-43321: Fix SystemError in getargs.c (GH-24656)
https://github.com/python/cpython/commit/c71d24f55828e7f0f2c8750d2e1b04d04539beff


--

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



[issue43317] python -m gzip could use a larger buffer

2021-02-26 Thread Inada Naoki


Change by Inada Naoki :


--
nosy:  -methane
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions:  -Python 3.6, Python 3.7, Python 3.8, Python 3.9

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



[issue43317] python -m gzip could use a larger buffer

2021-02-26 Thread Inada Naoki


Inada Naoki  added the comment:


New changeset 7956ef884965ac6f9f7f2a27b835ea80e471c886 by Ruben Vorderman in 
branch 'master':
bpo-43317: Use io.DEFAULT_BUFFER_SIZE instead of 1024 in gzip CLI (#24645)
https://github.com/python/cpython/commit/7956ef884965ac6f9f7f2a27b835ea80e471c886


--
nosy: +methane

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



[issue41282] Deprecate and remove distutils

2021-02-25 Thread Inada Naoki


Change by Inada Naoki :


--
nosy: +methane
nosy_count: 17.0 -> 18.0
pull_requests: +23442
pull_request: https://github.com/python/cpython/pull/24657

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



<    1   2   3   4   5   6   7   8   9   10   >