[issue46160] IPy->IPSet AttributeError: module 'collections' has no attribute 'MutableSet'

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

[issue46140] Some API methods could take const Py_buffer* instead of Py_buffer *

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

[issue46140] Some API methods could take const Py_buffer* instead of Py_buffer *

2021-12-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 31ff96712e8f89ac1056c2da880b44650002219f by David Hewitt in branch 'main': bpo-46140: take more Py_buffer arguments as const * (GH-30217) https://github.com/python/cpython/commit/31ff96712e8f89ac1056c2da880b44650002219f -- nosy

[issue37295] Possible optimizations for math.comb()

2021-12-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: long long is at least 64 bit, so we can safely use PyLong_FromLongLong() for int64_t. -- ___ Python tracker <https://bugs.python.org/issue37

[issue46051] Make @atexit.register work for functions with arguments

2021-12-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It cannot work this way. atexit.register() as a function allows you to specify arguments which will be passed to the registered function, but if it is used as a decorator, only one argument (the function itself) is passed to atexit.register() (it is how

[issue23819] test_asyncio fails when run under -O

2021-12-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 95948169d75bed3936284ea2225e83e07ec5fe20 by Miss Islington (bot) in branch '3.10': bpo-23819: Get rid of assert statements in test_asyncio (GH-30212) (GH-30213) https://github.com/python/cpython/commit/95948169d75bed3936284ea2225e83e07ec5fe20

[issue37295] Possible optimizations for math.comb()

2021-12-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: factorial(49) has 163 significant binary digits. It cannot be represented in floating-point without losses. And C functions log2() and exp2() can add additional errors, depending on platform. We rely on the assumption that all errors will be compensated

[issue23819] test_asyncio fails when run under -O

2021-12-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 6ca78affc8023bc5023189d64d8050857662042a by Serhiy Storchaka in branch 'main': bpo-23819: Get rid of assert statements in test_asyncio (GH-30212) https://github.com/python/cpython/commit/6ca78affc8023bc5023189d64d8050857662042a

[issue23819] test_asyncio fails when run under -O

2021-12-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka nosy_count: 5.0 -> 6.0 pull_requests: +28433 pull_request: https://github.com/python/cpython/pull/30212 ___ Python tracker <https://bugs.python.org/issu

[issue46094] Missing unit test on unittest.TestResult to check for required arguments

2021-12-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: These parameters were added in d99ef9a9df093d3443996725cd9dcac5f113f176, but they were not tested nor documented. An indirect test was added later in issue12376. If it is an official feature it needs documentation and tests. Otherwise we can remove

[issue46131] Add PyType_FastSubclass for float

2021-12-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is because PyFloat_Check() and PyComplex_Check() are rarely used in comparison with checks for integers, strings, etc. The flags space is limited, so it is better to use it for something more important. There were reasons for not adding such flags

[issue46128] Strip IsolatedAsyncioTestCase frames from reported stacktraces

2021-12-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you. I knew about this issue but forgot to fix it. I think it is also needed in _log.py. Not sure about mock.py. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue46

[issue46111] test_unittest fails in optimized mode

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

[issue46112] PEP 8 code format

2021-12-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PEP 8 is a guide for writing new code. It does not require rewriting the old code. In fact, patches with mass reformatting of the stdlib code have always been rejected. -- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> re

[issue46111] test_unittest fails in optimized mode

2021-12-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 95a922b3bb3af247ec141d73fcdfbf68bb1d32a5 by Serhiy Storchaka in branch 'main': bpo-46111: Fix unittest tests in optimized mode (GH-30163) https://github.com/python/cpython/commit/95a922b3bb3af247ec141d73fcdfbf68bb1d32a5

[issue46111] test_unittest fails in optimized mode

2021-12-16 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +28380 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30163 ___ Python tracker <https://bugs.python.org/issu

[issue46111] test_unittest fails in optimized mode

2021-12-16 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : $ ./python -OO -m test -vuall test_unittest ... == FAIL: testShortDescriptionWhitespaceTrimming (unittest.test.test_case.Test_TestCase

[issue12681] unittest expectedFailure could take a message argument like skip does

2021-12-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Such change would break a lot of existing interfaces. * addUnexpectedSuccess() has a single parameter. The change will add the second parameter and will break subclasses of TestResult. * addExpectedFailure() has two parameter. The change will add the third

[issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls)

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

[issue20165] unittest TestResult wasSuccessful returns True when there are unexpected successes

2021-12-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also issue22815. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue20165> ___ ___ Python-bug

[issue22815] unexpected successes are not output

2021-12-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Unless you tun tests in verbose mode you do not know which of tests was unexpectedly successful. And even in the verbose mode it is not easy to find that test in long output. Yes, unexpected successes considered successes in earlier versions. See

[issue46094] Missing unit test on unittest.TestResult to check for required arguments

2021-12-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What do you mean they are required? All parameters of TestResult() are optional. -- nosy: +ezio.melotti, michael.foord, rbcollins, serhiy.storchaka status: pending -> open ___ Python tracker <

[issue22815] unexpected successes are not output

2021-12-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are no other details for unexpected successes, only test descriptions. -- type: behavior -> enhancement ___ Python tracker <https://bugs.python.org/issu

[issue22815] unexpected successes are not output

2021-12-16 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +28356 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30138 ___ Python tracker <https://bugs.python.org/issu

[issue22815] unexpected successes are not output

2021-12-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think the OP means that test details (test description, traceback, captured output) are printed for ERROR and FAIL in TextTestResult.printErrors(). Other possible results besides error and failure are success, skipped, expected failure and unexpected

[issue46087] format library documentation error

2021-12-15 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +eric.smith resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46087] Zip library documentation error

2021-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since it is a REPL example, no print() is needed. In REPL any expression statement prints the repr of its result. For example: >>> for x in range(1, 5): ... f'{x}**2 = {x**2}' ... '1**2 = 1' '2**2 = 4' '3**2 = 9' '4**2 = 16' There

[issue46084] Python 3.9.6 scan_dir returns filenotfound on long paths, but os_walk does not

2021-12-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: os.walk() has been implemented via os.scandir(), but by default it ignores OSErrors raised by os.scandir(), DirEntry.is_dir() and DirEntry.is_symlink(). You can get errors raised by os.scandir() if specify the onerror argument, but errors

[issue46069] Super Smash Flash 2

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

[issue31370] Remove support for threads-less builds

2021-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Concur with Victor. It is fine to add a link to other discussion in a closed issue, but an issue closed many years ago is not a good place for a new discussion at all. -- ___ Python tracker <ht

[issue23148] Missing the charset parameter in as_encoded_word()

2021-12-14 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The code was completely rewritten in issue27240. No tests are needed. -- resolution: -> fixed stage: test needed -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46062] tkinter.filedialog.SaveAs: create new folder on Ubuntu?

