[issue44919] TypedDict subtypes ignore any other metaclasses in 3.9+

2021-08-15 Thread Nikita Sobolev
New submission from Nikita Sobolev : Some context. I have a `User` class defined as a `TypedDict`: ```python from typing import TypedDict class User(TypedDict): name: str registered: bool ``` Now, I want to check if some `dict` is an instance of `User` like so: `isinstance(my_dict

[issue45042] Many multiprocessing tests are silently skipped since 3.9

2021-08-30 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +26504 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28060 ___ Python tracker <https://bugs.python.org/issu

[issue45042] Many multiprocessing tests are silently skipped since 3.9

2021-08-30 Thread Nikita Sobolev
Nikita Sobolev added the comment: Looks like that this happens because tests classes are decorated with `@hashlib_helper.requires_hashdigest('md5')`: https://github.com/python/cpython/blob/2a8127cafe1d196f858a3ecabf5f1df3eebf9a12/Lib/test/_test_multiprocessing.py#L4482-L4485 Tests above run

[issue45042] Many multiprocessing tests are silently skipped since 3.9

2021-08-30 Thread Nikita Sobolev
Nikita Sobolev added the comment: Looks like it did, two newly-unignored tests are failing: https://github.com/python/cpython/pull/28060#issuecomment-908295411 пн, 30 авг. 2021 г. в 15:16, Antoine Pitrou : > > Antoine Pitrou added the comment: > > Wow. I hope this didn't hide an

[issue45042] Many multiprocessing tests are silently skipped since 3.9

2021-08-30 Thread Nikita Sobolev
Nikita Sobolev added the comment: Serhiy, yes, you are right. I guess, it is safe to assume that load-time/test-time might make a difference, especially with `_hashlib`. I've commited your suggestion, thanks a lot for your help! -- ___ Python

[issue45053] MD5SumTests.test_checksum_fodder fails on Windows

2021-09-03 Thread Nikita Sobolev
Nikita Sobolev added the comment: Yes, it was encodings problem :) This line solved it (here: https://github.com/python/cpython/blob/6f8bc464e006f672d1aeafbfd7c774a40215dab2/Tools/scripts/md5sum.py#L69): ```python out.write('%s %s\n' % (m.hexdigest(), filename.encode

[issue45034] Improve struct.pack out of range error messages

2021-09-04 Thread Nikita Sobolev
Nikita Sobolev added the comment: I would like to work on this if nobody else has already started :) -- nosy: +sobolevn ___ Python tracker <https://bugs.python.org/issue45

[issue45128] test_multiprocessing fails sporadically on the release artifacts

2021-09-07 Thread Nikita Sobolev
Nikita Sobolev added the comment: Related issues: - https://bugs.python.org/issue45042 - https://bugs.python.org/issue45052 -- nosy: +sobolevn ___ Python tracker <https://bugs.python.org/issue45

[issue45042] Many multiprocessing tests are silently skipped since 3.9

2021-09-07 Thread Nikita Sobolev
Change by Nikita Sobolev : -- pull_requests: +26631 pull_request: https://github.com/python/cpython/pull/28182 ___ Python tracker <https://bugs.python.org/issue45

[issue45034] Improve struct.pack out of range error messages

2021-09-05 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +26605 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28178 ___ Python tracker <https://bugs.python.org/issu

[issue45156] mock.seal has infinite recursion with int class attributes

2021-09-12 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch nosy: +sobolevn nosy_count: 3.0 -> 4.0 pull_requests: +26714 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28300 ___ Python tracker <https://bugs.python.org/i

[issue45156] mock.seal has infinite recursion with int class attributes

2021-09-13 Thread Nikita Sobolev
Nikita Sobolev added the comment: I've proposed a solution, based on the assumption that we don't need to recurse into `_SpecState` props: ``` if isinstance(m._mock_children.get(attr), _SpecState): continue ``` It seems like a simple and reasonable thing to do. Link: https://github.com

[issue20524] format error messages should provide context information

2021-09-13 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch nosy: +sobolevn nosy_count: 4.0 -> 5.0 pull_requests: +26723 stage: test needed -> patch review pull_request: https://github.com/python/cpython/pull/28310 ___ Python tracker <https://bugs.p

[issue20524] format error messages should provide context information

2021-09-13 Thread Nikita Sobolev
Nikita Sobolev added the comment: > I think that would require some major surgery to the code, but would be worth > it. I've decided to take an easy path: https://github.com/python/cpython/pull/28310 ``` PyErr_Format(PyExc_ValueError, "Invalid format spe

[issue45166] get_type_hints + Final + future annotations = TypeError

2021-09-10 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch nosy: +sobolevn nosy_count: 1.0 -> 2.0 pull_requests: +26697 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28279 ___ Python tracker <https://bugs.python.org/i

[issue45185] test.test_ssl.TestEnumerations is not run

2021-09-14 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +26741 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28330 ___ Python tracker <https://bugs.python.org/issu

[issue45185] test.test_ssl.TestEnumerations is not run

2021-09-14 Thread Nikita Sobolev
Nikita Sobolev added the comment: Looks like `TestEnumerations` was never added to `tests` in `test_main`. https://github.com/python/cpython/commit/a02cb474f9c097c83cd444a47e9fb5f99b4aaf45#diff-d526ded1c360bed6b222de46f4ca92b834f978ebed992fb3189bf9a94a198578R4702 I will try to enable

[issue45209] multiprocessing tests log: UserWarning: resource_tracker: There appear to be 1 leaked shared_memory objects to clean up at shutdown

2021-09-15 Thread Nikita Sobolev
Nikita Sobolev added the comment: I would like to work on this, if no one has started yet. -- nosy: +sobolevn ___ Python tracker <https://bugs.python.org/issue45

[issue45209] multiprocessing tests log: UserWarning: resource_tracker: There appear to be 1 leaked shared_memory objects to clean up at shutdown

2021-09-15 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +26792 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28377 ___ Python tracker <https://bugs.python.org/issu

[issue45209] multiprocessing tests log: UserWarning: resource_tracker: There appear to be 1 leaked shared_memory objects to clean up at shutdown

2021-09-15 Thread Nikita Sobolev
Nikita Sobolev added the comment: The problem was in `test_shared_memory_cleaned_after_process_termination` test. ``` » ./python.exe -m test -v test_multiprocessing_forkserver -m test_shared_memory_cleaned_after_process_termination == CPython 3.11.0a0 (heads/main:09b4ad11f3, Sep 15 2021, 20

[issue45052] WithProcessesTestSharedMemory.test_shared_memory_basics fails on Windows

2021-09-06 Thread Nikita Sobolev
Nikita Sobolev added the comment: I think that adding extra tests and docs are two separate new tasks. I will open them today. Thanks a lot, everyone! пн, 6 сент. 2021 г. в 19:56, Steve Dower : > > Steve Dower added the comment: > > The test fix looks good to me. That resolve

[issue45052] WithProcessesTestSharedMemory.test_shared_memory_basics fails on Windows

2021-09-06 Thread Nikita Sobolev
Nikita Sobolev added the comment: Ok, that's what I was able to find. Original BPO: https://bugs.python.org/issue35813 Original PRs (sources + tests): - https://github.com/python/cpython/pull/11664 it was a little bit "rushed" - https://github.com/python/cpython/pull/11816 follow u

[issue45052] WithProcessesTestSharedMemory.test_shared_memory_basics fails on Windows

2021-09-06 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +26611 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28182 ___ Python tracker <https://bugs.python.org/issu

[issue45128] test_multiprocessing_fork fails if run sequentially after test_genericalias and test_logging

2021-09-16 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +26800 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28387 ___ Python tracker <https://bugs.python.org/issu

[issue45220] Windows builds sometimes fail on main branch

2021-09-16 Thread Nikita Sobolev
New submission from Nikita Sobolev : I've started to notice that CPython's builds on Windows now simetimes fail with something like this: (both Azure and Github Actions are affected) ``` Using "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\msbuil

[issue45216] Remove redundand information from difflib docstrings

2021-09-18 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch nosy: +sobolevn nosy_count: 2.0 -> 3.0 pull_requests: +26848 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28445 ___ Python tracker <https://bugs.python.org/i

[issue45217] ConfigParser does not accept "No value" reversely to the doc

2021-09-16 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +26809 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28396 ___ Python tracker <https://bugs.python.org/issu

[issue45217] ConfigParser does not accept "No value" reversely to the doc

2021-09-16 Thread Nikita Sobolev
Nikita Sobolev added the comment: Try this: ``` from configparser import ConfigParser ConfigParser(allow_no_value=True).read('bug.ini') ``` It should work! :) But, the docs are missing this config value here (which caused this issue): > Values can be omitted, in which case the key/va

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

