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
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
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
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
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
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
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
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
Change by Nikita Sobolev :
--
pull_requests: +26631
pull_request: https://github.com/python/cpython/pull/28182
___
Python tracker
<https://bugs.python.org/issue45
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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')
...
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Nikita Sobolev added the comment:
I would like to work on this issue.
--
___
Python tracker
<https://bugs.python.org/issue45052>
___
___
Python-bugs-list mailin
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
Nikita Sobolev added the comment:
I would love to work on this issue :)
--
___
Python tracker
<https://bugs.python.org/issue45053>
___
___
Python-bugs-list m
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
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
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
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
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
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
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
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
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
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
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
Change by Nikita Sobolev :
--
nosy: +asvetlov, kj
___
Python tracker
<https://bugs.python.org/issue46120>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Nikita Sobolev added the comment:
Thanks everyone!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
Change by Nikita Sobolev :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 - 100 of 365 matches
Mail list logo