[issue21987] TarFile.getmember on directory requires trailing slash iff over 100 chars

2022-01-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 94d6434ba7ec3e4b154e515c5583b0b665ab0b09 by Miss Islington (bot) in branch '3.9': [3.9] bpo-21987: Fix TarFile.getmember getting a dir with a trailing slash (GH-30283) (GH-30738) https://github.com/python/cpython/commit

[issue46376] PyMapping_Check returns 1 for list

2022-01-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is difficult to distinguish Mapping from Sequence because they have the same set of dunder methods. The difference is only in semantic -- __iter__ yields items for Sequence and keys for Mapping, __getitem__ gets an item by index (or a sequence by slice

[issue46483] `pathlib.PurePath.__class_getitem__` does not return `GenericAlias`

2022-01-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Why __class_getitem__ was added in PurePath at first place? PurePath should not be a generic class, unlike to os.PathLike. For os.PathLike the type parameters represent the returning type of os.fspath() (either str or bytes), but the pathlib module only

[issue46426] Improve tests for the dir_fd argument

2022-01-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a1015c6478e8cbec2ecb984a3cba733783d168b5 by Miss Islington (bot) in branch '3.10': bpo-46426: Improve tests for the dir_fd argument (GH-30668) (GH-30739) https://github.com/python/cpython/commit/a1015c6478e8cbec2ecb984a3cba733783d168b5

[issue46426] Improve tests for the dir_fd argument

2022-01-21 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +28944 pull_request: https://github.com/python/cpython/pull/30757 ___ Python tracker <https://bugs.python.org/issue46

[issue46426] Improve tests for the dir_fd argument

2022-01-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 54610bb448a9cf5be77d53b66169fca4c11be6cb by Serhiy Storchaka in branch 'main': bpo-46426: Improve tests for the dir_fd argument (GH-30668) https://github.com/python/cpython/commit/54610bb448a9cf5be77d53b66169fca4c11be6cb

[issue30512] CAN Socket support for NetBSD

2022-01-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.11 -Python 3.7 ___ Python tracker <https://bugs.python.or

[issue30512] CAN Socket support for NetBSD

2022-01-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 40fcd16889028bd3cd2289e0f8a2af43f17a5824 by Thomas Klausner in branch 'main': bpo-30512: Add CAN Socket support for NetBSD (GH-30066) https://github.com/python/cpython/commit/40fcd16889028bd3cd2289e0f8a2af43f17a5824

[issue21987] TarFile.getmember on directory requires trailing slash iff over 100 chars

2022-01-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset cfadcc31ea84617b1c73022ce54d4ae831333e8d by andrei kulakov in branch 'main': bpo-21987: Fix TarFile.getmember getting a dir with a trailing slash (GH-30283) https://github.com/python/cpython/commit/cfadcc31ea84617b1c73022ce54d4ae831333e8d

[issue46425] Multiple test modules fail to run if invoked directly

2022-01-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 22f73bd9f1fc573d5c998f345b66c29f7ca6614d by Nikita Sobolev in branch 'main': bpo-46425: Fix direct invocation of `test_contextlib` (GH-30681) https://github.com/python/cpython/commit/22f73bd9f1fc573d5c998f345b66c29f7ca6614d

[issue23325] Turn SIG_DFL and SIG_IGN into functions

2022-01-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It may take a time, because the module initialization code has been completely rewritten. -- ___ Python tracker <https://bugs.python.org/issue23

[issue45767] Fix types for dev_t processing in posix module

2022-01-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is device number -1 used in any context (for example as "unknown device number")? -- ___ Python tracker <https://bugs.python.o

[issue46444] Wrong value of pi for larger values using math.cos() function

2022-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, math.radians() just multiplies its argument by pi/180. And what is your issue? -- ___ Python tracker <https://bugs.python.org/issue46

[issue46444] Wrong value of pi for larger values using math.cos() function

2022-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Arguments of cos() and sin() should be in radians, not in degrees. So the correct formulas are k*cos(pi/2-pi/k) and k*sin(pi/k). They are useless because to find the pi approximation you need to know pi. -- nosy: +serhiy.storchaka resolution

[issue46399] Addition of `mapping` attribute to dict views classes has inadvertently broken type-checkers

2022-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I share concerns of Inada-san. I also think that keeping a status quo (ignoring the mapping attribute in typing) is the lesser evil. I am not sure that exposing this attribute was a good idea. We do not expose attributes list and index for list iterators

[issue37295] Possible optimizations for math.comb()

2022-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: comb(n, k) can be computed as perm(n, k) // factorial(k). $ ./python -m timeit -r1 -n1 -s 'from math import comb' "comb(100, 50)" recursive: 1 loop, best of 1: 9.16 sec per loop iterative: 1 loop, best of 1: 164 sec per loop $ ./python

[issue37295] Possible optimizations for math.comb()

2022-01-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: All this should be tested with the C implementation because relative cost of operations is different in C and Python. I have tested Raymond's idea about using iterative algorithm for small k. $ ./python -m timeit -s 'from math import comb' "comb(33

[issue44024] Improve the TypeError message for non-string second arguments passed to the built-in functions getattr and hasattr

2022-01-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your contribution Géry. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue44024] Improve the TypeError message for non-string second arguments passed to the built-in functions getattr and hasattr