2021-09-11 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +26710 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28294 ___ Python tracker <https://bugs.python.org/issu

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

2021-09-07 Thread Nikita Sobolev
New submission from Nikita Sobolev : As we've discussed in https://bugs.python.org/msg401146 we need to improve how `SharedMemory` is documented and tested. Right now docs do not cover `pickle` at all (https://github.com/python/cpython/blob/main/Doc/library/multiprocessing.shared_memory.rst

[issue45052] WithProcessesTestSharedMemory.test_shared_memory_basics fails on Windows

2021-09-07 Thread Nikita Sobolev
Nikita Sobolev added the comment: Closing and moving to https://bugs.python.org/issue45125 -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue25782] CPython hangs on error __context__ set to the error itself

2021-08-09 Thread Nikita Sobolev
Nikita Sobolev added the comment: There's also a similar case with python3.9: ```python >>> class MyError(Exception): ... ... ... >>> e = MyError('e') >>> e.__context__ = e >>> >>> try: ... raise e ... except MyError: ... print('done') ...

[issue44891] Tests for `id(a) == id(a * 1)` for `bytes` and `str`

2021-08-12 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +26223 stage: -> patch review pull_request: https://github.com/python/cpython/pull/27745 ___ Python tracker <https://bugs.python.org/issu

