[issue46834] test_gdb started to fail on buildbot/s390x RHEL7

2022-02-23 Thread Nikita Sobolev
Nikita Sobolev added the comment: Sorry, wrong link. It started to fail after this commit: https://github.com/python/cpython/commit/66b3cd7063322a9f5c922a97bbd06fdb9830 -- ___ Python tracker <https://bugs.python.org/issue46

[issue46834] test_gdb started to fail on buildbot/s390x RHEL7

2022-02-23 Thread Nikita Sobolev
New submission from Nikita Sobolev : Log sample: ``` == FAIL: test_up_then_down (test.test_gdb.StackNavigationTests) -- Traceback (most recent call last

[issue46815] Extra `DeprecationWarning` when running `lib2to3` tests

2022-02-21 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +29594 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31464 ___ Python tracker <https://bugs.python.org/issu

[issue46815] Extra `DeprecationWarning` when running `lib2to3` tests

2022-02-21 Thread Nikita Sobolev
New submission from Nikita Sobolev : I first noticed it in the buildbot logs: ``` 0:24:42 load avg: 3.87 [430/431/1] test_lib2to3 passed (1 min 38 sec) :2: DeprecationWarning: lib2to3 package is deprecated and may not be able to parse Python 3.10+ ``` But, it also happens locally

[issue46757] dataclasses should define an empty __post_init__

2022-02-18 Thread Nikita Sobolev
Change by Nikita Sobolev : -- type: -> behavior versions: +Python 3.11 ___ Python tracker <https://bugs.python.org/issue46757> ___ ___ Python-bugs-list mai

[issue46757] dataclasses should define an empty __post_init__

2022-02-18 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +29565 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31430 ___ Python tracker <https://bugs.python.org/issu

[issue46757] dataclasses should define an empty __post_init__

2022-02-18 Thread Nikita Sobolev
Nikita Sobolev added the comment: I like this idea. `attrs` right now behave the same way (no default `__attrs_post_init__`: ``` >>> import attrs >>> @attrs.define ... class Some: ... x: int ... >>> @attrs.define ... class Other(Some): ...def __attrs_post_in

[issue46465] Regression caused by CALL_FUNCTION specialization for C function calls (test_urllib fails when run multiple times)

2022-02-18 Thread Nikita Sobolev
Change by Nikita Sobolev : -- nosy: +sobolevn nosy_count: 7.0 -> 8.0 pull_requests: +29545 status: open -> pending pull_request: https://github.com/python/cpython/pull/31404 ___ Python tracker <https://bugs.python.org/i

[issue46709] test_urllib: testInterruptCaught() has a race condition and fails randomly

2022-02-18 Thread Nikita Sobolev
Change by Nikita Sobolev : -- pull_requests: +29544 pull_request: https://github.com/python/cpython/pull/31404 ___ Python tracker <https://bugs.python.org/issue46

[issue46745] Typo in new PositionsIterator

2022-02-17 Thread Nikita Sobolev
Change by Nikita Sobolev : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46679] test.support.wait_process ignores timeout argument

2022-02-14 Thread Nikita Sobolev
Change by Nikita Sobolev : -- nosy: +sobolevn nosy_count: 1.0 -> 2.0 pull_requests: +29486 pull_request: https://github.com/python/cpython/pull/31274 ___ Python tracker <https://bugs.python.org/issu

[issue44525] Implement CALL_FUNCTION adaptive interpreter optimizations

2022-02-11 Thread Nikita Sobolev
Change by Nikita Sobolev : -- nosy: +sobolevn nosy_count: 4.0 -> 5.0 pull_requests: +29437 pull_request: https://github.com/python/cpython/pull/31273 ___ Python tracker <https://bugs.python.org/issu

[issue46711] test_logging: test_post_fork_child_no_deadlock() failed with timeout on AMD64 Arch Linux Asan Debug 3.10

2022-02-11 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch nosy: +sobolevn nosy_count: 1.0 -> 2.0 pull_requests: +29436 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31274 ___ Python tracker <https://bugs.python.org/i

[issue46709] test_urllib: testInterruptCaught() has a race condition and fails randomly

2022-02-11 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +29435 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31273 ___ Python tracker <https://bugs.python.org/issu

[issue46709] test_urllib: testInterruptCaught() has a race condition and fails randomly

