[issue38555] Undefined behavior in dictreviter_iternext

2019-10-22 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : &DK_ENTRIES(k)[i] can be evaluated when i is -1. Getting the address before the beginning of the array is an undefined behavior in C. -- components: Interpreter Core messages: 355122 nosy: inada.naoki, serhiy.storchaka priority: normal seve

[issue38555] Undefined behavior in dictreviter_iternext

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

[issue24313] json fails to serialise numpy.int64

2019-10-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: We could use __index__ for serializing numpy.int64. But what to do with numpy.float32 and numpy.float128? It is a part of a much larger problem (which includes other numbers, collections, encoded strings, named tuples and data classes, etc). I am working

[issue38555] Undefined behavior in dictreviter_iternext

2019-10-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 2e3d873d3bd0ef4708c4fa06b6cd6972574cb9af by Serhiy Storchaka in branch 'master': bpo-38555: Fix an undefined behavior. (GH-16883) https://github.com/python/cpython/commit/2e3d873d3bd0ef4708c4fa06b6cd69

[issue38555] Undefined behavior in dictreviter_iternext

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

[issue38565] Expose the value passed of typed passed to functools.lru_cache

2019-10-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is easy: diff --git a/Lib/functools.py b/Lib/functools.py index 3192bd02d9..52c07db749 100644 --- a/Lib/functools.py +++ b/Lib/functools.py @@ -499,7 +499,9 @@ def lru_cache(maxsize=128, typed=False): # The user_function was passed in directly

[issue38565] Expose the value passed of typed passed to functools.lru_cache

2019-10-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The rule used in the lru_cache implementation is: do not write in C that can be written in Python. -- ___ Python tracker <https://bugs.python.org/issue38

[issue38587] __set_name__ missing from descriptor howto documentation

2019-10-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +ncoghlan versions: +Python 3.9 -Python 3.6 ___ Python tracker <https://bugs.python.org/issue38587> ___ ___ Python-bug

[issue38582] re: backreference number in replace string can't >= 100

2019-10-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not believe somebody uses handwritten regular expressions with more than 100 groups. But if you generate regular expression, you can use named groups (?P...) (?P=g12345). -- ___ Python tracker <ht

[issue35448] ConfigParser .read() - handling of nonexistent files

2019-10-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not think that adding an extra parameter to .read() will solve any problem. You need to read the documentation of read() to use this feature. You need to change your code, and this will work only in new version of Python, so you will need to support

[issue38588] Use-after-free in dict/list

2019-10-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your investigation LCatro! Do you mind to create a pull request? -- components: +Interpreter Core type: security -> crash versions: +Python 2.7, Python 3.7, Python 3.9 ___ Python tracker <

[issue38557] PyTuple_GetSlice docs minor inaccuracy

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

[issue38557] PyTuple_GetSlice docs minor inaccuracy

2019-10-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The part about "new tuple" can be removed. The documentation olready contains an automatically generated note about a new reference. PR 16925 improves the documentation for getting/setting items/slices of lists and tuples. -

[issue38535] Incorrect col_offset for decorators with zero arguments (empty parentheses)

2019-10-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 26ae9f6d3d755734c9f371b9356325afe5764813 by Serhiy Storchaka in branch 'master': bpo-38535: Fix positions for AST nodes for calls without arguments in decorators. (GH-16861) https://github.com/python/cpyt

[issue38535] Incorrect col_offset for decorators with zero arguments (empty parentheses)

2019-10-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +16459 pull_request: https://github.com/python/cpython/pull/16930 ___ Python tracker <https://bugs.python.org/issue38

[issue38535] Incorrect col_offset for decorators with zero arguments (empty parentheses)

2019-10-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +16460 pull_request: https://github.com/python/cpython/pull/16931 ___ Python tracker <https://bugs.python.org/issue38

[issue38535] Incorrect col_offset for decorators with zero arguments (empty parentheses)

2019-10-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 91fc9cf43cc2e3a2f236ef9944cf1f4bed701545 by Serhiy Storchaka in branch '3.7': [3.7] bpo-38535: Fix positions for AST nodes for calls without arguments in decorators. (GH-16861). (GH-16930) https://github.com/python/cpyt

[issue38535] Incorrect col_offset for decorators with zero arguments (empty parentheses)

2019-10-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 493fef60a7600f83fe6916ed89d0fb0c0aab484d by Serhiy Storchaka in branch '2.7': [2.7] bpo-38535: Fix positions for AST nodes for calls without arguments in decorators. (GH-16861). (GH-16931) https://github.com/python/cpyt

