[issue35773] test_bdb fails on non-UTF-8 locale

2020-06-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 94eee69e9b3a7e7d33142a47ffea560beb8f1596 by Serhiy Storchaka in branch 'master': bpo-35773: Fix test_bdb on non-UTF-8 locales. (GH-21136) https://github.com/python/cpython/commit/94eee69e9b3a7e7d33142a47ffea56

[issue41112] test_peg_generator fails on non-UTF-8 locale

2020-06-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset aad8f0eeca93b2150760b5e59ed0495e47d1be1e by Serhiy Storchaka in branch 'master': bpo-41112: Fix test_peg_generator on non-UTF-8 locales. (GH-21138) https://github.com/python/cpython/commit/aad8f0eeca93b2150760b5e59ed049

[issue41113] test_warnings fails on non-Western locales

2020-06-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 0f8ec1fff01173803645ad6a8aea24997bf66fc1 by Serhiy Storchaka in branch 'master': bpo-41113: Fix test_warnings on non-Western locales. (GH-21143) https://github.com/python/cpython/commit/0f8ec1fff01173803645ad6a8aea24

[issue35773] test_bdb fails on non-UTF-8 locale

2020-06-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41113] test_warnings fails on non-Western locales

2020-06-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41112] test_peg_generator fails on non-UTF-8 locale

2020-06-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41069] Use non-ascii file names in tests by default

2020-06-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 700cfa8c90a90016638bac13c4efd03786b2b2a0 by Serhiy Storchaka in branch 'master': bpo-41069: Make TESTFN and the CWD for tests containing non-ascii characters. (GH-21035) https://github.com/python/cpyt

[issue41069] Use non-ascii file names in tests by default

2020-06-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +20315 pull_request: https://github.com/python/cpython/pull/21156 ___ Python tracker <https://bugs.python.org/issue41

[issue41069] Use non-ascii file names in tests by default

2020-06-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset f925407a19eeb9bf5f7640143979638adce2c677 by Serhiy Storchaka in branch '3.9': [3.9] bpo-41069: Make TESTFN and the CWD for tests containing non-ascii characters. (GH-21035). (GH-21156) https://github.com/python/cpyt

[issue41069] Use non-ascii file names in tests by default

2020-06-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 ___ Python tracker <https://bugs.python.or

[issue41136] argparse uses default encoding when read arguments from file

2020-06-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The fromfile_prefix_chars option allows you to read arguments from file. But open() without explicit encoding is used for this. Therefore the result is depending on the current locale or the PYTHONIOENCODING environment variable. On Linux this is rare a

[issue41063] Avoid using the locale encoding for open() in tests

2020-06-27 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- dependencies: +argparse uses default encoding when read arguments from file ___ Python tracker <https://bugs.python.org/issue41

[issue41137] pdb uses the locale encoding for .pdbrc

2020-06-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : pdb uses the locale encoding when read the .pdbrc file. It means that the current locale of the debugged program affects it. It also makes .pdbrc not portable between different platforms. It is usually not an issue, because the .pdbrc file usually

[issue41063] Avoid using the locale encoding for open() in tests

2020-06-27 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- dependencies: +pdb uses the locale encoding for .pdbrc ___ Python tracker <https://bugs.python.org/issue41063> ___ ___ Python-bug

[issue41138] trace CLI reads source files using the locale encoding

2020-06-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The command line interface of the trace module reads source files using the locale encoding. The following file fixes this by reading a file in binary mode (compile() detects the encoding). It fixes also a resource warning when save counts to a file

[issue41138] trace CLI reads source files using the locale encoding

2020-06-27 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +20335 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21177 ___ Python tracker <https://bugs.python.org/issu

[issue41063] Avoid using the locale encoding for open() in tests

2020-06-27 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- dependencies: +trace CLI reads source files using the locale encoding ___ Python tracker <https://bugs.python.org/issue41

[issue41139] cgi uses the locale encoding for log files

2020-06-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The cgi module provides undocumented feasibility for logging. cgi.log() formats log message and appends it to the log file with name specified by cgi.logfile if it was not empty before the first use of cgi.log(). One of problems is that it uses the

