Change by Serhiy Storchaka :
--
resolution: rejected ->
stage: resolved -> patch review
status: closed -> open
versions: +Python 3.10 -Python 3.9
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
See issue4.
As a side effect this change provides 10% speed up (which can be lager after
the end of the deprecation period).
--
___
Python tracker
<https://bugs.python.org/issue37
Serhiy Storchaka added the comment:
I get a crash for chr(128516) ("😄") in Tk.
$ wish
% label .l -text 😄
.l
% X Error of failed request: BadLength (poly request too large or internal
Xlib length error)
Major opcode of failed request: 139 (RENDER)
Minor opcode of failed re
Change by Serhiy Storchaka :
--
resolution: duplicate -> fixed
___
Python tracker
<https://bugs.python.org/issue29566>
___
___
Python-bugs-list mailing list
Un
Serhiy Storchaka added the comment:
I generated a script for testing all characters:
with open('withtest.sh', 'w', errors='surrogatepass') as f:
for i in range(0x100, 0x11): print(f"echo 'label .l -text \"{chr(i)}\";
exit' | wish
Serhiy Storchaka added the comment:
Yes, on Linux. Ubuntu 2020.04. Tk 8.6.10. X.Org X Server 1.20.8.
I tried to report the bug upstream, but failed. I did not use the Tk bugtracker
several years, and it was on different computer, so I have no password to my
account, and when I tried to
Serhiy Storchaka added the comment:
Victor, do you see a color smiling face in my example or monochromatic or just
a bar?
--
___
Python tracker
<https://bugs.python.org/issue42
Serhiy Storchaka added the comment:
There is also a problem with typing module.
>>> typing.List[int] | dict[float, str]
typing.Union[typing.List[int], dict]
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
It looks different on my computer. I suppose it will crash to you too if you
install a color emoji font.
--
Added file: https://bugs.python.org/file49557/Ubuntu-2020.04.png
___
Python tracker
<ht
Serhiy Storchaka added the comment:
Are all these occurrences in the module initialization code?
I think there is nothing wrong with this. Yes, the code can be a little clearer
if use PyObject_GetArrt or PyModule_Add*, but rewriting can introduce new bugs.
The remark in the documentation is
Serhiy Storchaka added the comment:
New changeset 64366fa9b3ba71b8a503a8719eff433f4ea49eb9 by Julien Danjou in
branch 'master':
bpo-41435: Add sys._current_exceptions() function (GH-21689)
https://github.com/python/cpython/commit/64366fa9b3ba71b8a503a8719eff43
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 34637a0ce21e7261b952fbd9d006474cc29b681f by Serhiy Storchaka in
branch 'master':
bpo-42103: Improve validation of Plist files. (GH-22882)
https://github.com/python/cpython/commit/34637a0ce21e7261b952fbd9d00647
Change by Serhiy Storchaka :
--
pull_requests: +22033
pull_request: https://github.com/python/cpython/pull/23116
___
Python tracker
<https://bugs.python.org/issue42
Change by Serhiy Storchaka :
--
pull_requests: +22034
pull_request: https://github.com/python/cpython/pull/23117
___
Python tracker
<https://bugs.python.org/issue42
Change by Serhiy Storchaka :
--
pull_requests: +22035
pull_request: https://github.com/python/cpython/pull/23118
___
Python tracker
<https://bugs.python.org/issue42
New submission from Serhiy Storchaka :
Due to a typo plistlib uses at most 32 bits for references and offsets. It will
fail if try to create a file larger than 4GiB or containing more than 2**32
unique objects (the latter of course implies the former).
--
components: Library (Lib
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +22037
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23121
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
Perhaps we should also use gethrtime() and gethrvtime() on HP-UX, but this is a
different issue.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue35
Serhiy Storchaka added the comment:
New changeset 547d2bcc55e348043b2f338027c1acd9549ada76 by Serhiy Storchaka in
branch '3.8':
[3.8] bpo-42103: Improve validation of Plist files. (GH-22882) (GH-23116)
https://github.com/python/cpython/commit/547d2bcc55e348043b2f338027c1ac
Change by Serhiy Storchaka :
--
nosy: +lukasz.langa
priority: normal -> release blocker
___
Python tracker
<https://bugs.python.org/issue42103>
___
___
Python-
Serhiy Storchaka added the comment:
It works on Ubuntu if uninstall the color Emoji font (package
fonts-noto-color-emoji).
--
___
Python tracker
<https://bugs.python.org/issue42
Serhiy Storchaka added the comment:
New changeset 212d32f45c91849c17a82750df1ac498d63976be by Serhiy Storchaka in
branch 'master':
bpo-42249: Fix writing binary Plist files larger than 4 GiB. (GH-23121)
https://github.com/python/cpython/commit/212d32f45c91849c17a82750df1ac4
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
Python 3.7 (2.7 looks almost the same):
class Demo(builtins.object)
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
| list of weak references to the object (if defined
Serhiy Storchaka added the comment:
There is no longer need to use OrderedDict as __dict__, but ctypes types have
tp_dict which are instances of dict subclass (StgDict). Disabling setting it to
anything that is not an exact dict would break ctypes
Serhiy Storchaka added the comment:
Actually there is no bug in not showing docstring for "data" and "non_data".
"Doc of a data-descriptor." is the docstring of the type of the descriptor, not
the descriptor itself. If it would be "Type of a data-descrip
Serhiy Storchaka added the comment:
Ah, all correct. In doc.py unlike to the inlined code Descriptor is a subclass
of property. And since fset is None the instance is classified as a readonly
property.
--
resolution: -> out of date
stage: -> resolved
status: open -&g
Change by Serhiy Storchaka :
--
components: +Library (Lib)
nosy: +gvanrossum, levkivskyi
type: -> enhancement
versions: -Python 3.6, Python 3.7
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
Most of them are in tests. There is no security issue there, also the code may
be clearer and more reliable if use helper function test.support.temp_dir().
And most of the rest are in Windows specific code. Some Windows code may not
work if you hold open
New submission from Serhiy Storchaka :
Currently the signature of types.CodeType.replace() is
replace(self, /, *, co_argcount=-1, co_posonlyargcount=-1,
co_kwonlyargcount=-1, co_nlocals=-1, co_stacksize=-1, co_flags=-1,
co_firstlineno=-1, co_code=None, co_consts=None, co_names=None
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +22099
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23199
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
Please open a new issue for "surrogates not allowed".
--
___
Python tracker
<https://bugs.python.org/issue42225>
___
__
Serhiy Storchaka added the comment:
I am sad that such code (as well as my former code in total_ordering) no longer
works, but this is just a clever trick, and the code can be written in less
clever but more explicit way.
On other hand, the warning helps to catch common mistakes like
Serhiy Storchaka added the comment:
Py_SETREF() is simple wrappers around Py_DECREF() and assignment. If there are
macros in Rust it is better to implement Py_SETREF() as Rust macro.
Py_SETREF() was not added to the limited API for reason. If arguments against
Py_SETREF() are still valid
Serhiy Storchaka added the comment:
I concur with Mark.
If you want to work only with non-borrowed references, use PySequence_GetItem()
and PySequence_SetItem(). It has a cost: it is slower and needs checking
errors. If you need more performant solution and binary compatibility across
Serhiy Storchaka added the comment:
What other Turtle graphics implementations use commands clockwise and
anticlockwise? Is it popular enough?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue42
Serhiy Storchaka added the comment:
What is the problem exactly?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue42304>
___
___
Pytho
Serhiy Storchaka added the comment:
str.find() does not work like you think. Please read the documentation.
In your case you likely need to use the "in" operator.
--
nosy: +serhiy.storchaka
resolution: wont fix -> not a bug
stage: -> resolved
status
Serhiy Storchaka added the comment:
Actually there are many aliases in the turtle module following the early Logo
traditions. For example rt=right. If clockwise is a new standard for this
command in modern Turtle implementation, we can add yet one alias. Otherwise I
agree with Raymond
Serhiy Storchaka added the comment:
I do not think that this is suitable for newcomers because you need to have
deep understanding why it was written in such form at first place and what will
be changed if you change it.
The code was written when unsigned long long was not standard and 64
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
PyModule_AddObject() has unique weird design, it is easy to misuse, and most
code misuse it, but fixing it would break the code which uses it correctly.
I did not see any problems with PyTuple_GetItem
Serhiy Storchaka added the comment:
AFAIK Spectre attacks rely on precise time measures. But Python is very far
from bare hardware. Pure Python code is 10-100 times slower than compiled C or
jitted JavaScript, and the variance is high, so it is hard to get stable
results in benchmarks
New submission from Serhiy Storchaka :
There is a design flaw in PyModule_AddObject(). It steals reference of its
value only if the result is success. To avoid leaks it should be used in the
following form:
PyObject *tmp = ;
if (PyModule_AddObject(name, name, tmp) <
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +22137
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23240
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
PyModule_Add() allows to make such macro much simpler:
#define MOD_ADD(name, expr) \
do { \
if (PyModule_Add(mod, name, expr) < 0) { \
return -1; \
} \
} while (0)
PyModule_AddObjectRef() is just Py_XINCREF() followed
Serhiy Storchaka added the comment:
Just to be sure, what is the result of pasting and executing the following code
on Tk 8.6.8 and 8.6.10?
print(ascii("😀"))
--
nosy: +serhiy.storchaka
versions: +Python 3.10, Python 3.8, Python 3.9
Serhiy Storchaka added the comment:
Well, it is likely the same syntax error. Then what will print
print(ascii(input()))
when you paste 😀 and press Enter?
--
___
Python tracker
<https://bugs.python.org/issue42
Change by Serhiy Storchaka :
--
nosy: +gvanrossum, levkivskyi
___
Python tracker
<https://bugs.python.org/issue42345>
___
___
Python-bugs-list mailing list
Unsub
Serhiy Storchaka added the comment:
Well, try copy 😀 (or other text with color emoji) to clipboard and run the
following code:
import tkinter
root = tkinter.Tk()
print(ascii(root.clipboard_get()))
--
___
Python tracker
<https://bugs.python.
Serhiy Storchaka added the comment:
You can ignore msg380917. It was written before I read msg380908. Now I have
the needed information. Thank you.
--
___
Python tracker
<https://bugs.python.org/issue42
Serhiy Storchaka added the comment:
And yet one question. What do you see if you print '\udcf0\udc9f\udc98\udc80'
in IDLE?
--
___
Python tracker
<https://bugs.python.o
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +22175
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/23281
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
I seen a code which uses re.search() with anchor ^ instead of re.match(), but I
never seen a code which uses re.match() instead of re.search(). It just won't
work unless you add explicit ".*" or ".*?" at the start of the pa
Serhiy Storchaka added the comment:
I concur with Terry.
Actually, registering the browser is not necessary for using it. Set the
environment variable BROWSER and use your favorite browser. The following
example uses curl (which is not registered as in the webbrowser module) as a
browser
Serhiy Storchaka added the comment:
Sorry, I did not understand how did you get an empty state? Could you please
provide complete reproducible example?
--
___
Python tracker
<https://bugs.python.org/issue42
Serhiy Storchaka added the comment:
Thank you for your examples Pat. Now it looks clearer to me.
Semantically this data in Tk is a sequence of pairs: states (which can be a
single word or several words or empty) and default value.
>>> from tkinter import ttk
>>>
Change by Serhiy Storchaka :
--
pull_requests: +22191
pull_request: https://github.com/python/cpython/pull/23300
___
Python tracker
<https://bugs.python.org/issue42
Serhiy Storchaka added the comment:
New changeset a26215db11cfcf7b5f55cab9e91396761a0e0bcf by Serhiy Storchaka in
branch 'master':
bpo-42318: Fix support of non-BMP characters in Tkinter on macOS (GH-23281)
https://github.com/python/cpython/commit/a26215db11cfcf7b5f55cab9e91396
Serhiy Storchaka added the comment:
It is still reproducible on Linux. I do not get a crash, just test failure and
some strange output.
==
FAIL: test_input_tty_non_ascii (test.test_builtin.PtyTests
Serhiy Storchaka added the comment:
Sorry, but making builtins.callable generic looks wrong to me. It is a
predicate, not a constructor. If it would be called "iscallable" instead of
"callable" nobody would propose to make it generic, right? It's just a
coincide
Serhiy Storchaka added the comment:
Alternatively we can add an optional argument for the mode of intermediate
directories.
makedirs(name, mode=0o777, exist_ok=False, intermediate_mode=0o777)
--
___
Python tracker
<https://bugs.python.
Serhiy Storchaka added the comment:
>From implementation perspective it is not easy at all. You will need to create
>a special class with methods __call__ and __getitem__ (and several other
>methods and attributes, like __repr__, __reduce__, __name__, __doc__,
&g
Serhiy Storchaka added the comment:
We specially introduced __mro_entries__ to make types in the typing module not
classes. Turning builtins.callable into a class is a step back.
--
___
Python tracker
<https://bugs.python.org/issue42
Serhiy Storchaka added the comment:
Special cases aren't special enough to break the rules.
I think this issue should be closed. This is not common user error, especially
in Python 3. I can even imagine that you can subclass module, if it is an
instance of special ModuleType subclass.
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue42369>
___
___
Python-bugs-list mailing list
Unsub
Serhiy Storchaka added the comment:
New changeset a1f401a58b213e400fbd8f0fa8dc5260a2389dab by Erlend Egeberg
Aasland in branch 'master':
bpo-42264: Deprecate sqlite3.OptimizedUnicode (GH-23163)
https://github.com/python/cpython/commit/a1f401a58b213e400fbd8f0fa8dc52
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
If you want to measure import time, use
python -m timeit -s "from sys import modules; modules_copy = modules.copy()"
"import black; modules.clear(); modules.update(modules_copy)"
But I would be surprised to see significant difference
Serhiy Storchaka added the comment:
Could that bot be configured to run tests with -u-gui? Tests on Linux I can run
manually.
--
___
Python tracker
<https://bugs.python.org/issue42
New submission from Serhiy Storchaka :
1. There are leaks if Py_tp_bases is used more than once and if some some calls
before setting tp_bases are failed.
2. There is a crash if the bases argument or Py_tp_bases is not a tuple.
3. The documentation is not accurate.
--
components: C
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +22303
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23410
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
There are also other distinct exceptions:
multiprocessing.TimeoutError
concurrent.futures.TimeoutError
asyncio.TimeoutError
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.
Serhiy Storchaka added the comment:
New changeset 1db76394ea79030aa4ed5349c950f6c6da51450f by Serhiy Storchaka in
branch 'master':
bpo-42412: Fix possible leaks and check arguments in PyType_FromModuleAndSpec()
(GH-23410)
https://github.com/python/cpyt
New submission from Serhiy Storchaka :
It is common that class have a single base class. PyType_FromModuleAndSpec() is
only called with NULL as bases (that means inheriting object) in the stdlib,
and PyType_FromSpecWithBases() is called with a 1-tuple as bases all three
times (not counting
Change by Serhiy Storchaka :
--
nosy: +petr.viktorin
___
Python tracker
<https://bugs.python.org/issue42423>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +22333
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23441
___
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
Change by Serhiy Storchaka :
--
pull_requests: +22335
pull_request: https://github.com/python/cpython/pull/23443
___
Python tracker
<https://bugs.python.org/issue42
Serhiy Storchaka added the comment:
Yes, I think this is a problem. It is expected that an instance of OSError has
valid errno. OSError is a merge of several old exception types, some of them
did have errno, and others did not.
Maybe add BaseTimeoutError and make TimeoutError a subclass of
Serhiy Storchaka added the comment:
I fixed many instantiations of OSError subclasses, but many are still left in
Python code.
--
___
Python tracker
<https://bugs.python.org/issue42
New submission from Serhiy Storchaka :
There is a potential leak when adding item to errmap (errno to OSError subclass
mapping) fails.
--
components: Interpreter Core
messages: 381565
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Possible leak in
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +22338
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23446
___
Python tracker
<https://bugs.python.org/issu
New submission from Serhiy Storchaka :
In Lib/idlelib/searchengine.py there is a code which decomposes re.error and
reports error message, pattern, and position of error.
The problem is that that code does not match the structure of re.error. It
takes args[0] as error message, and args[1
Change by Serhiy Storchaka :
--
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue42426>
___
___
Python-bugs-list mailing list
Unsubscrib
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +22339
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23447
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
Yes, this design has an incorrigible flaw.
--
nosy: +serhiy.storchaka
resolution: -> rejected
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
This is a good idea. Writing IsADirectoryError(errno.EISDIR,
os.strerror(errno.EISDIR), filename) is boring.
--
___
Python tracker
<https://bugs.python.org/issue42
Serhiy Storchaka added the comment:
New changeset ed1007c0d74e658d1e6c9b51b12ce7501eb8cbf9 by Serhiy Storchaka in
branch 'master':
bpo-42425: Fix possible leak in initialization of errmap for OSError (GH-23446)
https://github.com/python/cpython/commit/ed1007c0d74e658d1e6c9b51b12ce7
New submission from Serhiy Storchaka :
Some code in the stdlib still uses e.args[0] to access errno of OSError instead
of e.errno. The latter is more readable, and also it always success (although
can return None), but args can be an empty tuple.
--
components: Library (Lib)
messages
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +22341
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23449
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
Multiline string literals were added recently in Java
(https://openjdk.java.net/jeps/378). The semantic is similar to Julia:
autodedent and ignoring the first blank line.
Multiline string literals have similar semantic in Swift
(https://docs.swift.org
Serhiy Storchaka added the comment:
New changeset c4d45ee670c09d4f6da709df072ec80cb7dfad22 by Serhiy Storchaka in
branch 'master':
bpo-42427: Use the errno attribute of OSError instead of args[0] (GH-23449)
https://github.com/python/cpython/commit/c4d45ee670c09d4f6da709df072ec8
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Serhiy Storchaka :
Some comments in C code still refer to bytearray object as bytes object and to
bytes object as string object.
The proposed PR fixes outdated comments.
It also moves the definition of macros F_LJUST etc from public header to
private header. They are
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +22350
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/23458
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
New changeset 686c203cd4355be5b7809a9d24b4aa3566d9371f by Serhiy Storchaka in
branch 'master':
bpo-42423: Accept single base class in PyType_FromModuleAndSpec() (GH-23441)
https://github.com/python/cpython/commit/686c203cd4355be5b7809a9d24b4aa
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Serhiy Storchaka :
The proposed PR speeds up comparison of bytes and bytearray object with objects
of different types, especially if use the -b option.
Before:
$ ./python -m timeit -s "x = b''" "x == None"
1000 loops, best of 5: 29.5
4101 - 4200 of 25874 matches
Mail list logo