[issue40636] Provide a strict form of zip (PEP-618) requiring same length inputs

2021-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For other types we do not have such strict tests. We just test that pickling roundtrips (it is already tested for zip() in other tests). There are few tests that unpickling some exact byte strings produces the expected value, but these tests are in

[issue42789] Do not skip test_curses on non-tty

2021-01-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +22918 pull_request: https://github.com/python/cpython/pull/24085 ___ Python tracker <https://bugs.python.org/issue42

[issue42789] Do not skip test_curses on non-tty

2021-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: On other hand, it was impossible to write correct tests for issue42681 while tests were skipped on buildbots. I spent the whole day yesterday debugging and backporting that changes (some tests failed only on one particular builtbot). So it was right to

[issue42789] Do not skip test_curses on non-tty

2021-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b6fc0c406e6b4b86f59b1390142f35da0e364927 by Serhiy Storchaka in branch 'master': bpo-42789: Enable using /dev/tty in test_curses. (GH-24085) https://github.com/python/cpython/commit/b6fc0c406e6b4b86f59b1390142f35

[issue42789] Do not skip test_curses on non-tty

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

[issue42681] Incorrect range checks/documentation in curses

2021-01-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +22920 pull_request: https://github.com/python/cpython/pull/24089 ___ Python tracker <https://bugs.python.org/issue42

[issue42826] typing.Iterable does not need __getitem__() method

2021-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not know how is it related to typing.Iterable and I have not found any mention of typing.Iterable on the provided link, but an iterable object can be implemented with __getitem__ method. -- nosy: +serhiy.storchaka

[issue42681] Incorrect range checks/documentation in curses

2021-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 59f9b4e4509be67494f3d45489fa55523175ff69 by Serhiy Storchaka in branch 'master': bpo-42681: Fix test_curses failures related to color pairs (GH-24089) https://github.com/python/cpython/commit/59f9b4e4509be67494f3d45489fa55

[issue42681] Incorrect range checks/documentation in curses

2021-01-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +22943 pull_request: https://github.com/python/cpython/pull/24113 ___ Python tracker <https://bugs.python.org/issue42

[issue42681] Incorrect range checks/documentation in curses

2021-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 9b3a53a8264d4c469a3f3d8c037e74c010be3e5c by Serhiy Storchaka in branch '3.9': [3.9] bpo-42681: Fix test_curses failures related to color pairs (GH-24089) (GH-24113) https://github.com/python/cpyt

[issue42681] Incorrect range checks/documentation in curses

2021-01-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +22946 pull_request: https://github.com/python/cpython/pull/24116 ___ Python tracker <https://bugs.python.org/issue42

[issue42681] Incorrect range checks/documentation in curses

2021-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset e2c847e0c518dd6c63a898b8265ba54b71548bd6 by Serhiy Storchaka in branch '3.8': [3.8] [3.9] bpo-42681: Fix test_curses failures related to color pairs (GH-24089) (GH-24113) (GH-24116) https://github.com/python/cpyt

[issue36543] Remove old-deprecated ElementTree features (part 2)

2021-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This process is not new. The problem is that in this particular case warning will do more harm than removing the module. If we cannot just remove it, we should not introduce warning. It will be kept forever

[issue42681] Incorrect range checks/documentation in curses

2021-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Well, a simple documentation issue has grown into large and complex changes that fix several bugs. * Incorrect parameter name in color_pair(). * Incorrectly documented ranges for color and pair numbers. * Based on incorrect documentation, incorrect checks

[issue42794] test_nntplib fails on CI

2021-01-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +22950 pull_request: https://github.com/python/cpython/pull/22632 ___ Python tracker <https://bugs.python.org/issue42

[issue36543] Remove old-deprecated ElementTree features (part 2)

2021-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Deprecation warning may help users of old lower-quality code at the cost of harming users of old higher-quality code. It does not look right to me. -- ___ Python tracker <https://bugs.python.org/issue36

