Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
New changeset d006392245c904547e5727144235c2f9d7948e96 by Miss Islington (bot)
in branch '3.9':
bpo-44940: Clarify the documentation of re.findall() (GH-27849) (GH-27880)
https://github.com/python/cpython/commit/d006392245c904547e5727144235c2f9d7948e96
Serhiy Storchaka added the comment:
New changeset 4e5162fd369baf25dd16a42ccd0fa7756744f4d0 by Miss Islington (bot)
in branch '3.9':
bpo-44955: Always call stopTestRun() for implicitly created TestResult objects
(GH-27831) (GH-27882)
https://github.com/python/cpython/commit
Serhiy Storchaka added the comment:
I do not think that math.trunc() for UUID or IP4Address makes sense.
--
___
Python tracker
<https://bugs.python.org/issue44
Serhiy Storchaka added the comment:
Completely agree.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue44977>
___
___
Python-bug
Serhiy Storchaka added the comment:
It is a bug because there is a difference between the following cases:
@skip("skipped")
def test1(self):
...
@other_decorator
@skip("skipped")
def test2(self):
...
def test2(self):
se
New submission from Serhiy Storchaka :
Ryan Mast reported about a warning about "Unknown child process pid" after
finishing test_asyncio (see msg400018 and
https://github.com/python/cpython/pull/27870#issuecomment-903072119 for
details).
I cannot reproduce it locally. Ryan, coul
Serhiy Storchaka added the comment:
Thank you for your report Ryan. Indeed, there was a bug introduced during
refactoring (one unneeded "yield" was kept), and there was a bug before
refactoring (the transport was not closed).
I'll open a new issue about "Unknown ch
Serhiy Storchaka added the comment:
New changeset a9640d75531d6cbbfd254b65435f238c26bf5cd9 by Serhiy Storchaka in
branch 'main':
bpo-44955: Always call stopTestRun() for implicitly created TestResult objects
(GH-27831)
https://github.com/python/cpython/commit
Serhiy Storchaka added the comment:
New changeset 64f9e7b19dc1603fcbd07c17c9860085b9d21465 by Serhiy Storchaka in
branch 'main':
bpo-44940: Clarify the documentation of re.findall() (GH-27849)
https://github.com/python/cpython/commit/64f9e7b19dc1603fcbd07c17c9860085b9d21465
Serhiy Storchaka added the comment:
New changeset 585390fdd8661b4bc08bdfc27551292da9b4b9b8 by Serhiy Storchaka in
branch 'main':
bpo-44968: Fix test_subprocess_wait_no_same_group in test_asyncio (GH-27870)
https://github.com/python/cpython/commit/585390fdd8661b4bc08bdfc27551292da9b4b9b8
Serhiy Storchaka added the comment:
The OverflowError should only be raised if finite arguments produce infinite
result. Py_ADJUST_ERANGE2 is used improperly.
But after fixing this error I get (nan+infj) for z**1, the same as for z*1.
--
nosy: +serhiy.storchaka
Serhiy Storchaka added the comment:
New changeset 5bd27c3be5734e158f67ff86087a977a25d89161 by Miss Islington (bot)
in branch '3.10':
bpo-44524: Do not set _name of _SpecialForm without need (GH-27861) (GH-27871)
https://github.com/python/cpython/commit
Serhiy Storchaka added the comment:
See also issue12558 which exposes the other side of the same issue.
Las time I looked at it, it was inherently a Tcl issue. In some places it uses
locale-dependent formatting of floating point numbers, but locale-unaware
parsing, or vice versa
Serhiy Storchaka added the comment:
I think that __mro_entries__() for annotated types should return the result of
__mro_entries__() for the original type if it has __mro_entries__. But details
can be complicated, especially if user-defined generic types are involved.
Alternatively
New submission from Serhiy Storchaka :
It works only with simple types
>>> class X(Annotated[list, 'annotation']): pass
...
But not with type aliases
>>> class X(Annotated[List[int], 'annotation']): pass
...
Traceback (most recent call last):
File "", line 1,
Serhiy Storchaka added the comment:
New changeset 4ceec495598e78f0776dd46d511dcc612a434dc3 by Serhiy Storchaka in
branch 'main':
bpo-44524: Do not set _name of _SpecialForm without need (GH-27861)
https://github.com/python/cpython/commit/4ceec495598e78f0776dd46d511dcc612a434dc3
Change by Serhiy Storchaka :
--
components: +asyncio
type: -> behavior
versions: -Python 3.8
___
Python tracker
<https://bugs.python.org/issue44968>
___
_
Change by Serhiy Storchaka :
--
keywords: +patch
nosy: +serhiy.storchaka
nosy_count: 7.0 -> 8.0
pull_requests: +26324
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27870
___
Python tracker
<https://bugs.p
Change by Serhiy Storchaka :
--
pull_requests: +26319
pull_request: https://github.com/python/cpython/pull/27861
___
Python tracker
<https://bugs.python.org/issue44
Serhiy Storchaka added the comment:
Fraction.__int__ = Fraction.__trunc__ may not work because __trunc__() can
return any object with __index__, while __int__ should return an exact int (not
even an int subclass).
--
___
Python tracker
<ht
Change by Serhiy Storchaka :
--
keywords: +patch
nosy: +serhiy.storchaka
nosy_count: 3.0 -> 4.0
pull_requests: +26309
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27849
___
Python tracker
<https://bugs.p
Serhiy Storchaka added the comment:
Every new feature should be documented and covered by tests (unless it is very
trivial or it is very difficult to write a test for it).
--
___
Python tracker
<https://bugs.python.org/issue41
Serhiy Storchaka added the comment:
Your terminal emulator does not support this key. I tested it on Konsole and it
returned 27. But on XTerm and on the Linux virtual console I get the expected
result.
--
nosy: +serhiy.storchaka
___
Python
Change by Serhiy Storchaka :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Serhiy Storchaka :
--
nosy: +andrei.avk, defreng, ezio.melotti, michael.foord, rbcollins,
terry.reedy, xtreak, zach.ware
___
Python tracker
<https://bugs.python.org/issue41
Serhiy Storchaka added the comment:
There are some side effects of setting _name. In 3.9:
>>> class X(Annotated[int, (1, 10)]): pass
...
>>> X.__mro__
(, , )
In 3.10:
>>> class X(Annotated[int, (1, 10)]): pass
...
>>> X.__mro__
(, , , )
Now a subclas
Serhiy Storchaka added the comment:
There are still cryptic TypeError messages for Annotated:
>>> class X(Annotated[int | float, "const"]): pass
...
Traceback (most recent call last):
File "", line 1, in
TypeError: metaclass conflict: the metaclass of a
Serhiy Storchaka added the comment:
Tk does not bind KP_Enter in standard TK dialogs. I do not think we should
introduce additional discrepancy between dialogs implemented in Tk and Python.
Please file a feature request for Tk. If they add a binding for KP_Enter we
will follow them
Serhiy Storchaka added the comment:
Tests are needed.
--
resolution: fixed ->
stage: resolved -> test needed
status: closed -> open
___
Python tracker
<https://bugs.python.or
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +26295
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27831
___
Python tracker
<https://bugs.python.org/issu
New submission from Serhiy Storchaka :
Method startTestRun() is always called for the TestResult object implicitly
created by TestCase.defaultTestResult() when no TestResult object is passed to
TestCase.run(). But method stopTestRun() is not always called in pair with
startTestRun
Serhiy Storchaka added the comment:
Many years ago I write highly optimized hyphenation module (as a part of
OrnamentBook project
https://sourceforge.net/projects/pybookreader/files/OrnamentBook/). I could
contribute the code to the stdlib. But the problem is that the algorithm
depends
Serhiy Storchaka added the comment:
As the original author of _PyErr_ChainExceptions() (issue21715) I am not sure
that its name and signature are optimal. It did not matter while it was
internal function because we could change them at any moment, but for public
API the design should
Serhiy Storchaka added the comment:
It is not specific to typing.
>>> isinstance(1, (int, 1))
True
>>> isinstance(1, (1, int))
Traceback (most recent call last):
File "", line 1, in
TypeError: isinstance() arg 2 must be a type or tuple of types
>&g
Serhiy Storchaka added the comment:
I concur with Steven.
Before range() and enumerate() were introduced there were discussions about
introducing dedicated syntax. But it was decided that builtin functions are
more preferable. range() was improved in Python 3, so you do not need to waste
Serhiy Storchaka added the comment:
Is BiDiMap included in the Java SDK?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue44
Serhiy Storchaka added the comment:
You can use the functional form of TypedDict:
C = TypedDict("C", {"to": int, "from": int})
--
nosy: +serhiy.storchaka
___
Python tracker
<h
Serhiy Storchaka added the comment:
It is a new feature, and we usually do not backport new features to old Python
versions, so it can only be included in Python 3.11 (backports can be provided
by third-party libraries). Do you want to create a PR?
--
nosy: +serhiy.storchaka
Serhiy Storchaka added the comment:
You raise ArgumentTypeError, but expect ArgumentError. ArgumentTypeError is not
a subclass of ArgumentError.
--
nosy: +serhiy.storchaka
versions: +Python 3.8 -Python 3.6
___
Python tracker
<ht
Serhiy Storchaka added the comment:
Isn't it a duplicate of issue41203?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue44
Serhiy Storchaka added the comment:
Nothing was changed. Backslashes in your output are backslashes in the bytes
object repr.
>>> print('a\'b"c\'\'\'d"""e'.encode('unicode_escape').decode())
a'b"c'''d"""e
-
Serhiy Storchaka added the comment:
New changeset 058fb35b57ca8c5063d16ec818e668b3babfea65 by Serhiy Storchaka in
branch 'main':
bpo-44854: Remove trailing whitespaces (GH-27689)
https://github.com/python/cpython/commit/058fb35b57ca8c5063d16ec818e668b3babfea65
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
nosy_count: 2.0 -> 3.0
pull_requests: +26175
pull_request: https://github.com/python/cpython/pull/27689
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
I understand your confusion John.
The fact is that int() serves two functions. If argument is a number, it
truncates it to an integer. If argument is a string, it parses the string
representation of integer (not necessary decimal).
For details see https
Serhiy Storchaka added the comment:
My argument is the loop creation should be prevented at first place.
PyErr_SetObject() is not the only C code that can hang or overflow the stack
when iterate a loop. Preventing creation of the loop will fix all other code
that iterate the __context__
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.11 -Python 3.9
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
New changeset 2b496e79293a8b80e8ba0e514e186b3b1467b64b by Serhiy Storchaka in
branch 'main':
bpo-42053: Remove misleading check in os.fwalk() (GH-27669)
https://github.com/python/cpython/commit/2b496e79293a8b80e8ba0e514e186b3b1467b64b
Serhiy Storchaka added the comment:
Following your long example, it seems to me that all works as you expected.
Raise an exception if you expect exception, and does raise it if you expect no
exception.
I may miss something, what exactly does not work as you expected?
--
nosy
Change by Serhiy Storchaka :
--
pull_requests: +26158
pull_request: https://github.com/python/cpython/pull/27669
___
Python tracker
<https://bugs.python.org/issue42
Serhiy Storchaka added the comment:
I confirm that fwalk() does not support integer first argument. This check is
misleading.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue42
Serhiy Storchaka added the comment:
New changeset 0eec6276fdcdde5221370d92b50ea95851760c72 by Serhiy Storchaka in
branch 'main':
bpo-44859: Improve error handling in sqlite3 and and raise more accurate
exceptions. (GH-27654)
https://github.com/python/cpython/commit
Serhiy Storchaka added the comment:
The 3.9 behavior is incorrect: write 'spam\\eggs', read 'spameggs'. The 3.10
behavior is correct: write 'spam\\eggs', read 'spam\\eggs'. What is your
problem exactly?
--
nosy: +serhiy.storchaka
___
Python
Serhiy Storchaka added the comment:
> And though I did not check, I expect the `-b` flag exists mostly because of
> the performance impact of the warning any time bytes are checked for
> equality, but surely that impact would be limited and probably not very
&
Serhiy Storchaka added the comment:
Entries 3 and 4 are about Cursor.executescript(), not Cursor.execute().
--
___
Python tracker
<https://bugs.python.org/issue44
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +26148
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27654
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
There is also a problem with the sqlite3.InterfaceError raised when bind
parameters with message "Error binding parameter XXX - probably unsupported
type." It is raised not only for unsupported types, but:
* For too large integers (outside of
New submission from Serhiy Storchaka :
* MemoryError is now raised instead of sqlite3.Warning when memory is not
enough for encoding statement to UTF-8 in Connection.__call__() and
Cursor.execute().
* UnicodEncodeError is now raised instead of sqlite3.Warning when statement
contains
Serhiy Storchaka added the comment:
clear_ignored_deprecations() does not know whether filters were added in
setUp(), setUpClass(), setUpModule() or just in a particular method. We should
use teadDown*() or add*Cleanup() to clean up at appropriate level
Serhiy Storchaka added the comment:
New changeset c352412123140e79dcce6188d17e3e6dbc3f4144 by Erlend Egeberg
Aasland in branch '3.9':
[3.9] bpo-44822: Don't truncate `str`s with embedded NULL chars returned by
`sqlite3` UDF callbacks (GH-27588). (GH-27639)
https://github.com/python/cpython
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
New changeset 7d747f26e6cac9f6891d475f3443441ce947697b by Serhiy Storchaka in
branch 'main':
bpo-44839: Raise more specific errors in sqlite3 (GH-27613)
https://github.com/python/cpython/commit/7d747f26e6cac9f6891d475f3443441ce947697b
Serhiy Storchaka added the comment:
What about new tests and NEWS update?
--
___
Python tracker
<https://bugs.python.org/issue43853>
___
___
Python-bugs-list m
Serhiy Storchaka added the comment:
There are problems with clearing all ignored deprecation filters.
We can want to ignore warnings in narrower or wider scope: per-method,
per-class, per-module. We should use the warnings.catch_warnings() context
manager for restoring filters
Serhiy Storchaka added the comment:
New changeset 8c07fef867707694c9f2fcee4d7a9563ad78ed14 by Erlend Egeberg
Aasland in branch '3.9':
[3.9] bpo-43853: Handle sqlite3_value_text() errors (GH-25422). (GH-27627)
https://github.com/python/cpython/commit/8c07fef867707694c9f2fcee4d7a9563ad78ed14
Change by Serhiy Storchaka :
--
nosy: +belopolsky, p-ganssle, vstinner
___
Python tracker
<https://bugs.python.org/issue44831>
___
___
Python-bugs-list mailin
Serhiy Storchaka added the comment:
I am not against documenting the behavior of -b and BytesWarning clearly. I
don't think that anyone would be against. Just somebody have to provide a PR.
Explicitly repr-ing a bytes instance does not produce a warning, and never
produced, so I don't
Serhiy Storchaka added the comment:
I think it is worth to backport it to 3.9.
It looks to me that it fixes also support of strings containing NUL. It would
be nice to add corresponding tests for this. You can also add this in the NEWS
entry for this issue.
--
status: closed
Serhiy Storchaka added the comment:
Good catch! Thank you Raymond for the third example.
I though that it can be easily fixed by calling tp_traverse() for submapping:
static int
mappingproxy_traverse(PyObject *self, visitproc visit, void *arg)
{
mappingproxyobject *pp
Serhiy Storchaka added the comment:
Thank you Ken Jin.
But it does not explain why objects which currently have __name__/__qualname__
is None should have these attribute. There is no builtin data type that
corresponds to ClassVar, Final, Literal, Concatenate or TypeGuard. And (int |
str
Serhiy Storchaka added the comment:
I am confusing. Why do these objects should have __name__ and __qualname__
attributes? What document specifies this? How are these attributes used?
collections.abc.MutableSet and typing.MutableSet are different things. The
former is a class, the latter
Serhiy Storchaka added the comment:
It was grown from bigmem tests for issue44822.
--
___
Python tracker
<https://bugs.python.org/issue44839>
___
___
Python-bug
New submission from Serhiy Storchaka :
Currently, any exception raised in user-defined function set the general
SQLITE_ERROR error which then produce sqlite3.OperationalError.
For example, if the user function returns a string or bytes object larger than
INT_MAX you get OperationalError
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +26107
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27613
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
New changeset 8f010dc920e1f6dc6a357e7cc1460a7a567c05c6 by Erlend Egeberg
Aasland in branch 'main':
bpo-44822: Don't truncate `str`s with embedded NULL chars returned by `sqlite3`
UDF callbacks (GH-27588)
https://github.com/python/cpython/commit
Change by Serhiy Storchaka :
--
title: [sqlite3] Micro-optimisation: pass string size to sqlite3_result_text()
-> [sqlite3] Do not truncate results of user functions and aggregates on the
first NUL
type: enhancement -> behavior
versions: +Python 3.10, Pyth
Serhiy Storchaka added the comment:
The difference between specifying negative and non-negative third argument of
sqlite3_result_text() is that in the latter case the result can contain
embedded NUL characters.
Could you please add a test for string containing embedded NUL?
Letting SQLite
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +26088
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27585
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
Thank you Ken Jin. So the problem is the __args__ (x, str) is interpreted
differently depending on x, and after substituting x the interpretation can be
changed. If x was ParamSpec, it was interpreted in one way, but if it becomes
int, it is now
Serhiy Storchaka added the comment:
> It should use "(id(instance), instance)" rather than just "instance" as the
> key.
It should use a dict with id(instance) as a key and instance as value. An
instance can be non-hashable.
--
Change by Serhiy Storchaka :
--
status: open -> pending
___
Python tracker
<https://bugs.python.org/issue44818>
___
___
Python-bugs-list mailing list
Un
Serhiy Storchaka added the comment:
My concern about importing readline at the top of the module is that importing
readline has a side effect. The only module which imports it unconditionally at
the top is rlcompleter. In all other places it is imported lazily.
And importing readline ahead
Serhiy Storchaka added the comment:
You cannot expect that running code under debugger does not have any effect.
Otherwise there would not be any meaning in debugger. Running code under
debugger has some side effects, and setting locals __return__ and __exception__
is one of them
Serhiy Storchaka added the comment:
There is other related case:
>>> from typing import *
>>> class P(Protocol): pass
...
>>> class B:
... def __init__(self):
... self.test = 'OK'
...
>>> class D(P, B):
... pass
...
>>> D().t
Change by Serhiy Storchaka :
--
pull_requests: +26054
pull_request: https://github.com/python/cpython/pull/27545
___
Python tracker
<https://bugs.python.org/issue44
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
versions: +Python 3.10, Python 3.9
___
Python tracker
<https://bugs.python.org/issue44806>
___
___
Pytho
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
nosy_count: 2.0 -> 3.0
pull_requests: +26048
pull_request: https://github.com/python/cpython/pull/27538
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
New changeset f92b9133ef67e77605cbd315b6b6c81036ce110e by Serhiy Storchaka in
branch 'main':
bpo-44793: Fix checking the number of arguments when subscribe a generic type
with ParamSpec parameter. (GH-27515)
https://github.com/python/cpython/commit
Change by Serhiy Storchaka :
--
nosy: +ned.deily
___
Python tracker
<https://bugs.python.org/issue44804>
___
___
Python-bugs-list mailing list
Unsubscribe:
Serhiy Storchaka added the comment:
Having a side effect at import time is not good. It will interfere with
programs which just import pdb, but not use it.
There are two other options:
1. Import readline at top level, but call set_completer_delims() lazily.
2. Do not import readline at all
Serhiy Storchaka added the comment:
PR 27528 makes the C implementation of OrderedDict.popitem() consistent with
the Python implementation (do not call overridden __getitem__ and __setitem__).
PR 27530 changes also both implementations of OrderedDict.pop(). It simplifies
the C code
Change by Serhiy Storchaka :
--
pull_requests: +26045
pull_request: https://github.com/python/cpython/pull/27530
___
Python tracker
<https://bugs.python.org/issue27
Serhiy Storchaka added the comment:
Actually most names defined in typing are no longer classes.
--
assignee: -> docs@python
components: +Documentation
nosy: +docs@python, gvanrossum, kj
versions: +Python 3.11
___
Python tracker
<
Serhiy Storchaka added the comment:
TypeDict is a callable, it can be used as
Point2D = TypedDict('Point2D', x=int, y=int, label=str)
It can also be used as a base in class definition, but is is not a class
itself. It does not occur in __bases__ of the created class, and it cannot
Serhiy Storchaka added the comment:
I agree that composition is methodologically more correct than inheritance for
implementing a variant of lru_cache(). But if you need lru_cache() why not use
lru_cache() from the stdlib? I think that instead of showing a poor version of
the lru_cache
Change by Serhiy Storchaka :
--
pull_requests: +26043
pull_request: https://github.com/python/cpython/pull/27528
___
Python tracker
<https://bugs.python.org/issue27
Serhiy Storchaka added the comment:
It is complicated. The pure Python implementation of OrderedDict.popitem() and
OrderedDict.pop() are not consistent. The former uses dict.pop() which doesn't
call __getitem__ and __setitem__. The latter calls __getitem__ and __setitem__.
The C
Change by Serhiy Storchaka :
--
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.5, Python 3.6, Python
3.7
___
Python tracker
<https://bugs.python.org/issue27
1101 - 1200 of 25750 matches
Mail list logo