Serhiy Storchaka added the comment:
New changeset 557b9a52edc4445cec293f2cc2c268c4f564adcf by Serhiy Storchaka in
branch 'master':
bpo-40670: More reliable validation of statements in timeit.Timer. (GH-22358)
https://github.com/python/cpython/commit/557b9a52edc4445cec293f2cc2c268
Serhiy Storchaka added the comment:
And what if run different threads with the same target or with different
targets with the same name? Would not "Thread-3" be more useful in this case?
for i in range(10):
Thread(target=print, args=(i,)).start()
for i in range(10):
de
Serhiy Storchaka added the comment:
See
https://docs.python.org/3/faq/programming.html#how-do-i-create-a-multidimensional-list.
--
nosy: +serhiy.storchaka
status: pending -> open
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
It was moved out from the limited API in issue13903
(7d95e4072169911b228c9e42367afb5f17fd3db0). I think it was error.
--
nosy: +Mark.Shannon, serhiy.storchaka
___
Python tracker
<https://bugs.python.
Serhiy Storchaka added the comment:
Ideally, I would prefer separate counters for different names, and omitting a
number for the first thread with unique name:
doit
doit-2
Thread-1
Thread-2
print
print-2
doit-3
But it is not feasible. It would require supporting a cache which
Serhiy Storchaka added the comment:
It was moved into the "#ifndef Py_LIMITED_API" block and therefore was
effectively excluded from the limited API.
We should fix this error in all maintained versions.
--
versions: +Python 3.8,
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue41849>
___
___
Python-bugs-list mailing list
Unsub
Change by Serhiy Storchaka :
--
nosy: +benjamin.peterson, gvanrossum, pablogsal, serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue41848>
___
___
Serhiy Storchaka added the comment:
It is a bug. Compiler explicitly checks if the number of nested "try" blocks
does not exceed the limit of CO_MAXBLOCKS, but it does not count implicit "try"
blocks inserted when your assign an exception in the "
Serhiy Storchaka added the comment:
Humm, my supposition was not absolutely correct. The cause is that the compiler
and the interpreter use the stack of size CO_MAXBLOCKS for different things.
The interpreter pushes a thing for the "except" clause, while the compiler does
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue41852>
___
___
Python-bugs-list mailing list
Unsub
Serhiy Storchaka added the comment:
This is virtually a duplicate of issue40388.
--
nosy: +mark.dickinson, rhettinger, serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue41
Change by Serhiy Storchaka :
--
resolution: -> out of date
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
You always can use PyObject_CallMethod(). It is not a method called in tight
loop for which the overhead of calling method is significant.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.
Serhiy Storchaka added the comment:
literal_eval() is not purposed to evaluate arbitrary arithmetic expressions. It
is only purposed to handle strings produced by repr() of some simple builtin
objects. repr(6j+3) is '(3+6j)', not '(6j+3)' and not '(6j--3)', so i
Serhiy Storchaka added the comment:
If add a function for unregistering a codec search function, it would be worth
to add also a function for unregistering an error handler.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.
Serhiy Storchaka added the comment:
It should work exactly as the newline argument of open(). Anything else would
be surprising.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue23
Serhiy Storchaka added the comment:
No, I meant a function which combines PyGen_Send, tp_iternext and
_PyGen_FetchStopIterationValue. Was not it in your PR?
--
___
Python tracker
<https://bugs.python.org/issue41
Serhiy Storchaka added the comment:
Although unregistering an error handler may be not so easy, so it is better to
open a separate issue for it.
--
keywords: +easy (C) -patch
___
Python tracker
<https://bugs.python.org/issue41
Serhiy Storchaka added the comment:
I concur with Tal that negating size would be useless feature, and that we do
not need an alternate equal() method. When we want to test that two strings are
equal ignoring case we do not call a special method equalignorecase(), we just
test that s1
New submission from Serhiy Storchaka :
Currently Font objects have default repr:
Since Font is just an object oriented wrapper for font name, and Font objects
with the same name are equal, it is worth to show the font name in the repr and
do not show an id.
--
components
Serhiy Storchaka added the comment:
I concur with Raymond. Are there problems with understanding the term "escape"
in some context? If yes, then we perhaps need to clarify the corresponding
place in the documentation. But if there is a problem with understanding the
general word &
Serhiy Storchaka added the comment:
It is expected behavior. \n in a raw string means two characters, backslash and
"n", not a single newline character. Use non-raw string to embed a newline
character.
--
nosy: +serhiy.storchaka
Serhiy Storchaka added the comment:
This is a new feature. We do not backport new features to old versions unless
they fix some design bug. Nothing bad will happen if we DO NOT backport it.
--
___
Python tracker
<https://bugs.python.
Serhiy Storchaka added the comment:
You can change permissions after creating the directory.
The C function mkdtemp() creates the directory with permissions 0o700.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue41
Serhiy Storchaka added the comment:
PyList_SetSlice() allows to remove an item by index, as in `del a[i]`.
list.remove() searches the item by value and removes the first occurrence. You
can implement it via PySequence_Index() and PyList_SetSlice(), but it is more
convenient to just call the
Serhiy Storchaka added the comment:
For openssl and mkpasswd the password does not contain the newline character.
It contains a pair of characters "\" and "n". And the crypt module produces the
same output for it:
$ python3 -c 'import crypt; print(crypt.crypt(r&
Serhiy Storchaka added the comment:
You will get the same behavior for lists:
>>> a = [1, 2, 3]
>>> for x in a:
... if x == 1:
... a.remove(x)
... print(x)
...
1
3
Lists are iterated by index. First you get an item at index 0, then at index 1,
etc, to t
Change by Serhiy Storchaka :
--
assignee: -> docs@python
components: +Documentation
nosy: +docs@python, eli.bendersky, scoder
___
Python tracker
<https://bugs.python.org/issu
Change by Serhiy Storchaka :
--
nosy: +BTaskaya, gvanrossum, pablogsal
___
Python tracker
<https://bugs.python.org/issue41897>
___
___
Python-bugs-list mailin
Serhiy Storchaka added the comment:
It was intentionally left a generic "cannot pickle 'type' object". Because
there are many ways to make an object pickleable, and it is non-pickleable in
all other cases.
* "missing `__getstate__()` on variable-length object"
Change by Serhiy Storchaka :
--
resolution: -> rejected
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Serhiy Storchaka :
--
pull_requests: -21504
___
Python tracker
<https://bugs.python.org/issue17490>
___
___
Python-bugs-list mailing list
Unsubscribe:
Serhiy Storchaka added the comment:
New changeset 20ce62f00957d11f24f6449cd5c0ef5dd67174d4 by Campbell Barton in
branch 'master':
bpo-41802: Document 'PyDict_DelItem' can raise a 'KeyError' (GH-22291)
https://github.com/python/cpython/commit/20ce62f009
Change by Serhiy Storchaka :
--
assignee: -> docs@python
components: +Documentation
nosy: +docs@python
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
type: -> enhancement
___
Python tracker
<https
Serhiy Storchaka added the comment:
It is a duplicate of issue25341.
--
nosy: +serhiy.storchaka
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> File mode wb+ appears as rb+
___
Python tra
Serhiy Storchaka added the comment:
Interesting, when lookup any attribute you will get a RecursionError, but this
is one of only two places where the recursion check is disabled (the other one
is in interning strings).
You get a crash also when call isinstance(1, instance) or issubclass
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue41921>
___
___
Python-bugs-list mailing list
Unsub
Serhiy Storchaka added the comment:
Antoine give me a hint. The problem seems related to using PyDict_GetItem()
when look up an attribute in the instance dict. It silences all exceptions
(including RecursionError) and this results in silent "no such key in a dict".
But since
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +21539
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22536
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
Closed as an obvious trolling.
--
nosy: +serhiy.storchaka
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
New changeset 9ece9cd65cdeb0a1f6e60475bbd0219161c348ac by Serhiy Storchaka in
branch 'master':
bpo-41909: Enable previously disabled recursion checks. (GH-22536)
https://github.com/python/cpython/commit/9ece9cd65cdeb0a1f6e60475bbd021
Change by Serhiy Storchaka :
--
pull_requests: +21548
pull_request: https://github.com/python/cpython/pull/22550
___
Python tracker
<https://bugs.python.org/issue41
Change by Serhiy Storchaka :
--
pull_requests: +21549
pull_request: https://github.com/python/cpython/pull/22551
___
Python tracker
<https://bugs.python.org/issue41
New submission from Serhiy Storchaka :
Macros Py_ALLOW_RECURSION and Py_END_ALLOW_RECURSION together with field
recursion_critical of the PyInterpreterState structure were added in
5b222135f8d2492713994f2cb003980e87ce6a72 but were never documented. It seems
that the reason of adding them was
Serhiy Storchaka added the comment:
New changeset 09a7b3b618cd02694a0bc8abfa24c75f0e659407 by Serhiy Storchaka in
branch '3.8':
[3.8] bpo-41909: Enable previously disabled recursion checks. (GH-22536)
(GH-22551)
https://github.com/python/cpyt
Serhiy Storchaka added the comment:
New changeset 7aa22ba923509af1dbf115c090964f503c84ca8d by Serhiy Storchaka in
branch '3.9':
[3.9] bpo-41909: Enable previously disabled recursion checks. (GH-22536)
(GH-22550)
https://github.com/python/cpyt
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +21550
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22552
___
Python tracker
<https://bugs.python.org/issu
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
It is also not safe to pass data downloaded from untrusted source to eval().
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue41
Serhiy Storchaka added the comment:
New changeset dcc54215ac1eb4b6fab2a9ffe1abcdf3ac4bb77e by Serhiy Storchaka in
branch 'master':
bpo-41936. Remove macros Py_ALLOW_RECURSION/Py_END_ALLOW_RECURSION (GH-22552)
https://github.com/python/cpython/commit/dcc54215ac1eb4b6fab2a9ffe1abcd
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
___
Python tracker
<https://bugs.python.org/issue28343>
___
___
Python-bugs-list mailing list
Unsub
New submission from Serhiy Storchaka :
As was reported by Florian Bruhin, Python testsuite calls eval() on content
received via HTTP (in Lib/test/multibytecodec_support.py).
--
components: Tests
messages: 378036
nosy: The Compiler, serhiy.storchaka, vstinner
priority: normal
severity
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +21561
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22566
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
Even if make ast.Slice a (virtual) subclass of ast.slice it will not help much,
because we cannot do it for ast.Index and ast.ExtSlice. ast.ExtSlice is not
replaced with ast.Tuple, and any node type can now be used instead of
ast.Index. The code that does
Change by Serhiy Storchaka :
--
priority: normal -> release blocker
___
Python tracker
<https://bugs.python.org/issue26680>
___
___
Python-bugs-list mai
Serhiy Storchaka added the comment:
New changeset 2ef5caa58febc8968e670e39e3d37cf8eef3cab8 by Serhiy Storchaka in
branch 'master':
bpo-41944: No longer call eval() on content received via HTTP in the CJK codec
tests (GH-22566)
https://github.com/python/cpyt
New submission from Serhiy Storchaka :
The complex class has special methods which always raise a TypeError:
__int__
__float__
__floordiv__
__mod__
__divmod__
After removing them the corresponding operations (converting to int and float,
operators // and %, function divmod
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +21582
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22593
___
Python tracker
<https://bugs.python.org/issu
Change by Serhiy Storchaka :
--
nosy: +lemburg, mark.dickinson, rhettinger, stutzbach
___
Python tracker
<https://bugs.python.org/issue41974>
___
___
Python-bug
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
versions: -Python 3.5, Python 3.6, Python 3.7
___
Python tracker
<https://bugs.python.org/issue41
Serhiy Storchaka added the comment:
I think that it is more correct to use the locale encoding. If error messages
are translated for readability, we should not ruin this by outputting \xXX.
--
nosy: +serhiy.storchaka
___
Python tracker
<ht
Serhiy Storchaka added the comment:
What is the content of "data.bin"? How can we reproduce the issue?
--
nosy: +serhiy.storchaka
versions: +Python 3.10
___
Python tracker
<https://bugs.python.o
Serhiy Storchaka added the comment:
In os.strerror() and PyErr_SetFromErrnoWithFilenameObjects() we use
PyUnicode_DecodeLocale(s, "surrogateescape") for decoding the result of
strerror().
--
___
Python tracker
<https://bugs.python.o
Change by Serhiy Storchaka :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Serhiy Storchaka :
--
nosy: +benjamin.peterson, gvanrossum, pablogsal
___
Python tracker
<https://bugs.python.org/issue41979>
___
___
Python-bugs-list m
Serhiy Storchaka added the comment:
New changeset e2ec0b27c02a158d0007c11dcc1f2d7a95948712 by Serhiy Storchaka in
branch 'master':
bpo-41974: Remove complex.__float__, complex.__floordiv__, etc (GH-22593)
https://github.com/python/cpython/commit/e2ec0b27c02a158d0007c11dcc1f2d
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 f25323a307a72c40862c87c2df822f83be6645da by Serhiy Storchaka in
branch 'master':
bpo-41831: Add tests for tkinter.Event.__repr__ (GH-22354)
https://github.com/python/cpython/commit/f25323a307a72c40862c87c2df822f
New submission from Serhiy Storchaka :
Local converters for file descriptors which uses PyObject_AsFileDescriptor()
are defined and used in several files: Modules/fcntlmodule.c,
Modules/posixmodule.c, Modules/selectmodule.c, Modules/termios.c.
The proposed PR replaces them all with a global
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +21600
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22620
___
Python tracker
<https://bugs.python.org/issu
New submission from Serhiy Storchaka :
Py_FileSystemDefaultEncodeErrors was added to limited API in 3.7 and
Py_UTF8Mode -- in 3.7. But in 3.8 their declarations are not available if
Py_LIMITED_API is defined because they were moved to different header file
included only if Py_LIMITED_API is
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +21601
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22621
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
New changeset 43c3eafa1bcdc522870e112d3e2d67ce2451c34b by Miss Skeleton (bot)
in branch '3.9':
bpo-41831: Add tests for tkinter.Event.__repr__ (GH-22354) (GH-22617)
https://github.com/python/cpython/commit/43c3eafa1bcdc522870e112d3e2d67
Serhiy Storchaka added the comment:
New changeset eb38c6b7aa35d3003ec0958533421902d19ce408 by Serhiy Storchaka in
branch 'master':
bpo-41831: Restore str implementation of __str__ in tkinter.EventType (GH-22355)
https://github.com/python/cpyt
Serhiy Storchaka added the comment:
New changeset 9975cc5008c795e069ce11e2dbed2110cc12e74e by Serhiy Storchaka in
branch 'master':
bpo-41985: Add _PyLong_FileDescriptor_Converter and AC converter for "fildes".
(GH-22620)
https://github.com/p
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
___
Python tracker
<https://bugs.python.or
New submission from Serhiy Storchaka :
_PyObject_HasAttrId() can return -1, 0 or 1. It returns -1 when cannot create a
string (most likely due to MemoryError or UnicodeDecodeError), but returns 0
and silences all exceptions raised when look up the attribute (including
MemoryError
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +21606
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22629
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
This function was kept after previous clean because all its usages was in the
code which silences all exceptions in any case, so using _PyObject_HasAttrId
did not do additional harm. But now it is used also in the new code in
Objects/unionobject.c. It is
Serhiy Storchaka added the comment:
test_grammar and test_pydoc became failed on my machine until I removed all
.pyc files. We need to bump the magic number for .pyc files.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.
New submission from Serhiy Storchaka :
There are several issues in remove_module() in Python/import.c.
1. PyMapping_HasKey() is used to determine if the module was in sys.modules
before removing it. But it can return 0 not only when the key is absent in the
mapping, but also when some
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +21608
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22631
___
Python tracker
<https://bugs.python.org/issu
New submission from Serhiy Storchaka :
There is a reference leak in import_add_module(). PyDict_GetItemWithError()
returns a borrowed reference, but PyObject_GetItem() return a non-borrowed
reference. If sys.modules is not a dict, there is a reference leak.
import_add_module() and several
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +21609
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22632
___
Python tracker
<https://bugs.python.org/issu
Change by Serhiy Storchaka :
--
nosy: +vstinner
versions: +Python 3.10 -Python 3.5, Python 3.6, Python 3.7
___
Python tracker
<https://bugs.python.org/issue41
Change by Serhiy Storchaka :
--
nosy: +p-ganssle
___
Python tracker
<https://bugs.python.org/issue41995>
___
___
Python-bugs-list mailing list
Unsubscribe:
Serhiy Storchaka added the comment:
The code works as expected. I do not think there is a problem with the json
module. If some application accepts user input and use it without validation to
control the formatting of sensitive data, it is a vulnerability in this
application, not in tools
Serhiy Storchaka added the comment:
It solves the breaking of the C API. Py_FileSystemDefaultEncodeErrors and
Py_UTF8Mode were not deprecated, they were just suddenly excluded from the
limited API. And seems this change was not intentional, otherwise surrounding
#ifdef/#endif (which
Serhiy Storchaka added the comment:
New changeset 637a09b0d6e3ad4e34e0b5e0fc82f5afeae6f74b by Serhiy Storchaka in
branch 'master':
bpo-41986: Add Py_FileSystemDefaultEncodeErrors and Py_UTF8Mode back to limited
API (GH-22621)
https://github.com/python/cpyt
Serhiy Storchaka added the comment:
New changeset 98c4433a81a4cd88c7438adbee1f2aa486188ca3 by Serhiy Storchaka in
branch 'master':
bpo-41991: Remove _PyObject_HasAttrId (GH-22629)
https://github.com/python/cpython/commit/98c4433a81a4cd88c7438adbee1f2a
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Serhiy Storchaka :
_PySys_InitCore() and _PySys_InitMain() in Python/sysmodule.c contains many
invocations of macros for setting attributes of the sys module. The proposed PR
changes these macros.
1. SET_SYS_FROM_STRING was renamed to just SET_SYS. It is much shorter and
Change by Serhiy Storchaka :
--
nosy: +vstinner
___
Python tracker
<https://bugs.python.org/issue42002>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +21616
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22642
___
Python tracker
<https://bugs.python.org/issu
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: -Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
New changeset fa1d83db62a545580d9a1a585b2c1fb55961a5c3 by Serhiy Storchaka in
branch 'master':
bpo-42002: Clean up initialization of the sys module. (GH-22642)
https://github.com/python/cpython/commit/fa1d83db62a545580d9a1a585b2c1f
Serhiy Storchaka added the comment:
New changeset 8287aadb75f6bd0154996424819334cd3839707c by Serhiy Storchaka in
branch 'master':
bpo-41993: Fix possible issues in remove_module() (GH-22631)
https://github.com/python/cpython/commit/8287aadb75f6bd0154996424819334
3901 - 4000 of 25874 matches
Mail list logo