Change by Serhiy Storchaka :
--
stage: -> needs patch
versions: +Python 3.10
___
Python tracker
<https://bugs.python.org/issue43075>
___
___
Python-bugs-lis
Serhiy Storchaka added the comment:
Please test also creating a large dict with string-only or non-string keys.
Since you add a code in insertdict() it can potentially affects performance.
--
___
Python tracker
<https://bugs.python.org/issue24
New submission from Serhiy Storchaka :
There are few minor errors in the _sqlite3:
* In two places the result of PyList_Append() is not checked.
* The lastrowid field of pysqlite_Cursor can contain a reference to destroyed
object when GIL is released for calling sqlite3_last_insert_rowid
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +23209
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24395
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
New changeset 42b1806af90b86ec393ca7da14e99ce95ec6c53b by Serhiy Storchaka in
branch 'master':
bpo-43030: Fixed a compiler warning in Py_UNICODE_ISSPACE with signed wchar_t
(GH-24350)
https://github.com/python/cpyt
Serhiy Storchaka added the comment:
For all other classes we check that there is no user defined __repr__. But it
is difficult to check this for dataclass or namedtuple because there is no base
class for dataclasses or namedtuples which provides standard __repr__
implementation. All
New submission from Serhiy Storchaka :
curses.window.enclose() is the only curses wrapper which returns 0/1 while the
original function is declared returning bool.
https://linux.die.net/man/3/wenclose
--
components: Extension Modules
messages: 386021
nosy: serhiy.storchaka
priority
Serhiy Storchaka added the comment:
New changeset 229ef39bcc14ee7838968dfda51d045304e5cf39 by Miss Islington (bot)
in branch '3.8':
bpo-43030: Fixed a compiler warning in Py_UNICODE_ISSPACE with signed wchar_t
(GH-24350) (GH-24397)
https://github.com/python/cpyt
Change by Serhiy Storchaka :
--
components: +C API -Extension Modules
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.8
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
Good idea Eric, it should work.
But it can make the code of pprint potentially less flexible. Currently it uses
a mapping which maps __repr__ to corresponding pprint implementation. Only
exception is for dicts, for historical reasons. It potentially can
Serhiy Storchaka added the comment:
New changeset d64fd4bb5bb4fd2e3277f39d3ad99b5a8d193e1b by Serhiy Storchaka in
branch 'master':
bpo-43016: Rewrite tests for curses (GH-24312)
https://github.com/python/cpython/commit/d64fd4bb5bb4fd2e3277f39d3ad99b
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +23212
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/24398
___
Python tracker
<https://bugs.python.org/issu
Change by Serhiy Storchaka :
--
pull_requests: +23213
pull_request: https://github.com/python/cpython/pull/24399
___
Python tracker
<https://bugs.python.org/issue43
Serhiy Storchaka added the comment:
New changeset 9073180db521dc83e6216ff0da1479d00167f643 by Serhiy Storchaka in
branch 'master':
bpo-43083: Fix error handling in _sqlite3 (GH-24395)
https://github.com/python/cpython/commit/9073180db521dc83e6216ff0da1479
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 e9d4960d15c5282904cf26e469ce7cee39f634f7 by Serhiy Storchaka in
branch '3.9':
[3.9] bpo-43016: Rewrite tests for curses (GH-24312). (GH-24399)
https://github.com/python/cpython/commit/e9d4960d15c5282904cf26e469ce7c
Change by Serhiy Storchaka :
--
pull_requests: +23215
pull_request: https://github.com/python/cpython/pull/24401
___
Python tracker
<https://bugs.python.org/issue43
Serhiy Storchaka added the comment:
New changeset 7ca947e93bff2b9d78312dc8ed8e0a2b7d25d3f3 by Serhiy Storchaka in
branch '3.8':
[3.8] bpo-43016: Rewrite tests for curses (GH-24312). (GH-24399) (GH-24401)
https://github.com/python/cpython/commit/7ca947e93bff2b9d78312dc8ed8e0a
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Serhiy Storchaka :
--
resolution: -> out of date
stage: needs patch -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
New changeset 3243e8a4b4b4cf321f9b28335d565742a34b1976 by Anonymous Maarten in
branch 'master':
bpo-41604: Don't decrement the reference count of the previous user_ptr when
set_panel_usertpr fails (GH-21933)
https://github.com/python
Change by Serhiy Storchaka :
--
pull_requests: +23218
pull_request: https://github.com/python/cpython/pull/24403
___
Python tracker
<https://bugs.python.org/issue41
Serhiy Storchaka added the comment:
Continued in issue42789 and issue43016.
--
status: open -> closed
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
Failures on buildbots:
https://buildbot.python.org/all/#/builders/506/builds/765
==
ERROR: test_output_character (test.test_curses.TestCurses
Change by Serhiy Storchaka :
--
pull_requests: +23220
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/24405
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
New changeset 3c8d6934436e20163be802f5239c5b4e4925eeec by Serhiy Storchaka in
branch '3.9':
[3.9] bpo-41604: Don't decrement the reference count of the previous user_ptr
when set_panel_usertpr fails (GH-21933). (GH-24403)
https://github.com
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: -Python 3.5, Python 3.6, Python 3.7
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
New changeset a1e9a1e120a11c563e166c15721169184c802f8b by Serhiy Storchaka in
branch 'master':
bpo-43016: Fix test_curses on platform without cursesw (GH-24405)
https://github.com/python/cpython/commit/a1e9a1e120a11c563e166c15721169
Serhiy Storchaka added the comment:
New changeset 304f9d2622fa4fd0833d60d31ddf7321a6a8141b by Miss Islington (bot)
in branch '3.9':
bpo-43016: Fix test_curses on platform without cursesw (GH-24405) (GH-24407)
https://github.com/python/cpython/commit/304f9d2622fa4fd0833d60d31ddf73
Serhiy Storchaka added the comment:
New changeset aab84a58063e68cb7ff5f7b8d96c431200d0e340 by Miss Islington (bot)
in branch '3.8':
bpo-43016: Fix test_curses on platform without cursesw (GH-24405) (GH-24408)
https://github.com/python/cpython/commit/aab84a58063e68cb7ff5f7b8d96c43
Change by Serhiy Storchaka :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue43016>
___
___
Pyth
Change by Serhiy Storchaka :
--
nosy: +mark.dickinson, rhettinger
___
Python tracker
<https://bugs.python.org/issue43089>
___
___
Python-bugs-list mailin
Serhiy Storchaka added the comment:
`True or b` is always True and differs from `b or True`. `x = True and y` is
always equivalent to `x = y`.
What is the use case of your optimization? Can you provide examples of real
code which would benefit from removing all boolean tests (not only the
Serhiy Storchaka added the comment:
New changeset effaec0bb54f381db8ccfa62514bc26b00946b40 by Zackery Spytz in
branch 'master':
bpo-43132: Fix incorrect handling of PyObject_RichCompareBool() in _zoneinfo
(GH-24450)
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:
New changeset c8b4375fe1aca1188f57ecf482547abd77e3ef91 by Miss Islington (bot)
in branch '3.9':
bpo-43132: Fix incorrect handling of PyObject_RichCompareBool() in _zoneinfo
(GH-24450) (GH-24457)
https://github.com/python/cpyt
Serhiy Storchaka added the comment:
Open modes "r", "r+", "w", "w+", "a", "a+" are supported by C function fopen()
and similar functions in other languages. Would not "rw" be confusing? Are
there fopen-like functions i
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: needs patch -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
Sorry, I thought I just forgot to close this issue.
--
resolution: fixed ->
stage: resolved -> needs patch
status: closed -> open
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
Is it possible that your PATH contains a non-directory? Because it can give
results a NotADirectoryError:
>>> subprocess.check_output(['xdg-settings', 'get', 'default-web-browser'],
>>> env={'PATH'
Change by Serhiy Storchaka :
--
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue40361>
___
___
Python-bugs-list mailing list
Unsubscrib
Serhiy Storchaka added the comment:
This change was indirectly documented in What's New for 3.8 (deprecation)
https://docs.python.org/3.8/whatsnew/3.8.html#build-and-c-api-changes:
"""
Functions that convert Python number to C integer like PyLong_AsLong() and
argument pa
Serhiy Storchaka added the comment:
You can use try/except.
try:
shutil.copyfile("test.txt", "test.txt")
except SameFileError:
pass
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bug
Serhiy Storchaka added the comment:
Path is not string, and it was made not string-like intentionally. Otherwise it
would be made a subclass of str.
If you want to check whether a string is a substring of the string
representation of the path, just do it explicitly: 'share' i
Serhiy Storchaka added the comment:
I guess that you need to use the parts attribute. Note that `'share' in
str(path)` and `'share' in path.parts` are two very different things, even if
they can give the same result in some cases.
When reply be email, please remove the q
Serhiy Storchaka added the comment:
If issue24990 is closed, this issue should be closed as well, as it is just a
particular case of issue24990.
--
nosy: +serhiy.storchaka
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> Foreign languag
Serhiy Storchaka added the comment:
There was a bug in the regular expression engine which caused re.split()
working incorrectly with zero-width patterns. Note that in your example
_DIGIT_BOUNDARY_RE.split("10.0.0") returns ['10.0.0'] on Python 2.7 -- the
result which y
Serhiy Storchaka added the comment:
What is our OS and Python version. I cannot reproduce this on Linux, perhaps it
is OS-specific.
Try to test with the latest Python release. Maybe this bug was fixed in
issue42328.
--
nosy: +serhiy.storchaka
Serhiy Storchaka added the comment:
Tested on Python 3.8.6 and 3.8.7+, Windows 10. On 3.8.6 the bug is reproduced,
on 3.8.7+ all works as expected.
--
resolution: -> out of date
stage: -> resolved
status: open -> closed
superseder: -> ttk style.map function incorrectly
Serhiy Storchaka added the comment:
Would it be too much if add a Python 2 rule for print statement in grammar to
produce better error message?
invalid_print_stmt:
| 'print' ( test (',' test)* [','] ] |
'>>' test [ (',
Serhiy Storchaka added the comment:
The choice of testing __iter__ was because OrderedDict overrides __iter__, and
since dicts are ordered now, the order of insertion does matter.
--
nosy: +serhiy.storchaka
___
Python tracker
<ht
Serhiy Storchaka added the comment:
Since adding new operator is a syntax-level change, it needs a PEP. It is
better to start with discussing on the Python-ideas mailing list
(https://mail.python.org/mailman3/lists/python-ideas.python.org/). Let's see if
this idea will be accepted favo
Serhiy Storchaka added the comment:
Well, it returns NULL in case of out of memory, but is it the only cause? Can
NULL be returned for other reasons?
--
___
Python tracker
<https://bugs.python.org/issue43
Serhiy Storchaka added the comment:
It is a kind of optimization. We first perform few fast checks for exact types,
and then slower subclass checks.
I do not know whether this optimization is worth, but it was written so, and
there is nothing wrong in it.
--
nosy: +serhiy.storchaka
Serhiy Storchaka added the comment:
It also returns NULL if the column name was not set (is it even possible?).
--
___
Python tracker
<https://bugs.python.org/issue43
Serhiy Storchaka added the comment:
Investigate where column names are initialized and whether is it possible to
get them NULLs. The array of column names is filled with NULLs when initialized
and later it is filled with references to strings. I am wondering whether there
is a gap between
Serhiy Storchaka added the comment:
You can do it yourself in your script. It is just two lines of code:
true = True
false = False
And it works in all Python versions!
--
nosy: +serhiy.storchaka
resolution: -> rejected
stage: -> resolved
status: open -&g
Serhiy Storchaka added the comment:
Please go ahead!
--
___
Python tracker
<https://bugs.python.org/issue43251>
___
___
Python-bugs-list mailing list
Unsub
Serhiy Storchaka added the comment:
PyLong_Check is two memory reads, bits operation, and comparison with 0. And
one non-inlined function call when limited API is used. PyLong_CheckExact is
only one memory read and comparison.
I am not sure that the difference is significant enough to
Serhiy Storchaka added the comment:
Could you please give a link to the discussion?
--
___
Python tracker
<https://bugs.python.org/issue43251>
___
___
Python-bug
Serhiy Storchaka added the comment:
Look at issue in which the workaround was added. Does it contain some examples?
--
___
Python tracker
<https://bugs.python.org/issue43
Serhiy Storchaka added the comment:
json.loads() accepts also data encoded with UTF-16 and UTF-32.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue43
Serhiy Storchaka added the comment:
There are three calls of pysqlite_statement_reset() in
_pysqlite_query_execute(). And all three of them can be called with the same
statement object. But repeated calls are no-ops because
pysqlite_statement_reset() clears flag in_use and calls
Serhiy Storchaka added the comment:
Your proposed fix LGTM. Please open a PR. Don't forget about test and NEWS
entry.
--
___
Python tracker
<https://bugs.python.org/is
New submission from Serhiy Storchaka :
I always hesitate in what subdirectory of Include/ to add a declaration of new
private API. What is more "private"? It would be nice to add README files in
these directories which describe what API should be declared here and what is
the
Serhiy Storchaka added the comment:
> Hmm, but in my experience, tuple on Python 3.6 doesn't take keyword arguments
> either:
They do.
>>> tuple(sequence='abc')
('a', 'b', 'c')
>>> list(sequence='abc')
['a&
Serhiy Storchaka added the comment:
If you write a flexible Text ui program, you should use functions provided by a
text ui library which you use to clear the screen or a part of screen.
If you want to call an external command, use os.system(), os.popen() or more
flexible subprocess module
Serhiy Storchaka added the comment:
The comment is outdated. Shelf objects also do not support methods copy and
fromkey. Creating a new Shelve object without specifying a new underlying
database object does not make much sense.
Maybe say that they implement the MutableMapping interface
Serhiy Storchaka added the comment:
What do you mean by "return nothing not even None"? Does it hang?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.o
Change by Serhiy Storchaka :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> Support pathlike objects on dbm/shelve
___
Python tracker
<https://bugs.python
Serhiy Storchaka added the comment:
It is correct. Colorspaces for RGB an YIQ are different. Not all RGB colors can
be represented in YIQ and vice versa. For YIQ color (0, 1, 0) you need RGB
color (0.9468822170900693, -0.27478764629897834, -1.1085450346420322), but the
G and B components
Change by Serhiy Storchaka :
--
nosy: +mark.dickinson, rhettinger
___
Python tracker
<https://bugs.python.org/issue40682>
___
___
Python-bugs-list mailin
Serhiy Storchaka added the comment:
It is okay. In this case `a |= b` is equivalent to `a = a | b`.
The same behavior is for tuples, strings, and other non-mutable collections:
t = (1, 2)
t += (3, 4)
s = 'ab'
s += 'cd'
And even for numbers!
i = 5
i += 1
--
nos
Serhiy Storchaka added the comment:
Accepting an empty string in CLI is just an artifact of the implementation.
There was no intention to support it. It will fail if pass a space:
./python -m timeit ' '
or two empty arguments:
IndentationError:
./python -m timeit '
Change by Serhiy Storchaka :
--
nosy: +gregory.p.smith
___
Python tracker
<https://bugs.python.org/issue40701>
___
___
Python-bugs-list mailing list
Unsubscribe:
Serhiy Storchaka added the comment:
The text of the license cannot be changed without consulting with lawyers.
--
nosy: +gvanrossum, serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue40
Serhiy Storchaka added the comment:
It would be breaking change.
In addition to multiline strings you can use \n with $' on Posix:
python -c $'with open("somefile.txt") as f:\n s = f.read()\n print(len(s))'
Maybe there is similar feature on Windows, but in
Serhiy Storchaka added the comment:
The length of the object is the number of some items in the object. It is
usually tied with iteration: len(obj) == len(list(obj)). Is this true for
PurePath?
--
nosy: +serhiy.storchaka
___
Python tracker
Serhiy Storchaka added the comment:
This code is valid in Python 3. We usually do not accept such pure cosmetic
changes.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue40
Serhiy Storchaka added the comment:
If it is not iterable, the length does not make sense.
Do you expect also len(-123) == 4?
--
___
Python tracker
<https://bugs.python.org/issue40
Serhiy Storchaka added the comment:
Path is not a string with bells and whistles. It was intentionally made not a
string subclass because some string operations (including len()) just do not
make sense for path or are ambiguous.
I am closing this as it goes against the initial design of
Change by Serhiy Storchaka :
--
nosy: +pitrou
___
Python tracker
<https://bugs.python.org/issue40753>
___
___
Python-bugs-list mailing list
Unsubscribe:
Serhiy Storchaka added the comment:
Similar cleanup (and many many others) was proposed when pathlib was initially
added to the stdlib. They were rejected, so now we need a new discussion to
revise the old decision. See issue20002.
--
___
Python
Serhiy Storchaka added the comment:
1. There is already a warning before example.
2. Even if you blindly copy-paste the example it will not work. You have to set
the top variable.
So I don't see any problem here. You always can shoot yourself in the foot if
try e
Serhiy Storchaka added the comment:
Maybe just document that tempdir should be a string?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue40
Serhiy Storchaka added the comment:
In any case this is a new feature, so it can be added only in 3.10, and we need
the documentation patch for 3.9 and older.
As a workaround you can use os.fsdecode():
tempfile.tempdir = os.fsdecode(b'/doesnt
Serhiy Storchaka added the comment:
According to the documentation
(https://docs.python.org/3/library/csv.html#writer-objects):
"""
A row must be an iterable of strings or numbers for Writer objects and a
dictionary mapping fieldnames to strings or numbers (by passing th
Serhiy Storchaka added the comment:
assertTrue() always returns None, but its returned value is irrelevant, because
it is only used for its side effect.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue40
Serhiy Storchaka added the comment:
New changeset 3f59b55316f4c6ab451997902579aa69020b537c by Zackery Spytz in
branch 'master':
bpo-35714: Reject null characters in struct format strings (GH-16928)
https://github.com/python/cpython/commit/3f59b55316f4c6ab451997902579aa
Serhiy Storchaka added the comment:
Zackery, do you mind to create a backport to 3.8?
--
___
Python tracker
<https://bugs.python.org/issue35714>
___
___
Pytho
Serhiy Storchaka added the comment:
It would be confusing. There would be the encoding argument for open() to
encode strings to bytes and the encoding argument for csv.writer() to decode
bytes to strings. The latter will be ignored in all normal cases (for strings
and numbers
Serhiy Storchaka added the comment:
New changeset 5ff5edfef63b3dbc1abb004b3fa4b3db87e79ff9 by Zackery Spytz in
branch '3.8':
[3.8] bpo-35714: Reject null characters in struct format strings (GH-16928)
(GH-20419)
https://github.com/python/cpyt
Serhiy Storchaka added the comment:
New changeset 578c3955e0222ec7b3146197467fbb0fcfae12fe by Serhiy Storchaka in
branch 'master':
bpo-37999: No longer use __int__ in implicit integer conversions. (GH-15636)
https://github.com/python/cpython/commit/578c3955e0222ec7b3146197467fbb
Change by Serhiy Storchaka :
--
pull_requests: +19693
pull_request: https://github.com/python/cpython/pull/20437
___
Python tracker
<https://bugs.python.org/issue37
New submission from Serhiy Storchaka :
Currently PyNumber_Index() can return something that's an instance of a strict
subclass of int. For example PyNumber_Index(Py_True) returns Py_True. The same
for operator.index():
>>> import operator
>>> operator.index(True)
True
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +19699
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/20443
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
This change conflicts with the test added in issue26202. We perhaps should
revert issue26202. This can also affect the user code which depends on range()
attributes start, stop and step being instances of the int subclass
Serhiy Storchaka added the comment:
Since Pandas opens an output file it has control on what encoding is used. It
is a Pandas' responsibility to decode bytes, or raise an exception, or just
ignore the problem if it is pretty uncommon case. Pandas already have a complex
code for forma
Serhiy Storchaka added the comment:
It is not a print() problem, it is a problem with converting an integer to
decimal string representation. AFAIK it has quadratic complexity from the size
of the integer.
--
nosy: +mark.dickinson, serhiy.storchaka
Serhiy Storchaka added the comment:
Well, the behavior for an existing bytes path was not unintended, but some
people can depend on it.
But before making it an official feature, we should also check other cases of
an unintended behavior. What if set tempfile.tempdir to a Path object or to a
3301 - 3400 of 25874 matches
Mail list logo