[issue41140] cgitb uses the locale encoding for log files

2020-06-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : If logdir is not None the exception handler in cgitb tries to save the description of an error in that directory using the locale encoding. It will fail if the description contains non-encodable characters. We should either use corresponding error

[issue41063] Avoid using the locale encoding for open() in tests

2020-06-27 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- dependencies: +cgi uses the locale encoding for log files, cgitb uses the locale encoding for log files ___ Python tracker <https://bugs.python.org/issue41

[issue41142] msilib.CAB doesnot support non-ASCII files

2020-06-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : There are several problems with _msi.FCICreate() used to create the CAB file. It encodes the CAB names and added file names to UTF-8 and then use them as encoded with the local encoding. So you cannot create a CAB file in a directory with non-ASCII name

[issue41143] distutils uses the locale encoding for the .pypirc file

2020-06-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : I have not found any mention about the encoding of .pypirc files. Currently distutils uses the locale encoding for reading and writing them. It makes them potentially nonportable if they contain non-ASCII data (not sure if it is possible) and depending

[issue41063] Avoid using the locale encoding for open() in tests

2020-06-27 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- dependencies: +distutils uses the locale encoding for the .pypirc file ___ Python tracker <https://bugs.python.org/issue41

[issue41142] msilib.CAB doesnot support non-ASCII files

2020-06-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +20349 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21195 ___ Python tracker <https://bugs.python.org/issu

[issue41138] trace CLI reads source files using the locale encoding

2020-06-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 04cdeb7a5617c48102f45b965e683b12cdf934f8 by Serhiy Storchaka in branch 'master': bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177) https://github.com/python/cpython/commit/04cdeb7a5617c48102f45b965e683b

[issue41146] Convert signal.default_int_handler() to Argument Clinic

2020-06-28 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : It adds a signature to signal.default_int_handler(). -- components: Argument Clinic, Extension Modules messages: 372511 nosy: larry, serhiy.storchaka priority: normal severity: normal status: open title: Convert signal.default_int_handler() to

[issue41146] Convert signal.default_int_handler() to Argument Clinic

2020-06-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +20351 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21197 ___ Python tracker <https://bugs.python.org/issu

[issue23325] Turn SIG_DFL and SIG_IGN into functions

2020-06-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.10 -Python 3.8 ___ Python tracker <https://bugs.python.org/issue23325> ___ ___ Python-bugs-list mailin

[issue41138] trace CLI reads source files using the locale encoding

2020-06-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +20354 pull_request: https://github.com/python/cpython/pull/21200 ___ Python tracker <https://bugs.python.org/issue41

[issue41138] trace CLI reads source files using the locale encoding

2020-06-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset cb53b8ce9c8660465b816f4d577720305b1283fa by Serhiy Storchaka in branch '3.8': [3.8] bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177) (GH-21200) https://github.com/python/cpython/commit/cb53b8ce9c8660465b816f4d577720

[issue41148] IDLE uses the locale encoding for config files

2020-06-28 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : IDLE uses the locale encoding for reading and writing config files. Default config files are ASCII-only, but if user config files contain non-ASCII data, it makes them non-portable and depending on the environment of IDLE. Could they contain file paths

[issue41150] pipes uses text files and the locale encodig

2020-06-28 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The pipes module was designed as a Python interface to Unix shell pipelines. In Python 2 it works with binary streams (on Unix). But in Python 3 it opens all files and pipes in text mode with the locale encoding. It makes it unapplicable for processing

[issue41063] Avoid using the locale encoding for open() in tests

2020-06-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- dependencies: +pipes uses text files and the locale encodig ___ Python tracker <https://bugs.python.org/issue41063> ___ ___ Pytho

[issue41152] IDLE: revise setting of iomenu.encoding and .errors

2020-06-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it makes sense if we want to use the locale encoding for IO streams. But on other hand, it may be worth to drop support of locale-depending and configurable IO encoding and always use UTF-8. It is the IO encoding always used on Windows and the