2022-02-10 Thread Nikita Sobolev
Nikita Sobolev added the comment: Other tests are also affected: - `./python.exe -m test -m unittest.test.test_break.TestBreakDefaultIntHandler.testSecondInterrupt test_unittest -F` - `./python.exe -m test -m unittest.test.test_break.TestBreakDefaultIntHandler.testTwoResults test_unittest

[issue46709] test_urllib: testInterruptCaught() has a race condition and fails randomly

2022-02-10 Thread Nikita Sobolev
Nikita Sobolev added the comment: I think this might be a side effect of https://docs.python.org/3/library/signal.html#execution-of-python-signal-handlers > A Python signal handler does not get executed inside the low-level (C) signal > handler. Instead, the low-level signal handle

[issue46709] test_urllib: testInterruptCaught() has a race condition and fails randomly

2022-02-10 Thread Nikita Sobolev
Nikita Sobolev added the comment: I am trying to debug this. Several intersting notes: 1. `time.sleep()` does not help 2. It always fails on `8`th turn 3. Changing `self.assertTrue(result.shouldStop)` to ``` msg = f'{type(result)} {vars(result)}' self.assertTrue(result.shouldStop, msg

[issue46430] intern strings in deepfrozen modules

2022-02-10 Thread Nikita Sobolev
Change by Nikita Sobolev : -- nosy: +sobolevn nosy_count: 3.0 -> 4.0 pull_requests: +29417 pull_request: https://github.com/python/cpython/pull/31248 ___ Python tracker <https://bugs.python.org/issu

[issue45863] tarfile zeroes ustar header fields unnecessarily

2022-02-10 Thread Nikita Sobolev
Change by Nikita Sobolev : -- nosy: +sobolevn nosy_count: 4.0 -> 5.0 pull_requests: +29416 pull_request: https://github.com/python/cpython/pull/31248 ___ Python tracker <https://bugs.python.org/issu

[issue46689] `list(FunctionType(a.gi_code, {})(0))` crashes Python

2022-02-09 Thread Nikita Sobolev
New submission from Nikita Sobolev : Here's the simplest reproduction: ``` from types import FunctionType a = (x for x in [1]) list(FunctionType(a.gi_code, {})(0)) ``` I understand that the code above does not make much sense, but I still think it should not crash. Demo

[issue46685] Add additional tests for new features in `typing.py`

2022-02-08 Thread Nikita Sobolev
Change by Nikita Sobolev : -- pull_requests: +29394 pull_request: https://github.com/python/cpython/pull/31223 ___ Python tracker <https://bugs.python.org/issue46

[issue46685] Add additional tests for new features in `typing.py`

2022-02-08 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +29392 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31222 ___ Python tracker <https://bugs.python.org/issu

[issue46685] Add additional tests for new features in `typing.py`

2022-02-08 Thread Nikita Sobolev
New submission from Nikita Sobolev : New features (like `Self` type and `Never` type), in my opinion, require some extra testing. Things that were not covered: - Inheritance from `Self`, only `type(Self)` is covered: https://github.com/python/cpython/blob

[issue46647] `test_functools` unexpected failures when C `_functoolsmodule` is missing

2022-02-07 Thread Nikita Sobolev
Nikita Sobolev added the comment: > Or maybe you have other cases to show the functools module will missing > unexpectly? No, I can't think of any :) Your argument about code churn also makes sense. But, if we ever are going to refactor this test module, this is something to re

[issue46672] NameError in asyncio.gather when passing a invalid type as an arg with multiple awaitables

2022-02-07 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch nosy: +sobolevn nosy_count: 3.0 -> 4.0 pull_requests: +29358 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31187 ___ Python tracker <https://bugs.python.org/i

[issue46648] `test.test_urllib2.MiscTests.test_issue16464` flaky due to external connection

2022-02-07 Thread Nikita Sobolev
Change by Nikita Sobolev : -- pull_requests: +29357 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/31186 ___ Python tracker <https://bugs.python.org/issu

[issue46611] Improve coverage of `__instancecheck__` and `__subclasscheck__` methods in `typing.py`

2022-02-06 Thread Nikita Sobolev
Change by Nikita Sobolev : -- pull_requests: +29354 pull_request: https://github.com/python/cpython/pull/31182 ___ Python tracker <https://bugs.python.org/issue46

[issue46650] `priority` in `sched.scheduler` is not sufficiently tested

2022-02-05 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +29322 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31144 ___ Python tracker <https://bugs.python.org/issu

[issue46650] `priority` in `sched.scheduler` is not sufficiently tested

2022-02-05 Thread Nikita Sobolev
New submission from Nikita Sobolev : Right now there only a single test to ensure `priority` works correctly in `scheduler`: https://github.com/python/cpython/blob/fea7290a0ecee09bbce571d4d10f5881b7ea3485/Lib/test/test_sched.py#L90-L97 It looks like it is not enough. Why? ``` for priority

[issue46647] `test_functools` unexpected failures when C `_functoolsmodule` is missing

2022-02-05 Thread Nikita Sobolev
Nikita Sobolev added the comment: Cristian, in this case - is there a reason to keep `skipUnless(c_functools)` around? If we are sure that it is always available - then it should be always tested. We either should have: 1. Cleanly defined skips that work (this PR) 2. Unconditional

[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2022-02-05 Thread Nikita Sobolev
Nikita Sobolev added the comment: I can also reproduce it locally with: `./python.exe -m test -v test_urllib2 -m test_issue16464 -u network` I've opened a new issue for it: https://bugs.python.org/issue46648 -- ___ Python tracker <ht

[issue46648] `test.test_urllib2.MiscTests.test_issue16464` started to fail

2022-02-05 Thread Nikita Sobolev
New submission from Nikita Sobolev : Today I've noticed that a lot of CI runs fail because of this test. Output: ``` == ERROR: test_issue16464 (test.test_urllib2.MiscTests

[issue36019] test_urllib fail in s390x buildbots: http://www.example.com/

2022-02-05 Thread Nikita Sobolev
Nikita Sobolev added the comment: `test.test_urllib2.MiscTests.test_issue16464` started to fail again: ``` == ERROR: test_issue16464 (test.test_urllib2.MiscTests

[issue46647] `test_functools` unexpected failures when C `_functoolsmodule` is missing

2022-02-05 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +29318 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31141 ___ Python tracker <https://bugs.python.org/issu

[issue46647] `test_functools` unexpected failures when C `_functoolsmodule` is missing

2022-02-05 Thread Nikita Sobolev
New submission from Nikita Sobolev : Reproduction steps: 1. Add to `Setup.local`: ``` *disabled* _functoolsmodule ``` 2. `.configure && make -j`. Then, ensure that this module is not available: ``` » ./python.exe -c 'import _functools' Traceba

[issue46646] `address` arg can be `bytes` for `ip_*` functions in `ipaddress` module

2022-02-04 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +29317 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31139 ___ Python tracker <https://bugs.python.org/issu

[issue46646] `address` arg can be `bytes` for `ip_*` functions in `ipaddress` module

2022-02-04 Thread Nikita Sobolev
New submission from Nikita Sobolev : Right now the docs say: > ipaddress.ip_interface(address) > Return an IPv4Interface or IPv6Interface object depending on the IP address > passed as argument. **address is a string or integer** representing the IP > address. Either IPv4 or IP

[issue46611] Improve coverage of `__instancecheck__` and `__subclasscheck__` methods in `typing.py`

2022-02-02 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +29262 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31078 ___ Python tracker <https://bugs.python.org/issu

[issue46611] Improve coverage of `__instancecheck__` and `__subclasscheck__` methods in `typing.py`

2022-02-02 Thread Nikita Sobolev
Change by Nikita Sobolev : -- nosy: +AlexWaygood, gvanrossum, kj ___ Python tracker <https://bugs.python.org/issue46611> ___ ___ Python-bugs-list mailin

[issue46611] Improve coverage of `__instancecheck__` and `__subclasscheck__` methods in `typing.py`

2022-02-02 Thread Nikita Sobolev
New submission from Nikita Sobolev : There are several problem reported by coverage: 1. This line is never reached in `_SpecialGenericAlias.__subclasscheck__`: https://github.com/python/cpython/blob/08f8301b21648d58d053e1a513db8ed32fbf37dd/Lib/typing.py#L1140 2. `__instancecheck__

[issue46610] assertCountEqual doesn't work as expected for dictionary elements

2022-02-02 Thread Nikita Sobolev
Change by Nikita Sobolev : -- components: +Library (Lib) versions: +Python 3.10, Python 3.11, Python 3.9 ___ Python tracker <https://bugs.python.org/issue46

[issue46610] assertCountEqual doesn't work as expected for dictionary elements

2022-02-02 Thread Nikita Sobolev
New submission from Nikita Sobolev : @cansarigol, can you please specify what do you expect and how it works? -- nosy: +sobolevn ___ Python tracker <https://bugs.python.org/issue46

[issue46603] `typing._strip_annotations` is not fully covered

2022-02-01 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +29248 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31063 ___ Python tracker <https://bugs.python.org/issu

[issue46603] `typing._strip_annotations` is not fully covered

2022-02-01 Thread Nikita Sobolev
New submission from Nikita Sobolev : Right now `coverage` says that this line is not covered at all: https://github.com/python/cpython/blob/bebaa95fd0f44babf8b6bcffd8f2908c73ca259e/Lib/typing.py#L1882 Considering how hard all these `types.UnionType` / `typing.Union` stuff

[issue46482] `typing.Annotation.__new__` is not covered

2022-02-01 Thread Nikita Sobolev
Nikita Sobolev added the comment: Thanks! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46571] Strange `@typing.no_type_check` behavior for class variables

2022-02-01 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +29224 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31042 ___ Python tracker <https://bugs.python.org/issu

[issue46542] test_json and test_lib2to3 crash on s390x Fedora Clang 3.x buildbot

2022-01-31 Thread Nikita Sobolev
Change by Nikita Sobolev : -- nosy: -sobolevn ___ Python tracker <https://bugs.python.org/issue46542> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46571] Strange `@typing.no_type_check` behavior for class variables

2022-01-30 Thread Nikita Sobolev
Nikita Sobolev added the comment: Ken Jin, Jelle, can you please share your ideas why `(2)` is better than `(1)`? -- ___ Python tracker <https://bugs.python.org/issue46

[issue46585] Should we re-export `PyObj_FromPtr` in `ctypes`?

2022-01-30 Thread Nikita Sobolev
New submission from Nikita Sobolev : After looking at https://github.com/python/cpython/blame/8fb36494501aad5b0c1d34311c9743c60bb9926c/Lib/ctypes/test/test_python_api.py#L5-L10 in https://bugs.python.org/issue46584 it seems that we should address this comment: ``` # This section should

[issue46584] Modernize `ctypes/test_python_api` by removing old version check

2022-01-30 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +29205 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31024 ___ Python tracker <https://bugs.python.org/issu

[issue46584] Modernize `ctypes/test_python_api` by removing old version check

2022-01-30 Thread Nikita Sobolev
New submission from Nikita Sobolev : Right now Lib/ctypes/test/test_python_api.py has these lines: ``` if sys.version_info > (2, 4): c_py_ssize_t = c_size_t else: c_py_ssize_t = c_int ``` Source: https://github.com/python/cpython/blame/8fb36494501aad5b0c1d34311c9743c60bb9926c/

[issue46581] _typevar_types and _paramspec_tvars are missing from _GenericAlias.copy_with

2022-01-30 Thread Nikita Sobolev
Change by Nikita Sobolev : -- nosy: +sobolevn ___ Python tracker <https://bugs.python.org/issue46581> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46583] Modernize `selectors.py` by removing unused `sys.version_info` check

2022-01-30 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +29204 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31023 ___ Python tracker <https://bugs.python.org/issu

[issue46583] Modernize `selectors.py` by removing unused `sys.version_info` check

2022-01-30 Thread Nikita Sobolev
New submission from Nikita Sobolev : Right now `selectors.py` contains this check on module-level: ``` if sys.version_info >= (3, 5): ... ``` Source: https://github.com/python/cpython/blame/8fb36494501aad5b0c1d34311c9743c60bb9926c/Lib/selectors.py#L53 Learning from other modules, we t

[issue46571] Strange `@typing.no_type_check` behavior for class variables

2022-01-29 Thread Nikita Sobolev
Nikita Sobolev added the comment: ## 1. What is documented? The docs makes this even more weird! > @typing.no_type_check > Decorator to indicate that annotations are not type hints. > This works as class or function decorator. With a class, it applies > recursively to all met

[issue46571] Strange `@typing.no_type_check` behavior for class variables

2022-01-29 Thread Nikita Sobolev
Change by Nikita Sobolev : -- type: -> behavior ___ Python tracker <https://bugs.python.org/issue46571> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue46571] Strange `@typing.no_type_check` behavior for class variables

2022-01-29 Thread Nikita Sobolev
New submission from Nikita Sobolev : I was working on improving coverage and test quality of `typing.py`, when I saw that `@no_type_check` is quite strange. Let's dive into this! ## Everything is correct We will start with a basic example, that illustrates that everything works fine

[issue46569] final note on StrEnum documentation incorrectly refers to int.__format__ instead of str.__format__

2022-01-29 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch nosy: +sobolevn nosy_count: 3.0 -> 4.0 pull_requests: +29188 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/31007 ___ Python tracker <https://bugs.p

[issue46565] Delete module-level loop variables when no longer needed

2022-01-29 Thread Nikita Sobolev
Nikita Sobolev added the comment: Thanks for the better wording, Terry! > Leaving loop variables available is an intended feature of python. Just to be clear: it sure is! But, sometimes we don't want to polute a global namespace with this variable. A common practice across CPython's sou

[issue24398] Update test_capi to use test.support.script_helper

2022-01-28 Thread Nikita Sobolev
Change by Nikita Sobolev : -- nosy: +iritkatriel ___ Python tracker <https://bugs.python.org/issue24398> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46542] test_json and test_lib2to3 crash on s390x Fedora Clang 3.x buildbot

2022-01-28 Thread Nikita Sobolev
Change by Nikita Sobolev : -- nosy: +sobolevn nosy_count: 3.0 -> 4.0 pull_requests: +29174 pull_request: https://github.com/python/cpython/pull/30913 ___ Python tracker <https://bugs.python.org/issu

[issue46565] Multiple modules leak `for` loop variables into module's namespace

2022-01-28 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +29173 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30993 ___ Python tracker <https://bugs.python.org/issu

[issue46565] Multiple modules leak `for` loop variables into module's namespace

2022-01-28 Thread Nikita Sobolev
Change by Nikita Sobolev : -- nosy: +AlexWaygood ___ Python tracker <https://bugs.python.org/issue46565> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46565] Multiple modules leak `for` loop variables into module's namespace

2022-01-28 Thread Nikita Sobolev
New submission from Nikita Sobolev : Some variables created as `for X in ...` leak into module's namespace, where the loop is defined. I wrote a simple `flake8` plugin to find names that are used in `ast.Module` in `ast.For`, but not under `if __name__ == '__main__'` and are not used in `del

[issue46530] `'thread_time'` is missing from `test_get_clock_info`

2022-01-27 Thread Nikita Sobolev
Nikita Sobolev added the comment: Thank you! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46550] __slots__ updates despite being read-only

