[issue40670] supplying an empty string to timeit causes an IndentationError

2020-09-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 557b9a52edc4445cec293f2cc2c268c4f564adcf by Serhiy Storchaka in branch 'master': bpo-40670: More reliable validation of statements in timeit.Timer. (GH-22358) https://github.com/python/cpython/commit/557b9a52edc4445cec293f2cc2c268

[issue41833] threading.Thread: use target name if the name parameter is omitted

2020-09-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And what if run different threads with the same target or with different targets with the same name? Would not "Thread-3" be more useful in this case? for i in range(10): Thread(target=print, args=(i,)).start() for i in range(10): de

[issue41827] 2D array issue

2020-09-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See https://docs.python.org/3/faq/programming.html#how-do-i-create-a-multidimensional-list. -- nosy: +serhiy.storchaka status: pending -> open ___ Python tracker <https://bugs.python.org/issu

[issue41845] Promote PyObject_GenericGetDict to the stable API

2020-09-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It was moved out from the limited API in issue13903 (7d95e4072169911b228c9e42367afb5f17fd3db0). I think it was error. -- nosy: +Mark.Shannon, serhiy.storchaka ___ Python tracker <https://bugs.python.

[issue41833] threading.Thread: use target name if the name parameter is omitted

2020-09-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ideally, I would prefer separate counters for different names, and omitting a number for the first thread with unique name: doit doit-2 Thread-1 Thread-2 print print-2 doit-3 But it is not feasible. It would require supporting a cache which

[issue41845] Promote PyObject_GenericGetDict to the stable API

2020-09-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It was moved into the "#ifndef Py_LIMITED_API" block and therefore was effectively excluded from the limited API. We should fix this error in all maintained versions. -- versions: +Python 3.8,

[issue41849] Support reading long lines with io._WindowsConsoleIO

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

[issue41848] PEG parser doesn't allow lambda in for_if_clause

2020-09-23 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +benjamin.peterson, gvanrossum, pablogsal, serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue41848> ___ ___

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2020-09-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is a bug. Compiler explicitly checks if the number of nested "try" blocks does not exceed the limit of CO_MAXBLOCKS, but it does not count implicit "try" blocks inserted when your assign an exception in the "

[issue39934] Fatal Python error "XXX block stack overflow" when exception stacks >10

2020-09-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Humm, my supposition was not absolutely correct. The cause is that the compiler and the interpreter use the stack of size CO_MAXBLOCKS for different things. The interpreter pushes a thing for the "except" clause, while the compiler does

[issue41852] Inconsistent errors for JSON-encoding NaNs with allow_nan=False

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

[issue41860] random.choices() raises "int too large" error while random.randint does not

2020-09-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is virtually a duplicate of issue40388. -- nosy: +mark.dickinson, rhettinger, serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue41

[issue33867] Module dicts are wiped on module garbage collection

2020-09-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41871] Add PyList_Remove() in listobject.c

2020-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You always can use PyObject_CallMethod(). It is not a method called in tight loop for which the overhead of calling method is significant. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.

[issue17490] Improve ast.literal_eval test suite coverage

2020-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: literal_eval() is not purposed to evaluate arbitrary arithmetic expressions. It is only purposed to handle strings produced by repr() of some simple builtin objects. repr(6j+3) is '(3+6j)', not '(6j+3)' and not '(6j--3)', so i

[issue41842] Add codecs.unregister() to unregister a codec search function

2020-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If add a function for unregistering a codec search function, it would be worth to add also a function for unregistering an error handler. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.

[issue23706] pathlib.Path.write_text should include a newline argument

2020-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It should work exactly as the newline argument of open(). Anything else would be surprising. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue23

[issue41756] Do not always use exceptions to return result from coroutine

2020-09-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, I meant a function which combines PyGen_Send, tp_iternext and _PyGen_FetchStopIterationValue. Was not it in your PR? -- ___ Python tracker <https://bugs.python.org/issue41

[issue41842] Add codecs.unregister() to unregister a codec search function

2020-09-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Although unregistering an error handler may be not so easy, so it is better to open a separate issue for it. -- keywords: +easy (C) -patch ___ Python tracker <https://bugs.python.org/issue41

[issue41851] tkinter: add font equal methods

2020-09-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Tal that negating size would be useless feature, and that we do not need an alternate equal() method. When we want to test that two strings are equal ignoring case we do not call a special method equalignorecase(), we just test that s1

[issue41876] Add __repr__ for Tkinter Font objects