[issue38535] Incorrect col_offset for decorators with zero arguments (empty parentheses)

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

[issue37289] regression in Cython when pickling objects

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

[issue38557] PyTuple_GetSlice docs minor inaccuracy

2019-10-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d898d20e8c228229eb68e545f544db13f246f216 by Serhiy Storchaka in branch 'master': bpo-38557: Improve documentation for list and tuple C API. (GH-16925) https://github.com/python/cpython/commit/d898d20e8c228229eb68e545f544db

[issue38597] C Extension import limit

2019-10-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: -Extension Modules ___ Python tracker <https://bugs.python.org/issue38597> ___ ___ Python-bugs-list mailin

[issue38597] C Extension import limit

2019-10-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Interpreter Core, Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker <https://bugs.python.org/issue38

[issue38334] zipfile: Seeking encrypted file breaks after seeking backwards

2019-10-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +16466 pull_request: https://github.com/python/cpython/pull/16937 ___ Python tracker <https://bugs.python.org/issue38

[issue38334] zipfile: Seeking encrypted file breaks after seeking backwards

2019-10-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 16937 is simpler. It does not change the decrypter. -- ___ Python tracker <https://bugs.python.org/issue38334> ___ ___

[issue38557] PyTuple_GetSlice docs minor inaccuracy

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

[issue38600] Change the mark up of NULL

2019-10-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Currently NULL is mostly marked up as *NULL* in the C API documentation (although it is marked up as ``NULL`` outside of the C API documentation). It is rendered with italic font as function parameters and contradicts with formatting other macros and

[issue38600] Change the mark up of NULL

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

[issue38334] zipfile: Seeking encrypted file breaks after seeking backwards

2019-10-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 5c32af7522d908e8c7da0243af37618433289cc5 by Serhiy Storchaka in branch 'master': bpo-38334: Fix seeking backward on an encrypted zipfile.ZipExtFile. (GH-16937) https://github.com/python/cpython/commit/5c32af7522d908e8c7da0243af3761

[issue37523] zipfile: Raise ValueError for i/o operations on closed zipfile.ZipExtFile

2019-10-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please test what performance effect it has on read()? -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue37

[issue38334] zipfile: Seeking encrypted file breaks after seeking backwards

2019-10-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I got carried away refactoring the decrypter for a future scenario where > there could be different decrypters (possibly using certificates too) :) The decrypter was implemented with a generator for performance. The performance of decrypting

[issue24430] ZipFile.read() cannot decrypt multiple members from Windows 7zFM

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

[issue21002] _sre.SRE_Scanner object should have a fullmatch() method

2019-10-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with David. The SRE_Scanner object is not public. Its search() method is used for implementing finditer(). Its match() method could be useful for implementing a functional equivalent of \G in Perl. But I do not know a use case for its fullmatch

[issue38530] Offer suggestions on AttributeError

2019-10-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Interesting, why locals are not cleared when an exception leaves a frame? -- ___ Python tracker <https://bugs.python.org/issue38

[issue38602] Add fcntl.F_OFD_XXXX constant

2019-10-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue22367. -- ___ Python tracker <https://bugs.python.org/issue38602> ___ ___ Python-bugs-list mailing list Unsub

[issue38602] Add fcntl.F_OFD_XXXX constant

2019-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 3bfc8e0fcc707d200c267ff05b052fd6a63c985a by Serhiy Storchaka (Dong-hee Na) in branch 'master': bpo-38602: Add fcntl.F_OFD_ for fcntlmodule (GH-16956) https://github.com/python/cpython/commit/3bfc8e0fcc707d200c267ff05b052f

[issue38602] Add fcntl.F_OFD_XXXX constant

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

[issue38600] Change the mark up of NULL

2019-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes of course, but I'll fix them in a separate PR. PR 16950 is mostly automatic replacements. -- ___ Python tracker <https://bugs.python.org/is

[issue38604] Schedule Py_UNICODE API removal

2019-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See issue36346. First we need to add compile-time deprecation warnings to all C API. Then add runtime deprecation warnings. And since this is a major compatibility breakage, it can take longer deprecation period

[issue38613] Optimize some set operations in dictkeys object

2019-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: How does it work with dict subclasses? -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue38

[issue38618] Why not use refcount of c.c_filename in PyAST_FromNodeObject()