[issue41048] read_mime_types() should read the rule file using UTF-8, not the locale encoding

2020-06-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 7f569c9bc0079906012b3034d30fe8abc742e7fc by Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) in branch 'master': bpo-41048: mimetypes should read the rule file using UTF-8, not the locale encoding (GH-20998) https://github.

[issue41158] IDLE: rewrite the code for handling file encoding

2020-06-29 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The proposed patch rewrites the code in IDLE for detecting Python file encoding and decoding and encoding Python sources by using the tokenize module instead of handmade implementation of PEP 263. -- assignee: terry.reedy components: IDLE

[issue41152] IDLE: revise setting of iomenu.encoding and .errors

2020-06-29 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +20367 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/21214 ___ Python tracker <https://bugs.python.org/issu

[issue41158] IDLE: rewrite the code for handling file encoding

2020-06-29 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +20368 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21215 ___ Python tracker <https://bugs.python.org/issu

[issue41152] IDLE: revise setting of iomenu.encoding and .errors

2020-06-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 21214 sets the encoding of stdin/stdout/stderr to 'utf-8'. Error handler is set to 'surrogatepass' or 'surrogateescape' because these error handlers are used when convert strings between Python and Tcl. It guarantees that r

[issue41159] Nested async dict comprehension fails with SyntaxError

2020-06-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue33346. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Syntax error with async generator inside dictionary c

[issue33346] Syntax error with async generator inside dictionary comprehension

2020-06-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What can I do to move this issue forward? We already missed 3.7, 3.8 and 3.9. -- ___ Python tracker <https://bugs.python.org/issue33

[issue37999] No longer use implicit convertion to int with loss

2020-06-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset e67f7db3c34f70536f36c56bb82e33c3512a53a3 by Serhiy Storchaka in branch 'master': bpo-37999: Simplify the conversion code for %c, %d, %x, etc. (GH-20437) https://github.com/python/cpython/commit/e67f7db3c34f70536f36c56bb82e33

[issue36346] Prepare for removing the legacy Unicode C API

2020-06-29 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +20375 pull_request: https://github.com/python/cpython/pull/21223 ___ Python tracker <https://bugs.python.org/issue36

[issue36346] Prepare for removing the legacy Unicode C API

2020-06-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 349f76c6aace5a4a2b57f6b442a532faf0027d6b by Serhiy Storchaka in branch 'master': bpo-36346: Prepare for removing the legacy Unicode C API (AC only). (GH-21223) https://github.com/python/cpython/commit/349f76c6aace5a4a2b57f6b442a532

[issue41158] IDLE: rewrite the code for handling file encoding

2020-06-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 694d31e714074176f0c324f95948b75dc768c091 by Serhiy Storchaka in branch 'master': bpo-41158: IDLE: rewrite the code for handling file encoding (GH-21215) https://github.com/python/cpython/commit/694d31e714074176f0c324f95948b7

[issue41158] IDLE: rewrite the code for handling file encoding

2020-06-29 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41142] msilib.CAB doesnot support non-ASCII files

2020-06-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41142] msilib.CAB doesnot support non-ASCII files

2020-06-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset ba67d7386edf20bcc0f878a518de0894cb574e9f by Serhiy Storchaka in branch 'master': bpo-41142: Add support of non-ASCII paths for CAB files. (GH-21195) https://github.com/python/cpython/commit/ba67d7386edf20bcc0f878a518de08

[issue41167] Add new formats to PyArg_ParseTuple for "str or None"

2020-06-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it is more common to use the general "O" format. In any case you need to write separate code for None and str in the body of function. -- nosy: +serhiy.storchaka ___ Python track

[issue41158] IDLE: rewrite the code for handling file encoding

2020-07-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, it can be backported to 3.8 and 3.9 if you wish. -- ___ Python tracker <https://bugs.python.org/issue41158> ___ ___ Pytho

[issue41187] Convert the _msi module to Argument Clinic

2020-07-01 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The proposed PR converts the _msi module to Argument Clinic. * Fixes deprecation warnings with the "u" format. * Adds signatures. * Adds meaningful docstrings. -- components: Argument Clinic, Windows messages: 372769 nosy: larry,