[issue36543] Remove old-deprecated ElementTree features (part 2)

2021-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not understand what this discussion in a long-closed article is about. If you propose to add warning, I am against it. You are against removing the module. Well, the module will not be removed, the warning is no longer needed. The issue is closed. I

[issue31951] import curses is broken on windows

2021-01-06 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> curses for win32 ___ Python tracker <https://bugs.python

[issue42837] Symbol table incorrectly identifies code as a generator, when 'yield' occurs in an annotation

2021-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is a duplicate of issue42725. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> PEP 563: Should the behavior change for yield/

[issue39508] no module curses error although i downloaded the module - windows 10

2021-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The curses module is not supported on Windows. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> curses for win32 ___ Python tra

[issue42837] Symbol table incorrectly identifies code as a generator, when 'yield' occurs in an annotation

2021-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Does not it change the current behavior? I do not see a difference with issue42725. >>> def f(): ... x: (yield) ... >>> f() -- ___ Python tracker <https://bugs.

[issue42837] Symbol table incorrectly identifies code as a generator, when 'yield' occurs in an annotation

2021-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Then why not fix the compiler? As I understand, it is not clear yet what behavior should be, and discussing it is the matter of issue42725. Any changes before the decision be made are preliminary. It is very likely that the decision will be in favor of

[issue42852] pprint fails in transformming non-breaking space

2021-01-07 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue42852> ___ ___

[issue42852] pprint fails in transformming non-breaking space

2021-01-07 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: fixed -> not a bug ___ Python tracker <https://bugs.python.org/issue42852> ___ ___ Python-bugs-list mailing list Un

[issue42725] PEP 563: Should the behavior change for yield/yield from's

2021-01-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Should not "await" and "async for" (in comprehesions) and ":=" be forbidden too? -- nosy: +serhiy.storchaka ___ Python tracker <h

[issue42725] PEP 563: Should the behavior change for yield/yield from's

2021-01-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Does not walrus affect the meaning of variable? And await affects the meaning of generator expression. -- ___ Python tracker <https://bugs.python.org/issue42

[issue42873] Exponential time and space requirements for compilation of nested try/finally blocks

2021-01-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And there may be more than one return/break/continue statement in the try block. It increases the base of the degree. At least for "return" we perhaps can merge different cases. But it would complicate the compiler and cannot help in o

[issue42872] Inconsistent exceptions thrown by pathlib.Path.mkdir on different OSes

2021-01-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, some operations can raise instances of different OSError subclasses on different platforms, because the corresponding C function sets different errno. It is so, and we cannot do anything with this. It is just a part of the difference between plaforms

[issue42879] SystemError from class 'int'

2021-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: With debug build of Python I get a crash in other place: $ ./python -Xdev Movement.py pygame 1.9.6 Hello from the pygame community. https://www.pygame.org/contribute.html python: Objects/abstract.c:155: PyObject_GetItem: Assertion `(item != NULL

[issue42883] __init__ function may incur an incorrect behavior if passing a list as a parameter and set its default value as empty

2021-01-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: https://docs.python.org/3/faq/programming.html#why-are-default-values-shared-between-objects -- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed ___ Pytho

[issue42884] array.index() missing start and end

2021-01-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +rhettinger ___ Python tracker <https://bugs.python.org/issue42884> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42899] Regression __bool__ if AttributeError is raised (Possible regression introduced by bpo-42615)

