Serhiy Storchaka added the comment:
Yes, it is syntactically correct. It can even make sense. But the meaning is
different from "except (AError, BError)". If it looks confusing to you, it is a
work of linters to warn about misleading or suspi
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 e09dd8aafd6f9aef03945c417267806d47084a5d by Serhiy Storchaka in
branch '3.9':
[3.9] bpo-45060: Get rid of few uses of the equality operators with None
(GH-28087). (GH-28093)
https://github.com/python/cpython/commit
Serhiy Storchaka added the comment:
New changeset 3d56272e4ecaef9f38c1f48430364701d34b3ee4 by Miss Islington (bot)
in branch '3.10':
bpo-45057: Simplify RegressionTestResult (GH-28081) (GH-28101)
https://github.com/python/cpython/commit/3d56272e4ecaef9f38c1f48430364701d34b3ee4
Serhiy Storchaka added the comment:
New changeset e527f79fa8b472dd534fc360e998fe8213e6471e by Serhiy Storchaka in
branch '3.9':
[3.9] bpo-45057: Simplify RegressionTestResult (GH-28081) (GH-28103)
https://github.com/python/cpython/commit/e527f79fa8b472dd534fc360e998fe8213e6471e
Serhiy Storchaka added the comment:
$ touch тест
$ ./python Tools/scripts/md5sum.py тест
d41d8cd98f00b204e9800998ecf8427e тест
$ LC_ALL=uk_UA.koi8u PYTHONIOENCODING=koi8-u ./python Tools/scripts/md5sum.py
тест
d41d8cd98f00b204e9800998ecf8427e тест
$ LC_ALL=uk_UA.koi8u PYTHONIOENCODING=utf-8
Change by Serhiy Storchaka :
--
pull_requests: +26546
pull_request: https://github.com/python/cpython/pull/28103
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
New changeset 2b76a5322fdf71d62b531fd765085f96f981c244 by Serhiy Storchaka in
branch 'main':
bpo-45057: Simplify RegressionTestResult (GH-28081)
https://github.com/python/cpython/commit/2b76a5322fdf71d62b531fd765085f96f981c244
Serhiy Storchaka added the comment:
New changeset 70ccee418d1f9d34ed15cfe7104221f9cfd27d03 by Irit Katriel in
branch 'main':
bpo-45039: Consistently use ADDOP_LOAD_CONST in compiler rather than ADDOP_O(c,
LOAD_CONST,...) (GH-28015)
https://github.com/python/cpython/commit
Change by Serhiy Storchaka :
--
pull_requests: +26536
pull_request: https://github.com/python/cpython/pull/28093
___
Python tracker
<https://bugs.python.org/issue45
Change by Serhiy Storchaka :
--
pull_requests: +26535
pull_request: https://github.com/python/cpython/pull/28092
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
New changeset 3c65457156d87e55010507d616b4eecb7a02883d by Serhiy Storchaka in
branch 'main':
bpo-45060: Get rid of few uses of the equality operators with None (GH-28087)
https://github.com/python/cpython/commit/3c65457156d87e55010507d616b4eecb7a02883d
Serhiy Storchaka added the comment:
Pickling Patch can be useful in multiprocessing, you can pass the Patch
argument to function executed in other process. It can also be useful if you
save the state of your program and restore it at the next start. In both cases
you pickle and unpickle
Serhiy Storchaka added the comment:
I get the correct result (a ValueError traceback) in 3.9.6, I get a crash in
3.9.0. It was a bug in 3.9.0 which is now fixed.
The syntax is legal.
--
nosy: +serhiy.storchaka
___
Python tracker
<ht
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +26530
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28087
___
Python tracker
<https://bugs.python.org/issu
New submission from Serhiy Storchaka :
There are few uses of operators "==" and "!=" with None in the stdlib (against
more than 8000 uses of "is" and "is not"). It is very uncommon writing,
contradicts PEP 8, and is not safe in general.
One bug was f
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +26529
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28086
___
Python tracker
<https://bugs.python.org/issu
New submission from Serhiy Storchaka :
While searching for use the equality operator with None I found the possible
use of "==" instead of "=" (assignment) in Lib/idlelib/idle_test/test_macosx.py.
for platform, types in ('darwin', alltypes)
Serhiy Storchaka added the comment:
I think that you mean that PosixPath will be converted to PurePosixPath on
Windows, and WindowsPath will be converted to PureWindowsPath on Posix.
In can be easily achieved by making alias PosixPath=PurePosixPath on Windows
and WindowsPath=PureWindowsPath
Serhiy Storchaka added the comment:
PyNumber_Index() now always returns an instance of int.
- If the argument is a direct int then return it.
- If it is a subclass of int then return a direct int copy.
- Otherwise call type(obj).__index__(obj)
- If a direct int, return it
- If a subclass
Change by Serhiy Storchaka :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> unittest subTest does not call addFailure
___
Python tracker
<https://bugs.python
Serhiy Storchaka added the comment:
PR 28082 is a draft that implements this idea. Skipped and failed (but not
successfully passed) subtests are now reported separately, as a character (sFE)
or a line ("skipped", "FAIL", "ERROR"). The description of the su
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +26525
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/28082
___
Python tracker
<https://bugs.python.org/issu
Change by Serhiy Storchaka :
--
versions: +Python 3.10, Python 3.11, Python 3.9
___
Python tracker
<https://bugs.python.org/issue45057>
___
___
Python-bugs-list m
Serhiy Storchaka added the comment:
RegressionTestResult was introduced in issue34582.
--
nosy: +ezio.melotti, michael.foord, rbcollins, steve.dower, vstinner
___
Python tracker
<https://bugs.python.org/issue45
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +26524
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28081
___
Python tracker
<https://bugs.python.org/issu
New submission from Serhiy Storchaka :
RegressionTestResult is a subclass of TextTestResult, but it completely ignores
the TextTestResult function of outputting results and re-implements it. The
problem of this is not only duplicating the code, but that if TextTestResult is
changed
Serhiy Storchaka added the comment:
It may be a bug in the constructor of SharedMemory. It ignores the size
argument on Windows.
--
components: +Library (Lib), Windows
nosy: +davin, paul.moore, pitrou, serhiy.storchaka, steve.dower, tim.golden,
zach.ware
Serhiy Storchaka added the comment:
Test is failing because TESTFN contains now non-ASCII characters.
The path is written to stdout using the default stdout encoding on Windows
(like cp1252), but test searches the path encoded with UTF-8. This test should
fail also on other platforms
Change by Serhiy Storchaka :
--
pull_requests: +26515
pull_request: https://github.com/python/cpython/pull/28071
___
Python tracker
<https://bugs.python.org/issue43
New submission from Serhiy Storchaka :
It is unneeded.
--
nosy: +serhiy.storchaka
resolution: -> rejected
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
Here is the implementation of the second option:
def requires_hashdigest(digestname, openssl=None, usedforsecurity=True):
def decorator(func):
if isinstance(func, type):
setUpClass = func.__dict__.get('setUpClass
Serhiy Storchaka added the comment:
Thank you Nikita.
The difference between the original and the proposed in PR 28060 code is that
in the original code the conditional was tested at the testing time, while in
the proposed code it is tested at the loading time. I do not know what effect
New submission from Serhiy Storchaka :
We do not need a duplicate of function declaration.
--
nosy: +serhiy.storchaka
resolution: -> not a bug
stage: -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
There are currently many resources in internet where you can find examples and
demos on Python. The CPython distribution should not include every piece of
code written by Python learner. You can publish it on GitHab, on StackOverflow,
on more specialized
Serhiy Storchaka added the comment:
Were not subtests proposed as a more flexible replacement of parametrized
tests? I think that every subtest should be counted as a separate test case: in
verbose mode it should output a separate line and in non-verbose mode it should
output a separate
Change by Serhiy Storchaka :
--
nosy: +lemburg, p-ganssle
___
Python tracker
<https://bugs.python.org/issue35741>
___
___
Python-bugs-list mailing list
Unsub
Serhiy Storchaka added the comment:
See issue41620 for run() returning None.
--
dependencies: +Python Unittest does not return results object when the test is
skipped
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue36
Change by Serhiy Storchaka :
--
pull_requests: -14706
___
Python tracker
<https://bugs.python.org/issue36674>
___
___
Python-bugs-list mailing list
Unsubscribe:
Serhiy Storchaka added the comment:
Since you always can raise a SkipTest in setUpClass() and setUpModule() and
changing skipTest() can break existing code (for example the code which calls
cls.skipTest(None, reason) for some strange reasons), I think that it is not
worth to change
Serhiy Storchaka added the comment:
Opened issue45046 for completely different approach to this problem.
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue15
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +26490
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28045
___
Python tracker
<https://bugs.python.org/issu
New submission from Serhiy Storchaka :
Methods setUp() and tearDown() of TestClass allow to add some code executed
before and after every test method. In many cases addCleanup() is more
convenient than tearDown() -- you do not need to keep data for cleaning up as
TestCase attributes
Serhiy Storchaka added the comment:
In what case the day field is three characters long? Could you show an example?
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
Microbenchmarks show some speed up:
Iterating large range:
$ ./python -m timeit -s 'r = range(0, 10**20, 3**35)' 'list(r)'
Before: 2000 loops, best of 5: 199 usec per loop
After: 2000 loops, best of 5: 113 usec per loop
Unpickling:
$ ./python -m timeit
Serhiy Storchaka added the comment:
New changeset 330aaee39cbc556be01534b1dbf65d20f04c by Serhiy Storchaka in
branch '3.9':
[3.9] bpo-25130: Add calls of gc.collect() in tests to support PyPy (GH-28005).
(GH-28028)
https://github.com/python/cpython/commit
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +26475
stage: test needed -> patch review
pull_request: https://github.com/python/cpython/pull/28030
___
Python tracker
<https://bugs.python.org/issu
Change by Serhiy Storchaka :
--
pull_requests: +26474
pull_request: https://github.com/python/cpython/pull/28028
___
Python tracker
<https://bugs.python.org/issue25
Change by Serhiy Storchaka :
--
pull_requests: +26473
pull_request: https://github.com/python/cpython/pull/28027
___
Python tracker
<https://bugs.python.org/issue25
Serhiy Storchaka added the comment:
New changeset 2a8127cafe1d196f858a3ecabf5f1df3eebf9a12 by Serhiy Storchaka in
branch 'main':
bpo-25130: Add calls of gc.collect() in tests to support PyPy (GH-28005)
https://github.com/python/cpython/commit/2a8127cafe1d196f858a3ecabf5f1df3eebf9a12
Serhiy Storchaka added the comment:
New changeset dab74d68e3f8391cb4b404b397ab80e2e0188d1f by Serhiy Storchaka in
branch '3.9':
[3.9] bpo-25130: Make SQLite tests more compatible with PyPy (GH-28021)
(GH-28023)
https://github.com/python/cpython/commit
Change by Serhiy Storchaka :
--
priority: normal -> high
___
Python tracker
<https://bugs.python.org/issue45042>
___
___
Python-bugs-list mailing list
Un
New submission from Serhiy Storchaka :
Here is a list of multiprocessing tests which are run in 3.8 but are not found
in 3.9+:
OtherTest.test_answer_challenge_auth_failure
OtherTest.test_deliver_challenge_auth_failure
TestInitializers.test_manager_initializer
Change by Serhiy Storchaka :
--
pull_requests: +26469
pull_request: https://github.com/python/cpython/pull/28023
___
Python tracker
<https://bugs.python.org/issue25
Serhiy Storchaka added the comment:
New changeset 07d3d54f4e84b1259b800884b202701f69e408d8 by Serhiy Storchaka in
branch 'main':
bpo-25130: Make SQLite tests more compatible with PyPy (GH-28021)
https://github.com/python/cpython/commit/07d3d54f4e84b1259b800884b202701f69e408d8
Change by Serhiy Storchaka :
--
pull_requests: +26467
pull_request: https://github.com/python/cpython/pull/28021
___
Python tracker
<https://bugs.python.org/issue25
Serhiy Storchaka added the comment:
If we are going to move docstring out of co_consts, I would make it a code
object attribute rather than argument of MAKE_FUNCTION. It saves time on
function creation.
Most functions do not change docstring after creation. It is the same as code
docstring
Serhiy Storchaka added the comment:
New changeset 1046cd06b0e2f20b3be93de83d49b684956af98d by Serhiy Storchaka in
branch '3.9':
[3.9] bpo-25130: Make unit-test about restricting the maximum number of nested
blocks cpython-only (GH-28002) (GH-28017)
https://github.com/python/cpython/commit
Serhiy Storchaka added the comment:
New changeset 779b9aef4fb2750f57ce07f0efbc8ce8406e43ab by Miss Islington (bot)
in branch '3.10':
bpo-25130: Make unit-test about restricting the maximum number of nested blocks
cpython-only (GH-28002) (GH-28016)
https://github.com/python/cpython/commit
Change by Serhiy Storchaka :
--
pull_requests: +26462
pull_request: https://github.com/python/cpython/pull/28017
___
Python tracker
<https://bugs.python.org/issue25
Serhiy Storchaka added the comment:
New changeset eb263f9a356f5c5f21b8d5ce20bac92f31c40cad by Carl Friedrich
Bolz-Tereick in branch 'main':
bpo-25130: Make unit-test about restricting the maximum number of nested blocks
cpython-only (GH-28002)
https://github.com/python/cpython/commit
Serhiy Storchaka added the comment:
I do not know. There are no issue numbers in changesets which removed them.
--
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
I do not think this should be included in the Tkinter library.
As for demos, there were Tkinter demos in 2.7 (Demo/tkinter), but they were
removed.
--
___
Python tracker
<https://bugs.python.org/issue45
Change by Serhiy Storchaka :
--
pull_requests: +26448
pull_request: https://github.com/python/cpython/pull/28006
___
Python tracker
<https://bugs.python.org/issue43
Serhiy Storchaka added the comment:
There are several other bugs in the code for cleaning up classes and modules:
* Functions registered with addClassCleanup() are not called if tearDownClass
is set to None or its look up raises AttributeError.
* Buffering in TestResult blows up when
Change by Serhiy Storchaka :
--
pull_requests: +26447
pull_request: https://github.com/python/cpython/pull/28005
___
Python tracker
<https://bugs.python.org/issue25
Serhiy Storchaka added the comment:
Unfortunately Martin's comments are not available now, after shutting down the
Rietveld service.
Here is a new PR which contains extraction of PyPy changes related to calling
gc.collect() for 3.8. I removed changes which look specific for PyPy and left
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +26443
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/28000
___
Python tracker
<https://bugs.python.org/issu
New submission from Serhiy Storchaka :
>>> it = iter(range(2**63-10, 2**63-1, 10))
>>> it.__reduce__()
(, (range(9223372036854775798, -9223372036854775808,
10),), 0)
>>> import pickle
>>> it2 = pickle.loads(pickle.dumps(it))
>>>
Serhiy Storchaka added the comment:
I get different result:
>>> app.quit
>>> help(app.quit)
Help on Button in module tkinter object:
class Button(Widget)
| Button(master=None, cnf={}, **kw)
|
| Button widget.
|
...
--
nosy:
Serhiy Storchaka added the comment:
step can be negative. So the condition should be more complex: ((r->stop > 0) ?
(result < r->stop) : (result > r->stop)). And it would look much more complex
for longrangeiterobject.
--
Serhiy Storchaka added the comment:
Currently the range iterator contains four integers: index, start, step and
len. On iteration index is increased until achieve len, the result is
calculated as start+index*step.
In the proposed PR the range iterator contains only three integers: index
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +26433
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27986
___
Python tracker
<https://bugs.python.org/issu
New submission from Serhiy Storchaka :
The proposed PR provides more compact implementation of the range iterator. It
consumes less memory and produces smaller pickles. It is presumably faster
because it performs simpler arithmetic operations on iteration (no
multiplications
Serhiy Storchaka added the comment:
I do not know why asyncio.events._get_running_loop was patched in
FunctionalTestCaseMixin.
--
nosy: +lukasz.langa, pablogsal
priority: normal -> release blocker
type: -> behavior
versions: +Python 3.10, Python 3.11, Pyth
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +26415
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27968
___
Python tracker
<https://bugs.python.org/issu
Change by Serhiy Storchaka :
--
nosy: +serhiy.storchaka
title: tests fail when using pure-python instead of _asycio -> tests fail when
using pure-python instead of _asyncio
___
Python tracker
<https://bugs.python.org/issu
Change by Serhiy Storchaka :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.11
___
Python tracker
<https://bugs.python.or
Serhiy Storchaka added the comment:
New changeset ea39933b4b76da35874be79f2384e24b38c37351 by Miss Islington (bot)
in branch '3.10':
bpo-45003: Change __div__ to __truediv__ in py3 language reference. (GH-27951)
(GH-27963)
https://github.com/python/cpython/commit
Serhiy Storchaka added the comment:
New changeset 46970fdd8ddc18823519d1e1c57136f6bc2a8dac by Miss Islington (bot)
in branch '3.9':
bpo-45003: Change __div__ to __truediv__ in py3 language reference. (GH-27951)
(GH-27962)
https://github.com/python/cpython/commit
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +26412
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27965
___
Python tracker
<https://bugs.python.org/issu
Serhiy Storchaka added the comment:
It was kept in the previous clean up in issue23641 because I had doubts. But
now I do not see reasons to keep it. Rather keeping it can confuse users.
--
___
Python tracker
<https://bugs.python.org/issue45
New submission from Serhiy Storchaka :
Special method __div__ was used in Python 2, but is not used in Python 3. I
think it can be removed from the list of supported special methods in
unittest.mock.
--
components: Library (Lib)
messages: 400314
nosy: michael.foord, serhiy.storchaka
Change by Serhiy Storchaka :
--
pull_requests: +26411
pull_request: https://github.com/python/cpython/pull/27964
___
Python tracker
<https://bugs.python.org/issue45
Serhiy Storchaka added the comment:
New changeset 806e25fd3173a80021e6df87b81263b5f6056f38 by Objectivitix in
branch 'main':
bpo-45003: Change __div__ to __truediv__ in py3 language reference. (GH-27951)
https://github.com/python/cpython/commit/806e25fd3173a80021e6df87b81263b5f6056f38
Serhiy Storchaka added the comment:
https://github.com/python/cpython
--
nosy: +serhiy.storchaka
___
Python tracker
<https://bugs.python.org/issue45003>
___
___
Serhiy Storchaka added the comment:
New changeset 23384a1749359f0ae7aaae052073d44b59e715a1 by Ken Jin in branch
'main':
bpo-44524: Don't modify MRO when inheriting from typing.Annotated (GH-27841)
https://github.com/python/cpython/commit/23384a1749359f0ae7aaae052073d44b59e715a1
Serhiy Storchaka added the comment:
New changeset bb21e28fd08f894ceff2405544a2f257d42b1354 by Ammar Askar in branch
'main':
bpo-34990: Treat the pyc header's mtime in compileall as an unsigned int
(GH-19708)
https://github.com/python/cpython/commit/bb21e28fd08f894ceff2405544a2f257d42b1354
Change by Serhiy Storchaka :
--
status: open -> pending
___
Python tracker
<https://bugs.python.org/issue38912>
___
___
Python-bugs-list mailing list
Un
Change by Serhiy Storchaka :
--
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> Resource warnings in test_subprocess
___
Python tracker
<https://bugs.python
Serhiy Storchaka added the comment:
No, it cannot be fixed in marshal itself.
s = {("string", 1), ("string", 2), ("string", 3)}
All tuples contain references to the same string. The first serialized tuple
will contain serialization of the string, all other will
Serhiy Storchaka added the comment:
Should getattr() normalize attribute name? If no, it will produce surprises
further along the way. If yes, it will add significant overhead.
Even star-import can get significant impact.
--
nosy: +serhiy.storchaka
Change by Serhiy Storchaka :
--
keywords: +patch
pull_requests: +26362
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/27904
___
Python tracker
<https://bugs.python.org/issu
New submission from Serhiy Storchaka :
test_null_strings in Modules/_testcapimodule.c was initially added in
7580146b5c7025976f0907a9893e01dc3d3d3457 for testing PyObject_Str(NULL) and
PyObject_Unicode(NULL). PyObject_Unicode() was removed in 3.0, so now the test
calls PyObject_Str(NULL
Serhiy Storchaka added the comment:
Defining complex.__complex__ and bytes.__bytes__ would not solve anything,
because
>>> issubclass(int, SupportsComplex)
False
>>> issubclass(float, SupportsComplex)
False
>>> issubclass(bytearray, SupportsBytes)
Fals
Serhiy Storchaka added the comment:
If the zipped file was created by zipfile module of Python, it is a bug. Could
you reproduce the sequence of actions that creates such broken archive?
--
___
Python tracker
<https://bugs.python.org/issue41
Serhiy Storchaka added the comment:
It is not a bug in archivers, it is just a broken archive. The ZIP archive
contains a central directory which lists all files in the archive, so the
archiver can just read the central directory without reading all archive to get
the list of files
Change by Serhiy Storchaka :
--
versions: +Python 3.11 -Python 3.8
___
Python tracker
<https://bugs.python.org/issue43913>
___
___
Python-bugs-list mailin
Serhiy Storchaka added the comment:
Functions registered with TestCase.addClassCleanup are called because TestCase
has default implementation of tearDownClass. But you can suppress it by setting
tearDownClass = None. So there is a similar issue with class cleanup functions.
--
nosy
Serhiy Storchaka added the comment:
New changeset b1db308c6114bb18c06656c94c0ffa73ba954977 by andrei kulakov in
branch 'main':
bpo-41322: Add unit tests for deprecation of test return values (GH-27846)
https://github.com/python/cpython/commit/b1db308c6114bb18c06656c94c0ffa73ba954977
1001 - 1100 of 25750 matches
Mail list logo