[issue41187] Convert the _msi module to Argument Clinic

2020-07-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +20412 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21264 ___ Python tracker <https://bugs.python.org/issu

[issue41190] msilib: SetProperty() accepts str, but GetProperty() returns bytes

2020-07-01 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : There is an inconsistency in the _msi.SummaryInformation class. Its method SetProperty() accepts str, but GetProperty() returns bytes (encoded with the Windows ANSI encoding). Since os.fsencode()/os.fsdecode() now use UTF-8 encoding, it is not so easy

[issue41187] Convert the _msi module to Argument Clinic

2020-07-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 5d5c84ef78b19211671c2bfa68fe073485135eed by Serhiy Storchaka in branch 'master': bpo-41187: Convert the _msi module to Argument Clinic (GH-21264) https://github.com/python/cpython/commit/5d5c84ef78b19211671c2bfa68fe07

[issue41043] Escape the literal part of the path for glob()

2020-07-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It may be not exactly what you meant, but see issue38144. This issue actually was opened after I looked how that feature can be used in the stdlib and found that most of uses of glob() are vulnerable

[issue41043] Escape the literal part of the path for glob()

2020-07-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +20424 pull_request: https://github.com/python/cpython/pull/21275 ___ Python tracker <https://bugs.python.org/issue41

[issue41043] Escape the literal part of the path for glob()

2020-07-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +20426 pull_request: https://github.com/python/cpython/pull/21277 ___ Python tracker <https://bugs.python.org/issue41

[issue41043] Escape the literal part of the path for glob()

2020-07-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset ecfecc2d6ce88ae71c783f0465a508c6a1b2f2b6 by Serhiy Storchaka in branch '3.9': [3.9] bpo-41043: Escape literal part of the path for glob(). (GH-20994). (GH-21275) https://github.com/python/cpyt

[issue41043] Escape the literal part of the path for glob()

2020-07-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset e73896241e55f452656fd8070eb79f344091bca0 by Serhiy Storchaka in branch '3.8': [3.8] bpo-41043: Escape literal part of the path for glob(). (GH-20994). (GH-21277) https://github.com/python/cpyt

[issue41043] Escape the literal part of the path for glob()

2020-07-02 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41139] cgi uses the locale encoding for log files

2020-07-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Available options: 1. Do nothing (keep cgi.log() and continue to use the default encoding for open()). 2. Remove cgi.log(). I think that the deprecation period is not needed because the function is not documented, is not imported by star-import, and is

[issue41197] Async magic methods in contextlib.closing

2020-07-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And what happen when you accidentally use synchronous "with" instead of "async with" with closing()? with closing(SomeAPI()) as api: ... I think it is intentionally that different functions/methods/classes are used for synchron

[issue41197] Async magic methods in contextlib.closing

2020-07-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Warning is not error. It may left unnoticed, especially if the code is executed on server. And in this particular case turning the warning into exception by setting warning filters does not help, because it would be raised in the context where exceptions

[issue40213] contextlib.aclosing()

2020-07-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Do you have use cases or want to add it for pure "symmetry" reasons? contextlib.closing() was added when context managers were new, and many classes that own resources did have the close() method but did not support the context manager protocol

[issue33665] tkinter.ttk.Scrollbar.fraction() under-estimates length

2020-07-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for testing it E. Paine. I agree that it is not a Tkinter issue. -- resolution: -> third party stage: needs patch -> resolved status: open -> closed ___ Python tracker <https://bug

[issue41177] ConvertingList and ConvertingTuple lack iterators and ConvertingDict lacks items()

2020-07-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If you are going to make them public general purpose classes you need to implement also support of slices, __reversed__(), index(), remove(), count(), sort(), copy() in ConvertingList and more methods in ConvertingTuple, and ConvertingDict. If it is not

[issue36346] Prepare for removing the legacy Unicode C API

2020-07-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is no need to deprecate _PyUnicode_AsUnicode. It is a private function. Undeprecating it will make the code clearer. -- ___ Python tracker <https://bugs.python.org/issue36

