[issue45419] DegenerateFiles.Path mismatch to Traversable interface

2021-10-10 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: -Python 3.11 ___ Python tracker <https://bugs.python.org/issue45419> ___ ___ Python-bugs-list mailing list Unsub

[issue45419] DegenerateFiles.Path mismatch to Traversable interface

2021-10-10 Thread Serhiy Storchaka
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

[issue45422] Data 0 cannot be plotted by matplotlib.pyplot just because some data is less than 0. (ContourSet._get_lowers_and_uppers)

2021-10-10 Thread Serhiy Storchaka
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

[issue42034] Unchecked return in Objects/typeobject.c and possible uninitialized variables in cls and new_mro

2021-10-09 Thread Serhiy Storchaka
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

[issue27580] CSV Null Byte Error

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

[issue27580] CSV Null Byte Error

2021-10-09 Thread Serhiy Storchaka
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/b454e8e4df73bc73bc1a6f597431f171bfae8abd

[issue45416] "loop argument must agree with lock" instantiating asyncio.Condition

2021-10-09 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue45416> ___ ___ Python-bugs-list mailing list Unsub

[issue45412] [C API] Remove Py_OVERFLOWED(), Py_SET_ERRNO_ON_MATH_ERROR(), Py_ADJUST_ERANGE1()

2021-10-08 Thread Serhiy Storchaka
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

[issue45404] Undefined I_* macros of stropts.h when building Python 3.10 on Ubuntu: fail to build the fcntl module

2021-10-08 Thread Serhiy Storchaka
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

[issue45411] Add Mimetypes for Subtitle Files

2021-10-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: What standard specifies these MIME types? -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue45

[issue45401] logging TimedRotatingFileHandler must not rename devices like /dev/null

2021-10-08 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker <https://bugs.python.org/issue45401> ___ ___ Python-bugs-list mailing list Unsub

[issue45407] Support buffer protocol for _struct.Struct format argument

2021-10-07 Thread Serhiy Storchaka
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

[issue45393] help() on operator precedence has confusing entries "await" "x" and "not" "x"

2021-10-07 Thread Serhiy Storchaka
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

[issue27580] CSV Null Byte Error

2021-10-07 Thread Serhiy Storchaka
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 valu

[issue27580] CSV Null Byte Error

2021-10-07 Thread Serhiy Storchaka
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

[issue29410] Moving to SipHash-1-3

2021-10-07 Thread Serhiy Storchaka
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

[issue45397] Doc for turtle.write missing the tuple part of the font param in 3.10+

2021-10-07 Thread Serhiy Storchaka
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

[issue45397] Doc for turtle.write missing the tuple part of the font param in 3.10+

2021-10-07 Thread 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

[issue45404] Undefined I_* macros when building 3.10 on Ubuntu?

2021-10-07 Thread Serhiy Storchaka
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

[issue45398] Bugs in set operations in 3.8.10 (detected in Win7)

2021-10-07 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +rhettinger ___ Python tracker <https://bugs.python.org/issue45398> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45397] Doc for turtle.write missing the tuple part of the font param in 3.10+

2021-10-07 Thread Serhiy Storchaka
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

[issue45397] Doc for turtle.write missing the tuple part of the font param in 3.10+

2021-10-07 Thread Serhiy Storchaka
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, 'normal'" For comparison, using builtin

[issue45393] help() on operator precedence has confusing entries "await" "x" and "not" "x"

2021-10-06 Thread Serhiy Storchaka
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"

[issue45368] ~(True) and ~(False) gives incorrect result

2021-10-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45339] concurrent.future.ThreadPoolExecutor should parameterize class used for threads

2021-10-04 Thread Serhiy Storchaka
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

[issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit

2021-10-04 Thread Serhiy Storchaka
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/1670d590fa6b817e0d3f091ea12aee9ae744875a

[issue45363] Use instruction offsets in co_lnotab

2021-10-04 Thread Serhiy Storchaka
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

[issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit

2021-10-04 Thread Serhiy Storchaka
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/cpython/commit

[issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit

2021-10-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +27068 pull_request: https://github.com/python/cpython/pull/28721 ___ Python tracker <https://bugs.python.org/issue45

[issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit

2021-10-04 Thread Serhiy Storchaka
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/252b7bcb236dc261f3af1275bc90f9a303d9648f

[issue45363] Use instruction offsets in co_lnotab

2021-10-04 Thread Serhiy Storchaka
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

[issue45360] xml.etree.ElementTree: add feature in write to create directories also like mkdir -p

2021-10-04 Thread Serhiy Storchaka
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

[issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit

2021-10-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +27067 pull_request: https://github.com/python/cpython/pull/28720 ___ Python tracker <https://bugs.python.org/issue45

[issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit

2021-10-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +27066 pull_request: https://github.com/python/cpython/pull/28718 ___ Python tracker <https://bugs.python.org/issue45

[issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit

2021-10-03 Thread Serhiy Storchaka
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/cpython/commit

[issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit

2021-10-03 Thread Serhiy Storchaka
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

[issue45355] Use sizeof(_Py_CODEUNIT) instead of literal 2 for the size of the code unit

2021-10-03 Thread Serhiy Storchaka
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

[issue36521] Consider removing docstrings from co_consts in code objects

2021-10-03 Thread Serhiy Storchaka
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

[issue45302] 10 built-in functions need non-None .__text_signature__

2021-10-03 Thread Serhiy Storchaka
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

[issue36521] Consider removing docstrings from co_consts in code objects

2021-10-02 Thread Serhiy Storchaka
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 code o

[issue45339] concurrent.future.ThreadPoolExecutor should parameterize class used for threads

2021-10-02 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- components: -asyncio nosy: +bquinlan, pitrou ___ Python tracker <https://bugs.python.org/issue45339> ___ ___ Python-bugs-list m

[issue45339] concurrent.future.ThreadPoolExecutor should parameterize class used for threads

2021-10-02 Thread Serhiy Storchaka
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

[issue45329] pyexpat: segmentation fault when `--with-system-expat` is specified

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

[issue45329] pyexpat: segmentation fault when `--with-system-expat` is specified

2021-10-02 Thread Serhiy Storchaka
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 -- nosy

[issue36521] Consider removing docstrings from co_consts in code objects

2021-10-02 Thread Serhiy Storchaka
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

[issue45125] Improve tests and docs of how `pickle` works with `SharedMemory` obejcts

2021-10-01 Thread Serhiy Storchaka
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/746d648d47d12d16c2afedaeff626fc6aaaf6a46

[issue45310] test_multiprocessing_forkserver: test_shared_memory_basics() failed with FileExistsError: [Errno 17] File exists: '/test01_tsmb'

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

[issue45310] test_multiprocessing_forkserver: test_shared_memory_basics() failed with FileExistsError: [Errno 17] File exists: '/test01_tsmb'

2021-10-01 Thread Serhiy Storchaka
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/4d5d161d2aae41738d28e22bac5e1e08c01394bb

[issue45310] test_multiprocessing_forkserver: test_shared_memory_basics() failed with FileExistsError: [Errno 17] File exists: '/test01_tsmb'

2021-10-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +27035 pull_request: https://github.com/python/cpython/pull/28670 ___ Python tracker <https://bugs.python.org/issue45

[issue45229] Always use unittest for collecting tests in regrtests

2021-10-01 Thread Serhiy Storchaka
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://github.com/p

[issue45229] Always use unittest for collecting tests in regrtests

2021-10-01 Thread Serhiy Storchaka
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://github.com/p

[issue45310] test_multiprocessing_forkserver: test_shared_memory_basics() failed with FileExistsError: [Errno 17] File exists: '/test01_tsmb'

2021-10-01 Thread Serhiy Storchaka
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/eb4495e8e275c83d691add116c4f2b74e73e3cc8

[issue45229] Always use unittest for collecting tests in regrtests

2021-10-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +27032 pull_request: https://github.com/python/cpython/pull/28667 ___ Python tracker <https://bugs.python.org/issue45

[issue45229] Always use unittest for collecting tests in regrtests

2021-10-01 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +27031 pull_request: https://github.com/python/cpython/pull/28666 ___ Python tracker <https://bugs.python.org/issue45

[issue40058] Running test_datetime twice fails with: module 'datetime' has no attribute '_divide_and_round'

2021-10-01 Thread Serhiy Storchaka
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

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

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

[issue45310] test_multiprocessing_forkserver: test_shared_memory_basics() failed with FileExistsError: [Errno 17] File exists: '/test01_tsmb'

2021-09-30 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- versions: +Python 3.10, Python 3.9 ___ Python tracker <https://bugs.python.org/issue45310> ___ ___ Python-bugs-list mailin

[issue45310] test_multiprocessing_forkserver: test_shared_memory_basics() failed with FileExistsError: [Errno 17] File exists: '/test01_tsmb'

2021-09-30 Thread Serhiy Storchaka
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

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

2021-09-30 Thread Serhiy Storchaka
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

[issue45229] Always use unittest for collecting tests in regrtests

2021-09-30 Thread Serhiy Storchaka
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/993a130d3abe7684dc9c999874b4dd1d8ea55a2a

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

2021-09-30 Thread Serhiy Storchaka
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/cpython/commit

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

2021-09-30 Thread Serhiy Storchaka
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/cpython/commit

[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 : -- pull_requests: +27024 pull_request: https://github.com/python/cpython/pull/28658 ___ Python tracker <https://bugs.python.org/issue40

[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 : -- pull_requests: +27023 pull_request: https://github.com/python/cpython/pull/28657 ___ Python tracker <https://bugs.python.org/issue40

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

2021-09-30 Thread Serhiy Storchaka
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/ec4d917a6a68824f1895f75d113add9410283da7

[issue45334] String Strip not working

2021-09-30 Thread Serhiy Storchaka
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_

[issue45332] Decimal test and benchmark are broken

2021-09-30 Thread Serhiy Storchaka
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

[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 : -- pull_requests: +27020 pull_request: https://github.com/python/cpython/pull/28654 ___ Python tracker <https://bugs.python.org/issue40

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

2021-09-30 Thread Serhiy Storchaka
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

[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

[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 when fresh is specified

[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

[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 ty

[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-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-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/d441437ee71ae174c008c23308b749b91020ba77

[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

[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: +26986 pull_request: https://github.com/python/cpython/pull/28615 ___ Python tracker <https://bugs.python.org/issue45

[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/eed32df5b6b989caf125d829301546db58b529dd

[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

[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

[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-

[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 : -- keywords: +patch pull_requests: +26974 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28594 ___ Python tracker <https://bugs.python.org/issu

[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

[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

[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

[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

[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 __new__

[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

[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

[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

[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 going

[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

[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

[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

[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

[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

[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

<    3   4   5   6   7   8   9   10   11   12   >