[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

[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: ->

[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

[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

[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

[issue41547] Expose default __getstate__ and __setstate__

2020-08-13 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

[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

[issue41558] Backspace not clearing the text

2020-08-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not even think that it is a bug in Jupyter. It is expected that different output devices can support or not support specific control characters. It is rather a feature request to add support of the backslash character (and maybe other control

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

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

[issue41565] from os.path import join join('3', '{:3') return '{:3' in windows

2020-08-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Because '{' in '{:3' is a drive letter. When you open file with path '{:3' you open file with name '3' in the current directory of drive '{', not file with name '{:3' on current drive and dir

[issue41576] document BaseException in favour of bare except in error tutorial

2020-08-18 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : What a problem do you try to solve? What is wrong with the current documentation? -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue41

[issue41605] t = re.sub(".*", "*", src) has different ouput

2020-08-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41576] document BaseException in favour of bare except in error tutorial

2020-08-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is a tutorial. The purpose of this part is documenting the bare except clause. It cannot be done without using a bare except in example. There is nothing wrong with a bare except if it used properly (e.g. if the caught exception is reraised). In any

[issue41625] Add splice() to the os module

2020-08-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The API of splice() looks complicated. How would you use it in Python? Are off_in and off_out adjusted as in copy_file_range() and sendfile()? It is not clear from the man page. If they are, how would you return updated values? Are you going to add

[issue41639] Unpickling derived class of list does not call __init__()

2020-08-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: >From https://docs.python.org/3/library/pickle.html#pickling-class-instances: When a class instance is unpickled, its __init__() method is usually not invoked. If you want to change this behavior you have to implement the __reduce__ or __reduce_e

[issue41632] Tkinter - Unexpected behavior after creating around 10000 widgets

2020-08-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> third party stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue41644] builtin type kwargs

2020-08-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is rather an issue of MyPy and PyCharm. The Python interpreter itself does not perform static type testing and does not provide annotations for builtins. -- nosy: +serhiy.storchaka ___ Python tracker <ht

[issue41652] An Advice on Turning Ellipsis into Keyword

2020-08-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is Ellipsis class in the ast module. Although it is deprecated now. But I there may be Ellipsis names also in third-party libraries. Making Ellipsis a keyword would break them. -- nosy: +serhiy.storchaka

[issue41649] Can't pass Path like objects to subprocess api's on Windows.

2020-08-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not understand how you get this result. At that line of code arg can only be string, because it is a result of os.fsdecode(). Are you sure that you use Python version which includes issue31961 changes? What exactly Python version do you use

[issue41662] Bugs in binding parameters in sqlite3

2020-08-29 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : There are few bugs in the code for binding parameters specified in the sqlite3 module: 1. If argument "parameters" is a list, PyList_GET_ITEM() is called in a loop, but the size of the list is read only once before loop. Since the list can b

[issue41662] Bugs in binding parameters in sqlite3

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

[issue41638] Error message: sqlite3.ProgrammingError: You did not supply a value for binding # might be improved

2020-08-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree that the error message should contain the name of the absent parameter instead of its index when parameters are supplied as a dict. It is more informative and would consistent with other error message. As for including the number of a record in

[issue41638] Error message: sqlite3.ProgrammingError: You did not supply a value for binding # might be improved

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

[issue41637] Calling with an infinite number of parameters is not detected

2020-08-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It does not differ much from list(inf()). Sooner or later it will raise MemoryError. You can interrupt the execution by pressing Ctrl-C. Although the response may be slow if your computer started swapping. There is nothing special about unpacking infinite

[issue39994] pprint handling of dict subclasses that override __repr__

2020-08-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 582f13786bb75c73d609790967fea03a5b50148a by Irit Katriel in branch 'master': bpo-39994: Fix pprint handling of dict subclasses that override __repr__ (GH-21892) https://github.com/python/cpyt

[issue40486] pathlib's iterdir doesn't specify what happens if directory content change

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

[issue40352] SocketHandler silently drops log messages on re-connect

2020-09-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In this particular case we do not need a buffer. It is enough to reopen the socket and send the current message again. -- ___ Python tracker <https://bugs.python.org/issue40

[issue40352] SocketHandler silently drops log messages on re-connect

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

[issue41707] Builtins like int() and float() should not blindly treat buffer protocol bytes as string characters.

2020-09-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue27572. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue41707> ___ ___ Python-bug

[issue41712] REDoS in purge

2020-09-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your report yeting li. The pattern modification looks good to me. Do you mind to create a pull request? -- keywords: +easy nosy: +serhiy.storchaka stage: -> needs patch versions: +Python 3.8, Python

[issue41715] REDoS in c_analyzer

2020-09-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +eric.snow, serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue41715> ___ ___ Python-bugs-list mailin

[issue41715] REDoS in c_analyzer

2020-09-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I would use NAME_RE = re.compile(r'(?![_\d]+\Z)(?!\d)\w+', re.ASCII) or NAME_RE = re.compile(r'(?=.*[A-Za-z])(?!\d)\w+', re.ASCII) and NAME_RE.fullmatch() instead of NAME_RE.match(). But why identifiers not containing letters a

[issue26214] textwrap should minimize number of breaks in extra long words

2020-09-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The code with nested wraps is awesome. But it does not work well. >>> list(itertools.chain(*(wr(x, 5) for x in wr("123 123 1234567 12", width=5, >>> break_long_words=False ['123', '123', '12345'

[issue41715] REDoS in c_analyzer

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

[issue41720] Missed "return NotImplemented" in Vec2D.__rmul__

2020-09-04 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Vec2D.__rmul__() misses "return NotImplemented" and therefore implicitly returns None for arguments which are not int or float. >>> import turtle >>> print(object() * turtle.Vec2D(1, 2)) None -- components: Library

[issue41720] Missed "return NotImplemented" in Vec2D.__rmul__

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

[issue41638] Error message: sqlite3.ProgrammingError: You did not supply a value for binding # might be improved

2020-09-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 81715808716198471fbca0a3db42ac408468dbc5 by Serhiy Storchaka in branch 'master': bpo-41638: Improve ProgrammingError message for absent parameter. (GH-21999) https://github.com/python/cpython/commit/81715808716198471fbca0a3db42ac

[issue40486] pathlib's iterdir doesn't specify what happens if directory content change

2020-09-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 306cfb3a37e1438f6ba9f0a9f3af3c00aae4ec64 by Serhiy Storchaka in branch 'master': bpo-40486: Specify what happens if directory content change diring iteration (GH-22025) https://github.com/python/cpyt

[issue41718] test.regrtest has way too many imports

2020-09-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You could save/restore this data only when corresponded modules was imported, like it was done in clear_caches() in refleak.py. For example: # Same for Process objects def get_multiprocessing_process__dangling(self): multiprocessing_process

[issue40486] pathlib's iterdir doesn't specify what happens if directory content change

2020-09-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> enhancement versions: +Python 3.10, Python 3.8 ___ Python tracker <https://bugs.python

[issue41724] SQLite returns "str" instead of "datetime.datetime" with aggregate queries.

2020-09-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PARSE_DECLTYPES does not work for generated fields. sqlite3_column_decltype() just returns NULL. PARSE_COLNAMES works only when the column name contains the column type in square brackets. For generated fields sqlite3_column_name() returns the expression

[issue41718] test.regrtest has way too many imports

2020-09-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > > Yes, but they should be imported after running the test. Note that the > default value in the example was changed from None to set(). -- ___ Python tracker <https://bugs.python.or

[issue41720] Missed "return NotImplemented" in Vec2D.__rmul__

2020-09-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset fd4cafd4700dc03cb05fc2e5263c2666d785d6e3 by Serhiy Storchaka in branch 'master': bpo-41720: Add "return NotImplemented" in turtle.Vec2D.__rmul__(). (GH-22092) https://github.com/python/cpython/commit/fd4cafd4700dc03cb05f

[issue39610] memoryview.__len__ should raise an exception for 0d buffers

2020-09-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: But iterating it raises different type of exception, wish obscure message. >>> import ctypes >>> mem_0d = memoryview(ctypes.c_uint8(42)) >>> list(mem_0d) Traceback (most recent call last): File "", line 1, in NotImpl

[issue41720] Missed "return NotImplemented" in Vec2D.__rmul__

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

[issue41734] Refactor b32{encode,decode} tests

2020-09-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think this change is not needed. The current code is shorter and works pretty well. -- nosy: +serhiy.storchaka resolution: -> rejected stage: patch review -> resolved status: open -> closed ___ Pytho

[issue38762] Logging displays wrong "processName" if "sys.modules" is cleared in child process

2020-09-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: So this will make logging depending on the multiprocess module? Even if you do not use multiprocessing it will be imported in any case when you use logging. -- nosy: +serhiy.storchaka ___ Python tracker <ht

[issue39610] memoryview.__len__ should raise an exception for 0d buffers

2020-09-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is surprising the endianess of byte matters. -- ___ Python tracker <https://bugs.python.org/issue39610> ___ ___ Python-bug

[issue41750] unpractical printing of datetimes by the interpreter

2020-09-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The UTC timezone implementation in the stdlib works well: >>> import datetime >>> datetime.datetime(2020, 9, 9, 8, 0, tzinfo=datetime.timezone.utc) datetime.datetime(2020, 9, 9, 8, 0, tzinfo=datetime.timezone.utc) I guess yo

[issue41751] Error copying an instance of a subclass of OrderedDict

2020-09-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It would break the code which expect that __init__() be called (I do not know if there are much such code, but still). It also would not work with the original pure Python implementation of OrderedDict, which initializes the OrderedDict object in __init__

[issue41751] Error copying an instance of a subclass of OrderedDict

2020-09-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: So we are restricted by backward compatibility with the original pure Python implementation. Sometimes it is feasible to break backward compatibility, but there should be very good reasons for it

[issue41751] Error copying an instance of a subclass of OrderedDict

2020-09-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: First, closures cannot be pickled. You have to pass self.__class__ as an argument. Second, it will break compatibility with older Python versions. Pickles created in new Python could not be unpickled in older Pythons. Third, it is the behavior which does

[issue41751] Error copying an instance of a subclass of OrderedDict

2020-09-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not think there is a bug. If we ever decide to change the behavior, the changes can only go in future Python version. And if we decide to make changes, I think that it would be better to make the pure Python implementation using __new__() instead of

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

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

[issue41759] ElementTree.parse gives error message about missing1 required positional argument: 'source' but it is there

2020-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: parse() is an instance method. It should be called as tree.parse(f) (where tree is an instance of ElementTree), not ElementTree.parse(f). -- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -&g

[issue41759] ElementTree.parse gives error message about missing1 required positional argument: 'source' but it is there

2020-09-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It was not clear what you do without code and full traceback. The example uses *function* parse() from *module* ElementTree. Your code seems uses *method* parse() of *class* ElementTree. https://docs.python.org/3/library/xml.etree.elementtree.html

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

2020-09-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +easy stage: -> needs patch versions: +Python 3.10 -Python 3.5 ___ Python tracker <https://bugs.python.org/issu

[issue41788] enhancement: add assertDuration context manager to unittest module

2020-09-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Pablo. It is too unreliable. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue41

[issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384)

2020-09-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What about PyUnicode_AsUTF8? Should it be made public too or left for internal use only? What about third-party implementations of Python? How hard to implement this API on an implementation without reference counts? It is interesting to hear the expert

[issue41052] Opt out serialization/deserialization for heap type

2020-09-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are other heap types implemented in C in the stdlib and third-party libraries for which pickling with protocols 0 and 1 works incorrectly. It would be better to fix copyreg._reduce_ex() instead of disabling pickling for these types one by one

[issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384)

2020-09-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PyUnicode_AsUTF8() is used 3 times more than PyUnicode_AsUTF8AndSize(). $ find -type f -name '*.c' -exec egrep 'PyUnicode_AsUTF8AndSize\(' '{}' + | wc -l 35 $ find -type f -name '*.c' -exec egrep

[issue13340] list.index does not accept None as start or stop

2020-09-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for the reminder Irit. Your comments for issues and PRs are really helpful. Thank you for all this! -- nosy: +serhiy.storchaka resolution: -> out of date stage: needs patch -> resolved status: open -&g

[issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384)

2020-09-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree about PyUnicode_AsUTF8. But I think it would be worth to ask PyPy team about PyUnicode_AsUTF8AndSize. An alternate C API is PyUnicode_GetUTF8Buffer (issue39087). It requires explicit releasing the buffer after use, so it can be used even on

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

2020-09-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: As for returned value, I propose to return -1 in case of error, 1 for yielded value and 0 for returned value (i.e. define PYGEN_RETURN = 0, PYGEN_YIELD = 1 and PYGEN_ERROR = -1, but without exposing public names). It would be uniform with other C API

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

2020-09-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are other abstract object APIs: PyNumber, PySequence, PyMapping, etc. In particularly PyIter_Next() works with the iterator protocol, there is no single iterator class. Seems PyGen_* API is related to concrete class, but we can introduce new

[issue27032] Remove deprecated html.parser.HTMLParser.unescape()

2020-09-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +21340 pull_request: https://github.com/python/cpython/pull/22288 ___ Python tracker <https://bugs.python.org/issue27

[issue37328] remove deprecated HTMLParser.unescape

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

[issue27032] Remove deprecated html.parser.HTMLParser.unescape()

2020-09-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.10, Python 3.9 -Python 3.6 ___ Python tracker <https://bugs.python.org/issue27032> ___ ___ Python-bugs-list m

[issue27032] Remove deprecated html.parser.HTMLParser.unescape()

2020-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It was already removed in issue37328. The only not applied part of the patch is adding a What's New entry. -- nosy: +inada.naoki ___ Python tracker <https://bugs.python.org/is

[issue41715] REDoS in c_analyzer

2020-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset dcfaa520c4638a67052a4ff4a2a820be68750ad7 by Serhiy Storchaka in branch 'master': bpo-41715: Fix potential catastrofic backtracking in c_analyzer. (GH-22091) https://github.com/python/cpython/commit/dcfaa520c4638a67052a4ff4a2a820

[issue41662] Bugs in binding parameters in sqlite3

2020-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 0b419b791077414bbc011a412698ebb362b63761 by Serhiy Storchaka in branch 'master': bpo-41662: Fix bugs in binding parameters in sqlite3 (GH-21998) https://github.com/python/cpython/commit/0b419b791077414bbc011a412698eb

[issue41715] REDoS in c_analyzer

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

[issue37328] remove deprecated HTMLParser.unescape

2020-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a33f2c2bae759fc9d06e1c032fd2026135f2df45 by Serhiy Storchaka in branch 'master': bpo-27032, bpo-37328: Document removing HTMLParser.unescape(). (GH-22288) https://github.com/python/cpython/commit/a33f2c2bae759fc9d06e1c032fd202

[issue27032] Remove deprecated html.parser.HTMLParser.unescape()

2020-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a33f2c2bae759fc9d06e1c032fd2026135f2df45 by Serhiy Storchaka in branch 'master': bpo-27032, bpo-37328: Document removing HTMLParser.unescape(). (GH-22288) https://github.com/python/cpython/commit/a33f2c2bae759fc9d06e1c032fd202

[issue41662] Bugs in binding parameters in sqlite3

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

[issue41808] Synchronize What's New in 3.9 master and 3.9 copies

2020-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I have backported and merged deduplication changes manually. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue41

[issue33561] Add .tostring() method to xml.etree.ElementTree.Element

2020-09-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue29099] sqlite3 timestamp converter cannot handle timezone

2020-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Xiang Zhang, was there a discussion on Python-Dev? -- ___ Python tracker <https://bugs.python.org/issue29099> ___ ___ Pytho

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

2020-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I would be fine even with a generator-specific API as a first step, for simplicity. But the end goal is to support all generator-like objects. It is much more useful for end users and does not have drawbacks. Enum for result seems not necessary (other

[issue38981] better name for re.error Exception class.

2020-09-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- type: security -> enhancement ___ Python tracker <https://bugs.python.org/issue38981> ___ ___ Python-bugs-list mailing list Un

[issue41784] Promote PyUnicode_AsUTF8AndSize to be available with the limited API (PEP 384)

2020-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, would not be worth to add Py_buffer to the limited API? -- nosy: +skrah ___ Python tracker <https://bugs.python.org/issue41

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

2020-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: We introduced _PyObject_LookupAttr() and _PyObject_GetMethod() for similar purposes. And they have similar signatures. Although they all are private. -- ___ Python tracker <https://bugs.python.org/issue41

[issue1690840] xmlrpclib methods submit call on __str__, __repr__

2020-09-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: fixed -> out of date status: open -> closed ___ Python tracker <https://bugs.python.org/issue1690840> ___ ___

[issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing

2020-09-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Can not `type(Ellipsis)` be used for typing too? -- nosy: +gvanrossum, levkivskyi, serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue41

[issue41810] Consider reintroducing `types.EllipsisType` for the sake of typing

2020-09-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Would not be better to make MyPy supporting type(Ellipsis)? It would work also on Python versions older than 3.10. Also, could not Literal[Ellipsis] be used as annotation? -- ___ Python tracker <ht

[issue30166] Import command-line parsing modules only when needed

2020-09-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- stage: backport needed -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue30166> ___ ___

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

2020-09-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +21374 pull_request: https://github.com/python/cpython/pull/22330 ___ Python tracker <https://bugs.python.org/issue41

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

2020-09-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 22330 refactors gen_send_ex(), making it similar to the new PyGen_Send(). -- status: closed -> open ___ Python tracker <https://bugs.python.org/issu

[issue41820] ipaddress Library gives me incorrect results

2020-09-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Why do you think it is invalid? What formal document specify this? In contrary, there are examples of using 0-padded notation for IPv4 addresses (000.rrr.rrr.rrr, 128.000.rrr.rrr, 192.000.001.rrr and 224.000.000.000) in RFC 790. -- nosy

[issue41819] Fix some compiler warnings

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

[issue24403] Missing fixer for changed round() behavior

2020-09-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

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

2020-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 6c33385e3a1dce31d7b9037eebfc584075795dba by Serhiy Storchaka in branch 'master': bpo-41756: Refactor gen_send_ex(). (GH-22330) https://github.com/python/cpython/commit/6c33385e3a1dce31d7b9037eebfc58

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

2020-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree that we should add PyIter_Send() (the name is discussable, but PyIter_Send LGTM) which should support iterators and objects with the send() method. It would be much more useful for user, and can replace PyGen_Send() in the interpreter core code

[issue38445] os.path.exists() takes bool as argument and returns True

2020-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is a large change, so I take it. -- assignee: -> serhiy.storchaka ___ Python tracker <https://bugs.python.org/issu

[issue41831] Restore default __str__ of tkinter.EventType

2020-09-22 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The tkinter.EventType enum was introduced in issue27294. It implements __str__ as returning the name for the sole purpose of using in Event.__repr__(). But overriding __str__ in the str subclass may be not good idea, because different code will get

[issue41831] Restore default __str__ of tkinter.EventType

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

[issue41831] Restore default __str__ of tkinter.EventType

2020-09-22 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +21393 pull_request: https://github.com/python/cpython/pull/22355 ___ Python tracker <https://bugs.python.org/issue41

[issue41830] "NameError: name 'AttributeError' is not defined"

2020-09-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It can happen when some objects with __del__ are kept alive at the interpreter shutdown stage and outlive the builtins module. I have not seen such errors for a long time. Could you reproduce it on newer Python versions? Could you reproduce it with

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

2020-09-22 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +21396 pull_request: https://github.com/python/cpython/pull/22358 ___ Python tracker <https://bugs.python.org/issue40

[issue35144] TemporaryDirectory clean-up fails with unsearchable directories

2020-09-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Vidar! I wasn't sure about Windows, but was not able to reproduce possible failures. Your report gives a clue. -- ___ Python tracker <https://bugs.python.org/is

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