[issue36346] Prepare for removing the legacy Unicode C API

2020-07-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +20484 pull_request: https://github.com/python/cpython/pull/21336 ___ Python tracker <https://bugs.python.org/issue36

[issue36346] Prepare for removing the legacy Unicode C API

2020-07-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b3dd5cd4a36877c473417fd7b3358843dcf8e647 by Serhiy Storchaka in branch 'master': bpo-36346: Undeprecate private function _PyUnicode_AsUnicode(). (GH-21336) https://github.com/python/cpython/commit/b3dd5cd4a36877c473417fd7b33588

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

2020-07-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Library (Lib) type: behavior -> enhancement versions: +Python 3.10 -Python 2.7, Python 3.5 ___ Python tracker <https://bugs.python.org/issu

[issue41208] An exploitable segmentation fault in marshal module

2020-07-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: How did you get this file? -- ___ Python tracker <https://bugs.python.org/issue41208> ___ ___ Python-bugs-list mailin

[issue41208] An exploitable segmentation fault in marshal module

2020-07-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, unlike to marshal the pickle format is a Turing-complete language. Just loading pickle data can cause to execution of arbitrary code. marshal is more "safe" in this regard -- in worst case you can just crash when load it. It may be interesti

[issue41208] An exploitable segmentation fault in marshal module

2020-07-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In this particular case unmarshalling creates a tuple containing a reference to itself which is used as a key in a dict. Calculating a hash of such tuple leads to infinite recursion which overflows the programming stack. There is no efficient way to

[issue21041] pathlib.PurePath.parents rejects negative indexes

2020-07-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Maxwell, in your case a more correct and obvious way is Path('/tmp') in filepath.parents although it may be not very efficient. Using the is_relative_to() method may be more efficient and obvious. -- nosy: +serhiy

[issue39542] Cleanup object.h header

2020-07-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not know the purpose of this issue. The new code does not look cleaner to me, but maybe it is only for me. But performance regressions should be fixed. We cannot rely on compiler-specific global optimization, which is hard to test and does not work

[issue41221] io.TextIOWrapper ignores silently partial write if buffer is unbuffered

2020-07-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, this is a serious problem. AFAIK TextIOWrapper initially supported only buffered writers, but the support of non-buffered writers was added later. We can make TextIOWrapper calling write() of underlying binary stream repeatedly, but it will break the

[issue41242] When concating strings, I think it is better to use += than join the list

2020-07-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In this particular case the number of concatenations is limited, the resulting string is usually short, and the code is not performance critical (it is the __repr__ implementation). So there is no significant advantage of one way over other, and no way is

[issue41244] Change to use str.join() instead of += when concatenating string

2020-07-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Changes in bpo-41242 were rejected not because the new code is worse, but because it is not obviously and significantly better that the existing code. Here status quo wins for the same reasons. This rule saves us from endless rewriting the code and allows

[issue41253] unittest -h shows a flag -s but it doesn't work

2020-07-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Where do you see option -s? -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue41253> ___ ___ Pytho

[issue41251] __future__.barry_as_FLUFL.getMandatoryRelease() is wrong

2020-07-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It was not officially dropped. It was kept as a joke. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue41

[issue41262] Convert memoryview to Argument Clinic

