[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-04-04 Thread Oleg Iarygin
Change by Oleg Iarygin : -- pull_requests: +30361 pull_request: https://github.com/python/cpython/pull/32299 ___ Python tracker <https://bugs.python.org/issue45

[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-04-04 Thread Oleg Iarygin
Change by Oleg Iarygin : -- pull_requests: -30358 ___ Python tracker <https://bugs.python.org/issue45847> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45847] Port module setup to PY_STDLIB_MOD() macro and addext()

2022-04-04 Thread Oleg Iarygin
Change by Oleg Iarygin : -- nosy: +arhadthedev nosy_count: 5.0 -> 6.0 pull_requests: +30358 pull_request: https://github.com/python/cpython/pull/32299 ___ Python tracker <https://bugs.python.org/issu

[issue45763] Detect compression libraries in configure

2022-04-04 Thread Oleg Iarygin
Change by Oleg Iarygin : -- nosy: +arhadthedev nosy_count: 1.0 -> 2.0 pull_requests: +30360 pull_request: https://github.com/python/cpython/pull/32299 ___ Python tracker <https://bugs.python.org/issu

[issue45747] Detect dbm and gdbm dependencies in configure.ac

2022-04-04 Thread Oleg Iarygin
Change by Oleg Iarygin : -- nosy: +arhadthedev nosy_count: 4.0 -> 5.0 pull_requests: +30359 pull_request: https://github.com/python/cpython/pull/32299 ___ Python tracker <https://bugs.python.org/issu

[issue47193] Use zlib-ng rather than zlib in binary releases

2022-04-01 Thread Oleg Iarygin
Change by Oleg Iarygin : -- nosy: +arhadthedev ___ Python tracker <https://bugs.python.org/issue47193> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47168] Improvements for stable ABI definition files

2022-03-30 Thread Oleg Iarygin
Oleg Iarygin added the comment: Probably, `regen-limited-abi` needs to be called from `regen-all` so 'Check if generated files are up to date' CI job will become aware of it. -- ___ Python tracker <https://bugs.python.o

[issue47168] Improvements for stable ABI definition files

2022-03-30 Thread Oleg Iarygin
Change by Oleg Iarygin : -- nosy: +arhadthedev ___ Python tracker <https://bugs.python.org/issue47168> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47099] Replace with_traceback() with exception chaining and reraising

2022-03-30 Thread Oleg Iarygin
Change by Oleg Iarygin : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue47161] pathlib method relative_to doesnt work with // in paths

2022-03-30 Thread Oleg Iarygin
Change by Oleg Iarygin : -- keywords: +patch pull_requests: +30271 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32193 ___ Python tracker <https://bugs.python.org/issu

[issue47161] pathlib method relative_to doesnt work with // in paths

2022-03-30 Thread Oleg Iarygin
Oleg Iarygin added the comment: > But shouldn't it just work with `//` as a `/`? It seems like this is the > behavior elsewhere. It works elsewhere because empty directory names are impossible so can be dropped. But if `//` is placed in the beginning, it gets a special meaning th

[issue47161] pathlib method relative_to doesnt work with // in paths

2022-03-30 Thread Oleg Iarygin
Oleg Iarygin added the comment: Also, the error message cannot be fixed because for 3.8 only security fixes are accepted since May 2021. For 3.9 and later, the message is already corrected. -- ___ Python tracker <https://bugs.python.

[issue47161] pathlib method relative_to doesnt work with // in paths

2022-03-30 Thread Oleg Iarygin
Oleg Iarygin added the comment: As I found out, any path starting with two double slashes is treated as an UNC (network) path: root \\machine\mountpoint\directory\etc\... directory ^ So "/Library/Video" and "/&q

[issue47161] pathlib method relative_to doesnt work with // in paths

2022-03-30 Thread Oleg Iarygin
Oleg Iarygin added the comment: I started to investigate and found that a double slash in the beginning cancels any parsing of a path: >>> Path("//Library/Video")._parts ['Library\\Video\\'] vs >>> Path("/Library/Video")._par

[issue47128] Enhance Argument Clinic's NoneType return converter to give `void`

2022-03-28 Thread Oleg Iarygin
Oleg Iarygin added the comment: Actually, you're right. For now, PyErr_Occurred is a GIL lock plus a memory access. While the access is cheap because of a L1 cache hit, the GIL takes its toll in a hot path. So I'm closing the PR until GIL removal is done so no performance penalt

[issue47132] Move tests from setobject.c to _testcapimodule

2022-03-26 Thread Oleg Iarygin
Change by Oleg Iarygin : -- keywords: +patch pull_requests: +30213 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32133 ___ Python tracker <https://bugs.python.org/issu

[issue47132] Move tests from setobject.c to _testcapimodule

2022-03-26 Thread Oleg Iarygin
New submission from Oleg Iarygin : Currently, tests for PySet/PyFrozenSet C API are defined in Objects/setobject.c and available via set.test_c_api(). Moving them to, for example, _testcapimodule gives the following advantanges: - an internal, CPython-specific method stops being available in

[issue47128] Enhance Argument Clinic's NoneType return converter to give `void`

2022-03-26 Thread Oleg Iarygin
Oleg Iarygin added the comment: > The function should return different values for success and error It does, and a `void` return type enforces it. Here is the trick: > An important convention throughout the Python interpreter is the following: > when a function fails, it shou

[issue47128] Enhance Argument Clinic's NoneType return converter to give `void`

2022-03-26 Thread Oleg Iarygin
Change by Oleg Iarygin : -- keywords: +patch pull_requests: +30205 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32126 ___ Python tracker <https://bugs.python.org/issu

[issue47128] Enhance Argument Clinic's NoneType return converter to give `void`

2022-03-26 Thread Oleg Iarygin
New submission from Oleg Iarygin : The attached PR makes the following possible (note that the impl has a `void` return type): /*[clinic input] _io._IOBase.writelines -> NoneType lines: object / [clinic start generated code]*/ static v

[issue47109] Old ctypes.macholib tests are ignored by python -m test

2022-03-24 Thread Oleg Iarygin
Change by Oleg Iarygin : -- keywords: +patch pull_requests: +30178 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32094 ___ Python tracker <https://bugs.python.org/issu

[issue47109] Old ctypes.macholib tests are ignored by python -m test

2022-03-24 Thread Oleg Iarygin
New submission from Oleg Iarygin : Some tests for `ctypes.macholib.dyld` and all tests for `ctypes.macholib.dylib` and `ctypes.macholib.framework` are located outside of expected `ctypes.test` module and were not ported from `assert` to `unittest` facilities. This causes the following

[issue47099] Replace with_traceback() with exception chaining and reraising

2022-03-23 Thread Oleg Iarygin
Change by Oleg Iarygin : -- keywords: +patch pull_requests: +30162 stage: -> patch review pull_request: https://github.com/python/cpython/pull/32074 ___ Python tracker <https://bugs.python.org/issu

[issue47099] Replace with_traceback() with exception chaining and reraising

2022-03-23 Thread Oleg Iarygin
New submission from Oleg Iarygin : Currently, exception chaining in Lib/ modules is implemented with pre-3.11 `raise Foo(...).with_traceback(sys.exc_info()[2])`. However, this approach can be simplified: 1. PEP 3134 introduced a proper `raise Foo(...) from bar` construction that takes a

[issue47015] Update tests from asyncore to asyncio

2022-03-18 Thread Oleg Iarygin
Oleg Iarygin added the comment: The PR is ready for a review; I sorted out all bugs. -- ___ Python tracker <https://bugs.python.org/issue47015> ___ ___ Pytho

[issue47015] Update tests from asyncore to asyncio

2022-03-14 Thread Oleg Iarygin
Change by Oleg Iarygin : -- keywords: +patch pull_requests: +29978 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31876 ___ Python tracker <https://bugs.python.org/issu

[issue47015] Update tests from asyncore to asyncio

2022-03-14 Thread Oleg Iarygin
New submission from Oleg Iarygin : PEP 594 – Removing dead batteries from the standard library [1] removes asyncore and asynchat in 3.12 with the following note: > The asyncore module is also used in stdlib tests. The tests for ftplib, > logging, smptd, smtplib, and ssl are partly ba

[issue46920] Remove code made dead long ago with #if 0

2022-03-14 Thread Oleg Iarygin
Change by Oleg Iarygin : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46987] Remove _PySys_GetObjectId / _PySys_GetObjectId

