Serhiy Storchaka added the comment:
Then you would get
>>> raise asyncio.CancelledError
Traceback (most recent call last):
File "", line 1, in
asyncio.exceptions.CancelledError: CancelledError
instead of
>>> raise asyncio.CancelledError
Traceback (most recent
Serhiy Storchaka added the comment:
I was also against this feature. My reasons:
1. There will be not much benefit. ascii_alphanumerics is too long, so there is
no much saving of typing. There is larger chance of typo. You will be not able
to use it for several years, until support of
Serhiy Storchaka added the comment:
I agree. lru_cache(typed=True) itself should not look into iterable internals.
It would be not only slow, but a change of semantic.
The simplest way to solve this issue is to remove caching of __getitem__(). The
more sophisticated way is to move caching
Change by Serhiy Storchaka :
--
pull_requests: +27602
pull_request: https://github.com/python/cpython/pull/29334
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
>From the man page:
S (Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.) Synonym for
ls. Don't use.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org
Serhiy Storchaka added the comment:
New changeset 634984d7dbdd91e0a51a793eed4d870e139ae1e0 by Serhiy Storchaka in
branch 'main':
bpo-45679: Fix caching of multi-value typing.Literal (GH-29334)
https://github.com/python/cpython/commit/634984d7dbdd91e0a51a793eed4d87
Change by Serhiy Storchaka :
--
pull_requests: +27607
pull_request: https://github.com/python/cpython/pull/29342
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
Do we need Lib/test/test_sqlite3/__init__.py? Would not tests in package be
loaded automatically?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue10
Change by Serhiy Storchaka :
--
components: +Interpreter Core
nosy: +serhiy.storchaka
versions: +Python 3.11 -Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
This set is mostly outdated. In Python 2 it was a set of characters composing
identifiers, but in Python 3 identifiers can contain non-ASCII characters.
--
nosy: +serhiy.storchaka
___
Python tracker
<ht
Serhiy Storchaka added the comment:
Complete sets of characters which can be used in identifiers are too large:
>>> allchars = ''.join(map(chr, range(0x11)))
>>> identstartchars = ''.join(c for c in allchars if c.isidentifier())
>>> identcont
Serhiy Storchaka added the comment:
This in an interesting problem. I am going to work on it at the next weekends.
--
___
Python tracker
<https://bugs.python.org/issue45
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +27639
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/29381
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
The PyObject_TypeCheck() macro is used in performance critical cases. If it is
not the case the PyType_IsSubtype() function can be used. Adding yet check in
PyType_IsSubtype() will slow down more performance sensitive cases in which
PyObject_TypeCheck
Serhiy Storchaka added the comment:
What error?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue45698>
___
___
Python-bugs-list m
Serhiy Storchaka added the comment:
Could you please provide an output as a text?
--
___
Python tracker
<https://bugs.python.org/issue45698>
___
___
Python-bug
Serhiy Storchaka added the comment:
It looks strange. The line containing "function (including the special meanings
of arguments of the form `-'" is a part of a multiline string literal, so there
should not be such error. And it is line 4, not line 3 as in
Serhiy Storchaka added the comment:
What is the problem actually?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue45672>
___
___
Serhiy Storchaka added the comment:
Rather of using AC_COMPILE_IFELSE() in configure.ac, would not be easier to use
#ifdef in the C file?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue41
Serhiy Storchaka added the comment:
Creating a new type takes microseconds, and using PyObject_TypeCheck() instead
of PyType_IsSubtype() can save nanoseconds. So, while this replacement looks
harmless, its effect can hardly be measured even in microbenchmarks
Serhiy Storchaka added the comment:
New changeset 2c045bd5673d56c3fdde7536da9df1c7d6f270f0 by Itamar Ostricher in
branch 'main':
bpo-45697: Use PyObject_TypeCheck in type_call (GH-29392)
https://github.com/python/cpython/commit/2c045bd5673d56c3fdde7536da9df1
Serhiy Storchaka added the comment:
Thank you for your contribution Itamar.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
The tests are passed because this modification does not affect behavior, it
just makes the code slightly less efficient. Replacing i+1 with i just adds one
iteration:
b = bases[i] # == self
if isinstance(b, _BaseGenericAlias) and b is not self
Change by Serhiy Storchaka :
--
pull_requests: +27678
pull_request: https://github.com/python/cpython/pull/29425
___
Python tracker
<https://bugs.python.org/issue27
Serhiy Storchaka added the comment:
This is a duplicate of issue43624. It was also discussed in Discuss.
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> Add underscore as a decimal separator for strin
Change by Serhiy Storchaka :
--
pull_requests: -27678
___
Python tracker
<https://bugs.python.org/issue27313>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Serhiy Storchaka :
--
pull_requests: +27681
pull_request: https://github.com/python/cpython/pull/29425
___
Python tracker
<https://bugs.python.org/issue45
Change by Serhiy Storchaka :
--
pull_requests: +27682
pull_request: https://github.com/python/cpython/pull/29425
___
Python tracker
<https://bugs.python.org/issue27
Serhiy Storchaka added the comment:
New changeset 3d42cd9461e60c7427f3793f640cd975fbd99289 by Erlend Egeberg
Aasland in branch 'main':
bpo-45243: Use connection limits to simplify `sqlite3` tests (GH-29356)
https://github.com/python/cpython/commit/3d42cd9461e60c7427f3793f640cd9
Serhiy Storchaka added the comment:
There is a difference if you modify the arguments list after creating a thread.
args = [1]
t = threading.Thread(target=access, args=args)
args[0] = 2
t.start()
Would it call access(1) or access(2)?
--
nosy: +serhiy.storchaka
Change by Serhiy Storchaka :
--
resolution: duplicate ->
stage: resolved ->
status: closed -> open
superseder: Add underscore as a decimal separator for string formatting ->
___
Python tracker
<https://bugs.python
New submission from Serhiy Storchaka :
The C implementation supports both formats "n" and "N". The Python
implementation only supports format "n".
>>> from decimal import Decimal
>>> format(Decimal('1e100'), 'n')
'1e+1
Serhiy Storchaka added the comment:
In alternative 1 we control the type and the message of exception. In
alternative 3 we left this to the SQLite3 engine. It is difficult to keep
consistency in alternative 2, errors raised for sizes less and larger than
INT_MAX can be different. I think
Serhiy Storchaka added the comment:
The quoting style affects not only the CSV formatting, but also the CSV
parsing. How QUOTE_NOTNULL and QUOTE_STRINGS will affect parsing?
--
___
Python tracker
<https://bugs.python.org/issue23
Serhiy Storchaka added the comment:
I think that the code is correct, and the documentation is not complete. As in
most (but not all) cases of dunder methods it is looked up in a class, ignoring
instance attributes.
--
nosy: +serhiy.storchaka
Change by Serhiy Storchaka :
--
versions: +Python 3.11 -Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.org/issue37295>
___
___
Python-bugs-list m
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +27789
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29540
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
Failed tests:
==
FAIL: test_isinstance_with_or_union
(test.test_isinstance.TestIsInstanceIsSubclass)
--
Traceback (most
Serhiy Storchaka added the comment:
Most of failed tests are related to typing, but there is a purposed test for
__instancecheck__ and __subclasscheck__ bypassing __getattr__ and
__getattribute__
(test.test_descr.ClassPropertiesAndMethods.test_special_method_lookup
Serhiy Storchaka added the comment:
All typing related tests are fixed by updating
types.GenericAlias.__getattribute__. So the only thing is left to make all
tests passed is removing some special methods tests.
The lookup of __instancecheck__ and __subclasscheck__ was changed by Benjamin
Serhiy Storchaka added the comment:
But in this case it starts a sentence.
--
nosy: +gvanrossum, serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
New changeset bc2bc0dbdb52498d009f9f9771452e6aa4faff2b by JMcB in branch 'main':
bpo-45846: Fix capitalisation of Van Rossum at the start of sentence (GH-29641)
https://github.com/python/cpython/commit/bc2bc0dbdb52498d009f9f9771452e
Serhiy Storchaka added the comment:
I think there is a bug in either numpy.timedelta64.__hash__ or
panda.Timedelta.__hash__. Please report it to corresponding libraries.
It is not related to the documentation of membership test. If you have
different hashes for equal objects most dict and
Serhiy Storchaka added the comment:
Why anybody needs to write 255581293 > 12938373?
We try to keep the compiler code maintenable and only implement optimizations
which have the largest effect. PR 29639 adds around 200 lines of complex code
and I do not see the bene
Serhiy Storchaka added the comment:
Thank you for your report and PR JMcB.
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
If it is only used in a single place in the module would not be better to
inline it?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
BTW, is not the correct name _IGNORED_ERRNOS?
--
___
Python tracker
<https://bugs.python.org/issue45853>
___
___
Python-bug
Serhiy Storchaka added the comment:
I think it is good idea, although we may get reports about regressions in 3.11
when Python will start to reject GZIP files which was successfully read before.
But before merging this I want to know:
1. How much overhead does it add for reading files with
Serhiy Storchaka added the comment:
Concur with Eric.
--
nosy: +serhiy.storchaka
resolution: -> rejected
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Serhiy Storchaka :
--
resolution: -> rejected
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
Yes, it was 2.7-only issue.
Thank you Irit for checking and closing outdated issues.
--
resolution: works for me -> out of date
stage: -> resolved
status: pending -> closed
___
Python tracke
Serhiy Storchaka added the comment:
New changeset b48ac6fe38b2fca9963b097c04cdecfc6083104e by Nikita Sobolev in
branch 'main':
bpo-45878: convert `try/except` to `self.assertRaises` in
`Lib/ctypes/test/test_functions.py` (GH-29721)
https://github.com/python/cpyt
Serhiy Storchaka added the comment:
It is not related to loop.stop() and asyncio in general. It is the return
statement which eats the exception. Simpler example:
>>> def f():
... try:
... 1/0
... finally:
... return 42
...
>>> f()
42
Return (
Serhiy Storchaka added the comment:
> It doesn't seem to make sense why other operations on literals are optimized
> but these particular ones aren't optimized (much).
The existing optimizer optimizes the following cases (note that the parser does
not produce negative or
Serhiy Storchaka added the comment:
What else can it be? dict.fromkeys() adds keys in the order of obtaining them,
and it obtains them by iterating its argument. If we need a special note here,
we need a special note for list(), tuple(), filter(), enumerate() and all other
functions which
Serhiy Storchaka added the comment:
I concur with Raymond. It is difficult to find any use case for sorting bytes
objects (I cannot find any).
As for using radix sort in list.sort() in special case of small integer keys,
it is difficult to implement, because we should preserve the initial
Serhiy Storchaka added the comment:
The patch LGTM, and I have nothing to add. Ronald, do you mind to create a PR.
--
assignee: -> ronaldoussoren
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issu
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 have no strong opinion. I found the discrepancy when reviewed one of Mark's
PRs. I was surprised because I did not know that "N" is supported.
On other hand, there are reasons for supporting upper-case variant of "n" if we
suppo
Serhiy Storchaka added the comment:
It is a good idea in general. Please go ahead, I am sure that the PR will be
accepted.
But keep in mind that not always additional links make the documentation
better. The rule of tumb is to not add multiple links to the same entity in one
paragraph. In
Serhiy Storchaka added the comment:
You are right about an uppercase converter. I forget this. I withdraw this
proposition.
It seems that even if we add support of "N" to all numeric formatting it will
not cover all use cases. "n" is a locale specific variant of &qu
Change by Serhiy Storchaka :
--
keywords: +patch
nosy: +serhiy.storchaka
nosy_count: 7.0 -> 8.0
pull_requests: +28091
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/29864
___
Python tracker
Change by Serhiy Storchaka :
--
versions: +Python 3.10, Python 3.9
___
Python tracker
<https://bugs.python.org/issue13236>
___
___
Python-bugs-list mailin
Serhiy Storchaka added the comment:
I do not remember details, but I encountered this issue (maybe when run tests
in subprocesses?).
--
___
Python tracker
<https://bugs.python.org/issue13
Change by Serhiy Storchaka :
--
nosy: +vinay.sajip
___
Python tracker
<https://bugs.python.org/issue44884>
___
___
Python-bugs-list mailing list
Unsubscribe:
Serhiy Storchaka added the comment:
Biopython uses next() without iter(), and there is no guarantee that it should
work.
--
nosy: +brett.cannon, pitrou, serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue41
Serhiy Storchaka added the comment:
What if change FileIO.isatty() instead? If make it returning False without
invoking a system call if the file size is non-zero it will eliminate the need
to expose _size.
--
nosy: +serhiy.storchaka
___
Python
Change by Serhiy Storchaka :
--
nosy: +benjamin.peterson, pitrou, stutzbach
versions: -Python 3.10, Python 3.6, Python 3.7, Python 3.8, Python 3.9
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
I agree with Andrei. I'll test this approach on Windows.
--
___
Python tracker
<https://bugs.python.org/issue43153>
___
___
Serhiy Storchaka added the comment:
I concur with Ronald. If we explicitly document that PyErr_SetObject() does not
steal reference we would need to document it for every parameter of every
function. It would make the documentation worse because it would be more
difficult to distinguish
Serhiy Storchaka added the comment:
What is the result of
root.tk.call('wm', 'overrideredirect', root._w, True)
?
Is it not an empty string?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bug
Serhiy Storchaka added the comment:
Why not raise an error if it contradicts language spec?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue11
Serhiy Storchaka added the comment:
Thank you Ali. It confirms my guess, but it is still not clear why we get a
Tcl_Obj rather of None or empty string.
Please examine what is the output of the following code:
res = root.tk.call('wm', 'overrideredirect', root._w, True)
Serhiy Storchaka added the comment:
Concur with Irit. We should patch the caller of PyDict_GetItem, not
PyDict_GetItem.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue27
Serhiy Storchaka added the comment:
It looks like a bug in Tk 8.6.11. It is expected that the implementation of "wm
overrideredirect" returns an empty string if pass the boolean argument. The
returned value is an empty string, but its type is not cleared. Seems it keeps
the type o
New submission from Serhiy Storchaka :
Some recently added tests are not compatible with old Tk versions. I have build
all 8.5 and 8.6 versions and build and test Tkinter against them. The proposed
PR makes tests passes on Tk versions 8.5.4 to 8.5.19 and 8.6.0 to 8.6.12. There
are some
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +28138
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29913
___
Python tracker
<https://bugs.python.org/issu
Change by Serhiy Storchaka :
--
nosy: +epaine
___
Python tracker
<https://bugs.python.org/issue45979>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Serhiy Storchaka :
--
pull_requests: +28140
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/29915
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
The issue is no longer reproduced by the original test because of the cache for
dict key tables. But it is not gone, and can be reproduced with modified test.
There may be many similar bugs in the Python core end extensions. Adding
incref/decref in
Serhiy Storchaka added the comment:
New changeset f42a06ba279c916fb67289e47f9bc60dc5dee4ee by Serhiy Storchaka in
branch 'main':
bpo-13236: Flush the output stream more often in unittest (GH-29864)
https://github.com/python/cpython/commit/f42a06ba279c916fb67289e47f9bc6
Serhiy Storchaka added the comment:
New changeset d15cdb2f32f572ce56d7120135da24b9fdce4c99 by Serhiy Storchaka in
branch 'main':
bpo-27946: Fix possible crash in ElementTree.Element (GH-29915)
https://github.com/python/cpython/commit/d15cdb2f32f572ce56d7120135da24
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 is (snip)?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue45987>
___
___
Python-bugs-list m
Serhiy Storchaka added the comment:
What is it about? The first message is by Guido, but not this message nor the
title does not give me any idea what is it about.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
New changeset 60c320c38e4e95877cde0b1d8562ebd6bc02ac61 by Serhiy Storchaka in
branch 'main':
bpo-37295: Optimize math.comb() and math.perm() (GH-29090)
https://github.com/python/cpython/commit/60c320c38e4e95877cde0b1d8562eb
Serhiy Storchaka added the comment:
New changeset 1fd4de5bddbbf2a97cdbac4d298c89e1156bdc6c by Serhiy Storchaka in
branch 'main':
bpo-45662: Fix the repr of InitVar with a type alias to the built-in class
(GH-29291)
https://github.com/python/cpyt
Serhiy Storchaka added the comment:
New changeset 446be166861b2f08f87f74018113dd98ca5fca02 by Serhiy Storchaka in
branch 'main':
bpo-45663: Fix is_dataclass() for dataclasses which are subclasses of
types.GenericAlias (GH-29294)
https://github.com/python/cpyt
Serhiy Storchaka added the comment:
New changeset 2b318ce1c988b7b6e3caf293d55f289e066b6e0f by Serhiy Storchaka in
branch 'main':
bpo-45664: Fix resolve_bases() and new_class() for GenericAlias instance as a
base (GH-29298)
https://github.com/python/cpyt
Serhiy Storchaka added the comment:
New changeset c0521fe49fd75e794a38a216813658ab40185834 by Alex Waygood in
branch 'main':
bpo-45840: Improve cross-references in the data model documentation (GH-29633)
https://github.com/python/cpython/commit/c0521fe49fd75e794a38a216813658
Change by Serhiy Storchaka :
--
pull_requests: +28153
pull_request: https://github.com/python/cpython/pull/29929
___
Python tracker
<https://bugs.python.org/issue13
Serhiy Storchaka added the comment:
To normalize negative 0.0 to 0.0 you can just add 0.0. It will work with any
method of converting floats to string, there is no need to change all
formatting specifications.
>>> x = -0.0
>>> x
-0.0
>>> x + 0.0
0.0
-
Serhiy Storchaka added the comment:
Thank you Guido for clarification. I have found that post:
https://mail.python.org/archives/list/core-mentors...@python.org/thread/YGSMPKP7G3HO73ISEQZFAWPPGCOA3JYZ/
I agree that it is worth to implement newterm. In particular it would be useful
in tests
Change by Serhiy Storchaka :
--
assignee: -> serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue45934>
___
___
Python-bugs-list mailing list
Un
Change by Serhiy Storchaka :
--
nosy: +graingert, lukasz.langa, ncoghlan
___
Python tracker
<https://bugs.python.org/issue45996>
___
___
Python-bugs-list mailin
Serhiy Storchaka added the comment:
Both JSON Lines (https://jsonlines.org/) and Newline Delimited JSON
(http://ndjson.org/) formats require that Each Line is a Valid JSON Value.
If you want to ignore empty lines you can filter them out with `sed /^$/d`.
--
nosy: +serhiy.storchaka
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue46000>
___
___
Python-bugs-list mailing list
Unsub
Serhiy Storchaka added the comment:
Well, it makes sense for negative zero produced by rounding.
But if we add a special support for this case, it would be useful to have some
control on the type of rounding. Currently floats are rounded to the nearest
decimal number, but in some cases it
Serhiy Storchaka added the comment:
New changeset 8db06528cacc94e67eb1fb2e4c2acc061a515671 by James Gerity in
branch 'main':
bpo-46001: Change OverflowError to RecursionError in JSON library docstrings
(GH-29943)
https://github.com/python/cpyt
Serhiy Storchaka added the comment:
Thank you for your contribution James!
--
versions: +Python 3.10, Python 3.9
___
Python tracker
<https://bugs.python.org/issue46
2101 - 2200 of 25874 matches
Mail list logo