Serhiy Storchaka added the comment:
I just encountered this bug after rewriting datetime tests in issue45229. It is
also the cause of issue40058.
Not knowing about this issue I have wrote different patch than Hai Shi. It
makes the code of import_fresh_module() clearer and fixes many other
Change by Serhiy Storchaka :
--
pull_requests: +27020
pull_request: https://github.com/python/cpython/pull/28654
___
Python tracker
<https://bugs.python.org/issue40
New submission from Serhiy Storchaka :
The test and the benchmark for the decimal module are broken in 3.10+.
$ ./python Modules/_decimal/tests/deccheck.py
Traceback (most recent call last):
File "/home/serhiy/py/cpython/Modules/_decimal/tests/deccheck.py", line 50,
in
Serhiy Storchaka added the comment:
It works as intended (please re-read the documentation carefully). It strips
all characters specified in the argument. It strips characters "c" and "p" and
stops before character "u" because "monitorScript_
Serhiy Storchaka added the comment:
New changeset ec4d917a6a68824f1895f75d113add9410283da7 by Serhiy Storchaka in
branch 'main':
bpo-40173: Fix test.support.import_helper.import_fresh_module() (GH-28654)
https://github.com/python/cpython/commit/ec4d917a6a68824f1895f75d113add
Change by Serhiy Storchaka :
--
pull_requests: +27023
pull_request: https://github.com/python/cpython/pull/28657
___
Python tracker
<https://bugs.python.org/issue40
Change by Serhiy Storchaka :
--
pull_requests: +27024
pull_request: https://github.com/python/cpython/pull/28658
___
Python tracker
<https://bugs.python.org/issue40
Serhiy Storchaka added the comment:
New changeset 7873884d4730d7e637a968011b8958bd79fd3398 by Serhiy Storchaka in
branch '3.10':
[3.10] bpo-40173: Fix test.support.import_helper.import_fresh_module()
(GH-28654) (GH-28657)
https://github.com/python/cpyt
Serhiy Storchaka added the comment:
New changeset f7e99c98130a705f88348dde60adb98d5bfd8b98 by Serhiy Storchaka in
branch '3.9':
[3.9] bpo-40173: Fix test.support.import_helper.import_fresh_module()
(GH-28654) (GH-28658)
https://github.com/python/cpyt
Serhiy Storchaka added the comment:
New changeset 993a130d3abe7684dc9c999874b4dd1d8ea55a2a by Serhiy Storchaka in
branch '3.9':
[3.9] bpo-45229: Make datetime tests discoverable (GH-28615). (GH-28645)
https://github.com/python/cpython/commit/993a130d3abe7684dc9c999874b4dd
Serhiy Storchaka added the comment:
_save_and_remove_module in the old code did too much and too little. It tested
that the fresh module is importable, saved the current state of the fresh
module and its submodules and removed the fresh module and its submodules.
Since it tested
Change by Serhiy Storchaka :
--
keywords: +patch
nosy: +serhiy.storchaka
nosy_count: 1.0 -> 2.0
pull_requests: +27026
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28661
___
Python tracker
<https://bugs.p
Change by Serhiy Storchaka :
--
versions: +Python 3.10, Python 3.9
___
Python tracker
<https://bugs.python.org/issue45310>
___
___
Python-bugs-list mailin
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
Fixed in issue40173.
--
nosy: +serhiy.storchaka
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Serhiy Storchaka :
--
pull_requests: +27031
pull_request: https://github.com/python/cpython/pull/28666
___
Python tracker
<https://bugs.python.org/issue45
Change by Serhiy Storchaka :
--
pull_requests: +27032
pull_request: https://github.com/python/cpython/pull/28667
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
New changeset eb4495e8e275c83d691add116c4f2b74e73e3cc8 by Serhiy Storchaka in
branch 'main':
bpo-45310: Fix parrallel shared memory tests (GH-28661)
https://github.com/python/cpython/commit/eb4495e8e275c83d691add116c4f2b
Serhiy Storchaka added the comment:
New changeset 2f205920127bd93eebed044cb1b61834764478ba by Serhiy Storchaka in
branch 'main':
Revert "Revert "bpo-45229: Make datetime tests discoverable (GH-28615)"
(GH-28650)" (GH-28667)
https://gi
Serhiy Storchaka added the comment:
New changeset e9d5cdda1ffa369550a634a3ec220db93433e0f4 by Serhiy Storchaka in
branch '3.9':
Revert "Revert "bpo-45229: Make datetime tests discoverable (GH-28615).
(GH-28645)" (GH-28660)" (GH-28666)
https://gi
Change by Serhiy Storchaka :
--
pull_requests: +27035
pull_request: https://github.com/python/cpython/pull/28670
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
New changeset 4d5d161d2aae41738d28e22bac5e1e08c01394bb by Serhiy Storchaka in
branch '3.9':
[3.9] bpo-45310: Fix parrallel shared memory tests (GH-28661) (GH-28670)
https://github.com/python/cpython/commit/4d5d161d2aae41738d28e22bac5e1e
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 746d648d47d12d16c2afedaeff626fc6aaaf6a46 by Nikita Sobolev in
branch 'main':
bpo-45125: Improves pickling docs and tests for `shared_memory` (GH-28294)
https://github.com/python/cpython/commit/746d648d47d12d16c2afedaeff626f
Serhiy Storchaka added the comment:
I propose an opposite change -- take data known at compile time (name, qualname
and annotations). It will make the code for creating new function smaller and
faster. It is what we want to achieve -- reducing import time, but additionally
it will reduce
Serhiy Storchaka added the comment:
New changeset 0742abdc48886b74ed3b66985a54bb1c32802670 by TAGAMI Yukihiro in
branch 'main':
bpo-45329: Fix freed memory access in pyexpat.c (GH-28649)
https://github.com/python/cpython/commit/0742abdc48886b74ed3b66985a54bb1c32802670
-
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
Can you apply some custom logic by specifying the initializer?
--
components: +asyncio
nosy: +asvetlov, serhiy.storchaka, yselivanov
type: -> enhancement
___
Python tracker
<https://bugs.python.org/issu
Change by Serhiy Storchaka :
--
components: -asyncio
nosy: +bquinlan, pitrou
___
Python tracker
<https://bugs.python.org/issue45339>
___
___
Python-bugs-list m
Serhiy Storchaka added the comment:
> I'm confused by your phrase "take data" -- do you mean remove these? Or wht
> do you propose we do with them?
I thought that function's name and qualname are set in the code that creates a
function instead of copying from the
Serhiy Storchaka added the comment:
There are reasons for this. There is no supported by inspect.signature() syntax
to adequately define the signature of say getattr(). It has one required
parameter and one optional parameter, but the default value of the optional
parameter cannot be
Serhiy Storchaka added the comment:
Hint: you can specify several arguments for multiline code. E.g. timeit -s
"setup1" -s "setup2" "test1" "test2".
> And as a bonus, creating function without docstring is little f
New submission from Serhiy Storchaka :
Some C code in 3.10+ uses literal 2 for the size of the code unit. It should
use sizeof(_Py_CODEUNIT) instead.
1. It is self-documented and allows to distinguish this 2 from other 2
constants.
2. It will help if we change from 16-bit code units to 24
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +27061
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28711
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
New changeset 60b9e040c9cf40e69f42c0008e564458aa0379e8 by Serhiy Storchaka in
branch 'main':
bpo-45355: Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the
code unit (GH-28711)
https://github.com/python/cpyt
Change by Serhiy Storchaka :
--
pull_requests: +27066
pull_request: https://github.com/python/cpython/pull/28718
___
Python tracker
<https://bugs.python.org/issue45
Change by Serhiy Storchaka :
--
pull_requests: +27067
pull_request: https://github.com/python/cpython/pull/28720
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
open() does not create parent directories either. And no any function in the
stdlib which creates a file does it. It would be rather error-prone if they do,
because you can create a file at wrong place.
So just create a directory if you need to, and let
New submission from Serhiy Storchaka :
It was a part of the original patch for issue27129.
As well as in jumping instructions we can use instruction offsets instead of
bytes offset in co_lnotab. It increases the range of offsets which can be
encoded with a single byte, and therefore reduce
Serhiy Storchaka added the comment:
New changeset 252b7bcb236dc261f3af1275bc90f9a303d9648f by Serhiy Storchaka in
branch 'main':
bpo-45355: More use of sizeof(_Py_CODEUNIT) (GH-28720)
https://github.com/python/cpython/commit/252b7bcb236dc261f3af1275bc90f9
Change by Serhiy Storchaka :
--
pull_requests: +27068
pull_request: https://github.com/python/cpython/pull/28721
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
New changeset b5499784ec0aa24c8f0d91f2317cc53b7743ada9 by Serhiy Storchaka in
branch '3.10':
[3.10] bpo-45355: Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of
the code unit (GH-28711). (GH-28718)
https://github.com/python/cpyt
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +27069
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28722
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
New changeset 1670d590fa6b817e0d3f091ea12aee9ae744875a by Serhiy Storchaka in
branch '3.10':
[3.10] bpo-45355: More use of sizeof(_Py_CODEUNIT) (GH-28720). (GH-28721)
https://github.com/python/cpython/commit/1670d590fa6b817e0d3f091ea12aee
Serhiy Storchaka added the comment:
You can call __enter__ in the initializer. Seems there is no easy way to call
__exit__ at shutting down the thread, perhaps something like per-thread atexit
could help. As an example, you can save the context manager in thread locals
and manually
Change by Serhiy Storchaka :
--
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Serhiy Storchaka :
--
title: help() on operator precedence has confusing entries "avait" "x" and
"not" "x" -> help() on operator precedence has confusing entries "await" "x"
Serhiy Storchaka added the comment:
This looks like some Sphinx bug.
In Python 3.8, using Sphinx:
>>> from sphinx.pycode import ast
>>> ast.unparse(ast.parse("('Arial', 8, 'normal')", 'eval').body)
"'Arial', 8, '
Serhiy Storchaka added the comment:
Seems it was fixed in Sphinx a year ago:
https://github.com/sphinx-doc/sphinx/pull/8265. Maybe we need to update the
Sphinx version (but it can introduce new incompatibilities).
--
___
Python tracker
<ht
Change by Serhiy Storchaka :
--
nosy: +rhettinger
___
Python tracker
<https://bugs.python.org/issue45398>
___
___
Python-bugs-list mailing list
Unsubscribe:
Serhiy Storchaka added the comment:
What is the output of the following command?
./python -m sysconfig | grep HAVE_STROPTS_H
Also, is there the stropts.h file on your system and where?
dlocate stropts.h
locate stropts.h
--
nosy: +serhiy.storchaka
Serhiy Storchaka added the comment:
jg, please remove the copy of other message when answer. It makes painfully
difficult reading the discussion for visually impaired people.
--
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
I tested with Sphinx 1.5.4, and this issue is gone. It introduces a regression
with some smart quotes (see https://github.com/sphinx-doc/sphinx/issues/9713),
but it is less severe than incorrect rendering of tuples as parameter defaults
Serhiy Storchaka added the comment:
Do Rust and Ruby cache the hash of the string in the string object? If they do
not then the hashing speed is more important to them.
--
___
Python tracker
<https://bugs.python.org/issue29
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +27127
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28808
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
It looks to me that rejecting the null character is just an implementation
artifact. 0 is used both as signalling value for "not set" character parameter
and as the end-of-line character in the state automata. We can use different
values outs
Serhiy Storchaka added the comment:
In past we could backport some simple documentation fixes to security-only
branches. But currently only the release manager of the corresponded version
has permission to commit to these branches, and we do not want to disturb them
for such minor cause.
I
Serhiy Storchaka added the comment:
I prefer to remove the comment. The format string is a text by its nature,
there is no reason to support arbitrary binary data. Bytes objects are only
supported for compatibility (with Python 2 strings).
--
nosy: +serhiy.storchaka
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue45401>
___
___
Python-bugs-list mailing list
Unsub
Serhiy Storchaka added the comment:
What standard specifies these MIME types?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
It is not defined on my Ubuntu 20.04 either. But stropts.h could be installed
by some Ubuntu package not installed on my computer, or came from some
non-standard source.
On my computer:
$ dlocate stropts.h
manpages-posix-dev: /usr/share/man/man7
Serhiy Storchaka added the comment:
And I have doubts about Py_ADJUST_ERANGE2(). I think that it is used
incorrectly. See issue44970.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue45
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue45416>
___
___
Python-bugs-list mailing list
Unsub
Serhiy Storchaka added the comment:
New changeset b454e8e4df73bc73bc1a6f597431f171bfae8abd by Serhiy Storchaka in
branch 'main':
bpo-27580: Add support of null characters in the csv module. (GH-28808)
https://github.com/python/cpython/commit/b454e8e4df73bc73bc1a6f597431f1
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
There is no bug in this code. The list "temp" contains only 2- and 3-tuples.
PyArg_UnpackTuple() never fails.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.o
Serhiy Storchaka added the comment:
matplotlib is not a part of the standard Python library. Use the corresponding
bug tracker to report issues with matplotlib.
--
nosy: +serhiy.storchaka
resolution: -> third party
stage: -> resolved
status: open -&g
Change by Serhiy Storchaka :
--
components: +Library (Lib)
nosy: +brett.cannon, eric.snow, ncoghlan
type: -> behavior
versions: +Python 3.11
___
Python tracker
<https://bugs.python.org/issu
Change by Serhiy Storchaka :
--
versions: -Python 3.11
___
Python tracker
<https://bugs.python.org/issue45419>
___
___
Python-bugs-list mailing list
Unsub
Serhiy Storchaka added the comment:
New changeset 1a7892414e654aa5c99efa31db767baba7f4a424 by Joongi Kim in branch
'main':
bpo-45416: Fix use of asyncio.Condition() with explicit Lock objects (GH-28850)
https://github.com/python/cpython/commit/1a7892414e654aa5c99efa31db767b
Serhiy Storchaka added the comment:
Seems it introduced a resource warning in tests.
--
___
Python tracker
<https://bugs.python.org/issue45401>
___
___
Pytho
Serhiy Storchaka added the comment:
types.UnionType corresponds to typing._UnionGenericAlias, not typing.Union.
We can make (int | str | T)[dict] returning an instance of types.UnionType
instead of an instance of typing._UnionGenericAlias. But it will be a breaking
change, because typing
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue45356>
___
___
Python-bugs-list mailing list
Unsub
Change by Serhiy Storchaka :
--
status: closed -> open
___
Python tracker
<https://bugs.python.org/issue45401>
___
___
Python-bugs-list mailing list
Unsubscrib
Serhiy Storchaka added the comment:
test_should_not_rollover (test.test_logging.TimedRotatingFileHandlerTest) ...
/home/serhiy/py/cpython/Lib/unittest/case.py:547: ResourceWarning: unclosed
file <_io.TextIOWrapper name='/dev/null' mode='a' encoding='utf-8
Serhiy Storchaka added the comment:
With tracemalloc enabled:
$ ./python -X tracemalloc -m test -v test_logging -m test_should_not_rollover
...
test_should_not_rollover (test.test_logging.TimedRotatingFileHandlerTest) ...
/home/serhiy/py/cpython/Lib/unittest/case.py:547: ResourceWarning
Change by Serhiy Storchaka :
--
pull_requests: +27165
stage: resolved -> patch review
pull_request: https://github.com/python/cpython/pull/28864
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
New changeset 15188b115a2da815556053372c912a81a74be43b by Serhiy Storchaka in
branch 'main':
bpo-45401: Fix a resource warning in test_logging (GH-28864)
https://github.com/python/cpython/commit/15188b115a2da815556053372c912a
Serhiy Storchaka added the comment:
New changeset c7e81fcf9548ab6a0a4828d6f2db9ece9d204826 by Jens Diemer in branch
'main':
bpo-42253: Update xml.dom.minidom.rst (GH-23126)
https://github.com/python/cpython/commit/c7e81fcf9548ab6a0a4828d6f2db9ece9d204826
--
nosy: +serhiy
Serhiy Storchaka added the comment:
New changeset 3d7009e88e0ae516b10d8d3d402cc66e86fb631e by Miss Islington (bot)
in branch '3.10':
bpo-42253: Update xml.dom.minidom.rst (GH-23126) (GH-28874)
https://github.com/python/cpython/commit/3d7009e88e0ae516b10d8d3d402cc6
Serhiy Storchaka added the comment:
New changeset 23528905d48ddfe74a75af2152e96c04b77bf314 by Miss Islington (bot)
in branch '3.9':
bpo-42253: Update xml.dom.minidom.rst (GH-23126) (GH-28875)
https://github.com/python/cpython/commit/23528905d48ddfe74a75af2152e96c
Serhiy Storchaka added the comment:
New changeset faa87f7f3b60f79b9018aaef0efa5e00d82b817b by Miss Islington (bot)
in branch '3.9':
bpo-45401: Fix a resource warning in test_logging (GH-28864) (GH-28873)
https://github.com/python/cpython/commit/faa87f7f3b60f79b9018aaef0efa5e
Serhiy Storchaka added the comment:
New changeset 47a50fe16f9f074d3e6aa85e76502955ed40 by Miss Islington (bot)
in branch '3.10':
bpo-45401: Fix a resource warning in test_logging (GH-28864) (GH-28872)
https://github.com/python/cpython/commit/47a50fe16f9f074d3e6aa85e76
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
type: -> enhancement
versions: +Python 3.10, Python 3.11
___
Python tracker
<https://bugs.python
New submission from Serhiy Storchaka :
New changeset b37dc9b3bc9575adc039c6093c643b7ae5e917e1 by 180909 in branch
'main':
bpo-45441: Update some moved URLs in documentation (GH-28861)
https://github.com/python/cpython/commit/b37dc9b3bc9575adc039c6093c643b7ae5e917e1
-
Serhiy Storchaka added the comment:
sort() is atomic, even if GIL is released during executing custom __lt__. It is
guaranteed that no operations on the list in other threads can affect the
result of sort().
I do not understand what non-atomic you see in x = L[i]. The value of x is
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Serhiy Storchaka :
--
nosy: -180909
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.9
___
Python tracker
<https://bugs.python.or
Change by Serhiy Storchaka :
--
resolution: -> not a bug
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue45456>
___
___
Pyth
Serhiy Storchaka added the comment:
The behavior difference can be eliminated if make func_set_code() calling
func_get_doc().
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
BTW, I think that we spent on issue36521 much more time (especially your time,
Inada-san) than it deserved. In normal case 3~5% would look not impressive. But
I do not see any immediate drawbacks of making this change, and I afraid that
if we do not make
Serhiy Storchaka added the comment:
See also issue22035.
--
___
Python tracker
<https://bugs.python.org/issue45452>
___
___
Python-bugs-list mailing list
Unsub
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue45438>
___
___
Python-bugs-list mailing list
Unsub
Serhiy Storchaka added the comment:
It works as expected:
>>> re.sub(r'\W', '', '½ a', 0, re.ASCII)
'a'
You just passed re.ASCII as the count argument, not as the flags argument.
>>> help(re.sub)
Help on function sub in module re:
s
Serhiy Storchaka added the comment:
shape is a pointer to array of Py_ssize_t of size ndim. array and memoryview do
a trick to avoid memory allocation, but _testbuffer.ndarray allocates it
dynamically in the heap. We can add a small static buffer in Py_buffer to avoid
additional memory
Serhiy Storchaka added the comment:
I agree with Mark. Instead of exposing internal details in low-level API we
should add more high-level API to satisfy concrete needs. It will give us more
freedom of changing internals in future.
--
nosy: +serhiy.storchaka
Serhiy Storchaka added the comment:
The cause is that isinstance(list[int], type) returns True. It can cause bugs
in other parts of the code which test for instance of type. For example:
>>> types.resolve_bases((typing.List[int],))
(, )
>>> types.resolve_bases((list
Serhiy Storchaka added the comment:
ndim is not known before calling PyObject_GetBuffer(), so we will need a new
API which combines PyObject_GetBuffer() and PyBuffer_New().
--
___
Python tracker
<https://bugs.python.org/issue45
Change by Serhiy Storchaka :
--
assignee: -> serhiy.storchaka
versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.8
___
Python tracker
<https://bugs.python.org/issu
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +27228
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28939
___
Python tracker
<https://bugs.python.org/issu
1901 - 2000 of 25874 matches
Mail list logo