Change by Serhiy Storchaka :
--
components: +Interpreter Core
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue41531>
___
___
Python-bug
Serhiy Storchaka added the comment:
It is because module functools is already imported (you can see it in
sys.modules), but module tokenize is not. It is likely due to module
rlcompleter imported at startup on Linux, but not on Windows.
--
nosy: +serhiy.storchaka
resolution: ->
Serhiy Storchaka added the comment:
Yes, this code was kept for backward compatibility when the dispatch mapping
was added.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue39
Serhiy Storchaka added the comment:
bpo-23741 did not change the behavior. The specified code was added specially
to preserve the existing behavior. For other base types the condition was like
`issubclass(typ, list) and r is list.__repr__`, but for dict it was just
`issubclass(typ, dict
Change by Serhiy Storchaka :
--
title: AbstactEventLoop.run_in_executor is listed as an async method, but
should actually return a Futrue -> AbstactEventLoop.run_in_executor is listed
as an async method, but should actually return a Fut
Serhiy Storchaka added the comment:
This is virtually a duplicate of isssue26579.
--
nosy: +serhiy.storchaka
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> Support pickling slots in subclasses of co
Serhiy Storchaka added the comment:
I think that I understood what is the issue.
1. Open the IDLE editor, type "foo" and press . The pop-up list
does not contain "foo".
2. Switch to the IDLE shell, type "foo = 1" and press .
3. Switch back to the IDLE editor
Serhiy Storchaka added the comment:
I do not even think that it is a bug in Jupyter. It is expected that different
output devices can support or not support specific control characters. It is
rather a feature request to add support of the backslash character (and maybe
other control
Change by Serhiy Storchaka :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
Because '{' in '{:3' is a drive letter. When you open file with path '{:3' you
open file with name '3' in the current directory of drive '{', not file with
name '{:3' on current drive and dir
New submission from Serhiy Storchaka :
What a problem do you try to solve? What is wrong with the current
documentation?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue41
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
resolution: -> not a bug
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
It is a tutorial. The purpose of this part is documenting the bare except
clause. It cannot be done without using a bare except in example.
There is nothing wrong with a bare except if it used properly (e.g. if the
caught exception is reraised). In any
Serhiy Storchaka added the comment:
The API of splice() looks complicated. How would you use it in Python?
Are off_in and off_out adjusted as in copy_file_range() and sendfile()? It is
not clear from the man page. If they are, how would you return updated values?
Are you going to add
Serhiy Storchaka added the comment:
>From https://docs.python.org/3/library/pickle.html#pickling-class-instances:
When a class instance is unpickled, its __init__() method is usually not
invoked.
If you want to change this behavior you have to implement the __reduce__ or
__reduce_e
Change by Serhiy Storchaka :
--
resolution: -> third party
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
It is rather an issue of MyPy and PyCharm. The Python interpreter itself does
not perform static type testing and does not provide annotations for builtins.
--
nosy: +serhiy.storchaka
___
Python tracker
<ht
Serhiy Storchaka added the comment:
There is Ellipsis class in the ast module. Although it is deprecated now. But I
there may be Ellipsis names also in third-party libraries. Making Ellipsis a
keyword would break them.
--
nosy: +serhiy.storchaka
Serhiy Storchaka added the comment:
I do not understand how you get this result. At that line of code arg can only
be string, because it is a result of os.fsdecode(). Are you sure that you use
Python version which includes issue31961 changes? What exactly Python version
do you use
New submission from Serhiy Storchaka :
There are few bugs in the code for binding parameters specified in the sqlite3
module:
1. If argument "parameters" is a list, PyList_GET_ITEM() is called in a loop,
but the size of the list is read only once before loop. Since the list can b
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +21104
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21998
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
I agree that the error message should contain the name of the absent parameter
instead of its index when parameters are supplied as a dict. It is more
informative and would consistent with other error message.
As for including the number of a record in
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +21105
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21999
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
It does not differ much from list(inf()). Sooner or later it will raise
MemoryError. You can interrupt the execution by pressing Ctrl-C. Although the
response may be slow if your computer started swapping.
There is nothing special about unpacking infinite
Serhiy Storchaka added the comment:
New changeset 582f13786bb75c73d609790967fea03a5b50148a by Irit Katriel in
branch 'master':
bpo-39994: Fix pprint handling of dict subclasses that override __repr__
(GH-21892)
https://github.com/python/cpyt
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +21124
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22025
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
In this particular case we do not need a buffer. It is enough to reopen the
socket and send the current message again.
--
___
Python tracker
<https://bugs.python.org/issue40
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +21151
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22061
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
See also issue27572.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue41707>
___
___
Python-bug
Serhiy Storchaka added the comment:
Thank you for your report yeting li. The pattern modification looks good to me.
Do you mind to create a pull request?
--
keywords: +easy
nosy: +serhiy.storchaka
stage: -> needs patch
versions: +Python 3.8, Python
Change by Serhiy Storchaka :
--
nosy: +eric.snow, serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue41715>
___
___
Python-bugs-list mailin
Serhiy Storchaka added the comment:
I would use
NAME_RE = re.compile(r'(?![_\d]+\Z)(?!\d)\w+', re.ASCII)
or
NAME_RE = re.compile(r'(?=.*[A-Za-z])(?!\d)\w+', re.ASCII)
and NAME_RE.fullmatch() instead of NAME_RE.match().
But why identifiers not containing letters a
Serhiy Storchaka added the comment:
The code with nested wraps is awesome. But it does not work well.
>>> list(itertools.chain(*(wr(x, 5) for x in wr("123 123 1234567 12", width=5,
>>> break_long_words=False
['123', '123', '12345'
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +21178
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22091
___
Python tracker
<https://bugs.python.org/issu
New submission from Serhiy Storchaka :
Vec2D.__rmul__() misses "return NotImplemented" and therefore implicitly
returns None for arguments which are not int or float.
>>> import turtle
>>> print(object() * turtle.Vec2D(1, 2))
None
--
components: Library
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +21179
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22092
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
New changeset 81715808716198471fbca0a3db42ac408468dbc5 by Serhiy Storchaka in
branch 'master':
bpo-41638: Improve ProgrammingError message for absent parameter. (GH-21999)
https://github.com/python/cpython/commit/81715808716198471fbca0a3db42ac
Serhiy Storchaka added the comment:
New changeset 306cfb3a37e1438f6ba9f0a9f3af3c00aae4ec64 by Serhiy Storchaka in
branch 'master':
bpo-40486: Specify what happens if directory content change diring iteration
(GH-22025)
https://github.com/python/cpyt
Serhiy Storchaka added the comment:
You could save/restore this data only when corresponded modules was imported,
like it was done in clear_caches() in refleak.py. For example:
# Same for Process objects
def get_multiprocessing_process__dangling(self):
multiprocessing_process
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
type: -> enhancement
versions: +Python 3.10, Python 3.8
___
Python tracker
<https://bugs.python
Serhiy Storchaka added the comment:
PARSE_DECLTYPES does not work for generated fields. sqlite3_column_decltype()
just returns NULL.
PARSE_COLNAMES works only when the column name contains the column type in
square brackets. For generated fields sqlite3_column_name() returns the
expression
Serhiy Storchaka added the comment:
>
> Yes, but they should be imported after running the test. Note that the
> default value in the example was changed from None to set().
--
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
New changeset fd4cafd4700dc03cb05fc2e5263c2666d785d6e3 by Serhiy Storchaka in
branch 'master':
bpo-41720: Add "return NotImplemented" in turtle.Vec2D.__rmul__(). (GH-22092)
https://github.com/python/cpython/commit/fd4cafd4700dc03cb05f
Serhiy Storchaka added the comment:
But iterating it raises different type of exception, wish obscure message.
>>> import ctypes
>>> mem_0d = memoryview(ctypes.c_uint8(42))
>>> list(mem_0d)
Traceback (most recent call last):
File "", line 1, in
NotImpl
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10 -Python 3.7
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
I think this change is not needed. The current code is shorter and works pretty
well.
--
nosy: +serhiy.storchaka
resolution: -> rejected
stage: patch review -> resolved
status: open -> closed
___
Pytho
Serhiy Storchaka added the comment:
So this will make logging depending on the multiprocess module? Even if you do
not use multiprocessing it will be imported in any case when you use logging.
--
nosy: +serhiy.storchaka
___
Python tracker
<ht
Serhiy Storchaka added the comment:
It is surprising the endianess of byte matters.
--
___
Python tracker
<https://bugs.python.org/issue39610>
___
___
Python-bug
Serhiy Storchaka added the comment:
The UTC timezone implementation in the stdlib works well:
>>> import datetime
>>> datetime.datetime(2020, 9, 9, 8, 0, tzinfo=datetime.timezone.utc)
datetime.datetime(2020, 9, 9, 8, 0, tzinfo=datetime.timezone.utc)
I guess yo
Serhiy Storchaka added the comment:
It would break the code which expect that __init__() be called (I do not know
if there are much such code, but still). It also would not work with the
original pure Python implementation of OrderedDict, which initializes the
OrderedDict object in __init__
Serhiy Storchaka added the comment:
So we are restricted by backward compatibility with the original pure Python
implementation.
Sometimes it is feasible to break backward compatibility, but there should be
very good reasons for it
Serhiy Storchaka added the comment:
First, closures cannot be pickled. You have to pass self.__class__ as an
argument.
Second, it will break compatibility with older Python versions. Pickles created
in new Python could not be unpickled in older Pythons.
Third, it is the behavior which does
Serhiy Storchaka added the comment:
I do not think there is a bug. If we ever decide to change the behavior, the
changes can only go in future Python version.
And if we decide to make changes, I think that it would be better to make the
pure Python implementation using __new__() instead of
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue41756>
___
___
Python-bugs-list mailing list
Unsub
Serhiy Storchaka added the comment:
parse() is an instance method. It should be called as tree.parse(f) (where tree
is an instance of ElementTree), not ElementTree.parse(f).
--
nosy: +serhiy.storchaka
resolution: -> not a bug
stage: -> resolved
status: open -&g
Serhiy Storchaka added the comment:
It was not clear what you do without code and full traceback.
The example uses *function* parse() from *module* ElementTree. Your code seems
uses *method* parse() of *class* ElementTree.
https://docs.python.org/3/library/xml.etree.elementtree.html
Change by Serhiy Storchaka :
--
keywords: +easy
stage: -> needs patch
versions: +Python 3.10 -Python 3.5
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
I concur with Pablo. It is too unreliable.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue41
Serhiy Storchaka added the comment:
What about PyUnicode_AsUTF8? Should it be made public too or left for internal
use only?
What about third-party implementations of Python? How hard to implement this
API on an implementation without reference counts? It is interesting to hear
the expert
Serhiy Storchaka added the comment:
There are other heap types implemented in C in the stdlib and third-party
libraries for which pickling with protocols 0 and 1 works incorrectly. It would
be better to fix copyreg._reduce_ex() instead of disabling pickling for these
types one by one
Serhiy Storchaka added the comment:
PyUnicode_AsUTF8() is used 3 times more than PyUnicode_AsUTF8AndSize().
$ find -type f -name '*.c' -exec egrep 'PyUnicode_AsUTF8AndSize\(' '{}' + | wc
-l
35
$ find -type f -name '*.c' -exec egrep
Serhiy Storchaka added the comment:
Thank you for the reminder Irit. Your comments for issues and PRs are really
helpful. Thank you for all this!
--
nosy: +serhiy.storchaka
resolution: -> out of date
stage: needs patch -> resolved
status: open -&g
Serhiy Storchaka added the comment:
I agree about PyUnicode_AsUTF8.
But I think it would be worth to ask PyPy team about PyUnicode_AsUTF8AndSize.
An alternate C API is PyUnicode_GetUTF8Buffer (issue39087). It requires
explicit releasing the buffer after use, so it can be used even on
Serhiy Storchaka added the comment:
As for returned value, I propose to return -1 in case of error, 1 for yielded
value and 0 for returned value (i.e. define PYGEN_RETURN = 0, PYGEN_YIELD = 1
and PYGEN_ERROR = -1, but without exposing public names).
It would be uniform with other C API
Serhiy Storchaka added the comment:
There are other abstract object APIs: PyNumber, PySequence, PyMapping, etc. In
particularly PyIter_Next() works with the iterator protocol, there is no single
iterator class. Seems PyGen_* API is related to concrete class, but we can
introduce new
Change by Serhiy Storchaka :
--
pull_requests: +21340
pull_request: https://github.com/python/cpython/pull/22288
___
Python tracker
<https://bugs.python.org/issue27
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
nosy_count: 2.0 -> 3.0
pull_requests: +21341
pull_request: https://github.com/python/cpython/pull/22288
___
Python tracker
<https://bugs.python.org/issu
Change by Serhiy Storchaka :
--
versions: +Python 3.10, Python 3.9 -Python 3.6
___
Python tracker
<https://bugs.python.org/issue27032>
___
___
Python-bugs-list m
Serhiy Storchaka added the comment:
It was already removed in issue37328. The only not applied part of the patch is
adding a What's New entry.
--
nosy: +inada.naoki
___
Python tracker
<https://bugs.python.org/is
Serhiy Storchaka added the comment:
New changeset dcfaa520c4638a67052a4ff4a2a820be68750ad7 by Serhiy Storchaka in
branch 'master':
bpo-41715: Fix potential catastrofic backtracking in c_analyzer. (GH-22091)
https://github.com/python/cpython/commit/dcfaa520c4638a67052a4ff4a2a820
Serhiy Storchaka added the comment:
New changeset 0b419b791077414bbc011a412698ebb362b63761 by Serhiy Storchaka in
branch 'master':
bpo-41662: Fix bugs in binding parameters in sqlite3 (GH-21998)
https://github.com/python/cpython/commit/0b419b791077414bbc011a412698eb
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 a33f2c2bae759fc9d06e1c032fd2026135f2df45 by Serhiy Storchaka in
branch 'master':
bpo-27032, bpo-37328: Document removing HTMLParser.unescape(). (GH-22288)
https://github.com/python/cpython/commit/a33f2c2bae759fc9d06e1c032fd202
Serhiy Storchaka added the comment:
New changeset a33f2c2bae759fc9d06e1c032fd2026135f2df45 by Serhiy Storchaka in
branch 'master':
bpo-27032, bpo-37328: Document removing HTMLParser.unescape(). (GH-22288)
https://github.com/python/cpython/commit/a33f2c2bae759fc9d06e1c032fd202
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
I have backported and merged deduplication changes manually.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue41
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
resolution: -> rejected
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
Xiang Zhang, was there a discussion on Python-Dev?
--
___
Python tracker
<https://bugs.python.org/issue29099>
___
___
Pytho
Serhiy Storchaka added the comment:
I would be fine even with a generator-specific API as a first step, for
simplicity. But the end goal is to support all generator-like objects. It is
much more useful for end users and does not have drawbacks.
Enum for result seems not necessary (other
Change by Serhiy Storchaka :
--
type: security -> enhancement
___
Python tracker
<https://bugs.python.org/issue38981>
___
___
Python-bugs-list mailing list
Un
Serhiy Storchaka added the comment:
Oh, would not be worth to add Py_buffer to the limited API?
--
nosy: +skrah
___
Python tracker
<https://bugs.python.org/issue41
Serhiy Storchaka added the comment:
We introduced _PyObject_LookupAttr() and _PyObject_GetMethod() for similar
purposes. And they have similar signatures. Although they all are private.
--
___
Python tracker
<https://bugs.python.org/issue41
Change by Serhiy Storchaka :
--
resolution: fixed -> out of date
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue1690840>
___
___
Serhiy Storchaka added the comment:
Can not `type(Ellipsis)` be used for typing too?
--
nosy: +gvanrossum, levkivskyi, serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue41
Serhiy Storchaka added the comment:
Would not be better to make MyPy supporting type(Ellipsis)? It would work also
on Python versions older than 3.10.
Also, could not Literal[Ellipsis] be used as annotation?
--
___
Python tracker
<ht
Change by Serhiy Storchaka :
--
stage: backport needed -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue30166>
___
___
Change by Serhiy Storchaka :
--
pull_requests: +21374
pull_request: https://github.com/python/cpython/pull/22330
___
Python tracker
<https://bugs.python.org/issue41
Serhiy Storchaka added the comment:
PR 22330 refactors gen_send_ex(), making it similar to the new PyGen_Send().
--
status: closed -> open
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
Why do you think it is invalid? What formal document specify this?
In contrary, there are examples of using 0-padded notation for IPv4 addresses
(000.rrr.rrr.rrr, 128.000.rrr.rrr, 192.000.001.rrr and 224.000.000.000) in RFC
790.
--
nosy
Change by Serhiy Storchaka :
--
nosy: +vstinner
___
Python tracker
<https://bugs.python.org/issue41819>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Serhiy Storchaka :
--
resolution: -> wont fix
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
New changeset 6c33385e3a1dce31d7b9037eebfc584075795dba by Serhiy Storchaka in
branch 'master':
bpo-41756: Refactor gen_send_ex(). (GH-22330)
https://github.com/python/cpython/commit/6c33385e3a1dce31d7b9037eebfc58
Serhiy Storchaka added the comment:
I agree that we should add PyIter_Send() (the name is discussable, but
PyIter_Send LGTM) which should support iterators and objects with the send()
method. It would be much more useful for user, and can replace PyGen_Send() in
the interpreter core code
Serhiy Storchaka added the comment:
It is a large change, so I take it.
--
assignee: -> serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issu
New submission from Serhiy Storchaka :
The tkinter.EventType enum was introduced in issue27294. It implements __str__
as returning the name for the sole purpose of using in Event.__repr__(). But
overriding __str__ in the str subclass may be not good idea, because different
code will get
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +21392
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/22354
___
Python tracker
<https://bugs.python.org/issu
Change by Serhiy Storchaka :
--
pull_requests: +21393
pull_request: https://github.com/python/cpython/pull/22355
___
Python tracker
<https://bugs.python.org/issue41
Serhiy Storchaka added the comment:
It can happen when some objects with __del__ are kept alive at the interpreter
shutdown stage and outlive the builtins module. I have not seen such errors for
a long time. Could you reproduce it on newer Python versions? Could you
reproduce it with
Change by Serhiy Storchaka :
--
pull_requests: +21396
pull_request: https://github.com/python/cpython/pull/22358
___
Python tracker
<https://bugs.python.org/issue40
Serhiy Storchaka added the comment:
Thank you Vidar! I wasn't sure about Windows, but was not able to reproduce
possible failures. Your report gives a clue.
--
___
Python tracker
<https://bugs.python.org/is
3801 - 3900 of 25874 matches
Mail list logo