2022-01-27 Thread Nikita Sobolev
Nikita Sobolev added the comment: It does not happen on `3.11` (main): ``` Python 3.11.0a4+ (heads/main-dirty:ef3ef6fa43, Jan 20 2022, 20:48:25) [Clang 11.0.0 (clang-1100.0.33.16)] on darwin Type "help", "copyright", "credits" or "license" for more i

[issue46546] `importlib.metadata.DeprecatedList` leaks `method_name` variable

2022-01-27 Thread Nikita Sobolev
Nikita Sobolev added the comment: Thanks, Jason! I've submitted https://github.com/python/importlib_metadata/pull/365 > What's the harm in leaving this attribute on a class that is itself standing > in for deprecated behavior and slated for removal? I think it does not do muc

[issue46416] Direct invocation of `Lib/test/test_typing.py` fails

2022-01-27 Thread Nikita Sobolev
Change by Nikita Sobolev : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46547] `pydoc.Helper` leaks several `for` loop variables

2022-01-27 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +29136 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30957 ___ Python tracker <https://bugs.python.org/issu

[issue46547] `pydoc.Helper` leaks several `for` loop variables

2022-01-27 Thread Nikita Sobolev
New submission from Nikita Sobolev : Here's the problem. `pydoc.Helper` is defined as: ``` class Helper: for topic, symbols_ in _symbols_inverse.items(): for symbol in symbols_: topics = symbols.get(symbol, topic) if topic not in topics