2022-03-12 Thread Oleg Iarygin
Oleg Iarygin added the comment: > ./top_5000/datatable-1.0.0.tar.gz: datatable-1.0.0/src/core/python/obj.cc: > _PySys_GetObjectId(&PyId_stdin) // borrowed ref All three occurences look like this [1] for two years (see git blame): #ifndef Py_LIMITED_API _PySys_G

[issue46920] Remove code made dead long ago with #if 0

2022-03-10 Thread Oleg Iarygin
Change by Oleg Iarygin : -- pull_requests: +29912 pull_request: https://github.com/python/cpython/pull/31814 ___ Python tracker <https://bugs.python.org/issue46

[issue46920] Remove code made dead long ago with #if 0

2022-03-10 Thread Oleg Iarygin
Change by Oleg Iarygin : -- pull_requests: +29911 pull_request: https://github.com/python/cpython/pull/31813 ___ Python tracker <https://bugs.python.org/issue46

[issue46920] Remove code made dead long ago with #if 0

2022-03-10 Thread Oleg Iarygin
Change by Oleg Iarygin : -- pull_requests: +29910 pull_request: https://github.com/python/cpython/pull/31812 ___ Python tracker <https://bugs.python.org/issue46

[issue46920] Remove code made dead long ago with #if 0