2022-01-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 16bf9bd157c7bf5f9c60414fa8e0fe5047c55a9b by Géry Ogam in branch 'main': bpo-44024: Improve the TypeError message in getattr and hasattr (GH-25863) https://github.com/python/cpython/commit/16bf9bd157c7bf5f9c60414fa8e0fe5047c55a9b

[issue46045] NetBSD: do not use POSIX semaphores

2022-01-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 60ceedbdd5b5fb22803039a59954798d931f659a by Thomas Klausner in branch 'main': bpo-46045: Do not use POSIX semaphores on NetBSD (GH-30047) https://github.com/python/cpython/commit/60ceedbdd5b5fb22803039a59954798d931f659a -- nosy

[issue20823] [doc] Clarify copyreg.pickle() documentation

2022-01-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 65940fa5c12a4b4a0650c7845044ffd63b94e227 by Kumar Aditya in branch 'main': bpo-20823: Clarify copyreg.pickle() documentation (GH-30230) https://github.com/python/cpython/commit/65940fa5c12a4b4a0650c7845044ffd63b94e227

[issue46426] Improve tests for the dir_fd argument

2022-01-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +28868 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30668 ___ Python tracker <https://bugs.python.org/issu

[issue46426] Improve tests for the dir_fd argument

2022-01-18 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : There is a flaw in tests for the dir_fd argument in test_posix. All these tests open a current directory as dir_fd, so all paths are relative to the current directory. They will pass in case of the following errors: 1. dir_fd, src_dir_fd or dst_dir_fd

[issue46425] Multiple test modules fail to run if invoked directly

2022-01-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 1292aa6db5bed889a3c87df443754fcae0177801 by Nikita Sobolev in branch 'main': bpo-46425: Fix direct invocation of multiple test modules (GH-30666) https://github.com/python/cpython/commit/1292aa6db5bed889a3c87df443754fcae0177801

[issue46393] Generate frozenset constants when explicitly appropriate