[issue46546] `importlib.metadata.DeprecatedList` leaks `method_name` variable

2022-01-27 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +29135 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30956 ___ Python tracker <https://bugs.python.org/issu

[issue46546] `importlib.metadata.DeprecatedList` leaks `method_name` variable

2022-01-27 Thread Nikita Sobolev
New submission from Nikita Sobolev : Right now in `DeprecatedList` there's a possibly unwated name leak of `method_name` here: https://github.com/python/cpython/blob/08c0ed2d9c0d01ad1a5adc0787bc75e4e90cbb85/Lib/importlib/metadata/__init__.py#L295-L308 ``` for method_name

[issue46544] `textwrap.TextWrapper` leaks two intermediate vars into class namespace

2022-01-27 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +29134 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30955 ___ Python tracker <https://bugs.python.org/issu

[issue46545] `textwrap.TextWrapper` leaks two intermediate vars into class namespace

2022-01-27 Thread Nikita Sobolev
Nikita Sobolev added the comment: Oups, somehow I created two identical issues. Closing this one. -- resolution: -> duplicate stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46545] `textwrap.TextWrapper` leaks two intermediate vars into class namespace

2022-01-27 Thread Nikita Sobolev
New submission from Nikita Sobolev : Right now this works: ``` >>> import textwrap >>> textwrap.TextWrapper.x ' ' >>> textwrap.TextWrapper.uspace 32 ``` This happens because of these lines: https://github.com/python/cpython/blame/606e496dd6e2ace298532da200169124c