2019-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Because there is no need to use refcount. And there is no need to use refcount in compile.c too. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue38

[issue38617] Using Py_XINCREF to replace Py_INCREF in PyAST_CompileObject

2019-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The filename argument must be non-NULL. The code that uses c_filename requires this. Py_XDECREF in compiler_free() could be replaced with Py_DECREF. But this is too tiny change which does not have significant effect. Actually both Py_INCREF and

[issue38616] Using Py_XDECREF to replace Py_DECREF in PyAST_FromNodeObject()

2019-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Both code are equivalent. There is reason to rewrite this. It would just increase code churn. -- nosy: +serhiy.storchaka resolution: -> rejected stage: patch review -> resolved status: open -> closed _

[issue38619] [Doc] UUID.hex is lowercase

2019-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are examples which show the hex is lowercase. I do not think a special note is needed. All conversions to hex are lowercase by default. If you need uppercase, you can use str.upper(). -- nosy: +serhiy.storchaka

[issue38617] Using Py_XINCREF to replace Py_INCREF in PyAST_CompileObject

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

[issue35448] ConfigParser .read() - handling of nonexistent files

2019-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > There is a use case of this (which some of tools depends) about checking if > configuration exists and if not, raising an error. Now, they can solve this > by just adding check_exist argument. No, it can be solved by using open() and read_file(

[issue28029] Replace and empty strings

2019-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What result would you expect of `"" in ""` and `"".count("")`? -- ___ Python trac

[issue38494] Add assert_not_called_with

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

[issue38618] Why not use refcount of c.c_filename in PyAST_FromNodeObject()

2019-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is no bug. We can add Py_INCREF/Py_DECREF in ast.c. We can remove Py_INCREF/Py_DECREF from compile.c. But all this would just add code churn. -- resolution: -> rejected stage: -> resolved status: open -&g

[issue38613] Optimize some set operations in dictkeys object

2019-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: But what if a dict subclass overrides __iter__? You can get different result if set(d) != set(d.keys()). -- ___ Python tracker <https://bugs.python.org/issue38

[issue38627] Add copy() method to pathlib

2019-10-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since shutil.copy() accepts path-like object, I do not think there is a need to add the copy method to Path. As for additional limitation, it looks arbitrary and application specific. You can easy implement a simple helper function as you just

[issue37523] zipfile: Raise ValueError for i/o operations on closed zipfile.ZipExtFile

2019-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Daniel. But profiling is not good for benchmarking, it adds too much overhead. It can help to find narrow places, but for measuring effect of optimization you need to measure the raw time on non-debug build. Semantically your changes are correct

[issue36993] zipfile: tuple IndexError on extract

2019-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset da6ce58dd5ac109485af45878fca6bfd265b43e9 by Serhiy Storchaka (Daniel Hillier) in branch 'master': bpo-36993: Improve error reporting for zipfiles with bad zip64 extra data. (GH-14656) https://github.com/python/cpyt

[issue28029] Replace and empty strings

2019-10-29 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +16507 pull_request: https://github.com/python/cpython/pull/16981 ___ Python tracker <https://bugs.python.org/issue28

[issue28029] Replace and empty strings

2019-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are expected some relations between str methods. For example, s.replace(a, b, n) == s.replace(a, b) if n >= s.count(a) len(s.replace(a, b, n)) == len(s) + (len(b)-len(a)) * n if 0 <= n <= s.count(a) len(s.replace(a, b, n)) == len(s) + (l

[issue28029] Replace and empty strings

2019-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Note that no tests were affected by this change. -- ___ Python tracker <https://bugs.python.org/issue28029> ___ ___ Pytho

[issue36993] zipfile: tuple IndexError on extract

2019-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Daniel. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 ___ Python tracker <https://bugs.python.or

[issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real

2019-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If float.__ceil__ is only needed for typeshed, maybe add a special case for typeshed? I have doubts about adding a C code which is never even executed. -- nosy: +serhiy.storchaka ___ Python tracker <ht

[issue38629] float is missing __ceil__() and __floor__(), required by numbers.Real

2019-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Oh, you are right. I misunderstood the original issue and thought that the code first checks PyFloat_Check() or PyFloat_CheckExact(). If float.__ceil__ will be executed it will add significant overhead for creating and executing the method object

[issue24686] zipfile is intolerant of extra bytes

2019-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Interesting, but all extra after the Extended Timestamp field is a UTF-8 encoded text: b"\n\x00 \x00\x00\x00\x00\x00\x01\x00\x18\x00\x00\xeb\x93\x91'\xef\xbf\xbd\xef\xbf\xbd\x01\x00\xde\xa8\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\x01\x00\xde\xa8\x

[issue38635] Simplify decoding the ZIP64 extra field and make it tolerant to extra data

2019-10-29 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : The decoding code can be much shorter and efficient. Also, the Info-ZIP unzip utility is tolerant to extra bytes. We can be too. -- components: Library (Lib) messages: 355676 nosy: serhiy.storchaka priority: normal severity: normal status: open

[issue38635] Simplify decoding the ZIP64 extra field and make it tolerant to extra data

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

[issue28029] Replace and empty strings

2019-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Raymond, the link is about str.split(), not str.replace(). -- ___ Python tracker <https://bugs.python.org/issue28

[issue38312] curses: add `set_tabsize` and `set_escdelay`

2019-10-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are also ncurses functions get_tabsize() and get_escdelay(). In other implementations they can be modeled by returning the TABSIZE and ESCDELAY global variables. -- nosy: +serhiy.storchaka ___ Python

[issue38639] Optimize floor() and ceil() for floats

2019-10-30 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Currently math.floor(), math.ceil() and math.trunc() look up special methods __floor__, __ceil__ and __trunc__ correspondingly and execute them if found. Otherwise they execute common code for floats. There are no special slots for these methods, so

[issue38639] Optimize floor(), ceil() and trunc() for floats

2019-10-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- title: Optimize floor() and ceil() for floats -> Optimize floor(), ceil() and trunc() for floats ___ Python tracker <https://bugs.python.org/issu

[issue38639] Optimize floor(), ceil() and trunc() for floats

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

[issue28029] Replace and empty strings

2019-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 865c3b257fe38154a4320c7ee6afb416f665b9c2 by Serhiy Storchaka in branch 'master': bpo-28029: Make "".replace("", s, n) returning s for any n != 0. (GH-16981) https://github.com/python/cpython/commit/865c3b257f

[issue38600] Change the mark up of NULL

2019-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 25fc088607c855060ed142296dc1bd0125fad1af by Serhiy Storchaka in branch 'master': bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) https://github.com/python/cpython/commit/25fc088607c855060ed142296dc1bd

[issue28029] Replace and empty strings

2019-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Because of possible compatibility issue (very unlikely) this change is done only in master and will not be backported. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.9 -Python 2.7, P

[issue38640] while False: break => SyntaxError: 'break' outside loop

2019-10-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +3.8regression nosy: +pablogsal, serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue38640> ___ ___ Pytho

[issue38600] Change the mark up of NULL

2019-10-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +16526 pull_request: https://github.com/python/cpython/pull/16999 ___ Python tracker <https://bugs.python.org/issue38

[issue38600] Change the mark up of NULL

2019-10-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +16527 pull_request: https://github.com/python/cpython/pull/17000 ___ Python tracker <https://bugs.python.org/issue38

[issue38600] Change the mark up of NULL

2019-10-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +16528 pull_request: https://github.com/python/cpython/pull/17001 ___ Python tracker <https://bugs.python.org/issue38

[issue38600] Change the mark up of NULL

2019-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 7f7f986cc485c40d80bae504333e3946ce9e96ba by Serhiy Storchaka in branch '3.7': [3.7] bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) (GH-17000) https://github.com/python/cpyt

[issue38600] Change the mark up of NULL

2019-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset f2ba17be2aec873741c2d8a55b1342afa360aec2 by Serhiy Storchaka in branch '3.8': [3.8] bpo-38600: Change the mark up of NULL in the C API documentation. (GH-16950) (GH-16999) https://github.com/python/cpyt

[issue38600] Change the mark up of NULL

2019-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset e835b31d2b212c3c7820364398979cae2a9740b2 by Serhiy Storchaka in branch 'master': bpo-38600: NULL -> ``NULL``. (GH-17001) https://github.com/python/cpython/commit/e835b31d2b212c3c78203643989

[issue38600] Change the mark up of NULL

2019-10-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +16530 pull_request: https://github.com/python/cpython/pull/17003 ___ Python tracker <https://bugs.python.org/issue38

[issue38600] Change the mark up of NULL

2019-10-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +16531 pull_request: https://github.com/python/cpython/pull/17004 ___ Python tracker <https://bugs.python.org/issue38

[issue38650] Add constantness to PyStructSequence_UnnamedField

2019-10-30 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Currently the variable PyStructSequence_UnnamedField has type "char *". It is used as a special value for setting to the name field of PyStructSequence_Field. But the type of the name field is "const char *". I propose to chang

[issue38650] Add constantness to PyStructSequence_UnnamedField

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

[issue38600] Change the mark up of NULL

2019-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 951b6c314a8567be3b5d901059fde866c79f5ff0 by Serhiy Storchaka in branch '3.7': [3.7] bpo-38600: NULL -> ``NULL``. (GH-17001) (GH-17004) https://github.com/python/cpython/commit/951b6c314a8567be3b5d901059f

[issue38600] Change the mark up of NULL

2019-10-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 2c921c65e9d0aa7e3a38c96a22d5eec56724da72 by Serhiy Storchaka in branch '3.8': [3.8] bpo-38600: NULL -> ``NULL``. (GH-17001) (GH-17003) https://github.com/python/cpython/commit/2c921c65e9d0aa7e3a38c96a22d

[issue38312] curses: add `set_tabsize` and `set_escdelay`

2019-10-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b32cb97bce472dad337c6b2f071883f6234e21d8 by Serhiy Storchaka (Anthony Sottile) in branch 'master': bpo-38312: Add curses.{get,set}_escdelay and curses.{get,set}_tabsize. (GH-16938) https://github.com/python/cpyt

[issue38312] curses: add `set_tabsize` and `set_escdelay`

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

[issue38600] Change the mark up of NULL

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

[issue38654] `urllib.request.Request` uses mutable value as default value

2019-10-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is nothing wrong with using {} as default value. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue38

[issue38654] `urllib.request.Request` uses mutable value as default value

2019-10-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is not needed. There is no bug. Nothing to change. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue38660] Checking if two regexes are equal should test if they are functionally equivalent