2020-07-09 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The proposed PR converts Objects/memoryobject.c to Argument Clinic. Advantages: * Highly optimized code is used to parse arguments instead of slow PyArg_ParseTupleAndKeywords(). * All future improvements of argument parsing (better performance or errors

[issue41262] Convert memoryview to Argument Clinic

2020-07-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Argument Clinic, Interpreter Core -Extension Modules nosy: +larry ___ Python tracker <https://bugs.python.org/issue41

[issue41262] Convert memoryview to Argument Clinic

2020-07-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +20570 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21421 ___ Python tracker <https://bugs.python.org/issu

[issue41263] Convert code.__new__ to Argument Clinic

2020-07-09 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Argument Clinic is already used for code.replace(). The proposed PR converts code.__new__() to Argument Clinic. -- components: Argument Clinic, Installation messages: 373428 nosy: larry, serhiy.storchaka priority: normal severity: normal status

[issue41263] Convert code.__new__ to Argument Clinic

2020-07-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +20573 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21426 ___ Python tracker <https://bugs.python.org/issu

[issue41263] Convert code.__new__ to Argument Clinic

2020-07-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 0f9aa47babbfbecc5ef500fb0feae755230ec3c0 by Serhiy Storchaka in branch 'master': bpo-41263: Convert code.__new__ to Argument Clinic (GH-21426) https://github.com/python/cpython/commit/0f9aa47babbfbecc5ef500fb0feae7

[issue41263] Convert code.__new__ to Argument Clinic

2020-07-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue36346] Prepare for removing the legacy Unicode C API

2020-07-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +20576 pull_request: https://github.com/python/cpython/pull/21429 ___ Python tracker <https://bugs.python.org/issue36

[issue41264] Do not use the name of the built-in function as a variable.

2020-07-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: We usually do not accept pure cosmetic changes. -- nosy: +serhiy.storchaka resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue36346] Prepare for removing the legacy Unicode C API

2020-07-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d878349bac6c154fbfeffe7d4b38e2ddb833f135 by Serhiy Storchaka in branch 'master': bpo-36346: Do not use legacy Unicode C API in ctypes. (#21429) https://github.com/python/cpython/commit/d878349bac6c154fbfeffe7d4b38e2

[issue36346] Prepare for removing the legacy Unicode C API

2020-07-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +20584 pull_request: https://github.com/python/cpython/pull/21437 ___ Python tracker <https://bugs.python.org/issue36

[issue20179] Derby #10: Convert 50 sites to Argument Clinic across 4 files

2020-07-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 9650fe0197779b4dfded94be111e39c5810f098f by Zackery Spytz in branch 'master': bpo-20179: Convert the _overlapped module to the Argument Clinic (GH-14275) https://github.com/python/cpython/commit/9650fe0197779b4dfded94be111e39

[issue20179] Derby #10: Convert 50 sites to Argument Clinic across 4 files

2020-07-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue20171] Derby #2: Convert 115 sites to Argument Clinic in Modules/_cursesmodule.c

2020-07-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue36346] Prepare for removing the legacy Unicode C API

2020-07-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 4c8f09d7cef8c7aa07d5b5232b5b64f63819a743 by Serhiy Storchaka in branch 'master': bpo-36346: Make using the legacy Unicode C API optional (GH-21437) https://github.com/python/cpython/commit/4c8f09d7cef8c7aa07d5b5232b5b64

[issue41280] lru_cache on 0-arity functions should default to maxsize=None

2020-07-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The number of arguments is determined when the function is called (and it may be different for every call). maxsize is specified when the function is created. -- nosy: +serhiy.storchaka ___ Python tracker

[issue40275] test.support has way too many imports

2020-07-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: -serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue40275> ___ ___ Python-bugs-list mailing list Unsub

[issue41284] High Level API for json file parsing

2020-07-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: json.load() is already a high level API. json.JSONDecoder is more low level API. Not every two lines of code should be added as a function in the stdlib. Also, such API would be too complex because you would need to combine parameters of open() (8

[issue20181] Derby #12: Convert 50 sites to Argument Clinic across 4 files

2020-07-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b7047e59a40649d81061acf0044e74cfd426f064 by Zackery Spytz in branch 'master': bpo-20181: Convert the readline module to the Argument Clinic (#14326) https://github.com/python/cpython/commit/b7047e59a40649d81061acf0044e74

[issue20175] Derby #6: Convert 50 sites to Argument Clinic across 8 files

2020-07-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 545b54d2abbc7970aa66b179a18ff2ac4440a8f9 by Zackery Spytz in branch 'master': bpo-20175: Convert Modules/_multiprocessing to the Argument Clinic (GH-14245) https://github.com/python/cpython/commit/545b54d2abbc7970aa66b179a18ff2

<    32   33   34   35   36   37   38   39   40   41   >