Change by Serhiy Storchaka :
--
pull_requests: +18019
pull_request: https://github.com/python/cpython/pull/18658
___
Python tracker
<https://bugs.python.org/issue38
Serhiy Storchaka added the comment:
PR 18658 is a backport to 3.8 which preserves binary compatibility.
--
___
Python tracker
<https://bugs.python.org/issue38
Serhiy Storchaka added the comment:
New changeset be7ead62db9a1db3e2cd997b0beffd4480e51f5c by sweeneyde in branch
'master':
bpo-39737: Remove code repitition in list_richcompare (GH-18638)
https://github.com/python/cpython/commit/be7ead62db9a1db3e2cd997b0beffd
Serhiy Storchaka added the comment:
Thank you for your contribution Dennis.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
FYI you can use ast CLI:
$ echo 'f"is {x:d}"' | ./python -m ast
Module(
body=[
Expr(
value=JoinedStr(
values=[
Constant(value='is ', kind=None),
FormattedValue(
Serhiy Storchaka added the comment:
Python 2 is no longer supported.
--
nosy: +serhiy.storchaka
resolution: -> out of date
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
Sorry, we missed this issue.
refcounts.dat was updated in other issues.
--
nosy: +serhiy.storchaka
resolution: -> out of date
stage: patch review -> resolved
status: open -> closed
___
Python tracke
Serhiy Storchaka added the comment:
It is too late for 2.7.
--
nosy: +serhiy.storchaka
resolution: -> wont fix
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
There are 5 links for the "import statement" entry. Issue35506 partially solved
the problem -- the main link is now emphasized. But it is still the last of
links. I afraid it is a limitation of Sphinx.
If no other solution be proposed I
Serhiy Storchaka added the comment:
It was fixed in Python 3, and it is too late for 2.7.
--
nosy: +serhiy.storchaka
resolution: -> out of date
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
It is too later for 2.7. The long long type is required for recent Python 3
versions, so this macro is no longer used.
--
nosy: +serhiy.storchaka
resolution: -> out of date
stage: -> resolved
status: open -&g
Serhiy Storchaka added the comment:
The reason why there was the PyInt_AS_LONG macro is that it is very simple and
efficient. It never fails, because the value of the int object always fits in
the C long. PyInt_AsLong is much slower. If you know that the object is int,
you can use
Serhiy Storchaka added the comment:
Python 2.7 no longer supported.
--
nosy: +serhiy.storchaka
resolution: -> out of date
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Serhiy Storchaka :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> Remove tempfile.mktemp()
___
Python tracker
<https://bugs.python
Serhiy Storchaka added the comment:
wyz23x2, why do you think that this is not a duplicate of issue36309?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue39
Serhiy Storchaka added the comment:
1.
def __or__(self, other):
return self.__class__(self.maps[0] | other, *self.maps[1:])
def __ror__(self, other):
return other | dict(self)
2.
def __or__(self, other):
return self.__class__(other, *self.maps)
def __ror__(self, other
Serhiy Storchaka added the comment:
Because there may be more exceptions than the code writer know. The code raised
OverflowError and ValueError may be in different function, so the code writer
know only about ValueError, but OverflowError is an implementation detail (and
may be absent in
Serhiy Storchaka added the comment:
It is how PEP 584 specifies it. The in-place operator is more lenient.
It corresponds the behavior of list operators.
>>> x = []
>>> y = (1, 2)
>>> x + y
Traceback (most recent call last):
File "", line 1, in
Type
Serhiy Storchaka added the comment:
It is not related to curses and Python.
Run arbitrary program (for example `cat` or `sleep 100`) and press Ctrl-4. You
will get a core dump. This is because your terminal generates the signal
SIGQUIT on Ctrl-4, and default action on SIGQUIT is core dump
Serhiy Storchaka added the comment:
I concur with Chris and Kyle.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue39816>
___
___
Serhiy Storchaka added the comment:
New changeset 1f577ce363121d590b51abf5c41d1bcf3d751436 by Hai Shi in branch
'master':
bpo-39378: partial of PickleState struct should be traversed. (GH-18046)
https://github.com/python/cpython/commit/1f577ce363121d590b51abf5c41d1b
Serhiy Storchaka added the comment:
New changeset 4edc95cf0a2960431621eee9bc194f6225f1690b by Shantanu in branch
'master':
bpo-39495: Remove default value from C impl of TreeBuilder.start (GH-18275)
https://github.com/python/cpython/commit/4edc95cf0a2960431621eee9bc194f
Serhiy Storchaka added the comment:
New changeset 2565edec2c974b2acca03b4cc5025e83f903ddd7 by Chris A in branch
'master':
bpo-38971: Open file in codecs.open() closes if exception raised. (GH-17666)
https://github.com/python/cpython/commit/2565edec2c974b2acca03b4cc5025e
Serhiy Storchaka added the comment:
New changeset 28d0bcac8b7e6dbd28311f1283dabb6a4d649fcb by Serhiy Storchaka in
branch 'master':
bpo-38913: Fix segfault in Py_BuildValue("(s#O)", ...) if entered with
exception raised. (GH-18656)
https://github.com/p
Change by Serhiy Storchaka :
--
pull_requests: +18089
pull_request: https://github.com/python/cpython/pull/18732
___
Python tracker
<https://bugs.python.org/issue38
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.or
New submission from Serhiy Storchaka :
Currently None is used instead of an empty directory for the attrib field in
the C implementation of Element in ElementTree. It is a pure optimization: an
empty dict takes a memory and its creation has a cost.
The proposed PR makes NULL be using instead
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +18092
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18735
___
Python tracker
<https://bugs.python.org/issu
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.9
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
New changeset a7b8a969eb3daacb1fcb029a8c5fecb5d09c964b by Serhiy Storchaka in
branch '3.8':
[3.8] bpo-38913: Fix segfault in Py_BuildValue("(sGH-O)", ...) if entered with
exception raised. (GH-18656). (GH-18732)
https://github.com/p
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
type: -> crash
versions: +Python 3.9
___
Python tracker
<https://bugs.python
Serhiy Storchaka added the comment:
New changeset 87a4cd5fbebdd0e6166b421d2c3706bc2f2e5a11 by Serhiy Storchaka in
branch '3.8':
bpo-38410: Properly handle PySys_Audit() failures (GH-18658)
https://github.com/python/cpython/commit/87a4cd5fbebdd0e6166b421d2c3706
Serhiy Storchaka added the comment:
It is too later for 2.7.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: -Python 2.7
___
Python tracker
<https://bugs.python.or
Change by Serhiy Storchaka :
--
status: closed -> open
___
Python tracker
<https://bugs.python.org/issue38913>
___
___
Python-bugs-list mailing list
Unsubscrib
Serhiy Storchaka added the comment:
Actually there is a leak in PyErr_WarnEx().
--
___
Python tracker
<https://bugs.python.org/issue38913>
___
___
Python-bug
New submission from Serhiy Storchaka :
The test added for issue38913 exposed a reference leak in PyErr_WarnEx().
--
components: Interpreter Core
messages: 363203
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Reference leak in PyErr_WarnEx()
type: resource
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +18105
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18750
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
Opened issue39831.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<https://bugs.python.org/i
Serhiy Storchaka added the comment:
New changeset 2d2f85517f8216146a2f888d1ad4d765b3be2339 by Serhiy Storchaka in
branch 'master':
bpo-39831: Fix a reference leak in PyErr_WarnEx(). (GH-18750)
https://github.com/python/cpython/commit/2d2f85517f8216146a2f888d1ad4d7
Serhiy Storchaka added the comment:
It is not so easy for 3.7.
--
resolution: fixed ->
stage: resolved ->
status: closed -> open
___
Python tracker
<https://bugs.python.or
Change by Serhiy Storchaka :
--
pull_requests: +18119
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18764
___
Python tracker
<https://bugs.python.org/issu
Change by Serhiy Storchaka :
--
pull_requests: +18120
pull_request: https://github.com/python/cpython/pull/18765
___
Python tracker
<https://bugs.python.org/issue39
Serhiy Storchaka added the comment:
New changeset ae75a294352e9b9487f5dc8e88f068e7e6974dc2 by Serhiy Storchaka in
branch 'master':
bpo-39831: Remove outdated comment. (GH-18764)
https://github.com/python/cpython/commit/ae75a294352e9b9487f5dc8e88f068
Serhiy Storchaka added the comment:
New changeset 469325c30e147680543b2f5118b83fd95055a499 by MojoVampire in branch
'master':
bpo-35712: Make using NotImplemented in a boolean context issue a deprecation
warning (GH-13195)
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:
What would "{} {}".partial_format({}) return?
It is not possible to implement a "safe" variant of str.format(), because in
difference to Template it can call arbitrary code and allows easily to produce
arbitrary large strings. Template
Serhiy Storchaka added the comment:
It was fixed in issue16865.
--
nosy: +serhiy.storchaka
resolution: -> out of date
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
It would be better to name it keepends and set it True by default.
I wanted this feature. The problem is that it is not just concrete
implementation, it is an interface. Adding new parameters for IOBase methods
will break all IOBase subclasses. And there
Change by Serhiy Storchaka :
--
keywords: +easy (C)
stage: -> needs patch
versions: +Python 3.7, Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
csv.DictReader does not work with encodings. It works with already decoded
strings.
You have to specify the correct encoding in open() (and "t" in mode is ignored):
with open(filename, "r", encoding="utf-8") as csvfile:
New submission from Serhiy Storchaka :
$ make html
...
Warning, treated as error:
/home/serhiy/py/cpython/Doc/c-api/call.rst:71:duplicate C object description of
vectorcallfunc, other instance in /home/serhiy/py/cpython/Doc/c-api/typeobj.rst
--
assignee: docs@python
components
Serhiy Storchaka added the comment:
Would not be better to use mode='eval' for expression nodes?
>>> print(ast.dump(ast.parse('123', mode='eval'), indent=4))
Expression(
body=Constant(value=123, kind=Non
Serhiy Storchaka added the comment:
It was added to produce nicer output.
Currently:
>>> print(ast.unparse(ast.parse('a[i, j]')))
a[(i, j)]
With PR 9605:
>>> print(ast.unparse(ast.parse('a[i, j]')))
a[i, j]
The current code is not consistent w
New submission from Serhiy Storchaka :
ast.unparse() produces incorrect output for ExtSlice containing a single
element:
>>> print(ast.unparse(ast.parse('a[i:j,]')))
a[i:j]
It also produces redundant parenthesis for Index containing Tuple:
>>> print(ast.unparse(
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +18183
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18824
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
New changeset c4928fc1a853f3f84e2b4ec1253d0349137745e5 by Serhiy Storchaka in
branch 'master':
bpo-39889: Fix ast.unparse() for subscript. (GH-18824)
https://github.com/python/cpython/commit/c4928fc1a853f3f84e2b4ec1253d03
Change by Serhiy Storchaka :
--
pull_requests: +18184
pull_request: https://github.com/python/cpython/pull/18826
___
Python tracker
<https://bugs.python.org/issue39
Serhiy Storchaka added the comment:
New changeset 92b72788ecf2ee5dfac780c7dfb5ee5350fc641d by Serhiy Storchaka in
branch '3.8':
[3.8] bpo-39889: Fix unparse.py for subscript. (GH-18824). (GH-18826)
https://github.com/python/cpython/commit/92b72788ecf2ee5dfac780c7dfb5ee
Serhiy Storchaka added the comment:
There are two reasons:
1. os.path.expanduser() returns the path unchanged when a home directory cannot
be resolved, pathlib.Path.expanduser() raises an error. The latter behavior
looks more robust, but we can't change os.path.expanduser(
Change by Serhiy Storchaka :
--
pull_requests: +18200
pull_request: https://github.com/python/cpython/pull/18843
___
Python tracker
<https://bugs.python.org/issue36
Serhiy Storchaka added the comment:
I see no reason to change the current code.
--
resolution: -> not a bug
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
PR 18843 solves this issue by setting None as class attributes for optional
fields and attributes (like "kind" or "end_col_offset").
It is not so easy for fields like "type_ignores". They are mutable lists, so
this approach
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue39638>
___
___
Python-bugs-list mailing list
Unsub
Serhiy Storchaka added the comment:
It was discussed in issue19776.
Having separate implementation we can avoid design flaws of
os.path.expanduser().
--
___
Python tracker
<https://bugs.python.org/issue39
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
Sorry, I did not know about your PR Batuhan and fixed this bug in issue39889.
After fixing the bug in the current code PR 9605 only simplifies the code. So
in this case the new code is not more complex than correctly written old code
New submission from Serhiy Storchaka :
There is very strange code in _elementtree.Element.__getstate__ which decrement
references to elements of a list before decrementing a reference to the list
itself. It happens only if creating a dict fails, so it is almost impossible to
reproduce, but
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +18207
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18850
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
New changeset db283b32e7580741a8b6b7f27f616cc656634750 by Serhiy Storchaka in
branch 'master':
bpo-39567: Document audit for os.walk, os.fwalk, Path.glob and Path.rglob.
(GH-18499)
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:
PR 14166 does not fix this issue.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue37948>
___
___
New submission from Serhiy Storchaka :
The builtin type() serves two functions:
1. When called with a single positional argument it returns the type of the
argument.
>>> type(1)
2. Otherwise it acts as any class when called -- creates an instance of this
class (a type). It
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +18209
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18852
___
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
Serhiy Storchaka added the comment:
New changeset 89fabe51af27a16ae7174ad94921e3980e28 by Serhiy Storchaka in
branch '3.7':
[3.7] bpo-39831: Fix a reference leak in PyErr_WarnEx(). (GH-18750). (GH-18765)
https://github.com/python/cpython/commit/89fabe51af27a16ae7174ad949
Serhiy Storchaka added the comment:
Updated the PR according to review comments.
PyNumber_ToBase() now raises SystemError for unsupported base instead of
crashing. unicode_eq() asserts that unicode strings are ready (it is only
called for hashed strings and if we have a hash they should be
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
nosy_count: 1.0 -> 2.0
pull_requests: +18220
pull_request: https://github.com/python/cpython/pull/18863
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
Sorry Zackery, I did not know about this issue so I wrote different PR to fix
this problem. And only after writing it I have found this issue.
There are several differences between your PR and PR 18863.
* SystemError is raised instead of ValueError
Change by Serhiy Storchaka :
--
versions: -Python 2.7
___
Python tracker
<https://bugs.python.org/issue38643>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Serhiy Storchaka :
--
components: +C API -Interpreter Core
___
Python tracker
<https://bugs.python.org/issue38643>
___
___
Python-bugs-list mailin
Serhiy Storchaka added the comment:
It is not so easy. There was reason why it was not done earlier. scandir()
wastes more limited resource than memory -- file descriptors. It should also be
properly closed and do not depend on the garbage collector.
Consider the example:
def traverse(path
Serhiy Storchaka added the comment:
New changeset 88944a44aa84b0f3674939019b1befbc7a9dc874 by Serhiy Storchaka in
branch 'master':
bpo-39903: Fix double decref in _elementtree.Element.__getstate__ (GH-18850)
https://github.com/python/cpython/commit/88944a44aa84b0f3674939019b1bef
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 dccd41e29fb9e75ac53c04ed3b097f51f8f65c4e by Serhiy Storchaka in
branch 'master':
bpo-39822: Use NULL instead of None for empty attrib in Element. (GH-18735)
https://github.com/python/cpython/commit/dccd41e29fb9e75ac53c04ed3b097f
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 would be slower and less reliable implementation of os.listdir().
--
___
Python tracker
<https://bugs.python.org/issue39
New submission from Serhiy Storchaka :
Path.glob() uses os.scandir() in the following code.
entries = list(scandir(parent_path))
It properly closes the internal file descriptor opened by scandir() if success
because it is automatically closed closed when the iterator is exhausted. But
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +18237
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/18880
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
> Less reliable how?
See issue39916.
> so it looks like scandir as a small overhead when accumulating all results
> and not using the extra info it returns.
Try with larger directories. The difference may be not so small.
$ python3 -m timeit -s
Serhiy Storchaka added the comment:
New changeset 413f01352a8268fb62bb47bde965462d7b82a06a by Serhiy Storchaka in
branch 'master':
bpo-39904: Move handling of one-argument call of type() from type.__new__() to
type.__call__(). (GH-18852)
https://github.com/python/cpyt
Serhiy Storchaka added the comment:
New changeset e5ccc94bbb153431698b2391df625e8d47a93276 by Serhiy Storchaka in
branch 'master':
bpo-38643: Raise SystemError instead of crashing when PyNumber_ToBase is called
with invalid base. (GH-18863)
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 :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
New changeset eebaa9bfc593d5a46b293c1abd929fbfbfd28199 by Serhiy Storchaka in
branch 'master':
bpo-38249: Expand Py_UNREACHABLE() to __builtin_unreachable() in the release
mode. (GH-16329)
https://github.com/python/cpyt
Serhiy Storchaka added the comment:
New changeset b7e9525f9c7ef02a1d2ad8253afdeb733b0951d4 by Serhiy Storchaka in
branch 'master':
bpo-36287: Make ast.dump() not output optional fields and attributes with
default values. (GH-18843)
https://github.com/python/cpyt
Serhiy Storchaka added the comment:
As you worked much with ast.dump(), what multi-line formatting do you prefer,
the current
Module(
body=[
If(
test=Name(id='x', ctx=Load()),
body=[
Change by Serhiy Storchaka :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> json module install error i was use windows 10 pro 64 bit, pls
give solutions to rectify this issue
___
Python tra
Change by Serhiy Storchaka :
--
resolution: -> third party
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
New changeset 13d52c268699f199a8e917a0f1dc4c51e5346c42 by Serhiy Storchaka in
branch 'master':
bpo-34822: Simplify AST for subscription. (GH-9605)
https://github.com/python/cpython/commit/13d52c268699f199a8e917a0f1dc4c
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
2501 - 2600 of 25874 matches
Mail list logo