2022-03-10 Thread Oleg Iarygin
Change by Oleg Iarygin : -- pull_requests: +29909 pull_request: https://github.com/python/cpython/pull/31811 ___ Python tracker <https://bugs.python.org/issue46

[issue46962] Fix docstrings that do not honor --without-doc-strings

2022-03-08 Thread Oleg Iarygin
Change by Oleg Iarygin : -- keywords: +patch pull_requests: +29877 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31769 ___ Python tracker <https://bugs.python.org/issu

[issue46962] Fix docstrings that do not honor --without-doc-strings

2022-03-08 Thread Oleg Iarygin
New submission from Oleg Iarygin : To support `--without-doc-strings`, all docstrings must be wrapped into `PyDoc_STRVAR` or `PyDoc_STR` (PEP 7). However, there are 18 occurrences in code and 10 in C API documentation that do not follow this rule. The documentation is important too because

[issue46946] Port core types to Argument Clinic

2022-03-07 Thread Oleg Iarygin
Change by Oleg Iarygin : -- keywords: +patch pull_requests: +29841 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31725 ___ Python tracker <https://bugs.python.org/issu

[issue46946] Port core types to Argument Clinic

2022-03-07 Thread Oleg Iarygin
New submission from Oleg Iarygin : This is done to: - update docstrings to current standards enforced by AC - get proper naming for arguments of impl-functions (for example, self instead of obj and instance) - strip boilerplate reducing current 16k lines of code to something little more

[issue46942] Convert Object/classobject.c to Argument Clinic

2022-03-07 Thread Oleg Iarygin
Change by Oleg Iarygin : -- keywords: +patch pull_requests: +29834 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31711 ___ Python tracker <https://bugs.python.org/issu

[issue46942] Convert Object/classobject.c to Argument Clinic

2022-03-07 Thread Oleg Iarygin
New submission from Oleg Iarygin : - Convert method.__reduce__, method.__new__, and instancemethod.__new__ to AC. It looks like nothing else can be converted in classobject.c. This is my first time working with AC so I could make some mistakes. - Fix found mismatches in method.__new__

[issue46920] Remove code made dead long ago with #if 0

2022-03-05 Thread Oleg Iarygin
Oleg Iarygin added the comment: I reverted my changes in Modules/_ctypes/libffi_osx/x86/x86-ffi64.c and Modules/_decimal/libmpdec/*step.c to not disturb third-party vendored libraries. As a result, macOS component is no longer affected along with the corresponding experts in a nosy list

[issue46920] Remove code made dead long ago with #if 0

2022-03-04 Thread Oleg Iarygin
Oleg Iarygin added the comment: Also forgot to add that git grep "#if 1" gives the following: - added on 20 Nov 2014 by d600951: cpython/Python/pylifecycle.c:2427. "/* Disable this if you have trouble debugging bootstrap stuff */" - after seven years, no trouble was

[issue46920] Remove code made dead long ago with #if 0

2022-03-04 Thread Oleg Iarygin
Change by Oleg Iarygin : -- keywords: +patch pull_requests: +29800 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31681 ___ Python tracker <https://bugs.python.org/issu

[issue46920] Remove code made dead long ago with #if 0

2022-03-04 Thread Oleg Iarygin
New submission from Oleg Iarygin : `git grep "#if 0"` gives the following occurences of dead code (analyzed with `git blame`, removed by a linked pull request): - added on 27 Apr 2020 by 2b74c83: Parser/pegen.h:9, Parser/pegen.h:15. Since these constants aren't mentioned a

[issue46816] Remove declarations for non-__STDC__ compilers

2022-02-21 Thread Oleg Iarygin
Change by Oleg Iarygin : -- keywords: +patch pull_requests: +29596 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31466 ___ Python tracker <https://bugs.python.org/issu

[issue46816] Remove declarations for non-__STDC__ compilers