[issue44891] Tests for `id(a) == id(a * 1)` for `bytes` and `str`

2021-08-11 Thread Nikita Sobolev
New submission from Nikita Sobolev : While working on `RustPython` (original issue: https://github.com/RustPython/RustPython/issues/2840), I've noticed that `tuple` in CPython has explicit tests that `id` does not change when multiplied by `1`, related: - https://github.com/python/cpython

[issue45269] c_make_encoder() has uncovered error: "argument 1 must be dict or None"

2021-09-23 Thread Nikita Sobolev
New submission from Nikita Sobolev : Looks like we never test error that `markers` are limited to `None` and `dict` types. Here: https://github.com/python/cpython/blob/main/Modules/_json.c#L1252-L1255 Coverage report: https://app.codecov.io/gh/python/cpython/blob/master/Modules/_json.c line

[issue45280] Empty typing.NamedTuple creation is not tested

2021-09-25 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +26942 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28559 ___ Python tracker <https://bugs.python.org/issu

[issue45283] Top / function argument level ClassVar should not be allowed during `get_type_hints()`

2021-09-25 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +26946 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28563 ___ Python tracker <https://bugs.python.org/issu

[issue45275] Make argparse print description of subcommand when invoke help doc on subcommand

2021-09-25 Thread Nikita Sobolev
Nikita Sobolev added the comment: Hi! >From your description it is not clear how exactly you create your subcommand. >From my experience, it works. Demo: ``` import argparse parser = argparse.ArgumentParser(description='Process some integers.') subparsers = parser.add_subp

[issue45283] Top / function argument level ClassVar should not be allowed during `get_type_hints()`

2021-09-25 Thread Nikita Sobolev
Nikita Sobolev added the comment: Thank you, Ken Jin! Very clear explanation! > It seems the current consensus is to use that import for code with purely > static typing, and not use it with runtime typing libraries. Is it an official position? Or just a common usage pattern? What can

[issue45283] Top / function argument level ClassVar should not be allowed during `get_type_hints()`

2021-09-25 Thread Nikita Sobolev
Nikita Sobolev added the comment: Just to bring in some context for this discussion: https://github.com/python/cpython/pull/28279 We have dicussed in the PR above that current implementation depends on existing of `__future__` import of `annotations`. With `from __future__ import

[issue45254] HAS_SHMEM detection logic is duplicated in implementation and tests

2021-09-21 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +26883 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28487 ___ Python tracker <https://bugs.python.org/issu

[issue45254] HAS_SHMEM detection logic is duplicated in implementation and tests

2021-09-21 Thread Nikita Sobolev
Change by Nikita Sobolev : -- components: +Tests versions: +Python 3.10, Python 3.11, Python 3.8, Python 3.9 ___ Python tracker <https://bugs.python.org/issue45

[issue45254] HAS_SHMEM detection logic is duplicated in implementation and tests

2021-09-21 Thread Nikita Sobolev
New submission from Nikita Sobolev : `HAS_SHMEM` is defined in `multiprocessing.managers` module https://github.com/python/cpython/blob/0bfa1106acfcddc03590e1f5d6789dbad3affe70/Lib/multiprocessing/managers.py#L35-L40 Later the same logic is duplicated in `_test_multiprocessing`: https

[issue41682] [Windows] test_asyncio: Proactor test_sendfile_close_peer_in_the_middle_of_receiving failure

2021-09-21 Thread Nikita Sobolev
Nikita Sobolev added the comment: Happened to me today: https://dev.azure.com/Python/cpython/_build/results?buildId=88208=logs=c83831cd-3752-5cc7-2f01-8276919eb334=5a421c4a-0933-53d5-26b9-04b36ad165eb ``` test_sendfile_close_peer_in_the_middle_of_receiving

[issue45366] dataclass init=False field with default works but default_factory does not

2021-10-05 Thread Nikita Sobolev
Nikita Sobolev added the comment: Right now `dataclasses.py` has this explanation: https://github.com/python/cpython/blame/07cf10bafc8f6e1fcc82c10d97d3452325fc7c04/Lib/dataclasses.py#L962-L966 ``` if isinstance(getattr(cls, f.name, None), Field): if f.default is MISSING

[issue45269] c_make_encoder() has uncovered error: "argument 1 must be dict or None"

2021-09-24 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +26924 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28540 ___ Python tracker <https://bugs.python.org/issu

[issue45280] Empty typing.NamedTuple creation is not tested

2021-09-24 Thread Nikita Sobolev
New submission from Nikita Sobolev : While working on `mypy` support of `NamedTuple`s (https://github.com/python/mypy/issues/11047), I've noticed that currently when testing `typing.NamedTuple` cases like: 1. `N = NamedTuple('N')` and 2. ```python class N(NamedTuple

[issue45283] Top / function argument level ClassVar should not be allowed during `get_type_hints()`

2021-09-24 Thread Nikita Sobolev
New submission from Nikita Sobolev : This code currently does not raise any issues: ```python # contents of `ex.py` from typing import ClassVar a: ClassVar[int] = 1 def b(c: ClassVar[int]): ... ``` And then: 1. Module: `python -c 'import ex; from typing import get_type_hints; print

[issue45281] Make `is_attribute` and `module` arguments to `ForwardRef` kw-only

2021-09-24 Thread Nikita Sobolev
New submission from Nikita Sobolev : After https://github.com/python/cpython/pull/28279 and https://bugs.python.org/issue45166 `ForwardRef` and `_type_check` now have `is_class` kw-only argument. It is now inconsistent with `is_argument` and `module` arguments. It would be quite nice to make

[issue45052] WithProcessesTestSharedMemory.test_shared_memory_basics fails on Windows

2021-08-30 Thread Nikita Sobolev
New submission from Nikita Sobolev : While working on https://github.com/python/cpython/pull/28060 we've noticed that `test.test_multiprocessing_spawn.WithProcessesTestSharedMemory.test_shared_memory_basics` fails on Windows

[issue45052] WithProcessesTestSharedMemory.test_shared_memory_basics fails on Windows

2021-08-30 Thread Nikita Sobolev
Nikita Sobolev added the comment: I would like to work on this issue. -- ___ Python tracker <https://bugs.python.org/issue45052> ___ ___ Python-bugs-list mailin

[issue45053] MD5SumTests.test_checksum_fodder fails on Windows

2021-08-30 Thread Nikita Sobolev
New submission from Nikita Sobolev : While working on https://github.com/python/cpython/pull/28060 we've noticed that `test.test_tools.test_md5sum.MD5SumTests.test_checksum_fodder` fails on Windows: ``` == FAIL

[issue45053] MD5SumTests.test_checksum_fodder fails on Windows

2021-08-30 Thread Nikita Sobolev
Nikita Sobolev added the comment: I would love to work on this issue :) -- ___ Python tracker <https://bugs.python.org/issue45053> ___ ___ Python-bugs-list m

[issue45042] Many multiprocessing tests are silently skipped since 3.9

2021-08-30 Thread Nikita Sobolev
Nikita Sobolev added the comment: Two new issues created: 1. https://bugs.python.org/issue45053 2. https://bugs.python.org/issue45052 -- ___ Python tracker <https://bugs.python.org/issue45

[issue45524] Cross-module dataclass inheritance breaks get_type_hints

2021-10-24 Thread Nikita Sobolev
Nikita Sobolev added the comment: In my opinion, it is never a bad thing to create a new issue :) сб, 23 окт. 2021 г. в 22:46, Sergei Lebedev : > > Sergei Lebedev added the comment: > > Is it worth filing a separate issue for locals()? > > In my experience local classes ar