2020-09-28 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Currently Font objects have default repr: Since Font is just an object oriented wrapper for font name, and Font objects with the same name are equal, it is worth to show the font name in the repr and do not show an id. -- components

[issue40554] Add escape to the glossary?

2020-09-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Raymond. Are there problems with understanding the term "escape" in some context? If yes, then we perhaps need to clarify the corresponding place in the documentation. But if there is a problem with understanding the general word &

[issue41881] New Line escape issue in raw strings

2020-09-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is expected behavior. \n in a raw string means two characters, backslash and "n", not a single newline character. Use non-raw string to embed a newline character. -- nosy: +serhiy.storchaka

[issue41876] Add __repr__ for Tkinter Font objects

2020-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a new feature. We do not backport new features to old versions unless they fix some design bug. Nothing bad will happen if we DO NOT backport it. -- ___ Python tracker <https://bugs.python.

[issue41884] tempfile.py TemporaryDirectory/mkdtemp defaults to mode 0o700, propose to add mode argument

2020-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You can change permissions after creating the directory. The C function mkdtemp() creates the directory with permissions 0o700. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue41

[issue41871] Add PyList_Remove() in listobject.c

2020-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PyList_SetSlice() allows to remove an item by index, as in `del a[i]`. list.remove() searches the item by value and removes the first occurrence. You can implement it via PySequence_Index() and PyList_SetSlice(), but it is more convenient to just call the

[issue41890] crypt produces wrong hashes for passwords containing newline character

2020-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For openssl and mkpasswd the password does not contain the newline character. It contains a pair of characters "\" and "n". And the crypt module produces the same output for it: $ python3 -c 'import crypt; print(crypt.crypt(r&

[issue41892] use both "for in" and "ElementTree.remove" has a index bug

2020-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You will get the same behavior for lists: >>> a = [1, 2, 3] >>> for x in a: ... if x == 1: ... a.remove(x) ... print(x) ... 1 3 Lists are iterated by index. First you get an item at index 0, then at index 1, etc, to t

[issue41892] use both "for in" and "ElementTree.remove" has a index bug

2020-09-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> docs@python components: +Documentation nosy: +docs@python, eli.bendersky, scoder ___ Python tracker <https://bugs.python.org/issu

[issue41897] ast.parse in Python 3.9 does not produce SyntaxError for assignment to __debug__

2020-09-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +BTaskaya, gvanrossum, pablogsal ___ Python tracker <https://bugs.python.org/issue41897> ___ ___ Python-bugs-list mailin

[issue41901] Added some explaining to pickle errors.

2020-10-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It was intentionally left a generic "cannot pickle 'type' object". Because there are many ways to make an object pickleable, and it is non-pickleable in all other cases. * "missing `__getstate__()` on variable-length object"

[issue17490] Improve ast.literal_eval test suite coverage

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

[issue17490] Improve ast.literal_eval test suite coverage

2020-10-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: -21504 ___ Python tracker <https://bugs.python.org/issue17490> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41802] Missing documentation for 'PyDict_DelItem' behavior

2020-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 20ce62f00957d11f24f6449cd5c0ef5dd67174d4 by Campbell Barton in branch 'master': bpo-41802: Document 'PyDict_DelItem' can raise a 'KeyError' (GH-22291) https://github.com/python/cpython/commit/20ce62f009

[issue41802] Missing documentation for 'PyDict_DelItem' behavior

2020-10-02 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> docs@python components: +Documentation nosy: +docs@python resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement ___ Python tracker <https

[issue40391] io.FileIO.mode doesn't comply with the docs

2020-10-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is a duplicate of issue25341. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> File mode wb+ appears as rb+ ___ Python tra

[issue41909] Segfault on __getattr__ infinite recursion on certain attribute accesses

2020-10-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Interesting, when lookup any attribute you will get a RecursionError, but this is one of only two places where the recursion check is disabled (the other one is in interning strings). You get a crash also when call isinstance(1, instance) or issubclass

[issue41921] REDoS in parseentities

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

[issue41909] Segfault on __getattr__ infinite recursion on certain attribute accesses

2020-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Antoine give me a hint. The problem seems related to using PyDict_GetItem() when look up an attribute in the instance dict. It silences all exceptions (including RecursionError) and this results in silent "no such key in a dict". But since

[issue41909] Segfault on __getattr__ infinite recursion on certain attribute accesses

2020-10-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +21539 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22536 ___ Python tracker <https://bugs.python.org/issu