2022-02-21 Thread Oleg Iarygin
New submission from Oleg Iarygin : Currently, Python code contains two places where presence of __STDC__ is checked: - Include/internal/pycore_pymath.h:12 - Python/errors.c:13 These checks are used to add extern functions missing in non-standard versions of math.h. However, after Python

[issue46649] Propagate Python thread name to thread state structure

2022-02-05 Thread Oleg Iarygin
Oleg Iarygin added the comment: > bpo-15500 looks like a more generic option, debuggers should be able to > retrieve thread names. That option is not viable. 1. > Created on 2012-07-30 16:19 by bra, last changed 2022-01-19 00:32 by pitrou 2. > I don't think this should b

[issue41682] [Windows] test_asyncio: Proactor test_sendfile_close_peer_in_the_middle_of_receiving failure

2022-01-22 Thread Oleg Iarygin
Change by Oleg Iarygin : -- nosy: +arhadthedev ___ Python tracker <https://bugs.python.org/issue41682> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45877] Inconsistency in minimal supported version of Microsoft Visual Studio

2022-01-21 Thread Oleg Iarygin
Change by Oleg Iarygin : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue45877> ___ ___

[issue46038] Mark /configure file as generated in .gitattributes

2022-01-21 Thread Oleg Iarygin
Oleg Iarygin added the comment: Superseded by <https://github.com/python/core-workflow/issues/425>. The PR itself is included as a part of PR30745. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___

[issue46038] Mark /configure file as generated in .gitattributes

2022-01-21 Thread Oleg Iarygin
Change by Oleg Iarygin : -- pull_requests: +28935 pull_request: https://github.com/python/cpython/pull/30745 ___ Python tracker <https://bugs.python.org/issue46

[issue34875] Change .js mime to "text/javascript"

2022-01-21 Thread Oleg Iarygin
Oleg Iarygin added the comment: Myles, it looks like the draft 14 contains a mismatch in 6.2.1: > # 6.2.1. text/ecmascript > > Type name: application > Subtype name: ecmascript In header it's `text`, in details it's `application`. Is it intended? I believe that a typ

[issue15500] Python should support exporting thread names to the OS

2022-01-18 Thread Oleg Iarygin
Oleg Iarygin added the comment: @r.david.murray > It is indeed the compatibility that is the worse issue. The problem is what > people have gotten used to and may have coded their applications to > expect/deal > with. I agree with you that most people would *not* find it surpr

[issue46391] Library multiprocess leaks named resources.