[issue45566] `test_frozen_pickle` does not use all possible `pickle` protocols

2021-10-22 Thread Nikita Sobolev
New submission from Nikita Sobolev : While working on https://github.com/python/cpython/pull/29147 I've noticed that `test_frozen_pickle` does not use all possible `pickle` protocols: https://github.com/python/cpython/blob/276468dddb46c54980c782c09cdb53bd90755752/Lib/test/test_dataclasses.py

[issue45524] Cross-module dataclass inheritance breaks get_type_hints

2021-10-22 Thread Nikita Sobolev
Nikita Sobolev added the comment: I had some time to debug this. It happens because we treat classes and functions differently. The difference between `get_type_hints(B)` and `get_type_hints(B.__init__)` is that we use different `global` contexts there: - For `B` we use `__mro__` entries

[issue45566] `test_frozen_pickle` does not use all possible `pickle` protocols

2021-10-22 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +27427 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29150 ___ Python tracker <https://bugs.python.org/issu

[issue45520] Frozen dataclass deep copy doesn't work with __slots__

2021-10-22 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch nosy: +sobolevn nosy_count: 3.0 -> 4.0 pull_requests: +27423 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29147 ___ Python tracker <https://bugs.python.org/i

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

2021-10-22 Thread Nikita Sobolev
Nikita Sobolev added the comment: Thanks everyone. It is now fixed -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue45524] Cross-module dataclass inheritance breaks get_type_hints