2019-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: These two regexes are not the same. >>> re.compile('([-_.a-zA-Z0-9]+)').match('ä') >>> re.compile(r'([-\w.]+)').match('ä') As Ammar said checking that two regexes always matches the same is very

[issue38657] String format for hexadecimal notation breaks padding with alternative form

2019-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, the width is the width of the formatted value, not the number of digits. What is your proposition? -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue38

[issue38660] Checking if two regexes are equal should test if they are functionally equivalent

2019-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Python's regular expressions are not actually regular. Lookarounds and groups make things more complex. Even it it is possible to build an ambiguous graph, its size and the time of building can be too large for practical use. Dealing with unicode is

[issue38226] pickle.dump and load error message when file isn't opened in binary mode are not useful

2019-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This looks like a duplicate of issue24159. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue38

[issue38661] Changes to tkinter result in (unexpected) widget map call return changes wrt. 3.7

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

[issue23692] Undocumented feature prevents re module from finding certain matches

2019-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Matthew referred to the code of the regex module (of which he is the author). https://pypi.org/project/regex/ -- ___ Python tracker <https://bugs.python.org/issue23

[issue37436] os.path.isfile() with big number cause OverflowError: fd is greater than maximum

2019-11-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am not sure there is much in common between this and issue33721. There are many ways to get a file path unrepresentable at the OS level. But I do not know any valid case for getting an out-of-range file descriptor. I am not convinced there is a bug here

[issue38702] Adding new types to parser/unparse.py

2019-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: These types are obsolete. The compiler never generates an AST tree containing them. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue38

[issue38703] should we expect round(0.95, 1) to be 1.0, instead of 0.9?

2019-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: 0.95 is actually 278419646001971/4503599627370496 which is smaller than 95/100. >>> from fractions import Fraction >>> Fraction(0.95) Fraction(4278419646001971, 4503599627370496) >>> Fraction(0.95) - Fraction(95, 100) Fraction(-1

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: assertTrue() does not assert that the value is True. It asserts that it is true. For example, non-zero number or non-empty collections will pass the check. -- nosy: +serhiy.storchaka resolution: -> not a bug stage: patch review -> resolved

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am not English expert, but traditionally "true" is used as a synonym of a truthy value everywhere in the Python documentation and code. There are almost 2000 occurrences. If it is a wrong word, it should be fixed in all these cases. -

[issue38706] What should the error message in the exception raised by assertTrue and assertFalse be?

2019-11-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are almost 500 occurrences of "is true". -- ___ Python tracker <https://bugs.python.org/issue38706> ___ ___

<    5   6   7   8   9   10   11   12   13   14   >