[issue41927] Why is there no documentation in Russian?

2020-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Closed as an obvious trolling. -- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41909] Segfault on __getattr__ infinite recursion on certain attribute accesses

2020-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 9ece9cd65cdeb0a1f6e60475bbd0219161c348ac by Serhiy Storchaka in branch 'master': bpo-41909: Enable previously disabled recursion checks. (GH-22536) https://github.com/python/cpython/commit/9ece9cd65cdeb0a1f6e60475bbd021

[issue41909] Segfault on __getattr__ infinite recursion on certain attribute accesses

2020-10-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +21548 pull_request: https://github.com/python/cpython/pull/22550 ___ Python tracker <https://bugs.python.org/issue41

[issue41909] Segfault on __getattr__ infinite recursion on certain attribute accesses

2020-10-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +21549 pull_request: https://github.com/python/cpython/pull/22551 ___ Python tracker <https://bugs.python.org/issue41

[issue41936] Remove macros Py_ALLOW_RECURSION/Py_END_ALLOW_RECURSION

2020-10-04 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Macros Py_ALLOW_RECURSION and Py_END_ALLOW_RECURSION together with field recursion_critical of the PyInterpreterState structure were added in 5b222135f8d2492713994f2cb003980e87ce6a72 but were never documented. It seems that the reason of adding them was

[issue41909] Segfault on __getattr__ infinite recursion on certain attribute accesses

2020-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 09a7b3b618cd02694a0bc8abfa24c75f0e659407 by Serhiy Storchaka in branch '3.8': [3.8] bpo-41909: Enable previously disabled recursion checks. (GH-22536) (GH-22551) https://github.com/python/cpyt

[issue41909] Segfault on __getattr__ infinite recursion on certain attribute accesses

2020-10-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 7aa22ba923509af1dbf115c090964f503c84ca8d by Serhiy Storchaka in branch '3.9': [3.9] bpo-41909: Enable previously disabled recursion checks. (GH-22536) (GH-22550) https://github.com/python/cpyt

[issue41936] Remove macros Py_ALLOW_RECURSION/Py_END_ALLOW_RECURSION

2020-10-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +21550 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22552 ___ Python tracker <https://bugs.python.org/issu

[issue41909] Segfault on __getattr__ infinite recursion on certain attribute accesses

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

[issue41940] AMD64 Debian root 3.x: tests fail because downloaded files start with:

2020-10-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is also not safe to pass data downloaded from untrusted source to eval(). -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue41

[issue41936] Remove macros Py_ALLOW_RECURSION/Py_END_ALLOW_RECURSION

2020-10-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset dcc54215ac1eb4b6fab2a9ffe1abcdf3ac4bb77e by Serhiy Storchaka in branch 'master': bpo-41936. Remove macros Py_ALLOW_RECURSION/Py_END_ALLOW_RECURSION (GH-22552) https://github.com/python/cpython/commit/dcc54215ac1eb4b6fab2a9ffe1abcd

[issue41936] Remove macros Py_ALLOW_RECURSION/Py_END_ALLOW_RECURSION

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

[issue28343] Bad encoding alias cp936 -> gbk: euro sign

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

[issue41944] Python testsuite calls eval() on content received via HTTP

2020-10-05 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : As was reported by Florian Bruhin, Python testsuite calls eval() on content received via HTTP (in Lib/test/multibytecodec_support.py). -- components: Tests messages: 378036 nosy: The Compiler, serhiy.storchaka, vstinner priority: normal severity

[issue41944] Python testsuite calls eval() on content received via HTTP

2020-10-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +21561 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22566 ___ Python tracker <https://bugs.python.org/issu

[issue40430] ast.Slice is no longer a subclass of ast.slice

2020-10-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Even if make ast.Slice a (virtual) subclass of ast.slice it will not help much, because we cannot do it for ast.Index and ast.ExtSlice. ast.ExtSlice is not replaced with ast.Tuple, and any node type can now be used instead of ast.Index. The code that does

[issue26680] Incorporating float.is_integer into the numeric tower and Decimal

2020-10-06 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- priority: normal -> release blocker ___ Python tracker <https://bugs.python.org/issue26680> ___ ___ Python-bugs-list mai

[issue41944] [security] Python testsuite calls eval() on content received via HTTP

2020-10-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 2ef5caa58febc8968e670e39e3d37cf8eef3cab8 by Serhiy Storchaka in branch 'master': bpo-41944: No longer call eval() on content received via HTTP in the CJK codec tests (GH-22566) https://github.com/python/cpyt