2021-10-22 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +27433 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29158 ___ Python tracker <https://bugs.python.org/issu

[issue45574] Warning: ‘print_escape’ defined but not used

2021-10-22 Thread Nikita Sobolev
New submission from Nikita Sobolev : Recently, GitHub started to show a new warning: > Check warning on line 999 in Parser/tokenizer.c > GitHub Actions / Address sanitizer > Parser/tokenizer.c#L999 > ‘print_escape’ defined but not used [-Wunused-function] Link: https://githu

[issue45993] Main branch of CPython does not build anymore on macOS

2021-12-06 Thread Nikita Sobolev
Nikita Sobolev added the comment: Looks like removing cache worked. Thanks! -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.or

[issue46120] Add note to `typing.Union` that it is recommended to use `|` instead

2021-12-18 Thread Nikita Sobolev
New submission from Nikita Sobolev : As discussed in https://mail.python.org/archives/list/typing-...@python.org/thread/TW5M6XDN7DO346RXMADKBAAGNSZPC4ZQ/ > we could probably stick a huge notice in the typing.Union docs saying `|` is > preferred for readability in most

[issue46120] Add note to `typing.Union` that it is recommended to use `|` instead

2021-12-18 Thread Nikita Sobolev
Change by Nikita Sobolev : -- nosy: +asvetlov, kj ___ Python tracker <https://bugs.python.org/issue46120> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46198] Duplicate and unused code in tests

2022-01-01 Thread Nikita Sobolev
Nikita Sobolev added the comment: Thanks! I will also attach all `flake8`'s output if someone is going to need it: ``` » flake8 --select=F811 Lib/test Lib/test/test_descr.py:1165:13: F811 redefinition of unused 'C' from line 1158 Lib/test/test_descr.py:1172:13: F811 redefinition of unused 'C

[issue46198] Duplicated test name `test_get_unstructured_invalid_ew` in `test__header_value_parser.py`

2021-12-31 Thread Nikita Sobolev
Nikita Sobolev added the comment: Eric, should I patch this as well in this issue? Or should I open a new one? Would be happy to fix it :) -- ___ Python tracker <https://bugs.python.org/issue46

[issue46198] Duplicate and unused code in tests

2022-01-01 Thread Nikita Sobolev
Nikita Sobolev added the comment: > I think most of these are false positives Yes, they are! Please, check out my PR: https://github.com/python/cpython/pull/30297 сб, 1 янв. 2022 г. в 21:52, Éric Araujo : > > Éric Araujo added the comment: > > I think most of these are false