2021-12-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: On other systems it opens a simple dialog window implemented in Tk. AFAIK it does not support creating new directories. Ask Tk core developers for a new feature. -- resolution: -> third party stage: -> resolved status: open -&g

[issue46065] re.findall takes forever and never ends

2021-12-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Limit the number of repetitions. For example use "{1,100}" (or what is the expected maximal length of email) instead of "+". -- ___ Python tracker <https://bug

[issue46065] re.findall takes forever and never ends

2021-12-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The simplest example is: re.search('a@', 'a'*10) -- ___ Python tracker <https://bugs.python.org/issue46065> ___ ___

[issue46065] re.findall takes forever and never ends

2021-12-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It ends, but it tooks several minutes to complete. It is a limitation of the regular expression implementation in Python. Your input contains a sequence of 588431 characters which match the pattern [a-zA-Z0-9_.+-] not following by '@'. The engine finds

[issue45840] Improve cross-references in the data model documentation

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

[issue45840] Improve cross-references in the data model documentation

2021-12-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 2029c58097e49b5aedc152ab65958a9db35ebd1e by Alex Waygood in branch '3.9': [3.9] bpo-45840: Improve cross-references in the data model documentation (GH-29633) (GH-30081) https://github.com/python/cpython/commit

[issue27718] help('signal') incomplete (e.g: signal.signal not visible)

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

[issue27718] help('signal') incomplete (e.g: signal.signal not visible)

2021-12-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset e55deaabd8de338138cf29aea6890996e794c997 by Serhiy Storchaka in branch '3.10': [3.10] bpo-27718: Fix help for the signal module (GH-30063) (GH-30080) https://github.com/python/cpython/commit/e55deaabd8de338138cf29aea6890996e794c997

[issue27718] help('signal') incomplete (e.g: signal.signal not visible)

2021-12-13 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +28301 pull_request: https://github.com/python/cpython/pull/30080 ___ Python tracker <https://bugs.python.org/issue27

[issue27718] help('signal') incomplete (e.g: signal.signal not visible)

2021-12-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset e08c0d8eec528f1d7a282ee19bcadb9aae9ec123 by Serhiy Storchaka in branch 'main': bpo-27718: Fix help for the signal module (GH-30063) https://github.com/python/cpython/commit/e08c0d8eec528f1d7a282ee19bcadb9aae9ec123

