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:
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
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:
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/8c07fef867707694c9f2fcee4d7a95
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 in the
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:
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/7d747f26e6cac9f6891d475f344344
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 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
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
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:
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 th
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:
Entries 3 and 4 are about Cursor.executescript(), not Cursor.execute().
--
___
Python tracker
<https://bugs.python.org/issue44
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
> rele
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
__
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/cpyt
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
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:
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
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/2b496e79293a8b80e8ba0e514e186b
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:
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__
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
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:
New changeset 058fb35b57ca8c5063d16ec818e668b3babfea65 by Serhiy Storchaka in
branch 'main':
bpo-44854: Remove trailing whitespaces (GH-27689)
https://github.com/python/cpython/commit/058fb35b57ca8c5063d16ec818e668
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
Serhiy Storchaka added the comment:
Isn't it a duplicate of issue41203?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/is
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:
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 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:
Is BiDiMap included in the Java SDK?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue44
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:
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:
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 be
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 on
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() for
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
Serhiy Storchaka added the comment:
Tests are needed.
--
resolution: fixed ->
stage: resolved -> test needed
status: closed -> open
___
Python tracker
<https://bugs.python.or
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:
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:
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
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
Change by Serhiy Storchaka :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
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
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:
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 :
--
pull_requests: +26319
pull_request: https://github.com/python/cpython/pull/27861
___
Python tracker
<https://bugs.python.org/issue44
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 :
--
components: +asyncio
type: -> behavior
versions: -Python 3.8
___
Python tracker
<https://bugs.python.org/issue44968>
___
_
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/4ceec495598e78f0776dd46d511dcc
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 &q
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
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:
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/cpyt
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 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/585390fdd8661b4bc08bdfc2755129
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/64f9e7b19dc1603fcbd07c17c98600
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/cpyt
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 "Unkno
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:
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
Serhiy Storchaka added the comment:
Completely agree.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue44977>
___
___
Python-bug
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:
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/cpyt
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/d006392245c904547e5727144235c2
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
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 b1db308c6114bb18c06656c94c0ffa73ba954977 by andrei kulakov in
branch 'main':
bpo-41322: Add unit tests for deprecation of test return values (GH-27846)
https://github.com/python/cpython/commit/b1db308c6114bb18c06656c94c0ffa
Serhiy Storchaka added the comment:
Functions registered with TestCase.addClassCleanup are called because TestCase
has default implementation of tearDownClass. But you can suppress it by setting
tearDownClass = None. So there is a similar issue with class cleanup functions.
--
nosy
Change by Serhiy Storchaka :
--
versions: +Python 3.11 -Python 3.8
___
Python tracker
<https://bugs.python.org/issue43913>
___
___
Python-bugs-list mailin
Serhiy Storchaka added the comment:
It is not a bug in archivers, it is just a broken archive. The ZIP archive
contains a central directory which lists all files in the archive, so the
archiver can just read the central directory without reading all archive to get
the list of files. There
Serhiy Storchaka added the comment:
If the zipped file was created by zipfile module of Python, it is a bug. Could
you reproduce the sequence of actions that creates such broken archive?
--
___
Python tracker
<https://bugs.python.org/issue41
Serhiy Storchaka added the comment:
Defining complex.__complex__ and bytes.__bytes__ would not solve anything,
because
>>> issubclass(int, SupportsComplex)
False
>>> issubclass(float, SupportsComplex)
False
>>> issubclass(bytearray, SupportsBytes)
Fals
New submission from Serhiy Storchaka :
test_null_strings in Modules/_testcapimodule.c was initially added in
7580146b5c7025976f0907a9893e01dc3d3d3457 for testing PyObject_Str(NULL) and
PyObject_Unicode(NULL). PyObject_Unicode() was removed in 3.0, so now the test
calls PyObject_Str(NULL
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +26362
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27904
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
Should getattr() normalize attribute name? If no, it will produce surprises
further along the way. If yes, it will add significant overhead.
Even star-import can get significant impact.
--
nosy: +serhiy.storchaka
Serhiy Storchaka added the comment:
No, it cannot be fixed in marshal itself.
s = {("string", 1), ("string", 2), ("string", 3)}
All tuples contain references to the same string. The first serialized tuple
will contain serialization of the string, all other will
Change by Serhiy Storchaka :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> Resource warnings in test_subprocess
___
Python tracker
<https://bugs.python
Change by Serhiy Storchaka :
--
status: open -> pending
___
Python tracker
<https://bugs.python.org/issue38912>
___
___
Python-bugs-list mailing list
Un
Serhiy Storchaka added the comment:
New changeset bb21e28fd08f894ceff2405544a2f257d42b1354 by Ammar Askar in branch
'main':
bpo-34990: Treat the pyc header's mtime in compileall as an unsigned int
(GH-19708)
https://github.com/python/cpython/commit/bb21e28fd08f894ceff240554
Serhiy Storchaka added the comment:
New changeset 23384a1749359f0ae7aaae052073d44b59e715a1 by Ken Jin in branch
'main':
bpo-44524: Don't modify MRO when inheriting from typing.Annotated (GH-27841)
https://github.com/python/cpython/commit/23384a1749359f0ae7aaae052
Serhiy Storchaka added the comment:
https://github.com/python/cpython
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue45003>
___
___
Serhiy Storchaka added the comment:
New changeset 806e25fd3173a80021e6df87b81263b5f6056f38 by Objectivitix in
branch 'main':
bpo-45003: Change __div__ to __truediv__ in py3 language reference. (GH-27951)
https://github.com/python/cpython/commit/806e25fd3173a80021e6df87b81263
Change by Serhiy Storchaka :
--
pull_requests: +26411
pull_request: https://github.com/python/cpython/pull/27964
___
Python tracker
<https://bugs.python.org/issue45
New submission from Serhiy Storchaka :
Special method __div__ was used in Python 2, but is not used in Python 3. I
think it can be removed from the list of supported special methods in
unittest.mock.
--
components: Library (Lib)
messages: 400314
nosy: michael.foord, serhiy.storchaka
Serhiy Storchaka added the comment:
It was kept in the previous clean up in issue23641 because I had doubts. But
now I do not see reasons to keep it. Rather keeping it can confuse users.
--
___
Python tracker
<https://bugs.python.org/issue45
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +26412
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27965
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
New changeset 46970fdd8ddc18823519d1e1c57136f6bc2a8dac by Miss Islington (bot)
in branch '3.9':
bpo-45003: Change __div__ to __truediv__ in py3 language reference. (GH-27951)
(GH-27962)
https://github.com/python/cpyt
Serhiy Storchaka added the comment:
New changeset ea39933b4b76da35874be79f2384e24b38c37351 by Miss Islington (bot)
in branch '3.10':
bpo-45003: Change __div__ to __truediv__ in py3 language reference. (GH-27951)
(GH-27963)
https://github.com/python/cpyt
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.11
___
Python tracker
<https://bugs.python.or
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
title: tests fail when using pure-python instead of _asycio -> tests fail when
using pure-python instead of _asyncio
___
Python tracker
<https://bugs.python.org/issu
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +26415
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27968
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
I do not know why asyncio.events._get_running_loop was patched in
FunctionalTestCaseMixin.
--
nosy: +lukasz.langa, pablogsal
priority: normal -> release blocker
type: -> behavior
versions: +Python 3.10, Python 3.11, Pyth
New submission from Serhiy Storchaka :
The proposed PR provides more compact implementation of the range iterator. It
consumes less memory and produces smaller pickles. It is presumably faster
because it performs simpler arithmetic operations on iteration (no
multiplications
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +26433
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27986
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
Currently the range iterator contains four integers: index, start, step and
len. On iteration index is increased until achieve len, the result is
calculated as start+index*step.
In the proposed PR the range iterator contains only three integers: index was
Serhiy Storchaka added the comment:
step can be negative. So the condition should be more complex: ((r->stop > 0) ?
(result < r->stop) : (result > r->stop)). And it would look much more complex
for longrangeiterobject.
--
Serhiy Storchaka added the comment:
I get different result:
>>> app.quit
>>> help(app.quit)
Help on Button in module tkinter object:
class Button(Widget)
| Button(master=None, cnf={}, **kw)
|
| Button widget.
|
...
--
nosy:
1501 - 1600 of 25874 matches
Mail list logo