[issue46544] `textwrap.TextWrapper` leaks two intermediate vars into class namespace

2022-01-27 Thread Nikita Sobolev
New submission from Nikita Sobolev : Right now this works: ``` >>> import textwrap >>> textwrap.TextWrapper.x ' ' >>> textwrap.TextWrapper.uspace 32 ``` This happens because of these lines: https://github.com/python/cpython/blame/606e496dd6e2ace298532da200169124c

[issue46531] Simplify exception handling in `doctest.py`

2022-01-26 Thread Nikita Sobolev
Nikita Sobolev added the comment: Fair enough! The only improvement is that we don't call `sys.exc_info` twice here: https://github.com/python/cpython/blob/6e5a193816e1bdf11f5fb78d620995fd6987ccf8/Lib/doctest.py#L2641-L2644 But, I think it is a minor thing. Looks like I've misunderstood

[issue46531] Simplify exception handling in `doctest.py`

2022-01-26 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +29095 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30916 ___ Python tracker <https://bugs.python.org/issu

[issue46531] Simplify exception handling in `doctest.py`

2022-01-26 Thread Nikita Sobolev
New submission from Nikita Sobolev : Right now there are two places where `sys.exc_info()` calls are not required anymore: 1. https://github.com/python/cpython/blob/6e5a193816e1bdf11f5fb78d620995fd6987ccf8/Lib/doctest.py#L1352-L1353 2. https://github.com/python/cpython/blob