[issue45840] Improve cross-references in the data model documentation

2021-12-13 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 7da90251ae80f5faac938b659675ff159d565537 by Alex Waygood in branch '3.10': bpo-45840: Improve cross-references in the data model documentation (GH-29633) (GH-30077) https://github.com/python/cpython/commit

[issue46055] Speed up binary shifting operators

2021-12-12 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Could you please show any microbenchmarking results? -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue46

[issue29221] ABC Recursion Error on isinstance() with less than recursion limit class hierarchy depth

2021-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is still reproducible if increase the depth. In 3.8-3.10 it needs 329 nested classes, in 3.11 -- 496. Seems the limit is sys.getrecursionlimit()//k - 4, where k=4 in 3.7 and older, k=3 in 3.8-3.10, and k=2 in 3.11. It is much better than was initially

[issue27718] help('signal') incomplete (e.g: signal.signal not visible)

2021-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is due to use functools.wraps(). If __all__ is not defined all non-builtin functions should have correct __module__ to be displayed by pydoc. functools.wraps() assigns __module__, __name__, __qualname__, __doc__ and __annotations__. __module__ should

[issue27718] help('signal') incomplete (e.g: signal.signal not visible)

2021-12-11 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch nosy: +serhiy.storchaka nosy_count: 6.0 -> 7.0 pull_requests: +28283 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30063 ___ Python tracker <https://bugs.p

[issue45665] Problems caused by isinstance(list[int], type) returning True

2021-12-11 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- dependencies: +functools' singledispatch does not support GenericAlias ___ Python tracker <https://bugs.python.org/issue45

[issue46032] functools' singledispatch does not support GenericAlias

