[issue45212] Dangling threads in skipped tests in test_socket

2021-09-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +26820 pull_request: https://github.com/python/cpython/pull/28408 ___ Python tracker <https://bugs.python.org/issue45

[issue45212] Dangling threads in skipped tests in test_socket

2021-09-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +26821 pull_request: https://github.com/python/cpython/pull/28409 ___ Python tracker <https://bugs.python.org/issue45

[issue45230] Something wrong when Calculate "3==3 is not True"

2021-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: No, it is a feature. Python allows you to chain comparison operations, so you can write 0 < x <= 10 which is equivalent to (0 < x) and (x <= 10). And "is" is a comparison operation. So `3==3 is not True` is equivalent to `(3=

[issue5846] Deprecate obsolete functions in unittest

2021-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b2b035a949eff1dc54b5bafe2bc9ce72b4d24438 by Serhiy Storchaka in branch 'main': bpo-5846: Fix deprecations for obsolete unittest functions and add tests. (GH-28382) https://github.com/python/cpyt

[issue5846] Deprecate obsolete functions in unittest

2021-09-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.11 -Python 3.4 ___ Python tracker <https://bugs.python.org/issue5846> ___ ___ Python-bugs-list mailin

[issue5846] Deprecate obsolete functions in unittest

2021-09-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.o

[issue45212] Dangling threads in skipped tests in test_socket

2021-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset ce59ac93626004894c2b291ec599a36cfa9fb0be by Serhiy Storchaka in branch '3.10': [3.10] bpo-45212: Fix dangling threads in skipped tests in test_socket (GH-28361) (GH-28409) https://github.com/python/cpyt

[issue45212] Dangling threads in skipped tests in test_socket

2021-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 10c3cf78518f4b31e1527c2795694b1bcb092696 by Serhiy Storchaka in branch '3.9': [3.9] bpo-45212: Fix dangling threads in skipped tests in test_socket (GH-28361) (GH-28408) https://github.com/python/cpyt

[issue45212] Dangling threads in skipped tests in test_socket

2021-09-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +26826 pull_request: https://github.com/python/cpython/pull/28414 ___ Python tracker <https://bugs.python.org/issue45

[issue45212] Dangling threads in skipped tests in test_socket

2021-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I have merged the backported PRs because they are blockers for my other PR which is a blocker for my other PR which is a blocker for my other PR and several future PRs. -- ___ Python tracker <ht

[issue45162] Remove old deprecated unittest features

2021-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset b0a6ede3d0bd6fa4ffe413ab4dfc1059201df25b by Serhiy Storchaka in branch 'main': bpo-45162: Remove many old deprecated unittest features (GH-28268) https://github.com/python/cpython/commit/b0a6ede3d0bd6fa4ffe413ab4dfc10

[issue45162] Remove old deprecated unittest features

2021-09-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue44211] Duplicate '.bmp' key in mimetypes.py, maps to both 'image/bmp' and 'image/x-ms-bmp'

2021-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is not clear whether we want to backport this change. -- ___ Python tracker <https://bugs.python.org/issue44211> ___ ___

[issue45187] Some tests in test_socket are not run

2021-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 0f4449ecb0d678984b1343d60c070dcb1bd62e56 by Ɓukasz Langa in branch '3.9': [3.9] bpo-45187: Collect test_socket tests using unittest (GH-28317) (GH-28413) https://github.com/python/cpython/commit/0f4449ecb0d678984b1343d60c070d

[issue45228] Stack buffer overflow in parsing J1939 network address

2021-09-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue5846] Deprecate obsolete functions in unittest

2021-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It is an internal function. We can remove it without deprecation. -- ___ Python tracker <https://bugs.python.org/issue5

[issue10611] sys.exit() in a test causes a test run to die

2021-09-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka nosy_count: 4.0 -> 5.0 pull_requests: +26829 pull_request: https://github.com/python/cpython/pull/28180 ___ Python tracker <https://bugs.python.org/issu

[issue10611] sys.exit() in a test causes a test run to die

2021-09-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: -26829 ___ Python tracker <https://bugs.python.org/issue10611> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45212] Dangling threads in skipped tests in test_socket

2021-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 54a1760cde7bb01e5574734c389c0746762218fd by Serhiy Storchaka in branch 'main': bpo-45212: Add a comment for time.sleep() in tests (GH-28414) https://github.com/python/cpython/commit/54a1760cde7bb01e5574734c389c07

[issue45212] Dangling threads in skipped tests in test_socket

2021-09-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45187] Some tests in test_socket are not run

2021-09-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45187] Some tests in test_socket are not run

2021-09-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +26834 pull_request: https://github.com/python/cpython/pull/28422 ___ Python tracker <https://bugs.python.org/issue45

[issue45187] Some tests in test_socket are not run

2021-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 51ebb7f4f5e9bdcf8279a1d91be9569706f6bead by Serhiy Storchaka in branch 'main': bpo-45187: Fix dangling threads in test_socket.CreateServerFunctionalTest (GH-28422) https://github.com/python/cpyt

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Zachary, I almost forgot about that issue. The goal of this issue is to make regrtests using test discovery instead of manually composed lists of test classes. Of course it requires that tests should be discoverable. And most of them already are

[issue38063] Modify test_socket.py to use unittest test discovery

2021-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I has merged similar PR in issue45187. Although it required to fix some existing bugs first. -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue38

[issue16968] Fix test discovery for test_concurrent_futures.py

2021-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: test_concurrent_futures was made discoverable by Victor Stinner in issue37421. It used tearDownModule() to run threading_cleanup() and reap_children(). -- status: open -> pending ___ Python tracker <

[issue14408] Support ./python -m unittest in test_socket

2021-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It has been done in issue45187. The problem with reaping threads was solved by using setUpModule() and addModuleCleanup(). Matt's patch contains also replacing calls of concrete class __init__s with using super(). It can be applied. --

[issue45187] Some tests in test_socket are not run

2021-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 6c50f23ae085ec66f320a26a3f0a6c60d7f2b29d by Miss Islington (bot) in branch '3.9': bpo-45187: Fix dangling threads in test_socket.CreateServerFunctionalTest (GH-28422) (GH-28424) https://github.com/python/cpyt

[issue42389] test_multiprocessing: @requires_hashdigest() prevents test discovery

2021-09-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Fixed in issue45042. -- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Many multiprocessing tests are silently skipped since 3.9 ___ Py

[issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls)

2021-09-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +26849 pull_request: https://github.com/python/cpython/pull/28446 ___ Python tracker <https://bugs.python.org/issue36

[issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls)

2021-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: PR 28446 makes TestCase.debug() honoring the skipping decorator. The difference with PR 13180: 1. It does not run setUp() and tearDown() for tests decorated with the skipping decorator, as TestCase.run(). 2. It has the same behavior for tests decorated

[issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls)

2021-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Since the behavior of debug() was different for the following cases: @skip('skipping') def test1(self): pass @othedecorator @skip('skipping') def test2(self): pass def test3(self): self.ski

[issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls)

2021-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset dea59cf88adf5d20812edda330e085a4695baba4 by Serhiy Storchaka in branch 'main': bpo-36674: Honour the skipping decorators in TestCase.debug() (GH-28446) https://github.com/python/cpython/commit/dea59cf88adf5d20812edda330e085

[issue45238] Fix debug() in IsolatedAsyncioTestCase

2021-09-18 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : Currently debug() does not work in IsolatedAsyncioTestCase subclasses. It runs synchronous code (setUp(), tearDown(), synchronous tests and cleanup functions), but does not run any asynchronous code (asyncSetUp(), asyncTearDown(), asynchronous tests and

[issue45238] Fix debug() in IsolatedAsyncioTestCase

2021-09-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +26852 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28449 ___ Python tracker <https://bugs.python.org/issu

[issue36674] "unittest.TestCase.debug" should honour "skip" (and other test controls)

2021-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See issue45238 for debug() in IsolatedAsyncioTestCase. -- ___ Python tracker <https://bugs.python.org/issue36674> ___ ___

[issue45216] Remove redundant information from difflib docstrings

2021-09-18 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- title: Remove redundand information from difflib docstrings -> Remove redundant information from difflib docstrings ___ Python tracker <https://bugs.python.org/issu

[issue45026] More compact range iterator

2021-09-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Iterating large integers: $ ./python -m pyperf timeit -s 'r = range(0, 10**20, 3**35)' 'for i in r: pass' baseline: Mean +- std dev: 223 us +- 10 us PR 27986: Mean +- std dev: 128 us +- 4 us PR 28176: Mean +- std dev: 99.0 us +- 3

[issue45238] Fix debug() in IsolatedAsyncioTestCase

2021-09-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It turned out be more complicated than I expected. We need to keep the even loop after getting exception in debug() for having ability to run doCleanup() etc. The option is to close the even loop in __del__. But we should ensure that it is closed before

[issue30856] unittest.TestResult.addSubTest should be called immediately after subtest finishes

2021-09-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 664448d81f41c5fa971d8523a71b0f19e76cc136 by Serhiy Storchaka in branch 'main': bpo-30856: Update TestResult early, without buffering in _Outcome (GH-28180) https://github.com/python/cpython/commit/664448d81f41c5fa971d8523a71b0f

[issue30856] unittest.TestResult.addSubTest should be called immediately after subtest finishes

2021-09-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 40348acc180580371d25f75f46b27048e35f2435 by Serhiy Storchaka in branch 'main': bpo-45229: Remove test_main in many tests (GH-28405) https://github.com/python/cpython/commit/40348acc180580371d25f75f46b270

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +26856 pull_request: https://github.com/python/cpython/pull/28454 ___ Python tracker <https://bugs.python.org/issue45

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +26857 pull_request: https://github.com/python/cpython/pull/28455 ___ Python tracker <https://bugs.python.org/issue45

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a6241773869b80f2b1cac63f26ba646aa808a8db by Serhiy Storchaka in branch 'main': bpo-45229: Fix setUpModule in test_ssl (GH-28454) https://github.com/python/cpython/commit/a6241773869b80f2b1cac63f26ba64

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-19 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +26858 pull_request: https://github.com/python/cpython/pull/28456 ___ Python tracker <https://bugs.python.org/issue45

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset bedce3538cca3469ac3efc614ef062367cbb2ff1 by Serhiy Storchaka in branch '3.10': [3.10] bpo-45229: Remove test_main in many tests (GH-28405) (GH-28455) https://github.com/python/cpython/commit/bedce3538cca3469ac3efc614ef062

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-19 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 5822ab672a1d26ff1837103c1ed8e4c3c2a42b87 by Serhiy Storchaka in branch '3.9': [3.9] bpo-45229: Remove test_main in many tests (GH-28405) (GH-28456) https://github.com/python/cpython/commit/5822ab672a1d26ff1837103c1ed8e4

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +26866 pull_request: https://github.com/python/cpython/pull/28467 ___ Python tracker <https://bugs.python.org/issue45

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-20 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +26867 pull_request: https://github.com/python/cpython/pull/28468 ___ Python tracker <https://bugs.python.org/issue45

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset a856364cc920d8b16750fd1fadc902efb509754c by Serhiy Storchaka in branch 'main': bpo-45229: Use doctest.DocTestSuite instead of run_doctest (GH-28468) https://github.com/python/cpython/commit/a856364cc920d8b16750fd1fadc902

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset e6ba992288fdbe71aa808cfb6955f6f99da7e349 by Serhiy Storchaka in branch 'main': bpo-45229: Make pickle tests discoverable (GH-28467) https://github.com/python/cpython/commit/e6ba992288fdbe71aa808cfb6955f6

[issue35712] Make NotImplemented unusable in boolean context

2021-09-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Interesting, it is because object().__eq__(object()) returns NotImplemented instead of False. object.__eq__ could return False if arguments have same type (or in some other cases). I think it would not break anything, and it would fix your case. But I am

[issue24076] sum() several times slower on Python 3 64-bit

2021-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What are microbenchmark results for PR 28469 in comparison with the baseline? -- ___ Python tracker <https://bugs.python.org/issue24

[issue45176] Many regtest failures on Windows with non-ASCII account name

2021-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Not only sys.executable. Sources of non-ASCII paths: * sys.executable * __file__ of the stdlib or test modules * the current working directory * the temporary directory The last one is the most common in these failures. Tests fail when a non-ASCII path is

[issue24076] sum() several times slower on Python 3 64-bit

2021-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you. Could you please test PGO builds? -- ___ Python tracker <https://bugs.python.org/issue24076> ___ ___ Python-bug

[issue24076] sum() several times slower on Python 3 64-bit

2021-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you again Stefan. Now no doubts are left. BTW, pyperf gives more stable results. I use it if have any doubts (either the results of timeit are not stable or the difference is less than say 10

[issue45026] More compact range iterator

2021-09-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: length_hint(), not len(). Its cost is included in microbenchmark for list(), where it is followed by iterating 2000 items. Calling operator.length_hint() in Python: $ ./python -m pyperf timeit -s 'it = iter(range(1000)); from operator import length

[issue41203] Replace references to OS X in documentation with macOS

2021-09-22 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +26907 pull_request: https://github.com/python/cpython/pull/28515 ___ Python tracker <https://bugs.python.org/issue41

[issue45256] Remove the usage of the cstack in Python to Python calls

2021-09-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: AFAIK Mark Shannon proposed this idea, but it was rejected. -- nosy: +gvanrossum, serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue45

[issue41203] Replace references to OS X in documentation with macOS

2021-09-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 36122e18148c5b6c78ebce1d36d514fd7cf250f5 by Serhiy Storchaka in branch 'main': bpo-41203: Replace Mac OS X and OS X with macOS (GH-28515) https://github.com/python/cpython/commit/36122e18148c5b6c78ebce1d36d514

[issue41203] Replace references to OS X in documentation with macOS

2021-09-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 1493e1a40d04a048cce9c5080ec47478a4941054 by Miss Islington (bot) in branch '3.10': bpo-41203: Replace Mac OS X and OS X with macOS (GH-28515) (GH-28523) https://github.com/python/cpython/commit/1493e1a40d04a048cce9c5080ec474

[issue41203] Replace references to OS X in documentation with macOS

2021-09-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset f1d5cdef57fea961646c52db7a60d1f110e0eaa6 by Miss Islington (bot) in branch '3.9': bpo-41203: Replace Mac OS X and OS X with macOS (GH-28515) (GH-28524) https://github.com/python/cpython/commit/f1d5cdef57fea961646c52db7a60d1

[issue41203] Replace references to OS X in documentation with macOS

2021-09-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Patrick. We had several PRs for fixing macOS references here and there, they were closed in favor of this larger PR. -- resolution: -> fixed stage: patch review -> resolved status: open -&g

[issue40116] Regression in memory use of shared key dictionaries for "compact dicts"

2021-09-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are several common idioms which do not work well with shared dictionaries. 1. Class attributes as defaults. If most instances of the class have the default value for some attribute, it can be set as the class attribute. It saves memory because most

[issue40346] Add random.BaseRandom to ease implementation of subclasses

2021-09-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Matt, your example works in 3.11. In earlier versions you need to override the __new__ method. -- ___ Python tracker <https://bugs.python.org/issue40

[issue45274] Race condition in Thread._wait_for_tstate_lock()

2021-09-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am not sure that it can be solved at Python level. Possible solutions: * Add a Lock method (or just a builtin function) which acquires and immediately releases the lock, without possibility to interrupt. if lock._blink(block, timeout

[issue45026] More compact range iterator

2021-09-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I do not see any difference in iterating small integers: $ ./python -m pyperf timeit -s 'r = range(1)' 'for i in r: pass' PR 27986: Mean +- std dev: 174 us +- 9 us PR 28176: Mean +- std

[issue45278] RuntimeError on race on weakset concurrent iteration

2021-09-24 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: +Library (Lib) nosy: +fdrake, pitrou, serhiy.storchaka versions: +Python 3.10, Python 3.11, Python 3.9 ___ Python tracker <https://bugs.python.org/issue45

[issue45288] Inspect - Added sort_result parameter on getmembers function.

2021-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: But you will not get them in creation order, even if omit the final sort, because: 1. dir() returns names sorted alphabetically, not in order of creation. 2. Dynamic class attributes are added at the end, and inherited attributes follow attributes defined

[issue37921] Improve zipfile: add support for symlinks

2021-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Adding support of symlinks in ZIP files will make the zipfile module vulnerable to symlink attacks like like with TAR files (see https://en.wikipedia.org/wiki/Tar_(computing)#Duplicates). Until we find a solution to this, adding support of symlinks is

[issue45286] zipfile missing API for links

2021-09-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Improve zipfile: add support for symlinks ___ Python tracker <https://bugs.python

[issue45287] zipfile.is_zipfile returns true for a rar file containing zips

2021-09-25 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> is_zipfile false positives ___ Python tracker <https://bugs.python

[issue45026] More compact range iterator

2021-09-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is nothing in code that could explain a measureable difference in creating the range objects or the range object iterators. And indeed, it is in the range of the standard deviation, so it is non-existent

[issue41994] Refcount issues in import

2021-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: _PyImport_FindExtensionObject is a private API. It was added in 3.3 because import.c and importdl.c needed to share code. Since 3.5 it was only used in import.c, so there is no longer need to expose it. It was removed in 3.10 because there was an issue

[issue24391] Better repr for threading objects

2021-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In the last version of PR 20534, the reprs will be similar to proposed by Larry in msg244958, except that a colon is used to separate an address from status, and keyword names are used for values. It is closer to existing reprs, I'm goi

[issue24391] Better repr for threading objects

2021-09-27 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.11 -Python 3.5, Python 3.6 ___ Python tracker <https://bugs.python.org/issue24391> ___ ___ Python-bugs-list m

[issue45288] Inspect - Added sort_result parameter on getmembers function.

2021-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It depends on what you want to get. In general, it is difficult if interpret your request literally. For example, if you define class A in module a, class B in module b, and class C which inherits from classes A and B in module c, then what members of C

[issue39359] zipfile: add missing "pwd: expected bytes, got str" exception message

2021-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Why do you set the ZipFile.pwd attribute directly? -- ___ Python tracker <https://bugs.python.org/issue39359> ___ ___ Pytho

[issue40346] Add random.BaseRandom to ease implementation of subclasses

2021-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: That you need to override the __new__ method? I don't know whether it is documented specially. But the constructor calls __new__() and then __init__(). If changing the argument in __init__ does not help, it is because it was already proceeded in __

[issue36819] Crash during encoding using UTF-16/32 and custom error handler

2021-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I am working on it, since it is more complex issue, and PR 13134 does not solve it. 1. This bug affects also other codecs implemented in C: ASCII, Latin1, UTF-8, etc. 2. It still crashes in UTF-16/32 encoders if the error handler returns a position less

[issue29971] threading.Lock.acquire() not interruptible on Windows

2021-09-27 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- title: Lock.acquire() not interruptible on Windows -> threading.Lock.acquire() not interruptible on Windows ___ Python tracker <https://bugs.python.org/issu

[issue45288] Inspect - Added sort_result parameter on getmembers function.

2021-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ah, if you only need a module, then just use its __dict__ (or vars()). -- ___ Python tracker <https://bugs.python.org/issue45

[issue36819] Crash during encoding using UTF-16/32 and custom error handler

2021-09-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +26973 pull_request: https://github.com/python/cpython/pull/28593 ___ Python tracker <https://bugs.python.org/issue36

[issue45307] Removal of _PyImport_FindExtensionObject() in 3.10 limits custom extension module loaders

2021-09-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- keywords: +patch pull_requests: +26974 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28594 ___ Python tracker <https://bugs.python.org/issu

[issue45307] Removal of _PyImport_FindExtensionObject() in 3.10 limits custom extension module loaders

2021-09-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Gregory, could you please build Python 3.10 with PR 28594 applied and test whether py2exe and PyOxidizer work well with it? The restored function no longer used in the CPython code, so it is not tested now

[issue45307] Removal of _PyImport_FindExtensionObject() in 3.10 limits custom extension module loaders

2021-09-28 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +pablogsal priority: normal -> release blocker ___ Python tracker <https://bugs.python.org/issue45307> ___ ___ Python-

[issue45316] [C API] Functions not exported with PyAPI_FUNC()

2021-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Agree. We should also review all recently added functions with PyAPI_FUNC(). If they are not intended to be public API, PyAPI_FUNC() should be removed and declarations moved. -- nosy: +serhiy.storchaka

[issue36819] Crash during encoding using UTF-16/32 and custom error handler

2021-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Restricting the returned position to be strictly larger than start would solve the problem with infinite loop and OOM. But this is a different issue. -- ___ Python tracker <https://bugs.python.org/issue36

[issue24391] Better repr for threading objects

2021-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset eed32df5b6b989caf125d829301546db58b529dd by Serhiy Storchaka in branch 'main': bpo-24391: Better reprs for threading objects. (GH-20534) https://github.com/python/cpython/commit/eed32df5b6b989caf125d829301546

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-29 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +26986 pull_request: https://github.com/python/cpython/pull/28615 ___ Python tracker <https://bugs.python.org/issue45

[issue45325] Allow "p" in Py_BuildValue

2021-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There was no much need of this feature. In rare cases when we needed to build a bool in Py_BuildValue (I have found only 2 cases in the stdlib, and one of them is added by me) we use the following idiom: Py_BuildValue("...O...", ..., expr

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-29 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +27006 pull_request: https://github.com/python/cpython/pull/28637 ___ Python tracker <https://bugs.python.org/issue45

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d441437ee71ae174c008c23308b749b91020ba77 by Serhiy Storchaka in branch 'main': bpo-45229: Make datetime tests discoverable (GH-28615) https://github.com/python/cpython/commit/d441437ee71ae174c008c23308b749

[issue45325] Allow "p" in Py_BuildValue

2021-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > What happens if you pass a double, it is stored as a double on the C stack, > and then Py_BuildValue() will read junk data? AFAIK, it is complicated. On old computer primitive compilers just pushed arguments one by one on the stack (in pl

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +27013 pull_request: https://github.com/python/cpython/pull/28645 ___ Python tracker <https://bugs.python.org/issue45

[issue45325] Allow "p" in Py_BuildValue

2021-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > But isn't that risk the same for other formatting parameters? I think that the risk for other formatting parameters is smaller, because you know, that there are different formatting parameters for different integer and floating point types,

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Seems this is not a new bug: $ ./python -m test test_datetime test_datetime -m test_divide_and_round 0:00:00 load avg: 2.36 Run tests sequentially 0:00:00 load avg: 2.36 [1/2] test_datetime 0:00:00 load avg: 2.36 [2/2] test_datetime test test_datetime

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See issue40058 and issue40173. -- dependencies: +Running test_datetime twice fails with: module 'datetime' has no attribute '_divide_and_round', test.support.import_fresh_module fails to correctly block submodules whe

[issue40173] test.support.import_fresh_module fails to correctly block submodules when fresh is specified

2021-09-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.10, Python 3.11 -Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python.org/issue40173> ___ ___ Pytho

<    14   15   16   17   18   19   20   21   22   23   >