[issue46530] `'thread_time'` is missing from `test_get_clock_info`

2022-01-26 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +29092 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30913 ___ Python tracker <https://bugs.python.org/issu

[issue46530] `'thread_time'` is missing from `test_get_clock_info`

2022-01-26 Thread Nikita Sobolev
New submission from Nikita Sobolev : Right now here's how `test_get_clock_info` looks like: ``` def test_get_clock_info(self): clocks = ['monotonic', 'perf_counter', 'process_time', 'time'] for name in clocks: info = time.get_clock_info(name

[issue24398] Update test_capi to use test.support.script_helper

2022-01-26 Thread Nikita Sobolev
Change by Nikita Sobolev : -- nosy: +sobolevn nosy_count: 2.0 -> 3.0 pull_requests: +29091 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/30912 ___ Python tracker <https://bugs.python.org/i

[issue46529] Improve test coverage of `Union` and `Optional` repr()

2022-01-26 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +29090 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30911 ___ Python tracker <https://bugs.python.org/issu

[issue46529] Improve test coverage of `Union` and `Optional` repr()

2022-01-26 Thread Nikita Sobolev
New submission from Nikita Sobolev : There are several important cases that are missing from current `repr()` tests of `typing.Union` and `typing.Optional`: 1. This condition is not covered at all: `if args[0] is type(None):` https://github.com/python/cpython/blob

[issue46523] Test suite skips failing tests when setUp[Class] fails

2022-01-25 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +29076 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30895 ___ Python tracker <https://bugs.python.org/issu

[issue46520] `ast.unparse` produces syntactically illegal code for identifiers that look like reserved words