2022-01-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: As Steven have noted the compiler-time optimization is not applicable here because name frozenset is resolved at run-time. In these cases where a set of constants can be replaced with a frozenset of constants (in "x in {1,2,3}" and in "

[issue46408] signal module wrongly relies on small int singletons

2022-01-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See msg234768 and issue23325. I propose to close this as a duplicate of issue23325. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue46

[issue46407] optimizing `1 << n` or `2 ** n` and modulo-only operations

2022-01-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +mark.dickinson, rhettinger, stutzbach, tim.peters ___ Python tracker <https://bugs.python.org/issue46407> ___ ___ Pytho

[issue46307] string.Template should allow inspection of identifiers

2022-01-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The simplest way of collecting template names is to use a defaultdict: >>> d = collections.defaultdict(str) >>> string.Template('$a $b').substitute(d) ' ' >>> d.keys() dict_keys(['a', 'b']) You can use a custom mapping i

[issue46307] string.Template should allow inspection of identifiers

2022-01-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What are the use cases for this feature? -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue46

[issue46312] range() function could accept slice() objects as parameters

2022-01-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Accepting a slice directly in the range constructor is ambiguous. What to do if start or stop are negative or None? What if stop is less than start? You need to specify a sequence length to handle these cases. Maybe the following expressions work for you

[issue37295] Possible optimizations for math.comb()

2022-01-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 2d787971c65b005d0cce219399b9a8e2b70d4ef4 by Serhiy Storchaka in branch 'main': bpo-37295: Use constant-time comb() and perm() for larger n depending on k (GH-30305) https://github.com/python/cpython/commit

[issue46304] Unable to iterate over lines in a file without a block of code

2022-01-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The safe way of using read_lines() is: lines = read_lines() try: # use lines finally: lines.close() or with contextlib.closing(read_lines()) as lines: # use lines And it is in no way better than using "with

[issue46303] _Py_stat and _Py_wstat using incorrect type for status argument

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

[issue46304] Unable to iterate over lines in a file without a block of code

2022-01-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: A warning is an indication of possible bugs in your code. If you do not close file explicitly, and it is closed by the garbage collector, the time of closing is undeterminated. This can lead to exhausting of file descriptors if you have a lot of opened

[issue46293] Typo in specifying escape sequence

2022-01-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, it is a backslash following by a newline. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue46

[issue46280] About vulnerabilities in Cpython native code

2022-01-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The CPython source code is irregularly scanned by different code analysis tools. The results shown extremely high quality of code in comparison with other open source and proprietary code. Most of reports are false positive. Last time real bugs (2 or 3

[issue46264] 'I'.lower() should give non dotted i for LANG=tr_TR

2022-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: If you are looking for case-insensitive string comparison, look at locale.strcoll() and locale.strxfrm(). They are locale-aware. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue46

[issue34178] test_tcl fails on the 3.7 branch

2022-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It was a bug fix. msg320663 states that that issue needs a more complex fix than provided by the initial patch. And that more complex fix was applied. It looks to me that this issue is caused by running new tests with old stdlib. Tests caught a bug

[issue44024] Improve the TypeError message for non-string second arguments passed to the built-in functions getattr and hasattr

2022-01-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Good point. That code was originally added in issue420304 because every exception raised in PyObject_GetAttr() (including a TypeError for non-string name) was silenced in hasattr() and 3-argument getattr(). It was changed in Python 3, so this code

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

2022-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: My plan was to fix as much bugs in the stdlib and backport workaround to 3.9 and 3.10, then propose to revert this "feature" in 3.11. There is a risk of introducing some regressions by this change, but we can handle it. I think it is better to

[issue46181] Destroying an expaned Combobox prevents Entry focus until Alt+Tab

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

[issue25927] add dir_fd for mkstemp, and also maybe to all tempfile.*

2022-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I have also almost finished this issue (only needed to add some tests and docs). -- ___ Python tracker <https://bugs.python.org/issue25

[issue46187] Optionally support rounding for math.isqrt()

2022-01-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is i, rem = isqrt_rem(n) i + (rem != 0) better than (isqrt(n<<2) + 1) >> 1 or n and isqrt(n-1) + 1 ? As for use cases, there were few cases in my experience when I needed the ceiling square root, mostly in simple experim

[issue46245] Add support for dir_fd in shutil.rmtree()

2022-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am sorry, I implemented this feature before opening this issue, but due to typo the PR was not linked here. -- ___ Python tracker <https://bugs.python.org/issue46

[issue46245] Add support for dir_fd in shutil.rmtree()

2022-01-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +28596 pull_request: https://github.com/python/cpython/pull/30365 ___ Python tracker <https://bugs.python.org/issue46

[issue25927] add dir_fd for mkstemp, and also maybe to all tempfile.*

2022-01-03 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- dependencies: +Add support for dir_fd in shutil.rmtree() ___ Python tracker <https://bugs.python.org/issue25927> ___ ___ Pytho

[issue46245] Add support for dir_fd in shutil.rmtree()

2022-01-03 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : It is necessary in particularly for supporting dir_fd in the tempfile module (issue25927). -- components: Library (Lib) messages: 409599 nosy: serhiy.storchaka priority: normal severity: normal status: open title: Add support for dir_fd

[issue25927] add dir_fd for mkstemp, and also maybe to all tempfile.*

2022-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it is better to not change posixpath for now. And it is not necessary. But shutil.rmtree() needs to support file descriptors, and it is not trivial issue. -- ___ Python tracker <https://bugs.python.

[issue34931] os.path.splitext with more dots

2022-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Well, so we can keep term "extension". But I think it is worth to clarify that "leading periods" is related to the last component, not the whole path. It is related to the original issue. -- __

[issue34931] os.path.splitext with more dots

2022-01-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are other issues with the documentation of splitext(). 1. It uses term "extension" (it is even a part of function name), but it is vague and usually does not include a period. On Windows the extension of "python.exe" is "

[issue46142] python --help output is too long

2021-12-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think that the man page should contain all details related to the CLI (and may be even some examples). -- ___ Python tracker <https://bugs.python.org/issue46

[issue37295] Possible optimizations for math.comb()

2021-12-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 30305 applies Mark's algorithm for larger n (up to 127) depending on k, as was suggested by Raymond. Note that it uses different table for limits, which maps k to maximal n. -- ___ Python tracker <ht

[issue37295] Possible optimizations for math.comb()

2021-12-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +28518 pull_request: https://github.com/python/cpython/pull/30305 ___ Python tracker <https://bugs.python.org/issue37

[issue46189] Text containing "wide" character not correctly refreshed

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

[issue34498] Python 3.7+ break on singledispatch_function.register(pseudo_type), which Python 3.6 accepted

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

[issue46200] Discourage logging f-strings due to security considerations

2021-12-29 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +vinay.sajip ___ Python tracker <https://bugs.python.org/issue46200> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45853] Misspelled _IGNORED_ERROS in Lib/pathlib.py

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

[issue45853] Misspelled _IGNORED_ERROS in Lib/pathlib.py

2021-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 8d7644fa64213207b8dc6f555cb8a02bfabeced2 by andrei kulakov in branch 'main': bpo-45853: Fix misspelling and unused import in pathlib (GH-30292) https://github.com/python/cpython/commit/8d7644fa64213207b8dc6f555cb8a02bfabeced2

[issue46191] Conflict between using annotations in singledispatch() and MyPy

2021-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Okay. As a workaround we can explicitly specify the dispatching type: @f.register(list) def _(a: list[int]) -> None: pass -- resolution: -> rejected stage: -> resolved status: open -> closed __

[issue37295] Possible optimizations for math.comb()

2021-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think Raymond means extending the tables to TableSize=101. It can benefit larger arguments if move the code in perm_comb_small(). And perhaps loops in perm_comb_small() could be optimized by using precalculated values for some products

[issue46191] Conflict between using annotations in singledispatch() and MyPy

2021-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not think there is a problem in MyPy. What if use __origin__ for dispatching? Registering with parametrized generics with the same __origin__ will be error. @sigledispatch def f(a: int) -> None: pass @f.register # ok def _(a: list[int]) ->

[issue45853] Misspelled _IGNORED_ERROS in Lib/pathlib.py

2021-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It was assigned to a variable initially because it was used in multiple places. Now it is only used in one place, but I agree with keeping the variable for readability. But it should be named _IGNORED_ERRNOS

[issue34498] Python 3.7+ break on singledispatch_function.register(pseudo_type), which Python 3.6 accepted

2021-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The original issue is about dispatching on non-parametrized generics like typing.Sequence. isinstance([], typing.Sequence) works, so it could be possible to support dispatching on typing.Sequence. But I have doubts that it is worth to revive such feature

[issue46191] Conflict between using annotations in singledispatch() and MyPy

2021-12-29 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : You can dispatch on collections.abc.Sequence. @functools.singledispatch def f(a: collections.abc.Sequence) -> None: pass But MyPy complains about this: error: Missing type parameters for generic type "Sequence" MyPy requires paramet

[issue21987] TarFile.getmember on directory requires trailing slash iff over 100 chars

2021-12-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Well, the tar command strips trailing slashes (even from file paths), so it is reasonable to do this in getmember(). $ mkdir dir $ touch dir/file $ tar cf archive.tar dir $ tar tf archive.tar dir dir/ dir/file $ tar tf archive.tar dir/ dir/ dir/file $ tar

[issue46175] Zero argument super() does not function properly inside generator expressions

2021-12-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Josh. super() uses a lot of magic, and in case of comprehensions it fails in interesting way. Most common cases in which super() does not work: 1. Outside of a function defined in a class. 2. In a static method. 3. In inner function. 4

[issue34963] String representation for types created with typing.NewType(…) are opaque and unappealing

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

[issue45496] Tkinter: test_winfo_rgb failure

2021-12-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed ___ Python tracker <https://bugs.python.org/issue45496> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue45496] Tkinter: test_winfo_rgb failure

2021-12-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue45496> ___ ___ Pyth

[issue46032] functools' singledispatch does not support GenericAlias

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

[issue46032] functools' singledispatch does not support GenericAlias

2021-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 25a12aac4de819745dfc64664ba183a5784b5a81 by Miss Islington (bot) in branch '3.9': [3.9] bpo-46032: Check types in singledispatch's register() at declaration time (GH-30050) (GH-30254) (GH-30255) https://github.com/python/cpython/commit

[issue23819] test_asyncio fails when run under -O

2021-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 07229054a129a72b4ffdf29252eb73c6154c0ccf by Miss Islington (bot) in branch '3.9': [3.9] bpo-23819: Fix asyncio tests on python optimized mode (GH-30195) (GH-30265) https://github.com/python/cpython/commit

[issue45496] Tkinter: test_winfo_rgb failure

2021-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 2e3e0d23adca8d83722d939d6abd1e467d7578f7 by E-Paine in branch 'main': bpo-45496: Allow flexibility in winfo_rgb tests (GH-30185) https://github.com/python/cpython/commit/2e3e0d23adca8d83722d939d6abd1e467d7578f7

[issue43413] tuple subclasses allow arbitrary kwargs

2021-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset ad4857884b4821fc2c9bd23b63d03f9570eb03d1 by Serhiy Storchaka in branch 'main': bpo-43413: Revert changes in set.__init__ (GH-28403) https://github.com/python/cpython/commit/ad4857884b4821fc2c9bd23b63d03f9570eb03d1

[issue45878] Use `self.assertRaises` instead of `try/except` in `ctypes/test_functions.py::test_mro`

2021-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset bee660e46ae2a051400177dcd758d95b5b4a6fcc by Miss Islington (bot) in branch '3.9': [3.9] Remove a NEWS entry for bpo-45878 (GH-30258) (GH-30260) https://github.com/python/cpython/commit/bee660e46ae2a051400177dcd758d95b5b4a6fcc

[issue22815] unexpected successes are not output

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

[issue22815] unexpected successes are not output

2021-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 1944434b44e0118e812bf63f47b268ff6dd0c8f1 by Serhiy Storchaka in branch 'main': bpo-22815: Print unexpected successes in summary in TextTestResult (GH-30138) https://github.com/python/cpython/commit/1944434b44e0118e812bf63f47b268ff6dd0c8f1

[issue45321] Module xml.parsers.expat.errors misses error code constants of libexpat >=2.0

2021-12-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +eli.bendersky, scoder ___ Python tracker <https://bugs.python.org/issue45321> ___ ___ Python-bugs-list mailing list Unsub

[issue23819] test_asyncio fails when run under -O

2021-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a23ab7b6d8b3ae3a47747c0c4bceb2370cc48dcc by Kumar Aditya in branch 'main': bpo-23819: Fix asyncio tests on python optimized mode (GH-30195) https://github.com/python/cpython/commit/a23ab7b6d8b3ae3a47747c0c4bceb2370cc48dcc

[issue45878] Use `self.assertRaises` instead of `try/except` in `ctypes/test_functions.py::test_mro`

2021-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 1fb7c61ca76c6fbff4d90b272e34e92bc2c7d729 by Serhiy Storchaka in branch 'main': Remove a NEWS entry for bpo-45878 (GH-30259) https://github.com/python/cpython/commit/1fb7c61ca76c6fbff4d90b272e34e92bc2c7d729

[issue45878] Use `self.assertRaises` instead of `try/except` in `ctypes/test_functions.py::test_mro`

2021-12-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 11909c12c75a7f377460561abc97707a4006fc07 by Serhiy Storchaka in branch '3.10': [3.10] Remove a NEWS entry for bpo-45878 (GH-30258) https://github.com/python/cpython/commit/11909c12c75a7f377460561abc97707a4006fc07

[issue45878] Use `self.assertRaises` instead of `try/except` in `ctypes/test_functions.py::test_mro`

2021-12-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +28480 pull_request: https://github.com/python/cpython/pull/30259 ___ Python tracker <https://bugs.python.org/issue45

[issue45878] Use `self.assertRaises` instead of `try/except` in `ctypes/test_functions.py::test_mro`

2021-12-26 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +28479 pull_request: https://github.com/python/cpython/pull/30258 ___ Python tracker <https://bugs.python.org/issue45

[issue46032] functools' singledispatch does not support GenericAlias

2021-12-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 03c7449fbc7c57f5e0365f234a0b65c1dde763f2 by Serhiy Storchaka in branch '3.10': [3.10] bpo-46032: Check types in singledispatch's register() at declaration time (GH-30050) (GH-30254) https://github.com/python/cpython/commit

[issue46032] functools' singledispatch does not support GenericAlias

2021-12-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +28475 pull_request: https://github.com/python/cpython/pull/30254 ___ Python tracker <https://bugs.python.org/issue46

[issue46032] functools' singledispatch does not support GenericAlias

2021-12-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 078abb676cf759b1e960f78390b6e80f256f0255 by Serhiy Storchaka in branch 'main': bpo-46032: Check types in singledispatch's register() at declaration time (GH-30050) https://github.com/python/cpython/commit

[issue40296] help(list[int]) fails

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

[issue46175] Zero argument super() does not function properly inside generator expressions

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

[issue45865] Old syntax in unittest

2021-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Not worth the hassle. -- ___ Python tracker <https://bugs.python.org/issue45865> ___ ___ Python-bugs-list mailing list Unsub

[issue45878] Use `self.assertRaises` instead of `try/except` in `ctypes/test_functions.py::test_mro`

2021-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a9e0b2b49374df91c40fe409508cfcdc6332450e by Miss Islington (bot) in branch '3.10': bpo-45878: convert `try/except` to `self.assertRaises` in `Lib/ctypes/test/test_functions.py` (GH-29721) (GH-29748) https://github.com/python/cpython/commit

[issue45878] Use `self.assertRaises` instead of `try/except` in `ctypes/test_functions.py::test_mro`

2021-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 393ff040281db818f2d6e0240919316f58f989a6 by Miss Islington (bot) in branch '3.9': bpo-45878: convert `try/except` to `self.assertRaises` in `Lib/ctypes/test/test_functions.py` (GH-29721) (GH-29723) https://github.com/python/cpython/commit

[issue46167] Parse assert (x == y, "Descriptive text") as statement params instead of a tuple

2021-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For very long expression or very long message you can add parentheses around the expression or message. Black will format it as: assert ( very very long expression ), ( "very very long " "message" ) With

[issue46162] Make `builtins.property` generic

2021-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Does it mean that property[GetType, SetType] will be required and MyPy will complain if the raw property decorator be used? -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue46

[issue46167] Parse assert (x == y, "Descriptive text") as statement params instead of a tuple

2021-12-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It does not need any change in parser, it can be done in the code generator which currently explicitly warns about such ambiguity. Although it needs changes in formal grammar which will be more complex. But what is a benefit? What is an advantage

[issue46157] Typo in JSON documentation

2021-12-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 30237 introduced few new errors. -- ___ Python tracker <https://bugs.python.org/issue46157> ___ ___ Python-bugs-list m

[issue46157] Typo in JSON documentation

2021-12-23 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.10, Python 3.11, Python 3.9 ___ Python tracker <https://bugs.python.org/issue46157> ___ ___ Python-bugs-list m

[issue46157] Typo in JSON documentation

2021-12-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: And more errors can be found with: $ find -name '*.rst' -exec egrep --color -i '\ban +[qwrtpsdfghjklzxcvbnm]' '{}' + $ find -name '*.rst' -exec egrep --color -i '\ba +[eioa]' '{}' + It is worth to check also: $ find -name '*.rst' -exec egrep --color -i

[issue46157] Typo in JSON documentation

2021-12-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Kumar. These errors were found with the following one-liners: $ find -name '*.rst' -exec egrep --color -i '\ban +:[a-z:]+:`[qwrtpsdfghjklzxcvbnm]' '{}' + $ find -name '*.rst' -exec egrep --color -i '\ba +:[a-z:]+:`[eyuioa]' '{}' + They produce

[issue46157] Typo in JSON documentation

2021-12-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Doc/using/cmdline.rst:474: * ``-X warn_default_encoding`` issues a :class:`EncodingWarning` when the Doc/c-api/init_config.rst:601: If non-zero, emit a :exc:`EncodingWarning` warning when :class:`io.TextIOWrapper` Doc/library/fractions.rst:90

[issue46157] Typo in JSON documentation

2021-12-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are other similar errors: Doc/library/json.rst:162: will result in an :exc:`RecursionError` (or worse). Doc/library/json.rst:435: prevent an infinite recursion (which would cause an :exc:`RecursionError`). Doc/library/tarfile.rst:66

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