Change by Nikita Sobolev :
--
keywords: +patch
pull_requests: +28806
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30606
___
Python tracker
<https://bugs.python.org/issu
Nikita Sobolev added the comment:
Arie, can you please explain what is the technical difference between these two
cases:
```python
class A:
__slots__ = ('a', )
# fields
class B(A):
__slots__ = ('a', 'b')
# fields
```
And:
```pytho
New submission from Nikita Sobolev :
There are several problems with this test:
https://github.com/python/cpython/blob/d02c5e9b55a8651b7d396ac3f2bdedf1fc1780b5/Lib/test/test_typing.py#L2130
1. It does not test all `pickle` protocols
2. It does not test newly added `ParamSpec` (probably others
Change by Nikita Sobolev :
--
keywords: +patch
pull_requests: +28816
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30613
___
Python tracker
<https://bugs.python.org/issu
New submission from Nikita Sobolev :
Right now this test does not test all pickle protocols:
https://github.com/python/cpython/blob/d02c5e9b55a8651b7d396ac3f2bdedf1fc1780b5/Lib/test/test_collections.py#L680-L682
But, I guess that it should, like all other tests do.
PR is on its way
Change by Nikita Sobolev :
--
keywords: +patch
pull_requests: +28817
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30614
___
Python tracker
<https://bugs.python.org/issu
Nikita Sobolev added the comment:
Thank you, Jelle. Will send a PR to typing_extensions today as well :)
--
___
Python tracker
<https://bugs.python.org/issue46
New submission from Nikita Sobolev :
Right now all `Concatenate` tests do not cover `Callable[..., Concatenate]`
case.
Link:
https://github.com/python/cpython/blob/09087b8519316608b85131ee7455b664c00c38d2/Lib/test/test_typing.py#L4862-L4877
I think, that this should be improved. It is an
Change by Nikita Sobolev :
--
keywords: +patch
pull_requests: +28822
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30618
___
Python tracker
<https://bugs.python.org/issu
New submission from Nikita Sobolev :
Right now if I remove these lines:
```python
if parameters == ():
raise TypeError("Cannot take a Concatenate of no types.")
if not isinstance(parameters, tuple):
parameters = (parameters,)
if not isinstance(par
Change by Nikita Sobolev :
--
keywords: +patch
pull_requests: +28823
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30619
___
Python tracker
<https://bugs.python.org/issu
Nikita Sobolev added the comment:
> Sorry I'm confused: Callable[..., Concatenate] is invalid usage. So I don't
> think we need to test it.
Yes, my bad :)
In this case, do we need to make this a `TypeError`? Right now you can use
`Concatenate` as
Nikita Sobolev added the comment:
Thank you for the explanation, Ken Jin.
Going to close this issue as invalid.
--
resolution: -> not a bug
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bug
New submission from Nikita Sobolev :
Today I've noticed that these two methods are not covered:
https://github.com/python/cpython/blame/16901c0482734dbd389b09ca3edfcf3e22faeed7/Lib/typing.py#L1028-L1032
- `typing._GenericAlias.__or__`
- `typing._GenericAlias.__ror__`
Later, I'v
Change by Nikita Sobolev :
--
keywords: +patch
pull_requests: +28843
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30640
___
Python tracker
<https://bugs.python.org/issu
New submission from Nikita Sobolev :
Here's the problem:
```
» ./python.exe Lib/test/test_typi
Change by Nikita Sobolev :
--
keywords: +patch
pull_requests: +28844
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30641
___
Python tracker
<https://bugs.python.org/issu
Change by Nikita Sobolev :
--
nosy: +sobolevn
___
Python tracker
<https://bugs.python.org/issue46414>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Nikita Sobolev :
Right now `MODULE` in Lib/test/test_enum.py is defined as:
```python
MODULE = ('test.test_enum', '__main__')[__name__=='__main__']
```
I dived into history and did not find any reasoning why it should not be just
`__name__
Change by Nikita Sobolev :
--
keywords: +patch
pull_requests: +28849
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30647
___
Python tracker
<https://bugs.python.org/issu
Change by Nikita Sobolev :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Nikita Sobolev :
While working on https://github.com/python/cpython/pull/30058 I've noticed that
`Positions` namedtuple is kinda strange, source:
https://github.com/python/cpython/blame/8c2fd09f365e082cfceb29afdf38953cdd670946/Lib/dis.py#L204-L213
Why?
1. It is not
Nikita Sobolev added the comment:
I've opened a new issue about unused `dis.Positions` here:
https://bugs.python.org/issue46422
--
nosy: +sobolevn
___
Python tracker
<https://bugs.python.org/is
New submission from Nikita Sobolev :
This condition is not covered:
https://github.com/python/cpython/blob/bdf2ab1887a2edfb089a3c2a1590cf1e84ea0048/Lib/typing.py#L1674-L1677
I propose to add a test for it, because `Annotated[int]` is invalid.
PR is on its way :)
--
components: Tests
Change by Nikita Sobolev :
--
keywords: +patch
pull_requests: +28864
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30663
___
Python tracker
<https://bugs.python.org/issu
Change by Nikita Sobolev :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Nikita Sobolev :
While working on a similar issue for `test_typing.py`
(https://bugs.python.org/issue46416) I wondered: how many other modules also
have this problem?
So, after several hours of local testing, I got several problems:
- Lib/test/test_compileall.py
Uses
Change by Nikita Sobolev :
--
keywords: +patch
pull_requests: +28866
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30666
___
Python tracker
<https://bugs.python.org/issu
Nikita Sobolev added the comment:
Thank you, Ethan. Good idea! Will do from the second PR.
Thanks for merging, Serhiy.
--
___
Python tracker
<https://bugs.python.org/issue46
Change by Nikita Sobolev :
--
pull_requests: +28876
pull_request: https://github.com/python/cpython/pull/30676
___
Python tracker
<https://bugs.python.org/issue46
Nikita Sobolev added the comment:
Terry, yes I am using this script to run tests locally:
```bash
#!/usr/bin/env bash
set -e
while read line; do
./python.exe "$line"
done < files.txt
```
And this one to populate `files.txt`:
```bash
find ./Lib -iname 'test*.py
Change by Nikita Sobolev :
--
pull_requests: +28880
pull_request: https://github.com/python/cpython/pull/30681
___
Python tracker
<https://bugs.python.org/issue46
Nikita Sobolev added the comment:
Important note, in practice there's also a difference in how one calls some
test module:
- python Lib/test/test_contextlib.py
- python ./Lib/test/test_contextlib.py
Example of a test failure because of that:
https://github.com/python/cpython/pull/
Change by Nikita Sobolev :
--
pull_requests: +28881
pull_request: https://github.com/python/cpython/pull/30682
___
Python tracker
<https://bugs.python.org/issue46
Nikita Sobolev added the comment:
Ok then, I will send my option `2` proposal to fix this later today.
--
___
Python tracker
<https://bugs.python.org/issue46
Change by Nikita Sobolev :
--
pull_requests: +28895
pull_request: https://github.com/python/cpython/pull/30697
___
Python tracker
<https://bugs.python.org/issue46
Change by Nikita Sobolev :
--
pull_requests: +28896
pull_request: https://github.com/python/cpython/pull/30698
___
Python tracker
<https://bugs.python.org/issue46
Change by Nikita Sobolev :
--
pull_requests: +28897
pull_request: https://github.com/python/cpython/pull/30699
___
Python tracker
<https://bugs.python.org/issue46
Change by Nikita Sobolev :
--
pull_requests: +28898
pull_request: https://github.com/python/cpython/pull/30700
___
Python tracker
<https://bugs.python.org/issue46
New submission from Nikita Sobolev :
There are several legacy `hasattr` checks that are always `True` in newer
Python versions:
1.
https://github.com/python/cpython/blob/d45cd2d20770f72a000ba6dfa9ac88dd49423c27/Lib/test/test_typing.py#L3516
2.
https://github.com/python/cpython/blob
Change by Nikita Sobolev :
--
nosy: +kj
___
Python tracker
<https://bugs.python.org/issue46437>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Nikita Sobolev :
--
keywords: +patch
pull_requests: +28900
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30704
___
Python tracker
<https://bugs.python.org/issu
Change by Nikita Sobolev :
--
pull_requests: +28903
pull_request: https://github.com/python/cpython/pull/30707
___
Python tracker
<https://bugs.python.org/issue46
Change by Nikita Sobolev :
--
keywords: +patch
pull_requests: +28908
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30716
___
Python tracker
<https://bugs.python.org/issu
New submission from Nikita Sobolev :
Why is this important?
1. Because multiple inheritance of `TypedDict` might not handle
`__required_keys__`, or `__optional_keys__`, or `__annotations__` correctly,
this is especially important because some classes might be defined as
`total=False` and
Change by Nikita Sobolev :
--
nosy: +gvanrossum, kj
___
Python tracker
<https://bugs.python.org/issue46445>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Nikita Sobolev :
--
keywords: +patch
pull_requests: +28910
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30719
___
Python tracker
<https://bugs.python.org/issu
Change by Nikita Sobolev :
--
nosy: +sobolevn
___
Python tracker
<https://bugs.python.org/issue46442>
___
___
Python-bugs-list mailing list
Unsubscribe:
Change by Nikita Sobolev :
--
pull_requests: +28915
pull_request: https://github.com/python/cpython/pull/30725
___
Python tracker
<https://bugs.python.org/issue46
Change by Nikita Sobolev :
--
pull_requests: +28933
pull_request: https://github.com/python/cpython/pull/30746
___
Python tracker
<https://bugs.python.org/issue46
New submission from Nikita Sobolev :
Right now it has two sections:
```
.. versionchanged:: 3.11
The ``__exit__`` function is in position 8 of the stack rather than 7.
```
And
```
.. versionchanged:: 3.11
The ``__exit__`` function is in position 4 of the stack rather than 7
Change by Nikita Sobolev :
--
keywords: +patch
pull_requests: +28939
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30752
___
Python tracker
<https://bugs.python.org/issu
Nikita Sobolev added the comment:
> So maybe that code could just be removed?
I see this trend in typing.py :)
I think it makes sense to make all new types (I still consider `ParamSpec` and
`Concatenate` as new, desipte the fact they are already released in 3.10) as
flexible as possi
Nikita Sobolev added the comment:
With this change `typing.py` and `typing_extensions.py` will have different
logic:
https://github.com/python/typing/blob/523cf0233edc7a29502fbd30dc6bf641a7408e16/typing_extensions/src/typing_extensions.py#L1805-L1811
Jelle, what should we do
Nikita Sobolev added the comment:
Thanks for the review and merge! :sparkle:
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
New submission from Nikita Sobolev :
Here's how `_remove_dups_flatten` is defined right now:
```
def _remove_dups_flatten(parameters):
"""An internal helper for Union creation and substitution: flatten Unions
among parameters, then remove duplicates.
"&
Change by Nikita Sobolev :
--
keywords: +patch
pull_requests: +28965
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30780
___
Python tracker
<https://bugs.python.org/issu
Change by Nikita Sobolev :
--
pull_requests: +28977
pull_request: https://github.com/python/cpython/pull/30792
___
Python tracker
<https://bugs.python.org/issue46
Change by Nikita Sobolev :
--
pull_requests: +28985
pull_request: https://github.com/python/cpython/pull/30800
___
Python tracker
<https://bugs.python.org/issue46
Change by Nikita Sobolev :
--
keywords: +patch
pull_requests: +28986
pull_request: https://github.com/python/cpython/pull/30801
___
Python tracker
<https://bugs.python.org/issue41
Change by Nikita Sobolev :
--
nosy: +sobolevn
nosy_count: 1.0 -> 2.0
pull_requests: +28991
pull_request: https://github.com/python/cpython/pull/30780
___
Python tracker
<https://bugs.python.org/issu
Nikita Sobolev added the comment:
It does not happen anymore on `main` (3.11):
```
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"
Nikita Sobolev added the comment:
I agree.
Plus, I cannot refrain from saying that it is generally quite hard to teach
what "NoReturn" is.
I start by explaining what bottom type and `void` is and then just say that in
Python it is called `NoReturn`. I remember that there was a
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
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
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
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 this
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
Change by Nikita Sobolev :
--
pull_requests: +29030
pull_request: https://github.com/python/cpython/pull/30848
___
Python tracker
<https://bugs.python.org/issue46
Change by Nikita Sobolev :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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
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, C
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
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
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
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.NewType
Nikita Sobolev added the comment:
I filled a new issue: https://bugs.python.org/issue46523
--
___
Python tracker
<https://bugs.python.org/issue46519>
___
___
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
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
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
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
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
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
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
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
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
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 mis
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/606e496dd6e2ace298532da
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/606e496dd6e2ace298532da
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
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
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_na
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
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 t
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
Change by Nikita Sobolev :
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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 d
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
Nikita Sobolev added the comment:
Thank you!
--
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.or
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 n
101 - 200 of 365 matches
Mail list logo