[issue46195] Annotated and Optional get_type_hints buggy interaction

2021-12-30 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +28517 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30304 ___ Python tracker <https://bugs.python.org/issu

[issue46162] Make `builtins.property` generic

2021-12-23 Thread Nikita Sobolev
Nikita Sobolev added the comment: Thanks, Guido! > Yes, it is too late for 3.10 (but you can add it to typing_extensions). Also, > PEP 585 is done, we don't update PEPs. Got it! > Please do test with `from __future__ import annotations` -- you never know. Done, PR is updated. No

[issue46162] Make `builtins.property` generic

2021-12-24 Thread Nikita Sobolev
Nikita Sobolev added the comment: Serhiy, no, we can infer that. There are two general cases: 1. `x = property(x_get, x_set)`, it is just ideal 2. `@property x` and `@x.setter`, it is also inferable with a bit of special casing for the mutable type part (we mutate the type of `x` when

[issue46178] Remove `.travis.yml`?

2021-12-26 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +28478 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30257 ___ Python tracker <https://bugs.python.org/issu

[issue46178] Remove `.travis.yml`?

2021-12-26 Thread Nikita Sobolev
Nikita Sobolev added the comment: Permanent link to the last version of this file: https://github.com/python/cpython/blob/078abb676cf759b1e960f78390b6e80f256f0255/.travis.yml -- ___ Python tracker <https://bugs.python.org/issue46

[issue46170] Improving the error message when subclassing NewType

2021-12-26 Thread Nikita Sobolev
Nikita Sobolev added the comment: > I'd be happy to patch this myself if this sounds like a good idea. Oh, please, go ahead! :) Would be happy to review. -- ___ Python tracker <https://bugs.python.org/issu

[issue46178] Remove `.travis.yml`?

2021-12-26 Thread Nikita Sobolev
New submission from Nikita Sobolev : Travis does not seem to be used anymore. There are not builds in Travis for cpython on `.org`: https://travis-ci.org/github/python/cpython/builds The last build on `.com` is 6 month old: https://app.travis-ci.com/github/python/cpython/builds If some

[issue46170] Improving the error message when subclassing NewType

2021-12-26 Thread Nikita Sobolev
Nikita Sobolev added the comment: This seems like a good idea to me. I will send a PR for others to judge :) -- nosy: +sobolevn ___ Python tracker <https://bugs.python.org/issue46

[issue46170] Improving the error message when subclassing NewType

2021-12-26 Thread Nikita Sobolev
Nikita Sobolev added the comment: Turns out modern docs already have this problem fixed: https://docs.python.org/3/library/typing.html#newtype -- ___ Python tracker <https://bugs.python.org/issue46

[issue46170] Improving the error message when subclassing NewType

2021-12-26 Thread Nikita Sobolev
Nikita Sobolev added the comment: > So maybe those docs are incorrect? I can't find anything in PEP 484 about > this. Mypy even has an explicit test that NewType of NewType should work: https://github.com/python/mypy/blob/f96446ce2f99a86210b21d39c7aec4b13a8bfc66/test-data/unit

[issue46184] Remove `netlify.toml`?

2021-12-26 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +28487 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30272 ___ Python tracker <https://bugs.python.org/issu

[issue46184] Remove `netlify.toml`?

2021-12-26 Thread Nikita Sobolev
New submission from Nikita Sobolev : It was added one year ago in https://bugs.python.org/issue37860 But, it is not used. Right now it does not do anything. Others report that it has a lot of limitations (including financial and technical ones): https://github.com/python/cpython/pull/15288

[issue46178] Remove `.travis.yml`?

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

[issue46184] Remove `netlify.toml`?

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

[issue46229] CODE_OF_CONDUCT shadowing org default

2022-01-02 Thread Nikita Sobolev
New submission from Nikita Sobolev : Problem: we have two CODE_OF_CONDUCT files. 1. In CPython: https://github.com/python/cpython/blob/main/CODE_OF_CONDUCT.md (last updated 3 years ago) 2. In Python org, default for all repos: https://github.com/python/.github/blob/master/CODE_OF_CONDUCT.md

[issue46229] CODE_OF_CONDUCT shadowing org default

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

[issue46262] Error path in `_missing_()` is not covered for `enum.Flag` and `enum.IntFlag`

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