2022-01-15 Thread Oleg Iarygin
Oleg Iarygin added the comment: I added core devs related to multiprocessing into a nosy list so they got a notification and the PR will be evaluated and merged faster. FYI, the devs are Davin Potts and Antoine Pitrou (as per <https://devguide.python.org/experts/>). -

[issue46038] Mark /configure file as generated in .gitattributes

2021-12-10 Thread Oleg Iarygin
Change by Oleg Iarygin : -- keywords: +patch pull_requests: +28256 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30031 ___ Python tracker <https://bugs.python.org/issu

[issue46038] Mark /configure file as generated in .gitattributes

2021-12-10 Thread Oleg Iarygin
New submission from Oleg Iarygin : configure is regenerated from configure.ac using a custom container with appropriate version of tools (quay.io/tiran/cpython_autoconf by Christian Heimes). As a result, configure falls into the same category as files generated by Argument Clinic, Freeze and

[issue36048] Deprecate implicit truncating when convert Python numbers to C integers: use __index__, not __int__

2021-12-08 Thread Oleg Iarygin
Oleg Iarygin added the comment: The reporter gave more details (<https://github.com/python/cpython/pull/11952#issuecomment-989430968>): > Literally this is ok in C++ with Qt: > > float x = 2.3, y = 1.1; > auto p = QPoint(x, y); // QPoint only takes 2 int params..

[issue36048] Deprecate implicit truncating when convert Python numbers to C integers: use __index__, not __int__

2021-12-08 Thread Oleg Iarygin
Oleg Iarygin added the comment: Here is a report that this change breaks PyQt5 on Fedora: <https://github.com/python/cpython/pull/11952#issuecomment-989298404> > [...] > > Why do I care? This breaks tons of existing PyQt5 code out there, for > example. I wasn't awar

[issue45019] Freezing modules has manual steps but could be automated.

2021-11-25 Thread Oleg Iarygin
Oleg Iarygin added the comment: If a directory is renamed anyway, maybe `deepfrozen_modules` is better? `deepfreeze_modules` looks like "modules that are part of deepfreeze tool itself". Also it rhymes with `frozen_modules`. -- ___ Pyth

[issue45019] Freezing modules has manual steps but could be automated.

2021-11-24 Thread Oleg Iarygin
Change by Oleg Iarygin : -- nosy: +arhadthedev nosy_count: 5.0 -> 6.0 pull_requests: +27981 pull_request: https://github.com/python/cpython/pull/29744 ___ Python tracker <https://bugs.python.org/issu

[issue45883] reuse_address mistakenly removed from loop.create_server

2021-11-23 Thread Oleg Iarygin
Change by Oleg Iarygin : -- nosy: +arhadthedev ___ Python tracker <https://bugs.python.org/issue45883> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue45869] Unicode and acii regular expressions do not agree on ascii space characters

2021-11-23 Thread Oleg Iarygin
Change by Oleg Iarygin : -- nosy: +arhadthedev ___ Python tracker <https://bugs.python.org/issue45869> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37705] winerror_to_errno implementation

2021-11-23 Thread Oleg Iarygin
Change by Oleg Iarygin : -- nosy: +arhadthedev nosy_count: 7.0 -> 8.0 pull_requests: +27961 pull_request: https://github.com/python/cpython/pull/29724 ___ Python tracker <https://bugs.python.org/issu

[issue45877] Inconsistency in minimal supported version of Microsoft Visual Studio

2021-11-23 Thread Oleg Iarygin
New submission from Oleg Iarygin : According to PCbuild/readme.txt: > Using this directory requires an installation of > Microsoft Visual Studio 2017 (MSVC 14.1) of any edition. However, Doc/using/windows.rst states that Visual Studio 2017 is not required and 2015 may be used instead:

[issue43827] abc conflicts with __init_subclass__

2021-11-21 Thread Oleg Iarygin
Oleg Iarygin added the comment: Paul, PR OP made all changes requested; could you re-review please? -- nosy: +arhadthedev, p-ganssle ___ Python tracker <https://bugs.python.org/issue43

[issue45476] [C API] Disallow using PyFloat_AS_DOUBLE() as l-value

2021-11-14 Thread Oleg Iarygin
Oleg Iarygin added the comment: Marc-Andre: > Inlining is something that is completely under the control of the used compilers. Compilers are free to not inline function marked for inlining [...] I checked the following C snippet on gcc.godbolt.org using GCC 4.1.2 and Clang 3.0.0 with /

[issue45772] socket.socket should be a class instead of a function

2021-11-12 Thread Oleg Iarygin
Change by Oleg Iarygin : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45772] socket.socket should be a class instead of a function

2021-11-09 Thread Oleg Iarygin
New submission from Oleg Iarygin : Found a twice stale bpo-less but useful pull request 23960, so publish it here: > Currently socket.socket is documented as a function, but it is really a class (and thus has function-like usage to construct an object). This correction would ensure that Pyt

[issue45672] Mutation tests results of typing.py

2021-11-04 Thread Oleg Iarygin
Oleg Iarygin added the comment: > because this modification does not affect behavior Unfortunately, this one (that I missed by not reading the report thoroughly) makes the framework totally unsuitable for CI. However, looking at such false positives allows to muse about reasons beh

[issue45672] Mutation tests results of typing.py

2021-11-04 Thread Oleg Iarygin
Oleg Iarygin added the comment: > What is the problem actually? I guess, Lib/test/test_typing.py has gaps in test coverage. The report provided by the OP is a list of random modifications that corrupt logic of Lib/typing.py but still pass all test cases. Mutation testing is validation

[issue45702] Python/dtoa.c requires 53 bit hardware rounding unavalable on x64

2021-11-03 Thread Oleg Iarygin
Oleg Iarygin added the comment: When I first saw "default rounding precision of 64 bits", I've thought it's about "64 bit precision", aka binary64, aka double. So I suggested that the code expects some hardly known Intel FPU-specific binary56 instead. Now, aft

[issue45702] Python/dtoa.c requires 53 bit hardware rounding unavalable on x64

2021-11-03 Thread Oleg Iarygin
New submission from Oleg Iarygin : File configure.ac:4617 states the following: > # The short float repr introduced in Python 3.1 requires the > # correctly-rounded string <-> double conversion functions from > # Python/dtoa.c, which in turn require that the FPU uses 53-bit >

[issue45697] PyType_IsSubtype is doing excessive work in the common case

2021-11-03 Thread Oleg Iarygin
Oleg Iarygin added the comment: Dennis, can PyFrozenSet_Check and _PyObject_TypeCheck get rid of Py_IS_TYPE invocation then, so PyType_IsSubtype becomes the only source of truth here? -- nosy: +arhadthedev ___ Python tracker <ht