2022-01-25 Thread Nikita Sobolev
Nikita Sobolev added the comment: I can confirm that it happens on all versions from 3.9 to 3.11 (main). ``` Python 3.9.9 (main, Dec 21 2021, 11:35:28) [Clang 11.0.0 (clang-1100.0.33.16)] on darwin Type "help", "copyright", "credits" or "license&qu

[issue46519] test_typing failing on branch 3.10

2022-01-25 Thread Nikita Sobolev
Nikita Sobolev added the comment: I filled a new issue: https://bugs.python.org/issue46523 -- ___ Python tracker <https://bugs.python.org/issue46519> ___ ___

[issue46523] Test suite skips failing tests

2022-01-25 Thread Nikita Sobolev
New submission from Nikita Sobolev : Here's what happened. We had an error in `test_typing.py`, which was silently ignored. ``` == ERROR: setUpClass (test.test_typing.NewTypeTests

[issue46519] test_typing failing on branch 3.10

2022-01-25 Thread Nikita Sobolev
Nikita Sobolev added the comment: These lines seem suspicious: ``` 0:09:12 load avg: 6.37 Re-running failed tests in verbose mode 0:09:12 load avg: 6.37 Re-running test_typing in verbose mode (matching: setUpClass) 1 re-run test: test_typing 1 test run no tests: test_typing

[issue46519] test_typing failing on branch 3.10

2022-01-25 Thread Nikita Sobolev
Nikita Sobolev added the comment: One of the first things to think of: maybe `NewTypeTests` are not executed at all on 3.10? -- ___ Python tracker <https://bugs.python.org/issue46

[issue46396] `Concatenate` should not raise any semantic errors

2022-01-25 Thread Nikita Sobolev
Nikita Sobolev added the comment: I think that in case when we preserve the runtime checks, they should be covered by tests. Right now - they are not. So, I will switch my PR to the initial version with a new test case. Does this sound right

[issue46416] Direct invocation of `Lib/test/test_typing.py` fails

2022-01-24 Thread Nikita Sobolev
Nikita Sobolev added the comment: During this work some people have mentioned that they actually use `'__main__'` for local debugging of tests. I don't think that I am familiar enough with the existing workflow to make any educated decision :) пн, 24 янв. 2022 г. в 19:34, Christian Heimes

[issue46396] `Concatenate` should not raise any semantic errors

2022-01-24 Thread Nikita Sobolev
Nikita Sobolev added the comment: PR is updated, now `Concatenate` does not raise any semantic errors: https://github.com/python/cpython/pull/30619 -- components: +Library (Lib) -Tests title: Typing: test invalid usages of `Concatenate` -> `Concatenate` should not raise any seman

[issue46422] Why do we need `dis.Positions`?

2022-01-24 Thread Nikita Sobolev
Change by Nikita Sobolev : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46483] `pathlib.PurePath.__class_getitem__` does not return `GenericAlias`

2022-01-24 Thread Nikita Sobolev
Change by Nikita Sobolev : -- pull_requests: +29030 pull_request: https://github.com/python/cpython/pull/30848 ___ Python tracker <https://bugs.python.org/issue46

[issue46483] `pathlib.PurePath.__class_getitem__` does not return `GenericAlias`

2022-01-23 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +29009 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30822 ___ Python tracker <https://bugs.python.org/issu

[issue46483] `pathlib.PurePath.__class_getitem__` does not return `GenericAlias`

2022-01-23 Thread Nikita Sobolev
New submission from Nikita Sobolev : After reviewing https://github.com/python/cpython/pull/30777 I had a chance to look through other definitions of `def __class_getitem__`. And I found that the only one left is: `pathlib.PurePath.__class_getitem__` All other definitions already have

[issue46482] `typing.Annotation.__new__` is not covered

2022-01-22 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +29008 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30821 ___ Python tracker <https://bugs.python.org/issu

[issue46482] `typing.Annotation.__new__` is not covered

2022-01-22 Thread Nikita Sobolev
New submission from Nikita Sobolev : Right now no unit test covers this line: https://github.com/python/cpython/blob/51c3e28c8a163e58dc753765e3cc51d5a717e70d/Lib/typing.py#L1669-L1670 I will send a simple test for it. -- components: Tests messages: 411352 nosy: gvanrossum, kj

[issue44642] Union of a type and the typing module function

2022-01-22 Thread Nikita Sobolev
Nikita Sobolev added the comment: Looks like it was fixed indeed, `NewType` is now a class. And I cannot reproduce it even on `3.10`: ``` Python 3.10.0 (default, Nov 1 2021, 10:24:06) [Clang 11.0.0 (clang-1100.0.33.16)] on darwin Type "help", "copyright", "credi

  1   2   3   4   >