[issue46262] Error path in `_missing_()` is not covered for `enum.Flag` and `enum.IntFlag`

2022-01-04 Thread Nikita Sobolev
New submission from Nikita Sobolev : I've noticed that `enum.Flag._missing_` has some uncovered paths. For example, this error is never checked: https://github.com/python/cpython/blob/31e43cbe5f01cdd5b5ab330ec3040920e8b61a91/Lib/enum.py#L1222-L1225 The same method for `Enum` has good

[issue46239] Incosistent error message in asyncio: windows_events / windows_utils

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

[issue46242] Improve error message when creating an enum with `__call__`

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

[issue46242] Improve error message when creating an enum with `__call__`

2022-01-03 Thread Nikita Sobolev
New submission from Nikita Sobolev : Right now when creating a new `Enum`, we check not to extend `Enum` with existing `_member_names_`: ```python Python 3.11.0a3+ (heads/main:8d7644fa64, Dec 30 2021, 13:00:40) [Clang 11.0.0 (clang-1100.0.33.16)] on darwin Type "help", "copyr

[issue46266] Improve day constants (`MONDAY` ... `SUNDAY`) in `calendar.py`

2022-01-05 Thread Nikita Sobolev
New submission from Nikita Sobolev : For some reasons useful day constants (`MONDAY` ... `SUNDAY`) from `calendar` are not properly recognised. Several problems: 0. Not all code inside uses these constants 1. They are not tested. Only `.MONDAY` and `.SUNDAY` are tested to be present

[issue46268] Buildbot failure for buildbot/AMD64 FreeBSD Non-Debug / Shared 3.x

2022-01-05 Thread Nikita Sobolev
New submission from Nikita Sobolev : Log: ``` --- sharedmods --- LD_LIBRARY_PATH=/usr/home/buildbot/python/3.x.koobs-freebsd-564d/build CC='cc -pthread' LDSHARED='cc -pthread -shared' OPT='-g -O0 -Wall' _TCLTK_INCLUDES='' _TCLTK_LIBS='' ./python -E ./setup.py build Traceback (most

[issue46266] Improve day constants (`MONDAY` ... `SUNDAY`) in `calendar.py`

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

[issue46268] Buildbot failure for buildbot/AMD64 FreeBSD Non-Debug / Shared 3.x

2022-01-05 Thread Nikita Sobolev
Nikita Sobolev added the comment: It also generates several warnings: ``` Python/pytime.c:297:10: warning: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Wimplicit-int-float-conversion] Python/pytime.c:352:14: warning: implicit

[issue46269] '__new__' is never shown in `dir(SomeEnum)`

2022-01-05 Thread Nikita Sobolev
New submission from Nikita Sobolev : Right now `__new__` is marked to be special-cased in `Enum.__dir__`. It is generally ignored: But, (I think that was the original idea), when `__new__` is overridden, it should be added to the output. But, this line is problematic: https://github.com

[issue46269] '__new__' is never shown in `dir(SomeEnum)`

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

[issue46266] Improve day constants (`MONDAY` ... `SUNDAY`) in `calendar.py`

2022-01-05 Thread Nikita Sobolev
Nikita Sobolev added the comment: > I don't think these were intended to be public. Thanks for the feedback! The problem is they are documented here: https://docs.python.org/3/library/calendar.html#calendar.setfirstweekday Should we change the docs there to hide them as implementat

[issue46120] Add note to `typing.Union` that it is recommended to use `|` instead

2021-12-21 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +28443 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30222 ___ Python tracker <https://bugs.python.org/issu

[issue46150] test_pathlib assumes "fakeuser" does not exist as user

2021-12-23 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch nosy: +sobolevn nosy_count: 1.0 -> 2.0 pull_requests: +28462 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30240 ___ Python tracker <https://bugs.python.org/i

[issue46162] Make `builtins.property` generic

2021-12-23 Thread Nikita Sobolev
New submission from Nikita Sobolev : Original discussion in `typing` bug tracker: https://github.com/python/typing/issues/985 Short description: - `property[GetType, SetType]` is required for us to remove a lot of special casing from type-checkers and just use the primitive type - In runtime

[issue46162] Make `builtins.property` generic

2021-12-23 Thread Nikita Sobolev
Change by Nikita Sobolev : -- keywords: +patch pull_requests: +28460 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30238 ___ Python tracker <https://bugs.python.org/issu

  1   2   3   4   >