[issue41549] IDLE leaks `_` into hint box

2020-08-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think that I understood what is the issue. 1. Open the IDLE editor, type "foo" and press . The pop-up list does not contain "foo". 2. Switch to the IDLE shell, type "foo = 1" and press . 3. Switch back to the IDLE editor

[issue41547] Expose default __getstate__ and __setstate__

2020-08-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is virtually a duplicate of isssue26579. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Support pickling slots in subclasses of co

[issue40782] AbstactEventLoop.run_in_executor is listed as an async method, but should actually return a Future

2020-08-13 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- title: AbstactEventLoop.run_in_executor is listed as an async method, but should actually return a Futrue -> AbstactEventLoop.run_in_executor is listed as an async method, but should actually return a Fut

[issue39994] Redundant code in pprint module.

2020-08-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: bpo-23741 did not change the behavior. The specified code was added specially to preserve the existing behavior. For other base types the condition was like `issubclass(typ, list) and r is list.__repr__`, but for dict it was just `issubclass(typ, dict

[issue39994] Redundant code in pprint module.

2020-08-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, this code was kept for backward compatibility when the dispatch mapping was added. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue39

[issue41532] Import precedence is broken in some library

2020-08-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is because module functools is already imported (you can see it in sys.modules), but module tokenize is not. It is likely due to module rlcompleter imported at startup on Linux, but not on Windows. -- nosy: +serhiy.storchaka resolution

[issue41531] Python 3.9 regression: Literal dict with > 65535 items are one item shorter

2020-08-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Interpreter Core nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue41531> ___ ___ Python-bug

[issue41527] smart quotes in Lib/pydoc_data/topics.py file

2020-08-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Pydoc uses the backslashreplace error handler for characters not encodable with the output encoding (see issue21398 and issue23374). $ LC_ALL=uk_UA.koi8-u ./python -c "help('async')" [...] [2] A string literal appearing as the first

[issue41525] Python '--help' has corrupted text.

2020-08-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, but I think it is worth opening a separate issue. -- ___ Python tracker <https://bugs.python.org/issue41525> ___ ___

[issue41521] Replace whitelist/blacklist with allowlist/denylist

2020-08-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Should not such changes be widely discussed on the Python-Dev mailing list before merging? -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue41

[issue41524] PyOS_mystricmp advances pointers too far

2020-08-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good catch! Do you mind to provide a PR for this William? -- keywords: +easy (C) nosy: +serhiy.storchaka stage: -> needs patch ___ Python tracker <https://bugs.python.org/issu

[issue41525] Python '--help' has corrupted text.

2020-08-11 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch nosy: +serhiy.storchaka nosy_count: 2.0 -> 3.0 pull_requests: +20964 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21836 ___ Python tracker <https://bugs.p

[issue41523] functools.cached_property does not satisfy the property check

2020-08-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are not much things common to property and cached_property. cached_property does not have attributes fget, fset, fdel. They are both descriptors, but cached_property is not a data descriptor

[issue41523] functools.cached_property does not satisfy the property check

2020-08-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, cached_property is a completely different class. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue41

[issue40185] Refactor typing.NamedTuple

2020-08-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: $ echo 'from typing import NamedTuple; NamedTuple("A")' | ./python -m ast Module( body=[ ImportFrom( module='typing', names=[ alias(name='NamedTuple')], level=0), Expr(

[issue41419] Path.mkdir and os.mkdir don't respect setgid if its parent is g-s

2020-08-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: os.mkdir() is a thin wrapper around syscalls mkdir or mkdirat. Path.mkdir() is a thin wrapper around os.mkdir(). If you think that the behavior of mkdir differs from the documentation please file a report in the Linux kernel. -- nosy

[issue41497] Potential UnicodeDecodeError in dis

2020-08-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good catch. Yes, when read Python source files you should either open them in binary mode if reading bytes is enough for use, or open them with tokenize.open() if we need string data, or use token.detect_encoding() and pass the result to open

[issue41435] Allow to retrieve ongoing exception handled by every threads

2020-08-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Would not be more useful to add a method to the Thread or frame object to obtain the topmost handled exception? Then you could iterate all threads or frames and obtain exceptions together with other useful information. Note also that it omits exceptions

[issue41457] Implement random.shuffled

2020-08-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue26393 and issue27964. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> random.shuffled ___ Py

[issue41421] Random.paretovariate sometimes raises ZeroDivisionError for small alpha

2020-07-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: +1 for "u ** (-1.0 / alpha)"! -- ___ Python tracker <https://bugs.python.org/issue41421> ___ ___ Python-bugs-l

[issue41431] Optimize dict_merge for copy

2020-07-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka, yselivanov ___ Python tracker <https://bugs.python.org/issue41431> ___ ___ Python-bugs-list mailin

[issue41422] C Unpickler memory leak via memo

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

[issue41421] Random.paretovariate sometimes raises ZeroDivisionError for small alpha

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

[issue41417] SyntaxError: assignment expression within assert

2020-07-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is a duplicate of issue39909. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Assignment expression in assert causes SyntaxError __

[issue41395] pickle and pickletools cli interface doesn't close input and output file.

2020-07-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +easy ___ Python tracker <https://bugs.python.org/issue41395> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41409] deque.pop(index) is not supported

2020-07-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If deque does not fully support the MutableSequence interface, should not it be un-regitered as MutableSequence? Maybe we need other abstract class which would be parent of MutableSequence and deque? -- nosy: +stutzbach

[issue40841] Provide mimetypes.sniff API as stdlib

2020-07-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think that both functions for detecting file type, by name and by content, are useful in different circumstances. We have similar more specific detection functions sndhdr and imghdr. But I am not sure whether it should be a part of the mimetypes module

[issue41416] Restore default implementation of __ne__ in mixins Set and Mapping

2020-07-28 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : According to the documentation [1] abstract classes collections.abc.Set and collections.abc.Mapping provide mixin method __ne__. But implementations of __ne__ in these classes were removed in 3.4 (see issue21408), so the default implementation

[issue41416] Restore default implementation of __ne__ in mixins Set and Mapping

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

[issue41416] Restore default implementation of __ne__ in mixins Set and Mapping

2020-07-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: -20795 ___ Python tracker <https://bugs.python.org/issue41416> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41401] Using non-ascii that require UTF-8 breaks AIX testing

2020-07-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Automatic backport does not work due to changes in the test.support module. Victor, do you mind to backport PR 21640 to 3.9 and 3.8? -- nosy: +vstinner ___ Python tracker <https://bugs.python.org/issue41

[issue41401] Using non-ascii that require UTF-8 breaks AIX testing

2020-07-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 67987acd5dc9776f55f4e139e2b3d9e7a6434d9f by Serhiy Storchaka in branch 'master': bpo-41401: Fix test_fspath_support in test_io. (GH-21640) https://github.com/python/cpython/commit/67987acd5dc9776f55f4e139e2b3d9e7a6434d9f

[issue41409] deque.pop(index) is not supported

2020-07-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: >>> issubclass(collections.deque, collections.abc.MutableSequence) True >>> sorted(set(dir(collections.abc.MutableSequence)) - >>> set(dir(collections.deque))) ['__abstractmethods__', '__module__', '__slots__', '_ab

[issue41409] deque.pop(index) is not supported

2020-07-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: deque is not a subclass of MutableMapping, so the Liskov substitution principle is not related here. deque is not registered as a virtual subclass of MutableMapping and it lacks a number of MutableMapping methods. >>> import collec

[issue41401] Using non-ascii that require UTF-8 breaks AIX testing

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

[issue41401] Using non-ascii that require UTF-8 breaks AIX testing

2020-07-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are two errors in test_io, both are not related to AIX. The first one is in test_fspath_support. It is exposed on non-UTF-8 locales. AIX by accident use ISO8859-1 locale by default. The second one is in test_reader_writer_close_error_on_close

[issue41397] Restore default implementation of __ne__ in Counter

2020-07-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The current code returns NotImplemented for non-Counter. If we want to implement equality comparison with other class we have to override __ne__. -- ___ Python tracker <https://bugs.python.org/issue41

[issue41400] Remove references to nonexisting __ne__ methods

2020-07-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is it good to provide incorrect information in the documentation? It is a matter of correctness, not style. -- ___ Python tracker <https://bugs.python.org/issue41

[issue18280] Documentation is too personalized

2020-07-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think they are not required, but recommended. >From https://www.python.org/dev/peps/pep-0008/#comments: You should use two spaces after a sentence-ending period in multi- sentence comments, except after the final sentence. >From

[issue41401] Using non-ascii that require UTF-8 breaks AIX testing

2020-07-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your report (and for all other heroic work for maintaining AIX). Breaking only one test on AIX looks like a good news. Do you able to run tests manually? Could you please run the following command? ./python -m test --list-cases -uall

[issue41288] Pickle crashes unpickling invalid NEWOBJ_EX opcode

2020-07-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not think it is a security issue. The crash cannot be triggered by the user input unless you accept the pickle data from untrusted sources, but in that case you are in large danger, because you allow executing arbitrary code. The changes

[issue41399] Add stacklevel support for exceptions

2020-07-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: warnings.warn(), the function which emits warnings, has the stacklevel parameter. But how do you provide stacklevel for exceptions? See also bpo-39725. -- nosy: +serhiy.storchaka ___ Python tracker <ht

[issue41400] Remove references to nonexisting __ne__ methods

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

[issue41400] Remove references to nonexisting __ne__ methods

2020-07-26 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : There is the documentation for method __ne__ implementations in classes Set, Mapping, Header, Charset, Binary, but all these implementations are removed now and the default implementation of object.__ne__ is used instead. -- assignee: docs

[issue41397] Restore default implementation of __ne__ in Counter

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

[issue41397] Restore default implementation of __ne__ in Counter

2020-07-26 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Currently collections.Counter implements both __eq__ and __ne__ methods. The problem is that if you subclass Counter and override its __eq__ method you will need to implement also the __ne__ method. Usually you do not need to implement __ne__ because

[issue41373] IDLE: edit/save files created by Windows Explorer

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

[issue41385] test_executable_without_cwd fails on appx test run in Azure pipelines

2020-07-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b1a87300a06324c9fc7d6553906ed914489465aa by Serhiy Storchaka in branch 'master': bpo-41385: Fix test_executable_without_cwd on Windows (GH-21608) https://github.com/python/cpython/commit/b1a87300a06324c9fc7d6553906ed914489465aa

[issue41395] pickle and pickletools cli interface doesn't close input and output file.

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

[issue41393] Fix FAQ example to use __import__('functools').reduce

2020-07-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41385] test_executable_without_cwd fails on appx test run in Azure pipelines

2020-07-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch nosy: +serhiy.storchaka nosy_count: 5.0 -> 6.0 pull_requests: +20750 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21608 ___ Python tracker <https://bugs.p

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

2020-07-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: -20743 ___ Python tracker <https://bugs.python.org/issue41280> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41378] IDLE EOL convention not set on a empty file

2020-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is a duplicate of issue41373 (and the problem is not only with empty files). -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> IDLE: edit/save files created by Wind

[issue41377] memoryview of str (unicode)

2020-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Raymond. Also, it could not help to caught bugs when you get a string instead expected bytes object. It may "work" in tests while string is ASCII, but fail miserably on real-world non-ASCII data. -- nosy: +serhiy

[issue41375] `mode` security concern

2020-07-23 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> not a bug ___ Python tracker <https://bugs.python.org/issue41375> ___ ___ Python-bugs-list mailing list Un

[issue41375] `mode` security concern

2020-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is expected behavior on Posix system. See https://pubs.opengroup.org/onlinepubs/9699919799/functions/umask.html What is the problem? -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.

[issue37095] [Feature Request]: Add zstd support in tarfile

2020-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The tarfile module supports arbitrary compressions by using the stream mode. You only need to use a third-party library which provides zstd support. Recent versions of the tar utility has options to explicit support of new compressions: --lzip, --lzma

[issue41373] IDLE: edit/save files created by Windows Explorer

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

[issue41373] IDLE: edit/save files created by Windows Explorer

2020-07-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I missed that the file's attribute newlines can be None if no line separators were read. It can also be a tuple if mixed newlines are used. I think that eol_convention should be set to the default value os.linesep in these cases. I am currently not able

[issue41288] Pickle crashes unpickling invalid NEWOBJ_EX opcode

2020-07-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This fix touched the unpickling code, and the test crashed during pickling, so it is not directly related. But it may be some compiler glitch, when changing one part of code affects compilation of other parts of code. The next run on the buildbot

[issue41361] Converting collections.deque methods to Argument Clinic

2020-07-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Now Argument Clinic generates more efficient (but more cumbersome) code, so there may be new reasons of using it. Please test the performance of the deque constructor (deque(), deque(()), deque((), 10), deque((), maxlen=10)), methods index() and rotate

[issue41288] Pickle crashes unpickling invalid NEWOBJ_EX opcode

2020-07-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- status: closed -> open ___ Python tracker <https://bugs.python.org/issue41288> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue41361] Converting collections.deque methods to Argument Clinic

2020-07-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue20180. collections.deque was intentionally not converted to Argument Clinic, but some of methods were made using more efficient code for parsing arguments by inlining the code generated by Argument Clinic at that time. -- nosy

[issue41334] Convert str(), bytes() and bytearray() to Argument Clinic

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

[issue41342] Convert int.__round__ to Argument Clinic

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

[issue41343] Convert complex methods to Argument Clinic

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

[issue41342] Convert int.__round__ to Argument Clinic

2020-07-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 5a2bac7fe0e7a2b67fd57c7a9176a50feed0d7a0 by Serhiy Storchaka in branch 'master': bpo-41342: Convert int.__round__ to Argument Clinic (GH-21549) https://github.com/python/cpython/commit/5a2bac7fe0e7a2b67fd57c7a9176a50feed0d7a0

[issue41343] Convert complex methods to Argument Clinic

2020-07-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset e123012d79121ab543583631bb84c7fc27d06338 by Dong-hee Na in branch 'master': bpo-41343: Convert methods of complex to Argument Clinic (GH-21550) https://github.com/python/cpython/commit/e123012d79121ab543583631bb84c7fc27d06338

[issue41336] Sporadic segfaults during zoneinfo object creation stopped using Ctrl-C

2020-07-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset eca2549f5a5048b44ca88b9555f1c62f094e3c12 by Zackery Spytz in branch 'master': bpo-41336: Fix the error handling in zoneinfo_new_instance() (GH-21546) https://github.com/python/cpython/commit/eca2549f5a5048b44ca88b9555f1c62f094e3c12

[issue41334] Convert str(), bytes() and bytearray() to Argument Clinic

2020-07-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 12f433411bba8a0cdc4f09ba34472745ae9da0d1 by Serhiy Storchaka in branch 'master': bpo-41334: Convert constructors of str, bytes and bytearray to Argument Clinic (GH-21535) https://github.com/python/cpython/commit

[issue41342] Convert int.__round__ to Argument Clinic

2020-07-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, you can do this without Argument Clinic, but Argument Clinic allows to hide the use of unstable private API and cumbersome code under macros and in generated files. > That said, it would be great if someone were to work on building-out

[issue41343] Convert complex methods to Argument Clinic

2020-07-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I wrote similar patch for __format__ and got similar tiny speed up. It is expectable. But I am surprised that you get a difference for conjugate() and __getnewargs__. It may be a compiler artifact. In any case the benefit of converting to Argument Clinic

[issue41342] Convert int.__round__ to Argument Clinic

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

[issue41342] Convert int.__round__ to Argument Clinic

2020-07-19 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : int.__round__ was not converted to Argument Clinic because it is not impossible to express a correct signature for it in Python. But now we can at least make Argument Clinic not producing incorrect signature. And converting to Argument Clinic has

[issue41338] test_decimal emits DeprecationWarning due to PyUnicode_FromUnicode(NULL, size)

2020-07-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka nosy_count: 2.0 -> 3.0 pull_requests: +20685 pull_request: https://github.com/python/cpython/pull/21543 ___ Python tracker <https://bugs.python.org/issu

[issue41333] Convert OrderedDict.pop() to Argument Clinic

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

[issue41333] Convert OrderedDict.pop() to Argument Clinic

2020-07-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 6bf3237379b17632db52cb39d181e8bac70173f3 by Serhiy Storchaka in branch 'master': bpo-41333: Convert OrderedDict.pop() to Argument Clinic (GH-21534) https://github.com/python/cpython/commit/6bf3237379b17632db52cb39d181e8bac70173f3

[issue41334] Convert str(), bytes() and bytearray() to Argument Clinic

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

[issue41334] Convert str(), bytes() and bytearray() to Argument Clinic

2020-07-18 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Constructors str(), bytes() and bytearray() were not converted to Argument Clinic because it was not possible to generate correct signature for them. But now there is other reason of using Argument Clinic -- it generates more efficient code for parsing

[issue41333] Convert OrderedDict.pop() to Argument Clinic

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

[issue41333] Convert OrderedDict.pop() to Argument Clinic

2020-07-18 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The proposed PR converts OrderedDict.pop() to Argument Clinic. It makes it 2 times faster. $ ./python -m pyperf timeit -q --compare-to=../cpython-release2/python -s "from collections import OrderedDict; od = OrderedDict()" "od.pop('

[issue41262] Convert memoryview to Argument Clinic

2020-07-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not have other benchmarks. memoryview was just one of few builtins which still use PyArg_ParseTupleAndKeywords() and I know how inefficient it is. Since Argument Clinic was already used for memoryview.hex() I did not see problems with converting

[issue41330] Inefficient error-handle for CJK encodings

2020-07-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In the Web application you need first to generate data (this may involve some network requests, IO operations, and some data transformations), then format the page, then encode it, and finally send it to client. I suppose that the encoding part is minor

[issue41262] Convert memoryview to Argument Clinic

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

[issue41262] Convert memoryview to Argument Clinic

2020-07-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 80a50368c0e4dc9d56af0ce748dea35c9d96d23f by Serhiy Storchaka in branch 'master': bpo-41262: Convert memoryview to Argument Clinic. (GH-21421) https://github.com/python/cpython/commit/80a50368c0e4dc9d56af0ce748dea35c9d96d23f

[issue41288] Pickle crashes unpickling invalid NEWOBJ_EX opcode

2020-07-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b4c98ed41e6c959e95b2a6f65c1b728e94039dfd by Serhiy Storchaka in branch 'master': bpo-41288: Refactor of unpickling NEWOBJ and NEWOBJ_EX opcodes. (GH-21472) https://github.com/python/cpython/commit/b4c98ed41e6c959e95b2a6f65c1b728e94039dfd

[issue41330] Inefficient error-handle for CJK encodings

2020-07-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am not even sure it was worth to add fast path for "xmlcharrefreplace". "surrogateescape" and "surrogatepass" are most likely used in performance critical cases. It is also easy to add support of "ignore" and

[issue41322] unittest: deprecate test methods returning non-None values

2020-07-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is also a good idea for linters to catch such kind of errors. It will help users of older Python versions. We cannot raise error without deprecation period or add warnings in old versions because it potentially can break existing code, e.g.: def

[issue41321] Calculate timestamp is wrong in datetime.datetime

2020-07-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It depends on timezone. I guess there was a switch to daylight saving time at that time and place. -- nosy: +belopolsky, lemburg, p-ganssle, serhiy.storchaka ___ Python tracker <https://bugs.python.

[issue41322] unittest: Generator test methods will always be marked as passed

2020-07-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I would raser raise error if the test method returns something suspicious, like generator or coroutine. Or maybe if it returns anything except None. -- nosy: +serhiy.storchaka ___ Python tracker <ht

[issue41310] micro-optimization: increase our float parsing speed by Nx

2020-07-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: CPython is written on C, not C++, so we cannot use std::from_chars. Note also that to parse a number in JSON we need first to scan the PyUnicode object character-by-character using PyUnicode_READ() which is slower than just reading a byte from a memory

[issue40150] (minor) mismatched argument in overlapped_RegisterWaitWithQueue call to RegisterWaitForSingleObject

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

[issue40150] (minor) mismatched argument in overlapped_RegisterWaitWithQueue call to RegisterWaitForSingleObject

2020-07-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset af4eda46d1538b1da700a86588bdb94b0a4d1ff2 by Zackery Spytz in branch 'master': bpo-40150: Fix mismatched argument in RegisterWaitForSingleObject() call (GH-19686) https://github.com/python/cpython/commit

[issue33007] Objects referencing private-mangled names do not roundtrip properly under pickling.

2020-07-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka versions: +Python 3.10 -Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue33

[issue23860] Windows: Failure to check return value from lseek() in Modules/mmapmodule.c

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

[issue20183] Derby #14: Convert 41 sites to Argument Clinic across 5 files

2020-07-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset bbceef6851895135c80e588a55854c1afab46499 by Zackery Spytz in branch 'master': bpo-20183: Convert _locale to the Argument Clinic (GH-14201) https://github.com/python/cpython/commit/bbceef6851895135c80e588a55854c1afab46499 -- nosy

[issue41288] Pickle crashes unpickling invalid NEWOBJ_EX opcode

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

[issue41288] Pickle crashes unpickling invalig NEWOBJ_EX opcode

2020-07-13 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- title: Pickle crashes using a crafted datetime object -> Pickle crashes unpickling invalig NEWOBJ_EX opcode ___ Python tracker <https://bugs.python.org/issu

[issue41288] Pickle crashes using a crafted datetime object

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

[issue41288] Pickle crashes using a crafted datetime object

2020-07-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> serhiy.storchaka components: +Extension Modules -Interpreter Core nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issu

  1   2   3   4   5   6   7   8   9   10   >