2021-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, it is related to issue45665. It is a complicated case due to coincidence of several circumstances. 1. isinstance(list[int], type) is True, while isinstance(typing.List[int], type) is False. list[int] is considered a type in this check. 2. list[int

[issue46032] functools' singledispatch does not support GenericAlias

2021-12-11 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +28275 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30050 ___ Python tracker <https://bugs.python.org/issu

[issue21964] inconsistency in list-generator comprehension with yield(-from)

2021-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Resolved in issue10544. -- nosy: +serhiy.storchaka resolution: out of date -> duplicate stage: test needed -> resolved status: pending -> closed superseder: -> yield expression inside generator expression

[issue45929] extend json.tool --json-lines to ignore empty rows

2021-12-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The current implementation allows for the final character of the input to be a newline. It does not allow double newlines. In the original example echo -e '{"foo":1}\n{"bar":2}\n' the echo command adds a newline to the output (wh

[issue46032] functools' singledispatch does not support GenericAlias

2021-12-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue46032> ___ ___ Python-

[issue45665] Problems caused by isinstance(list[int], type) returning True

2021-12-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- dependencies: -functools' singledispatch does not support GenericAlias ___ Python tracker <https://bugs.python.org/issue45

[issue45665] Problems caused by isinstance(list[int], type) returning True

2021-12-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- dependencies: +functools' singledispatch does not support GenericAlias ___ Python tracker <https://bugs.python.org/issue45

[issue46000] NetBSD curses compatibility

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

[issue46000] NetBSD curses compatibility

2021-12-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 040f9f9c48f4e74e851d850275aa9e050a04d0c6 by Miss Islington (bot) in branch '3.9': bpo-46000: Improve NetBSD curses compatibility (GH-29947) (GH-30023) https://github.com/python/cpython/commit/040f9f9c48f4e74e851d850275aa9e050a04d0c6

[issue45662] Incorrect repr of InitVar of a type alias

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

[issue45662] Incorrect repr of InitVar of a type alias

2021-12-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset fb8aad16401e081a6a9059c7b428f7e8aae85d58 by Miss Islington (bot) in branch '3.9': [3.9] bpo-45662: Fix the repr of InitVar with a type alias to the built-in class (GH-29291) (GH-29924) https://github.com/python/cpython/commit

[issue46000] NetBSD curses compatibility

2021-12-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 2fb797e93c6bbd44dfcbe23f63acfa240a87e48a by Thomas Klausner in branch 'main': bpo-46000: Improve NetBSD curses compatibility (GH-29947) https://github.com/python/cpython/commit/2fb797e93c6bbd44dfcbe23f63acfa240a87e48a

[issue42182] 3.10 Documentation Not Hyperlinking Some Methods

2021-12-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 8c74713d0e349c27518080945d5f040dfd52a56e by andrei kulakov in branch 'main': bpo-42182: stdtypes doc - update and fix links to several dunder methods (GH-27384) https://github.com/python/cpython/commit

[issue36048] Deprecate implicit truncating when convert Python numbers to C integers: use __index__, not __int__

2021-12-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See issue660144 which made float values be rejected in most cases where an integer is expected rather of silently truncating them. It was at 2003. Guido mentioned that is an age-old problem, so perhaps you can find older discussions on the tracker

[issue39694] Incorrect dictionary unpacking when calling str.format

2021-12-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I disagree, but does not insists if other core developers have other opinion. This is a special case which breaks the rules. The Python language specification does not support non-string keywords. You cannot implement this "feature"

[issue36048] Deprecate implicit truncating when convert Python numbers to C integers: use __index__, not __int__

2021-12-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This issue was closed more than 2.5 years ago. The changes were made in 3.8, not in 3.10. BTW, 3.8 only accepts security fixes now. Please open a new issue for new discussion. -- ___ Python tracker <ht

[issue39694] Incorrect dictionary unpacking when calling str.format

2021-12-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In most cases the test is cheap even for large dict (it has constant complexity if the dict never contained non-string keys). -- ___ Python tracker <https://bugs.python.org/issue39

[issue46012] unittest AsyncConnection not described

2021-12-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is no AsyncConnection in unittest nor anywhere in the stdlib. It is just an example illustrating the order of calling setup and teardown methods and cleanup callbacks. -- nosy: +serhiy.storchaka

[issue45663] is_dataclass() does not work for dataclasses which are subclasses of types.GenericAlias

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

[issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type

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

[issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type

2021-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset bffce2cbb5543bc63a67e33ad599328a12f2b00a by Miss Islington (bot) in branch '3.9': bpo-45664: Fix resolve_bases() and new_class() for GenericAlias instance as a base (GH-29298) (GH-29928) https://github.com/python/cpython/commit

[issue46001] JSON module documentation mentions OverflowError for case that raises RecursionError

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

[issue46001] JSON module documentation mentions OverflowError for case that raises RecursionError

2021-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution James! -- versions: +Python 3.10, Python 3.9 ___ Python tracker <https://bugs.python.org/issue46

[issue46001] JSON module documentation mentions OverflowError for case that raises RecursionError

2021-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 8db06528cacc94e67eb1fb2e4c2acc061a515671 by James Gerity in branch 'main': bpo-46001: Change OverflowError to RecursionError in JSON library docstrings (GH-29943) https://github.com/python/cpython/commit

[issue45995] string formatting: normalize negative zero

2021-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Well, it makes sense for negative zero produced by rounding. But if we add a special support for this case, it would be useful to have some control on the type of rounding. Currently floats are rounded to the nearest decimal number, but in some cases

[issue46000] NetBSD curses compatibility

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

[issue45929] extend json.tool --json-lines to ignore empty rows

2021-12-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Both JSON Lines (https://jsonlines.org/) and Newline Delimited JSON (http://ndjson.org/) formats require that Each Line is a Valid JSON Value. If you want to ignore empty lines you can filter them out with `sed /^$/d`. -- nosy: +serhiy.storchaka

[issue45996] Worse error from asynccontextmanager in Python 3.10

2021-12-06 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +graingert, lukasz.langa, ncoghlan ___ Python tracker <https://bugs.python.org/issue45996> ___ ___ Python-bugs-list mailin

[issue45934] python curses newterm implementation

2021-12-06 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue45934> ___ ___ Python-bugs-list mailing list Un

[issue45934] python curses newterm implementation

2021-12-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Guido for clarification. I have found that post: https://mail.python.org/archives/list/core-mentors...@python.org/thread/YGSMPKP7G3HO73ISEQZFAWPPGCOA3JYZ/ I agree that it is worth to implement newterm. In particular it would be useful in tests

[issue45995] string formatting: normalize negative zero

2021-12-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: To normalize negative 0.0 to 0.0 you can just add 0.0. It will work with any method of converting floats to string, there is no need to change all formatting specifications. >>> x = -0.0 >>> x -0.0 >>> x + 0.0 0.0 -

[issue13236] unittest needs more flush calls

2021-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +28153 pull_request: https://github.com/python/cpython/pull/29929 ___ Python tracker <https://bugs.python.org/issue13

[issue45840] Improve cross-references in the data model documentation

2021-12-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset c0521fe49fd75e794a38a216813658ab40185834 by Alex Waygood in branch 'main': bpo-45840: Improve cross-references in the data model documentation (GH-29633) https://github.com/python/cpython/commit/c0521fe49fd75e794a38a216813658ab40185834

[issue45664] resolve_bases() and new_class() do not work with type alias of a built-in type

2021-12-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 2b318ce1c988b7b6e3caf293d55f289e066b6e0f by Serhiy Storchaka in branch 'main': bpo-45664: Fix resolve_bases() and new_class() for GenericAlias instance as a base (GH-29298) https://github.com/python/cpython/commit

[issue45663] is_dataclass() does not work for dataclasses which are subclasses of types.GenericAlias

2021-12-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 446be166861b2f08f87f74018113dd98ca5fca02 by Serhiy Storchaka in branch 'main': bpo-45663: Fix is_dataclass() for dataclasses which are subclasses of types.GenericAlias (GH-29294) https://github.com/python/cpython/commit

[issue45662] Incorrect repr of InitVar of a type alias

2021-12-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 1fd4de5bddbbf2a97cdbac4d298c89e1156bdc6c by Serhiy Storchaka in branch 'main': bpo-45662: Fix the repr of InitVar with a type alias to the built-in class (GH-29291) https://github.com/python/cpython/commit

[issue37295] Possible optimizations for math.comb()

2021-12-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 60c320c38e4e95877cde0b1d8562ebd6bc02ac61 by Serhiy Storchaka in branch 'main': bpo-37295: Optimize math.comb() and math.perm() (GH-29090) https://github.com/python/cpython/commit/60c320c38e4e95877cde0b1d8562ebd6bc02ac61

[issue45934] python curses newterm implementation

2021-12-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is it about? The first message is by Guido, but not this message nor the title does not give me any idea what is it about. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue45

[issue45987] os.chdir in unittest's test case causes RecursionError on Windows

2021-12-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is (snip)? -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue45987> ___ ___ Python-bugs-list m

[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

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

[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

2021-12-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d15cdb2f32f572ce56d7120135da24b9fdce4c99 by Serhiy Storchaka in branch 'main': bpo-27946: Fix possible crash in ElementTree.Element (GH-29915) https://github.com/python/cpython/commit/d15cdb2f32f572ce56d7120135da24b9fdce4c99

[issue13236] unittest needs more flush calls

2021-12-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset f42a06ba279c916fb67289e47f9bc60dc5dee4ee by Serhiy Storchaka in branch 'main': bpo-13236: Flush the output stream more often in unittest (GH-29864) https://github.com/python/cpython/commit/f42a06ba279c916fb67289e47f9bc60dc5dee4ee

[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

2021-12-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The issue is no longer reproduced by the original test because of the cache for dict key tables. But it is not gone, and can be reproduced with modified test. There may be many similar bugs in the Python core end extensions. Adding incref/decref

[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

2021-12-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +28140 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29915 ___ Python tracker <https://bugs.python.org/issu

[issue45979] Fix Tkinter tests with old Tk

2021-12-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +epaine ___ Python tracker <https://bugs.python.org/issue45979> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45979] Fix Tkinter tests with old Tk

2021-12-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +28138 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29913 ___ Python tracker <https://bugs.python.org/issu

[issue45979] Fix Tkinter tests with old Tk

2021-12-04 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Some recently added tests are not compatible with old Tk versions. I have build all 8.5 and 8.6 versions and build and test Tkinter against them. The proposed PR makes tests passes on Tk versions 8.5.4 to 8.5.19 and 8.6.0 to 8.6.12. There are some

[issue45957] _tkinter.TclError: expected boolean value but got ""

2021-12-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It looks like a bug in Tk 8.6.11. It is expected that the implementation of "wm overrideredirect" returns an empty string if pass the boolean argument. The returned value is an empty string, but its type is not cleared. Seems it keeps the type o

[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

2021-12-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Concur with Irit. We should patch the caller of PyDict_GetItem, not PyDict_GetItem. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue27

[issue45957] _tkinter.TclError: expected boolean value but got ""

2021-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Ali. It confirms my guess, but it is still not clear why we get a Tcl_Obj rather of None or empty string. Please examine what is the output of the following code: res = root.tk.call('wm', 'overrideredirect', root._w, True) print([res.typename

[issue11455] issue a warning when populating a CPython type dict with non-string keys

2021-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Why not raise an error if it contradicts language spec? -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue11

[issue45957] _tkinter.TclError: expected boolean value but got ""

2021-12-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What is the result of root.tk.call('wm', 'overrideredirect', root._w, True) ? Is it not an empty string? -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue45

[issue45939] PyErr_SetObject documentation lacks mention of reference counting

2021-12-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Ronald. If we explicitly document that PyErr_SetObject() does not steal reference we would need to document it for every parameter of every function. It would make the documentation worse because it would be more difficult to distinguish

<    1   2   3   4   5   6   7   8   9   10   >