2021-01-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am not sure that it should be fixed. We already cut corners in similar cases and did this for years, and it always was okay. In the following example bool(a) is only called once: if a and b: f() 1 0 LOAD_NAME0 (a

[issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow?

2021-01-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Steve. Yes, this is what I meant. "if a and b" is so common that we sacrifice literal translation for the sake of performance. "if" with an empty block looks pretty uncommon to me. It is not worth to optimize this case spec

[issue42905] Issue while installing numba inside fastparquet

2021-01-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Neither numba nor fastparquet are parts of the standard Python library. Please use corresponding bug trackers. -- nosy: +serhiy.storchaka resolution: -> third party stage: -> resolved status: open -&g

[issue42862] Use functools.lru_cache iso. _sqlite.Cache in sqlite3 module

2021-01-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not like using _functools._lru_cache_wrapper. It is a deep implementation detail, private function of private module. Use functools.lru_cache. If it is few nanoseconds slower, that cost is only added at connection creation time. It is insignificant

[issue42899] Is it legal to eliminate tests of a value, when that test has no effect on control flow?

2021-01-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For the latter, it was decided that it is legal a long time ago. It has a benefit and we did not have any complains for all these years. The absent of this optimization would encourage writing less readable code for performance. For the former, what is

[issue41994] Refcount issues in import

2021-01-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Petr! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue42910] Wrong code appears in the type alias introduction

2021-01-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What version of Python did you use? This is a documentation for Python 3.9. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue42

[issue42911] Addition chains for pow saves 10 % time!

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

[issue42914] pprint numbers with underscore

2021-01-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: >>> format(10**9, '_d') '1_000_000_000' -- nosy: +serhiy.storchaka ___ Python tracker <ht

[issue40956] Use Argument Clinic in sqlite3

2021-01-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Use NULL. -- ___ Python tracker <https://bugs.python.org/issue40956> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42924] bytearray_repeat copies from ob_bytes instead of ob_start

2021-01-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 61d8c54f43a7871d016f98b38f86858817d927d5 by Tobias Holl in branch 'master': bpo-42924: Fix incorrect copy in bytearray_repeat (GH-24208) https://github.com/python/cpython/commit/61d8c54f43a7871d016f98b38f86858817d927d5 -

[issue42927] Inline cache for slots

2021-01-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Slot means so many different things in Python. Here it's about data descriptors created when you set __slots__ in the class definition. It is amazing that so large speed up can be achieved for such base operation. -- nosy: +serhiy.stor

[issue39273] ncurses does not include BUTTON5_* constants

2021-01-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 14cfa325c298ceb9eaf6b585a3cdcabf6c6378a9 by Zackery Spytz in branch 'master': bpo-39273: Expose BUTTON5_* constants in the curses module if available (GH-17996) https://github.com/python/cpyt

[issue39273] ncurses does not include BUTTON5_* constants

2021-01-14 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.10 -Python 3.6, Python 3.7, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.or

[issue42931] Include randbytes in random.__all__

2021-01-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +vstinner ___ Python tracker <https://bugs.python.org/issue42931> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42929] On Windows, shutil.move doesn't raise FileExistsError if dst exists like os.rename

2021-01-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Eryk Sun, do you mind to create a PR? -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue42

[issue42917] Block stack size for frame objects should be dynamically sizable

2021-01-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Getting rid of hardcoded limits is good. And at first look the proposed PR looks good (some minor details can be discussed). Although there is different approach to solve the same problem. The stack of blocks is used to set handlers for exceptions. For

[issue42885] Optimize re.search() for \A (and maybe ^)

2021-01-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: ^ matches not just the beginning of the string. It matches the beginning of a line, i.e. an anchor just after '\n'. If the input string contains '\n', the result cannot be found less than by linear time. If you want to check if the beg

[issue42950] Incorrect exception behavior in handling recursive call.

2021-01-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +Mark.Shannon, serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue42950> ___ ___ Python-bugs-list mailin

[issue42955] Add sys.module_names: list of stdlib module names (Python and extension modules)

2021-01-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is no technical difference between stdlib modules and other modules. Stdlib modules are only special in context of copyright and responsibility. What if set __author__ = 'PSF' in every stdib module? Or other attributes which would allo

[issue42887] 100000 assignments of .__sizeof__ cause a segfault on del

2021-01-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, there is an overhead of using the trashcan mechanism. This is why it is only used in data collections, because it is expected that your data can contain arbitrary long chains of links. There is many ways to create arbitrary long chains with other

[issue42956] Easy conversion between range and slice

2021-01-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > s.start or 0 Why 0? start=None is not the same as start=0 in slice. For example: >>> 'abcdefgh'[slice(None, 3, -1)] 'hgfe' >>> 'abcdefgh'[slice(0, 3, -1)] '' Slices and range objects are ver

[issue42950] Incorrect exception behavior in handling recursive call.

2021-01-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Maybe stdout.flush() or stdout.buffer.flush() raise a RecursionError? When run the interpreter with option -u the second error is gone. -- ___ Python tracker <https://bugs.python.org/issue42

[issue42951] Random and infinite loop in dealing with recursion error for "try-except "

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

[issue42952] Incorrect handling of EC_KEY_new_by_curve_name() in the _ssl module

2021-01-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Will it be removed in master only or in all maintained version too? -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue42

[issue42952] Incorrect handling of EC_KEY_new_by_curve_name() in the _ssl module

2021-01-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Okay. And I have doubts that someone would backport this change to 3.6. I do not see harm in merging PR 24237, although there is no use of it too. In any case thank you for finding this suspicious code Zackery

[issue42951] Random and infinite loop in dealing with recursion error for "try-except "

2021-01-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Funny. But the output is not random. You can generate the sequence of letters by the following simple loop: s = '' for i in range(n): s = f'a{s}b{s}' The length of this sequence is 2*(2**n-1). Finally, your code will r

[issue42778] Add follow_symlinks=True parameter to both os.path.samefile() and Path.samefile()

2021-01-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Why is this feature needed? Currently you can use a combination of samestat() with lstat(). And more, you can follow symbolic links only for one of arguments. samestat(stat(path1), stat(path1)) # same as samefile(path1, path1) samestat(lstat(path1), stat

[issue42967] [security] urllib.parse.parse_qsl(): Web cache poisoning - `; ` as a query args separator

2021-01-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It looks to me, that this is an issue of proxies, not Python. Python implementation obeys contemporary standards, and they are not formally cancelled yet. If we add an option in parse_qsl() or change its default behavior, it should be considered as a new

[issue42978] Improve error message when "self" is missing from the method definition

2021-01-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Concur with Guido. Seems that that guess will be wrong in most cases. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue42

[issue42978] Improve error message when "self" is missing from the method definition

2021-01-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Could you list some cases where this will give the wrong advice? Guido already listed them. Library functions, static and class methods, and names like slf and _self (used either in local classes and wrapper functions to avoid conflict with the s

[issue42970] File path with blank causes open error in 3.8, not in 3.7

2021-01-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please provide complete script that reproduces the issue. The provided three lines do not open any file and cannot generate such error. It could help to add the debug prints: print(f'mySrcFldr = {mySrcFldr!a}') print(f'srcFldr = {srcFldr

[issue33289] tkinter askcolor returning floats for r, g, b values instead of ints

2021-01-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not understand why #abc00 and #abcd give 0xabab on my computer (Linux) and even weirder result on Ubuntu on CI. Reading the code I expected the same behavior as on macOS. -- ___ Python tracker

[issue33289] tkinter askcolor returning floats for r, g, b values instead of ints

2021-01-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 6713e869c4989c04318158b406c30a147ea52904 by Cheryl Sabella in branch 'master': bpo-33289: Return RGB triplet of ints instead of floats from tkinter.colorchooser (GH-6578) https://github.com/python/cpyt

[issue42997] Improve error message for missing : before suites

2021-01-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue1634034. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue42997> ___ ___ Python-bug

[issue42988] Information disclosure via pydoc -p: /getfile?key=path allows to read arbitrary file on the filesystem

2021-01-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Why not limit the serving to sys.path? -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue42

[issue43014] tokenize spends a lot of time in `re.compile(...)`

2021-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: re.compile() already uses caching. But it is less efficient for some reasons. To Steven: the time is *reduced* by 28%, but the speed is *increased* by 39%. -- nosy: +serhiy.storchaka ___ Python tracker <ht

[issue42977] Tkinter Optionmenu Too Narrow on Mac

2021-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with E. Paine that you should use pack(fill="x") if you want to stretch a widget. And in any case Tkinter itself does not manage layout, it is just a wrapper around Tk, so if you think that the default layout of a button is wro

[issue42992] Tkinter bbox coordinates incorrectly drawn

2021-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Even if there is something wrong with the returned values, Tkinter is just mostly a thin wrap around Tk. It does not change the returned value, it just converts it to appropriate Python type (a tuple of 4 integers (4, 4, 101, 101) instead of a string &quo

[issue43016] Improve tests for curses

2021-01-24 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Currently tests for curses mainly call different functions and methods in random order. Not all argument combinations are covered by tests and results are not checked. I also ran tests with 1750 different values of TERM supported by ncurses, and some

[issue43016] Improve tests for curses

2021-01-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +23131 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24312 ___ Python tracker <https://bugs.python.org/issu

[issue43018] unwanted label showing up in ttk.LabeledScale

2021-01-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It has already been fixed in issue40219. Just wait next bugfix release. -- nosy: +serhiy.storchaka resolution: -> out of date stage: -> resolved status: open -> closed superseder: -> ttk LabeledScale: label covered by hi

[issue33289] tkinter askcolor returning floats for r, g, b values instead of ints

2021-01-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +23137 pull_request: https://github.com/python/cpython/pull/24318 ___ Python tracker <https://bugs.python.org/issue33

[issue33289] tkinter askcolor returning floats for r, g, b values instead of ints

2021-01-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 3d5434d5cbc945c58be663e3dbd5ef4875677b7a by Serhiy Storchaka in branch '3.9': [3.9] bpo-33289: Return RGB triplet of ints instead of floats from tkinter.colorchooser (GH-6578). (GH-24318) https://github.com/python/cpyt

[issue27772] Refer to actual format string when creating “zero padding” error message

2021-01-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset cf19cc3b920ca5995e1c202d2c3dd7a59ac8eac8 by Serhiy Storchaka in branch 'master': bpo-27772: Make preceding width with 0 valid in string format. (GH-11270) https://github.com/python/cpython/commit/cf19cc3b920ca5995e1c202d2c3dd7

[issue27772] Refer to actual format string when creating “zero padding” error message

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

[issue33289] tkinter askcolor returning floats for r, g, b values instead of ints

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

[issue12669] test_curses skipped on buildbots

2021-01-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It was fixed in other way in issue42789. If __stdout__ is not a terminal, the code falls back to __stderr__, and it is not terminal either, it tries to open /dev/tty. If neither works, it uses a regular temporary file as terminal, but savetty()/resetty

[issue37319] Deprecate using random.randrange() with non-integers

2021-01-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset f066bd94b9225a5a3c4ade5fc3ff81e3c49b7b32 by Serhiy Storchaka in branch 'master': bpo-37319: Improve documentation, code and tests of randrange. (GH-19112) https://github.com/python/cpython/commit/f066bd94b9225a5a3c4ade5fc3ff81

[issue37319] Deprecate using random.randrange() with non-integers

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

[issue43025] Use normal 'i' character to denote imaginary part of complex numbers

2021-01-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Only yesterday I thought about proposing this idea. I used to think using "i" or "j" was a type of local feature, like using a comma or a period as a decimal separator, or different writing for less-or-equal, but it looks like even in

[issue43025] Use normal 'i' character to denote imaginary part of complex numbers

2021-01-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Just making the parser (and the complex constructor) recognizing "i" as well as "j" as complex number suffix. Others already proposed more complex changes like adding options for formatting complex numbers, but I did not though abo

[issue43025] Use normal 'i' character to denote imaginary part of complex numbers

2021-01-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.10 -Python 3.9 ___ Python tracker <https://bugs.python.org/issue43025> ___ ___ Python-bugs-list mailin

[issue42988] Information disclosure via pydoc -p: /getfile?key=path allows to read arbitrary file on the filesystem

2021-01-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +23156 pull_request: https://github.com/python/cpython/pull/24337 ___ Python tracker <https://bugs.python.org/issue42

[issue42988] Information disclosure via pydoc -p: /getfile?key=path allows to read arbitrary file on the filesystem

2021-01-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 24337 uses different approach. It keeps compatibility, but checks that the argument is a file path of the source of one of modules (using the same algorithm as /search). -- ___ Python tracker <ht

[issue43033] Incorrect handling of PyObject_SetAttrString() in the _zoneinfo module

2021-01-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 5327f370344a627f1578d8183d197feb286371c6 by Zackery Spytz in branch 'master': bpo-43033: Fix the handling of PyObject_SetAttrString() in _zoneinfo.c (GH-24345) https://github.com/python/cpython/commit/5327f370344a627f1578d8183d197f

[issue43030] signed/unsigned mismatch in Py_UNICODE_ISSPACE macro

2021-01-27 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch nosy: +serhiy.storchaka nosy_count: 3.0 -> 4.0 pull_requests: +23170 stage: -> patch review pull_request: https://github.com/python/cpython/pull/24350 ___ Python tracker <https://bugs.p

[issue43030] signed/unsigned mismatch in Py_UNICODE_ISSPACE macro

2021-01-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, it is not enough, because we do not want to use ch as index if it is negative. -- ___ Python tracker <https://bugs.python.org/issue43

[issue43033] Incorrect handling of PyObject_SetAttrString() in the _zoneinfo module

2021-01-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset cb77c5e1ddd9328e4706f8fdf893aa6bf697942c by Miss Islington (bot) in branch '3.9': bpo-43033: Fix the handling of PyObject_SetAttrString() in _zoneinfo.c (GH-24345) (GH-24349) https://github.com/python/cpyt

[issue43033] Incorrect handling of PyObject_SetAttrString() in the _zoneinfo module

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

[issue43040] random.py randrange() is very slow if the range is a power of 2.

2021-01-27 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +mark.dickinson, rhettinger ___ Python tracker <https://bugs.python.org/issue43040> ___ ___ Python-bugs-list mailin

[issue43039] tempfile.TemporaryDirectory() name string is incorrect

2021-01-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is a bug in gitPython. As for adding a new feature, making TemporaryDirectory.__str__() returning just a name, I am not sure that it is needed, and it has drawbacks. If print() for TemporaryDirectory object will output just a directory name, it can

[issue43037] Importlib reload by module name (String)

2021-01-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It works as documented. reload() argument must be a module. If you have only module name, sys.modules is a mapping of module names to modules. It is trivial to combine two things in one line. And why do you want to reload a module by name (without having

[issue43053] Speed up math.isqrt, again

2021-01-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +mark.dickinson, rhettinger, serhiy.storchaka, stutzbach ___ Python tracker <https://bugs.python.org/issue43053> ___ ___

[issue43029] unittest: Add assertUniqeIn

2021-01-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It looks pretty niche. I do not remember a single case in which such method would help. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue43

[issue43059] sqlite3: Externally developed?

2021-01-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Before removing public documented attribute it should be deprecated. Don't haste with this, I have a large patch for removing obsolete version attributes in process. -- nosy: +serhiy.storchaka ___ P

[issue43060] Convert _decimal C API from pointer array to struct

2021-01-29 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +facundobatista, mark.dickinson, rhettinger, skrah ___ Python tracker <https://bugs.python.org/issue43060> ___ ___ Pytho

[issue42628] binascii doesn't work on some base64

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

[issue43075] ReDoS in request

2021-01-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I agree. There is no catastrophic backtracking here (it was fixed in issue39503), but the complexity of matching the regular expression is linear. Searching the pattern in a sequence of commas has quadratic complexity, because every step has linear

<    28   29   30   31   32   33   34   35   36   37   >