Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +15859
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/16268
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
Convert it to string first:
print(f'path is: {path!s:>50}')
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.pytho
Serhiy Storchaka added the comment:
Initially, the default __format__ converted the object to str and passed format
specifier to str.__format__. This is defined in PEP 3101:
class object:
def __format__(self, format_spec):
return format(str(self), format_spec)
But later we
New submission from Serhiy Storchaka :
Currently most shutil tests are in a single class. Tests for the same function
are partially grouped together and partially intermixed with other tests. This
makes hard to find an appropriate place for adding new tests and increase risk
of hiding test
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +15866
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/16281
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
I prefer to keep it a macro. The compiler does not know that it is never
executed, so it can generate a suboptimal code.
While it is a macro, it can be made a no-op, or even with compiler-specific
instructions like __builtin_unreachable. This can help the
Serhiy Storchaka added the comment:
Or use !s or !r.
In some cases it may be even better to use both convertions:
f'{str(path)!r:>50}'.
This is all application specific, so I do not think we should rethink our old
decision. Explicit is better
Serhiy Storchaka added the comment:
I am -0 on this. It is a can of worms. Once we add a trivial __format__ in
Path, we will need to handle numerous requests for adding a trivial __format__
in many other classes. It is better to teach users to use !s (and this works
also on older Python
Serhiy Storchaka added the comment:
_Py_NO_RETURN is a promise that the code past the function is unreachable, not
that the function call is unreachable.
> I'm not sure how __builtin_unreachable could be used with Py_UNREACHABLE()
> macro.
In the release mode Py_UNREACHAB
Serhiy Storchaka added the comment:
You can use a lambda instead of partial:
squared = lambda x: pow(x, 2)
Proposed names look meaningful. But after adding support of keyword arguments
please compare performance of the old and the new functions. I expect that the
difference will be
Serhiy Storchaka added the comment:
Thank you. Could you please test simpler examples like pow(2, 3)? Please use
the --duplicate option.
--
___
Python tracker
<https://bugs.python.org/issue38
Serhiy Storchaka added the comment:
And pow(2.0, 3.0) please.
--
___
Python tracker
<https://bugs.python.org/issue38237>
___
___
Python-bugs-list mailin
Serhiy Storchaka added the comment:
Thank you for your contribution Ammar! Nice work!
--
___
Python tracker
<https://bugs.python.org/issue38237>
___
___
Pytho
Serhiy Storchaka added the comment:
Isn't it a new feature? Isn't it too later to add it to 3.8?
--
nosy: +lukasz.langa
status: closed -> open
___
Python tracker
<https://bugs.pytho
Serhiy Storchaka added the comment:
Thank you for the explanation Raymond and sorry for the disturb. My mistake, I
had not noticed the release manager's assent.
--
___
Python tracker
<https://bugs.python.org/is
Serhiy Storchaka added the comment:
> 1. It seems that the 'list' call should be irrelevant.
It is relevant. Counter({1: 2}) != Counter(list({1: 2})).
--
___
Python tracker
<https://bugs.pytho
New submission from Serhiy Storchaka :
Py_UNREACHABLE is used to indicate that a specific point in the program cannot
be reached, even if the compiler might otherwise think it can. This is exact
the case for __builtin_unreachable in GCC and Clang. I propose to extend
Py_UNREACHABLE() to
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +15905
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/16329
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
New changeset b4d0b39a9b4cd203bcc5b236dc96456e9658119a by Serhiy Storchaka in
branch 'master':
bpo-38209: Simplify dataclasses.InitVar by using __class_getitem__(). (GH-16255)
https://github.com/python/cpyt
Change by Serhiy Storchaka :
--
nosy: +nadeem.vawda
___
Python tracker
<https://bugs.python.org/issue38256>
___
___
Python-bugs-list mailing list
Unsubscribe:
Serhiy Storchaka added the comment:
aiohttp is not the part of the standard Python library. Please use an
appropriate bug tracker for reporting this issue.
--
nosy: +serhiy.storchaka
resolution: -> third party
stage: -> resolved
status: open -&g
Serhiy Storchaka added the comment:
This looks like a good idea. Do you mind to create a PR?
--
___
Python tracker
<https://bugs.python.org/issue38252>
___
___
Change by Serhiy Storchaka :
--
status: pending -> open
title: [Good first issue] Fix 3.3.3.1 Metaclasses Documentation -> Fix 3.3.3.1
Metaclasses Documentation
___
Python tracker
<https://bugs.python.org/i
Serhiy Storchaka added the comment:
It is not good first issue. The referred documentation is complex and needs
deep knowledge of Python for changing.
The original report was wrong. The original documentation is correct. Josh, do
you think the documentation needs other changes, and if yes
Serhiy Storchaka added the comment:
Protocol 0 was initially ASCII, but it was changed since adding support for the
unicode type (and bytearray uses the unicode representation for compatibility
with Python 3). It is Latin1 now. And still mostly human-readable (except that
some control
Serhiy Storchaka added the comment:
> What does __builtin_unreachable()? Does it nothing? Call abort()?
It is more than does nothing. It gives a hint to the compiler, so it can
optimize out checks that lead to this code. For example, in
switch (k) {
case 0: ...
cas
Serhiy Storchaka added the comment:
Length should be Py_ssize_t. Python does not support creating bytes objects
larger than PY_SSIZE_T_MAX.
--
___
Python tracker
<https://bugs.python.org/issue38
Serhiy Storchaka added the comment:
I think it is okay. Just check that all platforms which support pread() (Linux,
*BSD, macOS) pass the length as size_t instead of int. Windows does not always
support length larger than 2 KiB, but it does not support pread() either
Serhiy Storchaka added the comment:
New changeset ad7736faf5b82a24374c601a72599adf29951080 by Serhiy Storchaka
(Dong-hee Na) in branch 'master':
bpo-38265: Update os.pread to accept the length type as Py_ssize_t. (GH-16359)
https://github.com/python/cpyt
Change by Serhiy Storchaka :
--
pull_requests: +15957
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/16378
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
PR 16378 simplifies the implementation. It also caches the compiled RE.
Needed the documentation for the new feature.
--
___
Python tracker
<https://bugs.python.org/issue32
Serhiy Storchaka added the comment:
New changeset f163aeaa8c15b806b622c9cb10bc1d2a6e034e24 by Serhiy Storchaka in
branch 'master':
bpo-38219: Optimize dict creating and updating by a dict. (GH-16268)
https://github.com/python/cpython/commit/f163aeaa8c15b806b622c9cb10bc1d
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
Thank you Josh.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
I now have an access to Windows (I did not have it 5 years ago), so I'm going
to finish this issue if I have a time.
--
___
Python tracker
<https://bugs.python.org/is
Serhiy Storchaka added the comment:
The word "integral" has also other meaning.
This is a duplicate of issue26512.
--
nosy: +serhiy.storchaka
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> Vocabulary: Using "integra
Serhiy Storchaka added the comment:
Because this looks rather as a new feature than a bug fix. We don't add new
features in maintained versions.
Always there is a risk of introducing a regression. We don't know what bugs are
contained in 64-bit size support on different platform
Serhiy Storchaka added the comment:
Or call pread() multiple times and concatenate results.
--
___
Python tracker
<https://bugs.python.org/issue38265>
___
___
Serhiy Storchaka added the comment:
New changeset 543a3951a1c96bae0ea839eacec71d3b1a563a10 by Serhiy Storchaka in
branch 'master':
bpo-38005: Remove support of string argument in InterpreterID(). (GH-16227)
https://github.com/python/cpython/commit/543a3951a1c96bae0ea839eacec71d
Serhiy Storchaka added the comment:
Yes, this is a breaking change, it will break the code that reads gzipped
temporary files.
Note also that even if this change be accepted, you could not use this feature
until Python 3.9 be released. But you can write to temporary files in all
Python
Change by Serhiy Storchaka :
--
pull_requests: +15997
pull_request: https://github.com/python/cpython/pull/16417
___
Python tracker
<https://bugs.python.org/issue28
Serhiy Storchaka added the comment:
Right, it is intended change.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue38283>
___
___
Serhiy Storchaka added the comment:
New changeset 4f2eac04e4fee4d7d188ad2eeb0e610e3d7254bb by Serhiy Storchaka in
branch 'master':
bpo-38223: Reorganize test_shutil. (GH-16281)
https://github.com/python/cpython/commit/4f2eac04e4fee4d7d188ad2eeb0e61
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: -Python 2.7, Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
See issue12458 and issue34372.
Related issues: issue34876, issue16806, issue31241.
--
___
Python tracker
<https://bugs.python.org/issue38
Serhiy Storchaka added the comment:
Yes, of course. We could keep f_lineno unchanged, despite the fact that its
value can be wrong, and introduce f_lineno_new. Then we should change all code
in the stdlib which uses f_lineno to use f_new_lineno, or rather, to keep
absolute backward
Serhiy Storchaka added the comment:
No, I do not know such workaround. At best, you can analyze the code object and
get the line number of the next instruction. It may be the line past the last
line of the function call, or be equal to it if the function call is the part
of complex
Serhiy Storchaka added the comment:
Was LOAD_METHOD optimized for builtin methods?
--
___
Python tracker
<https://bugs.python.org/issue38278>
___
___
Python-bug
Serhiy Storchaka added the comment:
But the property object is not atomic. It's attribute __doc__ is writeable.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/is
Serhiy Storchaka added the comment:
New changeset 5d6f5b629394066a5249af25cc01f1a1f0edc138 by Serhiy Storchaka in
branch 'master':
bpo-32820: Simplify __format__ implementation for ipaddress. (GH-16378)
https://github.com/python/cpython/commit/5d6f5b629394066a5249af25cc01f1
Serhiy Storchaka added the comment:
Yes, it is deliberate. "/" and ":" do not have special meaning in regular
expressions and do not need escaping. re.escape() now produces more
human-readable result and works faster.
--
nos
Serhiy Storchaka added the comment:
It is already documented. There are even examples which contain "/" and ":".
--
___
Python tracker
<https://bug
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue38302>
___
___
Python-bugs-list mailing list
Unsub
Change by Serhiy Storchaka :
--
pull_requests: +16134
pull_request: https://github.com/python/cpython/pull/16545
___
Python tracker
<https://bugs.python.org/issue22
Serhiy Storchaka added the comment:
PR 16545 solves the problem by using OS specific methods for converting between
Python and Tcl strings. It is not ideal, but is good enough for most real cases.
Now you can paste, copy and print non-BMP characters. The code containing them
can be displayed
Change by Serhiy Storchaka :
--
versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.6
___
Python tracker
<https://bugs.python.org/issue22214>
___
___
Pytho
Serhiy Storchaka added the comment:
Oops, it is better to attach it to issue13153.
--
___
Python tracker
<https://bugs.python.org/issue22214>
___
___
Python-bug
Change by Serhiy Storchaka :
--
pull_requests: +16135
pull_request: https://github.com/python/cpython/pull/16545
___
Python tracker
<https://bugs.python.org/issue13
Serhiy Storchaka added the comment:
PR 16545 solves the problem by using OS specific methods for converting between
Python and Tcl strings. It is not ideal, but is good enough for most real cases.
Now you can paste, copy and print non-BMP characters. The code containing them
can be displayed
Change by Serhiy Storchaka :
--
Removed message: https://bugs.python.org/msg353760
___
Python tracker
<https://bugs.python.org/issue22214>
___
___
Python-bug
Change by Serhiy Storchaka :
--
Removed message: https://bugs.python.org/msg353759
___
Python tracker
<https://bugs.python.org/issue22214>
___
___
Python-bug
Serhiy Storchaka added the comment:
Sorry, I did not test the last version on Windows. There was a bug which caused
using the Linux version on Windows. Now it should be fixed.
--
___
Python tracker
<https://bugs.python.org/issue13
Serhiy Storchaka added the comment:
The purpose of using -Og is that it significantly speeds up tests. You can
always pass CFLAGS="-O0" if you debug particular debugger issues, but in normal
cases -Og looks more beneficial. It saves hours of time of common
Serhiy Storchaka added the comment:
Why do you need this feature?
--
___
Python tracker
<https://bugs.python.org/issue38348>
___
___
Python-bugs-list mailin
Serhiy Storchaka added the comment:
>From the point of view of Tk, the astral character "💻" looks like either two
>invisible characters "\ud83d\udcbb" or as four characters "ð\x9f\x92»" (two of
>them are invisible). Thus this breaks editing the physic
Serhiy Storchaka added the comment:
This is a tracker for bugs in Python itself. Tensorflow is a third-party
library. Please use an appropriate bug tracker for reporting issues with
tensorflow.
--
nosy: +serhiy.storchaka
resolution: -> third party
stage: -> resolved
status
Serhiy Storchaka added the comment:
Thank you for your example Terry. There was one dubious place which I did not
change because I did not know how to trigger the execution of it. Now the
clipboard is fixed.
--
___
Python tracker
<ht
Serhiy Storchaka added the comment:
What is the result of new tests?
python.bat -m test -v -uall test_tk -m test_clipboard*
--
___
Python tracker
<https://bugs.python.org/issue13
Serhiy Storchaka added the comment:
New changeset 06cb94bc8419b9a24df6b0d724fcd8e40c6971d6 by Serhiy Storchaka in
branch 'master':
bpo-13153: Use OS native encoding for converting between Python and Tcl.
(GH-16545)
https://github.com/python/cpyt
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
Fixed by PR 16545 (see issue13153).
--
nosy: +serhiy.storchaka
resolution: -> fixed
stage: needs patch -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
Mostly fixed by PR 16545 (see issue13153). The original example is now passed.
>>> raise Exception('\U0001f603')
Traceback (most recent call last):
File "", line 1, in
raise Exception('\U0001f603')
Exception: 😃
Serhiy Storchaka added the comment:
It was fixed for all valid Unicode characters, you can still get an error when
print a surrogate character to the stderr on Linux:
>>> import sys
>>> print('\ud800', file=sys.stderr)
Traceback (most recent call last):
Fi
Serhiy Storchaka added the comment:
Fixed by PR 16545 (see issue13153).
--
resolution: -> fixed
stage: needs patch -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
This looks like a duplicate of issue21084. Fixed by PR 16545 (see issue13153).
It is virtually Eryk's workaround, but at the Tkinter level.
--
resolution: -> fixed
stage: needs patch -> resolved
status: ope
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +16174
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/16583
___
Python tracker
<https://bugs.python.org/issu
New submission from Serhiy Storchaka :
The tkapp.split() method has weird behavior. It splits a string recursively, so
the type of items and the depth of nesting depends on spaces in string values.
For example:
>>> import tkinter
>>> root = tkinter.Tcl()
>>&
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +16175
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/16584
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
Great! I withdrew the original proposition in issue33325 because the part of
the optimization was not so good as I expected. But this part is good.
$ ./python -m timeit "[$(seq -s, 10)]"
500 loops, best of 5: 75.5 nsec per loop
$ ./python
Serhiy Storchaka added the comment:
Sorry, I do not understand you. typed_ast does not have such features as
multiline dump() and CLI. What relation is this have with the --type-comments
flag?
As for fitting tree into the terminal width, the current indentation is 3
spaces. Changing it to
Serhiy Storchaka added the comment:
Okay, but first I want to solve an issue with list overallocation.
--
___
Python tracker
<https://bugs.python.org/issue38
New submission from Serhiy Storchaka :
Currently list uses the following formula for allocating an array for items (if
size != 0):
allocated = size + (size >> 3) + (3 if size < 9 else 6)
If add items by 1 the growth pattern is: 0, 4, 8, 16, 25, 35, 46, 58, 72, 88,
...
I t
Serhiy Storchaka added the comment:
Here is some data. step is the number of items added at a time, the first row
is the size, the second row is the currently allocated size, the third row is
the proposed allocated size.
for step in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10):
sizes0 = range(step
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +16181
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/16592
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
What is the benefit of your version?
--
___
Python tracker
<https://bugs.python.org/issue38335>
___
___
Python-bugs-list m
New submission from Serhiy Storchaka :
os.sendfile() has a keyword-or-positional parameter named "in". Since it is a
keyword in Python, it is not possible to pass it as a keyword argument. You can
only pass it as a positional argument or using a var-keyword argument (unlikely
an
Serhiy Storchaka added the comment:
I thought about this. But STORE_FAST x is followed by LOAD_FAST x just by
accident. If you change the expression (1+x**2 or f(x**2)) they no longer be
neighbors. I am not sure this pattern is common enough. There are more common
pairs.
Also, note that
Serhiy Storchaka added the comment:
New changeset c38e725d17537b20ff090b1b5ec7db1820ff9b63 by Serhiy Storchaka
(Dong-hee Na) in branch 'master':
bpo-38210: Fix intersection operation with dict view and iterator. (GH-16602)
https://github.com/python/cpyt
Serhiy Storchaka added the comment:
Thank you Dong-hee for your fix!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
New changeset 24ddd9c2d6ab61cbce7e68d6de36d4df9bd2c3fb by Serhiy Storchaka (Hai
Shi) in branch 'master':
bpo-38383: Fix possible integer overflow in startswith() of bytes and
bytearray. (GH-16603)
https://github.com/python/cpyt
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 do not understand how you got an assertion failure. Did you interrupt tests
with Ctrl-C?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue38
Serhiy Storchaka added the comment:
It was added. Do you mean any special?
--
___
Python tracker
<https://bugs.python.org/issue38210>
___
___
Python-bugs-list m
Serhiy Storchaka added the comment:
New changeset ef092fe9905f61ca27889092ca1248a11aa74498 by Serhiy Storchaka in
branch 'master':
bpo-25988: Do not expose abstract collection classes in the collections module.
(GH-10596)
https://github.com/python/cpyt
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: +16202
pull_request: https://github.com/python/cpython/pull/16613
___
Python tracker
<https://bugs.python.org/issue28
Serhiy Storchaka added the comment:
There is a simpler way to fix this issue. Instead of hacking __new__, the
inheritance registry can be set up in ABCMeta.__init__. There are no reasons of
making this in __new__.
--
versions: +Python 3.7, Python 3.8, Python 3.9 -Python 3.4, Python
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.9 -Python 3.7
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
It could be possible to do this in backward compatible way. PyObject_GC_Track()
could add the object to the list of new objects (all objects are already linked
in bi-linked list, so it would need to just move the object to the specified
list), and
701 - 800 of 25874 matches
Mail list logo