Serhiy Storchaka added the comment:
For other types we do not have such strict tests. We just test that pickling
roundtrips (it is already tested for zip() in other tests). There are few tests
that unpickling some exact byte strings produces the expected value, but these
tests are in
Change by Serhiy Storchaka :
--
pull_requests: +22918
pull_request: https://github.com/python/cpython/pull/24085
___
Python tracker
<https://bugs.python.org/issue42
Serhiy Storchaka added the comment:
On other hand, it was impossible to write correct tests for issue42681 while
tests were skipped on buildbots. I spent the whole day yesterday debugging and
backporting that changes (some tests failed only on one particular builtbot).
So it was right to
Serhiy Storchaka added the comment:
New changeset b6fc0c406e6b4b86f59b1390142f35da0e364927 by Serhiy Storchaka in
branch 'master':
bpo-42789: Enable using /dev/tty in test_curses. (GH-24085)
https://github.com/python/cpython/commit/b6fc0c406e6b4b86f59b1390142f35
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Serhiy Storchaka :
--
pull_requests: +22920
pull_request: https://github.com/python/cpython/pull/24089
___
Python tracker
<https://bugs.python.org/issue42
Serhiy Storchaka added the comment:
I do not know how is it related to typing.Iterable and I have not found any
mention of typing.Iterable on the provided link, but an iterable object can be
implemented with __getitem__ method.
--
nosy: +serhiy.storchaka
Serhiy Storchaka added the comment:
New changeset 59f9b4e4509be67494f3d45489fa55523175ff69 by Serhiy Storchaka in
branch 'master':
bpo-42681: Fix test_curses failures related to color pairs (GH-24089)
https://github.com/python/cpython/commit/59f9b4e4509be67494f3d45489fa55
Change by Serhiy Storchaka :
--
pull_requests: +22943
pull_request: https://github.com/python/cpython/pull/24113
___
Python tracker
<https://bugs.python.org/issue42
Serhiy Storchaka added the comment:
New changeset 9b3a53a8264d4c469a3f3d8c037e74c010be3e5c by Serhiy Storchaka in
branch '3.9':
[3.9] bpo-42681: Fix test_curses failures related to color pairs (GH-24089)
(GH-24113)
https://github.com/python/cpyt
Change by Serhiy Storchaka :
--
pull_requests: +22946
pull_request: https://github.com/python/cpython/pull/24116
___
Python tracker
<https://bugs.python.org/issue42
Serhiy Storchaka added the comment:
New changeset e2c847e0c518dd6c63a898b8265ba54b71548bd6 by Serhiy Storchaka in
branch '3.8':
[3.8] [3.9] bpo-42681: Fix test_curses failures related to color pairs
(GH-24089) (GH-24113) (GH-24116)
https://github.com/python/cpyt
Serhiy Storchaka added the comment:
This process is not new. The problem is that in this particular case warning
will do more harm than removing the module. If we cannot just remove it, we
should not introduce warning. It will be kept forever
Serhiy Storchaka added the comment:
Well, a simple documentation issue has grown into large and complex changes
that fix several bugs.
* Incorrect parameter name in color_pair().
* Incorrectly documented ranges for color and pair numbers.
* Based on incorrect documentation, incorrect checks
Change by Serhiy Storchaka :
--
pull_requests: +22950
pull_request: https://github.com/python/cpython/pull/22632
___
Python tracker
<https://bugs.python.org/issue42
Serhiy Storchaka added the comment:
Deprecation warning may help users of old lower-quality code at the cost of
harming users of old higher-quality code. It does not look right to me.
--
___
Python tracker
<https://bugs.python.org/issue36
Serhiy Storchaka added the comment:
I do not understand what this discussion in a long-closed article is about. If
you propose to add warning, I am against it. You are against removing the
module. Well, the module will not be removed, the warning is no longer needed.
The issue is closed.
I
Change by Serhiy Storchaka :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> curses for win32
___
Python tracker
<https://bugs.python
Serhiy Storchaka added the comment:
This is a duplicate of issue42725.
--
nosy: +serhiy.storchaka
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> PEP 563: Should the behavior change for yield/
Serhiy Storchaka added the comment:
The curses module is not supported on Windows.
--
nosy: +serhiy.storchaka
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> curses for win32
___
Python tra
Serhiy Storchaka added the comment:
Does not it change the current behavior? I do not see a difference with
issue42725.
>>> def f():
... x: (yield)
...
>>> f()
--
___
Python tracker
<https://bugs.
Serhiy Storchaka added the comment:
Then why not fix the compiler?
As I understand, it is not clear yet what behavior should be, and discussing it
is the matter of issue42725. Any changes before the decision be made are
preliminary.
It is very likely that the decision will be in favor of
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue42852>
___
___
Change by Serhiy Storchaka :
--
resolution: fixed -> not a bug
___
Python tracker
<https://bugs.python.org/issue42852>
___
___
Python-bugs-list mailing list
Un
Serhiy Storchaka added the comment:
Should not "await" and "async for" (in comprehesions) and ":=" be forbidden too?
--
nosy: +serhiy.storchaka
___
Python tracker
<h
Serhiy Storchaka added the comment:
Does not walrus affect the meaning of variable? And await affects the meaning
of generator expression.
--
___
Python tracker
<https://bugs.python.org/issue42
Serhiy Storchaka added the comment:
And there may be more than one return/break/continue statement in the try
block. It increases the base of the degree.
At least for "return" we perhaps can merge different cases. But it would
complicate the compiler and cannot help in o
Serhiy Storchaka added the comment:
Yes, some operations can raise instances of different OSError subclasses on
different platforms, because the corresponding C function sets different errno.
It is so, and we cannot do anything with this. It is just a part of the
difference between plaforms
Serhiy Storchaka added the comment:
With debug build of Python I get a crash in other place:
$ ./python -Xdev Movement.py
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
python: Objects/abstract.c:155: PyObject_GetItem: Assertion `(item != NULL
Serhiy Storchaka added the comment:
https://docs.python.org/3/faq/programming.html#why-are-default-values-shared-between-objects
--
nosy: +serhiy.storchaka
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Pytho
Change by Serhiy Storchaka :
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue42884>
___
___
Python-bugs-list mailing list
Unsubscribe:
Serhiy Storchaka added the comment:
I am not sure that it should be fixed.
We already cut corners in similar cases and did this for years, and it always
was okay. In the following example bool(a) is only called once:
if a and b:
f()
1 0 LOAD_NAME0 (a
Serhiy Storchaka added the comment:
Thank you Steve. Yes, this is what I meant. "if a and b" is so common that we
sacrifice literal translation for the sake of performance.
"if" with an empty block looks pretty uncommon to me. It is not worth to
optimize this case spec
Serhiy Storchaka added the comment:
Neither numba nor fastparquet are parts of the standard Python library. Please
use corresponding bug trackers.
--
nosy: +serhiy.storchaka
resolution: -> third party
stage: -> resolved
status: open -&g
Serhiy Storchaka added the comment:
I do not like using _functools._lru_cache_wrapper. It is a deep implementation
detail, private function of private module. Use functools.lru_cache. If it is
few nanoseconds slower, that cost is only added at connection creation time. It
is insignificant
Serhiy Storchaka added the comment:
For the latter, it was decided that it is legal a long time ago. It has a
benefit and we did not have any complains for all these years. The absent of
this optimization would encourage writing less readable code for performance.
For the former, what is
Serhiy Storchaka added the comment:
Thank you Petr!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
What version of Python did you use? This is a documentation for Python 3.9.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue42
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue42911>
___
___
Python-bugs-list mailing list
Unsub
Serhiy Storchaka added the comment:
>>> format(10**9, '_d')
'1_000_000_000'
--
nosy: +serhiy.storchaka
___
Python tracker
<ht
Serhiy Storchaka added the comment:
Use NULL.
--
___
Python tracker
<https://bugs.python.org/issue40956>
___
___
Python-bugs-list mailing list
Unsubscribe:
Serhiy Storchaka added the comment:
New changeset 61d8c54f43a7871d016f98b38f86858817d927d5 by Tobias Holl in branch
'master':
bpo-42924: Fix incorrect copy in bytearray_repeat (GH-24208)
https://github.com/python/cpython/commit/61d8c54f43a7871d016f98b38f86858817d927d5
-
Serhiy Storchaka added the comment:
Slot means so many different things in Python. Here it's about data descriptors
created when you set __slots__ in the class definition.
It is amazing that so large speed up can be achieved for such base operation.
--
nosy: +serhiy.stor
Serhiy Storchaka added the comment:
New changeset 14cfa325c298ceb9eaf6b585a3cdcabf6c6378a9 by Zackery Spytz in
branch 'master':
bpo-39273: Expose BUTTON5_* constants in the curses module if available
(GH-17996)
https://github.com/python/cpyt
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10 -Python 3.6, Python 3.7, Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.or
Change by Serhiy Storchaka :
--
nosy: +vstinner
___
Python tracker
<https://bugs.python.org/issue42931>
___
___
Python-bugs-list mailing list
Unsubscribe:
Serhiy Storchaka added the comment:
Eryk Sun, do you mind to create a PR?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue42
Serhiy Storchaka added the comment:
Getting rid of hardcoded limits is good. And at first look the proposed PR
looks good (some minor details can be discussed).
Although there is different approach to solve the same problem. The stack of
blocks is used to set handlers for exceptions. For
Serhiy Storchaka added the comment:
^ matches not just the beginning of the string. It matches the beginning of a
line, i.e. an anchor just after '\n'. If the input string contains '\n', the
result cannot be found less than by linear time. If you want to check if the
beg
Change by Serhiy Storchaka :
--
nosy: +Mark.Shannon, serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue42950>
___
___
Python-bugs-list mailin
Serhiy Storchaka added the comment:
There is no technical difference between stdlib modules and other modules.
Stdlib modules are only special in context of copyright and responsibility.
What if set __author__ = 'PSF' in every stdib module? Or other attributes which
would allo
Serhiy Storchaka added the comment:
Yes, there is an overhead of using the trashcan mechanism. This is why it is
only used in data collections, because it is expected that your data can
contain arbitrary long chains of links. There is many ways to create arbitrary
long chains with other
Serhiy Storchaka added the comment:
> s.start or 0
Why 0? start=None is not the same as start=0 in slice. For example:
>>> 'abcdefgh'[slice(None, 3, -1)]
'hgfe'
>>> 'abcdefgh'[slice(0, 3, -1)]
''
Slices and range objects are ver
Serhiy Storchaka added the comment:
Maybe stdout.flush() or stdout.buffer.flush() raise a RecursionError?
When run the interpreter with option -u the second error is gone.
--
___
Python tracker
<https://bugs.python.org/issue42
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue42951>
___
___
Python-bugs-list mailing list
Unsub
Serhiy Storchaka added the comment:
Will it be removed in master only or in all maintained version too?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue42
Serhiy Storchaka added the comment:
Okay. And I have doubts that someone would backport this change to 3.6.
I do not see harm in merging PR 24237, although there is no use of it too. In
any case thank you for finding this suspicious code Zackery
Serhiy Storchaka added the comment:
Funny. But the output is not random. You can generate the sequence of letters
by the following simple loop:
s = ''
for i in range(n):
s = f'a{s}b{s}'
The length of this sequence is 2*(2**n-1). Finally, your code will r
Serhiy Storchaka added the comment:
Why is this feature needed? Currently you can use a combination of samestat()
with lstat(). And more, you can follow symbolic links only for one of arguments.
samestat(stat(path1), stat(path1)) # same as samefile(path1, path1)
samestat(lstat(path1), stat
Serhiy Storchaka added the comment:
It looks to me, that this is an issue of proxies, not Python. Python
implementation obeys contemporary standards, and they are not formally
cancelled yet. If we add an option in parse_qsl() or change its default
behavior, it should be considered as a new
Serhiy Storchaka added the comment:
Concur with Guido. Seems that that guess will be wrong in most cases.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue42
Serhiy Storchaka added the comment:
> Could you list some cases where this will give the wrong advice?
Guido already listed them. Library functions, static and class methods, and
names like slf and _self (used either in local classes and wrapper functions to
avoid conflict with the s
Serhiy Storchaka added the comment:
Please provide complete script that reproduces the issue. The provided three
lines do not open any file and cannot generate such error.
It could help to add the debug prints:
print(f'mySrcFldr = {mySrcFldr!a}')
print(f'srcFldr = {srcFldr
Serhiy Storchaka added the comment:
I do not understand why #abc00 and #abcd give 0xabab on my computer
(Linux) and even weirder result on Ubuntu on CI. Reading the code I expected
the same behavior as on macOS.
--
___
Python tracker
Serhiy Storchaka added the comment:
New changeset 6713e869c4989c04318158b406c30a147ea52904 by Cheryl Sabella in
branch 'master':
bpo-33289: Return RGB triplet of ints instead of floats from
tkinter.colorchooser (GH-6578)
https://github.com/python/cpyt
Serhiy Storchaka added the comment:
See also issue1634034.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue42997>
___
___
Python-bug
Serhiy Storchaka added the comment:
Why not limit the serving to sys.path?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue42
Serhiy Storchaka added the comment:
re.compile() already uses caching. But it is less efficient for some reasons.
To Steven: the time is *reduced* by 28%, but the speed is *increased* by 39%.
--
nosy: +serhiy.storchaka
___
Python tracker
<ht
Serhiy Storchaka added the comment:
I concur with E. Paine that you should use pack(fill="x") if you want to
stretch a widget. And in any case Tkinter itself does not manage layout, it is
just a wrapper around Tk, so if you think that the default layout of a button
is wro
Serhiy Storchaka added the comment:
Even if there is something wrong with the returned values, Tkinter is just
mostly a thin wrap around Tk. It does not change the returned value, it just
converts it to appropriate Python type (a tuple of 4 integers (4, 4, 101, 101)
instead of a string &quo
New submission from Serhiy Storchaka :
Currently tests for curses mainly call different functions and methods in
random order. Not all argument combinations are covered by tests and results
are not checked. I also ran tests with 1750 different values of TERM supported
by ncurses, and some
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +23131
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24312
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
It has already been fixed in issue40219. Just wait next bugfix release.
--
nosy: +serhiy.storchaka
resolution: -> out of date
stage: -> resolved
status: open -> closed
superseder: -> ttk LabeledScale: label covered by hi
Change by Serhiy Storchaka :
--
pull_requests: +23137
pull_request: https://github.com/python/cpython/pull/24318
___
Python tracker
<https://bugs.python.org/issue33
Serhiy Storchaka added the comment:
New changeset 3d5434d5cbc945c58be663e3dbd5ef4875677b7a by Serhiy Storchaka in
branch '3.9':
[3.9] bpo-33289: Return RGB triplet of ints instead of floats from
tkinter.colorchooser (GH-6578). (GH-24318)
https://github.com/python/cpyt
Serhiy Storchaka added the comment:
New changeset cf19cc3b920ca5995e1c202d2c3dd7a59ac8eac8 by Serhiy Storchaka in
branch 'master':
bpo-27772: Make preceding width with 0 valid in string format. (GH-11270)
https://github.com/python/cpython/commit/cf19cc3b920ca5995e1c202d2c3dd7
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10 -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:
It was fixed in other way in issue42789. If __stdout__ is not a terminal, the
code falls back to __stderr__, and it is not terminal either, it tries to open
/dev/tty. If neither works, it uses a regular temporary file as terminal, but
savetty()/resetty
Serhiy Storchaka added the comment:
New changeset f066bd94b9225a5a3c4ade5fc3ff81e3c49b7b32 by Serhiy Storchaka in
branch 'master':
bpo-37319: Improve documentation, code and tests of randrange. (GH-19112)
https://github.com/python/cpython/commit/f066bd94b9225a5a3c4ade5fc3ff81
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
Only yesterday I thought about proposing this idea. I used to think using "i"
or "j" was a type of local feature, like using a comma or a period as a decimal
separator, or different writing for less-or-equal, but it looks like even in
Serhiy Storchaka added the comment:
Just making the parser (and the complex constructor) recognizing "i" as well as
"j" as complex number suffix. Others already proposed more complex changes like
adding options for formatting complex numbers, but I did not though abo
Change by Serhiy Storchaka :
--
versions: +Python 3.10 -Python 3.9
___
Python tracker
<https://bugs.python.org/issue43025>
___
___
Python-bugs-list mailin
Change by Serhiy Storchaka :
--
pull_requests: +23156
pull_request: https://github.com/python/cpython/pull/24337
___
Python tracker
<https://bugs.python.org/issue42
Serhiy Storchaka added the comment:
PR 24337 uses different approach. It keeps compatibility, but checks that the
argument is a file path of the source of one of modules (using the same
algorithm as /search).
--
___
Python tracker
<ht
Serhiy Storchaka added the comment:
New changeset 5327f370344a627f1578d8183d197feb286371c6 by Zackery Spytz in
branch 'master':
bpo-43033: Fix the handling of PyObject_SetAttrString() in _zoneinfo.c
(GH-24345)
https://github.com/python/cpython/commit/5327f370344a627f1578d8183d197f
Change by Serhiy Storchaka :
--
keywords: +patch
nosy: +serhiy.storchaka
nosy_count: 3.0 -> 4.0
pull_requests: +23170
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24350
___
Python tracker
<https://bugs.p
Serhiy Storchaka added the comment:
No, it is not enough, because we do not want to use ch as index if it is
negative.
--
___
Python tracker
<https://bugs.python.org/issue43
Serhiy Storchaka added the comment:
New changeset cb77c5e1ddd9328e4706f8fdf893aa6bf697942c by Miss Islington (bot)
in branch '3.9':
bpo-43033: Fix the handling of PyObject_SetAttrString() in _zoneinfo.c
(GH-24345) (GH-24349)
https://github.com/python/cpyt
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Serhiy Storchaka :
--
nosy: +mark.dickinson, rhettinger
___
Python tracker
<https://bugs.python.org/issue43040>
___
___
Python-bugs-list mailin
Serhiy Storchaka added the comment:
It is a bug in gitPython.
As for adding a new feature, making TemporaryDirectory.__str__() returning just
a name, I am not sure that it is needed, and it has drawbacks. If print() for
TemporaryDirectory object will output just a directory name, it can
Serhiy Storchaka added the comment:
It works as documented. reload() argument must be a module. If you have only
module name, sys.modules is a mapping of module names to modules. It is trivial
to combine two things in one line.
And why do you want to reload a module by name (without having
Change by Serhiy Storchaka :
--
nosy: +mark.dickinson, rhettinger, serhiy.storchaka, stutzbach
___
Python tracker
<https://bugs.python.org/issue43053>
___
___
Serhiy Storchaka added the comment:
It looks pretty niche. I do not remember a single case in which such method
would help.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue43
Serhiy Storchaka added the comment:
Before removing public documented attribute it should be deprecated.
Don't haste with this, I have a large patch for removing obsolete version
attributes in process.
--
nosy: +serhiy.storchaka
___
P
Change by Serhiy Storchaka :
--
nosy: +facundobatista, mark.dickinson, rhettinger, skrah
___
Python tracker
<https://bugs.python.org/issue43060>
___
___
Pytho
Change by Serhiy Storchaka :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
I agree. There is no catastrophic backtracking here (it was fixed in
issue39503), but the complexity of matching the regular expression is linear.
Searching the pattern in a sequence of commas has quadratic complexity, because
every step has linear
3201 - 3300 of 25874 matches
Mail list logo