[issue41974] Remove complex.__float__, complex.__floordiv__, etc

2020-10-07 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The complex class has special methods which always raise a TypeError: __int__ __float__ __floordiv__ __mod__ __divmod__ After removing them the corresponding operations (converting to int and float, operators // and %, function divmod

[issue41974] Remove complex.__float__, complex.__floordiv__, etc

2020-10-08 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +21582 stage: -> patch review pull_request: https://github.com/python/cpython/pull/22593 ___ Python tracker <https://bugs.python.org/issu

[issue41974] Remove complex.__float__, complex.__floordiv__, etc

2020-10-08 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +lemburg, mark.dickinson, rhettinger, stutzbach ___ Python tracker <https://bugs.python.org/issue41974> ___ ___ Python-bug

[issue41966] datetime.time issue with pickling in PyPy

2020-10-08 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka versions: -Python 3.5, Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue41

[issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale

2020-10-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think that it is more correct to use the locale encoding. If error messages are translated for readability, we should not ruin this by outputting \xXX. -- nosy: +serhiy.storchaka ___ Python tracker <ht

[issue41972] bytes.find consistently hangs in a particular scenario

2020-10-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is the content of "data.bin"? How can we reproduce the issue? -- nosy: +serhiy.storchaka versions: +Python 3.10 ___ Python tracker <https://bugs.python.o

[issue41894] UnicodeDecodeError during load failure in non-UTF-8 locale

2020-10-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In os.strerror() and PyErr_SetFromErrnoWithFilenameObjects() we use PyUnicode_DecodeLocale(s, "surrogateescape") for decoding the result of strerror(). -- ___ Python tracker <https://bugs.python.o

[issue41958] importlib has not util module

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

[issue41979] PEG parser doesn't accept extended unpacking in with statement

2020-10-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +benjamin.peterson, gvanrossum, pablogsal ___ Python tracker <https://bugs.python.org/issue41979> ___ ___ Python-bugs-list m

[issue41974] Remove complex.__float__, complex.__floordiv__, etc

2020-10-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset e2ec0b27c02a158d0007c11dcc1f2d7a95948712 by Serhiy Storchaka in branch 'master': bpo-41974: Remove complex.__float__, complex.__floordiv__, etc (GH-22593) https://github.com/python/cpython/commit/e2ec0b27c02a158d0007c11dcc1f2d

[issue41974] Remove complex.__float__, complex.__floordiv__, etc

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

[issue41831] Restore default __str__ of tkinter.EventType

2020-10-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset f25323a307a72c40862c87c2df822f83be6645da by Serhiy Storchaka in branch 'master': bpo-41831: Add tests for tkinter.Event.__repr__ (GH-22354) https://github.com/python/cpython/commit/f25323a307a72c40862c87c2df822f

[issue41985] Argument Clinic: add converter for file descriptor

2020-10-09 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Local converters for file descriptors which uses PyObject_AsFileDescriptor() are defined and used in several files: Modules/fcntlmodule.c, Modules/posixmodule.c, Modules/selectmodule.c, Modules/termios.c. The proposed PR replaces them all with a global

[issue41985] Argument Clinic: add converter for file descriptor

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

[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

2020-10-09 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Py_FileSystemDefaultEncodeErrors was added to limited API in 3.7 and Py_UTF8Mode -- in 3.7. But in 3.8 their declarations are not available if Py_LIMITED_API is defined because they were moved to different header file included only if Py_LIMITED_API is

[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

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

[issue41831] Restore default __str__ of tkinter.EventType

2020-10-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 43c3eafa1bcdc522870e112d3e2d67ce2451c34b by Miss Skeleton (bot) in branch '3.9': bpo-41831: Add tests for tkinter.Event.__repr__ (GH-22354) (GH-22617) https://github.com/python/cpython/commit/43c3eafa1bcdc522870e112d3e2d67

[issue41831] Restore default __str__ of tkinter.EventType

2020-10-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset eb38c6b7aa35d3003ec0958533421902d19ce408 by Serhiy Storchaka in branch 'master': bpo-41831: Restore str implementation of __str__ in tkinter.EventType (GH-22355) https://github.com/python/cpyt

[issue41985] Argument Clinic: add converter for file descriptor

2020-10-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 9975cc5008c795e069ce11e2dbed2110cc12e74e by Serhiy Storchaka in branch 'master': bpo-41985: Add _PyLong_FileDescriptor_Converter and AC converter for "fildes". (GH-22620) https://github.com/p

[issue41985] Argument Clinic: add converter for file descriptor

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

[issue41831] Restore default __str__ of tkinter.EventType

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

[issue41991] Remove _PyObject_HasAttrId

2020-10-10 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : _PyObject_HasAttrId() can return -1, 0 or 1. It returns -1 when cannot create a string (most likely due to MemoryError or UnicodeDecodeError), but returns 0 and silences all exceptions raised when look up the attribute (including MemoryError

[issue41991] Remove _PyObject_HasAttrId

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

[issue41991] Remove _PyObject_HasAttrId

2020-10-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This function was kept after previous clean because all its usages was in the code which silences all exceptions in any case, so using _PyObject_HasAttrId did not do additional harm. But now it is used also in the new code in Objects/unionobject.c. It is

[issue38605] [typing] PEP 563: Postponed evaluation of annotations: enable it by default in Python 3.10

2020-10-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: test_grammar and test_pydoc became failed on my machine until I removed all .pyc files. We need to bump the magic number for .pyc files. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.

[issue41993] Possible issues when remove not completely initialized module from sys.module

2020-10-10 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : There are several issues in remove_module() in Python/import.c. 1. PyMapping_HasKey() is used to determine if the module was in sys.modules before removing it. But it can return 0 not only when the key is absent in the mapping, but also when some

[issue41993] Possible issues when remove not completely initialized module from sys.module

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

[issue41994] Refcount issues in import

2020-10-10 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : There is a reference leak in import_add_module(). PyDict_GetItemWithError() returns a borrowed reference, but PyObject_GetItem() return a non-borrowed reference. If sys.modules is not a dict, there is a reference leak. import_add_module() and several

[issue41994] Refcount issues in import

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

[issue41995] five possible Null Pointer Dereference bugs.

2020-10-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +vstinner versions: +Python 3.10 -Python 3.5, Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue41

[issue41995] five possible Null Pointer Dereference bugs.

2020-10-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +p-ganssle ___ Python tracker <https://bugs.python.org/issue41995> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41998] JSON Encoder Injection Using Indent

2020-10-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The code works as expected. I do not think there is a problem with the json module. If some application accepts user input and use it without validation to control the formatting of sensitive data, it is a vulnerability in this application, not in tools

[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

2020-10-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It solves the breaking of the C API. Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode were not deprecated, they were just suddenly excluded from the limited API. And seems this change was not intentional, otherwise surrounding #ifdef/#endif (which

[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

2020-10-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 637a09b0d6e3ad4e34e0b5e0fc82f5afeae6f74b by Serhiy Storchaka in branch 'master': bpo-41986: Add Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode back to limited API (GH-22621) https://github.com/python/cpyt

[issue41991] Remove _PyObject_HasAttrId

2020-10-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 98c4433a81a4cd88c7438adbee1f2aa486188ca3 by Serhiy Storchaka in branch 'master': bpo-41991: Remove _PyObject_HasAttrId (GH-22629) https://github.com/python/cpython/commit/98c4433a81a4cd88c7438adbee1f2a

[issue41986] Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode are not available with limited API

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

[issue42002] Clean up initialization of the sys module

2020-10-10 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : _PySys_InitCore() and _PySys_InitMain() in Python/sysmodule.c contains many invocations of macros for setting attributes of the sys module. The proposed PR changes these macros. 1. SET_SYS_FROM_STRING was renamed to just SET_SYS. It is much shorter and

[issue42002] Clean up initialization of the sys module

2020-10-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +vstinner ___ Python tracker <https://bugs.python.org/issue42002> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42002] Clean up initialization of the sys module

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

[issue41991] Remove _PyObject_HasAttrId

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

[issue42002] Clean up initialization of the sys module

2020-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset fa1d83db62a545580d9a1a585b2c1fb55961a5c3 by Serhiy Storchaka in branch 'master': bpo-42002: Clean up initialization of the sys module. (GH-22642) https://github.com/python/cpython/commit/fa1d83db62a545580d9a1a585b2c1f

[issue41993] Possible issues when remove not completely initialized module from sys.module

2020-10-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 8287aadb75f6bd0154996424819334cd3839707c by Serhiy Storchaka in branch 'master': bpo-41993: Fix possible issues in remove_module() (GH-22631) https://github.com/python/cpython/commit/8287aadb75f6bd0154996424819334

<    35   36   37   38   39   40   41   42   43   44   >